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
37,100
js_free_port
bluesky950520[P]quickjs/quickjs-libc.c
static void js_free_port(JSRuntime *rt, JSWorkerMessageHandler *port) { if (port) { js_free_message_pipe(port->recv_pipe); JS_FreeValueRT(rt, port->on_message_func); list_del(&port->link); js_free_rt(rt, port); } }
O2
c
js_free_port: testq %rsi, %rsi je 0x12f2d pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rsi), %rdi callq 0x10360 movq 0x18(%rbx), %rsi movq 0x20(%rbx), %rdx movq %r14, %rdi callq 0x18031 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x170cb retq
js_free_port: test rsi, rsi jz short locret_12F2D push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rsi+10h] call js_free_message_pipe mov rsi, [rbx+18h] mov rdx, [rbx+20h] mov rdi, r14 call JS_FreeValueRT mov rax, [rbx] mov rcx, [rbx+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt locret_12F2D: retn
long long js_free_port(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx long long result; // rax if ( a2 ) { js_free_message_pipe(a2[2]); JS_FreeValueRT(a1, a2[3], a2[4]); v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; return js_free_rt(a1, a2); } return result; }
js_free_port: TEST RSI,RSI JZ 0x00112f2d PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RSI + 0x10] CALL 0x00110360 MOV RSI,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RBX + 0x20] MOV RDI,R14 CALL 0x00118031 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001170cb LAB_00112f2d: RET
void js_free_port(int8 param_1,long *param_2) { long lVar1; long *plVar2; if (param_2 != (long *)0x0) { js_free_message_pipe(param_2[2]); JS_FreeValueRT(param_1,param_2[3],param_2[4]); lVar1 = *param_2; plVar2 = (long *)param_2[1]; *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; *param_2 = 0; param_2[1] = 0; js_free_rt(param_1,param_2); return; } return; }
37,101
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) leaq 0x30d00(%rip), %rsi # 0xae033 leaq 0x30cfb(%rip), %rdx # 0xae035 callq 0x1de7e movl %ebx, %eax shrl $0x4, %eax leaq 0x32f70(%rip), %rcx # 0xb02bb movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rax, [rdi+10h] mov [rdi], rax lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, aInvalidStringS_0+43h; "" 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 eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes( _QWORD *a1, unsigned int a2) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "FF", (long long)""); *(_BYTE *)*a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RSI,[0x1ae033] LEA RDX,[0x1ae035] CALL 0x0011de7e MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1b02bb] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::hex_bytes(unsigned char) */ serializer<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>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<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>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,"FF",""); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
37,102
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char)
monkey531[P]llama/common/json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) leaq 0x2ee56(%rip), %rsi # 0xab023 leaq 0x2ee51(%rip), %rdx # 0xab025 callq 0x1ded4 movl %ebx, %eax shrl $0x4, %eax leaq 0x310c6(%rip), %rcx # 0xad2ab movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rax, [rdi+10h] mov [rdi], rax lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, aInvalidStringS_0+43h; "" 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 eax, ebx shr eax, 4 lea rcx, a0123456789abcd; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes( long long a1, unsigned int a2) { *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char const*>(a1, "FF", (long long)""); **(_BYTE **)a1 = a0123456789abcd[a2 >> 4]; *(_BYTE *)(*(_QWORD *)a1 + 1LL) = a0123456789abcd[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX LEA RSI,[0x1ab023] LEA RDX,[0x1ab025] CALL 0x0011ded4 MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1ad2ab] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::hex_bytes(unsigned char) */ serializer<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>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<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>> ::hex_bytes(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,uchar param_1) { int7 in_register_00000031; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,"FF",""); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
37,103
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis(double const*, double**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalRegularBasis(REAL const uv[2], REAL * wDeriv[]) const { Far::PatchParam patchParam; patchParam.Set(0, 0, 0, 0, 0, getRegPatchMask(), 0, true); Far::internal::EvaluatePatchBasisNormalized( getRegPatchType(), patchParam, uv[0], uv[1], wDeriv[0], wDeriv[1], wDeriv[2], wDeriv[3], wDeriv[4], wDeriv[5]); }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis(double const*, double**) const: subq $0x18, %rsp movzbl 0x6e(%rdi), %ecx andl $0x1f, %ecx shlq $0x27, %rcx btsq $0x25, %rcx leaq 0x10(%rsp), %rax movq %rcx, (%rax) movzbl 0x6d(%rdi), %edi movsd (%rsi), %xmm0 movsd 0x8(%rsi), %xmm1 movq (%rdx), %r10 movq 0x8(%rdx), %rcx movq 0x10(%rdx), %r8 movq 0x18(%rdx), %r9 movups 0x20(%rdx), %xmm2 movups %xmm2, (%rsp) xorps %xmm2, %xmm2 movq %rax, %rsi movq %r10, %rdx callq 0x39920 addq $0x18, %rsp retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE16evalRegularBasisEPKdPPd: sub rsp, 18h movzx ecx, byte ptr [rdi+6Eh] and ecx, 1Fh shl rcx, 27h bts rcx, 25h ; '%' lea rax, [rsp+18h+var_8] mov [rax], rcx movzx edi, byte ptr [rdi+6Dh] movsd xmm0, qword ptr [rsi] movsd xmm1, qword ptr [rsi+8] mov r10, [rdx] mov rcx, [rdx+8] mov r8, [rdx+10h] mov r9, [rdx+18h] movups xmm2, xmmword ptr [rdx+20h] movups [rsp+18h+var_18], xmm2 xorps xmm2, xmm2 mov rsi, rax mov rdx, r10 call __ZN10OpenSubdiv6v3_6_03Far8internal28EvaluatePatchBasisNormalizedIdEEiiRKNS1_10PatchParamET_S7_PS7_S8_S8_S8_S8_S8_S7_; OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<double>(int,OpenSubdiv::v3_6_0::Far::PatchParam const&,double,double,double*,double*,double*,double*,double*,double*,double) add rsp, 18h retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis(long long a1, double *a2, long long a3) { unsigned long long v4; // [rsp+10h] [rbp-8h] BYREF v4 = ((unsigned long long)(*(_BYTE *)(a1 + 110) & 0x1F) << 39) | 0x2000000000LL; return OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<double>( *(unsigned __int8 *)(a1 + 109), &v4, *(double **)a3, *(double **)(a3 + 8), *(__m128d **)(a3 + 16), *(double **)(a3 + 24), (__m128d)*(unsigned long long *)a2, a2[1], 0.0, *(double **)(a3 + 32), *(double **)(a3 + 40)); }
evalRegularBasis: SUB RSP,0x18 MOVZX ECX,byte ptr [RDI + 0x6e] AND ECX,0x1f SHL RCX,0x27 BTS RCX,0x25 LEA RAX,[RSP + 0x10] MOV qword ptr [RAX],RCX MOVZX EDI,byte ptr [RDI + 0x6d] MOVSD XMM0,qword ptr [RSI] MOVSD XMM1,qword ptr [RSI + 0x8] MOV R10,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] MOV R8,qword ptr [RDX + 0x10] MOV R9,qword ptr [RDX + 0x18] MOVUPS XMM2,xmmword ptr [RDX + 0x20] MOVUPS xmmword ptr [RSP],XMM2 XORPS XMM2,XMM2 MOV RSI,RAX MOV RDX,R10 CALL 0x00139920 ADD RSP,0x18 RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis(double const*, double**) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis (Surface<double> *this,double *param_1,double **param_2) { ulong local_8; local_8 = (ulong)((byte)this[0x6e] & 0x1f) << 0x27 | 0x2000000000; Far::internal::EvaluatePatchBasisNormalized<double> ((uint)(byte)this[0x6d],(PatchParam *)&local_8,*param_1,param_1[1],*param_2,param_2[1], param_2[2],param_2[3],param_2[4],param_2[5],0.0); return; }
37,104
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis(double const*, double**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalRegularBasis(REAL const uv[2], REAL * wDeriv[]) const { Far::PatchParam patchParam; patchParam.Set(0, 0, 0, 0, 0, getRegPatchMask(), 0, true); Far::internal::EvaluatePatchBasisNormalized( getRegPatchType(), patchParam, uv[0], uv[1], wDeriv[0], wDeriv[1], wDeriv[2], wDeriv[3], wDeriv[4], wDeriv[5]); }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularBasis(double const*, double**) const: subq $0x18, %rsp movzbl 0x6e(%rdi), %ecx andl $0x1f, %ecx shlq $0x27, %rcx btsq $0x25, %rcx leaq 0x10(%rsp), %rax movq %rcx, (%rax) movzbl 0x6d(%rdi), %edi movss (%rsi), %xmm0 movss 0x4(%rsi), %xmm1 movq (%rdx), %r10 movq 0x8(%rdx), %rcx movq 0x10(%rdx), %r8 movq 0x18(%rdx), %r9 movups 0x20(%rdx), %xmm2 movups %xmm2, (%rsp) xorps %xmm2, %xmm2 movq %rax, %rsi movq %r10, %rdx callq 0x3a600 addq $0x18, %rsp retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE16evalRegularBasisEPKfPPf: sub rsp, 18h movzx ecx, byte ptr [rdi+6Eh] and ecx, 1Fh shl rcx, 27h bts rcx, 25h ; '%' lea rax, [rsp+18h+var_8] mov [rax], rcx movzx edi, byte ptr [rdi+6Dh] movss xmm0, dword ptr [rsi] movss xmm1, dword ptr [rsi+4] mov r10, [rdx] mov rcx, [rdx+8] mov r8, [rdx+10h] mov r9, [rdx+18h] movups xmm2, xmmword ptr [rdx+20h] movups [rsp+18h+var_18], xmm2 xorps xmm2, xmm2 mov rsi, rax mov rdx, r10 call __ZN10OpenSubdiv6v3_6_03Far8internal28EvaluatePatchBasisNormalizedIfEEiiRKNS1_10PatchParamET_S7_PS7_S8_S8_S8_S8_S8_S7_; OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<float>(int,OpenSubdiv::v3_6_0::Far::PatchParam const&,float,float,float*,float*,float*,float*,float*,float*,float) add rsp, 18h retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularBasis(long long a1, unsigned int *a2, __m128 **a3) { unsigned long long v4; // [rsp+10h] [rbp-8h] BYREF v4 = ((unsigned long long)(*(_BYTE *)(a1 + 110) & 0x1F) << 39) | 0x2000000000LL; return OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<float>( *(unsigned __int8 *)(a1 + 109), &v4, *a3, a3[1], a3[2], a3[3], (__m128)*a2, (__m128)a2[1], 0.0, a3[4], a3[5]); }
evalRegularBasis: SUB RSP,0x18 MOVZX ECX,byte ptr [RDI + 0x6e] AND ECX,0x1f SHL RCX,0x27 BTS RCX,0x25 LEA RAX,[RSP + 0x10] MOV qword ptr [RAX],RCX MOVZX EDI,byte ptr [RDI + 0x6d] MOVSS XMM0,dword ptr [RSI] MOVSS XMM1,dword ptr [RSI + 0x4] MOV R10,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] MOV R8,qword ptr [RDX + 0x10] MOV R9,qword ptr [RDX + 0x18] MOVUPS XMM2,xmmword ptr [RDX + 0x20] MOVUPS xmmword ptr [RSP],XMM2 XORPS XMM2,XMM2 MOV RSI,RAX MOV RDX,R10 CALL 0x0013a600 ADD RSP,0x18 RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularBasis(float const*, float**) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularBasis (Surface<float> *this,float *param_1,float **param_2) { ulong local_8; local_8 = (ulong)((byte)this[0x6e] & 0x1f) << 0x27 | 0x2000000000; Far::internal::EvaluatePatchBasisNormalized<float> ((uint)(byte)this[0x6d],(PatchParam *)&local_8,*param_1,param_1[1],*param_2,param_2[1], param_2[2],param_2[3],param_2[4],param_2[5],0.0); return; }
37,105
mi_munmap_file
eloqsql/storage/myisam/mi_dynrec.c
int mi_munmap_file(MI_INFO *info) { int ret; DBUG_ENTER("mi_unmap_file"); if ((ret= my_munmap((void*) info->s->file_map, info->s->mmaped_length))) DBUG_RETURN(ret); info->s->file_read= mi_nommap_pread; info->s->file_write= mi_nommap_pwrite; info->s->file_map= 0; info->s->mmaped_length= 0; DBUG_RETURN(0); }
O0
c
mi_munmap_file: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rsi callq 0x281f0 movl %eax, -0x14(%rbp) cmpl $0x0, %eax je 0x3068f jmp 0x30687 movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x306e4 movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x53(%rip), %rcx # 0x306f0 movq %rcx, 0x2e0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x9e(%rip), %rcx # 0x30750 movq %rcx, 0x2e8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq $0x0, 0x270(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq $0x0, 0x4d0(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
mi_munmap_file: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+270h] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+4D0h] call _munmap mov [rbp+var_14], eax cmp eax, 0 jz short loc_3068F jmp short $+2 loc_30687: mov eax, [rbp+var_14] mov [rbp+var_4], eax jmp short loc_306E4 loc_3068F: mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_nommap_pread mov [rax+2E0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_nommap_pwrite mov [rax+2E8h], rcx mov rax, [rbp+var_10] mov rax, [rax] mov qword ptr [rax+270h], 0 mov rax, [rbp+var_10] mov rax, [rax] mov qword ptr [rax+4D0h], 0 mov [rbp+var_4], 0 loc_306E4: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long mi_munmap_file(long long a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] v2 = munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL)); if ( v2 ) { return v2; } else { *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_nommap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_nommap_pwrite; *(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL; *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = 0LL; return 0; } }
mi_munmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x4d0] CALL 0x001281f0 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JZ 0x0013068f JMP 0x00130687 LAB_00130687: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX JMP 0x001306e4 LAB_0013068f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x1306f0] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x130750] MOV qword ptr [RAX + 0x2e8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x4d0],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_001306e4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int mi_munmap_file(long *param_1) { int local_c; local_c = munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0)); if (local_c == 0) { *(code **)(*param_1 + 0x2e0) = mi_nommap_pread; *(code **)(*param_1 + 0x2e8) = mi_nommap_pwrite; *(int8 *)(*param_1 + 0x270) = 0; *(int8 *)(*param_1 + 0x4d0) = 0; local_c = 0; } return local_c; }
37,106
mi_end_bulk_insert
eloqsql/storage/myisam/mi_write.c
int mi_end_bulk_insert(MI_INFO *info, my_bool abort) { int first_error= 0; if (info->bulk_insert) { uint i; for (i=0 ; i < info->s->base.keys ; i++) { if (is_tree_inited(& info->bulk_insert[i])) { int error; if ((error= delete_tree(& info->bulk_insert[i], abort))) { first_error= first_error ? first_error : error; abort= 1; } } } my_free(info->bulk_insert); info->bulk_insert=0; } return first_error; }
O3
c
mi_end_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x80(%rdi), %rdi testq %rdi, %rdi je 0x8b07d movq (%rbx), %rax cmpl $0x0, 0x180(%rax) je 0x8b082 xorl %r12d, %r12d xorl %r13d, %r13d xorl %r14d, %r14d movq 0x80(%rbx), %rdi cmpq $0x0, (%rdi,%r12) je 0x8b05f addq %r12, %rdi movsbl %sil, %r15d movl %r15d, %esi callq 0xa9046 testl %r14d, %r14d movl %r14d, %ecx cmovel %eax, %ecx testl %eax, %eax cmovnel %ecx, %r14d movzbl %r15b, %esi movl $0x1, %eax cmovnel %eax, %esi movq (%rbx), %rax incq %r13 movl 0x180(%rax), %ecx addq $0x298, %r12 # imm = 0x298 cmpq %rcx, %r13 jb 0x8b024 movq 0x80(%rbx), %rdi jmp 0x8b085 xorl %r14d, %r14d jmp 0x8b095 xorl %r14d, %r14d callq 0xa4926 movq $0x0, 0x80(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
mi_end_bulk_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rdi, [rdi+80h] test rdi, rdi jz short loc_8B07D mov rax, [rbx] cmp dword ptr [rax+180h], 0 jz short loc_8B082 xor r12d, r12d xor r13d, r13d xor r14d, r14d loc_8B024: mov rdi, [rbx+80h] cmp qword ptr [rdi+r12], 0 jz short loc_8B05F add rdi, r12 movsx r15d, sil mov esi, r15d call delete_tree test r14d, r14d mov ecx, r14d cmovz ecx, eax test eax, eax cmovnz r14d, ecx movzx esi, r15b mov eax, 1 cmovnz esi, eax mov rax, [rbx] loc_8B05F: inc r13 mov ecx, [rax+180h] add r12, 298h cmp r13, rcx jb short loc_8B024 mov rdi, [rbx+80h] jmp short loc_8B085 loc_8B07D: xor r14d, r14d jmp short loc_8B095 loc_8B082: xor r14d, r14d loc_8B085: call my_free mov qword ptr [rbx+80h], 0 loc_8B095: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_end_bulk_insert(_QWORD *a1, char a2) { long long v3; // rdi long long v4; // rax long long v5; // r12 unsigned long long v6; // r13 unsigned int v7; // r14d long long v8; // rdi int v9; // eax int v10; // ecx v3 = a1[16]; if ( v3 ) { v4 = *a1; if ( *(_DWORD *)(*a1 + 384LL) ) { v5 = 0LL; v6 = 0LL; v7 = 0; do { v8 = a1[16]; if ( *(_QWORD *)(v8 + v5) ) { v9 = delete_tree(v5 + v8, (unsigned int)a2); v10 = v7; if ( !v7 ) v10 = v9; if ( v9 ) { v7 = v10; a2 = 1; } v4 = *a1; } ++v6; v5 += 664LL; } while ( v6 < *(unsigned int *)(v4 + 384) ); v3 = a1[16]; } else { v7 = 0; } my_free(v3); a1[16] = 0LL; } else { return 0; } return v7; }
mi_end_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x80] TEST RDI,RDI JZ 0x0018b07d MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x180],0x0 JZ 0x0018b082 XOR R12D,R12D XOR R13D,R13D XOR R14D,R14D LAB_0018b024: MOV RDI,qword ptr [RBX + 0x80] CMP qword ptr [RDI + R12*0x1],0x0 JZ 0x0018b05f ADD RDI,R12 MOVSX R15D,SIL MOV ESI,R15D CALL 0x001a9046 TEST R14D,R14D MOV ECX,R14D CMOVZ ECX,EAX TEST EAX,EAX CMOVNZ R14D,ECX MOVZX ESI,R15B MOV EAX,0x1 CMOVNZ ESI,EAX MOV RAX,qword ptr [RBX] LAB_0018b05f: INC R13 MOV ECX,dword ptr [RAX + 0x180] ADD R12,0x298 CMP R13,RCX JC 0x0018b024 MOV RDI,qword ptr [RBX + 0x80] JMP 0x0018b085 LAB_0018b07d: XOR R14D,R14D JMP 0x0018b095 LAB_0018b082: XOR R14D,R14D LAB_0018b085: CALL 0x001a4926 MOV qword ptr [RBX + 0x80],0x0 LAB_0018b095: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mi_end_bulk_insert(long *param_1,char param_2) { int iVar1; long lVar2; int iVar3; long lVar4; ulong uVar5; int iVar6; lVar4 = param_1[0x10]; if (lVar4 == 0) { iVar6 = 0; } else { lVar2 = *param_1; if (*(int *)(lVar2 + 0x180) == 0) { iVar6 = 0; } else { lVar4 = 0; uVar5 = 0; iVar6 = 0; do { if (*(long *)(param_1[0x10] + lVar4) != 0) { iVar1 = delete_tree(param_1[0x10] + lVar4,(int)param_2); iVar3 = iVar6; if (iVar6 == 0) { iVar3 = iVar1; } if (iVar1 != 0) { iVar6 = iVar3; } if (iVar1 != 0) { param_2 = '\x01'; } lVar2 = *param_1; } uVar5 = uVar5 + 1; lVar4 = lVar4 + 0x298; } while (uVar5 < *(uint *)(lVar2 + 0x180)); lVar4 = param_1[0x10]; } my_free(lVar4); param_1[0x10] = 0; } return iVar6; }
37,107
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); std::vector<std::string> ret; for (size_t i = 0, n = match.size(); i < n; ++i) { ret.push_back(match[i].str()); } return ret; } it = start; return {}; }
O1
cpp
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0x65690 xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x23cb3 testb %al, %al je 0x644b5 movq (%rsp), %rcx movq 0x8(%rsp), %rdx movq %rdx, %rax subq %rcx, %rax leaq -0x48(%rdx), %rsi cmpq $0x48, %rax movq %rcx, %rdi cmoveq %rsi, %rdi movq %rdx, %rax subq %rcx, %rax cmoveq %rsi, %rdi movq (%rdi), %rdi cmpq 0x18(%rsp), %rdi je 0x644ef movq %r12, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq (%rsp), %rdi testq %rdi, %rdi je 0x644dd movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x196d0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x48, %rax movq %rcx, %rdi cmoveq %rsi, %rdi cmpq %rdx, %rcx cmoveq %rsi, %rdi movq 0x8(%rdi), %rsi subq (%rdi), %rsi xorl %r15d, %r15d cmpb $0x0, 0x10(%rdi) cmoveq %r15, %rsi addq %rsi, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB cmpq %rdx, %rcx je 0x64543 sarq $0x3, %rax imulq %rsi, %rax addq $-0x3, %rax movq %rax, %r15 testq %r15, %r15 je 0x644c7 leaq 0x38(%rsp), %r13 xorl %ebp, %ebp leaq 0x28(%rsp), %r14 xorl %r12d, %r12d movq (%rsp), %rax movq 0x8(%rsp), %rcx cmpq %rcx, %rax je 0x64587 movq %rcx, %rdx subq %rax, %rdx sarq $0x3, %rdx movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB imulq %rsi, %rdx addq $-0x3, %rdx jmp 0x64589 xorl %edx, %edx cmpq %r12, %rdx ja 0x64597 addq $-0x48, %rcx movq %rcx, %rax jmp 0x6459a addq %rbp, %rax cmpb $0x1, 0x10(%rax) jne 0x645b6 movq (%rax), %rsi movq 0x8(%rax), %rdx movq %r13, 0x28(%rsp) movq %r14, %rdi callq 0x484c0 jmp 0x645c9 movq %r13, 0x28(%rsp) movq $0x0, 0x30(%rsp) movb $0x0, 0x38(%rsp) movq %rbx, %rdi movq %r14, %rsi callq 0x489d0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x645eb movq 0x38(%rsp), %rsi incq %rsi callq 0x196d0 incq %r12 addq $0x18, %rbp cmpq %r12, %r15 jne 0x6455b jmp 0x644c7 movq %rax, %r14 jmp 0x6462c movq %rax, %r14 jmp 0x64624 movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x64624 movq 0x38(%rsp), %rsi incq %rsi callq 0x196d0 movq %rbx, %rdi callq 0x2ac94 movq (%rsp), %rdi testq %rdi, %rdi je 0x64642 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x196d0 movq %r14, %rdi callq 0x19c00
_ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov rcx, r15 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_644B5 mov rcx, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] mov rax, rdx sub rax, rcx lea rsi, [rdx-48h] cmp rax, 48h ; 'H' mov rdi, rcx cmovz rdi, rsi mov rax, rdx sub rax, rcx cmovz rdi, rsi mov rdi, [rdi] cmp rdi, [rsp+78h+var_60] jz short loc_644EF loc_644B5: mov [r14+20h], r12 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_644C7: mov rdi, [rsp+78h+var_78]; void * test rdi, rdi jz short loc_644DD mov rsi, [rsp+78h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_644DD: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_644EF: cmp rax, 48h ; 'H' mov rdi, rcx cmovz rdi, rsi cmp rcx, rdx cmovz rdi, rsi mov rsi, [rdi+8] sub rsi, [rdi] xor r15d, r15d cmp byte ptr [rdi+10h], 0 cmovz rsi, r15 add [r14+20h], rsi xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov rsi, 0AAAAAAAAAAAAAAABh cmp rcx, rdx jz short loc_64543 sar rax, 3 imul rax, rsi add rax, 0FFFFFFFFFFFFFFFDh mov r15, rax loc_64543: test r15, r15 jz loc_644C7 lea r13, [rsp+78h+var_40] xor ebp, ebp lea r14, [rsp+78h+var_50] xor r12d, r12d loc_6455B: mov rax, [rsp+78h+var_78] mov rcx, [rsp+78h+var_70] cmp rax, rcx jz short loc_64587 mov rdx, rcx sub rdx, rax sar rdx, 3 mov rsi, 0AAAAAAAAAAAAAAABh imul rdx, rsi add rdx, 0FFFFFFFFFFFFFFFDh jmp short loc_64589 loc_64587: xor edx, edx loc_64589: cmp rdx, r12 ja short loc_64597 add rcx, 0FFFFFFFFFFFFFFB8h mov rax, rcx jmp short loc_6459A loc_64597: add rax, rbp loc_6459A: cmp byte ptr [rax+10h], 1 jnz short loc_645B6 mov rsi, [rax] mov rdx, [rax+8] mov [rsp+78h+var_50], r13 mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) jmp short loc_645C9 loc_645B6: mov [rsp+78h+var_50], r13 mov [rsp+78h+var_48], 0 mov byte ptr [rsp+78h+var_40], 0 loc_645C9: mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_645EB mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_645EB: inc r12 add rbp, 18h cmp r15, r12 jnz loc_6455B jmp loc_644C7 mov r14, rax jmp short loc_6462C mov r14, rax jmp short loc_64624 mov r14, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_64624 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_64624: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_6462C: mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_64642 mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_64642: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 _QWORD *v9; // rdi long long v10; // rax long long v12; // rdi long long v13; // rsi unsigned long long v14; // r15 long long v15; // rbp unsigned long long i; // r12 unsigned long long v17; // rdx long long v18; // rax _BYTE *v19; // rsi long long v20; // rdx __int128 v21; // [rsp+0h] [rbp-78h] BYREF __int128 v22; // [rsp+10h] [rbp-68h] void *v23[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v24[8]; // [rsp+38h] [rbp-40h] BYREF v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v22 = 0LL; v21 = 0LL; if ( !(unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), (long long **)&v21, a3, 0) ) goto LABEL_7; v8 = v21; v9 = (_QWORD *)v21; if ( *((_QWORD *)&v21 + 1) - (_QWORD)v21 == 72LL ) v9 = (_QWORD *)(*((_QWORD *)&v21 + 1) - 72LL); v10 = *((_QWORD *)&v21 + 1) - v21; if ( *((_QWORD *)&v21 + 1) == (_QWORD)v21 ) v9 = (_QWORD *)(*((_QWORD *)&v21 + 1) - 72LL); if ( *v9 == *((_QWORD *)&v22 + 1) ) { v12 = v21; if ( v10 == 72 ) v12 = *((_QWORD *)&v21 + 1) - 72LL; if ( (_QWORD)v21 == *((_QWORD *)&v21 + 1) ) v12 = *((_QWORD *)&v21 + 1) - 72LL; v13 = *(_QWORD *)(v12 + 8) - *(_QWORD *)v12; v14 = 0LL; if ( !*(_BYTE *)(v12 + 16) ) v13 = 0LL; *(_QWORD *)(a2 + 32) += v13; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) ) v14 = 0xAAAAAAAAAAAAAAABLL * (v10 >> 3) - 3; if ( v14 ) { v15 = 0LL; for ( i = 0LL; i != v14; ++i ) { if ( (_QWORD)v21 == *((_QWORD *)&v21 + 1) ) v17 = 0LL; else v17 = 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v21 + 1) - v21) >> 3) - 3; if ( v17 > i ) v18 = v15 + v21; else v18 = *((_QWORD *)&v21 + 1) - 72LL; if ( *(_BYTE *)(v18 + 16) == 1 ) { v19 = *(_BYTE **)v18; v20 = *(_QWORD *)(v18 + 8); v23[0] = v24; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(v23, v19, v20); } else { v23[0] = v24; v23[1] = 0LL; LOBYTE(v24[0]) = 0; } std::vector<std::string>::emplace_back<std::string>(a1, (long long)v23); if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); v15 += 24LL; } } } else { LABEL_7: *(_QWORD *)(a2 + 32) = v7; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; } if ( (_QWORD)v21 ) operator delete((void *)v21, v22 - v21); return a1; }
consumeTokenGroups: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x00165690 XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_00164474: MOV RCX,R15 XOR R8D,R8D CALL 0x00123cb3 TEST AL,AL JZ 0x001644b5 MOV RCX,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] MOV RAX,RDX SUB RAX,RCX LEA RSI,[RDX + -0x48] CMP RAX,0x48 MOV RDI,RCX CMOVZ RDI,RSI MOV RAX,RDX SUB RAX,RCX CMOVZ RDI,RSI MOV RDI,qword ptr [RDI] CMP RDI,qword ptr [RSP + 0x18] JZ 0x001644ef LAB_001644b5: MOV qword ptr [R14 + 0x20],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_001644c7: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x001644dd MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x001196d0 LAB_001644dd: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001644ef: CMP RAX,0x48 MOV RDI,RCX CMOVZ RDI,RSI CMP RCX,RDX CMOVZ RDI,RSI MOV RSI,qword ptr [RDI + 0x8] SUB RSI,qword ptr [RDI] XOR R15D,R15D CMP byte ptr [RDI + 0x10],0x0 CMOVZ RSI,R15 ADD qword ptr [R14 + 0x20],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV RSI,-0x5555555555555555 CMP RCX,RDX JZ 0x00164543 SAR RAX,0x3 IMUL RAX,RSI ADD RAX,-0x3 MOV R15,RAX LAB_00164543: TEST R15,R15 JZ 0x001644c7 LEA R13,[RSP + 0x38] XOR EBP,EBP LEA R14,[RSP + 0x28] XOR R12D,R12D LAB_0016455b: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] CMP RAX,RCX JZ 0x00164587 MOV RDX,RCX SUB RDX,RAX SAR RDX,0x3 MOV RSI,-0x5555555555555555 IMUL RDX,RSI ADD RDX,-0x3 JMP 0x00164589 LAB_00164587: XOR EDX,EDX LAB_00164589: CMP RDX,R12 JA 0x00164597 ADD RCX,-0x48 MOV RAX,RCX JMP 0x0016459a LAB_00164597: ADD RAX,RBP LAB_0016459a: CMP byte ptr [RAX + 0x10],0x1 JNZ 0x001645b6 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],R13 LAB_001645ac: MOV RDI,R14 CALL 0x001484c0 JMP 0x001645c9 LAB_001645b6: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP + 0x30],0x0 MOV byte ptr [RSP + 0x38],0x0 LAB_001645c9: MOV RDI,RBX MOV RSI,R14 CALL 0x001489d0 LAB_001645d4: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001645eb MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001196d0 LAB_001645eb: INC R12 ADD RBP,0x18 CMP R15,R12 JNZ 0x0016455b JMP 0x001644c7
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * minja::Parser::consumeTokenGroups (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long lVar3; ulong uVar4; long *plVar5; ulong uVar6; long *plVar7; ulong uVar8; long *local_78; long *plStack_70; long local_68; long lStack_60; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_68 = 0; lStack_60 = 0; local_78 = (long *)0x0; plStack_70 = (long *)0x0; /* try { // try from 00164474 to 0016447e has its CatchHandler @ 00164600 */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78, param_3,0); if (bVar2) { plVar5 = plStack_70 + -9; plVar7 = local_78; if ((long)plStack_70 - (long)local_78 == 0x48) { plVar7 = plVar5; } lVar3 = (long)plStack_70 - (long)local_78; if (lVar3 == 0) { plVar7 = plVar5; } if (*plVar7 == lStack_60) { plVar7 = local_78; if (lVar3 == 0x48) { plVar7 = plVar5; } if (local_78 == plStack_70) { plVar7 = plVar5; } uVar4 = 0; uVar8 = plVar7[1] - *plVar7; if ((char)plVar7[2] == '\0') { uVar8 = uVar4; } *(ulong *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + uVar8; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; if (local_78 != plStack_70) { uVar4 = (lVar3 >> 3) * -0x5555555555555555 - 3; } if (uVar4 != 0) { lVar3 = 0; uVar8 = 0; do { if (local_78 == plStack_70) { uVar6 = 0; } else { uVar6 = ((long)plStack_70 - (long)local_78 >> 3) * -0x5555555555555555 - 3; } if (uVar8 < uVar6) { plVar5 = (long *)((long)local_78 + lVar3); } else { plVar5 = plStack_70 + -9; } local_50 = &local_40; if ((char)plVar5[2] == '\x01') { /* try { // try from 001645ac to 001645b3 has its CatchHandler @ 00164605 */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> ((string *)&local_50,*plVar5,plVar5[1]); } else { local_48 = 0; local_40 = 0; } /* try { // try from 001645c9 to 001645d3 has its CatchHandler @ 0016460a */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(param_1,(string *)&local_50); if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } uVar8 = uVar8 + 1; lVar3 = lVar3 + 0x18; } while (uVar4 != uVar8); } goto LAB_001644c7; } } *(int8 *)(param_2 + 0x20) = uVar1; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; LAB_001644c7: if (local_78 != (long *)0x0) { operator_delete(local_78,local_68 - (long)local_78); } return param_1; }
37,108
int fmt::v11::detail::count_digits<1, unsigned __int128>(unsigned __int128)
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ if (!is_constant_evaluated() && num_bits<UInt>() == 32) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC. return [](UInt m) { int num_digits = 0; do { ++num_digits; } while ((m >>= BITS) != 0); return num_digits; }(n); }
O0
c
int fmt::v11::detail::count_digits<1, unsigned __int128>(unsigned __int128): subq $0x48, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x38(%rsp) movq 0x30(%rsp), %rax movq 0x38(%rsp), %rcx movq %rcx, 0x28(%rsp) movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq %rcx, 0x8(%rsp) movq %rax, (%rsp) movq (%rsp), %rsi movq 0x8(%rsp), %rdx leaq 0x1f(%rsp), %rdi callq 0xc7b40 addq $0x48, %rsp retq nopl (%rax)
_ZN3fmt3v116detail12count_digitsILi3EoEEiT0_: sub rsp, 48h mov [rsp+48h+var_18], rdi mov [rsp+48h+var_10], rsi mov rax, [rsp+48h+var_18] mov rcx, [rsp+48h+var_10] mov [rsp+48h+var_20], rcx mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_20] mov [rsp+48h+var_40], rcx mov [rsp+48h+var_48], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] lea rdi, [rsp+48h+var_29] call _ZZN3fmt3v116detail12count_digitsILi3EoEEiT0_ENKUloE_clEo; fmt::v11::detail::count_digits<3,unsigned __int128>(unsigned __int128)::{lambda(unsigned __int128)#1}::operator()(unsigned __int128) add rsp, 48h retn
long long fmt::v11::detail::count_digits<3,unsigned __int128>(long long a1, long long a2) { char v3; // [rsp+1Fh] [rbp-29h] BYREF long long v4; // [rsp+20h] [rbp-28h] long long v5; // [rsp+28h] [rbp-20h] long long v6; // [rsp+30h] [rbp-18h] long long v7; // [rsp+38h] [rbp-10h] v6 = a1; v7 = a2; v5 = a2; v4 = a1; return fmt::v11::detail::count_digits<3,unsigned __int128>(unsigned __int128)::{lambda(unsigned __int128)#1}::operator()( &v3, a1, a2); }
count_digits<3,unsigned__int128>: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x1f] CALL 0x001c7b40 ADD RSP,0x48 RET
/* int fmt::v11::detail::count_digits<3, unsigned __int128>(unsigned __int128) */ int __thiscall fmt::v11::detail::count_digits<3,unsigned__int128>(detail *this,uint param_1) { int iVar1; int4 in_register_00000034; _lambda_unsigned__int128__1_ local_29; detail *local_28; int8 local_20; detail *local_18; int8 local_10; local_20 = CONCAT44(in_register_00000034,param_1); local_28 = this; local_18 = this; local_10 = local_20; iVar1 = count_digits<3,unsigned__int128>(unsigned__int128)::{lambda(unsigned__int128)#1}:: operator()(&local_29,(uint)this); return iVar1; }
37,109
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>::string_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O0
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>::string_t&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi callq 0xb7250 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x116cd7 jmp 0x116d89 movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0x5d680 movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi callq 0xb7610 movq %rax, 0x20(%rsp) leaq 0x1027c3(%rip), %rsi # 0x2194c4 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x115120 jmp 0x116d12 movq 0x8(%rsp), %rdi movq 0x50(%rsp), %rcx movl $0x12e, %esi # imm = 0x12E leaq 0x28(%rsp), %rdx callq 0x114f70 jmp 0x116d2d movq 0x8(%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0x19503a(%rip), %rsi # 0x2abd78 leaq -0x5f685(%rip), %rdx # 0xb76c0 callq 0x5db00 jmp 0x116daf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x116d74 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0x5e548 testb $0x1, 0x13(%rsp) jne 0x116d7d jmp 0x116d87 movq 0x8(%rsp), %rdi callq 0x5df80 jmp 0x116da5 movq 0x50(%rsp), %rdi callq 0x116db0 movq %rax, %rsi movq 0x48(%rsp), %rdi callq 0x5e400 addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0x5dbc0 nop
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: sub rsp, 58h mov qword ptr [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_stringEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_string(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_116CD7 jmp loc_116D89 loc_116CD7: mov [rsp+58h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+58h+var_50], rax; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+58h+var_30] lea rdx, [rsp+58h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) jmp short $+2 loc_116D12: mov rdi, [rsp+58h+var_50]; int mov rcx, qword ptr [rsp+58h+var_8] mov esi, 12Eh lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_116D2D: mov rdi, [rsp+58h+var_50]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_116DAF mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax jmp short loc_116D74 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_116D74: test [rsp+arg_B], 1 jnz short loc_116D7D jmp short loc_116D87 loc_116D7D: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_116D87: jmp short loc_116DA5 loc_116D89: mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov rsi, rax mov rdi, qword ptr [rsp+58h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) add rsp, 58h retn loc_116DA5: mov rdi, [rsp+arg_10] call __Unwind_Resume loc_116DAF: nop
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( _BYTE *a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+8h] [rbp-50h] int v5[2]; // [rsp+20h] [rbp-38h] BYREF _BYTE v6[32]; // [rsp+28h] [rbp-30h] BYREF int v7[2]; // [rsp+48h] [rbp-10h] char v8[8]; // [rsp+50h] [rbp-8h] *(_QWORD *)v8 = a1; *(_QWORD *)v7 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_string(a1) ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); *(_QWORD *)v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v8); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"type must be string, but is ", (nlohmann::json_abi_v3_11_3::detail **)v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v6, *(long long *)v8); __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::type_error::~type_error); } v2 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v8); return std::string::operator=(*(_QWORD *)v7, v2); }
37,110
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>::string_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x878ec movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x1b4a0 movl $0x20, %edi callq 0x1b440 movq %rax, %rbx movq %r14, %rdi callq 0x5e434 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x6c1ed(%rip), %rsi # 0xf3afd leaq 0x10(%rsp), %rdi callq 0x86ae1 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x86912 xorl %ebp, %ebp leaq 0xa65bd(%rip), %rsi # 0x12def8 leaq -0x2d3cc(%rip), %rdx # 0x5a576 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x87970 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x87970 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x8797d movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70 nop
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_878EC mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_878EC: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_87970 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_87970 mov r14, rax mov bpl, 1 loc_87970: test bpl, bpl jz short loc_8797D mov rdi, rbx; void * call ___cxa_free_exception loc_8797D: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
37,111
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>::string_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x64051 movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x244c0 pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x51a6a(%rip), %rsi # 0xb5add leaq 0x10(%rsp), %rdi callq 0x6355f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63472 xorl %ebp, %ebp leaq 0x99e9a(%rip), %rsi # 0xfdf38 leaq -0x24025(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x640c4 jmp 0x640cc movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_64051 mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_64051: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_640C4 jmp short loc_640CC mov r14, rax loc_640C4: mov rdi, rbx; void * call ___cxa_free_exception loc_640CC: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
from_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>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x00164051 MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001244c0 LAB_00164051: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x001434f0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016406c: LEA RSI,[0x1b5add] LEA RDI,[RSP + 0x10] CALL 0x0016355f MOV BPL,0x1 LAB_00164080: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163472 XOR EBP,EBP LEA RSI,[0x1fdf38] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::string_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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 *param_1,string_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == '\x03') { std::__cxx11::string::_M_assign((string *)param_2); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)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((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); /* try { // try from 0016406c to 0016407c has its CatchHandler @ 001640c1 */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be string, but is ",&local_40); /* try { // try from 00164080 to 001640ac has its CatchHandler @ 001640ad */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
37,112
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void LoopLimits<REAL>::ComputeInteriorPointWeights(int valence, int faceInRing, REAL* pWeights, REAL* epWeights, REAL* emWeights) { int ringSize = valence + 1; LimitVertex vertex(valence, valence); bool computeTangentPoints = epWeights && emWeights; if (!computeTangentPoints) { // // The interior position mask is symmetric -- no need to rotate // or otherwise account for orientation: // LimitMask pMask(pWeights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, Sdc::Crease::RULE_SMOOTH); } else { // // The interior tangent masks will be directed along the first // two edges (the second a rotation of the first). Adjust the // tangent weights for a point along the tangent, then rotate // according to the face within the ring: // int weightWidth = valence + 1; StackBuffer<REAL, 32, true> tWeights(2 * weightWidth); REAL * t1Weights = &tWeights[0]; REAL * t2Weights = t1Weights + ringSize; LimitMask pMask(pWeights); LimitMask t1Mask(t1Weights); LimitMask t2Mask(t2Weights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, t1Mask, t2Mask, Sdc::Crease::RULE_SMOOTH); // // Use the subdominant eigenvalue to scale the limit tangent t1: // // e = (3 + cos(2*PI/valence)) / 8 // // Combine it with a normalizing factor of (2 / valence) to account // for the scale inherent in the tangent weights, and (2 / 3) to // match desired placement of the cubic point in the regular case. // // The weights for t1 can simply be rotated around the ring to yield // t2. Combine the weights for the point in a single set for t2 and // then copy it into the appropriate orientation for ep and em: // double theta = 2.0 * std::numbers::pi / (double) valence; REAL tanScale = (REAL) ((3.0 + 2.0 * std::cos(theta)) / (6.0 * valence)); for (int i = 0; i < ringSize; ++i) { t2Weights[i] = pWeights[i] + t1Weights[i] * tanScale; } int n1 = faceInRing; int n2 = valence - n1; epWeights[0] = t2Weights[0]; std::memcpy(epWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(epWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); n1 = (faceInRing + 1) % valence; n2 = valence - n1; emWeights[0] = t2Weights[0]; std::memcpy(emWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(emWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); } }
O0
cpp
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*): pushq %rbp movq %rsp, %rbp subq $0x1e0, %rsp # imm = 0x1E0 movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) movq %rdx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq %r8, -0x20(%rbp) movl -0x4(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) movl -0x4(%rbp), %esi movl -0x4(%rbp), %edx leaq -0x2c(%rbp), %rdi callq 0xcf570 xorl %eax, %eax cmpq $0x0, -0x18(%rbp) movb %al, -0x1d5(%rbp) je 0x123e02 cmpq $0x0, -0x20(%rbp) setne %al movb %al, -0x1d5(%rbp) movb -0x1d5(%rbp), %al andb $0x1, %al movb %al, -0x2d(%rbp) testb $0x1, -0x2d(%rbp) jne 0x123e6b movq -0x10(%rbp), %rsi leaq -0x40(%rbp), %rdi callq 0xc3eb0 leaq -0x44(%rbp), %rdi callq 0xd4110 jmp 0x123e2b leaq -0x44(%rbp), %rdi leaq -0x2c(%rbp), %rsi leaq -0x40(%rbp), %rdx movl $0x1, %ecx callq 0xd7100 jmp 0x123e43 leaq -0x40(%rbp), %rdi callq 0xd76c0 jmp 0x1241b7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x40(%rbp), %rdi callq 0xd76c0 jmp 0x1241c0 movl -0x4(%rbp), %eax incl %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %esi addl %esi, %esi leaq -0x170(%rbp), %rdi movq %rdi, -0x1e0(%rbp) callq 0xd6060 movq -0x1e0(%rbp), %rdi callq 0xce230 movq %rax, -0x178(%rbp) movq -0x178(%rbp), %rax movslq -0x24(%rbp), %rcx leaq (%rax,%rcx,8), %rax movq %rax, -0x180(%rbp) movq -0x10(%rbp), %rsi leaq -0x190(%rbp), %rdi callq 0xc3eb0 jmp 0x123ec6 movq -0x178(%rbp), %rsi leaq -0x1a0(%rbp), %rdi callq 0xc3eb0 jmp 0x123edb movq -0x180(%rbp), %rsi leaq -0x1b0(%rbp), %rdi callq 0xc3eb0 jmp 0x123ef0 leaq -0x1b4(%rbp), %rdi callq 0xd4110 jmp 0x123efe leaq -0x1b4(%rbp), %rdi leaq -0x2c(%rbp), %rsi leaq -0x190(%rbp), %rdx leaq -0x1a0(%rbp), %rcx leaq -0x1b0(%rbp), %r8 movl $0x1, %r9d callq 0xc89b0 jmp 0x123f2b cvtsi2sdl -0x4(%rbp), %xmm1 movsd 0xc8678(%rip), %xmm0 # 0x1ec5b0 divsd %xmm1, %xmm0 movsd %xmm0, -0x1c0(%rbp) movsd -0x1c0(%rbp), %xmm0 callq 0xd67d0 addsd %xmm0, %xmm0 movsd 0xc868b(%rip), %xmm1 # 0x1ec5e8 addsd %xmm1, %xmm0 cvtsi2sdl -0x4(%rbp), %xmm2 movsd 0xc86f2(%rip), %xmm1 # 0x1ec660 mulsd %xmm2, %xmm1 divsd %xmm1, %xmm0 movsd %xmm0, -0x1c8(%rbp) movl $0x0, -0x1cc(%rbp) movl -0x1cc(%rbp), %eax cmpl -0x24(%rbp), %eax jge 0x12403e movq -0x10(%rbp), %rax movslq -0x1cc(%rbp), %rcx movsd (%rax,%rcx,8), %xmm1 movq -0x178(%rbp), %rax movslq -0x1cc(%rbp), %rcx movsd (%rax,%rcx,8), %xmm0 movsd -0x1c8(%rbp), %xmm2 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movq -0x180(%rbp), %rax movslq -0x1cc(%rbp), %rcx movsd %xmm0, (%rax,%rcx,8) movl -0x1cc(%rbp), %eax addl $0x1, %eax movl %eax, -0x1cc(%rbp) jmp 0x123f88 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x1241a9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x12419d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x124191 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x1b0(%rbp), %rdi callq 0xd76c0 jmp 0x124191 movl -0x8(%rbp), %eax movl %eax, -0x1d0(%rbp) movl -0x4(%rbp), %eax subl -0x1d0(%rbp), %eax movl %eax, -0x1d4(%rbp) movq -0x180(%rbp), %rax movsd (%rax), %xmm0 movq -0x18(%rbp), %rax movsd %xmm0, (%rax) movq -0x18(%rbp), %rdi addq $0x8, %rdi movq -0x180(%rbp), %rsi addq $0x8, %rsi movslq -0x1d4(%rbp), %rax shlq $0x3, %rax addq %rax, %rsi movslq -0x1d0(%rbp), %rdx shlq $0x3, %rdx callq 0xcb1d0 movq -0x18(%rbp), %rdi addq $0x8, %rdi movslq -0x1d0(%rbp), %rax shlq $0x3, %rax addq %rax, %rdi movq -0x180(%rbp), %rsi addq $0x8, %rsi movslq -0x1d4(%rbp), %rdx shlq $0x3, %rdx callq 0xcb1d0 movl -0x8(%rbp), %eax addl $0x1, %eax cltd idivl -0x4(%rbp) movl %edx, -0x1d0(%rbp) movl -0x4(%rbp), %eax subl -0x1d0(%rbp), %eax movl %eax, -0x1d4(%rbp) movq -0x180(%rbp), %rax movsd (%rax), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, (%rax) movq -0x20(%rbp), %rdi addq $0x8, %rdi movq -0x180(%rbp), %rsi addq $0x8, %rsi movslq -0x1d4(%rbp), %rax shlq $0x3, %rax addq %rax, %rsi movslq -0x1d0(%rbp), %rdx shlq $0x3, %rdx callq 0xcb1d0 movq -0x20(%rbp), %rdi addq $0x8, %rdi movslq -0x1d0(%rbp), %rax shlq $0x3, %rax addq %rax, %rdi movq -0x180(%rbp), %rsi addq $0x8, %rsi movslq -0x1d4(%rbp), %rdx shlq $0x3, %rdx callq 0xcb1d0 leaq -0x1b0(%rbp), %rdi callq 0xd76c0 leaq -0x1a0(%rbp), %rdi callq 0xd76c0 leaq -0x190(%rbp), %rdi callq 0xd76c0 leaq -0x170(%rbp), %rdi callq 0xc7730 jmp 0x1241b7 leaq -0x1a0(%rbp), %rdi callq 0xd76c0 leaq -0x190(%rbp), %rdi callq 0xd76c0 leaq -0x170(%rbp), %rdi callq 0xc7730 jmp 0x1241c0 addq $0x1e0, %rsp # imm = 0x1E0 popq %rbp retq movq -0x50(%rbp), %rdi callq 0xd58b0 nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE27ComputeInteriorPointWeightsEiiPdS4_S4_: push rbp mov rbp, rsp sub rsp, 1E0h mov [rbp+var_4], edi mov [rbp+var_8], esi mov [rbp+var_10], rdx mov [rbp+var_18], rcx mov [rbp+var_20], r8 mov eax, [rbp+var_4] add eax, 1 mov [rbp+var_24], eax mov esi, [rbp+var_4] mov edx, [rbp+var_4] lea rdi, [rbp+var_2C] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE11LimitVertexC2Eii; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex::LimitVertex(int,int) xor eax, eax cmp [rbp+var_18], 0 mov [rbp+var_1D5], al jz short loc_123E02 cmp [rbp+var_20], 0 setnz al mov [rbp+var_1D5], al loc_123E02: mov al, [rbp+var_1D5] and al, 1 mov [rbp+var_2D], al test [rbp+var_2D], 1 jnz short loc_123E6B mov rsi, [rbp+var_10] lea rdi, [rbp+var_40] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskC2EPd; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(double *) lea rdi, [rbp+var_44] call __ZN10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EEC2Ev; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::Scheme(void) jmp short $+2 loc_123E2B: lea rdi, [rbp+var_44] lea rsi, [rbp+var_2C] lea rdx, [rbp+var_40] mov ecx, 1 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) jmp short $+2 loc_123E43: lea rdi, [rbp+var_40] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() jmp loc_1241B7 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_40] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() jmp loc_1241C0 loc_123E6B: mov eax, [rbp+var_4] inc eax mov [rbp+var_58], eax mov esi, [rbp+var_58] add esi, esi lea rdi, [rbp+var_170] mov [rbp+var_1E0], rdi call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj32ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::StackBuffer(uint) mov rdi, [rbp+var_1E0] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj32ELb1EEcvPdEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::operator double *(void) mov [rbp+var_178], rax mov rax, [rbp+var_178] movsxd rcx, [rbp+var_24] lea rax, [rax+rcx*8] mov [rbp+var_180], rax mov rsi, [rbp+var_10] lea rdi, [rbp+var_190] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskC2EPd; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(double *) jmp short $+2 loc_123EC6: mov rsi, [rbp+var_178] lea rdi, [rbp+var_1A0] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskC2EPd; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(double *) jmp short $+2 loc_123EDB: mov rsi, [rbp+var_180] lea rdi, [rbp+var_1B0] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskC2EPd; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(double *) jmp short $+2 loc_123EF0: lea rdi, [rbp+var_1B4] call __ZN10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EEC2Ev; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::Scheme(void) jmp short $+2 loc_123EFE: lea rdi, [rbp+var_1B4] lea rsi, [rbp+var_2C] lea rdx, [rbp+var_190] lea rcx, [rbp+var_1A0] lea r8, [rbp+var_1B0] mov r9d, 1 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_SF_SF_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) jmp short $+2 loc_123F2B: cvtsi2sd xmm1, [rbp+var_4] movsd xmm0, cs:qword_1EC5B0 divsd xmm0, xmm1 movsd [rbp+var_1C0], xmm0 movsd xmm0, [rbp+var_1C0] call _cos addsd xmm0, xmm0 movsd xmm1, cs:qword_1EC5E8 addsd xmm0, xmm1 cvtsi2sd xmm2, [rbp+var_4] movsd xmm1, cs:qword_1EC660 mulsd xmm1, xmm2 divsd xmm0, xmm1 movsd [rbp+var_1C8], xmm0 mov [rbp+var_1CC], 0 loc_123F88: mov eax, [rbp+var_1CC] cmp eax, [rbp+var_24] jge loc_12403E mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1CC] movsd xmm1, qword ptr [rax+rcx*8] mov rax, [rbp+var_178] movsxd rcx, [rbp+var_1CC] movsd xmm0, qword ptr [rax+rcx*8] movsd xmm2, [rbp+var_1C8] mulsd xmm0, xmm2 addsd xmm0, xmm1 mov rax, [rbp+var_180] movsxd rcx, [rbp+var_1CC] movsd qword ptr [rax+rcx*8], xmm0 mov eax, [rbp+var_1CC] add eax, 1 mov [rbp+var_1CC], eax jmp short loc_123F88 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp loc_1241A9 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp loc_12419D mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp loc_124191 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_1B0] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() jmp loc_124191 loc_12403E: mov eax, [rbp+var_8] mov [rbp+var_1D0], eax mov eax, [rbp+var_4] sub eax, [rbp+var_1D0] mov [rbp+var_1D4], eax mov rax, [rbp+var_180] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_18] movsd qword ptr [rax], xmm0 mov rdi, [rbp+var_18] add rdi, 8 mov rsi, [rbp+var_180] add rsi, 8 movsxd rax, [rbp+var_1D4] shl rax, 3 add rsi, rax movsxd rdx, [rbp+var_1D0] shl rdx, 3 call _memcpy mov rdi, [rbp+var_18] add rdi, 8 movsxd rax, [rbp+var_1D0] shl rax, 3 add rdi, rax mov rsi, [rbp+var_180] add rsi, 8 movsxd rdx, [rbp+var_1D4] shl rdx, 3 call _memcpy mov eax, [rbp+var_8] add eax, 1 cdq idiv [rbp+var_4] mov [rbp+var_1D0], edx mov eax, [rbp+var_4] sub eax, [rbp+var_1D0] mov [rbp+var_1D4], eax mov rax, [rbp+var_180] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_20] movsd qword ptr [rax], xmm0 mov rdi, [rbp+var_20] add rdi, 8 mov rsi, [rbp+var_180] add rsi, 8 movsxd rax, [rbp+var_1D4] shl rax, 3 add rsi, rax movsxd rdx, [rbp+var_1D0] shl rdx, 3 call _memcpy mov rdi, [rbp+var_20] add rdi, 8 movsxd rax, [rbp+var_1D0] shl rax, 3 add rdi, rax mov rsi, [rbp+var_180] add rsi, 8 movsxd rdx, [rbp+var_1D4] shl rdx, 3 call _memcpy lea rdi, [rbp+var_1B0] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() lea rdi, [rbp+var_1A0] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() lea rdi, [rbp+var_190] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() lea rdi, [rbp+var_170] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj32ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::~StackBuffer() jmp short loc_1241B7 loc_124191: lea rdi, [rbp+var_1A0] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() loc_12419D: lea rdi, [rbp+var_190] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMaskD2Ev; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask() loc_1241A9: lea rdi, [rbp+var_170] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj32ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::~StackBuffer() jmp short loc_1241C0 loc_1241B7: add rsp, 1E0h pop rbp retn loc_1241C0: mov rdi, [rbp+var_50] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights( unsigned int a1, int a2, long long a3, _QWORD *a4, _QWORD *a5) { double v6; // xmm0_8 bool v7; // [rsp+Bh] [rbp-1D5h] int v8; // [rsp+Ch] [rbp-1D4h] int v9; // [rsp+Ch] [rbp-1D4h] int v10; // [rsp+10h] [rbp-1D0h] int v11; // [rsp+10h] [rbp-1D0h] signed int i; // [rsp+14h] [rbp-1CCh] double v13; // [rsp+18h] [rbp-1C8h] _BYTE v14[4]; // [rsp+2Ch] [rbp-1B4h] BYREF _BYTE v15[16]; // [rsp+30h] [rbp-1B0h] BYREF _BYTE v16[16]; // [rsp+40h] [rbp-1A0h] BYREF _BYTE v17[16]; // [rsp+50h] [rbp-190h] BYREF _QWORD *v18; // [rsp+60h] [rbp-180h] long long v19; // [rsp+68h] [rbp-178h] _BYTE v20[280]; // [rsp+70h] [rbp-170h] BYREF int v21; // [rsp+188h] [rbp-58h] _BYTE v22[4]; // [rsp+19Ch] [rbp-44h] BYREF _BYTE v23[20]; // [rsp+1A0h] [rbp-40h] BYREF char v24[8]; // [rsp+1B4h] [rbp-2Ch] BYREF signed int v25; // [rsp+1BCh] [rbp-24h] _QWORD *v26; // [rsp+1C0h] [rbp-20h] _QWORD *v27; // [rsp+1C8h] [rbp-18h] long long v28; // [rsp+1D0h] [rbp-10h] int v29; // [rsp+1D8h] [rbp-8h] int v30; // [rsp+1DCh] [rbp-4h] v30 = a1; v29 = a2; v28 = a3; v27 = a4; v26 = a5; v25 = a1 + 1; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex::LimitVertex(v24, a1, a1); v7 = 0; if ( v27 ) v7 = v26 != 0LL; v23[19] = v7; if ( v7 ) { v21 = v30 + 1; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::StackBuffer(v20, (unsigned int)(2 * (v30 + 1))); v19 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::operator double *(v20); v18 = (_QWORD *)(v19 + 8LL * v25); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(v17, v28); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(v16, v19); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(v15, v18); OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::Scheme(v14); OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( v14, v24, v17, v16, v15, 1LL); v6 = cos(6.283185307179586 / (double)v30); v13 = (v6 + v6 + 3.0) / (6.0 * (double)v30); for ( i = 0; i < v25; ++i ) *(double *)&v18[i] = *(double *)(v19 + 8LL * i) * v13 + *(double *)(v28 + 8LL * i); v10 = v29; v8 = v30 - v29; *v27 = *v18; memcpy(v27 + 1, &v18[v8 + 1], 8LL * v10); memcpy(&v27[v10 + 1], v18 + 1, 8LL * v8); v11 = (v29 + 1) % v30; v9 = v30 - v11; *v26 = *v18; memcpy(v26 + 1, &v18[v9 + 1], 8LL * v11); memcpy(&v26[v11 + 1], v18 + 1, 8LL * v9); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask(v15); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask(v16); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask(v17); return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,32u,true>::~StackBuffer(v20); } else { OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::LimitMask(v23, v28); OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::Scheme(v22); OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( v22, v24, v23, 1LL); return OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::~LimitMask(v23); } }
37,113
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void LoopLimits<REAL>::ComputeInteriorPointWeights(int valence, int faceInRing, REAL* pWeights, REAL* epWeights, REAL* emWeights) { int ringSize = valence + 1; LimitVertex vertex(valence, valence); bool computeTangentPoints = epWeights && emWeights; if (!computeTangentPoints) { // // The interior position mask is symmetric -- no need to rotate // or otherwise account for orientation: // LimitMask pMask(pWeights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, Sdc::Crease::RULE_SMOOTH); } else { // // The interior tangent masks will be directed along the first // two edges (the second a rotation of the first). Adjust the // tangent weights for a point along the tangent, then rotate // according to the face within the ring: // int weightWidth = valence + 1; StackBuffer<REAL, 32, true> tWeights(2 * weightWidth); REAL * t1Weights = &tWeights[0]; REAL * t2Weights = t1Weights + ringSize; LimitMask pMask(pWeights); LimitMask t1Mask(t1Weights); LimitMask t2Mask(t2Weights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, t1Mask, t2Mask, Sdc::Crease::RULE_SMOOTH); // // Use the subdominant eigenvalue to scale the limit tangent t1: // // e = (3 + cos(2*PI/valence)) / 8 // // Combine it with a normalizing factor of (2 / valence) to account // for the scale inherent in the tangent weights, and (2 / 3) to // match desired placement of the cubic point in the regular case. // // The weights for t1 can simply be rotated around the ring to yield // t2. Combine the weights for the point in a single set for t2 and // then copy it into the appropriate orientation for ep and em: // double theta = 2.0 * std::numbers::pi / (double) valence; REAL tanScale = (REAL) ((3.0 + 2.0 * std::cos(theta)) / (6.0 * valence)); for (int i = 0; i < ringSize; ++i) { t2Weights[i] = pWeights[i] + t1Weights[i] * tanScale; } int n1 = faceInRing; int n2 = valence - n1; epWeights[0] = t2Weights[0]; std::memcpy(epWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(epWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); n1 = (faceInRing + 1) % valence; n2 = valence - n1; emWeights[0] = t2Weights[0]; std::memcpy(emWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(emWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); } }
O1
cpp
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x178, %rsp # imm = 0x178 movq %rcx, %r15 movq %rdx, %r12 movl %edi, 0x10(%rsp) movl %edi, 0x14(%rsp) testq %rcx, %rcx setne %al testq %r8, %r8 setne %cl testb %cl, %al je 0x59e0f movl %esi, %ebp movl %edi, %r14d movq %r8, 0x20(%rsp) leal 0x1(%r14), %ecx leal 0x2(,%r14,2), %ebx leaq 0x70(%rsp), %rax movq %rax, -0x10(%rax) movl %ebx, -0x8(%rax) movl $0x20, -0x4(%rax) movq $0x0, 0x100(%rax) cmpl $0x21, %ebx jb 0x59cb0 movl %ebx, %edi shlq $0x3, %rdi movl %ecx, %r13d callq 0x3a230 movl %r13d, %ecx movq %rax, 0x170(%rsp) movq %rax, 0x60(%rsp) movl %ebx, 0x6c(%rsp) movq 0x60(%rsp), %r13 movl %ecx, 0xc(%rsp) movslq %ecx, %rax leaq (,%rax,8), %rbx addq %r13, %rbx leaq 0x30(%rsp), %rdx movq %r12, (%rdx) xorl %eax, %eax movl %eax, 0x8(%rdx) leaq 0x50(%rsp), %rcx movq %r13, (%rcx) movl %eax, 0x8(%rcx) leaq 0x40(%rsp), %r8 movq %rbx, (%r8) movl %eax, 0x8(%r8) leaq 0x2c(%rsp), %rdi movl $0x500, (%rdi) # imm = 0x500 leaq 0x10(%rsp), %rsi movl $0x1, %r9d callq 0x39380 cvtsi2sd %r14d, %xmm1 movsd 0x5a7e5(%rip), %xmm0 # 0xb44f8 movsd %xmm1, 0x18(%rsp) divsd %xmm1, %xmm0 callq 0x3c020 testl %r14d, %r14d js 0x59d69 addsd %xmm0, %xmm0 addsd 0x5a7f5(%rip), %xmm0 # 0xb4528 movsd 0x18(%rsp), %xmm1 mulsd 0x5a827(%rip), %xmm1 # 0xb4568 divsd %xmm1, %xmm0 movl 0xc(%rsp), %eax xorl %ecx, %ecx movsd (%r13,%rcx,8), %xmm1 mulsd %xmm0, %xmm1 addsd (%r12,%rcx,8), %xmm1 movsd %xmm1, (%rbx,%rcx,8) incq %rcx cmpq %rcx, %rax jne 0x59d4b movl %r14d, %eax subl %ebp, %eax movsd (%rbx), %xmm0 movsd %xmm0, (%r15) leaq 0x8(%r15), %rdi leaq 0x8(%rbx), %r12 movslq %eax, %r13 leaq (%rbx,%r13,8), %rsi addq $0x8, %rsi movslq %ebp, %rbp leaq (,%rbp,8), %rdx callq 0x39ad0 leaq (%r15,%rbp,8), %rdi addq $0x8, %rdi shlq $0x3, %r13 movq %r12, %rsi movq %r13, %rdx callq 0x39ad0 incl %ebp movl %ebp, %eax cltd idivl %r14d subl %edx, %r14d movsd (%rbx), %xmm0 movq 0x20(%rsp), %r15 movsd %xmm0, (%r15) leaq 0x8(%r15), %rdi movslq %r14d, %r14 leaq (%rbx,%r14,8), %rsi addq $0x8, %rsi movslq %edx, %rbx leaq (,%rbx,8), %rdx callq 0x39ad0 leaq (%r15,%rbx,8), %rdi addq $0x8, %rdi shlq $0x3, %r14 movq %r12, %rsi movq %r14, %rdx callq 0x39ad0 movq 0x170(%rsp), %rdi callq 0x3a0c0 jmp 0x59e38 leaq 0x60(%rsp), %rdx movq %r12, (%rdx) movl $0x0, 0x8(%rdx) leaq 0x30(%rsp), %rdi movl $0x500, (%rdi) # imm = 0x500 leaq 0x10(%rsp), %rsi movl $0x1, %ecx callq 0x3c210 addq $0x178, %rsp # imm = 0x178 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x170(%rsp), %rdi callq 0x3a0c0 movq %rbx, %rdi callq 0x3bd70
_ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE27ComputeInteriorPointWeightsEiiPdS4_S4_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 178h mov r15, rcx mov r12, rdx mov [rsp+1A8h+var_198], edi mov [rsp+1A8h+var_194], edi test rcx, rcx setnz al test r8, r8 setnz cl test al, cl jz loc_59E0F mov ebp, esi mov r14d, edi mov [rsp+1A8h+var_188], r8 lea ecx, [r14+1] lea ebx, ds:2[r14*2] lea rax, [rsp+1A8h+var_138] mov [rax-10h], rax mov [rax-8], ebx mov dword ptr [rax-4], 20h ; ' ' mov qword ptr [rax+100h], 0 cmp ebx, 21h ; '!' jb short loc_59CB0 mov edi, ebx shl rdi, 3; unsigned __int64 mov r13d, ecx call __Znwm; operator new(ulong) mov ecx, r13d mov [rsp+1A8h+var_38], rax mov [rsp+1A8h+var_148], rax mov [rsp+1A8h+var_13C], ebx loc_59CB0: mov r13, [rsp+1A8h+var_148] mov [rsp+1A8h+var_19C], ecx movsxd rax, ecx lea rbx, ds:0[rax*8] add rbx, r13 lea rdx, [rsp+1A8h+var_178] mov [rdx], r12 xor eax, eax mov [rdx+8], eax lea rcx, [rsp+1A8h+var_158] mov [rcx], r13 mov [rcx+8], eax lea r8, [rsp+1A8h+var_168] mov [r8], rbx mov [r8+8], eax lea rdi, [rsp+1A8h+var_17C] mov dword ptr [rdi], 500h lea rsi, [rsp+1A8h+var_198] mov r9d, 1 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_SF_SF_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) cvtsi2sd xmm1, r14d movsd xmm0, cs:qword_B44F8 movsd [rsp+1A8h+var_190], xmm1 divsd xmm0, xmm1 call _cos test r14d, r14d js short loc_59D69 addsd xmm0, xmm0 addsd xmm0, cs:qword_B4528 movsd xmm1, [rsp+1A8h+var_190] mulsd xmm1, cs:qword_B4568 divsd xmm0, xmm1 mov eax, [rsp+1A8h+var_19C] xor ecx, ecx loc_59D4B: movsd xmm1, qword ptr [r13+rcx*8+0] mulsd xmm1, xmm0 addsd xmm1, qword ptr [r12+rcx*8] movsd qword ptr [rbx+rcx*8], xmm1 inc rcx cmp rax, rcx jnz short loc_59D4B loc_59D69: mov eax, r14d sub eax, ebp movsd xmm0, qword ptr [rbx] movsd qword ptr [r15], xmm0 lea rdi, [r15+8] lea r12, [rbx+8] movsxd r13, eax lea rsi, [rbx+r13*8] add rsi, 8 movsxd rbp, ebp lea rdx, ds:0[rbp*8] call _memcpy lea rdi, [r15+rbp*8] add rdi, 8 shl r13, 3 mov rsi, r12 mov rdx, r13 call _memcpy inc ebp mov eax, ebp cdq idiv r14d sub r14d, edx movsd xmm0, qword ptr [rbx] mov r15, [rsp+1A8h+var_188] movsd qword ptr [r15], xmm0 lea rdi, [r15+8] movsxd r14, r14d lea rsi, [rbx+r14*8] add rsi, 8 movsxd rbx, edx lea rdx, ds:0[rbx*8] call _memcpy lea rdi, [r15+rbx*8] add rdi, 8 shl r14, 3 mov rsi, r12 mov rdx, r14 call _memcpy mov rdi, [rsp+1A8h+var_38]; void * call __ZdlPv; operator delete(void *) jmp short loc_59E38 loc_59E0F: lea rdx, [rsp+1A8h+var_148] mov [rdx], r12 mov dword ptr [rdx+8], 0 lea rdi, [rsp+1A8h+var_178] mov dword ptr [rdi], 500h lea rsi, [rsp+1A8h+var_198] mov ecx, 1 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) loc_59E38: add rsp, 178h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_168]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights( int a1, int a2, _BYTE *a3, _QWORD *a4, _QWORD *a5) { int v7; // ecx unsigned int v8; // ebx void *v9; // rax char *v10; // r13 char *v11; // rbx long long v12; // rcx long long v13; // r8 long long v14; // r9 double v15; // xmm0_8 double v16; // xmm0_8 _QWORD *v17; // r12 long long v18; // r13 long long v19; // rcx long long v20; // r8 long long v21; // r9 int v22; // edx _QWORD *v23; // r15 long long v24; // r14 long long v25; // rsi long long v26; // rbx long long v27; // rcx long long v28; // r8 long long v29; // r9 long long v30; // rcx long long v31; // r8 long long v32; // r9 int v33; // [rsp+Ch] [rbp-19Ch] _DWORD v34[2]; // [rsp+10h] [rbp-198h] BYREF double v35; // [rsp+18h] [rbp-190h] _QWORD *v36; // [rsp+20h] [rbp-188h] int v37; // [rsp+2Ch] [rbp-17Ch] BYREF _BYTE *v38; // [rsp+30h] [rbp-178h] BYREF int v39; // [rsp+38h] [rbp-170h] char *v40; // [rsp+40h] [rbp-168h] BYREF int v41; // [rsp+48h] [rbp-160h] char *v42; // [rsp+50h] [rbp-158h] BYREF int v43; // [rsp+58h] [rbp-150h] char *v44; // [rsp+60h] [rbp-148h] BYREF unsigned int v45; // [rsp+68h] [rbp-140h] int v46; // [rsp+6Ch] [rbp-13Ch] char v47; // [rsp+70h] [rbp-138h] BYREF void *v48; // [rsp+170h] [rbp-38h] v34[0] = a1; v34[1] = a1; if ( a5 != 0LL && a4 != 0LL ) { v36 = a5; v7 = a1 + 1; v8 = 2 * a1 + 2; v44 = &v47; v45 = v8; v46 = 32; v48 = 0LL; if ( v8 >= 0x21 ) { v9 = (void *)operator new(8LL * v8); v7 = a1 + 1; v48 = v9; v44 = (char *)v9; v46 = 2 * a1 + 2; } v10 = v44; v33 = v7; v11 = &v44[8 * v7]; v38 = a3; v39 = 0; v42 = v44; v43 = 0; v40 = v11; v41 = 0; v37 = 1280; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( &v37, v34, &v38, &v42, &v40, 1LL); v35 = (double)a1; v15 = cos(6.283185307179586 / (double)a1); if ( a1 >= 0 ) { v16 = (v15 + v15 + 3.0) / (v35 * 6.0); v12 = 0LL; do { *(double *)&v11[8 * v12] = *(double *)&v10[8 * v12] * v16 + *(double *)&a3[8 * v12]; ++v12; } while ( v33 != v12 ); } *a4 = *(_QWORD *)v11; v17 = v11 + 8; v18 = a1 - a2; memcpy(a4 + 1, &v11[8 * v18 + 8], 8LL * a2, v12, v13, v14); memcpy(&a4[a2 + 1], v11 + 8, 8 * v18, v19, v20, v21); v22 = (a2 + 1) % a1; v23 = v36; *v36 = *(_QWORD *)v11; v24 = a1 - v22; v25 = (long long)&v11[8 * v24 + 8]; v26 = v22; memcpy(v23 + 1, v25, 8LL * v22, v27, v28, v29); memcpy(&v23[v26 + 1], v17, 8 * v24, v30, v31, v32); operator delete(v48); } else { v44 = a3; v45 = 0; LODWORD(v38) = 1280; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( &v38, v34, &v44, 1LL); } }
ComputeInteriorPointWeights: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x178 MOV R15,RCX MOV R12,RDX MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0x14],EDI TEST RCX,RCX SETNZ AL TEST R8,R8 SETNZ CL TEST AL,CL JZ 0x00159e0f MOV EBP,ESI MOV R14D,EDI MOV qword ptr [RSP + 0x20],R8 LEA ECX,[R14 + 0x1] LEA EBX,[0x2 + R14*0x2] LEA RAX,[RSP + 0x70] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBX MOV dword ptr [RAX + -0x4],0x20 MOV qword ptr [RAX + 0x100],0x0 CMP EBX,0x21 JC 0x00159cb0 MOV EDI,EBX SHL RDI,0x3 MOV R13D,ECX CALL 0x0013a230 MOV ECX,R13D MOV qword ptr [RSP + 0x170],RAX MOV qword ptr [RSP + 0x60],RAX MOV dword ptr [RSP + 0x6c],EBX LAB_00159cb0: MOV R13,qword ptr [RSP + 0x60] MOV dword ptr [RSP + 0xc],ECX MOVSXD RAX,ECX LEA RBX,[RAX*0x8] ADD RBX,R13 LEA RDX,[RSP + 0x30] MOV qword ptr [RDX],R12 XOR EAX,EAX MOV dword ptr [RDX + 0x8],EAX LEA RCX,[RSP + 0x50] MOV qword ptr [RCX],R13 MOV dword ptr [RCX + 0x8],EAX LEA R8,[RSP + 0x40] MOV qword ptr [R8],RBX MOV dword ptr [R8 + 0x8],EAX LEA RDI,[RSP + 0x2c] MOV dword ptr [RDI],0x500 LAB_00159cf6: LEA RSI,[RSP + 0x10] MOV R9D,0x1 CALL 0x00139380 LAB_00159d06: CVTSI2SD XMM1,R14D MOVSD XMM0,qword ptr [0x001b44f8] MOVSD qword ptr [RSP + 0x18],XMM1 DIVSD XMM0,XMM1 CALL 0x0013c020 TEST R14D,R14D JS 0x00159d69 ADDSD XMM0,XMM0 ADDSD XMM0,qword ptr [0x001b4528] MOVSD XMM1,qword ptr [RSP + 0x18] MULSD XMM1,qword ptr [0x001b4568] DIVSD XMM0,XMM1 MOV EAX,dword ptr [RSP + 0xc] XOR ECX,ECX LAB_00159d4b: MOVSD XMM1,qword ptr [R13 + RCX*0x8] MULSD XMM1,XMM0 ADDSD XMM1,qword ptr [R12 + RCX*0x8] MOVSD qword ptr [RBX + RCX*0x8],XMM1 INC RCX CMP RAX,RCX JNZ 0x00159d4b LAB_00159d69: MOV EAX,R14D SUB EAX,EBP MOVSD XMM0,qword ptr [RBX] MOVSD qword ptr [R15],XMM0 LEA RDI,[R15 + 0x8] LEA R12,[RBX + 0x8] MOVSXD R13,EAX LEA RSI,[RBX + R13*0x8] ADD RSI,0x8 MOVSXD RBP,EBP LEA RDX,[RBP*0x8] CALL 0x00139ad0 LEA RDI,[R15 + RBP*0x8] ADD RDI,0x8 SHL R13,0x3 MOV RSI,R12 MOV RDX,R13 CALL 0x00139ad0 INC EBP MOV EAX,EBP CDQ IDIV R14D SUB R14D,EDX MOVSD XMM0,qword ptr [RBX] MOV R15,qword ptr [RSP + 0x20] MOVSD qword ptr [R15],XMM0 LEA RDI,[R15 + 0x8] MOVSXD R14,R14D LEA RSI,[RBX + R14*0x8] ADD RSI,0x8 MOVSXD RBX,EDX LEA RDX,[RBX*0x8] CALL 0x00139ad0 LEA RDI,[R15 + RBX*0x8] ADD RDI,0x8 SHL R14,0x3 MOV RSI,R12 MOV RDX,R14 CALL 0x00139ad0 MOV RDI,qword ptr [RSP + 0x170] CALL 0x0013a0c0 JMP 0x00159e38 LAB_00159e0f: LEA RDX,[RSP + 0x60] MOV qword ptr [RDX],R12 MOV dword ptr [RDX + 0x8],0x0 LEA RDI,[RSP + 0x30] MOV dword ptr [RDI],0x500 LEA RSI,[RSP + 0x10] MOV ECX,0x1 CALL 0x0013c210 LAB_00159e38: ADD RSP,0x178 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights(int, int, double*, double*, double*) */ void OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights (int param_1,int param_2,double *param_3,double *param_4,double *param_5) { uint uVar1; double *pdVar2; ulong uVar3; int iVar4; double *pdVar5; double dVar6; int local_198; int local_194; double local_190; double *local_188; int4 local_17c; double *local_178; int4 local_170; double *local_168; int4 local_160; double *local_158; int4 local_150; double *local_148; uint local_140; uint local_13c; double local_138 [32]; double *local_38; local_198 = param_1; local_194 = param_1; if (param_4 == (double *)0x0 || param_5 == (double *)0x0) { local_140 = 0; local_178 = (double *)CONCAT44(local_178._4_4_,0x500); local_148 = param_3; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *)&local_178,&local_198,&local_148,1) ; } else { uVar1 = param_1 * 2 + 2; local_148 = local_138; local_13c = 0x20; local_38 = (double *)0x0; local_188 = param_5; local_140 = uVar1; if (0x20 < uVar1) { local_148 = (double *)operator_new((ulong)uVar1 << 3); local_13c = uVar1; local_38 = local_148; } pdVar2 = local_148; pdVar5 = local_148 + (int)(param_1 + 1U); local_170 = 0; local_158 = local_148; local_150 = 0; local_160 = 0; local_17c = 0x500; /* try { // try from 00159cf6 to 00159d05 has its CatchHandler @ 00159e4a */ local_178 = param_3; local_168 = pdVar5; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *)&local_17c,&local_198); local_190 = (double)param_1; dVar6 = cos(DAT_001b44f8 / local_190); if (-1 < param_1) { uVar3 = 0; do { pdVar5[uVar3] = pdVar2[uVar3] * ((dVar6 + dVar6 + DAT_001b4528) / (local_190 * DAT_001b4568)) + param_3[uVar3]; uVar3 = uVar3 + 1; } while (param_1 + 1U != uVar3); } *param_4 = *pdVar5; memcpy(param_4 + 1,pdVar5 + (long)(param_1 - param_2) + 1,(long)param_2 * 8); memcpy(param_4 + (long)param_2 + 1,pdVar5 + 1,(long)(param_1 - param_2) << 3); pdVar2 = local_188; iVar4 = (param_2 + 1) % param_1; *local_188 = *pdVar5; memcpy(local_188 + 1,pdVar5 + (long)(param_1 - iVar4) + 1,(long)iVar4 * 8); memcpy(pdVar2 + (long)iVar4 + 1,pdVar5 + 1,(long)(param_1 - iVar4) << 3); operator_delete(local_38); } return; }
37,114
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void LoopLimits<REAL>::ComputeInteriorPointWeights(int valence, int faceInRing, REAL* pWeights, REAL* epWeights, REAL* emWeights) { int ringSize = valence + 1; LimitVertex vertex(valence, valence); bool computeTangentPoints = epWeights && emWeights; if (!computeTangentPoints) { // // The interior position mask is symmetric -- no need to rotate // or otherwise account for orientation: // LimitMask pMask(pWeights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, Sdc::Crease::RULE_SMOOTH); } else { // // The interior tangent masks will be directed along the first // two edges (the second a rotation of the first). Adjust the // tangent weights for a point along the tangent, then rotate // according to the face within the ring: // int weightWidth = valence + 1; StackBuffer<REAL, 32, true> tWeights(2 * weightWidth); REAL * t1Weights = &tWeights[0]; REAL * t2Weights = t1Weights + ringSize; LimitMask pMask(pWeights); LimitMask t1Mask(t1Weights); LimitMask t2Mask(t2Weights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, t1Mask, t2Mask, Sdc::Crease::RULE_SMOOTH); // // Use the subdominant eigenvalue to scale the limit tangent t1: // // e = (3 + cos(2*PI/valence)) / 8 // // Combine it with a normalizing factor of (2 / valence) to account // for the scale inherent in the tangent weights, and (2 / 3) to // match desired placement of the cubic point in the regular case. // // The weights for t1 can simply be rotated around the ring to yield // t2. Combine the weights for the point in a single set for t2 and // then copy it into the appropriate orientation for ep and em: // double theta = 2.0 * std::numbers::pi / (double) valence; REAL tanScale = (REAL) ((3.0 + 2.0 * std::cos(theta)) / (6.0 * valence)); for (int i = 0; i < ringSize; ++i) { t2Weights[i] = pWeights[i] + t1Weights[i] * tanScale; } int n1 = faceInRing; int n2 = valence - n1; epWeights[0] = t2Weights[0]; std::memcpy(epWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(epWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); n1 = (faceInRing + 1) % valence; n2 = valence - n1; emWeights[0] = t2Weights[0]; std::memcpy(emWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(emWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); } }
O2
cpp
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r12 movl %edi, 0x10(%rsp) movl %edi, 0x14(%rsp) testq %rcx, %rcx setne %al testq %r8, %r8 setne %cl testb %cl, %al je 0x6c69e movl %edi, %r14d movl %esi, 0xc(%rsp) movq %r8, 0x20(%rsp) leal 0x2(,%r14,2), %esi leaq 0x60(%rsp), %r13 movq %r13, %rdi callq 0x4f590 movq (%r13), %r13 leaq 0x30(%rsp), %rdx movq %r12, (%rdx) andl $0x0, 0x8(%rdx) movslq %r14d, %rbp leaq 0x4(,%rbp,4), %rbx addq %r13, %rbx leaq 0x50(%rsp), %rcx movq %r13, (%rcx) andl $0x0, 0x8(%rcx) leaq 0x40(%rsp), %r8 movq %rbx, (%r8) andl $0x0, 0x8(%r8) leaq 0x2c(%rsp), %rdi movl $0x500, (%rdi) # imm = 0x500 leaq 0x10(%rsp), %rsi pushq $0x1 popq %r9 callq 0x53de0 cvtsi2sd %r14d, %xmm1 movsd %xmm1, 0x18(%rsp) movsd 0x51eab(%rip), %xmm0 # 0xbe4f8 divsd %xmm1, %xmm0 callq 0x557b0 addsd %xmm0, %xmm0 addsd 0x51ec6(%rip), %xmm0 # 0xbe528 movsd 0x18(%rsp), %xmm1 mulsd 0x51f00(%rip), %xmm1 # 0xbe570 divsd %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 xorl %eax, %eax movl 0xc(%rsp), %ecx cmpq %rbp, %rax jg 0x6c6c7 movss (%r13,%rax,4), %xmm1 mulss %xmm0, %xmm1 addss (%r12,%rax,4), %xmm1 movss %xmm1, (%rbx,%rax,4) incq %rax jmp 0x6c67e leaq 0x60(%rsp), %rdx movq %r12, (%rdx) andl $0x0, 0x8(%rdx) leaq 0x30(%rsp), %rdi movl $0x500, (%rdi) # imm = 0x500 leaq 0x10(%rsp), %rsi pushq $0x1 popq %rcx callq 0x55a20 jmp 0x6c76b movl %r14d, %eax subl %ecx, %eax movss (%rbx), %xmm0 movss %xmm0, (%r15) leaq 0x4(%r15), %rdi leaq 0x4(%rbx), %r12 movslq %eax, %r13 leaq (%rbx,%r13,4), %rsi addq $0x4, %rsi movslq %ecx, %rbp leaq (,%rbp,4), %rdx callq 0x51bd0 leaq (%r15,%rbp,4), %rdi addq $0x4, %rdi shlq $0x2, %r13 movq %r12, %rsi movq %r13, %rdx callq 0x51bd0 incl %ebp movl %ebp, %eax cltd idivl %r14d subl %edx, %r14d movss (%rbx), %xmm0 movq 0x20(%rsp), %r15 movss %xmm0, (%r15) leaq 0x4(%r15), %rdi movslq %r14d, %r14 leaq (%rbx,%r14,4), %rsi addq $0x4, %rsi movslq %edx, %rbx leaq (,%rbx,4), %rdx callq 0x51bd0 leaq (%r15,%rbx,4), %rdi addq $0x4, %rdi shlq $0x2, %r14 movq %r12, %rsi movq %r14, %rdx callq 0x51bd0 movq 0xf0(%rsp), %rdi callq 0x524d0 addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0xf0(%rsp), %rdi callq 0x524d0 movq %rbx, %rdi callq 0x55300 nop
_ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIfE27ComputeInteriorPointWeightsEiiPfS4_S4_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r12, rdx mov [rsp+128h+var_118], edi mov [rsp+128h+var_114], edi test rcx, rcx setnz al test r8, r8 setnz cl test al, cl jz loc_6C69E mov r14d, edi mov [rsp+128h+var_11C], esi mov [rsp+128h+var_108], r8 lea esi, ds:2[r14*2] lea r13, [rsp+128h+var_C8] mov rdi, r13 call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj32ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,32u,true>::StackBuffer(uint) mov r13, [r13+0] lea rdx, [rsp+128h+var_F8] mov [rdx], r12 and dword ptr [rdx+8], 0 movsxd rbp, r14d lea rbx, ds:4[rbp*4] add rbx, r13 lea rcx, [rsp+128h+var_D8] mov [rcx], r13 and dword ptr [rcx+8], 0 lea r8, [rsp+128h+var_E8] mov [r8], rbx and dword ptr [r8+8], 0 lea rdi, [rsp+128h+var_FC] mov dword ptr [rdi], 500h lea rsi, [rsp+128h+var_118] push 1 pop r9 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIfE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_SF_SF_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) cvtsi2sd xmm1, r14d movsd [rsp+128h+var_110], xmm1 movsd xmm0, cs:qword_BE4F8 divsd xmm0, xmm1 call _cos addsd xmm0, xmm0 addsd xmm0, cs:qword_BE528 movsd xmm1, [rsp+128h+var_110] mulsd xmm1, cs:qword_BE570 divsd xmm0, xmm1 cvtsd2ss xmm0, xmm0 xor eax, eax mov ecx, [rsp+128h+var_11C] loc_6C67E: cmp rax, rbp jg short loc_6C6C7 movss xmm1, dword ptr [r13+rax*4+0] mulss xmm1, xmm0 addss xmm1, dword ptr [r12+rax*4] movss dword ptr [rbx+rax*4], xmm1 inc rax jmp short loc_6C67E loc_6C69E: lea rdx, [rsp+128h+var_C8] mov [rdx], r12 and dword ptr [rdx+8], 0 lea rdi, [rsp+128h+var_F8] mov dword ptr [rdi], 500h lea rsi, [rsp+128h+var_118] push 1 pop rcx call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIfE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) jmp loc_6C76B loc_6C6C7: mov eax, r14d sub eax, ecx movss xmm0, dword ptr [rbx] movss dword ptr [r15], xmm0 lea rdi, [r15+4] lea r12, [rbx+4] movsxd r13, eax lea rsi, [rbx+r13*4] add rsi, 4 movsxd rbp, ecx lea rdx, ds:0[rbp*4] call _memcpy lea rdi, [r15+rbp*4] add rdi, 4 shl r13, 2 mov rsi, r12 mov rdx, r13 call _memcpy inc ebp mov eax, ebp cdq idiv r14d sub r14d, edx movss xmm0, dword ptr [rbx] mov r15, [rsp+128h+var_108] movss dword ptr [r15], xmm0 lea rdi, [r15+4] movsxd r14, r14d lea rsi, [rbx+r14*4] add rsi, 4 movsxd rbx, edx lea rdx, ds:0[rbx*4] call _memcpy lea rdi, [r15+rbx*4] add rdi, 4 shl r14, 2 mov rsi, r12 mov rdx, r14 call _memcpy mov rdi, [rsp+128h+var_38]; void * call __ZdlPv; operator delete(void *) loc_6C76B: add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_E8]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights( int a1, unsigned int a2, long long a3, _DWORD *a4, _DWORD *a5) { long long v7; // r13 _DWORD *v8; // rbx long long v9; // r8 long long v10; // r9 double v11; // xmm0_8 float v12; // xmm0_4 long long i; // rax _DWORD *v14; // r12 long long v15; // r13 long long v16; // rcx long long v17; // r8 long long v18; // r9 int v19; // ebp _DWORD *v20; // r15 long long v21; // r14 long long v22; // rsi long long v23; // rbx long long v24; // rcx long long v25; // r8 long long v26; // r9 long long v27; // rcx long long v28; // r8 long long v29; // r9 _DWORD v30[2]; // [rsp+10h] [rbp-118h] BYREF double v31; // [rsp+18h] [rbp-110h] _DWORD *v32; // [rsp+20h] [rbp-108h] int v33; // [rsp+2Ch] [rbp-FCh] BYREF long long v34; // [rsp+30h] [rbp-F8h] BYREF int v35; // [rsp+38h] [rbp-F0h] _DWORD *v36; // [rsp+40h] [rbp-E8h] BYREF int v37; // [rsp+48h] [rbp-E0h] long long v38; // [rsp+50h] [rbp-D8h] BYREF int v39; // [rsp+58h] [rbp-D0h] long long v40; // [rsp+60h] [rbp-C8h] BYREF int v41; // [rsp+68h] [rbp-C0h] void *v42; // [rsp+F0h] [rbp-38h] v30[0] = a1; v30[1] = a1; if ( a5 != 0LL && a4 != 0LL ) { v32 = a5; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,32u,true>::StackBuffer(&v40, (unsigned int)(2 * a1 + 2)); v7 = v40; v34 = a3; v35 = 0; v8 = (_DWORD *)(v40 + 4LL * a1 + 4); v38 = v40; v39 = 0; v36 = v8; v37 = 0; v33 = 1280; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>( &v33, v30, &v34, &v38, &v36, 1LL); v31 = (double)a1; v11 = cos(6.283185307179586 / (double)a1); v12 = (v11 + v11 + 3.0) / (v31 * 6.0); for ( i = 0LL; i <= a1; ++i ) *(float *)&v8[i] = (float)(*(float *)(v7 + 4 * i) * v12) + *(float *)(a3 + 4 * i); *a4 = *v8; v14 = v8 + 1; v15 = (int)(a1 - a2); memcpy(a4 + 1, &v8[v15 + 1], 4LL * (int)a2, a2, v9, v10); memcpy(&a4[a2 + 1], v8 + 1, 4 * v15, v16, v17, v18); v19 = a2 + 1; v20 = v32; *v32 = *v8; v21 = a1 - (int)(a2 + 1) % a1; v22 = (long long)&v8[v21 + 1]; v23 = v19 % a1; memcpy(v20 + 1, v22, 4 * v23, v24, v25, v26); memcpy(&v20[v23 + 1], v14, 4 * v21, v27, v28, v29); operator delete(v42); } else { v40 = a3; v41 = 0; LODWORD(v34) = 1280; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>( &v34, v30, &v40, 1LL); } }
ComputeInteriorPointWeights: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R12,RDX MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0x14],EDI TEST RCX,RCX SETNZ AL TEST R8,R8 SETNZ CL TEST AL,CL JZ 0x0016c69e MOV R14D,EDI MOV dword ptr [RSP + 0xc],ESI MOV qword ptr [RSP + 0x20],R8 LEA ESI,[0x2 + R14*0x2] LEA R13,[RSP + 0x60] MOV RDI,R13 CALL 0x0014f590 MOV R13,qword ptr [R13] LEA RDX,[RSP + 0x30] MOV qword ptr [RDX],R12 AND dword ptr [RDX + 0x8],0x0 MOVSXD RBP,R14D LEA RBX,[0x4 + RBP*0x4] ADD RBX,R13 LEA RCX,[RSP + 0x50] MOV qword ptr [RCX],R13 AND dword ptr [RCX + 0x8],0x0 LEA R8,[RSP + 0x40] MOV qword ptr [R8],RBX AND dword ptr [R8 + 0x8],0x0 LEA RDI,[RSP + 0x2c] MOV dword ptr [RDI],0x500 LAB_0016c62c: LEA RSI,[RSP + 0x10] PUSH 0x1 POP R9 CALL 0x00153de0 LAB_0016c63a: CVTSI2SD XMM1,R14D MOVSD qword ptr [RSP + 0x18],XMM1 MOVSD XMM0,qword ptr [0x001be4f8] DIVSD XMM0,XMM1 CALL 0x001557b0 ADDSD XMM0,XMM0 ADDSD XMM0,qword ptr [0x001be528] MOVSD XMM1,qword ptr [RSP + 0x18] MULSD XMM1,qword ptr [0x001be570] DIVSD XMM0,XMM1 CVTSD2SS XMM0,XMM0 XOR EAX,EAX MOV ECX,dword ptr [RSP + 0xc] LAB_0016c67e: CMP RAX,RBP JG 0x0016c6c7 MOVSS XMM1,dword ptr [R13 + RAX*0x4] MULSS XMM1,XMM0 ADDSS XMM1,dword ptr [R12 + RAX*0x4] MOVSS dword ptr [RBX + RAX*0x4],XMM1 INC RAX JMP 0x0016c67e LAB_0016c69e: LEA RDX,[RSP + 0x60] MOV qword ptr [RDX],R12 AND dword ptr [RDX + 0x8],0x0 LEA RDI,[RSP + 0x30] MOV dword ptr [RDI],0x500 LEA RSI,[RSP + 0x10] PUSH 0x1 POP RCX CALL 0x00155a20 JMP 0x0016c76b LAB_0016c6c7: MOV EAX,R14D SUB EAX,ECX MOVSS XMM0,dword ptr [RBX] MOVSS dword ptr [R15],XMM0 LEA RDI,[R15 + 0x4] LEA R12,[RBX + 0x4] MOVSXD R13,EAX LEA RSI,[RBX + R13*0x4] ADD RSI,0x4 MOVSXD RBP,ECX LEA RDX,[RBP*0x4] CALL 0x00151bd0 LEA RDI,[R15 + RBP*0x4] ADD RDI,0x4 SHL R13,0x2 MOV RSI,R12 MOV RDX,R13 CALL 0x00151bd0 INC EBP MOV EAX,EBP CDQ IDIV R14D SUB R14D,EDX MOVSS XMM0,dword ptr [RBX] MOV R15,qword ptr [RSP + 0x20] MOVSS dword ptr [R15],XMM0 LEA RDI,[R15 + 0x4] MOVSXD R14,R14D LEA RSI,[RBX + R14*0x4] ADD RSI,0x4 MOVSXD RBX,EDX LEA RDX,[RBX*0x4] CALL 0x00151bd0 LEA RDI,[R15 + RBX*0x4] ADD RDI,0x4 SHL R14,0x2 MOV RSI,R12 MOV RDX,R14 CALL 0x00151bd0 MOV RDI,qword ptr [RSP + 0xf0] CALL 0x001524d0 LAB_0016c76b: ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*) */ void OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights (int param_1,int param_2,float *param_3,float *param_4,float *param_5) { float *pfVar1; long lVar2; int iVar3; float *pfVar4; double dVar5; double dVar6; int local_118; int local_114; double local_110; float *local_108; int4 local_fc; float *local_f8; int4 local_f0; float *local_e8; int4 local_e0; float *local_d8; int4 local_d0; float *local_c8; int4 local_c0; void *local_38; local_118 = param_1; local_114 = param_1; if (param_4 == (float *)0x0 || param_5 == (float *)0x0) { local_c0 = 0; local_f8 = (float *)CONCAT44(local_f8._4_4_,0x500); local_c8 = param_3; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *)&local_f8,&local_118,&local_c8,1); } else { local_108 = param_5; Vtr::internal::StackBuffer<float,32u,true>::StackBuffer ((StackBuffer<float,32u,true> *)&local_c8,param_1 * 2 + 2); local_f0 = 0; pfVar4 = local_c8 + (long)param_1 + 1; local_d8 = local_c8; local_d0 = 0; local_e0 = 0; local_fc = 0x500; /* try { // try from 0016c62c to 0016c639 has its CatchHandler @ 0016c77d */ local_f8 = param_3; local_e8 = pfVar4; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *)&local_fc,&local_118); local_110 = (double)param_1; dVar5 = cos(DAT_001be4f8 / local_110); dVar5 = dVar5 + dVar5 + DAT_001be528; dVar6 = local_110 * DAT_001be570; for (lVar2 = 0; lVar2 <= param_1; lVar2 = lVar2 + 1) { pfVar4[lVar2] = local_c8[lVar2] * (float)(dVar5 / dVar6) + param_3[lVar2]; } *param_4 = *pfVar4; memcpy(param_4 + 1,pfVar4 + (long)(param_1 - param_2) + 1,(long)param_2 * 4); memcpy(param_4 + (long)param_2 + 1,pfVar4 + 1,(long)(param_1 - param_2) << 2); pfVar1 = local_108; iVar3 = (param_2 + 1) % param_1; *local_108 = *pfVar4; memcpy(local_108 + 1,pfVar4 + (long)(param_1 - iVar3) + 1,(long)iVar3 * 4); memcpy(pfVar1 + (long)iVar3 + 1,pfVar4 + 1,(long)(param_1 - iVar3) << 2); operator_delete(local_38); } return; }
37,115
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void LoopLimits<REAL>::ComputeInteriorPointWeights(int valence, int faceInRing, REAL* pWeights, REAL* epWeights, REAL* emWeights) { int ringSize = valence + 1; LimitVertex vertex(valence, valence); bool computeTangentPoints = epWeights && emWeights; if (!computeTangentPoints) { // // The interior position mask is symmetric -- no need to rotate // or otherwise account for orientation: // LimitMask pMask(pWeights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, Sdc::Crease::RULE_SMOOTH); } else { // // The interior tangent masks will be directed along the first // two edges (the second a rotation of the first). Adjust the // tangent weights for a point along the tangent, then rotate // according to the face within the ring: // int weightWidth = valence + 1; StackBuffer<REAL, 32, true> tWeights(2 * weightWidth); REAL * t1Weights = &tWeights[0]; REAL * t2Weights = t1Weights + ringSize; LimitMask pMask(pWeights); LimitMask t1Mask(t1Weights); LimitMask t2Mask(t2Weights); SchemeLoop().ComputeVertexLimitMask(vertex, pMask, t1Mask, t2Mask, Sdc::Crease::RULE_SMOOTH); // // Use the subdominant eigenvalue to scale the limit tangent t1: // // e = (3 + cos(2*PI/valence)) / 8 // // Combine it with a normalizing factor of (2 / valence) to account // for the scale inherent in the tangent weights, and (2 / 3) to // match desired placement of the cubic point in the regular case. // // The weights for t1 can simply be rotated around the ring to yield // t2. Combine the weights for the point in a single set for t2 and // then copy it into the appropriate orientation for ep and em: // double theta = 2.0 * std::numbers::pi / (double) valence; REAL tanScale = (REAL) ((3.0 + 2.0 * std::cos(theta)) / (6.0 * valence)); for (int i = 0; i < ringSize; ++i) { t2Weights[i] = pWeights[i] + t1Weights[i] * tanScale; } int n1 = faceInRing; int n2 = valence - n1; epWeights[0] = t2Weights[0]; std::memcpy(epWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(epWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); n1 = (faceInRing + 1) % valence; n2 = valence - n1; emWeights[0] = t2Weights[0]; std::memcpy(emWeights + 1, t2Weights + 1 + n2, n1 * sizeof(REAL)); std::memcpy(emWeights + 1 + n1, t2Weights + 1, n2 * sizeof(REAL)); } }
O3
cpp
OpenSubdiv::v3_6_0::Far::LoopLimits<float>::ComputeInteriorPointWeights(int, int, float*, float*, float*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x178, %rsp # imm = 0x178 movq %rcx, %r15 movq %rdx, %r12 movl %edi, 0x10(%rsp) movl %edi, 0x14(%rsp) testq %rcx, %rcx setne %al testq %r8, %r8 setne %cl testb %cl, %al je 0x5c6b0 movl %esi, %ebp movl %edi, %r14d movq %r8, 0x20(%rsp) leal 0x1(%r14), %eax leal 0x2(,%r14,2), %ebx leaq 0x70(%rsp), %r13 movq %r13, -0x10(%r13) movl %ebx, -0x8(%r13) movl $0x20, -0x4(%r13) movq $0x0, 0x100(%r13) cmpl $0x21, %ebx jb 0x5c54f movl %ebx, %edi shlq $0x3, %rdi movl %ebp, 0x8(%rsp) movl %eax, %ebp callq 0x3a210 movq %rax, %r13 movl %ebp, %eax movl 0x8(%rsp), %ebp movq %r13, 0x170(%rsp) movq %r13, 0x60(%rsp) movl %ebx, 0x6c(%rsp) movl %eax, 0x8(%rsp) cltq leaq (,%rax,8), %rbx addq %r13, %rbx leaq 0x30(%rsp), %rdx movq %r12, (%rdx) xorl %eax, %eax movl %eax, 0x8(%rdx) leaq 0x50(%rsp), %rcx movq %r13, (%rcx) movl %eax, 0x8(%rcx) leaq 0x40(%rsp), %r8 movq %rbx, (%r8) movl %eax, 0x8(%r8) leaq 0x2c(%rsp), %rdi movl $0x500, (%rdi) # imm = 0x500 leaq 0x10(%rsp), %rsi movl $0x1, %r9d callq 0x39370 cvtsi2sd %r14d, %xmm1 movsd 0x5affc(%rip), %xmm0 # 0xb75a8 movsd %xmm1, 0x18(%rsp) divsd %xmm1, %xmm0 callq 0x3bfd0 testl %r14d, %r14d js 0x5c602 addsd %xmm0, %xmm0 addsd 0x5b00c(%rip), %xmm0 # 0xb75d8 movsd 0x18(%rsp), %xmm1 mulsd 0x5b046(%rip), %xmm1 # 0xb7620 divsd %xmm1, %xmm0 movl 0x8(%rsp), %eax xorl %ecx, %ecx movsd (%r13,%rcx,8), %xmm1 mulsd %xmm0, %xmm1 addsd (%r12,%rcx,8), %xmm1 movsd %xmm1, (%rbx,%rcx,8) incq %rcx cmpq %rcx, %rax jne 0x5c5e4 movl %r14d, %eax subl %ebp, %eax movsd (%rbx), %xmm0 movsd %xmm0, 0x8(%rsp) movsd %xmm0, (%r15) leaq 0x8(%r15), %rdi leaq 0x8(%rbx), %r12 movslq %eax, %r13 leaq (%rbx,%r13,8), %rsi addq $0x8, %rsi movslq %ebp, %rbp leaq (,%rbp,8), %rdx callq 0x39ab0 leaq (%r15,%rbp,8), %rdi addq $0x8, %rdi shlq $0x3, %r13 movq %r12, %rsi movq %r13, %rdx callq 0x39ab0 incl %ebp movl %ebp, %eax cltd idivl %r14d subl %edx, %r14d movq 0x20(%rsp), %r15 movsd 0x8(%rsp), %xmm0 movsd %xmm0, (%r15) leaq 0x8(%r15), %rdi movslq %r14d, %r14 leaq (%rbx,%r14,8), %rsi addq $0x8, %rsi movslq %edx, %rbx leaq (,%rbx,8), %rdx callq 0x39ab0 leaq (%r15,%rbx,8), %rdi addq $0x8, %rdi shlq $0x3, %r14 movq %r12, %rsi movq %r14, %rdx callq 0x39ab0 movq 0x170(%rsp), %rdi callq 0x3a0a0 jmp 0x5c6d9 leaq 0x60(%rsp), %rdx movq %r12, (%rdx) movl $0x0, 0x8(%rdx) leaq 0x30(%rsp), %rdi movl $0x500, (%rdi) # imm = 0x500 leaq 0x10(%rsp), %rsi movl $0x1, %ecx callq 0x3c1c0 addq $0x178, %rsp # imm = 0x178 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x170(%rsp), %rdi callq 0x3a0a0 movq %rbx, %rdi callq 0x3bd30 nop
_ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE27ComputeInteriorPointWeightsEiiPdS4_S4_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 178h mov r15, rcx mov r12, rdx mov [rsp+1A8h+var_198], edi mov [rsp+1A8h+var_194], edi test rcx, rcx setnz al test r8, r8 setnz cl test al, cl jz loc_5C6B0 mov ebp, esi mov r14d, edi mov [rsp+1A8h+var_188], r8 lea eax, [r14+1] lea ebx, ds:2[r14*2] lea r13, [rsp+1A8h+var_138] mov [r13-10h], r13 mov [r13-8], ebx mov dword ptr [r13-4], 20h ; ' ' mov qword ptr [r13+100h], 0 cmp ebx, 21h ; '!' jb short loc_5C54F mov edi, ebx shl rdi, 3; unsigned __int64 mov dword ptr [rsp+1A8h+var_1A0], ebp mov ebp, eax call __Znwm; operator new(ulong) mov r13, rax mov eax, ebp mov ebp, dword ptr [rsp+1A8h+var_1A0] mov [rsp+1A8h+var_38], r13 mov [rsp+1A8h+var_148], r13 mov [rsp+1A8h+var_13C], ebx loc_5C54F: mov dword ptr [rsp+1A8h+var_1A0], eax cdqe lea rbx, ds:0[rax*8] add rbx, r13 lea rdx, [rsp+1A8h+var_178] mov [rdx], r12 xor eax, eax mov [rdx+8], eax lea rcx, [rsp+1A8h+var_158] mov [rcx], r13 mov [rcx+8], eax lea r8, [rsp+1A8h+var_168] mov [r8], rbx mov [r8+8], eax lea rdi, [rsp+1A8h+var_17C] mov dword ptr [rdi], 500h lea rsi, [rsp+1A8h+var_198] mov r9d, 1 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_SF_SF_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) cvtsi2sd xmm1, r14d movsd xmm0, cs:qword_B75A8 movsd [rsp+1A8h+var_190], xmm1 divsd xmm0, xmm1 call _cos test r14d, r14d js short loc_5C602 addsd xmm0, xmm0 addsd xmm0, cs:qword_B75D8 movsd xmm1, [rsp+1A8h+var_190] mulsd xmm1, cs:qword_B7620 divsd xmm0, xmm1 mov eax, dword ptr [rsp+1A8h+var_1A0] xor ecx, ecx loc_5C5E4: movsd xmm1, qword ptr [r13+rcx*8+0] mulsd xmm1, xmm0 addsd xmm1, qword ptr [r12+rcx*8] movsd qword ptr [rbx+rcx*8], xmm1 inc rcx cmp rax, rcx jnz short loc_5C5E4 loc_5C602: mov eax, r14d sub eax, ebp movsd xmm0, qword ptr [rbx] movsd [rsp+1A8h+var_1A0], xmm0 movsd qword ptr [r15], xmm0 lea rdi, [r15+8] lea r12, [rbx+8] movsxd r13, eax lea rsi, [rbx+r13*8] add rsi, 8 movsxd rbp, ebp lea rdx, ds:0[rbp*8] call _memcpy lea rdi, [r15+rbp*8] add rdi, 8 shl r13, 3 mov rsi, r12 mov rdx, r13 call _memcpy inc ebp mov eax, ebp cdq idiv r14d sub r14d, edx mov r15, [rsp+1A8h+var_188] movsd xmm0, [rsp+1A8h+var_1A0] movsd qword ptr [r15], xmm0 lea rdi, [r15+8] movsxd r14, r14d lea rsi, [rbx+r14*8] add rsi, 8 movsxd rbx, edx lea rdx, ds:0[rbx*8] call _memcpy lea rdi, [r15+rbx*8] add rdi, 8 shl r14, 3 mov rsi, r12 mov rdx, r14 call _memcpy mov rdi, [rsp+1A8h+var_38]; void * call __ZdlPv; operator delete(void *) jmp short loc_5C6D9 loc_5C6B0: lea rdx, [rsp+1A8h+var_148] mov [rdx], r12 mov dword ptr [rdx+8], 0 lea rdi, [rsp+1A8h+var_178] mov dword ptr [rdi], 500h lea rsi, [rsp+1A8h+var_198] mov ecx, 1 call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE22ComputeVertexLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_NS1_6Crease4RuleE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask &,OpenSubdiv::v3_6_0::Sdc::Crease::Rule) loc_5C6D9: add rsp, 178h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_168]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights( int a1, int a2, _BYTE *a3, _QWORD *a4, _QWORD *a5) { int v7; // ebp int v8; // eax unsigned int v9; // ebx _BYTE *v10; // r13 _QWORD *v11; // rbx long long v12; // rcx long long v13; // r8 long long v14; // r9 double v15; // xmm0_8 double v16; // xmm0_8 _QWORD *v17; // r12 long long v18; // r13 long long v19; // rcx long long v20; // r8 long long v21; // r9 int v22; // ebp _QWORD *v23; // r15 long long v24; // r14 long long v25; // rsi long long v26; // rbx long long v27; // rcx long long v28; // r8 long long v29; // r9 long long v30; // rcx long long v31; // r8 long long v32; // r9 int v33; // [rsp+8h] [rbp-1A0h] long long v34; // [rsp+8h] [rbp-1A0h] _DWORD v35[2]; // [rsp+10h] [rbp-198h] BYREF double v36; // [rsp+18h] [rbp-190h] _QWORD *v37; // [rsp+20h] [rbp-188h] int v38; // [rsp+2Ch] [rbp-17Ch] BYREF _BYTE *v39; // [rsp+30h] [rbp-178h] BYREF int v40; // [rsp+38h] [rbp-170h] _QWORD *v41; // [rsp+40h] [rbp-168h] BYREF int v42; // [rsp+48h] [rbp-160h] _BYTE *v43; // [rsp+50h] [rbp-158h] BYREF int v44; // [rsp+58h] [rbp-150h] _BYTE *v45; // [rsp+60h] [rbp-148h] BYREF unsigned int v46; // [rsp+68h] [rbp-140h] int v47; // [rsp+6Ch] [rbp-13Ch] _BYTE v48[256]; // [rsp+70h] [rbp-138h] BYREF void *v49; // [rsp+170h] [rbp-38h] v35[0] = a1; v35[1] = a1; if ( a5 != 0LL && a4 != 0LL ) { v7 = a2; v37 = a5; v8 = a1 + 1; v9 = 2 * a1 + 2; v10 = v48; v45 = v48; v46 = v9; v47 = 32; v49 = 0LL; if ( v9 >= 0x21 ) { v10 = (_BYTE *)operator new(8LL * v9); v8 = a1 + 1; v7 = a2; v49 = v10; v45 = v10; v47 = 2 * a1 + 2; } v33 = v8; v11 = &v10[8 * v8]; v39 = a3; v40 = 0; v43 = v10; v44 = 0; v41 = v11; v42 = 0; v38 = 1280; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( &v38, v35, &v39, &v43, &v41, 1LL); v36 = (double)a1; v15 = cos(6.283185307179586 / (double)a1); if ( a1 >= 0 ) { v16 = (v15 + v15 + 3.0) / (v36 * 6.0); v12 = 0LL; do { *(double *)&v11[v12] = *(double *)&v10[8 * v12] * v16 + *(double *)&a3[8 * v12]; ++v12; } while ( v33 != v12 ); } v34 = *v11; *a4 = *v11; v17 = v11 + 1; v18 = a1 - v7; memcpy(a4 + 1, &v11[v18 + 1], 8LL * v7, v12, v13, v14); memcpy(&a4[v7 + 1], v11 + 1, 8 * v18, v19, v20, v21); v22 = v7 + 1; v23 = v37; *v37 = v34; v24 = a1 - v22 % a1; v25 = (long long)&v11[v24 + 1]; v26 = v22 % a1; memcpy(v23 + 1, v25, 8 * v26, v27, v28, v29); memcpy(&v23[v26 + 1], v17, 8 * v24, v30, v31, v32); operator delete(v49); } else { v45 = a3; v46 = 0; LODWORD(v39) = 1280; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( &v39, v35, &v45, 1LL); } }
ComputeInteriorPointWeights: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x178 MOV R15,RCX MOV R12,RDX MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0x14],EDI TEST RCX,RCX SETNZ AL TEST R8,R8 SETNZ CL TEST AL,CL JZ 0x0015c6b0 MOV EBP,ESI MOV R14D,EDI MOV qword ptr [RSP + 0x20],R8 LEA EAX,[R14 + 0x1] LEA EBX,[0x2 + R14*0x2] LEA R13,[RSP + 0x70] MOV qword ptr [R13 + -0x10],R13 MOV dword ptr [R13 + -0x8],EBX MOV dword ptr [R13 + -0x4],0x20 MOV qword ptr [R13 + 0x100],0x0 CMP EBX,0x21 JC 0x0015c54f MOV EDI,EBX SHL RDI,0x3 MOV dword ptr [RSP + 0x8],EBP MOV EBP,EAX CALL 0x0013a210 MOV R13,RAX MOV EAX,EBP MOV EBP,dword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x170],R13 MOV qword ptr [RSP + 0x60],R13 MOV dword ptr [RSP + 0x6c],EBX LAB_0015c54f: MOV dword ptr [RSP + 0x8],EAX CDQE LEA RBX,[RAX*0x8] ADD RBX,R13 LEA RDX,[RSP + 0x30] MOV qword ptr [RDX],R12 XOR EAX,EAX MOV dword ptr [RDX + 0x8],EAX LEA RCX,[RSP + 0x50] MOV qword ptr [RCX],R13 MOV dword ptr [RCX + 0x8],EAX LEA R8,[RSP + 0x40] MOV qword ptr [R8],RBX MOV dword ptr [R8 + 0x8],EAX LEA RDI,[RSP + 0x2c] MOV dword ptr [RDI],0x500 LAB_0015c58f: LEA RSI,[RSP + 0x10] MOV R9D,0x1 CALL 0x00139370 LAB_0015c59f: CVTSI2SD XMM1,R14D MOVSD XMM0,qword ptr [0x001b75a8] MOVSD qword ptr [RSP + 0x18],XMM1 DIVSD XMM0,XMM1 CALL 0x0013bfd0 TEST R14D,R14D JS 0x0015c602 ADDSD XMM0,XMM0 ADDSD XMM0,qword ptr [0x001b75d8] MOVSD XMM1,qword ptr [RSP + 0x18] MULSD XMM1,qword ptr [0x001b7620] DIVSD XMM0,XMM1 MOV EAX,dword ptr [RSP + 0x8] XOR ECX,ECX LAB_0015c5e4: MOVSD XMM1,qword ptr [R13 + RCX*0x8] MULSD XMM1,XMM0 ADDSD XMM1,qword ptr [R12 + RCX*0x8] MOVSD qword ptr [RBX + RCX*0x8],XMM1 INC RCX CMP RAX,RCX JNZ 0x0015c5e4 LAB_0015c602: MOV EAX,R14D SUB EAX,EBP MOVSD XMM0,qword ptr [RBX] MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD qword ptr [R15],XMM0 LEA RDI,[R15 + 0x8] LEA R12,[RBX + 0x8] MOVSXD R13,EAX LEA RSI,[RBX + R13*0x8] ADD RSI,0x8 MOVSXD RBP,EBP LEA RDX,[RBP*0x8] CALL 0x00139ab0 LEA RDI,[R15 + RBP*0x8] ADD RDI,0x8 SHL R13,0x3 MOV RSI,R12 MOV RDX,R13 CALL 0x00139ab0 INC EBP MOV EAX,EBP CDQ IDIV R14D SUB R14D,EDX MOV R15,qword ptr [RSP + 0x20] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD qword ptr [R15],XMM0 LEA RDI,[R15 + 0x8] MOVSXD R14,R14D LEA RSI,[RBX + R14*0x8] ADD RSI,0x8 MOVSXD RBX,EDX LEA RDX,[RBX*0x8] CALL 0x00139ab0 LEA RDI,[R15 + RBX*0x8] ADD RDI,0x8 SHL R14,0x3 MOV RSI,R12 MOV RDX,R14 CALL 0x00139ab0 MOV RDI,qword ptr [RSP + 0x170] CALL 0x0013a0a0 JMP 0x0015c6d9 LAB_0015c6b0: LEA RDX,[RSP + 0x60] MOV qword ptr [RDX],R12 MOV dword ptr [RDX + 0x8],0x0 LEA RDI,[RSP + 0x30] MOV dword ptr [RDI],0x500 LEA RSI,[RSP + 0x10] MOV ECX,0x1 CALL 0x0013c1c0 LAB_0015c6d9: ADD RSP,0x178 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights(int, int, double*, double*, double*) */ void OpenSubdiv::v3_6_0::Far::LoopLimits<double>::ComputeInteriorPointWeights (int param_1,int param_2,double *param_3,double *param_4,double *param_5) { uint uVar1; double *pdVar2; ulong uVar3; int iVar4; double *pdVar5; double dVar6; int local_198; int local_194; double local_190; double *local_188; int4 local_17c; double *local_178; int4 local_170; double *local_168; int4 local_160; double *local_158; int4 local_150; double *local_148; uint local_140; uint local_13c; double local_138 [32]; double *local_38; local_198 = param_1; local_194 = param_1; if (param_4 == (double *)0x0 || param_5 == (double *)0x0) { local_140 = 0; local_178 = (double *)CONCAT44(local_178._4_4_,0x500); local_148 = param_3; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *)&local_178,&local_198,&local_148,1) ; } else { uVar1 = param_1 * 2 + 2; pdVar2 = local_138; local_13c = 0x20; local_38 = (double *)0x0; local_188 = param_5; local_140 = uVar1; if (0x20 < uVar1) { local_148 = pdVar2; pdVar2 = (double *)operator_new((ulong)uVar1 << 3); local_13c = uVar1; local_38 = pdVar2; } pdVar5 = pdVar2 + (int)(param_1 + 1U); local_170 = 0; local_150 = 0; local_160 = 0; local_17c = 0x500; /* try { // try from 0015c58f to 0015c59e has its CatchHandler @ 0015c6eb */ local_178 = param_3; local_168 = pdVar5; local_158 = pdVar2; local_148 = pdVar2; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: ComputeVertexLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *)&local_17c,&local_198); local_190 = (double)param_1; dVar6 = cos(DAT_001b75a8 / local_190); if (-1 < param_1) { uVar3 = 0; do { pdVar5[uVar3] = pdVar2[uVar3] * ((dVar6 + dVar6 + DAT_001b75d8) / (local_190 * DAT_001b7620)) + param_3[uVar3]; uVar3 = uVar3 + 1; } while (param_1 + 1U != uVar3); } dVar6 = *pdVar5; *param_4 = dVar6; memcpy(param_4 + 1,pdVar5 + (long)(param_1 - param_2) + 1,(long)param_2 * 8); memcpy(param_4 + (long)param_2 + 1,pdVar5 + 1,(long)(param_1 - param_2) << 3); pdVar2 = local_188; iVar4 = (param_2 + 1) % param_1; *local_188 = dVar6; memcpy(local_188 + 1,pdVar5 + (long)(param_1 - iVar4) + 1,(long)iVar4 * 8); memcpy(pdVar2 + (long)iVar4 + 1,pdVar5 + 1,(long)(param_1 - iVar4) << 3); operator_delete(local_38); } return; }
37,116
main
AlayaLite/build_O3/_deps/libcoro-src/examples/coro_tcp_echo_server.cpp
auto main() -> int { auto make_tcp_echo_server = [](std::shared_ptr<coro::io_scheduler> scheduler) -> coro::task<void> { auto make_on_connection_task = [](coro::net::tcp::client client) -> coro::task<void> { std::string buf(1024, '\0'); while (true) { // Wait for data to be available to read. co_await client.poll(coro::poll_op::read); auto [rstatus, rspan] = client.recv(buf); switch (rstatus) { case coro::net::recv_status::ok: // Make sure the client socket can be written to. co_await client.poll(coro::poll_op::write); client.send(std::span<const char>{rspan}); break; case coro::net::recv_status::would_block: break; case coro::net::recv_status::closed: default: co_return; } } }; co_await scheduler->schedule(); coro::net::tcp::server server{scheduler, coro::net::tcp::server::options{.port = 8888}}; while (true) { // Wait for a new connection. auto pstatus = co_await server.poll(); switch (pstatus) { case coro::poll_status::event: { auto client = server.accept(); if (client.socket().is_valid()) { scheduler->spawn(make_on_connection_task(std::move(client))); } // else report error or something if the socket was invalid or could not be accepted. } break; case coro::poll_status::error: case coro::poll_status::closed: case coro::poll_status::timeout: default: co_return; } } co_return; }; std::vector<coro::task<void>> workers{}; for (size_t i = 0; i < std::thread::hardware_concurrency(); ++i) { auto scheduler = coro::io_scheduler::make_shared(coro::io_scheduler::options{ .execution_strategy = coro::io_scheduler::execution_strategy_t::process_tasks_inline}); workers.push_back(make_tcp_echo_server(scheduler)); } coro::sync_wait(coro::when_all(std::move(workers))); }
O3
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movq $0x0, 0x20(%rsp) callq 0x3350 testl %eax, %eax je 0x3a08 leaq 0x78(%rsp), %rbx leaq 0xc0(%rsp), %r15 leaq 0xe0(%rsp), %r12 xorl %ebp, %ebp movl $0x0, 0x70(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) callq 0x3350 movl %eax, %ecx movl $0x1, %eax cmpl $0x2, %ecx jb 0x38b4 callq 0x3350 decl %eax movl %eax, 0xb8(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%r15) movups %xmm0, 0x20(%r15) movups %xmm0, 0x10(%r15) movups %xmm0, (%r15) movl $0x1, 0x100(%rsp) leaq 0x28(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x6658 movq 0xf0(%rsp), %rax testq %rax, %rax je 0x3905 movq %r12, %rdi movq %r12, %rsi movl $0x3, %edx callq *%rax movq 0xd0(%rsp), %rax testq %rax, %rax je 0x391f movq %r15, %rdi movq %r15, %rsi movl $0x3, %edx callq *%rax movq 0xa8(%rsp), %rax testq %rax, %rax je 0x393e leaq 0x98(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x88(%rsp), %rax testq %rax, %rax je 0x3958 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %r14 movq 0x30(%rsp), %r13 testq %r13, %r13 je 0x397e movq 0xb642(%rip), %rax # 0xefb0 cmpb $0x0, (%rax) je 0x3979 incl 0x8(%r13) jmp 0x397e lock incl 0x8(%r13) movl $0x110, %edi # imm = 0x110 callq 0x32a0 leaq 0x4bf(%rip), %rcx # 0x3e4e movq %rcx, (%rax) leaq 0x819(%rip), %rcx # 0x41b2 movq %rcx, 0x8(%rax) movq %r14, 0xf8(%rax) movq %r13, 0x100(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq %rax, 0x8(%rsp) movb $0x0, 0x108(%rax) leaq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x4edc movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x39da callq *0x8(%rdi) movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x39e9 callq 0x4bde incq %rbp callq 0x3350 movl %eax, %eax cmpq %rax, %rbp jb 0x3882 movaps 0x10(%rsp), %xmm0 movq 0x20(%rsp), %rax jmp 0x3a0d xorl %eax, %eax xorps %xmm0, %xmm0 leaq 0x50(%rsp), %rsi movaps %xmm0, (%rsi) movq %rax, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movq $0x0, 0x20(%rsp) leaq 0x28(%rsp), %rdi callq 0x440d leaq 0x28(%rsp), %rdi callq 0x4360 leaq 0x38(%rsp), %rdi callq 0x4e8a leaq 0x50(%rsp), %rdi callq 0x4554 leaq 0x10(%rsp), %rdi callq 0x4554 xorl %eax, %eax addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x4e8a jmp 0x3a82 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x4554 jmp 0x3ad8 jmp 0x3aea jmp 0x3aea jmp 0x3aea jmp 0x3aea jmp 0x3aea movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x42ea jmp 0x3ad8 movq %rax, %rbx testq %r13, %r13 je 0x3ac9 movq %r13, %rdi callq 0x4bde jmp 0x3ac9 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3ac9 callq *0x8(%rdi) movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x3ad8 callq 0x4bde leaq 0x10(%rsp), %rdi callq 0x4554 movq %rbx, %rdi callq 0x3430 movq %rax, %rdi callq 0x45a6
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h xorps xmm0, xmm0 movaps [rsp+138h+var_128], xmm0 mov [rsp+138h+var_118], 0 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) test eax, eax jz loc_3A08 lea rbx, [rsp+138h+var_C0] lea r15, [rsp+138h+var_78] lea r12, [rsp+138h+var_58] xor ebp, ebp loc_3882: mov [rsp+138h+var_C8], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov ecx, eax mov eax, 1 cmp ecx, 2 jb short loc_38B4 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) dec eax loc_38B4: mov [rsp+138h+var_80], eax xorps xmm0, xmm0 movups xmmword ptr [r15+30h], xmm0 movups xmmword ptr [r15+20h], xmm0 movups xmmword ptr [r15+10h], xmm0 movups xmmword ptr [r15], xmm0 mov [rsp+138h+var_38], 1 lea rdi, [rsp+138h+var_110] lea rsi, [rsp+138h+var_C8] call _ZN4coro12io_scheduler11make_sharedENS0_7optionsE; coro::io_scheduler::make_shared(coro::io_scheduler::options) mov rax, [rsp+138h+var_48] test rax, rax jz short loc_3905 mov rdi, r12 mov rsi, r12 mov edx, 3 call rax loc_3905: mov rax, [rsp+138h+var_68] test rax, rax jz short loc_391F mov rdi, r15 mov rsi, r15 mov edx, 3 call rax loc_391F: mov rax, [rsp+138h+var_90] test rax, rax jz short loc_393E lea rdi, [rsp+138h+var_A0] mov rsi, rdi mov edx, 3 call rax loc_393E: mov rax, [rsp+138h+var_B0] test rax, rax jz short loc_3958 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_3958: mov r14, [rsp+138h+var_110] mov r13, [rsp+138h+var_108] test r13, r13 jz short loc_397E mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_3979 inc dword ptr [r13+8] jmp short loc_397E loc_3979: lock inc dword ptr [r13+8] loc_397E: mov edi, 110h; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, _ZZ4mainENK3$_0clESt10shared_ptrIN4coro12io_schedulerEE_resume mov [rax], rcx lea rcx, _ZZ4mainENK3$_0clESt10shared_ptrIN4coro12io_schedulerEE_destroy mov [rax+8], rcx mov [rax+0F8h], r14 mov [rax+100h], r13 xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov [rsp+138h+var_130], rax mov byte ptr [rax+108h], 0 lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_130] call _ZNSt6vectorIN4coro4taskIvEESaIS2_EE12emplace_backIJS2_EEERS2_DpOT_; std::vector<coro::task<void>>::emplace_back<coro::task<void>>(coro::task<void> &&) mov rdi, [rsp+138h+var_130] test rdi, rdi jz short loc_39DA call qword ptr [rdi+8] loc_39DA: mov rdi, [rsp+138h+var_108]; this test rdi, rdi jz short loc_39E9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_39E9: inc rbp call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov eax, eax cmp rbp, rax jb loc_3882 movaps xmm0, [rsp+138h+var_128] mov rax, [rsp+138h+var_118] jmp short loc_3A0D loc_3A08: xor eax, eax xorps xmm0, xmm0 loc_3A0D: lea rsi, [rsp+138h+var_E8] movaps xmmword ptr [rsi], xmm0 mov [rsi+10h], rax xorps xmm0, xmm0 movaps [rsp+138h+var_128], xmm0 mov [rsp+138h+var_118], 0 lea rdi, [rsp+138h+var_110] call _ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_ lea rdi, [rsp+138h+var_110] call _ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_ lea rdi, [rsp+138h+var_100] call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EED2Ev; std::vector<coro::detail::when_all_task<void>>::~vector() lea rdi, [rsp+138h+var_E8] call _ZNSt6vectorIN4coro4taskIvEESaIS2_EED2Ev; std::vector<coro::task<void>>::~vector() lea rdi, [rsp+138h+var_128] call _ZNSt6vectorIN4coro4taskIvEESaIS2_EED2Ev; std::vector<coro::task<void>>::~vector() xor eax, eax add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+138h+var_100] call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EED2Ev; std::vector<coro::detail::when_all_task<void>>::~vector() jmp short loc_3A82 mov rbx, rax loc_3A82: lea rdi, [rsp+138h+var_E8] call _ZNSt6vectorIN4coro4taskIvEESaIS2_EED2Ev; std::vector<coro::task<void>>::~vector() jmp short loc_3AD8 jmp short loc_3AEA jmp short loc_3AEA jmp short loc_3AEA jmp short loc_3AEA jmp short loc_3AEA mov rbx, rax lea rdi, [rsp+138h+var_C8]; this call _ZN4coro12io_scheduler7optionsD2Ev; coro::io_scheduler::options::~options() jmp short loc_3AD8 mov rbx, rax test r13, r13 jz short loc_3AC9 mov rdi, r13 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_3AC9 mov rbx, rax mov rdi, [rsp+138h+var_130] test rdi, rdi jz short loc_3AC9 call qword ptr [rdi+8] loc_3AC9: mov rdi, [rsp+138h+var_108] test rdi, rdi jz short loc_3AD8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3AD8: lea rdi, [rsp+138h+var_128] call _ZNSt6vectorIN4coro4taskIvEESaIS2_EED2Ev; std::vector<coro::task<void>>::~vector() mov rdi, rbx call __Unwind_Resume loc_3AEA: mov rdi, rax call __clang_call_terminate
// local variable allocation has failed, the output may be wrong! int main(int argc, const char **argv, const char **envp) { unsigned long long v3; // rbp unsigned int v4; // ecx int v5; // eax long long v6; // r14 std::thread *v7; // r13 long long v8; // rax __int128 v9; // xmm0 long long v10; // rax int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d long long v16; // [rsp+8h] [rbp-130h] BYREF __int128 v17; // [rsp+10h] [rbp-128h] BYREF long long v18; // [rsp+20h] [rbp-118h] long long v19; // [rsp+28h] [rbp-110h] BYREF std::thread *v20; // [rsp+30h] [rbp-108h] _BYTE v21[24]; // [rsp+38h] [rbp-100h] BYREF __int128 v22; // [rsp+50h] [rbp-E8h] BYREF long long v23; // [rsp+60h] [rbp-D8h] int v24; // [rsp+70h] [rbp-C8h] BYREF __int128 v25; // [rsp+78h] [rbp-C0h] BYREF __int128 v26; // [rsp+88h] [rbp-B0h] __int128 v27; // [rsp+98h] [rbp-A0h] BYREF __int128 v28; // [rsp+A8h] [rbp-90h] int v29; // [rsp+B8h] [rbp-80h] __int128 v30; // [rsp+C0h] [rbp-78h] BYREF __int128 v31; // [rsp+D0h] [rbp-68h] __int128 v32; // [rsp+E0h] [rbp-58h] BYREF __int128 v33; // [rsp+F0h] [rbp-48h] int v34; // [rsp+100h] [rbp-38h] v17 = 0LL; v18 = 0LL; if ( (unsigned int)std::thread::hardware_concurrency(*(std::thread **)&argc) ) { v3 = 0LL; do { v24 = 0; v28 = 0LL; v27 = 0LL; v26 = 0LL; v25 = 0LL; v4 = std::thread::hardware_concurrency(*(std::thread **)&argc); v5 = 1; if ( v4 >= 2 ) v5 = std::thread::hardware_concurrency(*(std::thread **)&argc) - 1; v29 = v5; v33 = 0LL; v32 = 0LL; v31 = 0LL; v30 = 0LL; v34 = 1; coro::io_scheduler::make_shared(&v19, &v24); if ( (_QWORD)v33 ) ((void ( *)(__int128 *, __int128 *, long long))v33)(&v32, &v32, 3LL); if ( (_QWORD)v31 ) ((void ( *)(__int128 *, __int128 *, long long))v31)(&v30, &v30, 3LL); if ( (_QWORD)v28 ) ((void ( *)(__int128 *, __int128 *, long long))v28)(&v27, &v27, 3LL); if ( (_QWORD)v26 ) ((void ( *)(__int128 *, __int128 *, long long))v26)(&v25, &v25, 3LL); v6 = v19; v7 = v20; if ( v20 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v20 + 2); else _InterlockedIncrement((volatile signed __int32 *)v20 + 2); } v8 = operator new(0x110uLL); *(_QWORD *)v8 = main::$_0::operator(); *(_QWORD *)(v8 + 8) = main::$_0::operator(); *(_QWORD *)(v8 + 248) = v6; *(_QWORD *)(v8 + 256) = v7; *(_OWORD *)(v8 + 16) = 0LL; v16 = v8; *(_BYTE *)(v8 + 264) = 0; std::vector<coro::task<void>>::emplace_back<coro::task<void>>(&v17, &v16); if ( v16 ) (*(void (**)(void))(v16 + 8))(); *(_QWORD *)&argc = v20; if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); ++v3; } while ( v3 < (unsigned int)std::thread::hardware_concurrency(*(std::thread **)&argc) ); v9 = v17; v10 = v18; } else { v10 = 0LL; v9 = 0LL; } v22 = v9; v23 = v10; v17 = 0LL; v18 = 0LL; ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_(&v19); ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_( (unsigned int)&v19, (unsigned int)&v22, v11, v12, v13, v14); std::vector<coro::detail::when_all_task<void>>::~vector(v21); std::vector<coro::task<void>>::~vector(&v22); std::vector<coro::task<void>>::~vector(&v17); return 0; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],0x0 CALL 0x00103350 TEST EAX,EAX JZ 0x00103a08 LEA RBX,[RSP + 0x78] LEA R15,[RSP + 0xc0] LEA R12,[RSP + 0xe0] XOR EBP,EBP LAB_00103882: MOV dword ptr [RSP + 0x70],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 CALL 0x00103350 MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x2 JC 0x001038b4 CALL 0x00103350 DEC EAX LAB_001038b4: MOV dword ptr [RSP + 0xb8],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 MOVUPS xmmword ptr [R15 + 0x10],XMM0 MOVUPS xmmword ptr [R15],XMM0 MOV dword ptr [RSP + 0x100],0x1 LAB_001038dc: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x70] CALL 0x00106658 MOV RAX,qword ptr [RSP + 0xf0] TEST RAX,RAX JZ 0x00103905 LAB_001038f8: MOV RDI,R12 MOV RSI,R12 MOV EDX,0x3 CALL RAX LAB_00103905: MOV RAX,qword ptr [RSP + 0xd0] TEST RAX,RAX JZ 0x0010391f LAB_00103912: MOV RDI,R15 MOV RSI,R15 MOV EDX,0x3 CALL RAX LAB_0010391f: MOV RAX,qword ptr [RSP + 0xa8] TEST RAX,RAX JZ 0x0010393e LAB_0010392c: LEA RDI,[RSP + 0x98] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0010393e: MOV RAX,qword ptr [RSP + 0x88] TEST RAX,RAX JZ 0x00103958 LAB_0010394b: MOV RDI,RBX MOV RSI,RBX MOV EDX,0x3 CALL RAX LAB_00103958: MOV R14,qword ptr [RSP + 0x28] MOV R13,qword ptr [RSP + 0x30] TEST R13,R13 JZ 0x0010397e MOV RAX,qword ptr [0x0010efb0] CMP byte ptr [RAX],0x0 JZ 0x00103979 INC dword ptr [R13 + 0x8] JMP 0x0010397e LAB_00103979: INC.LOCK dword ptr [R13 + 0x8] LAB_0010397e: MOV EDI,0x110 CALL 0x001032a0 LEA RCX,[0x103e4e] MOV qword ptr [RAX],RCX LEA RCX,[0x1041b2] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0xf8],R14 MOV qword ptr [RAX + 0x100],R13 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RSP + 0x8],RAX MOV byte ptr [RAX + 0x108],0x0 LAB_001039be: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x8] CALL 0x00104edc MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001039da LAB_001039d7: CALL qword ptr [RDI + 0x8] LAB_001039da: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x001039e9 CALL 0x00104bde LAB_001039e9: INC RBP CALL 0x00103350 MOV EAX,EAX CMP RBP,RAX JC 0x00103882 MOVAPS XMM0,xmmword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x20] JMP 0x00103a0d LAB_00103a08: XOR EAX,EAX XORPS XMM0,XMM0 LAB_00103a0d: LEA RSI,[RSP + 0x50] MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],0x0 LAB_00103a2a: LEA RDI,[RSP + 0x28] CALL 0x0010440d LAB_00103a34: LEA RDI,[RSP + 0x28] CALL 0x00104360 LEA RDI,[RSP + 0x38] CALL 0x00104e8a LEA RDI,[RSP + 0x50] CALL 0x00104554 LEA RDI,[RSP + 0x10] CALL 0x00104554 XOR EAX,EAX ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 main(void) { int8 uVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2; int iVar3; uint uVar4; ulong uVar5; int8 *local_130; int8 local_128; int8 uStack_120; int8 local_118; int8 local_110; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_108; vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>> local_100 [24]; int4 local_e8; int4 uStack_e4; int4 uStack_e0; int4 uStack_dc; int8 local_d8; int4 local_c8 [2]; int8 local_c0; int8 uStack_b8; code *local_b0; int8 uStack_a8; int8 local_a0; int8 uStack_98; code *local_90; int8 uStack_88; int local_80; int8 local_78; int8 uStack_70; code *local_68; int8 uStack_60; int8 local_58; int8 uStack_50; code *local_48; int8 uStack_40; int4 local_38; local_128 = 0; uStack_120 = 0; local_118 = 0; iVar3 = std::thread::hardware_concurrency(); if (iVar3 == 0) { local_d8 = 0; local_e8 = 0; uStack_e4 = 0; uStack_e0 = 0; uStack_dc = 0; } else { uVar5 = 0; do { local_c8[0] = 0; local_90 = (code *)0x0; uStack_88 = 0; local_a0 = 0; uStack_98 = 0; local_b0 = (code *)0x0; uStack_a8 = 0; local_c0 = 0; uStack_b8 = 0; uVar4 = std::thread::hardware_concurrency(); iVar3 = 1; if (1 < uVar4) { iVar3 = std::thread::hardware_concurrency(); iVar3 = iVar3 + -1; } local_48 = (code *)0x0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = (code *)0x0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_38 = 1; /* try { // try from 001038dc to 001038ea has its CatchHandler @ 00103a98 */ local_80 = iVar3; coro::io_scheduler::make_shared((io_scheduler *)&local_110,local_c8); if (local_48 != (code *)0x0) { /* try { // try from 001038f8 to 00103904 has its CatchHandler @ 00103a94 */ (*local_48)(&local_58,&local_58,3); } if (local_68 != (code *)0x0) { /* try { // try from 00103912 to 0010391e has its CatchHandler @ 00103a96 */ (*local_68)(&local_78,&local_78,3); } if (local_90 != (code *)0x0) { /* try { // try from 0010392c to 0010393d has its CatchHandler @ 00103a90 */ (*local_90)(&local_a0,&local_a0,3); } if (local_b0 != (code *)0x0) { /* try { // try from 0010394b to 00103957 has its CatchHandler @ 00103a92 */ (*local_b0)(&local_c0,&local_c0,3); } p_Var2 = local_108; uVar1 = local_110; if (local_108 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0010efb0 == '\0') { LOCK(); *(int *)(local_108 + 8) = *(int *)(local_108 + 8) + 1; UNLOCK(); } else { *(int *)(local_108 + 8) = *(int *)(local_108 + 8) + 1; } } /* try { // try from 0010397e to 00103987 has its CatchHandler @ 00103aa7 */ local_130 = (int8 *)operator_new(0x110); *local_130 = main::$_0::operator(); local_130[1] = main::$_0::operator(); local_130[0x1f] = uVar1; local_130[0x20] = p_Var2; local_130[2] = 0; local_130[3] = 0; *(int1 *)(local_130 + 0x21) = 0; /* try { // try from 001039be to 001039cc has its CatchHandler @ 00103ab9 */ std::vector<coro::task<void>,std::allocator<coro::task<void>>>::emplace_back<coro::task<void>> ((vector<coro::task<void>,std::allocator<coro::task<void>>> *)&local_128, (task *)&local_130); if (local_130 != (int8 *)0x0) { /* try { // try from 001039d7 to 001039d9 has its CatchHandler @ 00103a8e */ (*(code *)local_130[1])(); } if (local_108 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_108); } uVar5 = uVar5 + 1; uVar4 = std::thread::hardware_concurrency(); } while (uVar5 < uVar4); local_d8 = local_118; local_e8 = (int4)local_128; uStack_e4 = local_128._4_4_; uStack_e0 = (int4)uStack_120; uStack_dc = uStack_120._4_4_; } local_128 = 0; uStack_120 = 0; local_118 = 0; /* try { // try from 00103a2a to 00103a33 has its CatchHandler @ 00103a7f */ _ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_ (&local_110); /* try { // try from 00103a34 to 00103a3d has its CatchHandler @ 00103a70 */ _ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt6vectorINS2_13when_all_taskIvEESaIS6_EEEEOS8_EEDcOT_ (&local_110); std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>:: ~vector(local_100); std::vector<coro::task<void>,std::allocator<coro::task<void>>>::~vector ((vector<coro::task<void>,std::allocator<coro::task<void>>> *)&local_e8); std::vector<coro::task<void>,std::allocator<coro::task<void>>>::~vector ((vector<coro::task<void>,std::allocator<coro::task<void>>> *)&local_128); return 0; }
37,117
Catch::UnaryExpr<Circle*&>::streamReconstructedExpression(std::ostream&) const
11AgReS1SoR11[P]Graph/build_O3/_deps/catch2-src/src/catch2/../catch2/internal/catch_decomposer.hpp
void streamReconstructedExpression( std::ostream &os ) const override { os << Catch::Detail::stringify( m_lhs ); }
O3
cpp
Catch::UnaryExpr<Circle*&>::streamReconstructedExpression(std::ostream&) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq 0x10(%rdi), %rax movq (%rax), %rsi leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x292e2 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x15590 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2929c movq 0x18(%rsp), %rsi incq %rsi callq 0x154d0 addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x292c2 movq 0x18(%rsp), %rsi incq %rsi callq 0x154d0 movq %rbx, %rdi callq 0x158e0
_ZNK5Catch9UnaryExprIRP8DotCloudE29streamReconstructedExpressionERSo: push r14 push rbx sub rsp, 28h mov rbx, rsi mov rax, [rdi+10h] mov rsi, [rax] lea r14, [rsp+38h+var_30] mov rdi, r14 call _ZN5Catch11StringMakerIP8DotCloudvE7convertIS1_EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_; Catch::StringMaker<DotCloud *,void>::convert<DotCloud>(DotCloud *) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2929C mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2929C: add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_292C2 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_292C2: mov rdi, rbx call __Unwind_Resume
void Catch::UnaryExpr<DotCloud *&>::streamReconstructedExpression(long long a1, long long a2) { void *v2[2]; // [rsp+8h] [rbp-30h] BYREF long long v3; // [rsp+18h] [rbp-20h] BYREF Catch::StringMaker<DotCloud *,void>::convert<DotCloud>(v2, **(_QWORD **)(a1 + 16)); std::__ostream_insert<char,std::char_traits<char>>(a2, v2[0], v2[1]); if ( v2[0] != &v3 ) operator delete(v2[0], v3 + 1); }
streamReconstructedExpression: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV RAX,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RAX] LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001292e2 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_00129279: MOV RDI,RBX CALL 0x00115590 LAB_00129281: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012929c MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001154d0 LAB_0012929c: ADD RSP,0x28 POP RBX POP R14 RET
/* Catch::UnaryExpr<DotCloud*&>::streamReconstructedExpression(std::ostream&) const */ void __thiscall Catch::UnaryExpr<DotCloud*&>::streamReconstructedExpression (UnaryExpr<DotCloud*&> *this,ostream *param_1) { long *local_30; long local_28; long local_20 [2]; StringMaker<DotCloud*,void>::convert<DotCloud> ((StringMaker<DotCloud*,void> *)&local_30,(DotCloud *)**(int8 **)(this + 0x10)); /* try { // try from 00129279 to 00129280 has its CatchHandler @ 001292a4 */ std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_30,local_28); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } return; }
37,118
verify_eth_local
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_local.c
bool verify_eth_local(verify_ctx_t* ctx) { if (strcmp(ctx->method, "eth_chainId") == 0) ctx->data = eth_chainId(ctx); else if (strcmp(ctx->method, "eth_accounts") == 0) ctx->data = eth_accounts(ctx); else if (strcmp(ctx->method, "eth_getUncleByBlockHashAndIndex") == 0) ctx->data = eth_getUncleByBlockHashAndIndex(ctx); else if (strcmp(ctx->method, "eth_getUncleByBlockNumberAndIndex") == 0) ctx->data = eth_getUncleByBlockNumberAndIndex(ctx); else if (strcmp(ctx->method, "eth_getUncleCountByBlockNumber") == 0) ctx->data = eth_getUncleCountByBlockNumber(ctx); else if (strcmp(ctx->method, "eth_getUncleCountByBlockHash") == 0) ctx->data = eth_getUncleCountByBlockHash(ctx); else if (strcmp(ctx->method, "eth_protocolVersion") == 0) ctx->data = eth_protocolVersion(ctx); else if (strcmp(ctx->method, "web3_clientVersion") == 0) ctx->data = web3_clientVersion(ctx); else if (strcmp(ctx->method, "web3_sha3") == 0) ctx->data = web3_sha3(ctx); else RETURN_VERIFY_ERROR(ctx, "unknown local method"); ctx->success = true; if (ctx->data.bytes.data) ctx->flags |= VERIFY_FLAG_FREE_DATA; return true; }
O1
c
verify_eth_local: pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq (%rdi), %r14 leaq 0x5a532(%rip), %rsi # 0x8589e movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b45c leaq 0x5a527(%rip), %rsi # 0x858aa movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b444 leaq 0x5a54e(%rip), %rsi # 0x858e8 movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b444 leaq 0x5a557(%rip), %rsi # 0x85908 movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b444 leaq 0x5a709(%rip), %rsi # 0x85ad1 movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b444 leaq 0x5a6d9(%rip), %rsi # 0x85ab4 movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b444 leaq 0x5a4c9(%rip), %rsi # 0x858b7 movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b4a9 leaq 0x5a4c6(%rip), %rsi # 0x858cb movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b4bd leaq 0x5a4c2(%rip), %rsi # 0x858de movq %r14, %rdi callq 0x223d0 testl %eax, %eax je 0x2b4e9 leaq 0x70(%rbx), %rdi leaq 0x5b47a(%rip), %rsi # 0x868b1 callq 0x5cf4d movb $0x0, 0x68(%rbx) xorl %eax, %eax jmp 0x2b4a1 movl $0x0, 0x38(%rbx) movq $0x0, 0x40(%rbx) leaq 0x867b6(%rip), %rax # 0xb1c10 jmp 0x2b489 movl $0x8, %edi callq 0x22420 movq %rax, %r14 movl 0x80(%rbx), %esi movq %rax, %rdi callq 0x56fae movl $0x8, 0x38(%rbx) movq %r14, 0x40(%rbx) leaq 0x9977f(%rip), %rax # 0xc4c08 movq %rax, 0x48(%rbx) movb $0x1, 0x68(%rbx) movb $0x1, %al cmpq $0x0, 0x40(%rbx) je 0x2b4a1 orb $0x1, 0x84(%rbx) addq $0x18, %rsp popq %rbx popq %r14 retq movl $0x8, %edi callq 0x22420 movq %rax, %r14 movl $0x41, %esi jmp 0x2b46f movl $0x11, %edi callq 0x22420 movups 0x5b3f8(%rip), %xmm0 # 0x868c6 movups %xmm0, (%rax) movb $0x31, 0x10(%rax) movl $0x11, 0x38(%rbx) movq %rax, 0x40(%rbx) leaq 0x997c1(%rip), %rax # 0xc4ca8 jmp 0x2b489 movq %rsp, %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x2b509 movq 0x10(%r14), %rax movq %rax, 0x48(%rbx) movups (%r14), %xmm0 movups %xmm0, 0x38(%rbx) jmp 0x2b48d
verify_eth_local: push r14 push rbx sub rsp, 18h mov rbx, rdi mov r14, [rdi] lea rsi, aEthChainid; "eth_chainId" mov rdi, r14 call _strcmp test eax, eax jz loc_2B45C lea rsi, aEthAccounts; "eth_accounts" mov rdi, r14 call _strcmp test eax, eax jz loc_2B444 lea rsi, aEthGetunclebyb; "eth_getUncleByBlockHashAndIndex" mov rdi, r14 call _strcmp test eax, eax jz loc_2B444 lea rsi, aEthGetunclebyb_0; "eth_getUncleByBlockNumberAndIndex" mov rdi, r14 call _strcmp test eax, eax jz loc_2B444 lea rsi, aEthGetunclecou; "eth_getUncleCountByBlockNumber" mov rdi, r14 call _strcmp test eax, eax jz short loc_2B444 lea rsi, aEthGetunclecou_0; "eth_getUncleCountByBlockHash" mov rdi, r14 call _strcmp test eax, eax jz short loc_2B444 lea rsi, aEthProtocolver; "eth_protocolVersion" mov rdi, r14 call _strcmp test eax, eax jz loc_2B4A9 lea rsi, aWeb3Clientvers; "web3_clientVersion" mov rdi, r14 call _strcmp test eax, eax jz loc_2B4BD lea rsi, aWeb3Sha3; "web3_sha3" mov rdi, r14 call _strcmp test eax, eax jz loc_2B4E9 lea rdi, [rbx+70h] lea rsi, aUnknownLocalMe; "unknown local method" call c4_state_add_error mov byte ptr [rbx+68h], 0 xor eax, eax jmp short loc_2B4A1 loc_2B444: mov dword ptr [rbx+38h], 0 mov qword ptr [rbx+40h], 0 lea rax, eth_accounts_def jmp short loc_2B489 loc_2B45C: mov edi, 8 call _malloc mov r14, rax mov esi, [rbx+80h] loc_2B46F: mov rdi, rax call uint64_to_le mov dword ptr [rbx+38h], 8 mov [rbx+40h], r14 lea rax, ssz_uint64_def loc_2B489: mov [rbx+48h], rax loc_2B48D: mov byte ptr [rbx+68h], 1 mov al, 1 cmp qword ptr [rbx+40h], 0 jz short loc_2B4A1 or byte ptr [rbx+84h], 1 loc_2B4A1: add rsp, 18h pop rbx pop r14 retn loc_2B4A9: mov edi, 8 call _malloc mov r14, rax mov esi, 41h ; 'A' jmp short loc_2B46F loc_2B4BD: mov edi, 11h call _malloc movups xmm0, cs:xmmword_868C6 movups xmmword ptr [rax], xmm0 mov byte ptr [rax+10h], 31h ; '1' mov dword ptr [rbx+38h], 11h mov [rbx+40h], rax lea rax, ssz_string_def jmp short loc_2B489 loc_2B4E9: mov r14, rsp mov rdi, r14 mov rsi, rbx call web3_sha3 mov rax, [r14+10h] mov [rbx+48h], rax movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx+38h], xmm0 jmp short loc_2B48D
char verify_eth_local(long long *a1, long long a2, long long a3) { long long v3; // r14 long long v4; // rdx long long v5; // rdx long long v6; // rdx long long v7; // rdx long long v8; // rdx long long v9; // rdx long long v10; // rdx long long v11; // rdx char result; // al _UNKNOWN **v13; // rax long long v14; // rax long long v15; // r14 long long v16; // rsi void *v17; // rax __int128 v18; // [rsp+0h] [rbp-28h] BYREF long long v19; // [rsp+10h] [rbp-18h] v3 = *a1; if ( !(unsigned int)strcmp(*a1, "eth_chainId", a3) ) { v14 = malloc(8LL); v15 = v14; v16 = *((unsigned int *)a1 + 32); LABEL_13: uint64_to_le(v14, v16); *((_DWORD *)a1 + 14) = 8; a1[8] = v15; v13 = &ssz_uint64_def; goto LABEL_14; } if ( !(unsigned int)strcmp(v3, "eth_accounts", v4) || !(unsigned int)strcmp(v3, "eth_getUncleByBlockHashAndIndex", v5) || !(unsigned int)strcmp(v3, "eth_getUncleByBlockNumberAndIndex", v6) || !(unsigned int)strcmp(v3, "eth_getUncleCountByBlockNumber", v7) || !(unsigned int)strcmp(v3, "eth_getUncleCountByBlockHash", v8) ) { *((_DWORD *)a1 + 14) = 0; a1[8] = 0LL; v13 = &eth_accounts_def; LABEL_14: a1[9] = (long long)v13; goto LABEL_15; } if ( !(unsigned int)strcmp(v3, "eth_protocolVersion", v9) ) { v14 = malloc(8LL); v15 = v14; v16 = 65LL; goto LABEL_13; } if ( !(unsigned int)strcmp(v3, "web3_clientVersion", v10) ) { v17 = (void *)malloc(17LL); qmemcpy(v17, "C4/v1.0.0-alpha.1", 17); *((_DWORD *)a1 + 14) = 17; a1[8] = (long long)v17; v13 = &ssz_string_def; goto LABEL_14; } if ( (unsigned int)strcmp(v3, "web3_sha3", v11) ) { c4_state_add_error(a1 + 14, "unknown local method"); *((_BYTE *)a1 + 104) = 0; return 0; } web3_sha3(&v18, a1); a1[9] = v19; *(_OWORD *)(a1 + 7) = v18; LABEL_15: *((_BYTE *)a1 + 104) = 1; result = 1; if ( a1[8] ) *((_BYTE *)a1 + 132) |= 1u; return result; }
verify_eth_local: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R14,qword ptr [RDI] LEA RSI,[0x18589e] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b45c LEA RSI,[0x1858aa] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b444 LEA RSI,[0x1858e8] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b444 LEA RSI,[0x185908] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b444 LEA RSI,[0x185ad1] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b444 LEA RSI,[0x185ab4] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b444 LEA RSI,[0x1858b7] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b4a9 LEA RSI,[0x1858cb] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b4bd LEA RSI,[0x1858de] MOV RDI,R14 CALL 0x001223d0 TEST EAX,EAX JZ 0x0012b4e9 LEA RDI,[RBX + 0x70] LEA RSI,[0x1868b1] CALL 0x0015cf4d MOV byte ptr [RBX + 0x68],0x0 XOR EAX,EAX JMP 0x0012b4a1 LAB_0012b444: MOV dword ptr [RBX + 0x38],0x0 MOV qword ptr [RBX + 0x40],0x0 LEA RAX,[0x1b1c10] JMP 0x0012b489 LAB_0012b45c: MOV EDI,0x8 CALL 0x00122420 MOV R14,RAX MOV ESI,dword ptr [RBX + 0x80] LAB_0012b46f: MOV RDI,RAX CALL 0x00156fae MOV dword ptr [RBX + 0x38],0x8 MOV qword ptr [RBX + 0x40],R14 LEA RAX,[0x1c4c08] LAB_0012b489: MOV qword ptr [RBX + 0x48],RAX LAB_0012b48d: MOV byte ptr [RBX + 0x68],0x1 MOV AL,0x1 CMP qword ptr [RBX + 0x40],0x0 JZ 0x0012b4a1 OR byte ptr [RBX + 0x84],0x1 LAB_0012b4a1: ADD RSP,0x18 POP RBX POP R14 RET LAB_0012b4a9: MOV EDI,0x8 CALL 0x00122420 MOV R14,RAX MOV ESI,0x41 JMP 0x0012b46f LAB_0012b4bd: MOV EDI,0x11 CALL 0x00122420 MOVUPS XMM0,xmmword ptr [0x001868c6] MOVUPS xmmword ptr [RAX],XMM0 MOV byte ptr [RAX + 0x10],0x31 MOV dword ptr [RBX + 0x38],0x11 MOV qword ptr [RBX + 0x40],RAX LEA RAX,[0x1c4ca8] JMP 0x0012b489 LAB_0012b4e9: MOV R14,RSP MOV RDI,R14 MOV RSI,RBX CALL 0x0012b509 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RBX + 0x48],RAX MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX + 0x38],XMM0 JMP 0x0012b48d
int8 verify_eth_local(int8 *param_1) { int8 uVar1; int iVar2; void *pvVar3; char *pcVar4; int1 *puVar5; int4 uVar6; int8 local_28; int8 uStack_20; int8 local_18; pcVar4 = (char *)*param_1; iVar2 = strcmp(pcVar4,"eth_chainId"); if (iVar2 == 0) { pvVar3 = malloc(8); uVar6 = *(int4 *)(param_1 + 0x10); LAB_0012b46f: uint64_to_le(pvVar3,uVar6); *(int4 *)(param_1 + 7) = 8; param_1[8] = pvVar3; puVar5 = ssz_uint64_def; } else { iVar2 = strcmp(pcVar4,"eth_accounts"); if ((((iVar2 == 0) || (iVar2 = strcmp(pcVar4,"eth_getUncleByBlockHashAndIndex"), iVar2 == 0)) || (iVar2 = strcmp(pcVar4,"eth_getUncleByBlockNumberAndIndex"), iVar2 == 0)) || ((iVar2 = strcmp(pcVar4,"eth_getUncleCountByBlockNumber"), iVar2 == 0 || (iVar2 = strcmp(pcVar4,"eth_getUncleCountByBlockHash"), iVar2 == 0)))) { *(int4 *)(param_1 + 7) = 0; param_1[8] = 0; puVar5 = eth_accounts_def; } else { iVar2 = strcmp(pcVar4,"eth_protocolVersion"); if (iVar2 == 0) { pvVar3 = malloc(8); uVar6 = 0x41; goto LAB_0012b46f; } iVar2 = strcmp(pcVar4,"web3_clientVersion"); if (iVar2 != 0) { iVar2 = strcmp(pcVar4,"web3_sha3"); if (iVar2 != 0) { c4_state_add_error(param_1 + 0xe,"unknown local method"); *(int1 *)(param_1 + 0xd) = 0; return 0; } web3_sha3(&local_28,param_1); param_1[9] = local_18; param_1[7] = local_28; param_1[8] = uStack_20; goto LAB_0012b48d; } pcVar4 = (char *)malloc(0x11); uVar1 = s_C4_v1_0_0_alpha_1_001868c6._8_8_; *(int8 *)pcVar4 = s_C4_v1_0_0_alpha_1_001868c6._0_8_; *(int8 *)(pcVar4 + 8) = uVar1; pcVar4[0x10] = '1'; *(int4 *)(param_1 + 7) = 0x11; param_1[8] = pcVar4; puVar5 = ssz_string_def; } } param_1[9] = puVar5; LAB_0012b48d: *(int1 *)(param_1 + 0xd) = 1; if (param_1[8] != 0) { *(byte *)((long)param_1 + 0x84) = *(byte *)((long)param_1 + 0x84) | 1; } return 1; }
37,119
free_block
eloqsql/mysys/mf_keycache.c
static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block %u to be freed, hash_link %p status: %u", BLOCK_NUMBER(block), block->hash_link, block->status)); /* Assert that the block is not free already. And that it is in a clean state. Note that the block might just be assigned to a hash_link and not yet read (BLOCK_READ may not be set here). In this case a reader is registered in the hash_link and free_block() will wait for it below. */ DBUG_ASSERT((block->status & BLOCK_IN_USE) && !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | BLOCK_REASSIGNED | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_FOR_UPDATE))); /* Assert that the block is in a file_blocks chain. */ DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); /* Assert that the block is not in the LRU ring. */ DBUG_ASSERT(!block->next_used && !block->prev_used); /* IMHO the below condition (if()) makes no sense. I can't see how it could be possible that free_block() is entered with a NULL hash_link pointer. The only place where it can become NULL is in free_block() (or before its first use ever, but for those blocks free_block() is not called). I don't remove the conditional as it cannot harm, but place an DBUG_ASSERT to confirm my hypothesis. Eventually the condition (if()) can be removed. */ DBUG_ASSERT(block->hash_link && block->hash_link->block == block); if (block->hash_link) { /* While waiting for readers to finish, new readers might request the block. But since we set block->status|= BLOCK_REASSIGNED, they will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled later. */ block->status|= BLOCK_REASSIGNED; wait_for_readers(keycache, block); /* The block must not have been freed by another thread. Repeat some checks. An additional requirement is that it must be read now (BLOCK_READ). */ DBUG_ASSERT(block->hash_link && block->hash_link->block == block); DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE | BLOCK_REASSIGNED)) && !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_FOR_UPDATE))); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->prev_used); /* Unset BLOCK_REASSIGNED again. If we hand the block to an evicting thread (through unreg_request() below), other threads must not see this flag. They could become confused. */ block->status&= ~BLOCK_REASSIGNED; /* Do not release the hash_link until the block is off all lists. At least not if we hand it over for eviction in unreg_request(). */ } /* Unregister the block request and link the block into the LRU ring. This enables eviction for the block. If the LRU ring was empty and threads are waiting for a block, then the block wil be handed over for eviction immediately. Otherwise we will unlink it from the LRU ring again, without releasing the lock in between. So decrementing the request counter and updating statistics are the only relevant operation in this case. Assert that there are no other requests registered. */ DBUG_ASSERT(block->requests == 1); unreg_request(keycache, block, 0); /* Note that even without releasing the cache lock it is possible that the block is immediately selected for eviction by link_block() and thus not added to the LRU ring. In this case we must not touch the block any more. */ if (block->status & BLOCK_IN_EVICTION) return; /* Error blocks are not put into the LRU ring. */ if (!(block->status & BLOCK_ERROR)) { /* Here the block must be in the LRU ring. Unlink it again. */ DBUG_ASSERT(block->next_used && block->prev_used && *block->prev_used == block); unlink_block(keycache, block); } if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_COLD; /* Remove from file_blocks hash. */ unlink_changed(block); /* Remove reference to block from hash table. */ unlink_hash(keycache, block->hash_link); block->hash_link= NULL; block->status= 0; block->length= 0; block->offset= keycache->key_cache_block_size; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block is freed")); /* Enforced by unlink_changed(), but just to be sure. */ DBUG_ASSERT(!block->next_changed && !block->prev_changed); /* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */ DBUG_ASSERT(!block->next_used && !block->prev_used); /* Insert the free block in the free list. */ block->next_used= keycache->free_block_list; keycache->free_block_list= block; /* Keep track of the number of currently unused blocks. */ keycache->blocks_unused++; /* All pending requests for this page must be resubmitted. */ release_whole_queue(&block->wqueue[COND_FOR_SAVED]); }
O0
c
free_block: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe5d12 jmp 0xe5d14 jmp 0xe5d16 jmp 0xe5d18 jmp 0xe5d1a jmp 0xe5d1c jmp 0xe5d1e jmp 0xe5d20 jmp 0xe5d22 movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0xe5d62 movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx orl $0x8, %ecx movl %ecx, 0x50(%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe6e00 jmp 0xe5d49 jmp 0xe5d4b jmp 0xe5d4d jmp 0xe5d4f jmp 0xe5d51 jmp 0xe5d53 jmp 0xe5d55 movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx andl $-0x9, %ecx movl %ecx, 0x50(%rax) jmp 0xe5d64 jmp 0xe5d66 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %edx, %edx callq 0xe5b70 movq -0x10(%rbp), %rax movl 0x50(%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xe5d8b jmp 0xe5e66 movq -0x10(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe5dab jmp 0xe5d9c jmp 0xe5d9e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe7030 movq -0x10(%rbp), %rax cmpl $0x1, 0x54(%rax) jne 0xe5dc5 movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x54(%rax) movq -0x10(%rbp), %rdi callq 0xe6ea0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rsi callq 0xe6a00 movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x4c(%rax) movq -0x8(%rbp), %rax movl 0x18(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x48(%rax) jmp 0xe5e1c jmp 0xe5e1e jmp 0xe5e20 jmp 0xe5e22 jmp 0xe5e24 movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x8(%rbp), %rax movq 0x58(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x58(%rax) movq -0x10(%rbp), %rdi addq $0x28, %rdi addq $0x8, %rdi callq 0xe6d70 addq $0x10, %rsp popq %rbp retq nopl (%rax)
free_block_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E5D12: jmp short $+2 loc_E5D14: jmp short $+2 loc_E5D16: jmp short $+2 loc_E5D18: jmp short $+2 loc_E5D1A: jmp short $+2 loc_E5D1C: jmp short $+2 loc_E5D1E: jmp short $+2 loc_E5D20: jmp short $+2 loc_E5D22: mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jz short loc_E5D62 mov rax, [rbp+var_10] mov ecx, [rax+50h] or ecx, 8 mov [rax+50h], ecx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call wait_for_readers_0 jmp short $+2 loc_E5D49: jmp short $+2 loc_E5D4B: jmp short $+2 loc_E5D4D: jmp short $+2 loc_E5D4F: jmp short $+2 loc_E5D51: jmp short $+2 loc_E5D53: jmp short $+2 loc_E5D55: mov rax, [rbp+var_10] mov ecx, [rax+50h] and ecx, 0FFFFFFF7h mov [rax+50h], ecx loc_E5D62: jmp short $+2 loc_E5D64: jmp short $+2 loc_E5D66: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor edx, edx call unreg_request_0 mov rax, [rbp+var_10] mov eax, [rax+50h] and eax, 80h cmp eax, 0 jz short loc_E5D8B jmp loc_E5E66 loc_E5D8B: mov rax, [rbp+var_10] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz short loc_E5DAB jmp short $+2 loc_E5D9C: jmp short $+2 loc_E5D9E: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call unlink_block_0 loc_E5DAB: mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 1 jnz short loc_E5DC5 mov rax, [rbp+var_8] mov rcx, [rax+68h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+68h], rcx loc_E5DC5: mov rax, [rbp+var_10] mov dword ptr [rax+54h], 0 mov rdi, [rbp+var_10] call unlink_changed_0 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov rsi, [rax+20h] call unlink_hash_0 mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+4Ch], 0 mov rax, [rbp+var_8] mov ecx, [rax+18h] mov rax, [rbp+var_10] mov [rax+48h], ecx jmp short $+2 loc_E5E1C: jmp short $+2 loc_E5E1E: jmp short $+2 loc_E5E20: jmp short $+2 loc_E5E22: jmp short $+2 loc_E5E24: mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+98h], rcx mov rax, [rbp+var_8] mov rcx, [rax+58h] add rcx, 1 mov [rax+58h], rcx mov rdi, [rbp+var_10] add rdi, 28h ; '(' add rdi, 8 call release_whole_queue loc_E5E66: add rsp, 10h pop rbp retn
long long free_block_0(long long a1, long long a2) { long long result; // rax if ( *(_QWORD *)(a2 + 32) ) { *(_DWORD *)(a2 + 80) |= 8u; wait_for_readers_0(a1, a2); *(_DWORD *)(a2 + 80) &= ~8u; } unreg_request_0((_QWORD *)a1, a2, 0); result = *(_DWORD *)(a2 + 80) & 0x80; if ( !(_DWORD)result ) { if ( (*(_DWORD *)(a2 + 80) & 1) == 0 ) unlink_block_0(a1, a2); if ( *(_DWORD *)(a2 + 84) == 1 ) --*(_QWORD *)(a1 + 104); *(_DWORD *)(a2 + 84) = 0; unlink_changed_0(a2); unlink_hash_0(a1, *(_QWORD *)(a2 + 32)); *(_QWORD *)(a2 + 32) = 0LL; *(_DWORD *)(a2 + 80) = 0; *(_DWORD *)(a2 + 76) = 0; *(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 24); *(_QWORD *)a2 = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = a2; ++*(_QWORD *)(a1 + 88); return release_whole_queue(a2 + 48); } return result; }
free_block: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e5d12 LAB_001e5d12: JMP 0x001e5d14 LAB_001e5d14: JMP 0x001e5d16 LAB_001e5d16: JMP 0x001e5d18 LAB_001e5d18: JMP 0x001e5d1a LAB_001e5d1a: JMP 0x001e5d1c LAB_001e5d1c: JMP 0x001e5d1e LAB_001e5d1e: JMP 0x001e5d20 LAB_001e5d20: JMP 0x001e5d22 LAB_001e5d22: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001e5d62 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x8 MOV dword ptr [RAX + 0x50],ECX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001e6e00 JMP 0x001e5d49 LAB_001e5d49: JMP 0x001e5d4b LAB_001e5d4b: JMP 0x001e5d4d LAB_001e5d4d: JMP 0x001e5d4f LAB_001e5d4f: JMP 0x001e5d51 LAB_001e5d51: JMP 0x001e5d53 LAB_001e5d53: JMP 0x001e5d55 LAB_001e5d55: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] AND ECX,0xfffffff7 MOV dword ptr [RAX + 0x50],ECX LAB_001e5d62: JMP 0x001e5d64 LAB_001e5d64: JMP 0x001e5d66 LAB_001e5d66: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR EDX,EDX CALL 0x001e5b70 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x80 CMP EAX,0x0 JZ 0x001e5d8b JMP 0x001e5e66 LAB_001e5d8b: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e5dab JMP 0x001e5d9c LAB_001e5d9c: JMP 0x001e5d9e LAB_001e5d9e: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001e7030 LAB_001e5dab: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x1 JNZ 0x001e5dc5 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] ADD RCX,-0x1 MOV qword ptr [RAX + 0x68],RCX LAB_001e5dc5: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x54],0x0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e6ea0 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x20] CALL 0x001e6a00 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x48],ECX JMP 0x001e5e1c LAB_001e5e1c: JMP 0x001e5e1e LAB_001e5e1e: JMP 0x001e5e20 LAB_001e5e20: JMP 0x001e5e22 LAB_001e5e22: JMP 0x001e5e24 LAB_001e5e24: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x58] ADD RCX,0x1 MOV qword ptr [RAX + 0x58],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 ADD RDI,0x8 CALL 0x001e6d70 LAB_001e5e66: ADD RSP,0x10 POP RBP RET
void free_block(long param_1,int8 *param_2) { if (param_2[4] != 0) { *(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) | 8; wait_for_readers(param_1,param_2); *(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) & 0xfffffff7; } unreg_request(param_1,param_2,0); if ((*(uint *)(param_2 + 10) & 0x80) == 0) { if ((*(uint *)(param_2 + 10) & 1) == 0) { unlink_block(param_1,param_2); } if (*(int *)((long)param_2 + 0x54) == 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1; } *(int4 *)((long)param_2 + 0x54) = 0; unlink_changed(param_2); unlink_hash(param_1,param_2[4]); param_2[4] = 0; *(int4 *)(param_2 + 10) = 0; *(int4 *)((long)param_2 + 0x4c) = 0; *(int4 *)(param_2 + 9) = *(int4 *)(param_1 + 0x18); *param_2 = *(int8 *)(param_1 + 0x98); *(int8 **)(param_1 + 0x98) = param_2; *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1; release_whole_queue(param_2 + 6); } return; }
37,120
google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldGenerator::GenerateSerializationCode(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/primitive_field.cc
void RepeatedImmutablePrimitiveFieldGenerator::GenerateSerializationCode( io::Printer* printer) const { if (descriptor_->is_packed()) { // We invoke getSerializedSize in writeTo for messages that have packed // fields in ImmutableMessageGenerator::GenerateMessageSerializationMethods. // That makes it safe to rely on the memoized size here. printer->Print(variables_, "if (get$capitalized_name$List().size() > 0) {\n" " output.writeUInt32NoTag($tag$);\n" " output.writeUInt32NoTag($name$MemoizedSerializedSize);\n" "}\n" "for (int i = 0; i < $name$_.size(); i++) {\n" " output.write$capitalized_type$NoTag($repeated_get$(i));\n" "}\n"); } else { printer->Print( variables_, "for (int i = 0; i < $name$_.size(); i++) {\n" " output.write$capitalized_type$($number$, $repeated_get$(i));\n" "}\n"); } }
O3
cpp
google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldGenerator::GenerateSerializationCode(google::protobuf::io::Printer*) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rdi callq 0x125036 addq $0x18, %r14 leaq 0xfdcaa(%rip), %rcx # 0x1e088e leaq 0xfdd96(%rip), %rdx # 0x1e0981 testb %al, %al cmovneq %rcx, %rdx movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x16cd32 nop
_ZNK6google8protobuf8compiler4java40RepeatedImmutablePrimitiveFieldGenerator25GenerateSerializationCodeEPNS0_2io7PrinterE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rdi+8]; this call _ZNK6google8protobuf15FieldDescriptor9is_packedEv; google::protobuf::FieldDescriptor::is_packed(void) add r14, 18h lea rcx, aIfGetCapitaliz_3; "if (get$capitalized_name$List().size() "... lea rdx, aForIntI0INameS_1; "for (int i = 0; i < $name$_.size(); i++"... test al, al cmovnz rdx, rcx mov rdi, rbx; this mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
long long google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldGenerator::GenerateSerializationCode( google::protobuf::FieldDescriptor **this, google::protobuf::io::Printer *a2, long long a3, long long a4, long long a5, long long a6, void *a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15, void *a16, int a17, char a18) { google::protobuf::FieldDescriptor::is_packed(this[1]); return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); }
GenerateSerializationCode: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x8] CALL 0x00225036 ADD R14,0x18 LEA RCX,[0x2e088e] LEA RDX,[0x2e0981] TEST AL,AL CMOVNZ RDX,RCX MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x0026cd32
/* google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldGenerator::GenerateSerializationCode(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldGenerator:: GenerateSerializationCode(RepeatedImmutablePrimitiveFieldGenerator *this,Printer *param_1) { char cVar1; char *pcVar2; cVar1 = FieldDescriptor::is_packed(*(FieldDescriptor **)(this + 8)); pcVar2 = "for (int i = 0; i < $name$_.size(); i++) {\n output.write$capitalized_type$($number$, $repeated_get$(i));\n}\n" ; if (cVar1 != '\0') { pcVar2 = "if (get$capitalized_name$List().size() > 0) {\n output.writeUInt32NoTag($tag$);\n output.writeUInt32NoTag($name$MemoizedSerializedSize);\n}\nfor (int i = 0; i < $name$_.size(); i++) {\n output.write$capitalized_type$NoTag($repeated_get$(i));\n}\n" ; } io::Printer::Print(param_1,(map *)(this + 0x18),pcVar2); return; }
37,121
my_mb_wc_big5
eloqsql/strings/ctype-big5.c
static int my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc,const uchar *s,const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O3
c
my_mb_wc_big5: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xaa916 movsbq (%rdx), %rdi testq %rdi, %rdi js 0xaa8e0 movq %rdi, (%rsi) movl $0x1, %eax retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xaa916 leal 0x5f(%rdi), %ecx xorl %eax, %eax cmpb $0x58, %cl ja 0xaa916 movzbl 0x1(%rdx), %ecx leal -0x7f(%rcx), %edx cmpb $-0x3f, %dl setb %dl leal 0x1(%rcx), %r8d cmpb $-0x5e, %r8b setb %r8b testb %r8b, %dl je 0xaa917 retq pushq %rbp movq %rsp, %rbp movzbl %dil, %eax shll $0x8, %eax leal (%rax,%rcx), %edx addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0 cmpl $0x26bc, %edx # imm = 0x26BC ja 0xaa93e movl %edx, %eax leaq 0x39374(%rip), %rcx # 0xe3cb0 jmp 0xaa955 orl %ecx, %eax addl $0xffff36c0, %eax # imm = 0xFFFF36C0 cmpl $0x309d, %eax # imm = 0x309D jae 0xaa96e movl %eax, %eax leaq 0x3e0db(%rip), %rcx # 0xe8a30 leaq (%rcx,%rax,2), %rax movzwl (%rax), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0xaa97a jmp 0xaa975 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_big5: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_AA916 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_AA8E0 mov [rsi], rdi mov eax, 1 retn loc_AA8E0: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short locret_AA916 lea ecx, [rdi+5Fh] xor eax, eax cmp cl, 58h ; 'X' ja short locret_AA916 movzx ecx, byte ptr [rdx+1] lea edx, [rcx-7Fh] cmp dl, 0C1h setb dl lea r8d, [rcx+1] cmp r8b, 0A2h setb r8b test dl, r8b jz short loc_AA917 locret_AA916: retn loc_AA917: push rbp mov rbp, rsp movzx eax, dil shl eax, 8 lea edx, [rax+rcx] add edx, 0FFFF5EC0h cmp edx, 26BCh ja short loc_AA93E mov eax, edx lea rcx, tab_big5_uni0 jmp short loc_AA955 loc_AA93E: or eax, ecx add eax, 0FFFF36C0h cmp eax, 309Dh jnb short loc_AA96E mov eax, eax lea rcx, tab_big5_uni1 loc_AA955: lea rax, [rcx+rax*2] movzx eax, word ptr [rax] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_AA97A jmp short loc_AA975 loc_AA96E: mov qword ptr [rsi], 0 loc_AA975: mov eax, 0FFFFFFFEh loc_AA97A: pop rbp retn
long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // ecx int v7; // eax unsigned int v8; // edx long long v9; // rax unsigned __int16 *v10; // rcx long long v11; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)(v5 + 95) <= 0x58u ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u ) { v7 = (unsigned __int8)v5 << 8; v8 = v7 + v6 - 41280; if ( v8 > 0x26BC ) { LODWORD(v9) = (v6 | v7) - 51520; if ( (unsigned int)v9 >= 0x309D ) { *a2 = 0LL; return 4294967294LL; } v9 = (unsigned int)v9; v10 = (unsigned __int16 *)&tab_big5_uni1; } else { v9 = v8; v10 = (unsigned __int16 *)&tab_big5_uni0; } v11 = v10[v9]; *a2 = v11; result = 2LL; if ( (_WORD)v11 ) return result; return 4294967294LL; } } } } return result; }
my_mb_wc_big5: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001aa916 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x001aa8e0 MOV qword ptr [RSI],RDI MOV EAX,0x1 RET LAB_001aa8e0: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001aa916 LEA ECX,[RDI + 0x5f] XOR EAX,EAX CMP CL,0x58 JA 0x001aa916 MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x7f] CMP DL,0xc1 SETC DL LEA R8D,[RCX + 0x1] CMP R8B,0xa2 SETC R8B TEST DL,R8B JZ 0x001aa917 LAB_001aa916: RET LAB_001aa917: PUSH RBP MOV RBP,RSP MOVZX EAX,DIL SHL EAX,0x8 LEA EDX,[RAX + RCX*0x1] ADD EDX,0xffff5ec0 CMP EDX,0x26bc JA 0x001aa93e MOV EAX,EDX LEA RCX,[0x1e3cb0] JMP 0x001aa955 LAB_001aa93e: OR EAX,ECX ADD EAX,0xffff36c0 CMP EAX,0x309d JNC 0x001aa96e MOV EAX,EAX LEA RCX,[0x1e8a30] LAB_001aa955: LEA RAX,[RCX + RAX*0x2] MOVZX EAX,word ptr [RAX] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x001aa97a JMP 0x001aa975 LAB_001aa96e: MOV qword ptr [RSI],0x0 LAB_001aa975: MOV EAX,0xfffffffe LAB_001aa97a: POP RBP RET
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; int *puVar4; uint uVar5; if (param_4 <= param_3) { return 0xffffff9b; } bVar1 = *param_3; if (-1 < (long)(char)bVar1) { *param_2 = (long)(char)bVar1; return 1; } if (param_4 < param_3 + 2) { return 0xffffff9a; } if ((byte)(bVar1 + 0x5f) < 0x59) { bVar2 = param_3[1]; if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) { return 0; } uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140; if (uVar5 < 0x26bd) { puVar4 = &tab_big5_uni0; } else { uVar5 = CONCAT11(bVar1,bVar2) - 0xc940; if (0x309c < uVar5) { *param_2 = 0; return 0xfffffffe; } puVar4 = &tab_big5_uni1; } uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2); *param_2 = (ulong)uVar3; if (uVar3 == 0) { return 0xfffffffe; } return 2; } return 0; }
37,122
my_charlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb3(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); return MY_CS_ILSEQ; }
O3
c
my_charlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0xcbd6f movb (%rsi), %cl cmpb $-0x11, %cl ja 0xcbd6d movl $0x1, %eax testb %cl, %cl jns 0xcbd6f cmpb $-0x3e, %cl jae 0xcbd71 xorl %eax, %eax popq %rbp retq cmpb $-0x21, %cl ja 0xcbd91 leaq 0x2(%rsi), %rcx movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %rcx ja 0xcbd6f xorl %eax, %eax cmpb $-0x40, 0x1(%rsi) setl %al addl %eax, %eax jmp 0xcbd6f leaq 0x3(%rsi), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %rdi ja 0xcbd6f movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0xcbd6d cmpb $-0x41, 0x2(%rsi) movl $0x0, %eax jg 0xcbd6f xorl %eax, %eax cmpb $-0x60, %dl setae %al cmpb $-0x20, %cl leal (%rax,%rax,2), %ecx movl $0x3, %eax cmovel %ecx, %eax jmp 0xcbd6f
my_charlen_utf8mb3: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb short loc_CBD6F mov cl, [rsi] cmp cl, 0EFh ja short loc_CBD6D mov eax, 1 test cl, cl jns short loc_CBD6F cmp cl, 0C2h jnb short loc_CBD71 loc_CBD6D: xor eax, eax loc_CBD6F: pop rbp retn loc_CBD71: cmp cl, 0DFh ja short loc_CBD91 lea rcx, [rsi+2] mov eax, 0FFFFFF9Ah cmp rcx, rdx ja short loc_CBD6F xor eax, eax cmp byte ptr [rsi+1], 0C0h setl al add eax, eax jmp short loc_CBD6F loc_CBD91: lea rdi, [rsi+3] mov eax, 0FFFFFF99h cmp rdi, rdx ja short loc_CBD6F mov dl, [rsi+1] cmp dl, 0BFh jg short loc_CBD6D cmp byte ptr [rsi+2], 0BFh mov eax, 0 jg short loc_CBD6F 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_CBD6F
long long my_charlen_utf8mb3(long long a1, char *a2, unsigned long long a3) { long long result; // rax char v4; // cl char v5; // dl result = 4294967195LL; if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( (unsigned __int8)*a2 > 0xEFu ) return 0LL; result = 1LL; if ( v4 >= 0 ) return result; if ( (unsigned __int8)v4 < 0xC2u ) return 0LL; if ( (unsigned __int8)v4 > 0xDFu ) { result = 4294967193LL; if ( (unsigned long long)(a2 + 3) <= a3 ) { v5 = a2[1]; if ( v5 > -65 ) return 0LL; result = 0LL; if ( a2[2] <= -65 ) { result = 3LL; if ( v4 == -32 ) return 3 * (unsigned int)((unsigned __int8)v5 >= 0xA0u); } } } else { result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) return 2 * (unsigned int)(a2[1] < -64); } } return result; }
my_charlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x001cbd6f MOV CL,byte ptr [RSI] CMP CL,0xef JA 0x001cbd6d MOV EAX,0x1 TEST CL,CL JNS 0x001cbd6f CMP CL,0xc2 JNC 0x001cbd71 LAB_001cbd6d: XOR EAX,EAX LAB_001cbd6f: POP RBP RET LAB_001cbd71: CMP CL,0xdf JA 0x001cbd91 LEA RCX,[RSI + 0x2] MOV EAX,0xffffff9a CMP RCX,RDX JA 0x001cbd6f XOR EAX,EAX CMP byte ptr [RSI + 0x1],0xc0 SETL AL ADD EAX,EAX JMP 0x001cbd6f LAB_001cbd91: LEA RDI,[RSI + 0x3] MOV EAX,0xffffff99 CMP RDI,RDX JA 0x001cbd6f MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x001cbd6d CMP byte ptr [RSI + 0x2],0xbf MOV EAX,0x0 JG 0x001cbd6f XOR EAX,EAX CMP DL,0xa0 SETNC AL CMP CL,0xe0 LEA ECX,[RAX + RAX*0x2] MOV EAX,0x3 CMOVZ EAX,ECX JMP 0x001cbd6f
int my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; if (param_3 <= param_2) { return -0x65; } 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 -0x66; } return (uint)((char)param_2[1] < -0x40) * 2; } if (param_3 < param_2 + 3) { return -0x67; } if ((char)param_2[1] < -0x40) { if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 != 0xe0) { return 3; } return (uint)(0x9f < param_2[1]) * 3; } } } return 0; }
37,123
my_utf16le_uni
eloqsql/strings/ctype-ucs2.c
static int my_utf16le_uni(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { my_wc_t lo; if (s + 2 > e) return MY_CS_TOOSMALL2; if ((*pwc= uint2korr(s)) < MY_UTF16_SURROGATE_HIGH_FIRST || (*pwc > MY_UTF16_SURROGATE_LOW_LAST)) return 2; /* [0000-D7FF,E000-FFFF] */ if (*pwc >= MY_UTF16_SURROGATE_LOW_FIRST) return MY_CS_ILSEQ; /* [DC00-DFFF] Low surrogate part without high part */ if (s + 4 > e) return MY_CS_TOOSMALL4; s+= 2; if ((lo= uint2korr(s)) < MY_UTF16_SURROGATE_LOW_FIRST || lo > MY_UTF16_SURROGATE_LOW_LAST) return MY_CS_ILSEQ; /* Expected low surrogate part, got something else */ *pwc= 0x10000 + (((*pwc & 0x3FF) << 10) | (lo & 0x3FF)); return 4; }
O0
c
my_utf16le_uni: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x5de6e movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x5df30 movq -0x20(%rbp), %rax movzwl (%rax), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0xd800, %rax # imm = 0xD800 jb 0x5de91 movq -0x18(%rbp), %rax cmpq $0xdfff, (%rax) # imm = 0xDFFF jbe 0x5de9d movl $0x2, -0x4(%rbp) jmp 0x5df30 movq -0x18(%rbp), %rax cmpq $0xdc00, (%rax) # imm = 0xDC00 jb 0x5deb3 movl $0x0, -0x4(%rbp) jmp 0x5df30 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x5deca movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x5df30 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x30(%rbp) cmpq $0xdc00, %rax # imm = 0xDC00 jb 0x5def3 cmpq $0xdfff, -0x30(%rbp) # imm = 0xDFFF jbe 0x5defc movl $0x0, -0x4(%rbp) jmp 0x5df30 movq -0x18(%rbp), %rax movq (%rax), %rcx andq $0x3ff, %rcx # imm = 0x3FF shlq $0xa, %rcx movq -0x30(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF orq %rax, %rcx addq $0x10000, %rcx # imm = 0x10000 movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_utf16le_uni: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_5DE6E mov [rbp+var_4], 0FFFFFF9Ah jmp loc_5DF30 loc_5DE6E: mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0D800h jb short loc_5DE91 mov rax, [rbp+var_18] cmp qword ptr [rax], 0DFFFh jbe short loc_5DE9D loc_5DE91: mov [rbp+var_4], 2 jmp loc_5DF30 loc_5DE9D: mov rax, [rbp+var_18] cmp qword ptr [rax], 0DC00h jb short loc_5DEB3 mov [rbp+var_4], 0 jmp short loc_5DF30 loc_5DEB3: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_5DECA mov [rbp+var_4], 0FFFFFF98h jmp short loc_5DF30 loc_5DECA: mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov [rbp+var_30], rax cmp rax, 0DC00h jb short loc_5DEF3 cmp [rbp+var_30], 0DFFFh jbe short loc_5DEFC loc_5DEF3: mov [rbp+var_4], 0 jmp short loc_5DF30 loc_5DEFC: mov rax, [rbp+var_18] mov rcx, [rax] and rcx, 3FFh shl rcx, 0Ah mov rax, [rbp+var_30] and rax, 3FFh or rcx, rax add rcx, 10000h mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 4 loc_5DF30: mov eax, [rbp+var_4] pop rbp retn
long long my_utf16le_uni(long long a1, unsigned long long *a2, unsigned __int16 *a3, unsigned long long a4) { unsigned long long v4; // rax unsigned long long v6; // [rsp+0h] [rbp-30h] if ( (unsigned long long)(a3 + 1) <= a4 ) { v4 = *a3; *a2 = v4; if ( v4 >= 0xD800 && *a2 <= 0xDFFF ) { if ( *a2 < 0xDC00 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = a3[1]; if ( v6 >= 0xDC00 && v6 <= 0xDFFF ) { *a2 = (v6 & 0x3FF | ((*a2 & 0x3FF) << 10)) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else { return 0; } } else { return 2; } } else { return (unsigned int)-102; } }
my_utf16le_uni: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0015de6e MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0015df30 LAB_0015de6e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0xd800 JC 0x0015de91 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0xdfff JBE 0x0015de9d LAB_0015de91: MOV dword ptr [RBP + -0x4],0x2 JMP 0x0015df30 LAB_0015de9d: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0xdc00 JC 0x0015deb3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015df30 LAB_0015deb3: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0015deca MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0015df30 LAB_0015deca: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0xdc00 JC 0x0015def3 CMP qword ptr [RBP + -0x30],0xdfff JBE 0x0015defc LAB_0015def3: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015df30 LAB_0015defc: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] AND RCX,0x3ff SHL RCX,0xa MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x3ff OR RCX,RAX ADD RCX,0x10000 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 LAB_0015df30: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_utf16le_uni(int8 param_1,ulong *param_2,ushort *param_3,ushort *param_4) { ushort uVar1; ulong uVar2; int4 local_c; if (param_4 < param_3 + 1) { local_c = 0xffffff9a; } else { uVar1 = *param_3; *param_2 = (ulong)uVar1; if (((ulong)uVar1 < 0xd800) || (0xdfff < *param_2)) { local_c = 2; } else if (*param_2 < 0xdc00) { if (param_4 < param_3 + 2) { local_c = 0xffffff98; } else { uVar2 = (ulong)param_3[1]; if ((uVar2 < 0xdc00) || (0xdfff < uVar2)) { local_c = 0; } else { *param_2 = ((*param_2 & 0x3ff) << 10 | uVar2 & 0x3ff) + 0x10000; local_c = 4; } } } else { local_c = 0; } } return local_c; }
37,124
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_command_r7b(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { {"tool_call_id", { {"type", "string"}, // Command-R's template expects an integer string. {"pattern", "^[0-9]{1,10}$"}, }}, {"tool_name", { {"type", "string"}, {"const", function["name"]}, }}, {"parameters", function["parameters"]}, }}, {"required", json::array({"tool_call_id", "tool_name", "parameters"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"<|START_ACTION|>\" " + builder.add_schema("tool_calls", schema) + " \"<|END_ACTION|>\""); }, grammar_options); data.grammar_triggers.push_back({"<|START_ACTION|>", /* .at_start = */ false}); data.preserved_tokens = { "<|START_RESPONSE|>", "<|END_RESPONSE|>", "<|START_THINKING|>", "<|END_THINKING|>", "<|END_ACTION|>", }; data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_COMMAND_R7B; return data; }
O3
cpp
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %rbx movl $0x0, (%rdi) xorl %r15d, %r15d movb %r15b, 0x8(%rdi) movq %r15, 0x10(%rdi) leaq 0x28(%rdi), %rax movq %rax, 0x18(%rdi) movq %r15, 0x20(%rdi) movb %r15b, 0x28(%rdi) movb %r15b, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %r15, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x1db94(%rip), %rsi # 0xef8f2 callq 0xa579d movb %al, 0x38(%rbx) leaq 0x8(%rsp), %rsi movq %r15, 0x8(%rsi) movq %r14, (%rsi) leaq 0xe49d(%rip), %rax # 0xe0216 movq %rax, 0x18(%rsi) leaq 0xed12(%rip), %rax # 0xe0a96 movq %rax, 0x10(%rsi) leaq 0x23a99(%rip), %rdx # 0xf5828 leaq 0x38(%rsp), %rdi callq 0xbb8f0 leaq 0x18(%rbx), %rdi leaq 0x38(%rsp), %r12 movq %r12, %rsi callq 0x1aab0 movq (%r12), %rdi leaq 0x48(%rsp), %r15 cmpq %r15, %rdi je 0xd1dc5 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x18(%rsp), %rax testq %rax, %rax je 0xd1dde leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x38(%rsp), %rdi movq %r15, (%rdi) leaq 0x24b27(%rip), %rsi # 0xf6914 leaq 0x24b30(%rip), %rdx # 0xf6924 callq 0x22402 leaq 0x40(%rbx), %rdi leaq 0x38(%rsp), %rsi movb $0x0, 0x20(%rsi) callq 0xe47e8 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xd1e22 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x38(%rsp), %r12 movq %r15, (%r12) leaq 0x24fb3(%rip), %rsi # 0xf6de5 leaq 0x24fbe(%rip), %rdx # 0xf6df7 movq %r12, %rdi callq 0x22402 leaq 0x58(%rsp), %r13 leaq 0x68(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x24fa2(%rip), %rsi # 0xf6df8 leaq 0x24fab(%rip), %rdx # 0xf6e08 movq %r13, %rdi callq 0x22402 leaq 0x78(%rsp), %r13 leaq 0x88(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x24f8c(%rip), %rsi # 0xf6e09 leaq 0x24f97(%rip), %rdx # 0xf6e1b movq %r13, %rdi callq 0x22402 leaq 0x98(%rsp), %r13 leaq 0xa8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x24f75(%rip), %rsi # 0xf6e1c leaq 0x24f7e(%rip), %rdx # 0xf6e2c movq %r13, %rdi callq 0x22402 leaq 0xb8(%rsp), %r13 leaq 0xc8(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x24f5c(%rip), %rsi # 0xf6e2d leaq 0x24f63(%rip), %rdx # 0xf6e3b movq %r13, %rdi callq 0x22402 leaq 0x58(%rbx), %rdi leaq 0xd8(%rsp), %r12 leaq 0x38(%rsp), %rsi movq %r12, %rdx callq 0xe4bca movq $-0xa0, %r12 movq -0x10(%r15), %rdi cmpq %rdi, %r15 je 0xd1f14 movq (%r15), %rsi incq %rsi callq 0x1a8e0 addq $-0x20, %r15 addq $0x20, %r12 jne 0xd1f00 movzbl 0x10(%r14), %eax testl %eax, %eax leaq 0x48(%rsp), %r15 je 0xd1f53 cmpl $0x2, %eax je 0xd1f36 cmpl $0x1, %eax jne 0xd1f43 movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xd1f53 leaq 0x10(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x5df42 jmp 0xd1f61 movb $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) movzbl 0x68(%r14), %r8d leaq 0x28(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %rbp, %rsi movq %r14, %rdx callq 0xa1ebc leaq 0xd8(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x8019e movb 0x8(%rbx), %al leaq 0xd8(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x5e40e movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xd1fe3 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x28(%rsp), %rdi callq 0x5e40e leaq 0x8(%rsp), %rdi callq 0x5e40e movl $0xa, (%rbx) addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd20b2 jmp 0xd20e3 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xd2038 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0xd2038 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x5e40e leaq 0x8(%rsp), %rdi callq 0x5e40e jmp 0xd20b5 movq %rax, %r14 leaq 0x38(%rsp), %rsi movq %r12, %rdi callq 0x1c747 jmp 0xd20b5 jmp 0xd2066 jmp 0xd2066 jmp 0xd2066 movq %rax, %r14 addq $-0x10, %r13 movq -0x10(%r13), %rdi cmpq %rdi, %r13 je 0xd2082 movq (%r13), %rsi incq %rsi callq 0x1a8e0 leaq -0x20(%r13), %rax addq $-0x10, %r13 cmpq %r12, %r13 movq %rax, %r13 jne 0xd206d jmp 0xd20b5 jmp 0xd20b2 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0xd20b5 movq 0x48(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0xd20b5 movq %rax, %r14 movq %rbx, %rdi callq 0x7ed5c movq %r14, %rdi callq 0x1af90 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0xd20b5 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xd20b5 movq %rax, %rdi callq 0x22203
_ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r14, rdx mov rbp, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor r15d, r15d mov [rdi+8], r15b mov [rdi+10h], r15 lea rax, [rdi+28h] mov [rdi+18h], rax mov [rdi+20h], r15 mov [rdi+28h], r15b mov [rdi+38h], r15b xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], r15 lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+118h+var_110] mov [rsi+8], r15 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+118h+var_E0] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+118h+var_E0] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r15, [rsp+118h+var_D0] cmp rdi, r15 jz short loc_D1DC5 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D1DC5: mov rax, [rsp+118h+var_100] test rax, rax jz short loc_D1DDE lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax loc_D1DDE: lea rdi, [rsp+118h+var_E0] mov [rdi], r15 lea rsi, aEndThinkingSta+10h; "<|START_ACTION|>" lea rdx, aEndThinkingSta+20h; "" 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, [rbx+40h] lea rsi, [rsp+118h+var_E0] mov byte ptr [rsi+20h], 0 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_D1E22 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D1E22: lea r12, [rsp+118h+var_E0] mov [r12], r15 lea rsi, aStartResponse; "<|START_RESPONSE|>" lea rdx, aStartResponse+12h; "" mov rdi, r12 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 r13, [rsp+118h+var_C0] lea rax, [rsp+118h+var_B0] mov [rax-10h], rax lea rsi, aEndResponse; "<|END_RESPONSE|>" lea rdx, aEndResponse+10h; "" mov rdi, r13 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 r13, [rsp+118h+var_A0] lea rax, [rsp+118h+var_90] mov [rax-10h], rax lea rsi, aStartThinking; "<|START_THINKING|>" lea rdx, aStartThinking+12h; "" mov rdi, r13 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 r13, [rsp+118h+var_80] lea rax, [rsp+118h+var_70] mov [rax-10h], rax lea rsi, aEndThinking; "<|END_THINKING|>" lea rdx, aEndThinking+10h; "" mov rdi, r13 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 r13, [rsp+118h+var_60] lea r15, [rsp+118h+var_50] mov [r15-10h], r15 lea rsi, aEndAction; "<|END_ACTION|>" lea rdx, aEndAction+0Eh; "" mov rdi, r13 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, [rbx+58h] lea r12, [rsp+118h+var_40] lea rsi, [rsp+118h+var_E0] mov rdx, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag) mov r12, 0FFFFFFFFFFFFFF60h loc_D1F00: mov rdi, [r15-10h]; void * cmp r15, rdi jz short loc_D1F14 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D1F14: add r15, 0FFFFFFFFFFFFFFE0h add r12, 20h ; ' ' jnz short loc_D1F00 movzx eax, byte ptr [r14+10h] test eax, eax lea r15, [rsp+118h+var_D0] jz short loc_D1F53 cmp eax, 2 jz short loc_D1F36 cmp eax, 1 jnz short loc_D1F43 loc_D1F36: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_D1F53 loc_D1F43: lea rsi, [r14+10h] lea rdi, [rsp+118h+var_110] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_D1F61 loc_D1F53: mov [rsp+118h+var_110], 0 mov [rsp+118h+var_108], 0 loc_D1F61: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+118h+var_F0] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+118h+var_118], 1 lea rdi, [rsp+118h+var_E0] lea rcx, [rsp+118h+var_110] mov rsi, rbp mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) lea rdi, [rsp+118h+var_40] lea rsi, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+118h+var_40] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_D1FE3 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D1FE3: lea rdi, [rsp+118h+var_F0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+118h+var_110] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 0Ah add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_D20B2 jmp loc_D20E3 mov r14, rax mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_D2038 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D2038 mov r14, rax loc_D2038: lea rdi, [rsp+118h+var_F0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+118h+var_110] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_D20B5 mov r14, rax lea rsi, [rsp+118h+var_E0] mov rdi, r12 call _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs_cold_1; common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&) [clone] jmp short loc_D20B5 jmp short loc_D2066 jmp short loc_D2066 jmp short $+2 loc_D2066: mov r14, rax add r13, 0FFFFFFFFFFFFFFF0h loc_D206D: mov rdi, [r13-10h]; void * cmp r13, rdi jz short loc_D2082 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D2082: lea rax, [r13-20h] add r13, 0FFFFFFFFFFFFFFF0h cmp r13, r12 mov r13, rax jnz short loc_D206D jmp short loc_D20B5 jmp short loc_D20B2 mov r14, rax mov rdi, [rsp+118h+var_E0]; void * cmp rdi, r15 jz short loc_D20B5 mov rsi, [rsp+118h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D20B5 loc_D20B2: mov r14, rax loc_D20B5: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume mov r14, rax mov rax, [rsp+118h+var_100] test rax, rax jz short loc_D20B5 lea rdi, [rsp+118h+var_110] mov rsi, rdi mov edx, 3 call rax jmp short loc_D20B5 loc_D20E3: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_command_r7b( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v5; // rcx int v6; // r8d int v7; // r9d _QWORD *v8; // r15 long long v9; // r12 _QWORD *v10; // rdi int v11; // eax int v12; // r8d char v13; // al long long v14; // rax long long result; // rax long long v16; // [rsp+8h] [rbp-110h] BYREF long long v17; // [rsp+10h] [rbp-108h] long long ( *v18)(); // [rsp+18h] [rbp-100h] long long ( *v19)(); // [rsp+20h] [rbp-F8h] _BYTE v20[8]; // [rsp+28h] [rbp-F0h] BYREF long long v21; // [rsp+30h] [rbp-E8h] void *v22[2]; // [rsp+38h] [rbp-E0h] BYREF _QWORD v23[2]; // [rsp+48h] [rbp-D0h] BYREF char *v24; // [rsp+58h] [rbp-C0h] BYREF char v25; // [rsp+68h] [rbp-B0h] BYREF char *v26; // [rsp+78h] [rbp-A0h] BYREF char v27; // [rsp+88h] [rbp-90h] BYREF char *v28; // [rsp+98h] [rbp-80h] BYREF char v29; // [rsp+A8h] [rbp-70h] BYREF _BYTE *v30; // [rsp+B8h] [rbp-60h] BYREF _BYTE v31[16]; // [rsp+C8h] [rbp-50h] BYREF char v32[8]; // [rsp+D8h] [rbp-40h] BYREF long long v33; // [rsp+E0h] [rbp-38h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v17 = 0LL; v16 = a3; v19 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v18 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v22, (long long)&v16, grammar_options, v5, v6, v7); std::string::operator=((char *)a1 + 24, v22); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); if ( v18 ) ((void ( *)(long long *, long long *, long long))v18)(&v16, &v16, 3LL); v22[0] = v23; std::string::_M_construct<char const*>((long long)v22, "<|START_ACTION|>", (long long)""); LOBYTE(v24) = 0; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); v22[0] = v23; std::string::_M_construct<char const*>((long long)v22, "<|START_RESPONSE|>", (long long)""); v24 = &v25; std::string::_M_construct<char const*>((long long)&v24, "<|END_RESPONSE|>", (long long)""); v26 = &v27; std::string::_M_construct<char const*>((long long)&v26, "<|START_THINKING|>", (long long)""); v28 = &v29; std::string::_M_construct<char const*>((long long)&v28, "<|END_THINKING|>", (long long)""); v8 = v31; v30 = v31; std::string::_M_construct<char const*>((long long)&v30, "<|END_ACTION|>", (long long)""); std::vector<std::string>::_M_assign_aux<std::string const*>((char *)a1 + 88, v22, v32); v9 = -160LL; do { v10 = (_QWORD *)*(v8 - 2); if ( v8 != v10 ) operator delete(v10, *v8 + 1LL); v8 -= 4; v9 += 32LL; } while ( v9 ); v11 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v11 == 2 || v11 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v16) = 0; v17 = 0LL; } else { 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( (unsigned __int8 *)&v16, (unsigned __int8 *)(a3 + 16)); } v12 = *(unsigned __int8 *)(a3 + 104); v20[0] = 0; v21 = 0LL; minja::chat_template::apply((long long)v22, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v16, v12, v20, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v32); v13 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v32[0]; v32[0] = v13; v14 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v33; v33 = v14; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v16); *(_DWORD *)a1 = 10; return result; }
common_chat_params_init_command_r7b: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R14,RDX MOV RBP,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR R15D,R15D MOV byte ptr [RDI + 0x8],R15B MOV qword ptr [RDI + 0x10],R15 LEA RAX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],R15 MOV byte ptr [RDI + 0x28],R15B MOV byte ptr [RDI + 0x38],R15B XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],R15 LEA RDI,[RDX + 0x20] LEA RSI,[0x1ef8f2] CALL 0x001a579d MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],R15 MOV qword ptr [RSI],R14 LEA RAX,[0x1e0216] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1e0a96] MOV qword ptr [RSI + 0x10],RAX LAB_001d1d88: LEA RDX,[0x1f5828] LEA RDI,[RSP + 0x38] CALL 0x001bb8f0 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x38] MOV RSI,R12 CALL 0x0011aab0 MOV RDI,qword ptr [R12] LEA R15,[RSP + 0x48] CMP RDI,R15 JZ 0x001d1dc5 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011a8e0 LAB_001d1dc5: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x001d1dde LAB_001d1dcf: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d1dde: LEA RDI,[RSP + 0x38] MOV qword ptr [RDI],R15 LAB_001d1de6: LEA RSI,[0x1f6914] LEA RDX,[0x1f6924] CALL 0x00122402 LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x38] MOV byte ptr [RSI + 0x20],0x0 LAB_001d1e06: CALL 0x001e47e8 MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x001d1e22 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011a8e0 LAB_001d1e22: LEA R12,[RSP + 0x38] MOV qword ptr [R12],R15 LAB_001d1e2b: LEA RSI,[0x1f6de5] LEA RDX,[0x1f6df7] MOV RDI,R12 CALL 0x00122402 LEA R13,[RSP + 0x58] LEA RAX,[RSP + 0x68] MOV qword ptr [RAX + -0x10],RAX LAB_001d1e4f: LEA RSI,[0x1f6df8] LEA RDX,[0x1f6e08] MOV RDI,R13 CALL 0x00122402 LEA R13,[RSP + 0x78] LEA RAX,[RSP + 0x88] MOV qword ptr [RAX + -0x10],RAX LAB_001d1e76: LEA RSI,[0x1f6e09] LEA RDX,[0x1f6e1b] MOV RDI,R13 CALL 0x00122402 LEA R13,[RSP + 0x98] LEA RAX,[RSP + 0xa8] MOV qword ptr [RAX + -0x10],RAX LAB_001d1ea0: LEA RSI,[0x1f6e1c] LEA RDX,[0x1f6e2c] MOV RDI,R13 CALL 0x00122402 LEA R13,[RSP + 0xb8] LEA R15,[RSP + 0xc8] MOV qword ptr [R15 + -0x10],R15 LAB_001d1eca: LEA RSI,[0x1f6e2d] LEA RDX,[0x1f6e3b] MOV RDI,R13 CALL 0x00122402 LEA RDI,[RBX + 0x58] LEA R12,[RSP + 0xd8] LAB_001d1eec: LEA RSI,[RSP + 0x38] MOV RDX,R12 CALL 0x001e4bca MOV R12,-0xa0 LAB_001d1f00: MOV RDI,qword ptr [R15 + -0x10] CMP R15,RDI JZ 0x001d1f14 MOV RSI,qword ptr [R15] INC RSI CALL 0x0011a8e0 LAB_001d1f14: ADD R15,-0x20 ADD R12,0x20 JNZ 0x001d1f00 MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX LEA R15,[RSP + 0x48] JZ 0x001d1f53 CMP EAX,0x2 JZ 0x001d1f36 CMP EAX,0x1 JNZ 0x001d1f43 LAB_001d1f36: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001d1f53 LAB_001d1f43: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x8] CALL 0x0015df42 JMP 0x001d1f61 LAB_001d1f53: MOV byte ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 LAB_001d1f61: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x28] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001d1f77: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x8] MOV RSI,RBP MOV RDX,R14 CALL 0x001a1ebc LAB_001d1f93: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0x38] CALL 0x0018019e LAB_001d1fa5: MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0xd8] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x0015e40e MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x001d1fe3 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011a8e0 LAB_001d1fe3: LEA RDI,[RSP + 0x28] CALL 0x0015e40e LEA RDI,[RSP + 0x8] CALL 0x0015e40e MOV dword ptr [RBX],0xa ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_command_r7b(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; long lVar4; long *plVar5; ulong local_110 [2]; code *local_100; code *local_f8; data local_f0 [8]; int8 local_e8; long *local_e0 [2]; long local_d0 [2]; int1 *local_c0 [2]; int1 local_b0 [16]; int1 *local_a0 [2]; int1 local_90 [16]; int1 *local_80 [2]; int1 local_70 [16]; long *local_60 [2]; long local_50 [2]; chat_template local_40 [8]; int8 local_38; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_110[1] = 0; local_f8 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_100 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001d1d88 to 001d1d98 has its CatchHandler @ 001d20c5 */ local_110[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_e0,(common_grammar_options *)local_110); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_e0); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } if (local_100 != (code *)0x0) { /* try { // try from 001d1dcf to 001d1ddd has its CatchHandler @ 001d2014 */ (*local_100)(local_110,local_110,3); } local_e0[0] = local_d0; /* try { // try from 001d1de6 to 001d1df8 has its CatchHandler @ 001d20b2 */ std::__cxx11::string::_M_construct<char_const*>(local_e0,"<|START_ACTION|>",""); local_c0[0] = (int1 *)((ulong)local_c0[0] & 0xffffffffffffff00); /* try { // try from 001d1e06 to 001d1e0a has its CatchHandler @ 001d2096 */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x40),(common_grammar_trigger *)local_e0); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } local_e0[0] = local_d0; /* try { // try from 001d1e2b to 001d1e40 has its CatchHandler @ 001d2094 */ std::__cxx11::string::_M_construct<char_const*>(local_e0,"<|START_RESPONSE|>",""); local_c0[0] = local_b0; /* try { // try from 001d1e4f to 001d1e64 has its CatchHandler @ 001d2066 */ std::__cxx11::string::_M_construct<char_const*>(local_c0,"<|END_RESPONSE|>",""); local_a0[0] = local_90; /* try { // try from 001d1e76 to 001d1e8b has its CatchHandler @ 001d2064 */ std::__cxx11::string::_M_construct<char_const*>(local_a0,"<|START_THINKING|>",""); local_80[0] = local_70; /* try { // try from 001d1ea0 to 001d1eb5 has its CatchHandler @ 001d2062 */ std::__cxx11::string::_M_construct<char_const*>(local_80,"<|END_THINKING|>",""); plVar5 = local_50; local_60[0] = plVar5; /* try { // try from 001d1eca to 001d1edf has its CatchHandler @ 001d2060 */ std::__cxx11::string::_M_construct<char_const*>(local_60,"<|END_ACTION|>",""); /* try { // try from 001d1eec to 001d1ef8 has its CatchHandler @ 001d204e */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: _M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x58,local_e0,local_40); lVar4 = -0xa0; do { if (plVar5 != (long *)plVar5[-2]) { operator_delete((long *)plVar5[-2],*plVar5 + 1); } plVar5 = plVar5 + -4; lVar4 = lVar4 + 0x20; } while (lVar4 != 0); cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_110[0] = local_110[0] & 0xffffffffffffff00; local_110[1] = 0; } else { /* try { // try from 001d1f43 to 001d1f50 has its CatchHandler @ 001d200f */ 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> *)local_110,(basic_json *)(in_RDX + 0x10)); } local_f0[0] = (data)0x0; local_e8 = 0; /* try { // try from 001d1f77 to 001d1f92 has its CatchHandler @ 001d2035 */ minja::chat_template::apply ((basic_json *)local_e0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_110, *(bool *)(in_RDX + 0x68)); /* try { // try from 001d1f93 to 001d1fa4 has its CatchHandler @ 001d2019 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_40,local_e0); cVar3 = param_1[8]; param_1[8] = local_40[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_38; local_40[0] = cVar3; local_38 = uVar2; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_40); if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_f0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_110); *(int4 *)param_1 = 10; return; }
37,125
mi_ft_del
eloqsql/storage/myisam/ft_update.c
int _mi_ft_del(MI_INFO *info, uint keynr, uchar *keybuf, const uchar *record, my_off_t pos) { int error= -1; FT_WORD *wlist; DBUG_ENTER("_mi_ft_del"); DBUG_PRINT("enter",("keynr: %d",keynr)); if ((wlist=_mi_ft_parserecord(info, keynr, record, &info->ft_memroot))) error=_mi_ft_erase(info,keynr,keybuf,wlist,pos); free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_PRINT("exit",("Return: %d",error)); DBUG_RETURN(error); }
O0
c
mi_ft_del: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF jmp 0xa35d4 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x90, %rcx callq 0xa2e70 movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0xa3614 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x38(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0xa3400 movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rdi addq $0x90, %rdi movl $0x2, %esi callq 0xeda10 jmp 0xa362b jmp 0xa362d movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_mi_ft_del: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2C], 0FFFFFFFFh jmp short $+2 loc_A35D4: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] mov rcx, [rbp+var_8] add rcx, 90h call _mi_ft_parserecord mov [rbp+var_38], rax cmp rax, 0 jz short loc_A3614 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_38] mov r8, [rbp+var_28] call _mi_ft_erase mov [rbp+var_2C], eax loc_A3614: mov rdi, [rbp+var_8] add rdi, 90h mov esi, 2 call free_root jmp short $+2 loc_A362B: jmp short $+2 loc_A362D: mov eax, [rbp+var_2C] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add rsp, 40h pop rbp retn
long long mi_ft_del(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5) { _QWORD *v6; // [rsp+8h] [rbp-38h] unsigned int v7; // [rsp+14h] [rbp-2Ch] v7 = -1; v6 = (_QWORD *)mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18)); if ( v6 ) v7 = mi_ft_erase((long long)a1, a2, a3, v6, a5); free_root(a1 + 18, 2LL); return v7; }
_mi_ft_del: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],0xffffffff JMP 0x001a35d4 LAB_001a35d4: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x90 CALL 0x001a2e70 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x001a3614 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x28] CALL 0x001a3400 MOV dword ptr [RBP + -0x2c],EAX LAB_001a3614: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x90 MOV ESI,0x2 CALL 0x001eda10 JMP 0x001a362b LAB_001a362b: JMP 0x001a362d LAB_001a362d: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD RSP,0x40 POP RBP RET
int4 _mi_ft_del(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5) { long lVar1; int4 local_34; local_34 = 0xffffffff; lVar1 = _mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x90); if (lVar1 != 0) { local_34 = _mi_ft_erase(param_1,param_2,param_3,lVar1,param_5); } free_root(param_1 + 0x90,2); return local_34; }
37,126
stbi__tga_info(stbi__context*, int*, int*, int*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) { int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; int sz, tga_colormap_type; stbi__get8(s); // discard Offset tga_colormap_type = stbi__get8(s); // colormap type if( tga_colormap_type > 1 ) { stbi__rewind(s); return 0; // only RGB or indexed allowed } tga_image_type = stbi__get8(s); // image type if ( tga_colormap_type == 1 ) { // colormapped (paletted) image if (tga_image_type != 1 && tga_image_type != 9) { stbi__rewind(s); return 0; } stbi__skip(s,4); // skip index of first colormap entry and number of entries sz = stbi__get8(s); // check bits per palette color entry if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { stbi__rewind(s); return 0; } stbi__skip(s,4); // skip image x and y origin tga_colormap_bpp = sz; } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { stbi__rewind(s); return 0; // only RGB or grey allowed, +/- RLE } stbi__skip(s,9); // skip colormap specification and image x/y origin tga_colormap_bpp = 0; } tga_w = stbi__get16le(s); if( tga_w < 1 ) { stbi__rewind(s); return 0; // test width } tga_h = stbi__get16le(s); if( tga_h < 1 ) { stbi__rewind(s); return 0; // test height } tga_bits_per_pixel = stbi__get8(s); // bits per pixel stbi__get8(s); // ignore alpha bits if (tga_colormap_bpp != 0) { if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { // when using a colormap, tga_bits_per_pixel is the size of the indexes // I don't think anything but 8 or 16bit indexes makes sense stbi__rewind(s); return 0; } tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); } else { tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); } if(!tga_comp) { stbi__rewind(s); return 0; } if (x) *x = tga_w; if (y) *y = tga_h; if (comp) *comp = tga_comp; return 1; // seems to have passed everything }
O0
c
stbi__tga_info(stbi__context*, int*, int*, int*): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) movq %rdx, 0x38(%rsp) movq %rcx, 0x30(%rsp) movq 0x48(%rsp), %rdi callq 0x90800 movq 0x48(%rsp), %rdi callq 0x90800 movzbl %al, %eax movl %eax, 0x10(%rsp) cmpl $0x1, 0x10(%rsp) jle 0xa5281 movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movq 0x48(%rsp), %rdi callq 0x90800 movzbl %al, %eax movl %eax, 0x20(%rsp) cmpl $0x1, 0x10(%rsp) jne 0xa5335 cmpl $0x1, 0x20(%rsp) je 0xa52c2 cmpl $0x9, 0x20(%rsp) je 0xa52c2 movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movq 0x48(%rsp), %rdi movl $0x4, %esi callq 0x926c0 movq 0x48(%rsp), %rdi callq 0x90800 movzbl %al, %eax movl %eax, 0x14(%rsp) cmpl $0x8, 0x14(%rsp) je 0xa531c cmpl $0xf, 0x14(%rsp) je 0xa531c cmpl $0x10, 0x14(%rsp) je 0xa531c cmpl $0x18, 0x14(%rsp) je 0xa531c cmpl $0x20, 0x14(%rsp) je 0xa531c movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movq 0x48(%rsp), %rdi movl $0x4, %esi callq 0x926c0 movl 0x14(%rsp), %eax movl %eax, 0x18(%rsp) jmp 0xa537f cmpl $0x2, 0x20(%rsp) je 0xa5368 cmpl $0x3, 0x20(%rsp) je 0xa5368 cmpl $0xa, 0x20(%rsp) je 0xa5368 cmpl $0xb, 0x20(%rsp) je 0xa5368 movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movq 0x48(%rsp), %rdi movl $0x9, %esi callq 0x926c0 movl $0x0, 0x18(%rsp) movq 0x48(%rsp), %rdi callq 0x945c0 movl %eax, 0x2c(%rsp) cmpl $0x1, 0x2c(%rsp) jge 0xa53ab movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movq 0x48(%rsp), %rdi callq 0x945c0 movl %eax, 0x28(%rsp) cmpl $0x1, 0x28(%rsp) jge 0xa53d7 movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movq 0x48(%rsp), %rdi callq 0x90800 movzbl %al, %eax movl %eax, 0x1c(%rsp) movq 0x48(%rsp), %rdi callq 0x90800 cmpl $0x0, 0x18(%rsp) je 0xa5433 cmpl $0x8, 0x1c(%rsp) je 0xa541e cmpl $0x10, 0x1c(%rsp) je 0xa541e movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca movl 0x18(%rsp), %edi xorl %esi, %esi xorl %eax, %eax movl %eax, %edx callq 0xa30a0 movl %eax, 0x24(%rsp) jmp 0xa546e movl 0x1c(%rsp), %eax movl %eax, 0x8(%rsp) movb $0x1, %al cmpl $0x3, 0x20(%rsp) movb %al, 0xf(%rsp) je 0xa5454 cmpl $0xb, 0x20(%rsp) sete %al movb %al, 0xf(%rsp) movl 0x8(%rsp), %edi movb 0xf(%rsp), %al andb $0x1, %al movzbl %al, %esi xorl %eax, %eax movl %eax, %edx callq 0xa30a0 movl %eax, 0x24(%rsp) cmpl $0x0, 0x24(%rsp) jne 0xa5489 movq 0x48(%rsp), %rdi callq 0x907c0 movl $0x0, 0x54(%rsp) jmp 0xa54ca cmpq $0x0, 0x40(%rsp) je 0xa549c movl 0x2c(%rsp), %ecx movq 0x40(%rsp), %rax movl %ecx, (%rax) cmpq $0x0, 0x38(%rsp) je 0xa54af movl 0x28(%rsp), %ecx movq 0x38(%rsp), %rax movl %ecx, (%rax) cmpq $0x0, 0x30(%rsp) je 0xa54c2 movl 0x24(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) movl $0x1, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZL14stbi__tga_infoP13stbi__contextPiS1_S1_: sub rsp, 58h mov [rsp+58h+var_10], rdi mov [rsp+58h+var_18], rsi mov [rsp+58h+var_20], rdx mov [rsp+58h+var_28], rcx mov rdi, [rsp+58h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov rdi, [rsp+58h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+58h+var_48], eax cmp [rsp+58h+var_48], 1 jle short loc_A5281 mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A5281: mov rdi, [rsp+58h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+58h+var_38], eax cmp [rsp+58h+var_48], 1 jnz loc_A5335 cmp [rsp+58h+var_38], 1 jz short loc_A52C2 cmp [rsp+58h+var_38], 9 jz short loc_A52C2 mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A52C2: mov rdi, [rsp+58h+var_10] mov esi, 4 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) mov rdi, [rsp+58h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+58h+var_44], eax cmp [rsp+58h+var_44], 8 jz short loc_A531C cmp [rsp+58h+var_44], 0Fh jz short loc_A531C cmp [rsp+58h+var_44], 10h jz short loc_A531C cmp [rsp+58h+var_44], 18h jz short loc_A531C cmp [rsp+58h+var_44], 20h ; ' ' jz short loc_A531C mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A531C: mov rdi, [rsp+58h+var_10] mov esi, 4 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) mov eax, [rsp+58h+var_44] mov [rsp+58h+var_40], eax jmp short loc_A537F loc_A5335: cmp [rsp+58h+var_38], 2 jz short loc_A5368 cmp [rsp+58h+var_38], 3 jz short loc_A5368 cmp [rsp+58h+var_38], 0Ah jz short loc_A5368 cmp [rsp+58h+var_38], 0Bh jz short loc_A5368 mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A5368: mov rdi, [rsp+58h+var_10] mov esi, 9 call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) mov [rsp+58h+var_40], 0 loc_A537F: mov rdi, [rsp+58h+var_10] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) mov [rsp+58h+var_2C], eax cmp [rsp+58h+var_2C], 1 jge short loc_A53AB mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A53AB: mov rdi, [rsp+58h+var_10] call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *) mov [rsp+58h+var_30], eax cmp [rsp+58h+var_30], 1 jge short loc_A53D7 mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A53D7: mov rdi, [rsp+58h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al mov [rsp+58h+var_3C], eax mov rdi, [rsp+58h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) cmp [rsp+58h+var_40], 0 jz short loc_A5433 cmp [rsp+58h+var_3C], 8 jz short loc_A541E cmp [rsp+58h+var_3C], 10h jz short loc_A541E mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp loc_A54CA loc_A541E: mov edi, [rsp+58h+var_40]; int xor esi, esi; int xor eax, eax mov edx, eax; int * call _ZL18stbi__tga_get_compiiPi; stbi__tga_get_comp(int,int,int *) mov [rsp+58h+var_34], eax jmp short loc_A546E loc_A5433: mov eax, [rsp+58h+var_3C] mov [rsp+58h+var_50], eax mov al, 1 cmp [rsp+58h+var_38], 3 mov [rsp+58h+var_49], al jz short loc_A5454 cmp [rsp+58h+var_38], 0Bh setz al mov [rsp+58h+var_49], al loc_A5454: mov edi, [rsp+58h+var_50]; int mov al, [rsp+58h+var_49] and al, 1 movzx esi, al; int xor eax, eax mov edx, eax; int * call _ZL18stbi__tga_get_compiiPi; stbi__tga_get_comp(int,int,int *) mov [rsp+58h+var_34], eax loc_A546E: cmp [rsp+58h+var_34], 0 jnz short loc_A5489 mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp short loc_A54CA loc_A5489: cmp [rsp+58h+var_18], 0 jz short loc_A549C mov ecx, [rsp+58h+var_2C] mov rax, [rsp+58h+var_18] mov [rax], ecx loc_A549C: cmp [rsp+58h+var_20], 0 jz short loc_A54AF mov ecx, [rsp+58h+var_30] mov rax, [rsp+58h+var_20] mov [rax], ecx loc_A54AF: cmp [rsp+58h+var_28], 0 jz short loc_A54C2 mov ecx, [rsp+58h+var_34] mov rax, [rsp+58h+var_28] mov [rax], ecx loc_A54C2: mov [rsp+58h+var_4], 1 loc_A54CA: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long stbi__tga_info(_QWORD *a1, int *a2, int *a3, _DWORD *a4) { bool v5; // [rsp+Fh] [rbp-49h] unsigned int v6; // [rsp+10h] [rbp-48h] int v7; // [rsp+14h] [rbp-44h] int v8; // [rsp+18h] [rbp-40h] int v9; // [rsp+1Ch] [rbp-3Ch] int v10; // [rsp+20h] [rbp-38h] int comp; // [rsp+24h] [rbp-34h] int v12; // [rsp+28h] [rbp-30h] int v13; // [rsp+2Ch] [rbp-2Ch] stbi__get8((long long)a1); v6 = (unsigned __int8)stbi__get8((long long)a1); if ( v6 > 1 ) goto LABEL_29; v10 = (unsigned __int8)stbi__get8((long long)a1); if ( v6 == 1 ) { if ( v10 != 1 && v10 != 9 ) goto LABEL_29; stbi__skip((long long)a1, 4); v7 = (unsigned __int8)stbi__get8((long long)a1); if ( v7 != 8 && v7 != 15 && v7 != 16 && v7 != 24 && v7 != 32 ) goto LABEL_29; stbi__skip((long long)a1, 4); v8 = v7; } else { if ( v10 != 2 && v10 != 3 && v10 != 10 && v10 != 11 ) goto LABEL_29; stbi__skip((long long)a1, 9); v8 = 0; } v13 = stbi__get16le((long long)a1); if ( v13 < 1 ) goto LABEL_29; v12 = stbi__get16le((long long)a1); if ( v12 < 1 ) goto LABEL_29; v9 = (unsigned __int8)stbi__get8((long long)a1); stbi__get8((long long)a1); if ( v8 ) { if ( v9 != 8 && v9 != 16 ) goto LABEL_29; comp = stbi__tga_get_comp(v8, 0, 0LL); } else { v5 = 1; if ( v10 != 3 ) v5 = v10 == 11; comp = stbi__tga_get_comp(v9, v5, 0LL); } if ( !comp ) { LABEL_29: stbi__rewind(a1); return 0; } if ( a2 ) *a2 = v13; if ( a3 ) *a3 = v12; if ( a4 ) *a4 = comp; return 1; }
stbi__tga_info: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV qword ptr [RSP + 0x40],RSI MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x30],RCX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00190800 MOV RDI,qword ptr [RSP + 0x48] CALL 0x00190800 MOVZX EAX,AL MOV dword ptr [RSP + 0x10],EAX CMP dword ptr [RSP + 0x10],0x1 JLE 0x001a5281 MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a5281: MOV RDI,qword ptr [RSP + 0x48] CALL 0x00190800 MOVZX EAX,AL MOV dword ptr [RSP + 0x20],EAX CMP dword ptr [RSP + 0x10],0x1 JNZ 0x001a5335 CMP dword ptr [RSP + 0x20],0x1 JZ 0x001a52c2 CMP dword ptr [RSP + 0x20],0x9 JZ 0x001a52c2 MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a52c2: MOV RDI,qword ptr [RSP + 0x48] MOV ESI,0x4 CALL 0x001926c0 MOV RDI,qword ptr [RSP + 0x48] CALL 0x00190800 MOVZX EAX,AL MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x14],0x8 JZ 0x001a531c CMP dword ptr [RSP + 0x14],0xf JZ 0x001a531c CMP dword ptr [RSP + 0x14],0x10 JZ 0x001a531c CMP dword ptr [RSP + 0x14],0x18 JZ 0x001a531c CMP dword ptr [RSP + 0x14],0x20 JZ 0x001a531c MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a531c: MOV RDI,qword ptr [RSP + 0x48] MOV ESI,0x4 CALL 0x001926c0 MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x18],EAX JMP 0x001a537f LAB_001a5335: CMP dword ptr [RSP + 0x20],0x2 JZ 0x001a5368 CMP dword ptr [RSP + 0x20],0x3 JZ 0x001a5368 CMP dword ptr [RSP + 0x20],0xa JZ 0x001a5368 CMP dword ptr [RSP + 0x20],0xb JZ 0x001a5368 MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a5368: MOV RDI,qword ptr [RSP + 0x48] MOV ESI,0x9 CALL 0x001926c0 MOV dword ptr [RSP + 0x18],0x0 LAB_001a537f: MOV RDI,qword ptr [RSP + 0x48] CALL 0x001945c0 MOV dword ptr [RSP + 0x2c],EAX CMP dword ptr [RSP + 0x2c],0x1 JGE 0x001a53ab MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a53ab: MOV RDI,qword ptr [RSP + 0x48] CALL 0x001945c0 MOV dword ptr [RSP + 0x28],EAX CMP dword ptr [RSP + 0x28],0x1 JGE 0x001a53d7 MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a53d7: MOV RDI,qword ptr [RSP + 0x48] CALL 0x00190800 MOVZX EAX,AL MOV dword ptr [RSP + 0x1c],EAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00190800 CMP dword ptr [RSP + 0x18],0x0 JZ 0x001a5433 CMP dword ptr [RSP + 0x1c],0x8 JZ 0x001a541e CMP dword ptr [RSP + 0x1c],0x10 JZ 0x001a541e MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a541e: MOV EDI,dword ptr [RSP + 0x18] XOR ESI,ESI XOR EAX,EAX MOV EDX,EAX CALL 0x001a30a0 MOV dword ptr [RSP + 0x24],EAX JMP 0x001a546e LAB_001a5433: MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x8],EAX MOV AL,0x1 CMP dword ptr [RSP + 0x20],0x3 MOV byte ptr [RSP + 0xf],AL JZ 0x001a5454 CMP dword ptr [RSP + 0x20],0xb SETZ AL MOV byte ptr [RSP + 0xf],AL LAB_001a5454: MOV EDI,dword ptr [RSP + 0x8] MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOVZX ESI,AL XOR EAX,EAX MOV EDX,EAX CALL 0x001a30a0 MOV dword ptr [RSP + 0x24],EAX LAB_001a546e: CMP dword ptr [RSP + 0x24],0x0 JNZ 0x001a5489 MOV RDI,qword ptr [RSP + 0x48] CALL 0x001907c0 MOV dword ptr [RSP + 0x54],0x0 JMP 0x001a54ca LAB_001a5489: CMP qword ptr [RSP + 0x40],0x0 JZ 0x001a549c MOV ECX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX],ECX LAB_001a549c: CMP qword ptr [RSP + 0x38],0x0 JZ 0x001a54af MOV ECX,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX],ECX LAB_001a54af: CMP qword ptr [RSP + 0x30],0x0 JZ 0x001a54c2 MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX LAB_001a54c2: MOV dword ptr [RSP + 0x54],0x1 LAB_001a54ca: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
/* stbi__tga_info(stbi__context*, int*, int*, int*) */ int4 stbi__tga_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4) { byte bVar1; char cVar2; int iVar3; int iVar4; uint uVar5; bool local_49; uint local_40; int local_34; int4 local_4; stbi__get8(param_1); bVar1 = stbi__get8(param_1); if (1 < bVar1) { stbi__rewind(param_1); return 0; } cVar2 = stbi__get8(param_1); if (bVar1 == 1) { if ((cVar2 != '\x01') && (cVar2 != '\t')) { stbi__rewind(param_1); return 0; } stbi__skip(param_1,4); bVar1 = stbi__get8(param_1); local_40 = (uint)bVar1; if (((local_40 != 8) && (local_40 != 0xf)) && ((local_40 != 0x10 && ((local_40 != 0x18 && (local_40 != 0x20)))))) { stbi__rewind(param_1); return 0; } stbi__skip(param_1,4); } else { if ((((cVar2 != '\x02') && (cVar2 != '\x03')) && (cVar2 != '\n')) && (cVar2 != '\v')) { stbi__rewind(param_1); return 0; } stbi__skip(param_1,9); local_40 = 0; } iVar3 = stbi__get16le(param_1); if (iVar3 < 1) { stbi__rewind(param_1); local_4 = 0; } else { iVar4 = stbi__get16le(param_1); if (iVar4 < 1) { stbi__rewind(param_1); local_4 = 0; } else { bVar1 = stbi__get8(param_1); uVar5 = (uint)bVar1; stbi__get8(param_1); if (local_40 == 0) { local_49 = cVar2 == '\x03' || cVar2 == '\v'; local_34 = stbi__tga_get_comp(uVar5,(uint)local_49,(int *)0x0); } else { if ((uVar5 != 8) && (uVar5 != 0x10)) { stbi__rewind(param_1); return 0; } local_34 = stbi__tga_get_comp(local_40,0,(int *)0x0); } if (local_34 == 0) { stbi__rewind(param_1); local_4 = 0; } else { if (param_2 != (int *)0x0) { *param_2 = iVar3; } if (param_3 != (int *)0x0) { *param_3 = iVar4; } if (param_4 != (int *)0x0) { *param_4 = local_34; } local_4 = 1; } } } return local_4; }
37,127
js_typed_array_subarray
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_subarray(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSArrayBuffer *abuf; JSTypedArray *ta; JSValue args[4]; JSValue arr, byteOffset, ta_buffer; JSObject *p; int len, start, final, count, shift, offset; p = get_typed_array(ctx, this_val); if (!p) goto exception; len = p->u.array.count; if (JS_ToInt32Clamp(ctx, &start, argv[0], 0, len, len)) goto exception; final = len; if (!JS_IsUndefined(argv[1])) { if (JS_ToInt32Clamp(ctx, &final, argv[1], 0, len, len)) goto exception; } count = max_int(final - start, 0); byteOffset = js_typed_array_get_byteOffset(ctx, this_val); if (JS_IsException(byteOffset)) goto exception; ta = p->u.typed_array; abuf = ta->buffer->u.array_buffer; if (ta->offset > abuf->byte_length) goto range_error; if (ta->offset == abuf->byte_length && count > 0) { range_error: JS_ThrowRangeError(ctx, "invalid offset"); goto exception; } shift = typed_array_size_log2(p->class_id); offset = JS_VALUE_GET_INT(byteOffset) + (start << shift); JS_FreeValue(ctx, byteOffset); ta_buffer = js_typed_array_get_buffer(ctx, this_val); if (JS_IsException(ta_buffer)) goto exception; args[0] = this_val; args[1] = ta_buffer; args[2] = js_int32(offset); args[3] = js_int32(count); // result is length-tracking if source TA is and no explicit count is given if (ta->track_rab && JS_IsUndefined(argv[1])) args[3] = JS_UNDEFINED; arr = js_typed_array___speciesCreate(ctx, JS_UNDEFINED, 4, args); JS_FreeValue(ctx, ta_buffer); return arr; exception: return JS_EXCEPTION; }
O0
c
js_typed_array_subarray: subq $0x168, %rsp # imm = 0x168 movq %rsi, 0x148(%rsp) movq %rdx, 0x150(%rsp) movq %rdi, 0x140(%rsp) movl %ecx, 0x13c(%rsp) movq %r8, 0x130(%rsp) movq 0x140(%rsp), %rdi movq 0x148(%rsp), %rsi movq 0x150(%rsp), %rdx callq 0x57680 movq %rax, 0xa8(%rsp) cmpq $0x0, 0xa8(%rsp) jne 0xdf7a3 jmp 0xdfbc9 movq 0xa8(%rsp), %rax movl 0x40(%rax), %eax movl %eax, 0xa4(%rsp) movq 0x140(%rsp), %rdi movq 0x130(%rsp), %rcx movl 0xa4(%rsp), %r9d movl 0xa4(%rsp), %eax movq (%rcx), %rdx movq 0x8(%rcx), %rcx leaq 0xa0(%rsp), %rsi xorl %r8d, %r8d movl %eax, (%rsp) callq 0x37590 cmpl $0x0, %eax je 0xdf7f8 jmp 0xdfbc9 movl 0xa4(%rsp), %eax movl %eax, 0x9c(%rsp) movq 0x130(%rsp), %rax movq 0x10(%rax), %rdi movq 0x18(%rax), %rsi callq 0x2cfa0 cmpl $0x0, %eax jne 0xdf866 movq 0x140(%rsp), %rdi movq 0x130(%rsp), %rcx movl 0xa4(%rsp), %r9d movl 0xa4(%rsp), %eax movq 0x10(%rcx), %rdx movq 0x18(%rcx), %rcx leaq 0x9c(%rsp), %rsi xorl %r8d, %r8d movl %eax, (%rsp) callq 0x37590 cmpl $0x0, %eax je 0xdf864 jmp 0xdfbc9 jmp 0xdf866 movl 0x9c(%rsp), %edi subl 0xa0(%rsp), %edi xorl %esi, %esi callq 0x5c050 movl %eax, 0x98(%rsp) movq 0x140(%rsp), %rdi movq 0x148(%rsp), %rsi movq 0x150(%rsp), %rdx callq 0xdde80 movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) movq 0x80(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x88(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc0(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0xdf8ee jmp 0xdfbc9 movq 0xa8(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x120(%rsp) movq 0x120(%rsp), %rax movq 0x18(%rax), %rax movq 0x30(%rax), %rax movq %rax, 0x128(%rsp) movq 0x120(%rsp), %rax movl 0x20(%rax), %eax movq 0x128(%rsp), %rcx cmpl (%rcx), %eax jbe 0xdf933 jmp 0xdf956 movq 0x120(%rsp), %rax movl 0x20(%rax), %eax movq 0x128(%rsp), %rcx cmpl (%rcx), %eax jne 0xdf97b cmpl $0x0, 0x98(%rsp) jle 0xdf97b jmp 0xdf956 movq 0x140(%rsp), %rdi leaq 0x303eb(%rip), %rsi # 0x10fd50 movb $0x0, %al callq 0x283b0 movq %rax, 0x70(%rsp) movq %rdx, 0x78(%rsp) jmp 0xdfbc9 movq 0xa8(%rsp), %rax movzwl 0x6(%rax), %eax subl $0x15, %eax movslq %eax, %rcx leaq 0x2b8eb(%rip), %rax # 0x10b27f movzbl (%rax,%rcx), %eax movl %eax, 0x94(%rsp) movl 0xc0(%rsp), %eax movl 0xa0(%rsp), %edx movl 0x94(%rsp), %ecx shll %cl, %edx movl %edx, %ecx addl %ecx, %eax movl %eax, 0x90(%rsp) movq 0x140(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx callq 0x229d0 movq 0x140(%rsp), %rdi movq 0x148(%rsp), %rsi movq 0x150(%rsp), %rdx callq 0xddcf0 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0xdfa3e jmp 0xdfbc9 movq 0x148(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0x150(%rsp), %rax movq %rax, 0xe8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0xf8(%rsp) movl 0x90(%rsp), %edi callq 0x32a00 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x108(%rsp) movl 0x98(%rsp), %edi callq 0x32a00 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x120(%rsp), %rax cmpl $0x0, 0x28(%rax) je 0xdfb31 movq 0x130(%rsp), %rax movq 0x10(%rax), %rdi movq 0x18(%rax), %rsi callq 0x2cfa0 cmpl $0x0, %eax je 0xdfb31 movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x140(%rsp), %rdi movl $0x0, 0x10(%rsp) movq $0x3, 0x18(%rsp) leaq 0xe0(%rsp), %r8 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movl $0x4, %ecx callq 0xcd100 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0x28(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0x140(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x229d0 movq 0xd0(%rsp), %rax movq %rax, 0x158(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x160(%rsp) jmp 0xdfbe0 movl $0x0, 0x158(%rsp) movq $0x6, 0x160(%rsp) movq 0x158(%rsp), %rax movq 0x160(%rsp), %rdx addq $0x168, %rsp # imm = 0x168 retq nopl (%rax,%rax)
js_typed_array_subarray: sub rsp, 168h mov [rsp+168h+var_20], rsi mov [rsp+168h+var_18], rdx mov [rsp+168h+var_28], rdi mov [rsp+168h+var_2C], ecx mov [rsp+168h+var_38], r8 mov rdi, [rsp+168h+var_28] mov rsi, [rsp+168h+var_20] mov rdx, [rsp+168h+var_18] call get_typed_array mov [rsp+168h+var_C0], rax cmp [rsp+168h+var_C0], 0 jnz short loc_DF7A3 jmp loc_DFBC9 loc_DF7A3: mov rax, [rsp+168h+var_C0] mov eax, [rax+40h] mov [rsp+168h+var_C4], eax mov rdi, [rsp+168h+var_28] mov rcx, [rsp+168h+var_38] mov r9d, [rsp+168h+var_C4] mov eax, [rsp+168h+var_C4] mov rdx, [rcx] mov rcx, [rcx+8] lea rsi, [rsp+168h+var_C8] xor r8d, r8d mov [rsp+168h+var_168], eax call JS_ToInt32Clamp cmp eax, 0 jz short loc_DF7F8 jmp loc_DFBC9 loc_DF7F8: mov eax, [rsp+168h+var_C4] mov [rsp+168h+var_CC], eax mov rax, [rsp+168h+var_38] mov rdi, [rax+10h] mov rsi, [rax+18h] call JS_IsUndefined_0 cmp eax, 0 jnz short loc_DF866 mov rdi, [rsp+168h+var_28] mov rcx, [rsp+168h+var_38] mov r9d, [rsp+168h+var_C4] mov eax, [rsp+168h+var_C4] mov rdx, [rcx+10h] mov rcx, [rcx+18h] lea rsi, [rsp+168h+var_CC] xor r8d, r8d mov [rsp+168h+var_168], eax call JS_ToInt32Clamp cmp eax, 0 jz short loc_DF864 jmp loc_DFBC9 loc_DF864: jmp short $+2 loc_DF866: mov edi, [rsp+168h+var_CC] sub edi, [rsp+168h+var_C8] xor esi, esi call max_int_0 mov [rsp+168h+var_D0], eax mov rdi, [rsp+168h+var_28] mov rsi, [rsp+168h+var_20] mov rdx, [rsp+168h+var_18] call js_typed_array_get_byteOffset mov [rsp+168h+var_E8], rax mov [rsp+168h+var_E0], rdx mov rax, [rsp+168h+var_E8] mov [rsp+168h+var_A8], rax mov rax, [rsp+168h+var_E0] mov [rsp+168h+var_A0], rax mov rdi, [rsp+168h+var_A8] mov rsi, [rsp+168h+var_A0] call JS_IsException_1 cmp eax, 0 jz short loc_DF8EE jmp loc_DFBC9 loc_DF8EE: mov rax, [rsp+168h+var_C0] mov rax, [rax+30h] mov [rsp+168h+var_48], rax mov rax, [rsp+168h+var_48] mov rax, [rax+18h] mov rax, [rax+30h] mov [rsp+168h+var_40], rax mov rax, [rsp+168h+var_48] mov eax, [rax+20h] mov rcx, [rsp+168h+var_40] cmp eax, [rcx] jbe short loc_DF933 jmp short loc_DF956 loc_DF933: mov rax, [rsp+168h+var_48] mov eax, [rax+20h] mov rcx, [rsp+168h+var_40] cmp eax, [rcx] jnz short loc_DF97B cmp [rsp+168h+var_D0], 0 jle short loc_DF97B jmp short $+2 loc_DF956: mov rdi, [rsp+168h+var_28] lea rsi, aInvalidOffset; "invalid offset" mov al, 0 call JS_ThrowRangeError mov [rsp+168h+var_F8], rax mov [rsp+168h+var_F0], rdx jmp loc_DFBC9 loc_DF97B: mov rax, [rsp+168h+var_C0] movzx eax, word ptr [rax+6] sub eax, 15h movsxd rcx, eax lea rax, typed_array_size_log2 movzx eax, byte ptr [rax+rcx] mov [rsp+168h+var_D4], eax mov eax, dword ptr [rsp+168h+var_A8] mov edx, [rsp+168h+var_C8] mov ecx, [rsp+168h+var_D4] shl edx, cl mov ecx, edx add eax, ecx mov [rsp+168h+var_D8], eax mov rdi, [rsp+168h+var_28] mov rsi, [rsp+168h+var_A8] mov rdx, [rsp+168h+var_A0] call JS_FreeValue mov rdi, [rsp+168h+var_28] mov rsi, [rsp+168h+var_20] mov rdx, [rsp+168h+var_18] call js_typed_array_get_buffer mov [rsp+168h+var_108], rax mov [rsp+168h+var_100], rdx mov rax, [rsp+168h+var_108] mov [rsp+168h+var_B8], rax mov rax, [rsp+168h+var_100] mov [rsp+168h+var_B0], rax mov rdi, [rsp+168h+var_B8] mov rsi, [rsp+168h+var_B0] call JS_IsException_1 cmp eax, 0 jz short loc_DFA3E jmp loc_DFBC9 loc_DFA3E: mov rax, [rsp+168h+var_20] mov [rsp+168h+var_88], rax mov rax, [rsp+168h+var_18] mov [rsp+168h+var_80], rax mov rax, [rsp+168h+var_B8] mov [rsp+168h+var_78], rax mov rax, [rsp+168h+var_B0] mov [rsp+168h+var_70], rax mov edi, [rsp+168h+var_D8] call js_int32 mov [rsp+168h+var_118], rax mov [rsp+168h+var_110], rdx mov rax, [rsp+168h+var_118] mov [rsp+168h+var_68], rax mov rax, [rsp+168h+var_110] mov [rsp+168h+var_60], rax mov edi, [rsp+168h+var_D0] call js_int32 mov [rsp+168h+var_128], rax mov [rsp+168h+var_120], rdx mov rax, [rsp+168h+var_128] mov [rsp+168h+var_58], rax mov rax, [rsp+168h+var_120] mov [rsp+168h+var_50], rax mov rax, [rsp+168h+var_48] cmp dword ptr [rax+28h], 0 jz short loc_DFB31 mov rax, [rsp+168h+var_38] mov rdi, [rax+10h] mov rsi, [rax+18h] call JS_IsUndefined_0 cmp eax, 0 jz short loc_DFB31 mov dword ptr [rsp+168h+var_138], 0 mov [rsp+168h+var_130], 3 mov rax, [rsp+168h+var_138] mov [rsp+168h+var_58], rax mov rax, [rsp+168h+var_130] mov [rsp+168h+var_50], rax loc_DFB31: mov rdi, [rsp+168h+var_28] mov dword ptr [rsp+168h+var_158], 0 mov [rsp+168h+var_150], 3 lea r8, [rsp+168h+var_88] mov rsi, [rsp+168h+var_158] mov rdx, [rsp+168h+var_150] mov ecx, 4 call js_typed_array___speciesCreate mov [rsp+168h+var_148], rax mov [rsp+168h+var_140], rdx mov rax, [rsp+168h+var_148] mov [rsp+168h+var_98], rax mov rax, [rsp+168h+var_140] mov [rsp+168h+var_90], rax mov rdi, [rsp+168h+var_28] mov rsi, [rsp+168h+var_B8] mov rdx, [rsp+168h+var_B0] call JS_FreeValue mov rax, [rsp+168h+var_98] mov [rsp+168h+var_10], rax mov rax, [rsp+168h+var_90] mov [rsp+168h+var_8], rax jmp short loc_DFBE0 loc_DFBC9: mov dword ptr [rsp+168h+var_10], 0 mov [rsp+168h+var_8], 6 loc_DFBE0: mov rax, [rsp+168h+var_10] mov rdx, [rsp+168h+var_8] add rsp, 168h retn
long long js_typed_array_subarray( 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) { long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v20; // rdx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 long long v25; // rcx long long v26; // rcx long long v27; // r8 long long v28; // r9 __m128 v29; // xmm4 __m128 v30; // xmm5 long long v31; // rdx long long v32; // rdx long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 long long v36; // rdx long long v37; // rdx char v39; // [rsp+0h] [rbp-168h] long long v40; // [rsp+10h] [rbp-158h] long long v41; // [rsp+30h] [rbp-138h] int v42; // [rsp+90h] [rbp-D8h] int v43; // [rsp+98h] [rbp-D0h] int v44; // [rsp+9Ch] [rbp-CCh] BYREF int v45; // [rsp+A0h] [rbp-C8h] BYREF int v46; // [rsp+A4h] [rbp-C4h] long long typed_array; // [rsp+A8h] [rbp-C0h] _DWORD *buffer; // [rsp+B0h] [rbp-B8h] long long v49; // [rsp+B8h] [rbp-B0h] long long byteOffset; // [rsp+C0h] [rbp-A8h] long long v51; // [rsp+C8h] [rbp-A0h] long long v52; // [rsp+D0h] [rbp-98h] long long v53; // [rsp+D8h] [rbp-90h] long long v54[6]; // [rsp+E0h] [rbp-88h] BYREF long long v55; // [rsp+110h] [rbp-58h] long long v56; // [rsp+118h] [rbp-50h] long long v57; // [rsp+120h] [rbp-48h] _DWORD *v58; // [rsp+128h] [rbp-40h] long long v59; // [rsp+130h] [rbp-38h] int v60; // [rsp+13Ch] [rbp-2Ch] long long v61; // [rsp+140h] [rbp-28h] long long v62; // [rsp+148h] [rbp-20h] long long v63; // [rsp+150h] [rbp-18h] long long v64; // [rsp+158h] [rbp-10h] long long v65; // [rsp+160h] [rbp-8h] v62 = a2; v63 = a3; v61 = a1; v60 = a4; v59 = a5; typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( !typed_array ) goto LABEL_15; v46 = *(_DWORD *)(typed_array + 64); if ( (unsigned int)JS_ToInt32Clamp(v61, &v45, *(_DWORD **)v59, *(_QWORD *)(v59 + 8), 0, v46, v46) ) goto LABEL_15; v44 = v46; if ( !JS_IsUndefined_0(*(_QWORD *)(v59 + 16), *(_QWORD *)(v59 + 24)) ) { if ( (unsigned int)JS_ToInt32Clamp(v61, &v44, *(_DWORD **)(v59 + 16), *(_QWORD *)(v59 + 24), 0, v46, v46) ) goto LABEL_15; } v43 = max_int_0(v44 - v45, 0); byteOffset = js_typed_array_get_byteOffset(v61, v62, v63, v14, v15, v16, a7, a8, a9, a10, v17, v18, a13, a14); v51 = v19; if ( JS_IsException_1(byteOffset, v19) ) goto LABEL_15; v57 = *(_QWORD *)(typed_array + 48); v58 = *(_DWORD **)(*(_QWORD *)(v57 + 24) + 48LL); v25 = (long long)v58; if ( *(_DWORD *)(v57 + 32) > *v58 || (v25 = (long long)v58, *(_DWORD *)(v57 + 32) == *v58) && v43 > 0 ) { JS_ThrowRangeError(v61, (long long)"invalid offset", v20, v25, v21, v22, a7, a8, a9, a10, v23, v24, a13, a14, v39); LABEL_15: LODWORD(v64) = 0; v65 = 6LL; return v64; } v42 = (v45 << typed_array_size_log2[*(unsigned __int16 *)(typed_array + 6) - 21]) + byteOffset; JS_FreeValue(v61, byteOffset, v51); buffer = js_typed_array_get_buffer(v61, v62, v63, v26, v27, v28, a7, a8, a9, a10, v29, v30, a13, a14); v49 = v31; if ( JS_IsException_1((long long)buffer, v31) ) goto LABEL_15; v54[0] = v62; v54[1] = v63; v54[2] = (long long)buffer; v54[3] = v49; v54[4] = js_int32(v42); v54[5] = v32; v55 = js_int32(v43); v56 = v36; if ( *(_DWORD *)(v57 + 40) && JS_IsUndefined_0(*(_QWORD *)(v59 + 16), *(_QWORD *)(v59 + 24)) ) { LODWORD(v41) = 0; v55 = v41; v56 = 3LL; } LODWORD(v40) = 0; v52 = js_typed_array___speciesCreate(v61, a7, a8, a9, a10, v34, v35, a13, a14, v40, 3LL, 4, v54, v33); v53 = v37; JS_FreeValue(v61, (long long)buffer, v49); v64 = v52; v65 = v53; return v64; }
js_typed_array_subarray: SUB RSP,0x168 MOV qword ptr [RSP + 0x148],RSI MOV qword ptr [RSP + 0x150],RDX MOV qword ptr [RSP + 0x140],RDI MOV dword ptr [RSP + 0x13c],ECX MOV qword ptr [RSP + 0x130],R8 MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x148] MOV RDX,qword ptr [RSP + 0x150] CALL 0x00157680 MOV qword ptr [RSP + 0xa8],RAX CMP qword ptr [RSP + 0xa8],0x0 JNZ 0x001df7a3 JMP 0x001dfbc9 LAB_001df7a3: MOV RAX,qword ptr [RSP + 0xa8] MOV EAX,dword ptr [RAX + 0x40] MOV dword ptr [RSP + 0xa4],EAX MOV RDI,qword ptr [RSP + 0x140] MOV RCX,qword ptr [RSP + 0x130] MOV R9D,dword ptr [RSP + 0xa4] MOV EAX,dword ptr [RSP + 0xa4] MOV RDX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] LEA RSI,[RSP + 0xa0] XOR R8D,R8D MOV dword ptr [RSP],EAX CALL 0x00137590 CMP EAX,0x0 JZ 0x001df7f8 JMP 0x001dfbc9 LAB_001df7f8: MOV EAX,dword ptr [RSP + 0xa4] MOV dword ptr [RSP + 0x9c],EAX MOV RAX,qword ptr [RSP + 0x130] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RAX + 0x18] CALL 0x0012cfa0 CMP EAX,0x0 JNZ 0x001df866 MOV RDI,qword ptr [RSP + 0x140] MOV RCX,qword ptr [RSP + 0x130] MOV R9D,dword ptr [RSP + 0xa4] MOV EAX,dword ptr [RSP + 0xa4] MOV RDX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RCX + 0x18] LEA RSI,[RSP + 0x9c] XOR R8D,R8D MOV dword ptr [RSP],EAX CALL 0x00137590 CMP EAX,0x0 JZ 0x001df864 JMP 0x001dfbc9 LAB_001df864: JMP 0x001df866 LAB_001df866: MOV EDI,dword ptr [RSP + 0x9c] SUB EDI,dword ptr [RSP + 0xa0] XOR ESI,ESI CALL 0x0015c050 MOV dword ptr [RSP + 0x98],EAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x148] MOV RDX,qword ptr [RSP + 0x150] CALL 0x001dde80 MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xc8] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001df8ee JMP 0x001dfbc9 LAB_001df8ee: MOV RAX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0x120] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x120] MOV EAX,dword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x128] CMP EAX,dword ptr [RCX] JBE 0x001df933 JMP 0x001df956 LAB_001df933: MOV RAX,qword ptr [RSP + 0x120] MOV EAX,dword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x128] CMP EAX,dword ptr [RCX] JNZ 0x001df97b CMP dword ptr [RSP + 0x98],0x0 JLE 0x001df97b JMP 0x001df956 LAB_001df956: MOV RDI,qword ptr [RSP + 0x140] LEA RSI,[0x20fd50] MOV AL,0x0 CALL 0x001283b0 MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x78],RDX JMP 0x001dfbc9 LAB_001df97b: MOV RAX,qword ptr [RSP + 0xa8] MOVZX EAX,word ptr [RAX + 0x6] SUB EAX,0x15 MOVSXD RCX,EAX LEA RAX,[0x20b27f] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0x94],EAX MOV EAX,dword ptr [RSP + 0xc0] MOV EDX,dword ptr [RSP + 0xa0] MOV ECX,dword ptr [RSP + 0x94] SHL EDX,CL MOV ECX,EDX ADD EAX,ECX MOV dword ptr [RSP + 0x90],EAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0x148] MOV RDX,qword ptr [RSP + 0x150] CALL 0x001ddcf0 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001dfa3e JMP 0x001dfbc9 LAB_001dfa3e: MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0xe8],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0xf8],RAX MOV EDI,dword ptr [RSP + 0x90] CALL 0x00132a00 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x108],RAX MOV EDI,dword ptr [RSP + 0x98] CALL 0x00132a00 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x118],RAX MOV RAX,qword ptr [RSP + 0x120] CMP dword ptr [RAX + 0x28],0x0 JZ 0x001dfb31 MOV RAX,qword ptr [RSP + 0x130] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RAX + 0x18] CALL 0x0012cfa0 CMP EAX,0x0 JZ 0x001dfb31 MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x118],RAX LAB_001dfb31: MOV RDI,qword ptr [RSP + 0x140] MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x3 LEA R8,[RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV ECX,0x4 CALL 0x001cd100 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0x140] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x158],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x160],RAX JMP 0x001dfbe0 LAB_001dfbc9: MOV dword ptr [RSP + 0x158],0x0 MOV qword ptr [RSP + 0x160],0x6 LAB_001dfbe0: MOV RAX,qword ptr [RSP + 0x158] MOV RDX,qword ptr [RSP + 0x160] ADD RSP,0x168 RET
int1 [16] js_typed_array_subarray (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int8 uVar2; int iVar3; int iVar4; int iVar5; uint uStack_154; uint uStack_134; int local_cc; int local_c8; int local_c4; long local_c0; int1 local_b8 [16]; int1 local_a8 [16]; int1 local_98 [16]; int8 local_88; int8 local_80; int1 local_78 [16]; int1 local_68 [16]; int1 local_58 [16]; long local_48; uint *local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_c0 = get_typed_array(param_1,param_2,param_3); if (local_c0 != 0) { local_c4 = *(int *)(local_c0 + 0x40); iVar3 = JS_ToInt32Clamp(local_28,&local_c8,*local_38,local_38[1],0,local_c4,local_c4); if (iVar3 == 0) { local_cc = local_c4; iVar3 = JS_IsUndefined(local_38[2],local_38[3]); if ((iVar3 != 0) || (iVar3 = JS_ToInt32Clamp(local_28,&local_cc,local_38[2],local_38[3],0,local_c4,local_c4), iVar3 == 0)) { iVar3 = max_int(local_cc - local_c8,0); local_a8 = js_typed_array_get_byteOffset(local_28,local_20,local_18); iVar4 = JS_IsException(local_a8._0_8_,local_a8._8_8_); uVar2 = local_a8._0_8_; if (iVar4 == 0) { local_48 = *(long *)(local_c0 + 0x30); local_40 = *(uint **)(*(long *)(local_48 + 0x18) + 0x30); if ((*local_40 < *(uint *)(local_48 + 0x20)) || ((*(uint *)(local_48 + 0x20) == *local_40 && (0 < iVar3)))) { JS_ThrowRangeError(local_28,"invalid offset"); } else { iVar4 = local_a8._0_4_ + (local_c8 << ((&typed_array_size_log2)[(int)(*(ushort *)(local_c0 + 6) - 0x15)] & 0x1f)); JS_FreeValue(local_28,uVar2,local_a8._8_8_); local_b8 = js_typed_array_get_buffer(local_28,local_20,local_18); iVar5 = JS_IsException(local_b8._0_8_,local_b8._8_8_); if (iVar5 == 0) { local_88 = local_20; local_80 = local_18; local_78 = local_b8; local_68 = js_int32(iVar4); local_58 = js_int32(iVar3); if (*(int *)(local_48 + 0x28) != 0) { iVar3 = JS_IsUndefined(local_38[2],local_38[3]); if (iVar3 != 0) { local_58._8_8_ = 3; local_58._0_8_ = (ulong)uStack_134 << 0x20; } } local_98 = js_typed_array___speciesCreate (local_28,(ulong)uStack_154 << 0x20,3,4,&local_88); JS_FreeValue(local_28,local_b8._0_8_,local_b8._8_8_); local_10 = local_98._0_4_; uStack_c = local_98._4_4_; local_8 = local_98._8_8_; goto LAB_001dfbe0; } } } } } } local_10 = 0; local_8 = 6; LAB_001dfbe0: auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
37,128
test_conc504
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_conc504(MYSQL *mysql) { int rc; MYSQL_STMT *stmt= mysql_stmt_init(mysql); const char *sp= "CREATE PROCEDURE p1()\n" \ "BEGIN\n"\ " SELECT 1;\n"\ " SELECT 2;\n"\ " SELECT 3;\n"\ "END"; rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, sp); check_mysql_rc(rc, mysql); rc= mysql_stmt_prepare(stmt, SL("CALL p1()")); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); mysql_stmt_store_result(stmt); FAIL_IF(mysql_stmt_num_rows(stmt) != 1, "Expected 1 row"); mysql_stmt_next_result(stmt); mysql_stmt_store_result(stmt); FAIL_IF(mysql_stmt_num_rows(stmt) != 1, "Expected 1 row"); mysql_stmt_next_result(stmt); mysql_stmt_store_result(stmt); FAIL_IF(mysql_stmt_num_rows(stmt) != 1, "Expected 1 row"); mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP PROCEDURE p1"); check_mysql_rc(rc, mysql); return OK; }
O0
c
test_conc504: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x44950 movq %rax, -0x20(%rbp) leaq 0x4f638(%rip), %rax # 0x66558 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi leaq 0x4f66d(%rip), %rsi # 0x6659c callq 0x38a70 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x16f89 movl -0x14(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0x34(%rbp), %esi movq -0x30(%rbp), %rdx movl %eax, %ecx leaq 0x4e76c(%rip), %rdi # 0x656d5 leaq 0x4f0fd(%rip), %r8 # 0x6606d movl $0x14a1, %r9d # imm = 0x14A1 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x16f8b movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x38a70 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x16fed movl -0x14(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0x44(%rbp), %esi movq -0x40(%rbp), %rdx movl %eax, %ecx leaq 0x4e708(%rip), %rdi # 0x656d5 leaq 0x4f099(%rip), %r8 # 0x6606d movl $0x14a4, %r9d # imm = 0x14A4 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x16fef movq -0x20(%rbp), %rdi leaq 0x4f5be(%rip), %rsi # 0x665b8 movl $0x9, %edx callq 0x45070 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1703f movq -0x20(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x4e570(%rip), %rdi # 0x65590 leaq 0x4f046(%rip), %rdx # 0x6606d movl $0x14a7, %ecx # imm = 0x14A7 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x17041 movq -0x20(%rbp), %rdi callq 0x46580 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x17085 movq -0x20(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x4e52a(%rip), %rdi # 0x65590 leaq 0x4f000(%rip), %rdx # 0x6606d movl $0x14aa, %ecx # imm = 0x14AA movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x17087 movq -0x20(%rbp), %rdi callq 0x454d0 movq -0x20(%rbp), %rdi callq 0x47030 cmpq $0x1, %rax je 0x170cc leaq 0x4e4ea(%rip), %rdi # 0x65590 leaq 0x4f515(%rip), %rsi # 0x665c2 leaq 0x4efb9(%rip), %rdx # 0x6606d movl $0x14ad, %ecx # imm = 0x14AD movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x170ce movq -0x20(%rbp), %rdi callq 0x47060 movq -0x20(%rbp), %rdi callq 0x454d0 movq -0x20(%rbp), %rdi callq 0x47030 cmpq $0x1, %rax je 0x1711c leaq 0x4e49a(%rip), %rdi # 0x65590 leaq 0x4f4c5(%rip), %rsi # 0x665c2 leaq 0x4ef69(%rip), %rdx # 0x6606d movl $0x14b1, %ecx # imm = 0x14B1 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x1711e movq -0x20(%rbp), %rdi callq 0x47060 movq -0x20(%rbp), %rdi callq 0x454d0 movq -0x20(%rbp), %rdi callq 0x47030 cmpq $0x1, %rax je 0x17169 leaq 0x4e44a(%rip), %rdi # 0x65590 leaq 0x4f475(%rip), %rsi # 0x665c2 leaq 0x4ef19(%rip), %rdx # 0x6606d movl $0x14b5, %ecx # imm = 0x14B5 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x1716b movq -0x20(%rbp), %rdi callq 0x43eb0 movq -0x10(%rbp), %rdi leaq 0x4f452(%rip), %rsi # 0x665d1 callq 0x38a70 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x171d6 movl -0x14(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0x54(%rbp), %esi movq -0x50(%rbp), %rdx movl %eax, %ecx leaq 0x4e51c(%rip), %rdi # 0x656d5 leaq 0x4eead(%rip), %r8 # 0x6606d movl $0x14ba, %r9d # imm = 0x14BA movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x171df jmp 0x171d8 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
test_conc504: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call mysql_stmt_init mov [rbp+var_20], rax lea rax, aCreateProcedur_0; "CREATE PROCEDURE p1()\nBEGIN\n SELECT "... mov [rbp+var_28], rax mov rdi, [rbp+var_10] lea rsi, aDropProcedureI_0; "DROP PROCEDURE IF EXISTS p1" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_16F89 mov eax, [rbp+var_14] mov [rbp+var_34], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_30], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_34] mov rdx, [rbp+var_30] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 14A1h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_171DF loc_16F89: jmp short $+2 loc_16F8B: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_16FED mov eax, [rbp+var_14] mov [rbp+var_44], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_40], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_44] mov rdx, [rbp+var_40] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 14A4h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_171DF loc_16FED: jmp short $+2 loc_16FEF: mov rdi, [rbp+var_20] lea rsi, aCallP1; "CALL p1()" mov edx, 9 call mysql_stmt_prepare mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_1703F mov rdi, [rbp+var_20] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14A7h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_171DF loc_1703F: jmp short $+2 loc_17041: mov rdi, [rbp+var_20] call mysql_stmt_execute mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_17085 mov rdi, [rbp+var_20] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14AAh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_171DF loc_17085: jmp short $+2 loc_17087: mov rdi, [rbp+var_20] call mysql_stmt_store_result mov rdi, [rbp+var_20] call mysql_stmt_num_rows cmp rax, 1 jz short loc_170CC lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aExpected1Row; "Expected 1 row" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14ADh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_171DF loc_170CC: jmp short $+2 loc_170CE: mov rdi, [rbp+var_20] call mysql_stmt_next_result mov rdi, [rbp+var_20] call mysql_stmt_store_result mov rdi, [rbp+var_20] call mysql_stmt_num_rows cmp rax, 1 jz short loc_1711C lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aExpected1Row; "Expected 1 row" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14B1h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_171DF loc_1711C: jmp short $+2 loc_1711E: mov rdi, [rbp+var_20] call mysql_stmt_next_result mov rdi, [rbp+var_20] call mysql_stmt_store_result mov rdi, [rbp+var_20] call mysql_stmt_num_rows cmp rax, 1 jz short loc_17169 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aExpected1Row; "Expected 1 row" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14B5h mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_171DF loc_17169: jmp short $+2 loc_1716B: mov rdi, [rbp+var_20] call mysql_stmt_close mov rdi, [rbp+var_10] lea rsi, aDropProcedureP; "DROP PROCEDURE p1" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_171D6 mov eax, [rbp+var_14] mov [rbp+var_54], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_50], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_54] mov rdx, [rbp+var_50] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 14BAh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_171DF loc_171D6: jmp short $+2 loc_171D8: mov [rbp+var_4], 0 loc_171DF: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long test_conc504(long long a1) { int v1; // eax int v2; // eax int v3; // eax int v4; // r8d int v5; // r9d int v6; // eax int v7; // r8d int v8; // r9d int v9; // r8d int v10; // r9d int v11; // r8d int v12; // r9d int v13; // r8d int v14; // r9d int v15; // eax int v17; // [rsp+10h] [rbp-50h] int v18; // [rsp+20h] [rbp-40h] int v19; // [rsp+30h] [rbp-30h] long long v20; // [rsp+40h] [rbp-20h] int v21; // [rsp+4Ch] [rbp-14h] int v22; // [rsp+4Ch] [rbp-14h] int v23; // [rsp+4Ch] [rbp-14h] v20 = mysql_stmt_init(a1); v21 = mysql_query(a1, "DROP PROCEDURE IF EXISTS p1"); if ( v21 ) { v19 = mysql_error(a1); v1 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v21, v19, v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5281); return 1; } else { v22 = mysql_query(a1, "CREATE PROCEDURE p1()\nBEGIN\n SELECT 1;\n SELECT 2;\n SELECT 3;\nEND"); if ( v22 ) { v18 = mysql_error(a1); v2 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v22, v18, v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5284); return 1; } else if ( (unsigned int)mysql_stmt_prepare(v20, "CALL p1()", 9LL) ) { v3 = mysql_stmt_error(v20); diag( (unsigned int)"Error: %s (%s: %d)", v3, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5287, v4, v5); return 1; } else if ( (unsigned int)mysql_stmt_execute(v20) ) { v6 = mysql_stmt_error(v20); diag( (unsigned int)"Error: %s (%s: %d)", v6, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5290, v7, v8); return 1; } else { mysql_stmt_store_result(v20); if ( mysql_stmt_num_rows(v20) == 1 ) { mysql_stmt_next_result(v20); mysql_stmt_store_result(v20); if ( mysql_stmt_num_rows(v20) == 1 ) { mysql_stmt_next_result(v20); mysql_stmt_store_result(v20); if ( mysql_stmt_num_rows(v20) == 1 ) { mysql_stmt_close(v20); v23 = mysql_query(a1, "DROP PROCEDURE p1"); if ( v23 ) { v17 = mysql_error(a1); v15 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v23, v17, v15, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5306); return 1; } else { return 0; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Expected 1 row", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5301, v13, v14); return 1; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Expected 1 row", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5297, v11, v12); return 1; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Expected 1 row", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 5293, v9, v10); return 1; } } } }
test_conc504: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00144950 MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x166558] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x16659c] CALL 0x00138a70 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00116f89 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x34],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x34] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x14a1 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_00116f89: JMP 0x00116f8b LAB_00116f8b: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00138a70 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00116fed MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x44],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x40] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x14a4 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_00116fed: JMP 0x00116fef LAB_00116fef: MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[0x1665b8] MOV EDX,0x9 CALL 0x00145070 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0011703f MOV RDI,qword ptr [RBP + -0x20] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0x14a7 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_0011703f: JMP 0x00117041 LAB_00117041: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00146580 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00117085 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0x14aa MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_00117085: JMP 0x00117087 LAB_00117087: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001454d0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147030 CMP RAX,0x1 JZ 0x001170cc LEA RDI,[0x165590] LEA RSI,[0x1665c2] LEA RDX,[0x16606d] MOV ECX,0x14ad MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_001170cc: JMP 0x001170ce LAB_001170ce: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147060 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001454d0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147030 CMP RAX,0x1 JZ 0x0011711c LEA RDI,[0x165590] LEA RSI,[0x1665c2] LEA RDX,[0x16606d] MOV ECX,0x14b1 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_0011711c: JMP 0x0011711e LAB_0011711e: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147060 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001454d0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00147030 CMP RAX,0x1 JZ 0x00117169 LEA RDI,[0x165590] LEA RSI,[0x1665c2] LEA RDX,[0x16606d] MOV ECX,0x14b5 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_00117169: JMP 0x0011716b LAB_0011716b: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00143eb0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1665d1] CALL 0x00138a70 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001171d6 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x54],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x54] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0x14ba MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001171df LAB_001171d6: JMP 0x001171d8 LAB_001171d8: MOV dword ptr [RBP + -0x4],0x0 LAB_001171df: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 test_conc504(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; long lVar4; int4 local_c; uVar3 = mysql_stmt_init(param_1); iVar1 = mysql_query(param_1,"DROP PROCEDURE IF EXISTS p1"); if (iVar1 == 0) { iVar1 = mysql_query(param_1, "CREATE PROCEDURE p1()\nBEGIN\n SELECT 1;\n SELECT 2;\n SELECT 3;\nEND"); if (iVar1 == 0) { iVar1 = mysql_stmt_prepare(uVar3,"CALL p1()",9); if (iVar1 == 0) { iVar1 = mysql_stmt_execute(uVar3); if (iVar1 == 0) { mysql_stmt_store_result(uVar3); lVar4 = mysql_stmt_num_rows(uVar3); if (lVar4 == 1) { mysql_stmt_next_result(uVar3); mysql_stmt_store_result(uVar3); lVar4 = mysql_stmt_num_rows(uVar3); if (lVar4 == 1) { mysql_stmt_next_result(uVar3); mysql_stmt_store_result(uVar3); lVar4 = mysql_stmt_num_rows(uVar3); if (lVar4 == 1) { mysql_stmt_close(uVar3); iVar1 = mysql_query(param_1,"DROP PROCEDURE p1"); if (iVar1 == 0) { local_c = 0; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x14ba); local_c = 1; } } else { diag("Error: %s (%s: %d)","Expected 1 row", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x14b5); local_c = 1; } } else { diag("Error: %s (%s: %d)","Expected 1 row", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x14b1); local_c = 1; } } else { diag("Error: %s (%s: %d)","Expected 1 row", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0x14ad); local_c = 1; } } else { uVar3 = mysql_stmt_error(uVar3); diag("Error: %s (%s: %d)",uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x14aa); local_c = 1; } } else { uVar3 = mysql_stmt_error(uVar3); diag("Error: %s (%s: %d)",uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x14a7); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x14a4); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x14a1) ; local_c = 1; } return local_c; }
37,129
ma_bitmap_set
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_set(MARIA_HA *info, pgcache_page_no_t page, my_bool head, uint empty_space) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; uint bits; my_bool res; DBUG_ENTER("_ma_bitmap_set"); DBUG_PRINT("enter", ("page: %lu head: %d empty_space: %u", (ulong) page, head, empty_space)); mysql_mutex_lock(&info->s->bitmap.bitmap_lock); bits= (head ? _ma_free_size_to_head_pattern(bitmap, empty_space) : free_size_to_tail_pattern(bitmap, empty_space)); res= set_page_bits(info, bitmap, page, bits); mysql_mutex_unlock(&info->s->bitmap.bitmap_lock); DBUG_RETURN(res); }
O0
c
ma_bitmap_set: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) jmp 0x621cb movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0xfabc0(%rip), %rsi # 0x15cda7 movl $0xb55, %edx # imm = 0xB55 callq 0x5fdb0 movsbl -0x11(%rbp), %eax cmpl $0x0, %eax je 0x6220b movq -0x20(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x60660 movl %eax, -0x2c(%rbp) jmp 0x6221a movq -0x20(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x61fe0 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x24(%rbp), %ecx callq 0x61dd0 movb %al, -0x25(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x60060 movb -0x25(%rbp), %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %al addq $0x30, %rsp popq %rbp retq
_ma_bitmap_set: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov [rbp+var_18], ecx mov rax, [rbp+var_8] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax jmp short $+2 loc_621CB: mov rax, [rbp+var_8] mov rdi, [rax] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B55h call inline_mysql_mutex_lock_7 movsx eax, [rbp+var_11] cmp eax, 0 jz short loc_6220B mov rdi, [rbp+var_20] mov esi, [rbp+var_18] call _ma_free_size_to_head_pattern mov [rbp+var_2C], eax jmp short loc_6221A loc_6220B: mov rdi, [rbp+var_20] mov esi, [rbp+var_18] call free_size_to_tail_pattern mov [rbp+var_2C], eax loc_6221A: mov eax, [rbp+var_2C] mov [rbp+var_24], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov ecx, [rbp+var_24] call set_page_bits mov [rbp+var_25], al mov rax, [rbp+var_8] mov rdi, [rax] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_7 mov al, [rbp+var_25] mov [rbp+var_2D], al mov al, [rbp+var_2D] add rsp, 30h pop rbp retn
char ma_bitmap_set(long long *a1, unsigned long long a2, char a3, unsigned int a4) { unsigned int v5; // [rsp+4h] [rbp-2Ch] char v6; // [rsp+Bh] [rbp-25h] _DWORD *v7; // [rsp+10h] [rbp-20h] v7 = (_DWORD *)(*a1 + 2576); inline_mysql_mutex_lock_7( *a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xB55u); if ( a3 ) v5 = ma_free_size_to_head_pattern(v7, a4); else v5 = free_size_to_tail_pattern(v7, a4); v6 = set_page_bits(a1, (long long)v7, a2, v5); inline_mysql_mutex_unlock_7(*a1 + 2712); return v6; }
_ma_bitmap_set: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV dword ptr [RBP + -0x18],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX JMP 0x001621cb LAB_001621cb: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x25cda7] MOV EDX,0xb55 CALL 0x0015fdb0 MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 JZ 0x0016220b MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x18] CALL 0x00160660 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0016221a LAB_0016220b: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x18] CALL 0x00161fe0 MOV dword ptr [RBP + -0x2c],EAX LAB_0016221a: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] CALL 0x00161dd0 MOV byte ptr [RBP + -0x25],AL MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x00160060 MOV AL,byte ptr [RBP + -0x25] MOV byte ptr [RBP + -0x2d],AL MOV AL,byte ptr [RBP + -0x2d] ADD RSP,0x30 POP RBP RET
int1 _ma_bitmap_set(long *param_1,int8 param_2,char param_3,int4 param_4) { int1 uVar1; long lVar2; int4 local_34; lVar2 = *param_1 + 0xa10; inline_mysql_mutex_lock (*param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xb55); if (param_3 == '\0') { local_34 = free_size_to_tail_pattern(lVar2,param_4); } else { local_34 = _ma_free_size_to_head_pattern(lVar2,param_4); } uVar1 = set_page_bits(param_1,lVar2,param_2,local_34); inline_mysql_mutex_unlock(*param_1 + 0xa98); return uVar1; }
37,130
strxnmov
eloqsql/strings/strxnmov.c
char *strxnmov(char *dst, size_t len, const char *src, ...) { va_list pvar; char *end_of_dst=dst+len; va_start(pvar,src); while (src != NullS) { do { if (dst == end_of_dst) goto end; } while ((*dst++ = *src++)); dst--; src = va_arg(pvar, char *); } end: *dst=0; va_end(pvar); return dst; }
O3
c
strxnmov: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %eax, %r10d movq %rdi, %rax leaq -0xd0(%rbp), %rdi movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %r10b, %r10b je 0x92558 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %rdi, -0x10(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x18(%rbp) movabsq $0x3000000018, %rcx # imm = 0x3000000018 movq %rcx, -0x20(%rbp) testq %rdx, %rdx je 0x925d1 addq %rax, %rsi movq -0x10(%rbp), %rcx movl -0x20(%rbp), %edi movq -0x18(%rbp), %r8 movq %r8, %r9 cmpq %rsi, %rax je 0x925ce movb (%rdx), %r10b movb %r10b, (%rax) testb %r10b, %r10b jne 0x925c6 cmpl $0x28, %edi ja 0x925ae movq %r9, %r10 movl %edi, %r9d addq %rcx, %r9 addl $0x8, %edi movl %edi, -0x20(%rbp) jmp 0x925b9 leaq 0x8(%r9), %r8 movq %r8, -0x18(%rbp) movq %r8, %r10 movq (%r9), %rdx movq %r10, %r9 testq %rdx, %rdx jne 0x92588 jmp 0x925d1 incq %rax incq %rdx jmp 0x92585 movq %rsi, %rax movb $0x0, (%rax) addq $0x50, %rsp popq %rbp retq nop
strxnmov: push rbp mov rbp, rsp sub rsp, 50h mov r10d, eax mov rax, rdi lea rdi, [rbp+var_D0] mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test r10b, r10b jz short loc_92558 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_92558: mov [rbp+var_10], rdi lea rcx, [rbp+arg_0] mov [rbp+var_18], rcx mov rcx, 3000000018h mov [rbp+var_20], rcx test rdx, rdx jz short loc_925D1 add rsi, rax mov rcx, [rbp+var_10] mov edi, dword ptr [rbp+var_20] mov r8, [rbp+var_18] loc_92585: mov r9, r8 loc_92588: cmp rax, rsi jz short loc_925CE mov r10b, [rdx] mov [rax], r10b test r10b, r10b jnz short loc_925C6 cmp edi, 28h ; '(' ja short loc_925AE mov r10, r9 mov r9d, edi add r9, rcx add edi, 8 mov dword ptr [rbp+var_20], edi jmp short loc_925B9 loc_925AE: lea r8, [r9+8] mov [rbp+var_18], r8 mov r10, r8 loc_925B9: mov rdx, [r9] mov r9, r10 test rdx, rdx jnz short loc_92588 jmp short loc_925D1 loc_925C6: inc rax inc rdx jmp short loc_92585 loc_925CE: mov rax, rsi loc_925D1: mov byte ptr [rax], 0 add rsp, 50h pop rbp retn
char *strxnmov(char *a1, long long a2, char *a3, ...) { char *result; // rax char *v4; // rsi char *reg_save_area; // rcx unsigned int gp_offset; // edi char *overflow_arg_area; // r8 char *v8; // r9 char v9; // r10 char *v10; // r10 va_list va; // [rsp+B0h] [rbp-20h] BYREF result = a1; va_start(va, a3); if ( a3 ) { v4 = &a1[a2]; reg_save_area = (char *)va[0].reg_save_area; gp_offset = va[0].gp_offset; overflow_arg_area = (char *)va[0].overflow_arg_area; LABEL_3: v8 = overflow_arg_area; while ( result != v4 ) { v9 = *a3; *result = *a3; if ( v9 ) { ++result; ++a3; goto LABEL_3; } if ( gp_offset > 0x28 ) { overflow_arg_area = v8 + 8; va[0].overflow_arg_area = v8 + 8; v10 = v8 + 8; } else { v10 = v8; v8 = &reg_save_area[gp_offset]; gp_offset += 8; va[0].gp_offset = gp_offset; } a3 = *(char **)v8; v8 = v10; if ( !a3 ) goto LABEL_13; } result = v4; } LABEL_13: *result = 0; return result; }
strxnmov: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV R10D,EAX MOV RAX,RDI LEA RDI,[RBP + -0xd0] MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST R10B,R10B JZ 0x00192558 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_00192558: MOV qword ptr [RBP + -0x10],RDI LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RCX MOV RCX,0x3000000018 MOV qword ptr [RBP + -0x20],RCX TEST RDX,RDX JZ 0x001925d1 ADD RSI,RAX MOV RCX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x18] LAB_00192585: MOV R9,R8 LAB_00192588: CMP RAX,RSI JZ 0x001925ce MOV R10B,byte ptr [RDX] MOV byte ptr [RAX],R10B TEST R10B,R10B JNZ 0x001925c6 CMP EDI,0x28 JA 0x001925ae MOV R10,R9 MOV R9D,EDI ADD R9,RCX ADD EDI,0x8 MOV dword ptr [RBP + -0x20],EDI JMP 0x001925b9 LAB_001925ae: LEA R8,[R9 + 0x8] MOV qword ptr [RBP + -0x18],R8 MOV R10,R8 LAB_001925b9: MOV RDX,qword ptr [R9] MOV R9,R10 TEST RDX,RDX JNZ 0x00192588 JMP 0x001925d1 LAB_001925c6: INC RAX INC RDX JMP 0x00192585 LAB_001925ce: MOV RAX,RSI LAB_001925d1: MOV byte ptr [RAX],0x0 ADD RSP,0x50 POP RBP RET
void strxnmov(char *param_1,long param_2,char *param_3) { char cVar1; char *pcVar2; char *pcVar3; int8 *puVar4; int8 *puVar5; ulong uVar6; int8 *puVar7; int8 local_d8 [22]; uint local_28; puVar4 = (int8 *)&stack0x00000008; pcVar2 = param_1; if (param_3 != (char *)0x0) { pcVar3 = param_1 + param_2; local_28 = 0x18; puVar5 = puVar4; do { while( true ) { pcVar2 = pcVar3; if (param_1 == pcVar3) goto LAB_001925d1; cVar1 = *param_3; *param_1 = cVar1; if (cVar1 == '\0') break; param_1 = param_1 + 1; param_3 = param_3 + 1; puVar5 = puVar4; } if (local_28 < 0x29) { uVar6 = (ulong)local_28; local_28 = local_28 + 8; puVar7 = (int8 *)((long)local_d8 + uVar6); } else { puVar4 = puVar5 + 1; puVar7 = puVar5; puVar5 = puVar4; } param_3 = (char *)*puVar7; pcVar2 = param_1; } while (param_3 != (char *)0x0); } LAB_001925d1: *pcVar2 = '\0'; return; }
37,131
stbi__hdr_test(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__hdr_test(stbi__context* s) { int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); stbi__rewind(s); if(!r) { r = stbi__hdr_test_core(s, "#?RGBE\n"); stbi__rewind(s); } return r; }
O2
c
stbi__hdr_test(stbi__context*): pushq %rbx movq %rdi, %rbx leaq 0x8c345(%rip), %rsi # 0x98b8e callq 0x199c5 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) testl %eax, %eax je 0xc865 pushq $0x1 popq %rax popq %rbx retq leaq 0x8c32e(%rip), %rsi # 0x98b9a movq %rbx, %rdi callq 0x199c5 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) popq %rbx retq
_ZL14stbi__hdr_testP13stbi__context: push rbx mov rbx, rdi lea rsi, aRadiance; "#?RADIANCE\n" call _ZL19stbi__hdr_test_coreP13stbi__contextPKc; stbi__hdr_test_core(stbi__context *,char const*) movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 test eax, eax jz short loc_C865 push 1 pop rax pop rbx retn loc_C865: lea rsi, aRgbe; "#?RGBE\n" mov rdi, rbx call _ZL19stbi__hdr_test_coreP13stbi__contextPKc; stbi__hdr_test_core(stbi__context *,char const*) movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 pop rbx retn
long long stbi__hdr_test(long long a1) { int v1; // eax long long result; // rax v1 = stbi__hdr_test_core(a1, "#?RADIANCE\n"); *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); if ( v1 ) return 1LL; result = stbi__hdr_test_core(a1, "#?RGBE\n"); *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return result; }
stbi__hdr_test: PUSH RBX MOV RBX,RDI LEA RSI,[0x198b8e] CALL 0x001199c5 MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 TEST EAX,EAX JZ 0x0010c865 PUSH 0x1 POP RAX POP RBX RET LAB_0010c865: LEA RSI,[0x198b9a] MOV RDI,RBX CALL 0x001199c5 MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 POP RBX RET
/* stbi__hdr_test(stbi__context*) */ int8 stbi__hdr_test(stbi__context *param_1) { int iVar1; int8 uVar2; iVar1 = stbi__hdr_test_core(param_1,"#?RADIANCE\n"); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); if (iVar1 != 0) { return 1; } uVar2 = stbi__hdr_test_core(param_1,"#?RGBE\n"); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); return uVar2; }
37,132
intx::uint<256u> intx::operator>><256u>(intx::uint<256u> const&, intx::uint<256u> const&)
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
inline constexpr uint<N> operator>>(const uint<N>& x, const uint<N>& shift) noexcept { uint64_t high_words_fold = 0; for (size_t i = 1; i < uint<N>::num_words; ++i) high_words_fold |= shift[i]; if (INTX_UNLIKELY(high_words_fold != 0)) return 0; return x >> shift[0]; }
O0
cpp
intx::uint<256u> intx::operator>><256u>(intx::uint<256u> const&, intx::uint<256u> const&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x30(%rbp) movq %rdi, -0x28(%rbp) movq %rsi, -0x8(%rbp) movq %rdx, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq $0x1, -0x20(%rbp) cmpq $0x4, -0x20(%rbp) jae 0x68165 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x61430 movq (%rax), %rax orq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x68138 cmpq $0x0, -0x18(%rbp) je 0x68179 movq -0x30(%rbp), %rdi xorl %esi, %esi callq 0x61cc0 jmp 0x6819e movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x61430 movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq (%rax), %rdx callq 0x671e0 movq -0x28(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN4intxrsILj256EEENS_4uintIXT_EEERKS2_S4_: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_30], rdi mov [rbp+var_28], rdi mov [rbp+var_8], rsi mov [rbp+var_10], rdx mov [rbp+var_18], 0 mov [rbp+var_20], 1 loc_68138: cmp [rbp+var_20], 4 jnb short loc_68165 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rax, [rax] or rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_68138 loc_68165: cmp [rbp+var_18], 0 jz short loc_68179 mov rdi, [rbp+var_30] xor esi, esi call _ZN4intx4uintILj256EEC2IJiEvEEDpT_; intx::uint<256u>::uint<int,void>(int) jmp short loc_6819E loc_68179: mov rax, [rbp+var_8] mov [rbp+var_38], rax mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNK4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rdx, [rax] call _ZN4intxrsERKNS_4uintILj256EEEm; intx::operator>>(intx::uint<256u> const&,ulong) loc_6819E: mov rax, [rbp+var_28] add rsp, 40h pop rbp retn
_QWORD * intx::operator>><256u>(_QWORD *a1, long long a2, long long a3) { unsigned long long *v3; // rax unsigned long long i; // [rsp+20h] [rbp-20h] long long v6; // [rsp+28h] [rbp-18h] v6 = 0LL; for ( i = 1LL; i < 4; ++i ) v6 |= *(_QWORD *)intx::uint<256u>::operator[](a3, i); if ( v6 ) { intx::uint<256u>::uint<int,void>(a1, 0); } else { v3 = (unsigned long long *)intx::uint<256u>::operator[](a3, 0LL); intx::operator>>(a1, a2, *v3); } return a1; }
operator>>: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x30],RDI MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x8],RSI MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RBP + -0x18],0x0 MOV qword ptr [RBP + -0x20],0x1 LAB_00168138: CMP qword ptr [RBP + -0x20],0x4 JNC 0x00168165 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00161430 MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00168138 LAB_00168165: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00168179 MOV RDI,qword ptr [RBP + -0x30] XOR ESI,ESI CALL 0x00161cc0 JMP 0x0016819e LAB_00168179: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x00161430 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RAX] CALL 0x001671e0 LAB_0016819e: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x40 POP RBP RET
/* intx::uint<256u> intx::TEMPNAMEPLACEHOLDERVALUE(intx::uint<256u> const&, intx::uint<256u> const&) */ intx * __thiscall intx::operator>>(intx *this,uint *param_1,uint *param_2) { ulong *puVar1; int8 local_28; int8 local_20; local_20 = 0; for (local_28 = 1; local_28 < 4; local_28 = local_28 + 1) { puVar1 = (ulong *)uint<256u>::operator[]((uint<256u> *)param_2,local_28); local_20 = *puVar1 | local_20; } if (local_20 == 0) { puVar1 = (ulong *)uint<256u>::operator[]((uint<256u> *)param_2,0); operator>>(this,param_1,*puVar1); } else { uint<256u>::uint<int,void>((uint<256u> *)this,0); } return this; }
37,133
my_coll_parser_scan_reset_before
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_reset_before(MY_COLL_RULE_PARSER *p) { MY_COLL_LEXEM *lexem= my_coll_parser_curr(p); if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before primary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 1]"))) { p->rule.before_level= 1; } else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before secondary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 2]"))) { p->rule.before_level= 2; } else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before tertiary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 3]"))) { p->rule.before_level= 3; } else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[before quaternary]")) || !lex_cmp(lexem, C_STRING_WITH_LEN("[before 4]"))) { p->rule.before_level= 4; } else { p->rule.before_level= 0; return 0; /* Don't scan thr next character */ } return my_coll_parser_scan(p); }
O0
c
my_coll_parser_scan_reset_before: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x60a00 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x2d8ae(%rip), %rsi # 0x8ee02 movl $0x10, %edx callq 0x61180 cmpl $0x0, %eax je 0x6157d movq -0x18(%rbp), %rdi leaq 0x2d8a5(%rip), %rsi # 0x8ee13 movl $0xa, %edx callq 0x61180 cmpl $0x0, %eax jne 0x61591 movq -0x10(%rbp), %rax movq $0x1, 0xe0(%rax) jmp 0x61681 movq -0x18(%rbp), %rdi leaq 0x2d882(%rip), %rsi # 0x8ee1e movl $0x12, %edx callq 0x61180 cmpl $0x0, %eax je 0x615c5 movq -0x18(%rbp), %rdi leaq 0x2d87b(%rip), %rsi # 0x8ee31 movl $0xa, %edx callq 0x61180 cmpl $0x0, %eax jne 0x615d9 movq -0x10(%rbp), %rax movq $0x2, 0xe0(%rax) jmp 0x6167f movq -0x18(%rbp), %rdi leaq 0x2d858(%rip), %rsi # 0x8ee3c movl $0x11, %edx callq 0x61180 cmpl $0x0, %eax je 0x6160d movq -0x18(%rbp), %rdi leaq 0x2d850(%rip), %rsi # 0x8ee4e movl $0xa, %edx callq 0x61180 cmpl $0x0, %eax jne 0x6161e movq -0x10(%rbp), %rax movq $0x3, 0xe0(%rax) jmp 0x6167d movq -0x18(%rbp), %rdi leaq 0x2d830(%rip), %rsi # 0x8ee59 movl $0x13, %edx callq 0x61180 cmpl $0x0, %eax je 0x61652 movq -0x18(%rbp), %rdi leaq 0x2d82a(%rip), %rsi # 0x8ee6d movl $0xa, %edx callq 0x61180 cmpl $0x0, %eax jne 0x61663 movq -0x10(%rbp), %rax movq $0x4, 0xe0(%rax) jmp 0x6167b movq -0x10(%rbp), %rax movq $0x0, 0xe0(%rax) movl $0x0, -0x4(%rbp) jmp 0x6168d jmp 0x6167d jmp 0x6167f jmp 0x61681 movq -0x10(%rbp), %rdi callq 0x611e0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_scan_reset_before: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call my_coll_parser_curr mov [rbp+var_18], rax mov rdi, [rbp+var_18] lea rsi, aBeforePrimary; "[before primary]" mov edx, 10h call lex_cmp cmp eax, 0 jz short loc_6157D mov rdi, [rbp+var_18] lea rsi, aBefore1; "[before 1]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_61591 loc_6157D: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 1 jmp loc_61681 loc_61591: mov rdi, [rbp+var_18] lea rsi, aBeforeSecondar; "[before secondary]" mov edx, 12h call lex_cmp cmp eax, 0 jz short loc_615C5 mov rdi, [rbp+var_18] lea rsi, aBefore2; "[before 2]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_615D9 loc_615C5: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 2 jmp loc_6167F loc_615D9: mov rdi, [rbp+var_18] lea rsi, aBeforeTertiary; "[before tertiary]" mov edx, 11h call lex_cmp cmp eax, 0 jz short loc_6160D mov rdi, [rbp+var_18] lea rsi, aBefore3; "[before 3]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_6161E loc_6160D: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 3 jmp short loc_6167D loc_6161E: mov rdi, [rbp+var_18] lea rsi, aBeforeQuaterna; "[before quaternary]" mov edx, 13h call lex_cmp cmp eax, 0 jz short loc_61652 mov rdi, [rbp+var_18] lea rsi, aBefore4; "[before 4]" mov edx, 0Ah call lex_cmp cmp eax, 0 jnz short loc_61663 loc_61652: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 4 jmp short loc_6167B loc_61663: mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 0 mov [rbp+var_4], 0 jmp short loc_6168D loc_6167B: jmp short $+2 loc_6167D: jmp short $+2 loc_6167F: jmp short $+2 loc_61681: mov rdi, [rbp+var_10] call my_coll_parser_scan mov [rbp+var_4], eax loc_6168D: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_coll_parser_scan_reset_before(long long a1) { long long v2; // [rsp+8h] [rbp-18h] v2 = my_coll_parser_curr(a1); if ( !(unsigned int)lex_cmp(v2, (long long)"[before primary]", 0x10uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 1]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 1LL; return (unsigned int)my_coll_parser_scan(a1); } if ( !(unsigned int)lex_cmp(v2, (long long)"[before secondary]", 0x12uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 2]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 2LL; return (unsigned int)my_coll_parser_scan(a1); } if ( !(unsigned int)lex_cmp(v2, (long long)"[before tertiary]", 0x11uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 3]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 3LL; return (unsigned int)my_coll_parser_scan(a1); } if ( !(unsigned int)lex_cmp(v2, (long long)"[before quaternary]", 0x13uLL) || !(unsigned int)lex_cmp(v2, (long long)"[before 4]", 0xAuLL) ) { *(_QWORD *)(a1 + 224) = 4LL; return (unsigned int)my_coll_parser_scan(a1); } *(_QWORD *)(a1 + 224) = 0LL; return 0; }
my_coll_parser_scan_reset_before: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00160a00 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee02] MOV EDX,0x10 CALL 0x00161180 CMP EAX,0x0 JZ 0x0016157d MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee13] MOV EDX,0xa CALL 0x00161180 CMP EAX,0x0 JNZ 0x00161591 LAB_0016157d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x1 JMP 0x00161681 LAB_00161591: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee1e] MOV EDX,0x12 CALL 0x00161180 CMP EAX,0x0 JZ 0x001615c5 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee31] MOV EDX,0xa CALL 0x00161180 CMP EAX,0x0 JNZ 0x001615d9 LAB_001615c5: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x2 JMP 0x0016167f LAB_001615d9: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee3c] MOV EDX,0x11 CALL 0x00161180 CMP EAX,0x0 JZ 0x0016160d MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee4e] MOV EDX,0xa CALL 0x00161180 CMP EAX,0x0 JNZ 0x0016161e LAB_0016160d: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x3 JMP 0x0016167d LAB_0016161e: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee59] MOV EDX,0x13 CALL 0x00161180 CMP EAX,0x0 JZ 0x00161652 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x18ee6d] MOV EDX,0xa CALL 0x00161180 CMP EAX,0x0 JNZ 0x00161663 LAB_00161652: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x4 JMP 0x0016167b LAB_00161663: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016168d LAB_0016167b: JMP 0x0016167d LAB_0016167d: JMP 0x0016167f LAB_0016167f: JMP 0x00161681 LAB_00161681: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001611e0 MOV dword ptr [RBP + -0x4],EAX LAB_0016168d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_coll_parser_scan_reset_before(long param_1) { int iVar1; int4 uVar2; int8 uVar3; uVar3 = my_coll_parser_curr(param_1); iVar1 = lex_cmp(uVar3,"[before primary]",0x10); if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 1]",10), iVar1 == 0)) { *(int8 *)(param_1 + 0xe0) = 1; } else { iVar1 = lex_cmp(uVar3,"[before secondary]",0x12); if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 2]",10), iVar1 == 0)) { *(int8 *)(param_1 + 0xe0) = 2; } else { iVar1 = lex_cmp(uVar3,"[before tertiary]",0x11); if ((iVar1 == 0) || (iVar1 = lex_cmp(uVar3,"[before 3]",10), iVar1 == 0)) { *(int8 *)(param_1 + 0xe0) = 3; } else { iVar1 = lex_cmp(uVar3,"[before quaternary]",0x13); if ((iVar1 != 0) && (iVar1 = lex_cmp(uVar3,"[before 4]",10), iVar1 != 0)) { *(int8 *)(param_1 + 0xe0) = 0; return 0; } *(int8 *)(param_1 + 0xe0) = 4; } } } uVar2 = my_coll_parser_scan(param_1); return uVar2; }
37,134
coro::io_scheduler::make_shared(coro::io_scheduler::options)
AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp
auto io_scheduler::make_shared(options opts) -> std::shared_ptr<io_scheduler> { auto s = std::make_shared<io_scheduler>(std::move(opts), private_constructor{}); if (opts.execution_strategy == execution_strategy_t::process_tasks_on_thread_pool) { s->m_thread_pool = std::make_unique<thread_pool>(std::move(s->m_opts.pool)); } epoll_event e{}; e.events = EPOLLIN; e.data.ptr = const_cast<void*>(m_shutdown_ptr); epoll_ctl(s->m_epoll_fd, EPOLL_CTL_ADD, s->m_shutdown_fd, &e); e.data.ptr = const_cast<void*>(m_timer_ptr); epoll_ctl(s->m_epoll_fd, EPOLL_CTL_ADD, s->m_timer_fd, &e); e.data.ptr = const_cast<void*>(m_schedule_ptr); epoll_ctl(s->m_epoll_fd, EPOLL_CTL_ADD, s->m_schedule_fd, &e); if (s->m_opts.thread_strategy == thread_strategy_t::spawn) { s->m_io_thread = std::thread([s]() { s->process_events_dedicated_thread(); }); } // else manual mode, the user must call process_events. return s; }
O3
cpp
coro::io_scheduler::make_shared(coro::io_scheduler::options): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rsi leaq 0x10(%rsp), %rcx movq %r14, %rdx callq 0x8862 cmpl $0x0, 0x90(%r14) je 0x7145 movq %rsp, %r14 movl $0x1, (%r14) leaq 0x222a(%rip), %rax # 0x92d8 movq %rax, 0x4(%r14) movq (%rbx), %rax movl 0xa8(%rax), %edi movl 0xac(%rax), %edx movl $0x1, %esi movq %r14, %rcx callq 0x32d0 leaq 0x2207(%rip), %rax # 0x92dc movq %rax, 0x4(%r14) movq (%rbx), %rax movl 0xa8(%rax), %edi movl 0xb0(%rax), %edx movl $0x1, %esi movq %r14, %rcx callq 0x32d0 leaq 0x21e4(%rip), %rax # 0x92e0 movq %rax, 0x4(%r14) movq (%rbx), %rax movl 0xa8(%rax), %edi movl 0xb4(%rax), %edx movl $0x1, %esi movq %r14, %rcx callq 0x32d0 movq (%rbx), %r14 cmpl $0x0, 0x10(%r14) jne 0x71ff movq 0x8(%rbx), %r15 testq %r15, %r15 je 0x719d movq 0x6e6e(%rip), %rax # 0xdfa8 cmpb $0x0, (%rax) je 0x7198 incl 0x8(%r15) jmp 0x719d movq (%rbx), %rsi addq $0x58, %rsi movq %rsp, %rdi callq 0x83a6 movq (%rbx), %rax movq (%rsp), %rcx movq $0x0, (%rsp) movq 0xd0(%rax), %rdi movq %rcx, 0xd0(%rax) testq %rdi, %rdi je 0x709d movq (%rdi), %rax callq *0x8(%rax) movq (%rsp), %rdi testq %rdi, %rdi je 0x709d movq (%rdi), %rax callq *0x8(%rax) jmp 0x709d lock incl 0x8(%r15) movq $0x0, 0x18(%rsp) movl $0x18, %edi callq 0x3230 leaq 0x6b71(%rip), %rcx # 0xdd28 movq %rcx, (%rax) movq %r14, 0x8(%rax) movq %r15, 0x10(%rax) leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x18(%rsp), %rdi xorl %edx, %edx callq 0x3210 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x71e6 movq (%rdi), %rax callq *0x8(%rax) movq (%rbx), %rax cmpq $0x0, 0xc8(%rax) jne 0x720c movq 0x18(%rsp), %rcx movq %rcx, 0xc8(%rax) movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq callq 0x3070 movq %rax, %r14 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x723b movq (%rdi), %rax callq *0x8(%rax) jmp 0x723b movq %rax, %r14 testq %r15, %r15 je 0x723b movq %r15, %rdi callq 0x4d4e jmp 0x723b movq %rax, %r14 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x7249 callq 0x4d4e movq %r14, %rdi callq 0x3390 nop
_ZN4coro12io_scheduler11make_sharedENS0_7optionsE: push r15 push r14 push rbx sub rsp, 20h mov r14, rsi mov rbx, rdi mov rsi, rsp lea rcx, [rsp+38h+var_28] mov rdx, r14 call _ZNSt12__shared_ptrIN4coro12io_schedulerELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJNS1_7optionsENS1_19private_constructorEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<coro::io_scheduler,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<coro::io_scheduler>,coro::io_scheduler::options,coro::io_scheduler::private_constructor>(std::_Sp_alloc_shared_tag<std::allocator<coro::io_scheduler>>,coro::io_scheduler::options,coro::io_scheduler::private_constructor &&) cmp dword ptr [r14+90h], 0 jz loc_7145 loc_709D: mov r14, rsp mov dword ptr [r14], 1 lea rax, _ZN4coro12io_scheduler17m_shutdown_objectE; coro::io_scheduler::m_shutdown_object mov [r14+4], rax mov rax, [rbx] mov edi, [rax+0A8h] mov edx, [rax+0ACh] mov esi, 1 mov rcx, r14 call _epoll_ctl lea rax, _ZN4coro12io_scheduler14m_timer_objectE; coro::io_scheduler::m_timer_object mov [r14+4], rax mov rax, [rbx] mov edi, [rax+0A8h] mov edx, [rax+0B0h] mov esi, 1 mov rcx, r14 call _epoll_ctl lea rax, _ZN4coro12io_scheduler17m_schedule_objectE; coro::io_scheduler::m_schedule_object mov [r14+4], rax mov rax, [rbx] mov edi, [rax+0A8h] mov edx, [rax+0B4h] mov esi, 1 mov rcx, r14 call _epoll_ctl mov r14, [rbx] cmp dword ptr [r14+10h], 0 jnz loc_71FF mov r15, [rbx+8] test r15, r15 jz short loc_719D mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7198 inc dword ptr [r15+8] jmp short loc_719D loc_7145: mov rsi, [rbx] add rsi, 58h ; 'X' mov rdi, rsp call _ZSt11make_uniqueIN4coro11thread_poolEJNS1_7optionsEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<coro::thread_pool,coro::thread_pool::options>(coro::thread_pool::options &&) mov rax, [rbx] mov rcx, [rsp+38h+var_38] mov [rsp+38h+var_38], 0 mov rdi, [rax+0D0h] mov [rax+0D0h], rcx test rdi, rdi jz loc_709D mov rax, [rdi] call qword ptr [rax+8] mov rdi, [rsp+38h+var_38] test rdi, rdi jz loc_709D mov rax, [rdi] call qword ptr [rax+8] jmp loc_709D loc_7198: lock inc dword ptr [r15+8] loc_719D: mov [rsp+38h+var_20], 0 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_DD28 mov [rax], rcx mov [rax+8], r14 mov [rax+10h], r15 lea rsi, [rsp+38h+var_28] mov [rsi], rax lea rdi, [rsp+38h+var_20] xor edx, edx call __ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE; std::thread::_M_start_thread(std::unique_ptr<std::thread::_State>,void (*)(void)) mov rdi, [rsp+38h+var_28] test rdi, rdi jz short loc_71E6 mov rax, [rdi] call qword ptr [rax+8] loc_71E6: mov rax, [rbx] cmp qword ptr [rax+0C8h], 0 jnz short loc_720C mov rcx, [rsp+38h+var_20] mov [rax+0C8h], rcx loc_71FF: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn loc_720C: call __ZSt9terminatev; std::terminate(void) mov r14, rax mov rdi, [rsp+38h+var_28] test rdi, rdi jz short loc_723B mov rax, [rdi] call qword ptr [rax+8] jmp short loc_723B mov r14, rax test r15, r15 jz short loc_723B mov rdi, r15 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_723B mov r14, rax loc_723B: mov rdi, [rbx+8] test rdi, rdi jz short loc_7249 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7249: mov rdi, r14 call __Unwind_Resume
_QWORD * coro::io_scheduler::make_shared(_QWORD *a1, long long a2) { long long v3; // r14 long long v4; // r15 long long v5; // rax long long v6; // rcx long long v7; // rdi _QWORD *v8; // rax _BYTE v10[12]; // [rsp+0h] [rbp-38h] BYREF _QWORD *v11; // [rsp+10h] [rbp-28h] BYREF _QWORD v12[4]; // [rsp+18h] [rbp-20h] BYREF std::__shared_ptr<coro::io_scheduler,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<coro::io_scheduler>,coro::io_scheduler::options,coro::io_scheduler::private_constructor>( a1, v10, a2, &v11); if ( !*(_DWORD *)(a2 + 144) ) { std::make_unique<coro::thread_pool,coro::thread_pool::options>(v10, *a1 + 88LL); v5 = *a1; v6 = *(_QWORD *)v10; *(_QWORD *)v10 = 0LL; v7 = *(_QWORD *)(v5 + 208); *(_QWORD *)(v5 + 208) = v6; if ( v7 ) { (*(void ( **)(long long))(*(_QWORD *)v7 + 8LL))(v7); if ( *(_QWORD *)v10 ) (*(void ( **)(_QWORD))(**(_QWORD **)v10 + 8LL))(*(_QWORD *)v10); } } *(_DWORD *)v10 = 1; *(_QWORD *)&v10[4] = &coro::io_scheduler::m_shutdown_object; epoll_ctl(*(unsigned int *)(*a1 + 168LL), 1LL, *(unsigned int *)(*a1 + 172LL), v10); *(_QWORD *)&v10[4] = &coro::io_scheduler::m_timer_object; epoll_ctl(*(unsigned int *)(*a1 + 168LL), 1LL, *(unsigned int *)(*a1 + 176LL), v10); *(_QWORD *)&v10[4] = &coro::io_scheduler::m_schedule_object; epoll_ctl(*(unsigned int *)(*a1 + 168LL), 1LL, *(unsigned int *)(*a1 + 180LL), v10); v3 = *a1; if ( !*(_DWORD *)(*a1 + 16LL) ) { v4 = a1[1]; if ( v4 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v4 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v4 + 8)); } v12[0] = 0LL; v8 = (_QWORD *)operator new(0x18uLL); *v8 = off_DD28; v8[1] = v3; v8[2] = v4; v11 = v8; std::thread::_M_start_thread(v12, &v11, 0LL); if ( v11 ) (*(void ( **)(_QWORD *))(*v11 + 8LL))(v11); if ( *(_QWORD *)(*a1 + 200LL) ) std::terminate(); *(_QWORD *)(*a1 + 200LL) = v12[0]; } return a1; }
make_shared: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RSI MOV RBX,RDI MOV RSI,RSP LEA RCX,[RSP + 0x10] MOV RDX,R14 CALL 0x00108862 CMP dword ptr [R14 + 0x90],0x0 JZ 0x00107145 LAB_0010709d: MOV R14,RSP MOV dword ptr [R14],0x1 LEA RAX,[0x1092d8] MOV qword ptr [R14 + 0x4],RAX MOV RAX,qword ptr [RBX] MOV EDI,dword ptr [RAX + 0xa8] MOV EDX,dword ptr [RAX + 0xac] MOV ESI,0x1 MOV RCX,R14 CALL 0x001032d0 LEA RAX,[0x1092dc] MOV qword ptr [R14 + 0x4],RAX MOV RAX,qword ptr [RBX] MOV EDI,dword ptr [RAX + 0xa8] MOV EDX,dword ptr [RAX + 0xb0] MOV ESI,0x1 MOV RCX,R14 CALL 0x001032d0 LEA RAX,[0x1092e0] MOV qword ptr [R14 + 0x4],RAX MOV RAX,qword ptr [RBX] MOV EDI,dword ptr [RAX + 0xa8] MOV EDX,dword ptr [RAX + 0xb4] MOV ESI,0x1 MOV RCX,R14 CALL 0x001032d0 MOV R14,qword ptr [RBX] CMP dword ptr [R14 + 0x10],0x0 JNZ 0x001071ff MOV R15,qword ptr [RBX + 0x8] TEST R15,R15 JZ 0x0010719d MOV RAX,qword ptr [0x0010dfa8] CMP byte ptr [RAX],0x0 JZ 0x00107198 INC dword ptr [R15 + 0x8] JMP 0x0010719d LAB_00107145: MOV RSI,qword ptr [RBX] ADD RSI,0x58 LAB_0010714c: MOV RDI,RSP CALL 0x001083a6 LAB_00107154: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RSP] MOV qword ptr [RSP],0x0 MOV RDI,qword ptr [RAX + 0xd0] MOV qword ptr [RAX + 0xd0],RCX TEST RDI,RDI JZ 0x0010709d MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010709d MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] JMP 0x0010709d LAB_00107198: INC.LOCK dword ptr [R15 + 0x8] LAB_0010719d: MOV qword ptr [RSP + 0x18],0x0 LAB_001071a6: MOV EDI,0x18 CALL 0x00103230 LEA RCX,[0x10dd28] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R14 MOV qword ptr [RAX + 0x10],R15 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX LAB_001071ca: LEA RDI,[RSP + 0x18] XOR EDX,EDX CALL 0x00103210 LAB_001071d6: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001071e6 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_001071e6: MOV RAX,qword ptr [RBX] CMP qword ptr [RAX + 0xc8],0x0 JNZ 0x0010720c MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0xc8],RCX LAB_001071ff: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_0010720c: CALL 0x00103070
/* coro::io_scheduler::make_shared(coro::io_scheduler::options) */ io_scheduler * __thiscall coro::io_scheduler::make_shared(io_scheduler *this,long param_2) { long lVar1; long lVar2; long *plVar3; int8 uVar4; epoll_event local_38; long *local_28; int8 local_20; std::__shared_ptr<coro::io_scheduler,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<coro::io_scheduler>,coro::io_scheduler::options,coro::io_scheduler::private_constructor> ((__shared_ptr<coro::io_scheduler,(__gnu_cxx::_Lock_policy)2> *)this,&local_38,param_2, &local_28); if (*(int *)(param_2 + 0x90) == 0) { /* try { // try from 0010714c to 00107153 has its CatchHandler @ 00107238 */ std::make_unique<coro::thread_pool,coro::thread_pool::options>((options *)&local_38); uVar4 = CONCAT44(local_38._4_4_,local_38.events); local_38.events = 0; local_38._4_4_ = 0; plVar3 = *(long **)(*(long *)this + 0xd0); *(int8 *)(*(long *)this + 0xd0) = uVar4; if (plVar3 != (long *)0x0) { (**(code **)(*plVar3 + 8))(); if ((long *)CONCAT44(local_38._4_4_,local_38.events) != (long *)0x0) { (**(code **)(*(long *)CONCAT44(local_38._4_4_,local_38.events) + 8))(); } } } local_38.events = 1; local_38._4_4_ = 0x1092d8; local_38.data.fd = 0; epoll_ctl(*(int *)(*(long *)this + 0xa8),1,*(int *)(*(long *)this + 0xac),&local_38); local_38._4_4_ = 0x1092dc; local_38.data.fd = 0; epoll_ctl(*(int *)(*(long *)this + 0xa8),1,*(int *)(*(long *)this + 0xb0),&local_38); local_38._4_4_ = 0x1092e0; local_38.data.fd = 0; epoll_ctl(*(int *)(*(long *)this + 0xa8),1,*(int *)(*(long *)this + 0xb4),&local_38); lVar1 = *(long *)this; if (*(int *)(lVar1 + 0x10) == 0) { lVar2 = *(long *)(this + 8); if (lVar2 != 0) { if (*PTR___libc_single_threaded_0010dfa8 == '\0') { LOCK(); *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; UNLOCK(); } else { *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; } } local_20 = 0; /* try { // try from 001071a6 to 001071af has its CatchHandler @ 00107226 */ local_28 = (long *)operator_new(0x18); *local_28 = (long)&PTR___State_impl_0010dd28; local_28[1] = lVar1; local_28[2] = lVar2; /* try { // try from 001071ca to 001071d5 has its CatchHandler @ 00107211 */ std::thread::_M_start_thread(&local_20,&local_28,0); if (local_28 != (long *)0x0) { (**(code **)(*local_28 + 8))(); } if (*(long *)(*(long *)this + 200) != 0) { /* WARNING: Subroutine does not return */ std::terminate(); } *(int8 *)(*(long *)this + 200) = local_20; } return this; }
37,135
recursive_free
eloqsql/mysys/lf_dynarray.c
static void recursive_free(void **alloc, int level) { if (!alloc) return; if (level) { int i; for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++) recursive_free(alloc[i], level-1); my_free(alloc); } else my_free(alloc[-1]); }
O0
c
recursive_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) jne 0xfcd68 jmp 0xfcdb8 cmpl $0x0, -0xc(%rbp) je 0xfcdab movl $0x0, -0x10(%rbp) cmpl $0x100, -0x10(%rbp) # imm = 0x100 jge 0xfcda0 movq -0x8(%rbp), %rax movslq -0x10(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0xc(%rbp), %esi subl $0x1, %esi callq 0xfcd50 movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0xfcd75 movq -0x8(%rbp), %rdi callq 0xf3be0 jmp 0xfcdb8 movq -0x8(%rbp), %rax movq -0x8(%rax), %rdi callq 0xf3be0 addq $0x10, %rsp popq %rbp retq nop
recursive_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_8], 0 jnz short loc_FCD68 jmp short loc_FCDB8 loc_FCD68: cmp [rbp+var_C], 0 jz short loc_FCDAB mov [rbp+var_10], 0 loc_FCD75: cmp [rbp+var_10], 100h jge short loc_FCDA0 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_10] mov rdi, [rax+rcx*8] mov esi, [rbp+var_C] sub esi, 1 call recursive_free mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp short loc_FCD75 loc_FCDA0: mov rdi, [rbp+var_8] call my_free jmp short loc_FCDB8 loc_FCDAB: mov rax, [rbp+var_8] mov rdi, [rax-8] call my_free loc_FCDB8: add rsp, 10h pop rbp retn
long long recursive_free(long long a1, int a2) { long long result; // rax int i; // [rsp+0h] [rbp-10h] if ( a1 ) { if ( a2 ) { for ( i = 0; i < 256; ++i ) recursive_free(*(_QWORD *)(a1 + 8LL * i), (unsigned int)(a2 - 1)); return my_free(a1); } else { return my_free(*(_QWORD *)(a1 - 8)); } } return result; }
recursive_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x001fcd68 JMP 0x001fcdb8 LAB_001fcd68: CMP dword ptr [RBP + -0xc],0x0 JZ 0x001fcdab MOV dword ptr [RBP + -0x10],0x0 LAB_001fcd75: CMP dword ptr [RBP + -0x10],0x100 JGE 0x001fcda0 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + RCX*0x8] MOV ESI,dword ptr [RBP + -0xc] SUB ESI,0x1 CALL 0x001fcd50 MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001fcd75 LAB_001fcda0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f3be0 JMP 0x001fcdb8 LAB_001fcdab: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + -0x8] CALL 0x001f3be0 LAB_001fcdb8: ADD RSP,0x10 POP RBP RET
void recursive_free(long param_1,int param_2) { int4 local_18; if (param_1 != 0) { if (param_2 == 0) { my_free(*(int8 *)(param_1 + -8)); } else { for (local_18 = 0; local_18 < 0x100; local_18 = local_18 + 1) { recursive_free(*(int8 *)(param_1 + (long)local_18 * 8),param_2 + -1); } my_free(param_1); } } return; }
37,136
mysql_load_plugin_v
eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c
struct st_mysql_client_plugin * STDCALL mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, int argc, va_list args) { const char *errmsg; #ifdef _WIN32 char errbuf[1024]; #endif char dlpath[FN_REFLEN+1]; void *sym, *dlhandle = NULL; struct st_mysql_client_plugin *plugin; char *env_plugin_dir= getenv("MARIADB_PLUGIN_DIR"); CLEAR_CLIENT_ERROR(mysql); if (is_not_initialized(mysql, name)) return NULL; pthread_mutex_lock(&LOCK_load_client_plugin); /* make sure the plugin wasn't loaded meanwhile */ if (type >= 0 && find_plugin(name, type)) { errmsg= "it is already loaded"; goto err; } /* Compile dll path */ #ifndef WIN32 snprintf(dlpath, sizeof(dlpath) - 1, "%s/%s%s", mysql->options.extension && mysql->options.extension->plugin_dir ? mysql->options.extension->plugin_dir : (env_plugin_dir) ? env_plugin_dir : MARIADB_PLUGINDIR, name, SO_EXT); #else { char *p= (mysql->options.extension && mysql->options.extension->plugin_dir) ? mysql->options.extension->plugin_dir : env_plugin_dir; snprintf(dlpath, sizeof(dlpath), "%s%s%s%s", p ? p : "", p ? "\\" : "", name, SO_EXT); } #endif if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\")) { errmsg= "invalid plugin name"; goto err; } /* Open new dll handle */ if (!(dlhandle= dlopen((const char *)dlpath, RTLD_NOW))) { #ifdef _WIN32 char winmsg[255]; size_t len; winmsg[0] = 0; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), winmsg, 255, NULL); len= strlen(winmsg); while (len > 0 && (winmsg[len - 1] == '\n' || winmsg[len - 1] == '\r')) len--; if (len) winmsg[len] = 0; snprintf(errbuf, sizeof(errbuf), "%s Library path is '%s'", winmsg, dlpath); errmsg= errbuf; #else errmsg= dlerror(); #endif goto err; } if (!(sym= dlsym(dlhandle, plugin_declarations_sym))) { errmsg= "not a plugin"; (void)dlclose(dlhandle); goto err; } plugin= (struct st_mysql_client_plugin*)sym; if (type >=0 && type != plugin->type) { errmsg= "type mismatch"; goto err; } if (strcmp(name, plugin->name)) { errmsg= "name mismatch"; goto err; } if (type < 0 && find_plugin(name, plugin->type)) { errmsg= "it is already loaded"; goto err; } plugin= add_plugin(mysql, plugin, dlhandle, argc, args); pthread_mutex_unlock(&LOCK_load_client_plugin); return plugin; err: if (dlhandle) dlclose(dlhandle); pthread_mutex_unlock(&LOCK_load_client_plugin); my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg); return NULL; }
O3
c
mysql_load_plugin_v: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %r8, -0x258(%rbp) movl %ecx, %r12d movl %edx, %r13d movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0xf422(%rip), %rdi # 0x3b4b8 callq 0x135b0 movq %rax, %r15 movl $0x0, 0x90(%r14) movl $0x30303030, 0x297(%r14) # imm = 0x30303030 movw $0x30, 0x29b(%r14) movb $0x0, 0x97(%r14) movq 0x2a0(%r14), %rax testq %rax, %rax je 0x2c0d9 movl $0x0, 0x4(%rax) cmpb $0x0, 0x25c70(%rip) # 0x51d50 je 0x2c10f leaq 0x25c6f(%rip), %rdi # 0x51d58 callq 0x136c0 testl %r13d, %r13d js 0x2c141 movq %rbx, %rdi movl %r13d, %esi callq 0x2bfeb testq %rax, %rax je 0x2c141 leaq 0xf3c1(%rip), %r15 # 0x3b4cb jmp 0x2c24b leaq 0x23eea(%rip), %rax # 0x50000 movq (%rax), %rdx leaq 0x23ef0(%rip), %rax # 0x50010 movq 0x1d8(%rax), %rcx leaq 0xf4bb(%rip), %r9 # 0x3b5e9 xorl %r12d, %r12d movq %r14, %rdi movl $0x80b, %esi # imm = 0x80B movq %rbx, %r8 jmp 0x2c280 movq 0x480(%r14), %rax testq %rax, %rax je 0x2c155 movq (%rax), %r9 testq %r9, %r9 jne 0x2c163 testq %r15, %r15 leaq 0xf389(%rip), %r9 # 0x3b4e8 cmovneq %r15, %r9 leaq 0xf39c(%rip), %r10 # 0x3b506 leaq 0xf36f(%rip), %r8 # 0x3b4e0 leaq -0x240(%rbp), %rdi movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movl $0x1, %edx xorl %eax, %eax pushq %r10 pushq %rbx callq 0x132d0 addq $0x10, %rsp leaq 0xf36e(%rip), %rsi # 0x3b50a movq %rbx, %rdi callq 0x137d0 testq %rax, %rax je 0x2c1b5 leaq 0xf36e(%rip), %r15 # 0x3b51e jmp 0x2c24b leaq -0x240(%rbp), %rdi movl $0x2, %esi callq 0x13650 testq %rax, %rax je 0x2c21a movl %r12d, -0x24c(%rbp) leaq 0xf359(%rip), %rsi # 0x3b532 movq %rax, %r12 movq %rax, %rdi callq 0x13420 testq %rax, %rax je 0x2c224 movq %rax, %r15 movq %r12, -0x248(%rbp) testl %r13d, %r13d js 0x2c1fd cmpl %r13d, (%r15) jne 0x2c235 movq 0x8(%r15), %rsi movq %rbx, %rdi callq 0x13660 testl %eax, %eax je 0x2c2ab leaq 0xf357(%rip), %r15 # 0x3b56f jmp 0x2c23c callq 0x13430 movq %rax, %r15 jmp 0x2c24b movq %r12, %rdi callq 0x13370 leaq 0xf321(%rip), %r15 # 0x3b554 jmp 0x2c243 leaq 0xf325(%rip), %r15 # 0x3b561 movq -0x248(%rbp), %r12 movq %r12, %rdi callq 0x13370 leaq 0x25b06(%rip), %rdi # 0x51d58 callq 0x13340 leaq 0x23da2(%rip), %rax # 0x50000 movq (%rax), %rdx leaq 0x23da8(%rip), %rax # 0x50010 movq 0x1d8(%rax), %rcx xorl %r12d, %r12d movq %r14, %rdi movl $0x80b, %esi # imm = 0x80B movq %rbx, %r8 movq %r15, %r9 xorl %eax, %eax callq 0x1a0a1 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x2c2fc movq %r12, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r13d, %r13d js 0x2c2e0 movq %r14, %rdi movq %r15, %rsi movq -0x248(%rbp), %rdx movl -0x24c(%rbp), %ecx movq -0x258(%rbp), %r8 callq 0x2bd5c movq %rax, %r12 leaq 0x25a7f(%rip), %rdi # 0x51d58 callq 0x13340 jmp 0x2c287 movl (%r15), %esi movq %rbx, %rdi callq 0x2bfeb testq %rax, %rax je 0x2c2b0 leaq 0xf1d4(%rip), %r15 # 0x3b4cb jmp 0x2c23c callq 0x13510
mysql_load_plugin_v: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 238h mov [rbp+var_258], r8 mov r12d, ecx mov r13d, edx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax lea rdi, aMariadbPluginD; "MARIADB_PLUGIN_DIR" call _getenv mov r15, rax mov dword ptr [r14+90h], 0 mov dword ptr [r14+297h], 30303030h mov word ptr [r14+29Bh], 30h ; '0' mov byte ptr [r14+97h], 0 mov rax, [r14+2A0h] test rax, rax jz short loc_2C0D9 mov dword ptr [rax+4], 0 loc_2C0D9: cmp cs:initialized, 0 jz short loc_2C10F lea rdi, LOCK_load_client_plugin call _pthread_mutex_lock test r13d, r13d js short loc_2C141 mov rdi, rbx mov esi, r13d call find_plugin test rax, rax jz short loc_2C141 lea r15, aItIsAlreadyLoa; "it is already loaded" jmp loc_2C24B loc_2C10F: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] lea r9, aNotInitialized; "not initialized" xor r12d, r12d mov rdi, r14 mov esi, 80Bh mov r8, rbx jmp loc_2C280 loc_2C141: mov rax, [r14+480h] test rax, rax jz short loc_2C155 mov r9, [rax] test r9, r9 jnz short loc_2C163 loc_2C155: test r15, r15 lea r9, aHomeMonoInstal; "/home/mono/install/lib/plugin" cmovnz r9, r15 loc_2C163: lea r10, aSo; ".so" lea r8, aSSS; "%s/%s%s" lea rdi, [rbp+var_240] mov esi, 200h mov ecx, 201h mov edx, 1 xor eax, eax push r10 push rbx call ___snprintf_chk add rsp, 10h lea rsi, asc_3B50A; "()[]!@#$%^&/*;.,'?\\" mov rdi, rbx call _strpbrk test rax, rax jz short loc_2C1B5 lea r15, aInvalidPluginN; "invalid plugin name" jmp loc_2C24B loc_2C1B5: lea rdi, [rbp+var_240] mov esi, 2 call _dlopen test rax, rax jz short loc_2C21A mov [rbp+var_24C], r12d lea rsi, aMysqlClientPlu; "_mysql_client_plugin_declaration_" mov r12, rax mov rdi, rax call _dlsym test rax, rax jz short loc_2C224 mov r15, rax mov [rbp+var_248], r12 test r13d, r13d js short loc_2C1FD cmp [r15], r13d jnz short loc_2C235 loc_2C1FD: mov rsi, [r15+8] mov rdi, rbx call _strcmp test eax, eax jz loc_2C2AB lea r15, aNameMismatch; "name mismatch" jmp short loc_2C23C loc_2C21A: call _dlerror mov r15, rax jmp short loc_2C24B loc_2C224: mov rdi, r12 call _dlclose lea r15, aNotAPlugin; "not a plugin" jmp short loc_2C243 loc_2C235: lea r15, aTypeMismatch; "type mismatch" loc_2C23C: mov r12, [rbp+var_248] loc_2C243: mov rdi, r12 call _dlclose loc_2C24B: lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] xor r12d, r12d mov rdi, r14 mov esi, 80Bh mov r8, rbx mov r9, r15 loc_2C280: xor eax, eax call my_set_error loc_2C287: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_2C2FC mov rax, r12 add rsp, 238h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2C2AB: test r13d, r13d js short loc_2C2E0 loc_2C2B0: mov rdi, r14 mov rsi, r15 mov rdx, [rbp+var_248] mov ecx, [rbp+var_24C] mov r8, [rbp+var_258] call add_plugin mov r12, rax lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock jmp short loc_2C287 loc_2C2E0: mov esi, [r15] mov rdi, rbx call find_plugin test rax, rax jz short loc_2C2B0 lea r15, aItIsAlreadyLoa; "it is already loaded" jmp loc_2C23C loc_2C2FC: call ___stack_chk_fail
long long mysql_load_plugin_v(long long a1, const char *a2, int a3, unsigned int a4, long long a5) { long long v7; // r15 long long v8; // rax const char *v9; // r15 long long v10; // r12 const char **v11; // rax const char *v12; // r9 double v13; // xmm0_8 long long v14; // rax long long v15; // r12 long long v16; // rax int *v17; // r15 unsigned int v20; // [rsp+14h] [rbp-24Ch] _BYTE v21[528]; // [rsp+20h] [rbp-240h] BYREF unsigned long long v22; // [rsp+230h] [rbp-30h] v22 = __readfsqword(0x28u); v7 = getenv("MARIADB_PLUGIN_DIR"); *(_DWORD *)(a1 + 144) = 0; strcpy((char *)(a1 + 663), "00000"); *(_BYTE *)(a1 + 151) = 0; v8 = *(_QWORD *)(a1 + 672); if ( v8 ) *(_DWORD *)(v8 + 4) = 0; if ( initialized ) { pthread_mutex_lock(&LOCK_load_client_plugin); if ( a3 >= 0 && find_plugin((long long)a2, a3) ) { v9 = "it is already loaded"; } else { v11 = *(const char ***)(a1 + 1152); if ( !v11 || (v12 = *v11) == 0LL ) { v12 = "/home/mono/install/lib/plugin"; if ( v7 ) v12 = (const char *)v7; } v13 = __snprintf_chk(v21, 512LL, 1LL, 513LL, "%s/%s%s", v12, a2, ".so"); if ( strpbrk(a2, "()[]!@#$%^&/*;.,'?\\", v13) ) { v9 = "invalid plugin name"; } else { v14 = dlopen(v21, 2LL); if ( v14 ) { v20 = a4; v15 = v14; v16 = dlsym(v14, "_mysql_client_plugin_declaration_"); if ( v16 ) { v17 = (int *)v16; if ( a3 < 0 || *(_DWORD *)v16 == a3 ) { if ( !(unsigned int)strcmp(a2, *(_QWORD *)(v16 + 8)) ) { if ( a3 >= 0 || !find_plugin((long long)a2, *v17) ) { v10 = add_plugin(a1, (long long)v17, v15, v20, a5); pthread_mutex_unlock(&LOCK_load_client_plugin); return v10; } v9 = "it is already loaded"; } else { v9 = "name mismatch"; } } else { v9 = "type mismatch"; } } else { dlclose(v15); v9 = "not a plugin"; } dlclose(v15); } else { v9 = (const char *)dlerror(); } } } pthread_mutex_unlock(&LOCK_load_client_plugin); v10 = 0LL; my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, v9); } else { v10 = 0LL; my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, "not initialized"); } return v10; }
mysql_load_plugin_v: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x238 MOV qword ptr [RBP + -0x258],R8 MOV R12D,ECX MOV R13D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[0x13b4b8] CALL 0x001135b0 MOV R15,RAX MOV dword ptr [R14 + 0x90],0x0 MOV dword ptr [R14 + 0x297],0x30303030 MOV word ptr [R14 + 0x29b],0x30 MOV byte ptr [R14 + 0x97],0x0 MOV RAX,qword ptr [R14 + 0x2a0] TEST RAX,RAX JZ 0x0012c0d9 MOV dword ptr [RAX + 0x4],0x0 LAB_0012c0d9: CMP byte ptr [0x00151d50],0x0 JZ 0x0012c10f LEA RDI,[0x151d58] CALL 0x001136c0 TEST R13D,R13D JS 0x0012c141 MOV RDI,RBX MOV ESI,R13D CALL 0x0012bfeb TEST RAX,RAX JZ 0x0012c141 LEA R15,[0x13b4cb] JMP 0x0012c24b LAB_0012c10f: LEA RAX,[0x150000] MOV RDX,qword ptr [RAX] LEA RAX,[0x150010] MOV RCX,qword ptr [RAX + 0x1d8] LEA R9,[0x13b5e9] XOR R12D,R12D MOV RDI,R14 MOV ESI,0x80b MOV R8,RBX JMP 0x0012c280 LAB_0012c141: MOV RAX,qword ptr [R14 + 0x480] TEST RAX,RAX JZ 0x0012c155 MOV R9,qword ptr [RAX] TEST R9,R9 JNZ 0x0012c163 LAB_0012c155: TEST R15,R15 LEA R9,[0x13b4e8] CMOVNZ R9,R15 LAB_0012c163: LEA R10,[0x13b506] LEA R8,[0x13b4e0] LEA RDI,[RBP + -0x240] MOV ESI,0x200 MOV ECX,0x201 MOV EDX,0x1 XOR EAX,EAX PUSH R10 PUSH RBX CALL 0x001132d0 ADD RSP,0x10 LEA RSI,[0x13b50a] MOV RDI,RBX CALL 0x001137d0 TEST RAX,RAX JZ 0x0012c1b5 LEA R15,[0x13b51e] JMP 0x0012c24b LAB_0012c1b5: LEA RDI,[RBP + -0x240] MOV ESI,0x2 CALL 0x00113650 TEST RAX,RAX JZ 0x0012c21a MOV dword ptr [RBP + -0x24c],R12D LEA RSI,[0x13b532] MOV R12,RAX MOV RDI,RAX CALL 0x00113420 TEST RAX,RAX JZ 0x0012c224 MOV R15,RAX MOV qword ptr [RBP + -0x248],R12 TEST R13D,R13D JS 0x0012c1fd CMP dword ptr [R15],R13D JNZ 0x0012c235 LAB_0012c1fd: MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00113660 TEST EAX,EAX JZ 0x0012c2ab LEA R15,[0x13b56f] JMP 0x0012c23c LAB_0012c21a: CALL 0x00113430 MOV R15,RAX JMP 0x0012c24b LAB_0012c224: MOV RDI,R12 CALL 0x00113370 LEA R15,[0x13b554] JMP 0x0012c243 LAB_0012c235: LEA R15,[0x13b561] LAB_0012c23c: MOV R12,qword ptr [RBP + -0x248] LAB_0012c243: MOV RDI,R12 CALL 0x00113370 LAB_0012c24b: LEA RDI,[0x151d58] CALL 0x00113340 LEA RAX,[0x150000] MOV RDX,qword ptr [RAX] LEA RAX,[0x150010] MOV RCX,qword ptr [RAX + 0x1d8] XOR R12D,R12D MOV RDI,R14 MOV ESI,0x80b MOV R8,RBX MOV R9,R15 LAB_0012c280: XOR EAX,EAX CALL 0x0011a0a1 LAB_0012c287: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0012c2fc MOV RAX,R12 ADD RSP,0x238 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012c2ab: TEST R13D,R13D JS 0x0012c2e0 LAB_0012c2b0: MOV RDI,R14 MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x248] MOV ECX,dword ptr [RBP + -0x24c] MOV R8,qword ptr [RBP + -0x258] CALL 0x0012bd5c MOV R12,RAX LEA RDI,[0x151d58] CALL 0x00113340 JMP 0x0012c287 LAB_0012c2e0: MOV ESI,dword ptr [R15] MOV RDI,RBX CALL 0x0012bfeb TEST RAX,RAX JZ 0x0012c2b0 LEA R15,[0x13b4cb] JMP 0x0012c23c LAB_0012c2fc: CALL 0x00113510
int8 mysql_load_plugin_v(long param_1,char *param_2,int param_3,int4 param_4,int8 param_5) { int iVar1; char *pcVar2; long lVar3; int *piVar4; int8 uVar5; long lVar6; char *pcVar7; long in_FS_OFFSET; int1 local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = getenv("MARIADB_PLUGIN_DIR"); *(int4 *)(param_1 + 0x90) = 0; *(int4 *)(param_1 + 0x297) = 0x30303030; *(int2 *)(param_1 + 0x29b) = 0x30; *(int1 *)(param_1 + 0x97) = 0; if (*(long *)(param_1 + 0x2a0) != 0) { *(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0; } if (initialized == '\0') { pcVar2 = "not initialized"; } else { pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin); if ((param_3 < 0) || (lVar3 = find_plugin(param_2,param_3), lVar3 == 0)) { if (((*(long **)(param_1 + 0x480) == (long *)0x0) || (pcVar7 = (char *)**(long **)(param_1 + 0x480), pcVar7 == (char *)0x0)) && (pcVar7 = "/home/mono/install/lib/plugin", pcVar2 != (char *)0x0)) { pcVar7 = pcVar2; } __snprintf_chk(local_248,0x200,1,0x201,"%s/%s%s",pcVar7,param_2,&DAT_0013b506); pcVar2 = strpbrk(param_2,"()[]!@#$%^&/*;.,\'?\\"); if (pcVar2 == (char *)0x0) { lVar3 = dlopen(local_248,2); if (lVar3 == 0) { pcVar2 = (char *)dlerror(); } else { piVar4 = (int *)dlsym(lVar3,"_mysql_client_plugin_declaration_"); if (piVar4 == (int *)0x0) { dlclose(lVar3); pcVar2 = "not a plugin"; } else if ((param_3 < 0) || (*piVar4 == param_3)) { iVar1 = strcmp(param_2,*(char **)(piVar4 + 2)); if (iVar1 == 0) { if ((-1 < param_3) || (lVar6 = find_plugin(param_2,*piVar4), lVar6 == 0)) { uVar5 = add_plugin(param_1,piVar4,lVar3,param_4,param_5); pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); goto LAB_0012c287; } pcVar2 = "it is already loaded"; } else { pcVar2 = "name mismatch"; } } else { pcVar2 = "type mismatch"; } dlclose(lVar3); } } else { pcVar2 = "invalid plugin name"; } } else { pcVar2 = "it is already loaded"; } pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); } uVar5 = 0; my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____001501e8, param_2,pcVar2); LAB_0012c287: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar5; }
37,137
my_mb_wc_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O0
c
my_mb_wc_euc_kr: 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 cmpq -0x28(%rbp), %rax jb 0x3f4de movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x3f5cb movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x3f506 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x3f5cb movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x3f520 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x3f5cb movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x3f58e movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xfe, %eax jg 0x3f58e movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x41, %eax jl 0x3f556 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x5a, %eax jle 0x3f597 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x61, %eax jl 0x3f570 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7a, %eax jle 0x3f597 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x81, %eax jl 0x3f58e movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x3f597 movl $0x0, -0x4(%rbp) jmp 0x3f5cb movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0x3f940 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x3f5c4 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x3f5cb movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_euc_kr: 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] cmp rax, [rbp+var_28] jb short loc_3F4DE mov [rbp+var_4], 0FFFFFF9Bh jmp loc_3F5CB loc_3F4DE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_3F506 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_3F5CB loc_3F506: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_3F520 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_3F5CB loc_3F520: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_3F58E mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0FEh jg short loc_3F58E mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 41h ; 'A' jl short loc_3F556 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 5Ah ; 'Z' jle short loc_3F597 loc_3F556: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 61h ; 'a' jl short loc_3F570 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Ah ; 'z' jle short loc_3F597 loc_3F570: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 81h jl short loc_3F58E mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_3F597 loc_3F58E: mov [rbp+var_4], 0 jmp short loc_3F5CB loc_3F597: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_ksc5601_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_3F5C4 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_3F5CB loc_3F5C4: mov [rbp+var_4], 2 loc_3F5CB: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_euc_kr(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax unsigned int v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( v6 >= 0x80 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0x81u || (unsigned __int8)v6 == 255 || (a3[1] < 0x41u || a3[1] > 0x5Au) && (a3[1] < 0x61u || a3[1] > 0x7Au) && (a3[1] < 0x81u || a3[1] == 255) ) { return 0; } else { v4 = func_ksc5601_uni_onechar(a3[1] + (v6 << 8)); *a2 = v4; if ( v4 ) return 2; else return (unsigned int)-2; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_euc_kr: 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] CMP RAX,qword ptr [RBP + -0x28] JC 0x0013f4de MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0013f5cb LAB_0013f4de: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x0013f506 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013f5cb LAB_0013f506: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0013f520 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0013f5cb LAB_0013f520: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x0013f58e MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xfe JG 0x0013f58e MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x41 JL 0x0013f556 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x5a JLE 0x0013f597 LAB_0013f556: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x61 JL 0x0013f570 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7a JLE 0x0013f597 LAB_0013f570: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x81 JL 0x0013f58e MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x0013f597 LAB_0013f58e: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013f5cb LAB_0013f597: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX CALL 0x0013f940 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x0013f5c4 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0013f5cb LAB_0013f5c4: MOV dword ptr [RBP + -0x4],0x2 LAB_0013f5cb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_euc_kr(int8 param_1,long *param_2,byte *param_3,byte *param_4) { uint uVar1; int iVar2; int4 local_c; if (param_3 < param_4) { uVar1 = (uint)*param_3; if (uVar1 < 0x80) { *param_2 = (long)(int)uVar1; local_c = 1; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (((uVar1 < 0x81) || (0xfe < uVar1)) || ((((param_3[1] < 0x41 || (0x5a < param_3[1])) && ((param_3[1] < 0x61 || (0x7a < param_3[1])))) && ((param_3[1] < 0x81 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_ksc5601_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
37,138
heap_check_heap
eloqsql/storage/heap/_check.c
int heap_check_heap(const HP_INFO *info, my_bool print_status) { int error; uint key; ulong records=0, deleted=0, pos, next_block; HP_SHARE *share=info->s; uchar *current_ptr= info->current_ptr; DBUG_ENTER("heap_check_heap"); for (error=key= 0 ; key < share->keys ; key++) { if (share->keydef[key].algorithm == HA_KEY_ALG_BTREE) error|= check_one_rb_key(info, key, share->records, print_status); else error|= check_one_key(share->keydef + key, key, share->records, share->blength, print_status); } /* This is basicly the same code as in hp_scan, but we repeat it here to get shorter DBUG log file. */ for (pos=next_block= 0 ; ; pos++) { if (pos < next_block) { current_ptr+= share->block.recbuffer; } else { next_block+= share->block.records_in_block; if (next_block >= share->records+share->deleted) { next_block= share->records+share->deleted; if (pos >= next_block) break; /* End of file */ } } current_ptr= hp_find_block(&share->block, pos); if (!current_ptr[share->visible]) deleted++; else records++; } if (records != share->records || deleted != share->deleted) { DBUG_PRINT("error",("Found rows: %lu (%lu) deleted %lu (%lu)", records, (ulong) share->records, deleted, (ulong) share->deleted)); error= 1; } DBUG_RETURN(error); }
O0
c
heap_check_heap: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq $0x0, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) movl $0x0, -0x14(%rbp) movl $0x0, -0x10(%rbp) movl -0x14(%rbp), %eax movq -0x40(%rbp), %rcx cmpl 0x100(%rcx), %eax jae 0x24f1f movq -0x40(%rbp), %rax movq 0x98(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x368, %rcx, %rcx # imm = 0x368 addq %rcx, %rax movzbl 0xc(%rax), %eax cmpl $0x1, %eax jne 0x24ece movq -0x8(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x40(%rbp), %rax movq 0xd0(%rax), %rdx movsbl -0x9(%rbp), %ecx callq 0x25040 orl -0x10(%rbp), %eax movl %eax, -0x10(%rbp) jmp 0x24f0f movq -0x40(%rbp), %rax movq 0x98(%rax), %rdi movl -0x14(%rbp), %eax imulq $0x368, %rax, %rax # imm = 0x368 addq %rax, %rdi movl -0x14(%rbp), %esi movq -0x40(%rbp), %rax movq 0xd0(%rax), %rdx movq -0x40(%rbp), %rax movq 0xd8(%rax), %rcx movsbl -0x9(%rbp), %r8d callq 0x251b0 orl -0x10(%rbp), %eax movl %eax, -0x10(%rbp) jmp 0x24f11 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x24e77 movq $0x0, -0x38(%rbp) movq $0x0, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x24f52 movq -0x40(%rbp), %rax movl 0x84(%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x48(%rbp) jmp 0x24fae movq -0x40(%rbp), %rax movq 0x88(%rax), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x40(%rbp), %rcx movq 0xd0(%rcx), %rcx movq -0x40(%rbp), %rdx addq 0xe0(%rdx), %rcx cmpq %rcx, %rax jb 0x24fac movq -0x40(%rbp), %rax movq 0xd0(%rax), %rax movq -0x40(%rbp), %rcx addq 0xe0(%rcx), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jb 0x24faa jmp 0x25000 jmp 0x24fac jmp 0x24fae movq -0x40(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0x25520 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx movl 0xf8(%rcx), %ecx cmpb $0x0, (%rax,%rcx) jne 0x24fe1 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x24fed movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x24fef movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x24f2f movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx cmpq 0xd0(%rcx), %rax jne 0x25022 movq -0x28(%rbp), %rax movq -0x40(%rbp), %rcx cmpq 0xe0(%rcx), %rax je 0x2502d jmp 0x25024 jmp 0x25026 movl $0x1, -0x10(%rbp) jmp 0x2502f movl -0x10(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
heap_check_heap: push rbp mov rbp, rsp sub rsp, 50h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov [rbp+var_20], 0 mov [rbp+var_28], 0 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_48], rax mov [rbp+var_14], 0 mov [rbp+var_10], 0 loc_24E77: mov eax, [rbp+var_14] mov rcx, [rbp+var_40] cmp eax, [rcx+100h] jnb loc_24F1F mov rax, [rbp+var_40] mov rax, [rax+98h] mov ecx, [rbp+var_14] imul rcx, 368h add rax, rcx movzx eax, byte ptr [rax+0Ch] cmp eax, 1 jnz short loc_24ECE mov rdi, [rbp+var_8] mov esi, [rbp+var_14] mov rax, [rbp+var_40] mov rdx, [rax+0D0h] movsx ecx, [rbp+var_9] call check_one_rb_key or eax, [rbp+var_10] mov [rbp+var_10], eax jmp short loc_24F0F loc_24ECE: mov rax, [rbp+var_40] mov rdi, [rax+98h] mov eax, [rbp+var_14] imul rax, 368h add rdi, rax mov esi, [rbp+var_14] mov rax, [rbp+var_40] mov rdx, [rax+0D0h] mov rax, [rbp+var_40] mov rcx, [rax+0D8h] movsx r8d, [rbp+var_9] call check_one_key or eax, [rbp+var_10] mov [rbp+var_10], eax loc_24F0F: jmp short $+2 loc_24F11: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_24E77 loc_24F1F: mov [rbp+var_38], 0 mov [rbp+var_30], 0 loc_24F2F: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb short loc_24F52 mov rax, [rbp+var_40] mov ecx, [rax+84h] mov rax, [rbp+var_48] mov ecx, ecx add rax, rcx mov [rbp+var_48], rax jmp short loc_24FAE loc_24F52: mov rax, [rbp+var_40] mov rax, [rax+88h] add rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_40] mov rcx, [rcx+0D0h] mov rdx, [rbp+var_40] add rcx, [rdx+0E0h] cmp rax, rcx jb short loc_24FAC mov rax, [rbp+var_40] mov rax, [rax+0D0h] mov rcx, [rbp+var_40] add rax, [rcx+0E0h] mov [rbp+var_38], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jb short loc_24FAA jmp short loc_25000 loc_24FAA: jmp short $+2 loc_24FAC: jmp short $+2 loc_24FAE: mov rdi, [rbp+var_40] mov rsi, [rbp+var_30] call hp_find_block mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_40] mov ecx, [rcx+0F8h] cmp byte ptr [rax+rcx], 0 jnz short loc_24FE1 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_24FED loc_24FE1: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax loc_24FED: jmp short $+2 loc_24FEF: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp loc_24F2F loc_25000: mov rax, [rbp+var_20] mov rcx, [rbp+var_40] cmp rax, [rcx+0D0h] jnz short loc_25022 mov rax, [rbp+var_28] mov rcx, [rbp+var_40] cmp rax, [rcx+0E0h] jz short loc_2502D loc_25022: jmp short $+2 loc_25024: jmp short $+2 loc_25026: mov [rbp+var_10], 1 loc_2502D: jmp short $+2 loc_2502F: mov eax, [rbp+var_10] mov [rbp+var_4C], eax mov eax, [rbp+var_4C] add rsp, 50h pop rbp retn
long long heap_check_heap(long long *a1, char a2) { long long v3; // [rsp+10h] [rbp-40h] unsigned long long v4; // [rsp+18h] [rbp-38h] unsigned long long i; // [rsp+20h] [rbp-30h] long long v6; // [rsp+28h] [rbp-28h] long long v7; // [rsp+30h] [rbp-20h] unsigned int v8; // [rsp+3Ch] [rbp-14h] unsigned int v9; // [rsp+40h] [rbp-10h] v7 = 0LL; v6 = 0LL; v3 = *a1; v8 = 0; v9 = 0; while ( v8 < *(_DWORD *)(v3 + 256) ) { if ( *(_BYTE *)(872LL * v8 + *(_QWORD *)(v3 + 152) + 12) == 1 ) v9 |= check_one_rb_key(a1, v8, *(_QWORD *)(v3 + 208), (unsigned int)a2); else v9 |= check_one_key( 872LL * v8 + *(_QWORD *)(v3 + 152), v8, *(_QWORD *)(v3 + 208), *(_QWORD *)(v3 + 216), (unsigned int)a2); ++v8; } v4 = 0LL; for ( i = 0LL; ; ++i ) { if ( i >= v4 ) { v4 += *(_QWORD *)(v3 + 136); if ( v4 >= *(_QWORD *)(v3 + 224) + *(_QWORD *)(v3 + 208) ) { v4 = *(_QWORD *)(v3 + 224) + *(_QWORD *)(v3 + 208); if ( i >= v4 ) break; } } if ( *(_BYTE *)(hp_find_block(v3, i) + *(unsigned int *)(v3 + 248)) ) ++v7; else ++v6; } if ( v7 != *(_QWORD *)(v3 + 208) || v6 != *(_QWORD *)(v3 + 224) ) return 1; return v9; }
heap_check_heap: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV qword ptr [RBP + -0x20],0x0 MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x14],0x0 MOV dword ptr [RBP + -0x10],0x0 LAB_00124e77: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x40] CMP EAX,dword ptr [RCX + 0x100] JNC 0x00124f1f MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x98] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x368 ADD RAX,RCX MOVZX EAX,byte ptr [RAX + 0xc] CMP EAX,0x1 JNZ 0x00124ece MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RAX + 0xd0] MOVSX ECX,byte ptr [RBP + -0x9] CALL 0x00125040 OR EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x10],EAX JMP 0x00124f0f LAB_00124ece: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x98] MOV EAX,dword ptr [RBP + -0x14] IMUL RAX,RAX,0x368 ADD RDI,RAX MOV ESI,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RAX + 0xd0] MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0xd8] MOVSX R8D,byte ptr [RBP + -0x9] CALL 0x001251b0 OR EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x10],EAX LAB_00124f0f: JMP 0x00124f11 LAB_00124f11: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00124e77 LAB_00124f1f: MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x30],0x0 LAB_00124f2f: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00124f52 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RAX + 0x84] MOV RAX,qword ptr [RBP + -0x48] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX JMP 0x00124fae LAB_00124f52: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x88] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RCX + 0xd0] MOV RDX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RDX + 0xe0] CMP RAX,RCX JC 0x00124fac MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0xd0] MOV RCX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RCX + 0xe0] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JC 0x00124faa JMP 0x00125000 LAB_00124faa: JMP 0x00124fac LAB_00124fac: JMP 0x00124fae LAB_00124fae: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] CALL 0x00125520 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0xf8] CMP byte ptr [RAX + RCX*0x1],0x0 JNZ 0x00124fe1 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00124fed LAB_00124fe1: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX LAB_00124fed: JMP 0x00124fef LAB_00124fef: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00124f2f LAB_00125000: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RCX + 0xd0] JNZ 0x00125022 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RCX + 0xe0] JZ 0x0012502d LAB_00125022: JMP 0x00125024 LAB_00125024: JMP 0x00125026 LAB_00125026: MOV dword ptr [RBP + -0x10],0x1 LAB_0012502d: JMP 0x0012502f LAB_0012502f: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x50 POP RBP RET
uint heap_check_heap(long *param_1,char param_2) { long lVar1; uint uVar2; long lVar3; ulong local_40; ulong local_38; long local_30; long local_28; uint local_1c; uint local_18; local_28 = 0; local_30 = 0; lVar1 = *param_1; local_18 = 0; for (local_1c = 0; local_1c < *(uint *)(lVar1 + 0x100); local_1c = local_1c + 1) { if (*(char *)(*(long *)(lVar1 + 0x98) + (ulong)local_1c * 0x368 + 0xc) == '\x01') { uVar2 = check_one_rb_key(param_1,local_1c,*(int8 *)(lVar1 + 0xd0),(int)param_2); } else { uVar2 = check_one_key(*(long *)(lVar1 + 0x98) + (ulong)local_1c * 0x368,local_1c, *(int8 *)(lVar1 + 0xd0),*(int8 *)(lVar1 + 0xd8),(int)param_2 ); } local_18 = uVar2 | local_18; } local_40 = 0; for (local_38 = 0; ((local_38 < local_40 || (local_40 = *(long *)(lVar1 + 0x88) + local_40, local_40 < (ulong)(*(long *)(lVar1 + 0xd0) + *(long *)(lVar1 + 0xe0)))) || (local_40 = *(long *)(lVar1 + 0xd0) + *(long *)(lVar1 + 0xe0), local_38 < local_40)); local_38 = local_38 + 1) { lVar3 = hp_find_block(lVar1,local_38); if (*(char *)(lVar3 + (ulong)*(uint *)(lVar1 + 0xf8)) == '\0') { local_30 = local_30 + 1; } else { local_28 = local_28 + 1; } } if ((local_28 != *(long *)(lVar1 + 0xd0)) || (local_30 != *(long *)(lVar1 + 0xe0))) { local_18 = 1; } return local_18; }
37,139
ma_read_pack_record
eloqsql/storage/maria/ma_packrec.c
int _ma_read_pack_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; File file; DBUG_ENTER("maria_read_pack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(my_errno); /* _search() didn't find record */ file= info->dfile.file; if (_ma_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, file, filepos)) goto err; if (mysql_file_read(file, info->rec_buff + block_info.offset , block_info.rec_len - block_info.offset, MYF(MY_NABP))) goto panic; info->update|= HA_STATE_AKTIV; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_ma_pack_rec_unpack(info,&info->bit_buff, buf, info->rec_buff, block_info.rec_len)); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); err: DBUG_RETURN(my_errno); }
O0
c
ma_read_pack_record: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) cmpq $-0x1, -0x80(%rbp) jne 0x32e8c jmp 0x32e7d callq 0xf55f0 movl (%rax), %eax movl %eax, -0x64(%rbp) jmp 0x32f8f movq -0x70(%rbp), %rax movl 0x480(%rax), %eax movl %eax, -0x84(%rbp) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x70(%rbp), %rcx addq $0x3a0, %rcx # imm = 0x3A0 movq -0x70(%rbp), %r8 addq $0x460, %r8 # imm = 0x460 movl -0x84(%rbp), %r9d movq -0x80(%rbp), %rax leaq -0x60(%rbp), %rdx movq %rax, (%rsp) callq 0x32fc0 cmpl $0x0, %eax je 0x32ee3 jmp 0x32f83 movl -0x84(%rbp), %edx movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rcx movl -0xc(%rbp), %eax addq %rax, %rcx movq -0x48(%rbp), %r8 movl -0xc(%rbp), %eax subq %rax, %r8 leaq 0x11d4fe(%rip), %rdi # 0x150409 movl $0x2f5, %esi # imm = 0x2F5 movl $0x4, %r9d callq 0x331f0 cmpq $0x0, %rax je 0x32f23 jmp 0x32f75 movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rax movq -0x48(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x78(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rcx movq -0x48(%rbp), %r8 callq 0x33360 movl %eax, -0x64(%rbp) jmp 0x32f8f movq -0x70(%rbp), %rdi movl $0x7f, %esi callq 0x2e940 jmp 0x32f85 callq 0xf55f0 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x32fb9 movl -0x88(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x2a260 nop
_ma_read_pack_record: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jnz short loc_32E8C jmp short $+2 loc_32E7D: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax jmp loc_32F8F loc_32E8C: mov rax, [rbp+var_70] mov eax, [rax+480h] mov [rbp+var_84], eax mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rcx, [rbp+var_70] add rcx, 3A0h mov r8, [rbp+var_70] add r8, 460h mov r9d, [rbp+var_84] mov rax, [rbp+var_80] lea rdx, [rbp+var_60] mov [rsp+90h+var_90], rax call _ma_pack_get_block_info cmp eax, 0 jz short loc_32EE3 jmp loc_32F83 loc_32EE3: mov edx, [rbp+var_84] mov rax, [rbp+var_70] mov rcx, [rax+3A0h] mov eax, [rbp+var_C] add rcx, rax mov r8, [rbp+var_48] mov eax, [rbp+var_C] sub r8, rax lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2F5h mov r9d, 4 call inline_mysql_file_read cmp rax, 0 jz short loc_32F23 jmp short loc_32F75 loc_32F23: mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 2 mov [rax+624h], ecx mov rax, [rbp+var_70] mov rax, [rax+3A0h] mov rcx, [rbp+var_48] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rdx, [rbp+var_78] mov rax, [rbp+var_70] mov rcx, [rax+3A0h] mov r8, [rbp+var_48] call _ma_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_32F8F loc_32F75: mov rdi, [rbp+var_70] mov esi, 7Fh call _ma_set_fatal_error loc_32F83: jmp short $+2 loc_32F85: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_32F8F: mov eax, [rbp+var_64] mov [rbp+var_88], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_32FB9 mov eax, [rbp+var_88] add rsp, 90h pop rbp retn loc_32FB9: call ___stack_chk_fail
long long ma_read_pack_record(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 int v6; // r9d unsigned int v8; // [rsp+Ch] [rbp-84h] char v10; // [rsp+30h] [rbp-60h] BYREF long long v11; // [rsp+48h] [rbp-48h] unsigned int v12; // [rsp+84h] [rbp-Ch] unsigned long long v13; // [rsp+88h] [rbp-8h] v13 = __readfsqword(0x28u); if ( a3 != -1 ) { v8 = *(_DWORD *)(a1 + 1152); if ( !(unsigned int)ma_pack_get_block_info( a1, (int)a1 + 656, (unsigned int)&v10, (int)a1 + 928, (int)a1 + 1120, v8, a3) ) { if ( !inline_mysql_file_read( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 757LL, v8, v12 + *(_QWORD *)(a1 + 928), v11 - v12, 4LL) ) { *(_DWORD *)(a1 + 1572) |= 2u; *(_BYTE *)(*(_QWORD *)(a1 + 928) + v11) = 0; return (unsigned int)ma_pack_rec_unpack(a1, a1 + 656, a2, *(_QWORD *)(a1 + 928), v11); } ma_set_fatal_error((_DWORD *)a1, 127, v3, v4, v5, v6); } return *(unsigned int *)my_thread_var(); } return *(unsigned int *)my_thread_var(); }
_ma_read_pack_record: PUSH RBP MOV RBP,RSP SUB RSP,0x90 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 CMP qword ptr [RBP + -0x80],-0x1 JNZ 0x00132e8c JMP 0x00132e7d LAB_00132e7d: CALL 0x001f55f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX JMP 0x00132f8f LAB_00132e8c: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x480] MOV dword ptr [RBP + -0x84],EAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x3a0 MOV R8,qword ptr [RBP + -0x70] ADD R8,0x460 MOV R9D,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x80] LEA RDX,[RBP + -0x60] MOV qword ptr [RSP],RAX CALL 0x00132fc0 CMP EAX,0x0 JZ 0x00132ee3 JMP 0x00132f83 LAB_00132ee3: MOV EDX,dword ptr [RBP + -0x84] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x3a0] MOV EAX,dword ptr [RBP + -0xc] ADD RCX,RAX MOV R8,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0xc] SUB R8,RAX LEA RDI,[0x250409] MOV ESI,0x2f5 MOV R9D,0x4 CALL 0x001331f0 CMP RAX,0x0 JZ 0x00132f23 JMP 0x00132f75 LAB_00132f23: 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 + 0x3a0] MOV RCX,qword ptr [RBP + -0x48] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RDX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x3a0] MOV R8,qword ptr [RBP + -0x48] CALL 0x00133360 MOV dword ptr [RBP + -0x64],EAX JMP 0x00132f8f LAB_00132f75: MOV RDI,qword ptr [RBP + -0x70] MOV ESI,0x7f CALL 0x0012e940 LAB_00132f83: JMP 0x00132f85 LAB_00132f85: CALL 0x001f55f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_00132f8f: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x88],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00132fb9 MOV EAX,dword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET LAB_00132fb9: CALL 0x0012a260
int4 _ma_read_pack_record(long param_1,int8 param_2,long param_3) { int4 uVar1; int iVar2; int4 *puVar3; long lVar4; long in_FS_OFFSET; int4 local_6c; int1 local_68 [24]; long local_50; uint local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 == -1) { puVar3 = (int4 *)_my_thread_var(); local_6c = *puVar3; } else { uVar1 = *(int4 *)(param_1 + 0x480); iVar2 = _ma_pack_get_block_info (param_1,param_1 + 0x290,local_68,param_1 + 0x3a0,param_1 + 0x460,uVar1, param_3); if (iVar2 == 0) { lVar4 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",0x2f5 ,uVar1,*(long *)(param_1 + 0x3a0) + (ulong)local_14, local_50 - (ulong)local_14,4); if (lVar4 == 0) { *(uint *)(param_1 + 0x624) = *(uint *)(param_1 + 0x624) | 2; *(int1 *)(*(long *)(param_1 + 0x3a0) + local_50) = 0; local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x290,param_2, *(int8 *)(param_1 + 0x3a0),local_50); goto LAB_00132f8f; } _ma_set_fatal_error(param_1,0x7f); } puVar3 = (int4 *)_my_thread_var(); local_6c = *puVar3; } LAB_00132f8f: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
37,140
psi_rwlock_trywrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line); int result= rw_trywrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_rwlock_trywrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x360a44(%rip), %r15 # 0x390b18 movq (%r15), %rax movq 0x90(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x3 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0xab84b movl %eax, %r14d testq %rbx, %rbx je 0x3010d movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_rwlock_trywrlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+90h] lea rdi, [rbp+var_48] push 3 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call my_rw_trywrlock mov r14d, eax test rbx, rbx jz short loc_3010D mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_3010D: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])( v6, *(_QWORD *)(a1 + 144), 3LL, a2, a3); v4 = my_rw_trywrlock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4); return v4; }
psi_rwlock_trywrlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x490b18] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x90] LEA RDI,[RBP + -0x48] PUSH 0x3 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x001ab84b MOV R14D,EAX TEST RBX,RBX JZ 0x0013010d MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_0013010d: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3); uVar1 = my_rw_trywrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
37,141
compile_or_expr_cont
fabiosvm[P]rak/src/compiler.c
static inline void compile_or_expr_cont(RakCompiler *comp, uint16_t *off, RakError *err) { if (!match(comp, RAK_TOKEN_KIND_PIPEPIPE)) { if (off) *off = (uint16_t) comp->chunk.instrs.len; return; } next(comp, err); uint16_t jump = emit_instr(comp, rak_nop_instr(), err); if (!rak_is_ok(err)) return; emit_instr(comp, rak_pop_instr(), err); if (!rak_is_ok(err)) return; compile_and_expr(comp, err); if (!rak_is_ok(err)) return; uint16_t _off; compile_or_expr_cont(comp, &_off, err); if (!rak_is_ok(err)) return; patch_instr(comp, jump, rak_jump_instr(_off)); if (off) *off = _off; }
O3
c
compile_or_expr_cont: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpl $0xa, 0x2810(%rdi) jne 0x4e0f movq %rdx, %r15 leaq 0x27f8(%r14), %rdi movq %rdx, %rsi callq 0x679a cmpb $0x1, (%r15) jne 0x4e1f movq %r14, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x392d cmpb $0x1, (%r15) jne 0x4e1f movl %eax, %ebp movq %r14, %rdi movl $0xc, %esi movq %r15, %rdx callq 0x392d cmpb $0x1, (%r15) jne 0x4e1f movq %r14, %rdi movq %r15, %rsi callq 0x4e2a movb (%r15), %al cmpb $0x1, %al jne 0x4dd1 movq %r14, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x4ed9 movb (%r15), %al testb $0x1, %al je 0x4e1f leaq 0x6(%rsp), %rsi movq %r14, %rdi movq %r15, %rdx callq 0x4d4a cmpb $0x1, (%r15) jne 0x4e1f movzwl 0x6(%rsp), %eax movl %eax, %ecx shll $0x8, %ecx orl $0xd, %ecx movq 0x1000(%r14), %rdx movzwl %bp, %esi movl %ecx, (%rdx,%rsi,4) testq %rbx, %rbx je 0x4e1f movw %ax, (%rbx) jmp 0x4e1f testq %rbx, %rbx je 0x4e1f movzwl 0xffc(%r14), %eax movw %ax, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
compile_or_expr_cont: push rbp push r15 push r14 push rbx push rax mov rbx, rsi mov r14, rdi cmp dword ptr [rdi+2810h], 0Ah jnz loc_4E0F mov r15, rdx lea rdi, [r14+27F8h] mov rsi, rdx call rak_lexer_next cmp byte ptr [r15], 1 jnz loc_4E1F mov rdi, r14 xor esi, esi mov rdx, r15 call rak_chunk_append_instr cmp byte ptr [r15], 1 jnz loc_4E1F mov ebp, eax mov rdi, r14 mov esi, 0Ch mov rdx, r15 call rak_chunk_append_instr cmp byte ptr [r15], 1 jnz short loc_4E1F mov rdi, r14 mov rsi, r15 call compile_eq_expr mov al, [r15] cmp al, 1 jnz short loc_4DD1 mov rdi, r14 xor esi, esi mov rdx, r15 call compile_and_expr_cont mov al, [r15] loc_4DD1: test al, 1 jz short loc_4E1F lea rsi, [rsp+28h+var_22] mov rdi, r14 mov rdx, r15 call compile_or_expr_cont cmp byte ptr [r15], 1 jnz short loc_4E1F movzx eax, [rsp+28h+var_22] mov ecx, eax shl ecx, 8 or ecx, 0Dh mov rdx, [r14+1000h] movzx esi, bp mov [rdx+rsi*4], ecx test rbx, rbx jz short loc_4E1F mov [rbx], ax jmp short loc_4E1F loc_4E0F: test rbx, rbx jz short loc_4E1F movzx eax, word ptr [r14+0FFCh] mov [rbx], ax loc_4E1F: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char compile_or_expr_cont(long long a1, _WORD *a2, char *a3) { long long v3; // rax int v5; // ecx int v6; // r8d int v7; // r9d int v8; // ecx int v9; // r8d int v10; // r9d unsigned __int16 v11; // bp _WORD v13[17]; // [rsp+0h] [rbp-22h] BYREF v13[0] = HIWORD(v3); if ( *(_DWORD *)(a1 + 10256) == 10 ) { LOBYTE(v3) = rak_lexer_next(a1 + 10232, a3); if ( *a3 == 1 ) { LOWORD(v3) = rak_chunk_append_instr(a1, 0, a3, v5, v6, v7); if ( *a3 == 1 ) { v11 = v3; LOBYTE(v3) = rak_chunk_append_instr(a1, 12, a3, v8, v9, v10); if ( *a3 == 1 ) { compile_eq_expr(a1, a3); LOBYTE(v3) = *a3; if ( *a3 == 1 ) { compile_and_expr_cont(a1, 0LL, a3); LOBYTE(v3) = *a3; } if ( (v3 & 1) != 0 ) { LOBYTE(v3) = compile_or_expr_cont(a1, v13, a3); if ( *a3 == 1 ) { LOWORD(v3) = v13[0]; *(_DWORD *)(*(_QWORD *)(a1 + 4096) + 4LL * v11) = (v13[0] << 8) | 0xD; if ( a2 ) *a2 = v3; } } } } } } else if ( a2 ) { LOWORD(v3) = *(_WORD *)(a1 + 4092); *a2 = v3; } return v3; }
compile_or_expr_cont: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CMP dword ptr [RDI + 0x2810],0xa JNZ 0x00104e0f MOV R15,RDX LEA RDI,[R14 + 0x27f8] MOV RSI,RDX CALL 0x0010679a CMP byte ptr [R15],0x1 JNZ 0x00104e1f MOV RDI,R14 XOR ESI,ESI MOV RDX,R15 CALL 0x0010392d CMP byte ptr [R15],0x1 JNZ 0x00104e1f MOV EBP,EAX MOV RDI,R14 MOV ESI,0xc MOV RDX,R15 CALL 0x0010392d CMP byte ptr [R15],0x1 JNZ 0x00104e1f MOV RDI,R14 MOV RSI,R15 CALL 0x00104e2a MOV AL,byte ptr [R15] CMP AL,0x1 JNZ 0x00104dd1 MOV RDI,R14 XOR ESI,ESI MOV RDX,R15 CALL 0x00104ed9 MOV AL,byte ptr [R15] LAB_00104dd1: TEST AL,0x1 JZ 0x00104e1f LEA RSI,[RSP + 0x6] MOV RDI,R14 MOV RDX,R15 CALL 0x00104d4a CMP byte ptr [R15],0x1 JNZ 0x00104e1f MOVZX EAX,word ptr [RSP + 0x6] MOV ECX,EAX SHL ECX,0x8 OR ECX,0xd MOV RDX,qword ptr [R14 + 0x1000] MOVZX ESI,BP MOV dword ptr [RDX + RSI*0x4],ECX TEST RBX,RBX JZ 0x00104e1f MOV word ptr [RBX],AX JMP 0x00104e1f LAB_00104e0f: TEST RBX,RBX JZ 0x00104e1f MOVZX EAX,word ptr [R14 + 0xffc] MOV word ptr [RBX],AX LAB_00104e1f: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void compile_or_expr_cont(long param_1,ushort *param_2,byte *param_3) { byte bVar1; ushort uVar2; int8 in_RAX; ushort local_22; local_22 = (ushort)((ulong)in_RAX >> 0x30); if (*(int *)(param_1 + 0x2810) == 10) { rak_lexer_next(param_1 + 0x27f8,param_3); if (*param_3 == 1) { uVar2 = rak_chunk_append_instr(param_1,0,param_3); if (*param_3 == 1) { rak_chunk_append_instr(param_1,0xc,param_3); if (*param_3 == 1) { compile_eq_expr(param_1,param_3); bVar1 = *param_3; if (bVar1 == 1) { compile_and_expr_cont(param_1,0,param_3); bVar1 = *param_3; } if ((bVar1 & 1) != 0) { compile_or_expr_cont(param_1,&local_22,param_3); if (*param_3 == 1) { *(uint *)(*(long *)(param_1 + 0x1000) + (ulong)uVar2 * 4) = (uint)local_22 << 8 | 0xd; if (param_2 != (ushort *)0x0) { *param_2 = local_22; } } } } } } } else if (param_2 != (ushort *)0x0) { *param_2 = *(ushort *)(param_1 + 0xffc); } return; }
37,142
mi_dynmap_file
eloqsql/storage/myisam/mi_dynrec.c
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); if (size == 0 || size > (my_off_t) (~((size_t) 0))) { if (size) DBUG_PRINT("warning", ("File is too large for mmap")); else DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* I wonder if it is good to use MAP_NORESERVE. From the Linux man page: MAP_NORESERVE Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. */ info->s->file_map= (uchar*) my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, info->dfile, 0L); if (info->s->file_map == (uchar*) MAP_FAILED) { info->s->file_map= NULL; DBUG_RETURN(1); } #if defined(HAVE_MADVISE) madvise((char*) info->s->file_map, size, MADV_RANDOM); #endif info->s->mmaped_length= (size_t) size; info->s->file_read= mi_mmap_pread; info->s->file_write= mi_mmap_pwrite; DBUG_RETURN(0); }
O0
c
mi_dynmap_file: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xa830e cmpq $-0x1, -0x18(%rbp) jbe 0xa832c cmpq $0x0, -0x18(%rbp) je 0xa831b jmp 0xa8317 jmp 0xa8319 jmp 0xa8321 jmp 0xa831d jmp 0xa831f jmp 0xa8321 jmp 0xa8323 movb $0x1, -0x1(%rbp) jmp 0xa8406 movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x358(%rax), %ecx movl $0x3, %edx movl $0x1, %eax cmpl $0x0, %ecx cmovel %eax, %edx movq -0x10(%rbp), %rax movl 0x1c0(%rax), %r8d xorl %eax, %eax movl %eax, %r9d movl $0x4001, %ecx # imm = 0x4001 movq %r9, %rdi callq 0x2a5f0 movq %rax, %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x270(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq $-0x1, %rcx cmpq %rcx, 0x270(%rax) jne 0xa83aa movq -0x10(%rbp), %rax movq (%rax), %rax movq $0x0, 0x270(%rax) movb $0x1, -0x1(%rbp) jmp 0xa8406 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x18(%rbp), %rsi movl $0x1, %edx callq 0x2a490 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x4d0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x2a(%rip), %rcx # 0xa8410 movq %rcx, 0x2e0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x135(%rip), %rcx # 0xa8530 movq %rcx, 0x2e8(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
mi_dynmap_file: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0 jz short loc_A830E cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jbe short loc_A832C loc_A830E: cmp [rbp+var_18], 0 jz short loc_A831B jmp short $+2 loc_A8317: jmp short $+2 loc_A8319: jmp short loc_A8321 loc_A831B: jmp short $+2 loc_A831D: jmp short $+2 loc_A831F: jmp short $+2 loc_A8321: jmp short $+2 loc_A8323: mov [rbp+var_1], 1 jmp loc_A8406 loc_A832C: mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov ecx, [rax+358h] mov edx, 3 mov eax, 1 cmp ecx, 0 cmovz edx, eax mov rax, [rbp+var_10] mov r8d, [rax+1C0h] xor eax, eax mov r9d, eax mov ecx, 4001h mov rdi, r9 call _mmap64 mov rcx, rax mov rax, [rbp+var_10] mov rax, [rax] mov [rax+270h], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rcx, 0FFFFFFFFFFFFFFFFh cmp [rax+270h], rcx jnz short loc_A83AA mov rax, [rbp+var_10] mov rax, [rax] mov qword ptr [rax+270h], 0 mov [rbp+var_1], 1 jmp short loc_A8406 loc_A83AA: mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+270h] mov rsi, [rbp+var_18] mov edx, 1 call _madvise mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+4D0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_mmap_pread mov [rax+2E0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_mmap_pwrite mov [rax+2E8h], rcx mov [rbp+var_1], 0 loc_A8406: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char mi_dynmap_file(unsigned int *a1, long long a2) { long long v2; // rdx if ( !a2 ) return 1; v2 = 3LL; if ( !*(_DWORD *)(*(_QWORD *)a1 + 856LL) ) v2 = 1LL; *(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64(0LL, a2, v2, 16385LL, a1[112]); if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) == -1LL ) { *(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL; return 1; } else { madvise(*(_QWORD *)(*(_QWORD *)a1 + 624LL), a2, 1LL); *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2; *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite; return 0; } }
mi_dynmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0x0 JZ 0x001a830e CMP qword ptr [RBP + -0x18],-0x1 JBE 0x001a832c LAB_001a830e: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001a831b JMP 0x001a8317 LAB_001a8317: JMP 0x001a8319 LAB_001a8319: JMP 0x001a8321 LAB_001a831b: JMP 0x001a831d LAB_001a831d: JMP 0x001a831f LAB_001a831f: JMP 0x001a8321 LAB_001a8321: JMP 0x001a8323 LAB_001a8323: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a8406 LAB_001a832c: MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x358] MOV EDX,0x3 MOV EAX,0x1 CMP ECX,0x0 CMOVZ EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RAX + 0x1c0] XOR EAX,EAX MOV R9D,EAX MOV ECX,0x4001 MOV RDI,R9 CALL 0x0012a5f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,-0x1 CMP qword ptr [RAX + 0x270],RCX JNZ 0x001a83aa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a8406 LAB_001a83aa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x1 CALL 0x0012a490 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x4d0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x1a8410] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x1a8530] MOV qword ptr [RAX + 0x2e8],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_001a8406: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001a8315) */ int1 mi_dynmap_file(long *param_1,size_t param_2) { void *pvVar1; int __prot; int1 local_9; if (param_2 == 0) { local_9 = 1; } else { __prot = 3; if (*(int *)(*param_1 + 0x358) == 0) { __prot = 1; } pvVar1 = mmap64((void *)0x0,param_2,__prot,0x4001,(int)param_1[0x38],0); *(void **)(*param_1 + 0x270) = pvVar1; if (*(long *)(*param_1 + 0x270) == -1) { *(int8 *)(*param_1 + 0x270) = 0; local_9 = 1; } else { madvise(*(void **)(*param_1 + 0x270),param_2,1); *(size_t *)(*param_1 + 0x4d0) = param_2; *(code **)(*param_1 + 0x2e0) = mi_mmap_pread; *(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite; local_9 = 0; } } return local_9; }
37,143
escape_quotes_for_mysql
eloqsql/mysys/charset.c
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); #ifdef USE_MB my_bool use_mb_flag= my_ci_use_mb(charset_info); #endif *overflow= FALSE; for (end= from + length; from < end; from++) { #ifdef USE_MB int tmp_length; if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* We don't have the same issue here with a non-multi-byte character being turned into a multi-byte character by the addition of an escaping character, because we are only escaping the ' character with itself. */ #endif if (*from == '\'') { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\''; *to++= '\''; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O3
c
escape_quotes_for_mysql: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 leaq (%r8,%r8), %rax subq $0x1, %r12 cmovbq %rax, %r12 movq %rdi, -0x40(%rbp) movl 0x9c(%rdi), %r13d movq %r9, -0x38(%rbp) movb $0x0, (%r9) movq %rsi, -0x30(%rbp) movq %rsi, %rax testq %r8, %r8 jle 0x296a7 movq %r8, %r15 movq %rcx, %r14 movq -0x30(%rbp), %rbx addq %rbx, %r12 addq %rcx, %r15 cmpl $0x2, %r13d jb 0x29642 movq -0x40(%rbp), %rdi movq 0xb8(%rdi), %rax movq %r14, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax jge 0x29667 movb (%r14), %cl cmpb $0x27, %cl jne 0x2965a leaq 0x2(%rbx), %rax cmpq %r12, %rax ja 0x2969d movw $0x2727, (%rbx) # imm = 0x2727 jmp 0x29690 leaq 0x1(%rbx), %rax cmpq %r12, %rax ja 0x2969d movb %cl, (%rbx) jmp 0x29690 movl %eax, %ecx movl %eax, %eax addq %rbx, %rax cmpq %r12, %rax ja 0x2969d decq %r14 movq %r14, %rdx leaq 0x1(%rdx), %r14 leaq 0x1(%rbx), %rax movb 0x1(%rdx), %dl movb %dl, (%rbx) movq %r14, %rdx movq %rax, %rbx decl %ecx jne 0x29679 incq %r14 movq %rax, %rbx cmpq %r15, %r14 jb 0x29620 jmp 0x296a7 movq -0x38(%rbp), %rax movb $0x1, (%rax) movq %rbx, %rax movb $0x0, (%rax) subq -0x30(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
escape_quotes_for_mysql: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx lea rax, [r8+r8] sub r12, 1 cmovb r12, rax mov [rbp+var_40], rdi mov r13d, [rdi+9Ch] mov [rbp+var_38], r9 mov byte ptr [r9], 0 mov [rbp+var_30], rsi mov rax, rsi test r8, r8 jle loc_296A7 mov r15, r8 mov r14, rcx mov rbx, [rbp+var_30] add r12, rbx add r15, rcx loc_29620: cmp r13d, 2 jb short loc_29642 mov rdi, [rbp+var_40] mov rax, [rdi+0B8h] mov rsi, r14 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_29667 loc_29642: mov cl, [r14] cmp cl, 27h ; ''' jnz short loc_2965A lea rax, [rbx+2] cmp rax, r12 ja short loc_2969D mov word ptr [rbx], 2727h jmp short loc_29690 loc_2965A: lea rax, [rbx+1] cmp rax, r12 ja short loc_2969D mov [rbx], cl jmp short loc_29690 loc_29667: mov ecx, eax mov eax, eax add rax, rbx cmp rax, r12 ja short loc_2969D dec r14 mov rdx, r14 loc_29679: lea r14, [rdx+1] lea rax, [rbx+1] mov dl, [rdx+1] mov [rbx], dl mov rdx, r14 mov rbx, rax dec ecx jnz short loc_29679 loc_29690: inc r14 mov rbx, rax cmp r14, r15 jb short loc_29620 jmp short loc_296A7 loc_2969D: mov rax, [rbp+var_38] mov byte ptr [rax], 1 mov rax, rbx loc_296A7: mov byte ptr [rax], 0 sub rax, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * escape_quotes_for_mysql(long long a1, _BYTE *a2, long long a3, _BYTE *a4, long long a5, _BYTE *a6) { long long v6; // r12 unsigned int v7; // r13d _BYTE *v8; // rax _BYTE *v9; // r14 _WORD *v10; // rbx unsigned long long v11; // r12 unsigned long long v12; // r15 int v13; // eax int v14; // ecx _BYTE *v15; // rdx v6 = a3 - 1; if ( !a3 ) v6 = 2 * a5; v7 = *(_DWORD *)(a1 + 156); *a6 = 0; v8 = a2; if ( a5 > 0 ) { v9 = a4; v10 = a2; v11 = (unsigned long long)&a2[v6]; v12 = (unsigned long long)&a4[a5]; do { if ( v7 >= 2 && (v13 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v9, v12), v13 >= 2) ) { v14 = v13; if ( (unsigned long long)v10 + (unsigned int)v13 > v11 ) { LABEL_17: *a6 = 1; v8 = v10; break; } v15 = v9 - 1; do { v9 = v15 + 1; v8 = (char *)v10 + 1; *(_BYTE *)v10 = *++v15; v10 = (_WORD *)((char *)v10 + 1); --v14; } while ( v14 ); } else if ( *v9 == 39 ) { v8 = v10 + 1; if ( (unsigned long long)(v10 + 1) > v11 ) goto LABEL_17; *v10 = 10023; } else { v8 = (char *)v10 + 1; if ( (unsigned long long)v10 + 1 > v11 ) goto LABEL_17; *(_BYTE *)v10 = *v9; } ++v9; v10 = v8; } while ( (unsigned long long)v9 < v12 ); } *v8 = 0; return (_BYTE *)(v8 - a2); }
escape_quotes_for_mysql: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX LEA RAX,[R8 + R8*0x1] SUB R12,0x1 CMOVC R12,RAX MOV qword ptr [RBP + -0x40],RDI MOV R13D,dword ptr [RDI + 0x9c] MOV qword ptr [RBP + -0x38],R9 MOV byte ptr [R9],0x0 MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI TEST R8,R8 JLE 0x001296a7 MOV R15,R8 MOV R14,RCX MOV RBX,qword ptr [RBP + -0x30] ADD R12,RBX ADD R15,RCX LAB_00129620: CMP R13D,0x2 JC 0x00129642 MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R14 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00129667 LAB_00129642: MOV CL,byte ptr [R14] CMP CL,0x27 JNZ 0x0012965a LEA RAX,[RBX + 0x2] CMP RAX,R12 JA 0x0012969d MOV word ptr [RBX],0x2727 JMP 0x00129690 LAB_0012965a: LEA RAX,[RBX + 0x1] CMP RAX,R12 JA 0x0012969d MOV byte ptr [RBX],CL JMP 0x00129690 LAB_00129667: MOV ECX,EAX MOV EAX,EAX ADD RAX,RBX CMP RAX,R12 JA 0x0012969d DEC R14 MOV RDX,R14 LAB_00129679: LEA R14,[RDX + 0x1] LEA RAX,[RBX + 0x1] MOV DL,byte ptr [RDX + 0x1] MOV byte ptr [RBX],DL MOV RDX,R14 MOV RBX,RAX DEC ECX JNZ 0x00129679 LAB_00129690: INC R14 MOV RBX,RAX CMP R14,R15 JC 0x00129620 JMP 0x001296a7 LAB_0012969d: MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],0x1 MOV RAX,RBX LAB_001296a7: MOV byte ptr [RAX],0x0 SUB RAX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long escape_quotes_for_mysql (long param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { uint uVar1; uint uVar2; char *pcVar3; char *pcVar4; char *pcVar5; long lVar6; char *pcVar7; char *pcVar8; lVar6 = param_3 + -1; if (param_3 == 0) { lVar6 = param_5 * 2; } uVar1 = *(uint *)(param_1 + 0x9c); *param_6 = 0; pcVar3 = param_2; if (0 < param_5) { pcVar7 = param_2 + lVar6; pcVar8 = param_4 + param_5; pcVar5 = param_2; do { if ((uVar1 < 2) || (uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pcVar8), (int)uVar2 < 2)) { if (*param_4 == '\'') { pcVar3 = pcVar5 + 2; if (pcVar7 < pcVar3) { LAB_0012969d: *param_6 = 1; pcVar3 = pcVar5; break; } pcVar5[0] = '\''; pcVar5[1] = '\''; } else { pcVar3 = pcVar5 + 1; if (pcVar7 < pcVar3) goto LAB_0012969d; *pcVar5 = *param_4; } } else { if (pcVar7 < pcVar5 + uVar2) goto LAB_0012969d; pcVar4 = param_4 + -1; do { param_4 = pcVar4 + 1; pcVar3 = pcVar5 + 1; *pcVar5 = pcVar4[1]; uVar2 = uVar2 - 1; pcVar4 = param_4; pcVar5 = pcVar3; } while (uVar2 != 0); } param_4 = param_4 + 1; pcVar5 = pcVar3; } while (param_4 < pcVar8); } *pcVar3 = '\0'; return (long)pcVar3 - (long)param_2; }
37,144
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O0
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) leaq 0x21cfa8(%rip), %rax # 0x2a7008 movq %rax, 0x58(%rsp) leaq 0x21cf9c(%rip), %rdi # 0x2a7008 callq 0xc1f40 movq %rax, 0x50(%rsp) leaq 0x21cf8b(%rip), %rdi # 0x2a7008 callq 0xc1f70 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xc1fa0 testb $0x1, %al jne 0x8a09c jmp 0x8a0e4 leaq 0x50(%rsp), %rdi callq 0xc1fe0 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movl (%rax), %edi callq 0x5b470 movq %rax, %rdi movq 0x60(%rsp), %rsi callq 0xc20d0 testb $0x1, %al jne 0x8a0ca jmp 0x8a0d6 movq 0x40(%rsp), %rax movl (%rax), %eax addq $0x68, %rsp retq jmp 0x8a0d8 leaq 0x50(%rsp), %rdi callq 0xc2030 jmp 0x8a087 movb $0x1, 0x13(%rsp) movl $0x10, %edi callq 0x5a6b0 movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdx leaq 0x187b42(%rip), %rsi # 0x211c46 leaq 0x20(%rsp), %rdi callq 0x91500 jmp 0x8a110 movq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x5a4c0 jmp 0x8a121 movq 0x8(%rsp), %rdi movb $0x0, 0x13(%rsp) movq 0x21be76(%rip), %rsi # 0x2a5fa8 movq 0x21be2f(%rip), %rdx # 0x2a5f68 callq 0x5ab40 jmp 0x8a187 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x8a168 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x20(%rsp), %rdi callq 0x5b648 testb $0x1, 0x13(%rsp) jne 0x8a171 jmp 0x8a17b movq 0x8(%rsp), %rdi callq 0x5b020 jmp 0x8a17d movq 0x18(%rsp), %rdi callq 0x5ac00 nopw (%rax,%rax)
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 68h mov qword ptr [rsp+68h+var_8], rdi lea rax, _ZL14kv_cache_types; kv_cache_types mov [rsp+68h+var_10], rax lea rdi, _ZL14kv_cache_types; kv_cache_types call _ZNKSt6vectorI9ggml_typeSaIS0_EE5beginEv; std::vector<ggml_type>::begin(void) mov [rsp+68h+var_18], rax lea rdi, _ZL14kv_cache_types; kv_cache_types call _ZNKSt6vectorI9ggml_typeSaIS0_EE3endEv; std::vector<ggml_type>::end(void) mov [rsp+68h+var_20], rax loc_8A087: lea rdi, [rsp+68h+var_18] lea rsi, [rsp+68h+var_20] call _ZN9__gnu_cxxneIPK9ggml_typeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<ggml_type const*,std::vector<ggml_type>>(__gnu_cxx::__normal_iterator<ggml_type const*,std::vector<ggml_type>> const&,__gnu_cxx::__normal_iterator<ggml_type const*,std::vector<ggml_type>> const&) test al, 1 jnz short loc_8A09C jmp short loc_8A0E4 loc_8A09C: lea rdi, [rsp+68h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPK9ggml_typeSt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<ggml_type const*,std::vector<ggml_type>>::operator*(void) mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_28] mov edi, [rax] call _ggml_type_name mov rdi, rax mov rsi, qword ptr [rsp+68h+var_8] call _ZSteqIcSt11char_traitsIcESaIcEEbPKT_RKNSt7__cxx1112basic_stringIS3_T0_T1_EE; std::operator==<char>(char const*,std::string const&) test al, 1 jnz short loc_8A0CA jmp short loc_8A0D6 loc_8A0CA: mov rax, [rsp+68h+var_28] mov eax, [rax] add rsp, 68h retn loc_8A0D6: jmp short $+2 loc_8A0D8: lea rdi, [rsp+68h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPK9ggml_typeSt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<ggml_type const*,std::vector<ggml_type>>::operator++(void) jmp short loc_8A087 loc_8A0E4: mov [rsp+68h+var_55], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rsp+68h+var_60], rax; int mov rdx, qword ptr [rsp+68h+var_8]; int lea rsi, aUnsupportedCac; "Unsupported cache type: " lea rdi, [rsp+68h+var_48]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_8A110: mov rdi, [rsp+68h+var_60] lea rsi, [rsp+68h+var_48] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_8A121: mov rdi, [rsp+68h+var_60]; void * mov [rsp+68h+var_55], 0 mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw
long long kv_cache_type_from_str(long long a1) { long long v1; // rax int exception; // eax int v4; // ecx int v5; // r8d int v6; // r9d int v7; // [rsp+0h] [rbp-68h] void *v8; // [rsp+8h] [rbp-60h] void *v9; // [rsp+10h] [rbp-58h] int v10; // [rsp+18h] [rbp-50h] int v11[4]; // [rsp+20h] [rbp-48h] BYREF long long v12; // [rsp+30h] [rbp-38h] int v13; // [rsp+38h] [rbp-30h] unsigned int *v14; // [rsp+40h] [rbp-28h] long long v15; // [rsp+48h] [rbp-20h] BYREF _QWORD v16[2]; // [rsp+50h] [rbp-18h] BYREF int v17[2]; // [rsp+60h] [rbp-8h] *(_QWORD *)v17 = a1; v16[1] = &kv_cache_types; v16[0] = std::vector<ggml_type>::begin(&kv_cache_types); v15 = std::vector<ggml_type>::end(&kv_cache_types); while ( 1 ) { if ( (__gnu_cxx::operator!=<ggml_type const*,std::vector<ggml_type>>(v16, &v15) & 1) == 0 ) { BYTE3(v9) = 1; exception = (unsigned int)__cxa_allocate_exception(0x10uLL); std::operator+<char>( (int)v11, (int)"Unsupported cache type: ", v17[0], v4, v5, v6, v7, exception, v9, v10, v11[0], v11[2], v12, v13); std::runtime_error::runtime_error(v8, v11); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = (unsigned int *)__gnu_cxx::__normal_iterator<ggml_type const*,std::vector<ggml_type>>::operator*(v16); v1 = ggml_type_name(*v14); if ( (std::operator==<char>(v1, *(_QWORD *)v17) & 1) != 0 ) break; __gnu_cxx::__normal_iterator<ggml_type const*,std::vector<ggml_type>>::operator++(v16); } return *v14; }
kv_cache_type_from_str: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI LEA RAX,[0x3a7008] MOV qword ptr [RSP + 0x58],RAX LEA RDI,[0x3a7008] CALL 0x001c1f40 MOV qword ptr [RSP + 0x50],RAX LEA RDI,[0x3a7008] CALL 0x001c1f70 MOV qword ptr [RSP + 0x48],RAX LAB_0018a087: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x48] CALL 0x001c1fa0 TEST AL,0x1 JNZ 0x0018a09c JMP 0x0018a0e4 LAB_0018a09c: LEA RDI,[RSP + 0x50] CALL 0x001c1fe0 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV EDI,dword ptr [RAX] CALL 0x0015b470 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x60] CALL 0x001c20d0 TEST AL,0x1 JNZ 0x0018a0ca JMP 0x0018a0d6 LAB_0018a0ca: MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX] ADD RSP,0x68 RET LAB_0018a0d6: JMP 0x0018a0d8 LAB_0018a0d8: LEA RDI,[RSP + 0x50] CALL 0x001c2030 JMP 0x0018a087 LAB_0018a0e4: MOV byte ptr [RSP + 0x13],0x1 MOV EDI,0x10 CALL 0x0015a6b0 MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [RSP + 0x60] LAB_0018a0fd: LEA RSI,[0x311c46] LEA RDI,[RSP + 0x20] CALL 0x00191500 JMP 0x0018a110 LAB_0018a110: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] CALL 0x0015a4c0 JMP 0x0018a121 LAB_0018a121: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x13],0x0 MOV RSI,qword ptr [0x003a5fa8] MOV RDX,qword ptr [0x003a5f68] CALL 0x0015ab40
/* kv_cache_type_from_str(std::__cxx11::string const&) */ int4 kv_cache_type_from_str(string *param_1) { bool bVar1; char *pcVar2; runtime_error *this; string local_48 [32]; int4 *local_28; int8 local_20; int8 local_18; int1 *local_10; string *local_8; local_10 = kv_cache_types; local_8 = param_1; local_18 = std::vector<ggml_type,std::allocator<ggml_type>>::begin ((vector<ggml_type,std::allocator<ggml_type>> *)kv_cache_types); local_20 = std::vector<ggml_type,std::allocator<ggml_type>>::end ((vector<ggml_type,std::allocator<ggml_type>> *)kv_cache_types); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_18,(__normal_iterator *)&local_20); if (!bVar1) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018a0fd to 0018a10d has its CatchHandler @ 0018a140 */ std::operator+((char *)local_48,(string *)"Unsupported cache type: "); /* try { // try from 0018a110 to 0018a13d has its CatchHandler @ 0018a150 */ std::runtime_error::runtime_error(this,local_48); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_003a5fa8,PTR__runtime_error_003a5f68); } local_28 = (int4 *) __gnu_cxx:: __normal_iterator<ggml_type_const*,std::vector<ggml_type,std::allocator<ggml_type>>> ::operator*((__normal_iterator<ggml_type_const*,std::vector<ggml_type,std::allocator<ggml_type>>> *)&local_18); pcVar2 = (char *)ggml_type_name(*local_28); bVar1 = std::operator==(pcVar2,local_8); if (bVar1) break; __gnu_cxx::__normal_iterator<ggml_type_const*,std::vector<ggml_type,std::allocator<ggml_type>>> ::operator++((__normal_iterator<ggml_type_const*,std::vector<ggml_type,std::allocator<ggml_type>>> *)&local_18); } return *local_28; }
37,145
my_time_init
eloqsql/mysys/my_getsystime.c
void my_time_init() { #ifdef _WIN32 compile_time_assert(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency); DBUG_ASSERT(query_performance_frequency); #endif }
O3
c
my_time_init: pushq %rbp movq %rsp, %rbp popq %rbp retq
my_time_init: push rbp mov rbp, rsp pop rbp retn
void my_time_init() { ; }
my_time_init: PUSH RBP MOV RBP,RSP POP RBP RET
void my_time_init(void) { return; }
37,146
unlink_block
eloqsql/mysys/mf_keycache.c
static void unlink_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(!block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(block->next_used && block->prev_used && (block->next_used->prev_used == &block->next_used) && (*block->prev_used == block)); if (block->next_used == block) /* The list contains only one member */ keycache->used_last= keycache->used_ins= NULL; else { block->next_used->prev_used= block->prev_used; *block->prev_used= block->next_used; if (keycache->used_last == block) keycache->used_last= STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used); if (keycache->used_ins == block) keycache->used_ins=STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used); } block->next_used= NULL; #ifdef DBUG_ASSERT_EXISTS /* This makes it easier to see it's not in a chain during debugging. And some DBUG_ASSERT() rely on it. */ block->prev_used= NULL; #endif KEYCACHE_THREAD_TRACE("unlink_block"); #if defined(KEYCACHE_DEBUG) KEYCACHE_DBUG_ASSERT(keycache->blocks_available != 0); keycache->blocks_available--; KEYCACHE_DBUG_PRINT("unlink_block", ("unlinked block %u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), block->status, block->requests, keycache->blocks_available)); #endif }
O0
c
unlink_block: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe633e jmp 0xe6340 jmp 0xe6342 jmp 0xe6344 jmp 0xe6346 jmp 0xe6348 jmp 0xe634a jmp 0xe634c jmp 0xe634e movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x10(%rbp), %rax jne 0xe637b movq -0x8(%rbp), %rax movq $0x0, 0xb8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xb0(%rax) jmp 0xe63ea movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0xb0(%rax), %rax cmpq -0x10(%rbp), %rax jne 0xe63c4 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb0(%rax) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax cmpq -0x10(%rbp), %rax jne 0xe63e8 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb8(%rax) jmp 0xe63ea movq -0x10(%rbp), %rax movq $0x0, (%rax) popq %rbp retq nopw (%rax,%rax)
unlink_block_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E633E: jmp short $+2 loc_E6340: jmp short $+2 loc_E6342: jmp short $+2 loc_E6344: jmp short $+2 loc_E6346: jmp short $+2 loc_E6348: jmp short $+2 loc_E634A: jmp short $+2 loc_E634C: jmp short $+2 loc_E634E: mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_10] jnz short loc_E637B mov rax, [rbp+var_8] mov qword ptr [rax+0B8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0B0h], 0 jmp short loc_E63EA loc_E637B: mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+0B0h] cmp rax, [rbp+var_10] jnz short loc_E63C4 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+0B0h], rcx loc_E63C4: mov rax, [rbp+var_8] mov rax, [rax+0B8h] cmp rax, [rbp+var_10] jnz short loc_E63E8 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+0B8h], rcx loc_E63E8: jmp short $+2 loc_E63EA: mov rax, [rbp+var_10] mov qword ptr [rax], 0 pop rbp retn
_QWORD * unlink_block_0(long long a1, _QWORD *a2) { _QWORD *result; // rax if ( (_QWORD *)*a2 == a2 ) { *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 176) = 0LL; } else { *(_QWORD *)(*a2 + 8LL) = a2[1]; *(_QWORD *)a2[1] = *a2; if ( *(_QWORD **)(a1 + 176) == a2 ) *(_QWORD *)(a1 + 176) = a2[1]; if ( *(_QWORD **)(a1 + 184) == a2 ) *(_QWORD *)(a1 + 184) = a2[1]; } result = a2; *a2 = 0LL; return result; }
unlink_block: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e633e LAB_001e633e: JMP 0x001e6340 LAB_001e6340: JMP 0x001e6342 LAB_001e6342: JMP 0x001e6344 LAB_001e6344: JMP 0x001e6346 LAB_001e6346: JMP 0x001e6348 LAB_001e6348: JMP 0x001e634a LAB_001e634a: JMP 0x001e634c LAB_001e634c: JMP 0x001e634e LAB_001e634e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001e637b MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb0],0x0 JMP 0x001e63ea LAB_001e637b: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb0] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001e63c4 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb0],RCX LAB_001e63c4: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001e63e8 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],RCX LAB_001e63e8: JMP 0x001e63ea LAB_001e63ea: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 POP RBP RET
void unlink_block(long param_1,long *param_2) { if ((long *)*param_2 == param_2) { *(int8 *)(param_1 + 0xb8) = 0; *(int8 *)(param_1 + 0xb0) = 0; } else { *(long *)(*param_2 + 8) = param_2[1]; *(long *)param_2[1] = *param_2; if (*(long **)(param_1 + 0xb0) == param_2) { *(long *)(param_1 + 0xb0) = param_2[1]; } if (*(long **)(param_1 + 0xb8) == param_2) { *(long *)(param_1 + 0xb8) = param_2[1]; } } *param_2 = 0; return; }
37,147
google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const FileDescriptor* DescriptorPool::FindFileByName( ConstStringParam name) const { MutexLockMaybe lock(mutex_); if (fallback_database_ != nullptr) { tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); } const FileDescriptor* result = tables_->FindFile(name); if (result != nullptr) return result; if (underlay_ != nullptr) { result = underlay_->FindFileByName(name); if (result != nullptr) return result; } if (TryFindFileInFallbackDatabase(name)) { result = tables_->FindFile(name); if (result != nullptr) return result; } return nullptr; }
O0
cpp
google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: subq $0xa8, %rsp movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x38(%rsp) movq (%rax), %rsi leaq 0x88(%rsp), %rdi callq 0x73260 movq 0x38(%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x34d04 movq 0x38(%rsp), %rdi addq $0x20, %rdi callq 0x732b0 movq %rax, %rdi addq $0x50, %rdi callq 0x732a0 movq 0x38(%rsp), %rdi addq $0x20, %rdi callq 0x732b0 movq %rax, %rdi addq $0x18, %rdi callq 0x732a0 movq 0x38(%rsp), %rdi addq $0x20, %rdi callq 0x732b0 movq %rax, 0x30(%rsp) movq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x30550 jmp 0x34d2b movq 0x30(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x744b0 movq %rax, 0x28(%rsp) jmp 0x34d46 movq 0x28(%rsp), %rax movq %rax, 0x80(%rsp) cmpq $0x0, 0x80(%rsp) je 0x34d9b movq 0x80(%rsp), %rax movq %rax, 0xa0(%rsp) movl $0x1, 0x60(%rsp) jmp 0x34ebd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x88(%rsp), %rdi callq 0x732c0 jmp 0x34eda movq 0x38(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x34dfb movq 0x38(%rsp), %rax movq 0x18(%rax), %rdi movq 0x90(%rsp), %rsi callq 0x34c90 movq %rax, 0x20(%rsp) jmp 0x34dc4 movq 0x20(%rsp), %rax movq %rax, 0x80(%rsp) cmpq $0x0, 0x80(%rsp) je 0x34df9 movq 0x80(%rsp), %rax movq %rax, 0xa0(%rsp) movl $0x1, 0x60(%rsp) jmp 0x34ebd jmp 0x34dfb movq 0x90(%rsp), %rsi leaq 0x50(%rsp), %rdi callq 0x30550 jmp 0x34e0f movq 0x38(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x34ef0 movb %al, 0x1f(%rsp) jmp 0x34e29 movb 0x1f(%rsp), %al testb $0x1, %al jne 0x34e33 jmp 0x34ea9 movq 0x38(%rsp), %rdi addq $0x20, %rdi callq 0x732b0 movq %rax, 0x10(%rsp) movq 0x90(%rsp), %rsi leaq 0x40(%rsp), %rdi callq 0x30550 jmp 0x34e5a movq 0x10(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x744b0 movq %rax, 0x8(%rsp) jmp 0x34e75 movq 0x8(%rsp), %rax movq %rax, 0x80(%rsp) cmpq $0x0, 0x80(%rsp) je 0x34ea7 movq 0x80(%rsp), %rax movq %rax, 0xa0(%rsp) movl $0x1, 0x60(%rsp) jmp 0x34ebd jmp 0x34ea9 movq $0x0, 0xa0(%rsp) movl $0x1, 0x60(%rsp) leaq 0x88(%rsp), %rdi callq 0x732c0 movq 0xa0(%rsp), %rax addq $0xa8, %rsp retq movq 0x68(%rsp), %rdi callq 0x13750 nopw %cs:(%rax,%rax)
_ZNK6google8protobuf14DescriptorPool14FindFileByNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0A8h mov [rsp+0A8h+var_10], rdi mov [rsp+0A8h+var_18], rsi mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_70], rax mov rsi, [rax]; google::protobuf::internal::WrappedMutex * lea rdi, [rsp+0A8h+var_20]; this call _ZN6google8protobuf8internal14MutexLockMaybeC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(google::protobuf::internal::WrappedMutex *) mov rax, [rsp+0A8h+var_70] cmp qword ptr [rax+8], 0 jz short loc_34D04 mov rdi, [rsp+0A8h+var_70] add rdi, 20h ; ' ' call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void) mov rdi, rax add rdi, 50h ; 'P' call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv; std::unordered_set<std::string>::clear(void) mov rdi, [rsp+0A8h+var_70] add rdi, 20h ; ' ' call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void) mov rdi, rax add rdi, 18h call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv; std::unordered_set<std::string>::clear(void) loc_34D04: mov rdi, [rsp+0A8h+var_70] add rdi, 20h ; ' ' call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void) mov [rsp+0A8h+var_78], rax mov rsi, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_38] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) jmp short $+2 loc_34D2B: mov rdi, [rsp+0A8h+var_78] mov rsi, [rsp+0A8h+var_38] mov rdx, [rsp+0A8h+var_30] call _ZNK6google8protobuf14DescriptorPool6Tables8FindFileENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindFile(google::protobuf::stringpiece_internal::StringPiece) mov [rsp+0A8h+var_80], rax jmp short $+2 loc_34D46: mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_28], rax cmp [rsp+0A8h+var_28], 0 jz short loc_34D9B mov rax, [rsp+0A8h+var_28] mov [rsp+0A8h+var_8], rax mov [rsp+0A8h+var_48], 1 jmp loc_34EBD mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_80]; this call _ZN6google8protobuf8internal14MutexLockMaybeD2Ev; google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe() jmp loc_34EDA loc_34D9B: mov rax, [rsp+0A8h+var_70] cmp qword ptr [rax+18h], 0 jz short loc_34DFB mov rax, [rsp+0A8h+var_70] mov rdi, [rax+18h] mov rsi, [rsp+0A8h+var_18] call _ZNK6google8protobuf14DescriptorPool14FindFileByNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::DescriptorPool::FindFileByName(std::string const&) mov [rsp+0A8h+var_88], rax jmp short $+2 loc_34DC4: mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_28], rax cmp [rsp+0A8h+var_28], 0 jz short loc_34DF9 mov rax, [rsp+0A8h+var_28] mov [rsp+0A8h+var_8], rax mov [rsp+0A8h+var_48], 1 jmp loc_34EBD loc_34DF9: jmp short $+2 loc_34DFB: mov rsi, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_58] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) jmp short $+2 loc_34E0F: mov rdi, [rsp+0A8h+var_70] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call _ZNK6google8protobuf14DescriptorPool29TryFindFileInFallbackDatabaseENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(google::protobuf::stringpiece_internal::StringPiece) mov [rsp+0A8h+var_89], al jmp short $+2 loc_34E29: mov al, [rsp+0A8h+var_89] test al, 1 jnz short loc_34E33 jmp short loc_34EA9 loc_34E33: mov rdi, [rsp+0A8h+var_70] add rdi, 20h ; ' ' call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void) mov [rsp+0A8h+var_98], rax mov rsi, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_68] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) jmp short $+2 loc_34E5A: mov rdi, [rsp+0A8h+var_98] mov rsi, [rsp+0A8h+var_68] mov rdx, [rsp+0A8h+var_60] call _ZNK6google8protobuf14DescriptorPool6Tables8FindFileENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindFile(google::protobuf::stringpiece_internal::StringPiece) mov [rsp+0A8h+var_A0], rax jmp short $+2 loc_34E75: mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_28], rax cmp [rsp+0A8h+var_28], 0 jz short loc_34EA7 mov rax, [rsp+0A8h+var_28] mov [rsp+0A8h+var_8], rax mov [rsp+0A8h+var_48], 1 jmp short loc_34EBD loc_34EA7: jmp short $+2 loc_34EA9: mov [rsp+0A8h+var_8], 0 mov [rsp+0A8h+var_48], 1 loc_34EBD: lea rdi, [rsp+0A8h+var_20]; this call _ZN6google8protobuf8internal14MutexLockMaybeD2Ev; google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe() mov rax, [rsp+0A8h+var_8] add rsp, 0A8h retn loc_34EDA: mov rdi, [rsp+arg_60] call __Unwind_Resume
long long google::protobuf::DescriptorPool::FindFileByName(long long a1, long long a2) { long long v2; // rax long long v3; // rax int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v9; // [rsp+10h] [rbp-98h] long long v10; // [rsp+30h] [rbp-78h] long long v11[2]; // [rsp+40h] [rbp-68h] BYREF long long v12[2]; // [rsp+50h] [rbp-58h] BYREF int v13; // [rsp+60h] [rbp-48h] long long v14[2]; // [rsp+70h] [rbp-38h] BYREF long long File; // [rsp+80h] [rbp-28h] _BYTE v16[8]; // [rsp+88h] [rbp-20h] BYREF long long v17; // [rsp+90h] [rbp-18h] long long v18; // [rsp+98h] [rbp-10h] long long v19; // [rsp+A0h] [rbp-8h] v18 = a1; v17 = a2; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe( (google::protobuf::internal::MutexLockMaybe *)v16, *(google::protobuf::internal::WrappedMutex **)a1); if ( *(_QWORD *)(a1 + 8) ) { v2 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32); std::unordered_set<std::string>::clear(v2 + 80); v3 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32); std::unordered_set<std::string>::clear(v3 + 24); } v10 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32); google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v14, v17); File = google::protobuf::DescriptorPool::Tables::FindFile(v10, v14[0], v14[1]); if ( File ) { v19 = File; v13 = 1; } else if ( *(_QWORD *)(a1 + 24) && (File = google::protobuf::DescriptorPool::FindFileByName(*(_QWORD *)(a1 + 24), v17, v4, v5, v6, v7)) != 0 ) { v19 = File; v13 = 1; } else { google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v12, v17); if ( (google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(a1, v12[0], v12[1]) & 1) != 0 && (v9 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32), google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v11, v17), (File = google::protobuf::DescriptorPool::Tables::FindFile(v9, v11[0], v11[1])) != 0) ) { v19 = File; v13 = 1; } else { v19 = 0LL; v13 = 1; } } google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe((google::protobuf::internal::MutexLockMaybe *)v16); return v19; }
FindFileByName: SUB RSP,0xa8 MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x38],RAX MOV RSI,qword ptr [RAX] LEA RDI,[RSP + 0x88] CALL 0x00173260 MOV RAX,qword ptr [RSP + 0x38] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00134d04 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 CALL 0x001732b0 MOV RDI,RAX ADD RDI,0x50 CALL 0x001732a0 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 CALL 0x001732b0 MOV RDI,RAX ADD RDI,0x18 CALL 0x001732a0 LAB_00134d04: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 CALL 0x001732b0 MOV qword ptr [RSP + 0x30],RAX MOV RSI,qword ptr [RSP + 0x90] LAB_00134d1f: LEA RDI,[RSP + 0x70] CALL 0x00130550 JMP 0x00134d2b LAB_00134d2b: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x001744b0 MOV qword ptr [RSP + 0x28],RAX JMP 0x00134d46 LAB_00134d46: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x80],RAX CMP qword ptr [RSP + 0x80],0x0 JZ 0x00134d9b MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RAX MOV dword ptr [RSP + 0x60],0x1 JMP 0x00134ebd LAB_00134d9b: MOV RAX,qword ptr [RSP + 0x38] CMP qword ptr [RAX + 0x18],0x0 JZ 0x00134dfb MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x90] CALL 0x00134c90 MOV qword ptr [RSP + 0x20],RAX JMP 0x00134dc4 LAB_00134dc4: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX CMP qword ptr [RSP + 0x80],0x0 JZ 0x00134df9 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RAX MOV dword ptr [RSP + 0x60],0x1 JMP 0x00134ebd LAB_00134df9: JMP 0x00134dfb LAB_00134dfb: MOV RSI,qword ptr [RSP + 0x90] LEA RDI,[RSP + 0x50] CALL 0x00130550 JMP 0x00134e0f LAB_00134e0f: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x00134ef0 MOV byte ptr [RSP + 0x1f],AL JMP 0x00134e29 LAB_00134e29: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x00134e33 JMP 0x00134ea9 LAB_00134e33: MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x20 CALL 0x001732b0 MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x90] LEA RDI,[RSP + 0x40] CALL 0x00130550 JMP 0x00134e5a LAB_00134e5a: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x001744b0 LAB_00134e6e: MOV qword ptr [RSP + 0x8],RAX JMP 0x00134e75 LAB_00134e75: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x80],RAX CMP qword ptr [RSP + 0x80],0x0 JZ 0x00134ea7 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xa0],RAX MOV dword ptr [RSP + 0x60],0x1 JMP 0x00134ebd LAB_00134ea7: JMP 0x00134ea9 LAB_00134ea9: MOV qword ptr [RSP + 0xa0],0x0 MOV dword ptr [RSP + 0x60],0x1 LAB_00134ebd: LEA RDI,[RSP + 0x88] CALL 0x001732c0 MOV RAX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
/* google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::string const&) const */ long __thiscall google::protobuf::DescriptorPool::FindFileByName(DescriptorPool *this,string *param_1) { byte bVar1; long lVar2; int8 uVar3; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int4 local_48; int8 local_38; int8 local_30; long local_28; MutexLockMaybe local_20 [8]; string *local_18; DescriptorPool *local_10; long local_8; local_18 = param_1; local_10 = this; internal::MutexLockMaybe::MutexLockMaybe(local_20,*(WrappedMutex **)this); if (*(long *)(this + 8) != 0) { lVar2 = std:: unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> ::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> *)(this + 0x20)); std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::clear((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(lVar2 + 0x50)); lVar2 = std:: unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> ::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> *)(this + 0x20)); std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::clear((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(lVar2 + 0x18)); } uVar3 = std:: unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> ::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> *)(this + 0x20)); /* try { // try from 00134d1f to 00134e6d has its CatchHandler @ 00134d7b */ stringpiece_internal::StringPiece::StringPiece<std::allocator<char>> ((StringPiece *)&local_38,local_18); local_28 = Tables::FindFile(uVar3,local_38,local_30); local_8 = local_28; if ((local_28 == 0) && ((*(long *)(this + 0x18) == 0 || (local_28 = FindFileByName(*(DescriptorPool **)(this + 0x18),local_18), local_8 = local_28, local_28 == 0)))) { stringpiece_internal::StringPiece::StringPiece<std::allocator<char>> ((StringPiece *)&local_58,local_18); bVar1 = TryFindFileInFallbackDatabase(this,local_58,local_50); if ((bVar1 & 1) != 0) { uVar3 = std:: unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> ::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>> *)(this + 0x20)); stringpiece_internal::StringPiece::StringPiece<std::allocator<char>> ((StringPiece *)&local_68,local_18); local_28 = Tables::FindFile(uVar3,local_68,local_60); local_8 = local_28; if (local_28 != 0) goto LAB_00134ebd; } local_8 = 0; } LAB_00134ebd: local_48 = 1; internal::MutexLockMaybe::~MutexLockMaybe(local_20); return local_8; }
37,148
google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const FileDescriptor* DescriptorPool::FindFileByName( ConstStringParam name) const { MutexLockMaybe lock(mutex_); if (fallback_database_ != nullptr) { tables_->known_bad_symbols_.clear(); tables_->known_bad_files_.clear(); } const FileDescriptor* result = tables_->FindFile(name); if (result != nullptr) return result; if (underlay_ != nullptr) { result = underlay_->FindFileByName(name); if (result != nullptr) return result; } if (TryFindFileInFallbackDatabase(name)) { result = tables_->FindFile(name); if (result != nullptr) return result; } return nullptr; }
O3
cpp
google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %rsi leaq 0x8(%rsp), %rdi callq 0x3dc80 cmpq $0x0, 0x8(%rbx) je 0x1df5d movq 0x20(%rbx), %rdi addq $0x50, %rdi callq 0x3f990 movq 0x20(%rbx), %rdi addq $0x18, %rdi callq 0x3f990 movups (%r14), %xmm0 movl $0x160, %edi # imm = 0x160 addq 0x20(%rbx), %rdi leaq 0x10(%rsp), %rsi movups %xmm0, (%rsi) callq 0x3fb1a testq %rax, %rax je 0x1df85 movq 0x18(%rax), %r15 testq %r15, %r15 jne 0x1dfdc movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x1df9e movq %r14, %rsi callq 0x1df20 movq %rax, %r15 testq %rax, %rax jne 0x1dfdc movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1e012 testb %al, %al je 0x1dfd9 movups (%r14), %xmm0 movl $0x160, %edi # imm = 0x160 addq 0x20(%rbx), %rdi leaq 0x10(%rsp), %rsi movups %xmm0, (%rsi) callq 0x3fb1a testq %rax, %rax je 0x1dfd9 movq 0x18(%rax), %r15 testq %r15, %r15 jne 0x1dfdc xorl %r15d, %r15d movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1dfeb callq 0xf2c0 movq %r15, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1e00a callq 0xf2c0 movq %rbx, %rdi callq 0xf570
_ZNK6google8protobuf14DescriptorPool14FindFileByNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 20h mov r14, rsi mov rbx, rdi mov rsi, [rdi] lea rdi, [rsp+38h+var_30] call _ZN6google8protobuf8internal14MutexLockMaybeC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(google::protobuf::internal::WrappedMutex *) cmp qword ptr [rbx+8], 0 jz short loc_1DF5D mov rdi, [rbx+20h] add rdi, 50h ; 'P' call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE5clearEv; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(void) mov rdi, [rbx+20h] add rdi, 18h call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE5clearEv; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(void) loc_1DF5D: movups xmm0, xmmword ptr [r14] mov edi, 160h add rdi, [rbx+20h] lea rsi, [rsp+38h+var_28] movups xmmword ptr [rsi], xmm0 call _ZNKSt10_HashtableIN6google8protobuf20stringpiece_internal11StringPieceESt4pairIKS3_PKNS1_14FileDescriptorEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ENS1_4hashIS3_EENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS5_; std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(google::protobuf::stringpiece_internal::StringPiece const&) test rax, rax jz short loc_1DF85 mov r15, [rax+18h] test r15, r15 jnz short loc_1DFDC loc_1DF85: mov rdi, [rbx+18h] test rdi, rdi jz short loc_1DF9E mov rsi, r14 call _ZNK6google8protobuf14DescriptorPool14FindFileByNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::DescriptorPool::FindFileByName(std::string const&) mov r15, rax test rax, rax jnz short loc_1DFDC loc_1DF9E: mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call _ZNK6google8protobuf14DescriptorPool29TryFindFileInFallbackDatabaseENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(google::protobuf::stringpiece_internal::StringPiece) test al, al jz short loc_1DFD9 movups xmm0, xmmword ptr [r14] mov edi, 160h add rdi, [rbx+20h] lea rsi, [rsp+38h+var_28] movups xmmword ptr [rsi], xmm0 call _ZNKSt10_HashtableIN6google8protobuf20stringpiece_internal11StringPieceESt4pairIKS3_PKNS1_14FileDescriptorEESaIS9_ENSt8__detail10_Select1stESt8equal_toIS3_ENS1_4hashIS3_EENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS5_; std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(google::protobuf::stringpiece_internal::StringPiece const&) test rax, rax jz short loc_1DFD9 mov r15, [rax+18h] test r15, r15 jnz short loc_1DFDC loc_1DFD9: xor r15d, r15d loc_1DFDC: mov rdi, [rsp+38h+var_30] test rdi, rdi jz short loc_1DFEB call _pthread_mutex_unlock loc_1DFEB: mov rax, r15 add rsp, 20h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1E00A call _pthread_mutex_unlock loc_1E00A: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::DescriptorPool::FindFileByName(_QWORD *a1, _QWORD *a2) { long long v3; // rdi long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long FileByName; // r15 long long v10; // rdi long long v11; // rdi long long v12; // rax long long v14; // [rsp+8h] [rbp-30h] BYREF __int128 v15; // [rsp+10h] [rbp-28h] google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(&v14, *a1); if ( a1[1] ) { std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(a1[4] + 80LL); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::clear(a1[4] + 24LL); } v3 = a1[4] + 352LL; v15 = *(_OWORD *)a2; v4 = std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(v3); if ( !v4 || (FileByName = *(_QWORD *)(v4 + 24)) == 0 ) { v10 = a1[3]; if ( !v10 || (FileByName = google::protobuf::DescriptorPool::FindFileByName(v10, (_DWORD)a2, v5, v6, v7, v8)) == 0 ) { if ( !(unsigned __int8)google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(a1, *a2, a2[1]) || (v11 = a1[4] + 352LL, v15 = *(_OWORD *)a2, (v12 = std::_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece const,google::protobuf::FileDescriptor const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(v11)) == 0) || (FileByName = *(_QWORD *)(v12 + 24)) == 0 ) { FileByName = 0LL; } } } if ( v14 ) pthread_mutex_unlock(v14); return FileByName; }
FindFileByName: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RDI] LEA RDI,[RSP + 0x8] CALL 0x0013dc80 CMP qword ptr [RBX + 0x8],0x0 JZ 0x0011df5d MOV RDI,qword ptr [RBX + 0x20] ADD RDI,0x50 CALL 0x0013f990 MOV RDI,qword ptr [RBX + 0x20] ADD RDI,0x18 CALL 0x0013f990 LAB_0011df5d: MOVUPS XMM0,xmmword ptr [R14] MOV EDI,0x160 ADD RDI,qword ptr [RBX + 0x20] LEA RSI,[RSP + 0x10] MOVUPS xmmword ptr [RSI],XMM0 LAB_0011df72: CALL 0x0013fb1a TEST RAX,RAX JZ 0x0011df85 MOV R15,qword ptr [RAX + 0x18] TEST R15,R15 JNZ 0x0011dfdc LAB_0011df85: MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0011df9e MOV RSI,R14 CALL 0x0011df20 MOV R15,RAX TEST RAX,RAX JNZ 0x0011dfdc LAB_0011df9e: MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011e012 TEST AL,AL JZ 0x0011dfd9 MOVUPS XMM0,xmmword ptr [R14] MOV EDI,0x160 ADD RDI,qword ptr [RBX + 0x20] LEA RSI,[RSP + 0x10] MOVUPS xmmword ptr [RSI],XMM0 CALL 0x0013fb1a LAB_0011dfcb: TEST RAX,RAX JZ 0x0011dfd9 MOV R15,qword ptr [RAX + 0x18] TEST R15,R15 JNZ 0x0011dfdc LAB_0011dfd9: XOR R15D,R15D LAB_0011dfdc: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0011dfeb CALL 0x0010f2c0 LAB_0011dfeb: MOV RAX,R15 ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::string const&) const */ long __thiscall google::protobuf::DescriptorPool::FindFileByName(DescriptorPool *this,string *param_1) { char cVar1; long lVar2; pthread_mutex_t *local_30; int8 local_28; int8 uStack_20; internal::MutexLockMaybe::MutexLockMaybe((MutexLockMaybe *)&local_30,*(WrappedMutex **)this); if (*(long *)(this + 8) != 0) { std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::clear((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(*(long *)(this + 0x20) + 0x50)); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::clear((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(*(long *)(this + 0x20) + 0x18)); } local_28 = *(int8 *)param_1; uStack_20 = *(int8 *)(param_1 + 8); /* try { // try from 0011df72 to 0011dfca has its CatchHandler @ 0011dff8 */ lVar2 = std:: _Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(*(long *)(this + 0x20) + 0x160),(StringPiece *)&local_28); if ((lVar2 == 0) || (lVar2 = *(long *)(lVar2 + 0x18), lVar2 == 0)) { if (*(DescriptorPool **)(this + 0x18) != (DescriptorPool *)0x0) { lVar2 = FindFileByName(*(DescriptorPool **)(this + 0x18),param_1); if (lVar2 != 0) goto LAB_0011dfdc; } cVar1 = TryFindFileInFallbackDatabase(this,*(int8 *)param_1,*(int8 *)(param_1 + 8)); if (cVar1 != '\0') { local_28 = *(int8 *)param_1; uStack_20 = *(int8 *)(param_1 + 8); lVar2 = std:: _Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<google::protobuf::stringpiece_internal::StringPiece,std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::stringpiece_internal::StringPiece_const,google::protobuf::FileDescriptor_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::hash<google::protobuf::stringpiece_internal::StringPiece>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(*(long *)(this + 0x20) + 0x160),(StringPiece *)&local_28); if ((lVar2 != 0) && (lVar2 = *(long *)(lVar2 + 0x18), lVar2 != 0)) goto LAB_0011dfdc; } lVar2 = 0; } LAB_0011dfdc: if (local_30 != (pthread_mutex_t *)0x0) { pthread_mutex_unlock(local_30); } return lVar2; }
37,149
my_getwd
eloqsql/mysys/my_getwd.c
int my_getwd(char * buf, size_t size, myf MyFlags) { char * pos; DBUG_ENTER("my_getwd"); DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu", buf, (uint) size, MyFlags)); if (size < 1) DBUG_RETURN(-1); if (curr_dir[0]) /* Current pos is saved here */ (void) strmake(buf,&curr_dir[0],size-1); else { #if defined(HAVE_GETCWD) if (size < 2) DBUG_RETURN(-1); if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME) { my_errno=errno; my_error(EE_GETWD,MYF(ME_BELL),errno); DBUG_RETURN(-1); } #elif defined(HAVE_GETWD) { char pathname[MAXPATHLEN]; getwd(pathname); strmake(buf,pathname,size-1); } #else #error "No way to get current directory" #endif if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */ { pos[0]= FN_LIBCHAR; pos[1]=0; } (void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1)); } DBUG_RETURN(0); }
O0
c
my_getwd: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x7a836 cmpq $0x1, -0x18(%rbp) jae 0x7a84b jmp 0x7a83f movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x7a92a leaq 0x37870e(%rip), %rax # 0x3f2f60 cmpb $0x0, (%rax) je 0x7a874 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x3786f6(%rip), %rsi # 0x3f2f60 callq 0xc62d0 jmp 0x7a921 cmpq $0x2, -0x18(%rbp) jae 0x7a889 jmp 0x7a87d movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x7a92a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax subq $0x2, %rax movl %eax, %eax movl %eax, %esi callq 0x363c0 cmpq $0x0, %rax jne 0x7a8e7 movq -0x20(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x7a8e7 callq 0x369e0 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0x7d4a0 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) callq 0x369e0 movl (%rax), %edx movl $0x10, %edi movl $0x4, %esi movb $0x0, %al callq 0x760a0 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x7a92a movq -0x10(%rbp), %rdi callq 0xc6250 movq %rax, -0x28(%rbp) movsbl -0x1(%rax), %eax cmpl $0x2f, %eax je 0x7a90c movq -0x28(%rbp), %rax movb $0x2f, (%rax) movq -0x28(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x10(%rbp), %rsi leaq 0x378649(%rip), %rdi # 0x3f2f60 movl $0x1ff, %edx # imm = 0x1FF callq 0xc62d0 jmp 0x7a923 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_getwd: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_7A836: cmp [rbp+var_18], 1 jnb short loc_7A84B jmp short $+2 loc_7A83F: mov [rbp+var_4], 0FFFFFFFFh jmp loc_7A92A loc_7A84B: lea rax, curr_dir cmp byte ptr [rax], 0 jz short loc_7A874 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, curr_dir call strmake jmp loc_7A921 loc_7A874: cmp [rbp+var_18], 2 jnb short loc_7A889 jmp short $+2 loc_7A87D: mov [rbp+var_4], 0FFFFFFFFh jmp loc_7A92A loc_7A889: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] sub rax, 2 mov eax, eax mov esi, eax call _getcwd cmp rax, 0 jnz short loc_7A8E7 mov rax, [rbp+var_20] and rax, 10h cmp rax, 0 jz short loc_7A8E7 call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx call ___errno_location mov edx, [rax] mov edi, 10h mov esi, 4 mov al, 0 call my_error mov [rbp+var_4], 0FFFFFFFFh jmp short loc_7A92A loc_7A8E7: mov rdi, [rbp+var_10] call strend mov [rbp+var_28], rax movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jz short loc_7A90C mov rax, [rbp+var_28] mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_28] mov byte ptr [rax+1], 0 loc_7A90C: mov rsi, [rbp+var_10] lea rdi, curr_dir mov edx, 1FFh call strmake loc_7A921: jmp short $+2 loc_7A923: mov [rbp+var_4], 0 loc_7A92A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_getwd(long long a1, unsigned long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+4h] [rbp-2Ch] _BYTE *v6; // [rsp+8h] [rbp-28h] if ( a2 ) { if ( curr_dir[0] ) { strmake(a1, curr_dir, a2 - 1); } else { if ( a2 < 2 ) return (unsigned int)-1; if ( !getcwd(a1, (unsigned int)(a2 - 2)) && (a3 & 0x10) != 0 ) { v5 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v5; v3 = (unsigned int *)__errno_location(a1); my_error(0x10u, 4LL, *v3); return (unsigned int)-1; } v6 = (_BYTE *)strend(a1); if ( *(v6 - 1) != 47 ) { *v6 = 47; v6[1] = 0; } strmake(curr_dir, a1, 511LL); } return 0; } return (unsigned int)-1; }
my_getwd: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x0017a836 LAB_0017a836: CMP qword ptr [RBP + -0x18],0x1 JNC 0x0017a84b JMP 0x0017a83f LAB_0017a83f: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0017a92a LAB_0017a84b: LEA RAX,[0x4f2f60] CMP byte ptr [RAX],0x0 JZ 0x0017a874 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x4f2f60] CALL 0x001c62d0 JMP 0x0017a921 LAB_0017a874: CMP qword ptr [RBP + -0x18],0x2 JNC 0x0017a889 JMP 0x0017a87d LAB_0017a87d: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0017a92a LAB_0017a889: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x2 MOV EAX,EAX MOV ESI,EAX CALL 0x001363c0 CMP RAX,0x0 JNZ 0x0017a8e7 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x10 CMP RAX,0x0 JZ 0x0017a8e7 CALL 0x001369e0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x0017d4a0 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX CALL 0x001369e0 MOV EDX,dword ptr [RAX] MOV EDI,0x10 MOV ESI,0x4 MOV AL,0x0 CALL 0x001760a0 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0017a92a LAB_0017a8e7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001c6250 MOV qword ptr [RBP + -0x28],RAX MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JZ 0x0017a90c MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],0x0 LAB_0017a90c: MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x4f2f60] MOV EDX,0x1ff CALL 0x001c62d0 LAB_0017a921: JMP 0x0017a923 LAB_0017a923: MOV dword ptr [RBP + -0x4],0x0 LAB_0017a92a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_getwd(char *param_1,ulong param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int1 *puVar4; if (param_2 == 0) { return 0xffffffff; } if (curr_dir == '\0') { if (param_2 < 2) { return 0xffffffff; } pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2)); if ((pcVar2 == (char *)0x0) && ((param_3 & 0x10) != 0)) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; piVar3 = __errno_location(); my_error(0x10,4,*piVar3); return 0xffffffff; } puVar4 = (int1 *)strend(param_1); if (puVar4[-1] != '/') { *puVar4 = 0x2f; puVar4[1] = 0; } strmake(&curr_dir,param_1,0x1ff); } else { strmake(param_1,&curr_dir,param_2 - 1); } return 0; }
37,150
void OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double>(double&, double&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/../far/patchParam.h
constexpr void PatchParam::Unnormalize( REAL & u, REAL & v ) const { REAL frac = (REAL)GetParamFraction(); u = (u + (REAL)GetU()) * frac; v = (v + (REAL)GetV()) * frac; }
O2
c
void OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double>(double&, double&) const: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x54af0 movq (%r15), %rax shrq $0x36, %rax cvtsi2sd %eax, %xmm1 addsd (%r14), %xmm1 cvtss2sd %xmm0, %xmm0 mulsd %xmm0, %xmm1 movsd %xmm1, (%r14) movq (%r15), %rax shrq $0x2c, %rax andl $0x3ff, %eax # imm = 0x3FF cvtsi2sd %eax, %xmm1 addsd (%rbx), %xmm1 mulsd %xmm0, %xmm1 movsd %xmm1, (%rbx) popq %rbx popq %r14 popq %r15 retq
_ZNK10OpenSubdiv6v3_6_03Far10PatchParam11UnnormalizeIdEEvRT_S5_: push r15 push r14 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi call __ZNK10OpenSubdiv6v3_6_03Far10PatchParam16GetParamFractionEv; OpenSubdiv::v3_6_0::Far::PatchParam::GetParamFraction(void) mov rax, [r15] shr rax, 36h cvtsi2sd xmm1, eax addsd xmm1, qword ptr [r14] cvtss2sd xmm0, xmm0 mulsd xmm1, xmm0 movsd qword ptr [r14], xmm1 mov rax, [r15] shr rax, 2Ch and eax, 3FFh cvtsi2sd xmm1, eax addsd xmm1, qword ptr [rbx] mulsd xmm1, xmm0 movsd qword ptr [rbx], xmm1 pop rbx pop r14 pop r15 retn
long long OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double>( OpenSubdiv::v3_6_0::Far::PatchParam *a1, double *a2, double *a3, float a4) { double v5; // xmm0_8 long long result; // rax OpenSubdiv::v3_6_0::Far::PatchParam::GetParamFraction(a1); v5 = a4; *a2 = ((double)(*(_QWORD *)a1 >> 54) + *a2) * v5; result = (*(_QWORD *)a1 >> 44) & 0x3FFLL; *a3 = ((double)(int)result + *a3) * v5; return result; }
Unnormalize<double>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x00154af0 MOV RAX,qword ptr [R15] SHR RAX,0x36 CVTSI2SD XMM1,EAX ADDSD XMM1,qword ptr [R14] CVTSS2SD XMM0,XMM0 MULSD XMM1,XMM0 MOVSD qword ptr [R14],XMM1 MOV RAX,qword ptr [R15] SHR RAX,0x2c AND EAX,0x3ff CVTSI2SD XMM1,EAX ADDSD XMM1,qword ptr [RBX] MULSD XMM1,XMM0 MOVSD qword ptr [RBX],XMM1 POP RBX POP R14 POP R15 RET
/* void OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double>(double&, double&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchParam::Unnormalize<double> (PatchParam *this,double *param_1,double *param_2) { float fVar1; fVar1 = (float)GetParamFraction(this); *param_1 = ((double)(uint)((ulong)*(int8 *)this >> 0x36) + *param_1) * (double)fVar1; *param_2 = ((double)((uint)((ulong)*(int8 *)this >> 0x2c) & 0x3ff) + *param_2) * (double)fVar1; return; }
37,151
my_free
eloqsql/mysys/my_malloc.c
void my_free(void *ptr) { my_memory_header *mh; size_t old_size; my_bool old_flags; DBUG_ENTER("my_free"); DBUG_PRINT("my",("ptr: %p", ptr)); if (ptr == NULL) DBUG_VOID_RETURN; mh= USER_TO_HEADER(ptr); old_size= mh->m_size & ~1; old_flags= mh->m_size & 1; PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner); update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags); #ifndef SAFEMALLOC /* Trash memory if not safemalloc. We don't have to do this if safemalloc is used as safemalloc will also do trashing */ TRASH_FREE(ptr, old_size); #endif sf_free(mh); DBUG_VOID_RETURN; }
O0
c
my_free: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) jmp 0x274be cmpq $0x0, -0x8(%rbp) jne 0x274c9 jmp 0x274c7 jmp 0x27543 movq -0x8(%rbp), %rax addq $-0x18, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax andq $-0x2, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax andq $0x1, %rax movb %al, -0x19(%rbp) leaq 0x1a5325(%rip), %rax # 0x1cc820 movq (%rax), %rax movq 0x3f8(%rax), %rax movq -0x10(%rbp), %rcx movl 0x10(%rcx), %edi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rcx movq (%rcx), %rdx callq *%rax movq 0x1a4e10(%rip), %rax # 0x1cc330 xorl %ecx, %ecx movl %ecx, %edi subq -0x18(%rbp), %rdi subq $0x18, %rdi movsbl -0x19(%rbp), %esi callq *%rax jmp 0x27534 jmp 0x27536 jmp 0x27538 movq -0x10(%rbp), %rdi callq 0x24300 jmp 0x27543 addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_free: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi jmp short $+2 loc_274BE: cmp [rbp+var_8], 0 jnz short loc_274C9 jmp short $+2 loc_274C7: jmp short loc_27543 loc_274C9: mov rax, [rbp+var_8] add rax, 0FFFFFFFFFFFFFFE8h mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+8] and rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+8] and rax, 1 mov [rbp+var_19], al lea rax, PSI_server mov rax, [rax] mov rax, [rax+3F8h] mov rcx, [rbp+var_10] mov edi, [rcx+10h] mov rsi, [rbp+var_18] mov rcx, [rbp+var_10] mov rdx, [rcx] call rax mov rax, cs:update_malloc_size xor ecx, ecx mov edi, ecx sub rdi, [rbp+var_18] sub rdi, 18h movsx esi, [rbp+var_19] call rax ; dummy jmp short $+2 loc_27534: jmp short $+2 loc_27536: jmp short $+2 loc_27538: mov rdi, [rbp+var_10] call _free jmp short $+2 loc_27543: add rsp, 20h pop rbp retn
long long my_free(long long a1) { long long result; // rax char v2; // [rsp+7h] [rbp-19h] unsigned long long v3; // [rsp+8h] [rbp-18h] if ( a1 ) { v3 = *(_QWORD *)(a1 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL; v2 = *(_BYTE *)(a1 - 24 + 8) & 1; (*((void ( **)(_QWORD, unsigned long long, _QWORD))PSI_server[0] + 127))( *(unsigned int *)(a1 - 24 + 16), v3, *(_QWORD *)(a1 - 24)); update_malloc_size(-(long long)v3 - 24, v2); return free(a1 - 24); } return result; }
my_free: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI JMP 0x001274be LAB_001274be: CMP qword ptr [RBP + -0x8],0x0 JNZ 0x001274c9 JMP 0x001274c7 LAB_001274c7: JMP 0x00127543 LAB_001274c9: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,-0x18 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] AND RAX,-0x2 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] AND RAX,0x1 MOV byte ptr [RBP + -0x19],AL LEA RAX,[0x2cc820] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3f8] MOV RCX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RCX + 0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX] CALL RAX MOV RAX,qword ptr [0x002cc330] XOR ECX,ECX MOV EDI,ECX SUB RDI,qword ptr [RBP + -0x18] SUB RDI,0x18 MOVSX ESI,byte ptr [RBP + -0x19] CALL RAX JMP 0x00127534 LAB_00127534: JMP 0x00127536 LAB_00127536: JMP 0x00127538 LAB_00127538: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00124300 JMP 0x00127543 LAB_00127543: ADD RSP,0x20 POP RBP RET
void my_free(long param_1) { int8 uVar1; ulong uVar2; if (param_1 != 0) { uVar2 = *(ulong *)(param_1 + -0x10) & 0xfffffffffffffffe; uVar1 = *(int8 *)(param_1 + -0x10); (**(code **)(PSI_server + 0x3f8)) (*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18)); (*(code *)update_malloc_size)(-0x18 - uVar2,(byte)uVar1 & 1); free((int8 *)(param_1 + -0x18)); } return; }
37,152
my_free
eloqsql/mysys/my_malloc.c
void my_free(void *ptr) { my_memory_header *mh; size_t old_size; my_bool old_flags; DBUG_ENTER("my_free"); DBUG_PRINT("my",("ptr: %p", ptr)); if (ptr == NULL) DBUG_VOID_RETURN; mh= USER_TO_HEADER(ptr); old_size= mh->m_size & ~1; old_flags= mh->m_size & 1; PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner); update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags); #ifndef SAFEMALLOC /* Trash memory if not safemalloc. We don't have to do this if safemalloc is used as safemalloc will also do trashing */ TRASH_FREE(ptr, old_size); #endif sf_free(mh); DBUG_VOID_RETURN; }
O3
c
my_free: testq %rdi, %rdi je 0x2668f pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq -0x18(%rdi), %rbx movq -0x18(%rdi), %rdx movq -0x10(%rdi), %r14 movq %r14, %r15 andq $-0x2, %r15 leaq 0x2c81c9(%rip), %rax # 0x2ee820 movq (%rax), %rax movl -0x8(%rdi), %edi movq %r15, %rsi callq *0x3f8(%rax) movq $-0x18, %rdi subq %r15, %rdi andl $0x1, %r14d movl %r14d, %esi callq *0x2c7cb3(%rip) # 0x2ee330 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x24340 retq
my_free: test rdi, rdi jz short locret_2668F push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea rbx, [rdi-18h] mov rdx, [rdi-18h] mov r14, [rdi-10h] mov r15, r14 and r15, 0FFFFFFFFFFFFFFFEh lea rax, PSI_server mov rax, [rax] mov edi, [rdi-8] mov rsi, r15 call qword ptr [rax+3F8h] mov rdi, 0FFFFFFFFFFFFFFE8h sub rdi, r15 and r14d, 1 mov esi, r14d call cs:update_malloc_size mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _free locret_2668F: retn
long long my_free(long long a1) { long long v1; // r14 long long result; // rax if ( a1 ) { v1 = *(_QWORD *)(a1 - 16); (*((void ( **)(_QWORD, unsigned long long, _QWORD))PSI_server[0] + 127))( *(unsigned int *)(a1 - 8), v1 & 0xFFFFFFFFFFFFFFFELL, *(_QWORD *)(a1 - 24)); update_malloc_size(); return free(a1 - 24, v1 & 1); } return result; }
my_free: TEST RDI,RDI JZ 0x0012668f PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA RBX,[RDI + -0x18] MOV RDX,qword ptr [RDI + -0x18] MOV R14,qword ptr [RDI + -0x10] MOV R15,R14 AND R15,-0x2 LEA RAX,[0x3ee820] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RDI + -0x8] MOV RSI,R15 CALL qword ptr [RAX + 0x3f8] MOV RDI,-0x18 SUB RDI,R15 AND R14D,0x1 MOV ESI,R14D CALL qword ptr [0x003ee330] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00124340 LAB_0012668f: RET
void my_free(long param_1) { ulong uVar1; ulong uVar2; if (param_1 != 0) { uVar1 = *(ulong *)(param_1 + -0x10); uVar2 = uVar1 & 0xfffffffffffffffe; (**(code **)(PSI_server + 0x3f8)) (*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18)); (*(code *)update_malloc_size)(-0x18 - uVar2,(uint)uVar1 & 1); free((void *)(param_1 + -0x18)); return; } return; }
37,153
my_wc_mb_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_ksc5601_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_euc_kr: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xaf4c6 cmpl $0x7f, %esi ja 0xaf4c7 movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa1(%rsi), %eax cmpl $0xc6, %eax ja 0xaf4e2 movl %eax, %eax leaq 0x9cb43(%rip), %rsi # 0x14c020 jmp 0xaf5da leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0xaf4fd movl %eax, %eax leaq 0x9ccb8(%rip), %rsi # 0x14c1b0 jmp 0xaf5da leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0xaf518 movl %eax, %eax leaq 0x9cfbd(%rip), %rsi # 0x14c4d0 jmp 0xaf5da leal -0x2460(%rsi), %eax cmpl $0x20d, %eax # imm = 0x20D ja 0xaf533 movl %eax, %eax leaq 0x9d5a2(%rip), %rsi # 0x14cad0 jmp 0xaf5da leal -0x3000(%rsi), %eax cmpl $0x27f, %eax # imm = 0x27F ja 0xaf54e movl %eax, %eax leaq 0x9d9a7(%rip), %rsi # 0x14cef0 jmp 0xaf5da leal -0x3380(%rsi), %eax cmpl $0x5d, %eax ja 0xaf564 movl %eax, %eax leaq 0x9de8e(%rip), %rsi # 0x14d3f0 jmp 0xaf5da leal -0x4e00(%rsi), %eax cmpl $0x467f, %eax # imm = 0x467F ja 0xaf57c movl %eax, %eax leaq 0x9df36(%rip), %rsi # 0x14d4b0 jmp 0xaf5da leal -0x9577(%rsi), %eax cmpl $0xa25, %eax # imm = 0xA25 ja 0xaf594 movl %eax, %eax leaq 0xa6c1e(%rip), %rsi # 0x1561b0 jmp 0xaf5da leal -0xac00(%rsi), %eax cmpl $0x2ba3, %eax # imm = 0x2BA3 ja 0xaf5ac movl %eax, %eax leaq 0xa8056(%rip), %rsi # 0x157600 jmp 0xaf5da leal -0xf900(%rsi), %eax cmpl $0x10b, %eax # imm = 0x10B ja 0xaf5c4 movl %eax, %eax leaq 0xad78e(%rip), %rsi # 0x15cd50 jmp 0xaf5da leal -0xff01(%rsi), %eax cmpl $0xe5, %eax ja 0xaf60a movl %eax, %eax leaq 0xad996(%rip), %rsi # 0x15cf70 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0xaf606 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xaf608 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0xaf608 xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_euc_kr: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_AF4C6 cmp esi, 7Fh ja short loc_AF4C7 mov [rdx], sil mov eax, 1 locret_AF4C6: retn loc_AF4C7: lea eax, [rsi-0A1h] cmp eax, 0C6h ja short loc_AF4E2 mov eax, eax lea rsi, tab_uni_ksc56010 jmp loc_AF5DA loc_AF4E2: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_AF4FD mov eax, eax lea rsi, tab_uni_ksc56011 jmp loc_AF5DA loc_AF4FD: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_AF518 mov eax, eax lea rsi, tab_uni_ksc56012 jmp loc_AF5DA loc_AF518: lea eax, [rsi-2460h] cmp eax, 20Dh ja short loc_AF533 mov eax, eax lea rsi, tab_uni_ksc56013 jmp loc_AF5DA loc_AF533: lea eax, [rsi-3000h] cmp eax, 27Fh ja short loc_AF54E mov eax, eax lea rsi, tab_uni_ksc56014 jmp loc_AF5DA loc_AF54E: lea eax, [rsi-3380h] cmp eax, 5Dh ; ']' ja short loc_AF564 mov eax, eax lea rsi, tab_uni_ksc56015 jmp short loc_AF5DA loc_AF564: lea eax, [rsi-4E00h] cmp eax, 467Fh ja short loc_AF57C mov eax, eax lea rsi, tab_uni_ksc56016 jmp short loc_AF5DA loc_AF57C: lea eax, [rsi-9577h] cmp eax, 0A25h ja short loc_AF594 mov eax, eax lea rsi, tab_uni_ksc56017 jmp short loc_AF5DA loc_AF594: lea eax, [rsi-0AC00h] cmp eax, 2BA3h ja short loc_AF5AC mov eax, eax lea rsi, tab_uni_ksc56018 jmp short loc_AF5DA loc_AF5AC: lea eax, [rsi-0F900h] cmp eax, 10Bh ja short loc_AF5C4 mov eax, eax lea rsi, tab_uni_ksc56019 jmp short loc_AF5DA loc_AF5C4: lea eax, [rsi-0FF01h] cmp eax, 0E5h ja short loc_AF60A mov eax, eax lea rsi, tab_uni_ksc560110 loc_AF5DA: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_AF606 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_AF608 rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_AF608 loc_AF606: xor eax, eax loc_AF608: pop rbp retn loc_AF60A: xor eax, eax retn
long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax _WORD *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 161; if ( a2 - 161 > 0xC6 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x20D ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x27F ) { LODWORD(v5) = a2 - 13184; if ( a2 - 13184 > 0x5D ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x467F ) { LODWORD(v5) = a2 - 38263; if ( a2 - 38263 > 0xA25 ) { LODWORD(v5) = a2 - 44032; if ( a2 - 44032 > 0x2BA3 ) { LODWORD(v5) = a2 - 63744; if ( a2 - 63744 > 0x10B ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE5 ) return 0LL; v5 = (unsigned int)v5; v6 = &tab_uni_ksc560110; } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56019; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56018; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56017; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56016; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56015; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56014; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56013; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56012; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56011; } } else { v5 = (unsigned int)v5; v6 = &tab_uni_ksc56010; } v7 = v6[v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_euc_kr: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001af4c6 CMP ESI,0x7f JA 0x001af4c7 MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_001af4c6: RET LAB_001af4c7: LEA EAX,[RSI + -0xa1] CMP EAX,0xc6 JA 0x001af4e2 MOV EAX,EAX LEA RSI,[0x24c020] JMP 0x001af5da LAB_001af4e2: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x001af4fd MOV EAX,EAX LEA RSI,[0x24c1b0] JMP 0x001af5da LAB_001af4fd: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x001af518 MOV EAX,EAX LEA RSI,[0x24c4d0] JMP 0x001af5da LAB_001af518: LEA EAX,[RSI + -0x2460] CMP EAX,0x20d JA 0x001af533 MOV EAX,EAX LEA RSI,[0x24cad0] JMP 0x001af5da LAB_001af533: LEA EAX,[RSI + -0x3000] CMP EAX,0x27f JA 0x001af54e MOV EAX,EAX LEA RSI,[0x24cef0] JMP 0x001af5da LAB_001af54e: LEA EAX,[RSI + -0x3380] CMP EAX,0x5d JA 0x001af564 MOV EAX,EAX LEA RSI,[0x24d3f0] JMP 0x001af5da LAB_001af564: LEA EAX,[RSI + -0x4e00] CMP EAX,0x467f JA 0x001af57c MOV EAX,EAX LEA RSI,[0x24d4b0] JMP 0x001af5da LAB_001af57c: LEA EAX,[RSI + -0x9577] CMP EAX,0xa25 JA 0x001af594 MOV EAX,EAX LEA RSI,[0x2561b0] JMP 0x001af5da LAB_001af594: LEA EAX,[RSI + -0xac00] CMP EAX,0x2ba3 JA 0x001af5ac MOV EAX,EAX LEA RSI,[0x257600] JMP 0x001af5da LAB_001af5ac: LEA EAX,[RSI + -0xf900] CMP EAX,0x10b JA 0x001af5c4 MOV EAX,EAX LEA RSI,[0x25cd50] JMP 0x001af5da LAB_001af5c4: LEA EAX,[RSI + -0xff01] CMP EAX,0xe5 JA 0x001af60a MOV EAX,EAX LEA RSI,[0x25cf70] LAB_001af5da: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x001af606 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001af608 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x001af608 LAB_001af606: XOR EAX,EAX LAB_001af608: POP RBP RET LAB_001af60a: XOR EAX,EAX RET
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { ushort uVar1; int8 uVar2; ulong uVar3; int1 *puVar4; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa1 < 199) { uVar3 = (ulong)(param_2 - 0xa1); puVar4 = tab_uni_ksc56010; } else if (param_2 - 0x2c7 < 0x18b) { uVar3 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_ksc56011; } else if (param_2 - 0x2015 < 0x2fe) { uVar3 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_ksc56012; } else if (param_2 - 0x2460 < 0x20e) { uVar3 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_ksc56013; } else if (param_2 - 0x3000 < 0x280) { uVar3 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_ksc56014; } else if (param_2 - 0x3380 < 0x5e) { uVar3 = (ulong)(param_2 - 0x3380); puVar4 = tab_uni_ksc56015; } else if (param_2 - 0x4e00 < 0x4680) { uVar3 = (ulong)(param_2 - 0x4e00); puVar4 = tab_uni_ksc56016; } else if (param_2 - 0x9577 < 0xa26) { uVar3 = (ulong)(param_2 - 0x9577); puVar4 = tab_uni_ksc56017; } else if (param_2 - 0xac00 < 0x2ba4) { uVar3 = (ulong)(param_2 - 0xac00); puVar4 = tab_uni_ksc56018; } else if (param_2 - 0xf900 < 0x10c) { uVar3 = (ulong)(param_2 - 0xf900); puVar4 = tab_uni_ksc56019; } else { uVar3 = (ulong)(param_2 - 0xff01); if (0xe5 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_ksc560110; } uVar1 = *(ushort *)(puVar4 + uVar3 * 2); if (uVar1 == 0) { uVar2 = 0; } else { uVar2 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar2 = 2; } } return uVar2; } *(char *)param_3 = (char)param_2; uVar2 = 1; } return uVar2; }
37,154
ft_trig_pseudo_polarize
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
static void ft_trig_pseudo_polarize(PVG_FT_Vector* vec) { PVG_FT_Angle theta; PVG_FT_Int i; PVG_FT_Fixed x, y, xtemp, b; const PVG_FT_Fixed* arctanptr; x = vec->x; y = vec->y; /* Get the vector into [-PI/4,PI/4] sector */ if (y > x) { if (y > -x) { theta = PVG_FT_ANGLE_PI2; xtemp = y; y = -x; x = xtemp; } else { theta = y > 0 ? PVG_FT_ANGLE_PI : -PVG_FT_ANGLE_PI; x = -x; y = -y; } } else { if (y < -x) { theta = -PVG_FT_ANGLE_PI2; xtemp = -y; y = x; x = xtemp; } else { theta = 0; } } arctanptr = ft_trig_arctan_table; /* Pseudorotations, with right shifts */ for (i = 1, b = 1; i < PVG_FT_TRIG_MAX_ITERS; b <<= 1, i++) { PVG_FT_Fixed v1 = ((y + b) >> i); PVG_FT_Fixed v2 = ((x + b) >> i); if (y > 0) { xtemp = x + v1; y = y - v2; x = xtemp; theta += *arctanptr++; } else { xtemp = x - v1; y = y + v2; x = xtemp; theta -= *arctanptr++; } } /* round theta */ if (theta >= 0) theta = PVG_FT_PAD_ROUND(theta, 32); else theta = -PVG_FT_PAD_ROUND(-theta, 32); vec->x = x; vec->y = theta; }
O1
c
ft_trig_pseudo_polarize: movq (%rdi), %r8 movq 0x8(%rdi), %rcx movq %r8, %rax negq %rax cmpq %r8, %rcx jle 0x224e7 movl $0x5a0000, %edx # imm = 0x5A0000 cmpq %rax, %rcx jle 0x224fe movq %rax, %rsi jmp 0x224f9 cmpq %rax, %rcx jge 0x22519 negq %rcx movq $-0x5a0000, %rdx # imm = 0xFFA60000 movq %r8, %rsi movq %rcx, %rax jmp 0x22521 testq %rcx, %rcx movl $0xb40000, %esi # imm = 0xB40000 movq $-0xb40000, %rdx # imm = 0xFF4C0000 cmovgq %rsi, %rdx negq %rcx movq %rcx, %rsi jmp 0x22521 xorl %edx, %edx movq %rcx, %rsi movq %r8, %rax pushq %rbx leaq 0x4b17(%rip), %r8 # 0x27040 movl $0x1, %ecx movl $0x1, %r9d leaq (%r9,%rsi), %r10 sarq %cl, %r10 leaq (%r9,%rax), %r11 sarq %cl, %r11 movq (%r8), %rbx testq %rsi, %rsi jle 0x22555 addq %r10, %rax subq %r11, %rsi addq %rbx, %rdx jmp 0x2255e subq %r10, %rax addq %r11, %rsi subq %rbx, %rdx addq $0x8, %r8 addq %r9, %r9 incq %rcx cmpq $0x17, %rcx jne 0x22534 testq %rdx, %rdx popq %rbx js 0x22587 addq $0x10, %rdx movabsq $0x7fffffffffffffe0, %rcx # imm = 0x7FFFFFFFFFFFFFE0 andq %rdx, %rcx jmp 0x22596 movl $0x10, %ecx subq %rdx, %rcx andq $-0x20, %rcx negq %rcx movq %rax, (%rdi) movq %rcx, 0x8(%rdi) retq
ft_trig_pseudo_polarize: mov r8, [rdi] mov rcx, [rdi+8] mov rax, r8 neg rax cmp rcx, r8 jle short loc_224E7 mov edx, 5A0000h cmp rcx, rax jle short loc_224FE mov rsi, rax jmp short loc_224F9 loc_224E7: cmp rcx, rax jge short loc_22519 neg rcx mov rdx, 0FFFFFFFFFFA60000h mov rsi, r8 loc_224F9: mov rax, rcx jmp short loc_22521 loc_224FE: test rcx, rcx mov esi, 0B40000h mov rdx, 0FFFFFFFFFF4C0000h cmovg rdx, rsi neg rcx mov rsi, rcx jmp short loc_22521 loc_22519: xor edx, edx mov rsi, rcx mov rax, r8 loc_22521: push rbx lea r8, ft_trig_arctan_table mov ecx, 1 mov r9d, 1 loc_22534: lea r10, [r9+rsi] sar r10, cl lea r11, [r9+rax] sar r11, cl mov rbx, [r8] test rsi, rsi jle short loc_22555 add rax, r10 sub rsi, r11 add rdx, rbx jmp short loc_2255E loc_22555: sub rax, r10 add rsi, r11 sub rdx, rbx loc_2255E: add r8, 8 add r9, r9 inc rcx cmp rcx, 17h jnz short loc_22534 test rdx, rdx pop rbx js short loc_22587 add rdx, 10h mov rcx, 7FFFFFFFFFFFFFE0h and rcx, rdx jmp short loc_22596 loc_22587: mov ecx, 10h sub rcx, rdx and rcx, 0FFFFFFFFFFFFFFE0h neg rcx loc_22596: mov [rdi], rax mov [rdi+8], rcx retn
long long ft_trig_pseudo_polarize(long long *a1) { long long v1; // rcx long long result; // rax long long v3; // rdx long long v4; // rsi long long *v5; // r8 long long v6; // rcx long long v7; // r9 long long v8; // r10 long long v9; // r11 long long v10; // rbx long long v11; // rcx v1 = a1[1]; result = -*a1; if ( v1 <= *a1 ) { if ( v1 >= result ) { v3 = 0LL; v4 = a1[1]; result = *a1; goto LABEL_11; } v1 = -v1; v3 = -5898240LL; v4 = *a1; goto LABEL_6; } v3 = 5898240LL; if ( v1 > result ) { v4 = -*a1; LABEL_6: result = v1; goto LABEL_11; } v3 = -11796480LL; if ( v1 > 0 ) v3 = 11796480LL; v4 = -v1; LABEL_11: v5 = (long long *)&ft_trig_arctan_table; v6 = 1LL; v7 = 1LL; do { v8 = (v7 + v4) >> v6; v9 = (v7 + result) >> v6; v10 = *v5; if ( v4 <= 0 ) { result -= v8; v4 += v9; v3 -= v10; } else { result += v8; v4 -= v9; v3 += v10; } ++v5; v7 *= 2LL; ++v6; } while ( v6 != 23 ); if ( v3 < 0 ) v11 = -(long long)((16 - v3) & 0xFFFFFFFFFFFFFFE0LL); else v11 = (v3 + 16) & 0x7FFFFFFFFFFFFFE0LL; *a1 = result; a1[1] = v11; return result; }
ft_trig_pseudo_polarize: MOV R8,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RAX,R8 NEG RAX CMP RCX,R8 JLE 0x001224e7 MOV EDX,0x5a0000 CMP RCX,RAX JLE 0x001224fe MOV RSI,RAX JMP 0x001224f9 LAB_001224e7: CMP RCX,RAX JGE 0x00122519 NEG RCX MOV RDX,-0x5a0000 MOV RSI,R8 LAB_001224f9: MOV RAX,RCX JMP 0x00122521 LAB_001224fe: TEST RCX,RCX MOV ESI,0xb40000 MOV RDX,-0xb40000 CMOVG RDX,RSI NEG RCX MOV RSI,RCX JMP 0x00122521 LAB_00122519: XOR EDX,EDX MOV RSI,RCX MOV RAX,R8 LAB_00122521: PUSH RBX LEA R8,[0x127040] MOV ECX,0x1 MOV R9D,0x1 LAB_00122534: LEA R10,[R9 + RSI*0x1] SAR R10,CL LEA R11,[R9 + RAX*0x1] SAR R11,CL MOV RBX,qword ptr [R8] TEST RSI,RSI JLE 0x00122555 ADD RAX,R10 SUB RSI,R11 ADD RDX,RBX JMP 0x0012255e LAB_00122555: SUB RAX,R10 ADD RSI,R11 SUB RDX,RBX LAB_0012255e: ADD R8,0x8 ADD R9,R9 INC RCX CMP RCX,0x17 JNZ 0x00122534 TEST RDX,RDX POP RBX JS 0x00122587 ADD RDX,0x10 MOV RCX,0x7fffffffffffffe0 AND RCX,RDX JMP 0x00122596 LAB_00122587: MOV ECX,0x10 SUB RCX,RDX AND RCX,-0x20 NEG RCX LAB_00122596: MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RCX RET
void ft_trig_pseudo_polarize(long *param_1) { long lVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; long lVar6; long *plVar7; long lVar8; long lVar9; long lVar10; lVar8 = *param_1; lVar4 = param_1[1]; lVar2 = -lVar8; if (lVar8 < lVar4) { lVar6 = 0x5a0000; lVar3 = lVar4; if (lVar4 == lVar2 || SBORROW8(lVar4,lVar2) != lVar4 + lVar8 < 0) { lVar6 = -0xb40000; if (0 < lVar4) { lVar6 = 0xb40000; } lVar3 = lVar2; lVar2 = -lVar4; } } else if (SBORROW8(lVar4,lVar2) == lVar4 + lVar8 < 0) { lVar6 = 0; lVar3 = lVar8; lVar2 = lVar4; } else { lVar6 = -0x5a0000; lVar3 = -lVar4; lVar2 = lVar8; } plVar7 = &ft_trig_arctan_table; lVar4 = 1; lVar8 = 1; do { lVar9 = lVar8 + lVar2 >> ((byte)lVar4 & 0x3f); lVar10 = lVar8 + lVar3 >> ((byte)lVar4 & 0x3f); lVar1 = *plVar7; if (lVar2 < 1) { lVar9 = -lVar9; lVar1 = -lVar1; } else { lVar10 = -lVar10; } lVar2 = lVar2 + lVar10; lVar6 = lVar6 + lVar1; lVar3 = lVar3 + lVar9; plVar7 = plVar7 + 1; lVar8 = lVar8 * 2; lVar4 = lVar4 + 1; } while (lVar4 != 0x17); if (lVar6 < 0) { uVar5 = -(0x10U - lVar6 & 0xffffffffffffffe0); } else { uVar5 = lVar6 + 0x10U & 0x7fffffffffffffe0; } *param_1 = lVar3; param_1[1] = uVar5; return; }
37,155
ft_trig_pseudo_polarize
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
static void ft_trig_pseudo_polarize(PVG_FT_Vector* vec) { PVG_FT_Angle theta; PVG_FT_Int i; PVG_FT_Fixed x, y, xtemp, b; const PVG_FT_Fixed* arctanptr; x = vec->x; y = vec->y; /* Get the vector into [-PI/4,PI/4] sector */ if (y > x) { if (y > -x) { theta = PVG_FT_ANGLE_PI2; xtemp = y; y = -x; x = xtemp; } else { theta = y > 0 ? PVG_FT_ANGLE_PI : -PVG_FT_ANGLE_PI; x = -x; y = -y; } } else { if (y < -x) { theta = -PVG_FT_ANGLE_PI2; xtemp = -y; y = x; x = xtemp; } else { theta = 0; } } arctanptr = ft_trig_arctan_table; /* Pseudorotations, with right shifts */ for (i = 1, b = 1; i < PVG_FT_TRIG_MAX_ITERS; b <<= 1, i++) { PVG_FT_Fixed v1 = ((y + b) >> i); PVG_FT_Fixed v2 = ((x + b) >> i); if (y > 0) { xtemp = x + v1; y = y - v2; x = xtemp; theta += *arctanptr++; } else { xtemp = x - v1; y = y + v2; x = xtemp; theta -= *arctanptr++; } } /* round theta */ if (theta >= 0) theta = PVG_FT_PAD_ROUND(theta, 32); else theta = -PVG_FT_PAD_ROUND(-theta, 32); vec->x = x; vec->y = theta; }
O2
c
ft_trig_pseudo_polarize: movq (%rdi), %r8 movq 0x8(%rdi), %rax movq %r8, %rcx negq %rcx cmpq %r8, %rax jle 0x1d1d9 movl $0x5a0000, %edx # imm = 0x5A0000 cmpq %rcx, %rax jle 0x1d1f0 movq %rax, %rsi movq %rcx, %rax jmp 0x1d210 cmpq %rcx, %rax jge 0x1d20b negq %rax movq $-0x5a0000, %rdx # imm = 0xFFA60000 movq %rax, %rsi movq %r8, %rax jmp 0x1d210 testq %rax, %rax movl $0xb40000, %esi # imm = 0xB40000 movq $-0xb40000, %rdx # imm = 0xFF4C0000 cmovgq %rsi, %rdx negq %rax movq %rcx, %rsi jmp 0x1d210 xorl %edx, %edx movq %r8, %rsi pushq %rbx leaq 0x4e68(%rip), %r8 # 0x22080 movabsq $0x1, %rcx movq %rcx, %r9 cmpq $0x17, %rcx je 0x1d261 leaq (%r9,%rax), %r10 sarq %cl, %r10 leaq (%r9,%rsi), %r11 sarq %cl, %r11 movq (%r8), %rbx testq %rax, %rax jle 0x1d24c addq %r10, %rsi subq %r11, %rax addq %rbx, %rdx jmp 0x1d255 subq %r10, %rsi addq %r11, %rax subq %rbx, %rdx addq $0x8, %r8 addq %r9, %r9 incq %rcx jmp 0x1d225 testq %rdx, %rdx popq %rbx js 0x1d27a addq $0x10, %rdx movabsq $0x7fffffffffffffe0, %rax # imm = 0x7FFFFFFFFFFFFFE0 andq %rdx, %rax jmp 0x1d28e movabsq $0x10, %rax subq %rdx, %rax andq $-0x20, %rax negq %rax movq %rsi, (%rdi) movq %rax, 0x8(%rdi) retq
ft_trig_pseudo_polarize: mov r8, [rdi] mov rax, [rdi+8] mov rcx, r8 neg rcx cmp rax, r8 jle short loc_1D1D9 mov edx, 5A0000h cmp rax, rcx jle short loc_1D1F0 mov rsi, rax mov rax, rcx jmp short loc_1D210 loc_1D1D9: cmp rax, rcx jge short loc_1D20B neg rax mov rdx, 0FFFFFFFFFFA60000h mov rsi, rax mov rax, r8 jmp short loc_1D210 loc_1D1F0: test rax, rax mov esi, 0B40000h mov rdx, 0FFFFFFFFFF4C0000h cmovg rdx, rsi neg rax mov rsi, rcx jmp short loc_1D210 loc_1D20B: xor edx, edx mov rsi, r8 loc_1D210: push rbx lea r8, ft_trig_arctan_table mov rcx, 1 mov r9, rcx loc_1D225: cmp rcx, 17h jz short loc_1D261 lea r10, [r9+rax] sar r10, cl lea r11, [r9+rsi] sar r11, cl mov rbx, [r8] test rax, rax jle short loc_1D24C add rsi, r10 sub rax, r11 add rdx, rbx jmp short loc_1D255 loc_1D24C: sub rsi, r10 add rax, r11 sub rdx, rbx loc_1D255: add r8, 8 add r9, r9 inc rcx jmp short loc_1D225 loc_1D261: test rdx, rdx pop rbx js short loc_1D27A add rdx, 10h mov rax, 7FFFFFFFFFFFFFE0h and rax, rdx jmp short loc_1D28E loc_1D27A: mov rax, 10h sub rax, rdx and rax, 0FFFFFFFFFFFFFFE0h neg rax loc_1D28E: mov [rdi], rsi mov [rdi+8], rax retn
long long ft_trig_pseudo_polarize(long long *a1) { long long v1; // rax long long v2; // rcx long long v3; // rdx long long v4; // rsi long long *v5; // r8 long long v6; // rcx long long v7; // r9 long long v8; // r10 long long v9; // r11 long long v10; // rbx long long result; // rax v1 = a1[1]; v2 = -*a1; if ( v1 <= *a1 ) { if ( v1 >= v2 ) { v3 = 0LL; v4 = *a1; } else { v3 = -5898240LL; v4 = -v1; v1 = *a1; } } else { v3 = 5898240LL; if ( v1 <= v2 ) { v3 = -11796480LL; if ( v1 > 0 ) v3 = 11796480LL; v1 = -v1; v4 = -*a1; } else { v4 = a1[1]; v1 = -*a1; } } v5 = (long long *)&ft_trig_arctan_table; v6 = 1LL; v7 = 1LL; while ( v6 != 23 ) { v8 = (v7 + v1) >> v6; v9 = (v7 + v4) >> v6; v10 = *v5; if ( v1 <= 0 ) { v4 -= v8; v1 += v9; v3 -= v10; } else { v4 += v8; v1 -= v9; v3 += v10; } ++v5; v7 *= 2LL; ++v6; } if ( v3 < 0 ) result = -(long long)((16 - v3) & 0xFFFFFFFFFFFFFFE0LL); else result = (v3 + 16) & 0x7FFFFFFFFFFFFFE0LL; *a1 = v4; a1[1] = result; return result; }
ft_trig_pseudo_polarize: MOV R8,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] MOV RCX,R8 NEG RCX CMP RAX,R8 JLE 0x0011d1d9 MOV EDX,0x5a0000 CMP RAX,RCX JLE 0x0011d1f0 MOV RSI,RAX MOV RAX,RCX JMP 0x0011d210 LAB_0011d1d9: CMP RAX,RCX JGE 0x0011d20b NEG RAX MOV RDX,-0x5a0000 MOV RSI,RAX MOV RAX,R8 JMP 0x0011d210 LAB_0011d1f0: TEST RAX,RAX MOV ESI,0xb40000 MOV RDX,-0xb40000 CMOVG RDX,RSI NEG RAX MOV RSI,RCX JMP 0x0011d210 LAB_0011d20b: XOR EDX,EDX MOV RSI,R8 LAB_0011d210: PUSH RBX LEA R8,[0x122080] MOV RCX,0x1 MOV R9,RCX LAB_0011d225: CMP RCX,0x17 JZ 0x0011d261 LEA R10,[R9 + RAX*0x1] SAR R10,CL LEA R11,[R9 + RSI*0x1] SAR R11,CL MOV RBX,qword ptr [R8] TEST RAX,RAX JLE 0x0011d24c ADD RSI,R10 SUB RAX,R11 ADD RDX,RBX JMP 0x0011d255 LAB_0011d24c: SUB RSI,R10 ADD RAX,R11 SUB RDX,RBX LAB_0011d255: ADD R8,0x8 ADD R9,R9 INC RCX JMP 0x0011d225 LAB_0011d261: TEST RDX,RDX POP RBX JS 0x0011d27a ADD RDX,0x10 MOV RAX,0x7fffffffffffffe0 AND RAX,RDX JMP 0x0011d28e LAB_0011d27a: MOV RAX,0x10 SUB RAX,RDX AND RAX,-0x20 NEG RAX LAB_0011d28e: MOV qword ptr [RDI],RSI MOV qword ptr [RDI + 0x8],RAX RET
void ft_trig_pseudo_polarize(long *param_1) { long lVar1; long lVar2; ulong uVar3; long lVar4; long lVar5; long lVar6; long *plVar7; long lVar8; long lVar9; long lVar10; lVar8 = *param_1; lVar6 = param_1[1]; lVar4 = -lVar8; if (lVar8 < lVar6) { lVar5 = 0x5a0000; lVar2 = lVar4; if (lVar6 == lVar4 || SBORROW8(lVar6,lVar4) != lVar6 + lVar8 < 0) { lVar5 = -0xb40000; if (0 < lVar6) { lVar5 = 0xb40000; } lVar2 = -lVar6; lVar6 = lVar4; } } else if (SBORROW8(lVar6,lVar4) == lVar6 + lVar8 < 0) { lVar5 = 0; lVar2 = lVar6; lVar6 = lVar8; } else { lVar5 = -0x5a0000; lVar2 = lVar8; lVar6 = -lVar6; } plVar7 = &ft_trig_arctan_table; lVar8 = 1; for (lVar4 = 1; lVar4 != 0x17; lVar4 = lVar4 + 1) { lVar9 = lVar8 + lVar2 >> ((byte)lVar4 & 0x3f); lVar10 = lVar8 + lVar6 >> ((byte)lVar4 & 0x3f); lVar1 = *plVar7; if (lVar2 < 1) { lVar9 = -lVar9; lVar1 = -lVar1; } else { lVar10 = -lVar10; } lVar6 = lVar6 + lVar9; lVar5 = lVar5 + lVar1; lVar2 = lVar2 + lVar10; plVar7 = plVar7 + 1; lVar8 = lVar8 * 2; } if (lVar5 < 0) { uVar3 = -(0x10U - lVar5 & 0xffffffffffffffe0); } else { uVar3 = lVar5 + 0x10U & 0x7fffffffffffffe0; } *param_1 = lVar6; param_1[1] = uVar3; return; }
37,156
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x6e161 movq %rdi, %r14 subq %rbx, %rdx pushq $0x60 popq %rcx movq %rdx, %rax cqto idivq %rcx movq %rax, %r15 movq (%rdi), %rax movq %rax, (%rsp) imulq $0x60, %r15, %r13 addq %rbx, %r13 movq %r13, %r12 negq %r12 movq %rbx, %rbp cmpq 0x8(%r14), %r13 je 0x6e13b movq %rbp, %rdi callq 0x680bc movq %rbp, %rdi movq %r13, %rsi callq 0x6e174 addq $0x60, %rbp addq $0x60, %r13 addq $-0x60, %r12 jmp 0x6e114 subq (%rsp), %rbx addq (%r14), %r12 negq %r12 movq %r12, %rax cqto pushq $0x60 popq %rcx idivq %rcx subq %r15, %rax movq %r14, %rdi movq %rax, %rsi callq 0x6e19e addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz short loc_6E161 mov r14, rdi sub rdx, rbx push 60h ; '`' pop rcx mov rax, rdx cqo idiv rcx mov r15, rax mov rax, [rdi] mov [rsp+38h+var_38], rax imul r13, r15, 60h ; '`' add r13, rbx mov r12, r13 neg r12 mov rbp, rbx loc_6E114: cmp r13, [r14+8] jz short loc_6E13B mov rdi, rbp call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair() mov rdi, rbp mov rsi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add rbp, 60h ; '`' add r13, 60h ; '`' add r12, 0FFFFFFFFFFFFFFA0h jmp short loc_6E114 loc_6E13B: sub rbx, [rsp+38h+var_38] add r12, [r14] neg r12 mov rax, r12 cqo push 60h ; '`' pop rcx idiv rcx sub rax, r15 mov rdi, r14 mov rsi, rax call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add rbx, [r14] loc_6E161: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r15 long long v5; // r13 long long v6; // r12 long long v7; // rbp long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = (a3 - a2) / 96; v9 = *a1; v5 = a2 + 96 * v4; v6 = -v5; v7 = a2; while ( v5 != a1[1] ) { std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( v7, v5); v7 += 96LL; v5 += 96LL; v6 -= 96LL; } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, -(*a1 + v6) / 96 - v4, -(*a1 + v6) % 96); return *a1 + a2 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x0016e161 MOV R14,RDI SUB RDX,RBX PUSH 0x60 POP RCX MOV RAX,RDX CQO IDIV RCX MOV R15,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX IMUL R13,R15,0x60 ADD R13,RBX MOV R12,R13 NEG R12 MOV RBP,RBX LAB_0016e114: CMP R13,qword ptr [R14 + 0x8] JZ 0x0016e13b MOV RDI,RBP CALL 0x001680bc MOV RDI,RBP MOV RSI,R13 CALL 0x0016e174 ADD RBP,0x60 ADD R13,0x60 ADD R12,-0x60 JMP 0x0016e114 LAB_0016e13b: SUB RBX,qword ptr [RSP] ADD R12,qword ptr [R14] NEG R12 MOV RAX,R12 CQO PUSH 0x60 POP RCX IDIV RCX SUB RAX,R15 MOV RDI,R14 MOV RSI,RAX CALL 0x0016e19e ADD RBX,qword ptr [R14] LAB_0016e161: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_2, pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_3) { long lVar1; long lVar2; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *this_00; long lVar3; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *ppVar4; if (param_2 != param_3) { lVar2 = ((long)param_3 - (long)param_2) / 0x60; lVar1 = *(long *)this; ppVar4 = param_2 + lVar2 * 0x60; lVar3 = -(long)ppVar4; this_00 = param_2; for (; ppVar4 != *(pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> **)(this + 8); ppVar4 = ppVar4 + 0x60) { std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::~pair(this_00); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair(this_00,ppVar4); this_00 = this_00 + 0x60; lVar3 = lVar3 + -0x60; } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,-(lVar3 + *(long *)this) / 0x60 - lVar2); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
37,157
google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Pointers() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
U* Begin() const { int begin = BeginOffset<U>(), end = EndOffset<U>(); if (begin == end) return nullptr; return reinterpret_cast<U*>(data() + begin); }
O3
cpp
google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Pointers() const: movslq (%rsi), %rcx leaq 0x38(%rsi), %rdx xorl %eax, %eax cmpl $0x38, %ecx cmoveq %rax, %rdx movq %rdx, (%rdi) movslq 0x4(%rsi), %rdx movq %rcx, %r8 addq %rsi, %r8 cmpl %edx, %ecx cmoveq %rax, %r8 movq %r8, 0x8(%rdi) movslq 0x8(%rsi), %rcx movq %rdx, %r8 addq %rsi, %r8 cmpl %ecx, %edx cmoveq %rax, %r8 movq %r8, 0x10(%rdi) movslq 0xc(%rsi), %rdx movq %rcx, %r8 addq %rsi, %r8 cmpl %edx, %ecx cmoveq %rax, %r8 movq %r8, 0x18(%rdi) movslq 0x10(%rsi), %rcx movq %rdx, %r8 addq %rsi, %r8 cmpl %ecx, %edx cmoveq %rax, %r8 movq %r8, 0x20(%rdi) movslq 0x14(%rsi), %rdx movq %rcx, %r8 addq %rsi, %r8 cmpl %edx, %ecx cmoveq %rax, %r8 movq %r8, 0x28(%rdi) movslq 0x18(%rsi), %rcx movq %rdx, %r8 addq %rsi, %r8 cmpl %ecx, %edx cmoveq %rax, %r8 movq %r8, 0x30(%rdi) movslq 0x1c(%rsi), %rdx movq %rcx, %r8 addq %rsi, %r8 cmpl %edx, %ecx cmoveq %rax, %r8 movq %r8, 0x38(%rdi) movslq 0x20(%rsi), %rcx movq %rdx, %r8 addq %rsi, %r8 cmpl %ecx, %edx cmoveq %rax, %r8 movq %r8, 0x40(%rdi) movslq 0x24(%rsi), %rdx movq %rcx, %r8 addq %rsi, %r8 cmpl %edx, %ecx cmoveq %rax, %r8 movq %r8, 0x48(%rdi) movslq 0x28(%rsi), %rcx movq %rdx, %r8 addq %rsi, %r8 cmpl %ecx, %edx cmoveq %rax, %r8 movq %r8, 0x50(%rdi) movslq 0x2c(%rsi), %rdx movq %rcx, %r8 addq %rsi, %r8 cmpl %edx, %ecx cmoveq %rax, %r8 movq %r8, 0x58(%rdi) movq %rdx, %rcx addq %rsi, %rcx cmpl 0x30(%rsi), %edx cmoveq %rax, %rcx movq %rcx, 0x60(%rdi) retq nop
_ZNK6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE8PointersEv: movsxd rcx, dword ptr [rsi] lea rdx, [rsi+38h] xor eax, eax cmp ecx, 38h ; '8' cmovz rdx, rax mov [rdi], rdx movsxd rdx, dword ptr [rsi+4] mov r8, rcx add r8, rsi cmp ecx, edx cmovz r8, rax mov [rdi+8], r8 movsxd rcx, dword ptr [rsi+8] mov r8, rdx add r8, rsi cmp edx, ecx cmovz r8, rax mov [rdi+10h], r8 movsxd rdx, dword ptr [rsi+0Ch] mov r8, rcx add r8, rsi cmp ecx, edx cmovz r8, rax mov [rdi+18h], r8 movsxd rcx, dword ptr [rsi+10h] mov r8, rdx add r8, rsi cmp edx, ecx cmovz r8, rax mov [rdi+20h], r8 movsxd rdx, dword ptr [rsi+14h] mov r8, rcx add r8, rsi cmp ecx, edx cmovz r8, rax mov [rdi+28h], r8 movsxd rcx, dword ptr [rsi+18h] mov r8, rdx add r8, rsi cmp edx, ecx cmovz r8, rax mov [rdi+30h], r8 movsxd rdx, dword ptr [rsi+1Ch] mov r8, rcx add r8, rsi cmp ecx, edx cmovz r8, rax mov [rdi+38h], r8 movsxd rcx, dword ptr [rsi+20h] mov r8, rdx add r8, rsi cmp edx, ecx cmovz r8, rax mov [rdi+40h], r8 movsxd rdx, dword ptr [rsi+24h] mov r8, rcx add r8, rsi cmp ecx, edx cmovz r8, rax mov [rdi+48h], r8 movsxd rcx, dword ptr [rsi+28h] mov r8, rdx add r8, rsi cmp edx, ecx cmovz r8, rax mov [rdi+50h], r8 movsxd rdx, dword ptr [rsi+2Ch] mov r8, rcx add r8, rsi cmp ecx, edx cmovz r8, rax mov [rdi+58h], r8 mov rcx, rdx add rcx, rsi cmp edx, [rsi+30h] cmovz rcx, rax mov [rdi+60h], rcx retn
long long google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::Pointers( int **a1, int *a2) { long long v2; // rcx int *v3; // rdx long long result; // rax long long v5; // rdx char *v6; // r8 long long v7; // rcx char *v8; // r8 long long v9; // rdx char *v10; // r8 long long v11; // rcx char *v12; // r8 long long v13; // rdx char *v14; // r8 long long v15; // rcx char *v16; // r8 long long v17; // rdx char *v18; // r8 long long v19; // rcx char *v20; // r8 long long v21; // rdx char *v22; // r8 long long v23; // rcx char *v24; // r8 long long v25; // rdx char *v26; // r8 char *v27; // rcx v2 = *a2; v3 = a2 + 14; result = 0LL; if ( (_DWORD)v2 == 56 ) v3 = 0LL; *a1 = v3; v5 = a2[1]; v6 = (char *)a2 + v2; if ( (_DWORD)v2 == (_DWORD)v5 ) v6 = 0LL; a1[1] = (int *)v6; v7 = a2[2]; v8 = (char *)a2 + v5; if ( (_DWORD)v5 == (_DWORD)v7 ) v8 = 0LL; a1[2] = (int *)v8; v9 = a2[3]; v10 = (char *)a2 + v7; if ( (_DWORD)v7 == (_DWORD)v9 ) v10 = 0LL; a1[3] = (int *)v10; v11 = a2[4]; v12 = (char *)a2 + v9; if ( (_DWORD)v9 == (_DWORD)v11 ) v12 = 0LL; a1[4] = (int *)v12; v13 = a2[5]; v14 = (char *)a2 + v11; if ( (_DWORD)v11 == (_DWORD)v13 ) v14 = 0LL; a1[5] = (int *)v14; v15 = a2[6]; v16 = (char *)a2 + v13; if ( (_DWORD)v13 == (_DWORD)v15 ) v16 = 0LL; a1[6] = (int *)v16; v17 = a2[7]; v18 = (char *)a2 + v15; if ( (_DWORD)v15 == (_DWORD)v17 ) v18 = 0LL; a1[7] = (int *)v18; v19 = a2[8]; v20 = (char *)a2 + v17; if ( (_DWORD)v17 == (_DWORD)v19 ) v20 = 0LL; a1[8] = (int *)v20; v21 = a2[9]; v22 = (char *)a2 + v19; if ( (_DWORD)v19 == (_DWORD)v21 ) v22 = 0LL; a1[9] = (int *)v22; v23 = a2[10]; v24 = (char *)a2 + v21; if ( (_DWORD)v21 == (_DWORD)v23 ) v24 = 0LL; a1[10] = (int *)v24; v25 = a2[11]; v26 = (char *)a2 + v23; if ( (_DWORD)v23 == (_DWORD)v25 ) v26 = 0LL; a1[11] = (int *)v26; v27 = (char *)a2 + v25; if ( (_DWORD)v25 == a2[12] ) v27 = 0LL; a1[12] = (int *)v27; return result; }
Pointers: MOVSXD RCX,dword ptr [RSI] LEA RDX,[RSI + 0x38] XOR EAX,EAX CMP ECX,0x38 CMOVZ RDX,RAX MOV qword ptr [RDI],RDX MOVSXD RDX,dword ptr [RSI + 0x4] MOV R8,RCX ADD R8,RSI CMP ECX,EDX CMOVZ R8,RAX MOV qword ptr [RDI + 0x8],R8 MOVSXD RCX,dword ptr [RSI + 0x8] MOV R8,RDX ADD R8,RSI CMP EDX,ECX CMOVZ R8,RAX MOV qword ptr [RDI + 0x10],R8 MOVSXD RDX,dword ptr [RSI + 0xc] MOV R8,RCX ADD R8,RSI CMP ECX,EDX CMOVZ R8,RAX MOV qword ptr [RDI + 0x18],R8 MOVSXD RCX,dword ptr [RSI + 0x10] MOV R8,RDX ADD R8,RSI CMP EDX,ECX CMOVZ R8,RAX MOV qword ptr [RDI + 0x20],R8 MOVSXD RDX,dword ptr [RSI + 0x14] MOV R8,RCX ADD R8,RSI CMP ECX,EDX CMOVZ R8,RAX MOV qword ptr [RDI + 0x28],R8 MOVSXD RCX,dword ptr [RSI + 0x18] MOV R8,RDX ADD R8,RSI CMP EDX,ECX CMOVZ R8,RAX MOV qword ptr [RDI + 0x30],R8 MOVSXD RDX,dword ptr [RSI + 0x1c] MOV R8,RCX ADD R8,RSI CMP ECX,EDX CMOVZ R8,RAX MOV qword ptr [RDI + 0x38],R8 MOVSXD RCX,dword ptr [RSI + 0x20] MOV R8,RDX ADD R8,RSI CMP EDX,ECX CMOVZ R8,RAX MOV qword ptr [RDI + 0x40],R8 MOVSXD RDX,dword ptr [RSI + 0x24] MOV R8,RCX ADD R8,RSI CMP ECX,EDX CMOVZ R8,RAX MOV qword ptr [RDI + 0x48],R8 MOVSXD RCX,dword ptr [RSI + 0x28] MOV R8,RDX ADD R8,RSI CMP EDX,ECX CMOVZ R8,RAX MOV qword ptr [RDI + 0x50],R8 MOVSXD RDX,dword ptr [RSI + 0x2c] MOV R8,RCX ADD R8,RSI CMP ECX,EDX CMOVZ R8,RAX MOV qword ptr [RDI + 0x58],R8 MOV RCX,RDX ADD RCX,RSI CMP EDX,dword ptr [RSI + 0x30] CMOVZ RCX,RAX MOV qword ptr [RDI + 0x60],RCX RET
/* google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__cxx11::string, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>::Pointers() const */ void google::protobuf::(anonymous_namespace):: FlatAllocation<char,std::__cxx11::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> ::Pointers(void) { int iVar1; int iVar2; int *piVar3; int *piVar4; int *in_RSI; long *in_RDI; iVar1 = *in_RSI; piVar3 = (int *)0x0; piVar4 = in_RSI + 0xe; if (iVar1 == 0x38) { piVar4 = piVar3; } *in_RDI = (long)piVar4; iVar2 = in_RSI[1]; piVar4 = (int *)((long)iVar1 + (long)in_RSI); if (iVar1 == iVar2) { piVar4 = piVar3; } in_RDI[1] = (long)piVar4; iVar1 = in_RSI[2]; piVar4 = (int *)((long)iVar2 + (long)in_RSI); if (iVar2 == iVar1) { piVar4 = piVar3; } in_RDI[2] = (long)piVar4; iVar2 = in_RSI[3]; piVar4 = (int *)((long)iVar1 + (long)in_RSI); if (iVar1 == iVar2) { piVar4 = piVar3; } in_RDI[3] = (long)piVar4; iVar1 = in_RSI[4]; piVar4 = (int *)((long)iVar2 + (long)in_RSI); if (iVar2 == iVar1) { piVar4 = piVar3; } in_RDI[4] = (long)piVar4; iVar2 = in_RSI[5]; piVar4 = (int *)((long)iVar1 + (long)in_RSI); if (iVar1 == iVar2) { piVar4 = piVar3; } in_RDI[5] = (long)piVar4; iVar1 = in_RSI[6]; piVar4 = (int *)((long)iVar2 + (long)in_RSI); if (iVar2 == iVar1) { piVar4 = piVar3; } in_RDI[6] = (long)piVar4; iVar2 = in_RSI[7]; piVar4 = (int *)((long)iVar1 + (long)in_RSI); if (iVar1 == iVar2) { piVar4 = piVar3; } in_RDI[7] = (long)piVar4; iVar1 = in_RSI[8]; piVar4 = (int *)((long)iVar2 + (long)in_RSI); if (iVar2 == iVar1) { piVar4 = piVar3; } in_RDI[8] = (long)piVar4; iVar2 = in_RSI[9]; piVar4 = (int *)((long)iVar1 + (long)in_RSI); if (iVar1 == iVar2) { piVar4 = piVar3; } in_RDI[9] = (long)piVar4; iVar1 = in_RSI[10]; piVar4 = (int *)((long)iVar2 + (long)in_RSI); if (iVar2 == iVar1) { piVar4 = piVar3; } in_RDI[10] = (long)piVar4; iVar2 = in_RSI[0xb]; piVar4 = (int *)((long)iVar1 + (long)in_RSI); if (iVar1 == iVar2) { piVar4 = piVar3; } in_RDI[0xb] = (long)piVar4; piVar4 = (int *)((long)iVar2 + (long)in_RSI); if (iVar2 == in_RSI[0xc]) { piVar4 = piVar3; } in_RDI[0xc] = (long)piVar4; return; }
37,158
LefDefParser::lefiMaxStackVia::print(_IO_FILE*) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
void lefiMaxStackVia::print(FILE *f) const { fprintf(f, "MAXVIASTACK %d", maxStackVia()); if (hasMaxStackViaRange()) fprintf(f, " RANGE %s %s", maxStackViaBottomLayer(), maxStackViaTopLayer()); fprintf(f, "\n"); }
O3
cpp
LefDefParser::lefiMaxStackVia::print(_IO_FILE*) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl (%rdi), %edx leaq 0x4c5f1(%rip), %rsi # 0x5a3c6 movq %rbx, %rdi xorl %eax, %eax callq 0x22e0 cmpl $0x0, 0x4(%r14) je 0xddff movq 0x8(%r14), %rdx movq 0x10(%r14), %rcx leaq 0x4c5e0(%rip), %rsi # 0x5a3d5 movq %rbx, %rdi xorl %eax, %eax callq 0x22e0 movl $0xa, %edi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2290 nop
_ZNK12LefDefParser15lefiMaxStackVia5printEP8_IO_FILE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov edx, [rdi] lea rsi, aMaxviastackD_0; "MAXVIASTACK %d" mov rdi, rbx xor eax, eax call _fprintf cmp dword ptr [r14+4], 0 jz short loc_DDFF mov rdx, [r14+8] mov rcx, [r14+10h] lea rsi, aRangeSS_0; " RANGE %s %s" mov rdi, rbx xor eax, eax call _fprintf loc_DDFF: mov edi, 0Ah mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp _fputc
long long LefDefParser::lefiMaxStackVia::print(long long a1, long long a2) { fprintf(a2, "MAXVIASTACK %d", *(_DWORD *)a1); if ( *(_DWORD *)(a1 + 4) ) fprintf(a2, " RANGE %s %s", *(const char **)(a1 + 8), *(const char **)(a1 + 16)); return fputc(10LL, a2); }
print: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV EDX,dword ptr [RDI] LEA RSI,[0x15a3c6] MOV RDI,RBX XOR EAX,EAX CALL 0x001022e0 CMP dword ptr [R14 + 0x4],0x0 JZ 0x0010ddff MOV RDX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] LEA RSI,[0x15a3d5] MOV RDI,RBX XOR EAX,EAX CALL 0x001022e0 LAB_0010ddff: MOV EDI,0xa MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00102290
/* LefDefParser::lefiMaxStackVia::print(_IO_FILE*) const */ void __thiscall LefDefParser::lefiMaxStackVia::print(lefiMaxStackVia *this,_IO_FILE *param_1) { fprintf(param_1,"MAXVIASTACK %d",(ulong)*(uint *)this); if (*(int *)(this + 4) != 0) { fprintf(param_1," RANGE %s %s",*(int8 *)(this + 8),*(int8 *)(this + 0x10)); } fputc(10,param_1); return; }
37,159
JS_ToInt64Clamp
bluesky950520[P]quickjs/quickjs.c
int JS_ToInt64Clamp(JSContext *ctx, int64_t *pres, JSValue val, int64_t min, int64_t max, int64_t neg_offset) { int res = JS_ToInt64SatFree(ctx, pres, js_dup(val)); if (res == 0) { if (*pres < 0) *pres += neg_offset; if (*pres < min) *pres = min; else if (*pres > max) *pres = max; } return res; }
O1
c
JS_ToInt64Clamp: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %r9, %r15 movq %r8, %rbx movq %rsi, %r14 movq %rdx, 0x8(%rsp) cmpl $-0x9, %ecx jb 0x2787b movq 0x8(%rsp), %rax incl (%rax) movq %r14, %rsi callq 0x277bc testl %eax, %eax jne 0x278aa movq (%r14), %rcx testq %rcx, %rcx jns 0x27897 addq 0x30(%rsp), %rcx movq %rcx, (%r14) movq (%r14), %rcx cmpq %rbx, %rcx jl 0x278a7 movq %r15, %rbx cmpq %r15, %rcx jle 0x278aa movq %rbx, (%r14) addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
JS_ToInt64Clamp: push r15 push r14 push rbx sub rsp, 10h mov r15, r9 mov rbx, r8 mov r14, rsi mov [rsp+28h+var_20], rdx cmp ecx, 0FFFFFFF7h jb short loc_2787B mov rax, [rsp+28h+var_20] inc dword ptr [rax] loc_2787B: mov rsi, r14 call JS_ToInt64SatFree test eax, eax jnz short loc_278AA mov rcx, [r14] test rcx, rcx jns short loc_27897 add rcx, [rsp+28h+arg_0] mov [r14], rcx loc_27897: mov rcx, [r14] cmp rcx, rbx jl short loc_278A7 mov rbx, r15 cmp rcx, r15 jle short loc_278AA loc_278A7: mov [r14], rbx loc_278AA: add rsp, 10h pop rbx pop r14 pop r15 retn
long long JS_ToInt64Clamp( long long a1, unsigned long long *a2, _DWORD *a3, long long a4, signed long long a5, signed long long a6, long long a7) { long long result; // rax if ( (unsigned int)a4 >= 0xFFFFFFF7 ) ++*a3; result = JS_ToInt64SatFree(a1, a2, (long long)a3, a4); if ( !(_DWORD)result ) { if ( (*a2 & 0x8000000000000000LL) != 0LL ) *a2 += a7; if ( (long long)*a2 < a5 || (a5 = a6, (long long)*a2 > a6) ) *a2 = a5; } return result; }
37,160
JS_ToInt64Clamp
bluesky950520[P]quickjs/quickjs.c
int JS_ToInt64Clamp(JSContext *ctx, int64_t *pres, JSValue val, int64_t min, int64_t max, int64_t neg_offset) { int res = JS_ToInt64SatFree(ctx, pres, js_dup(val)); if (res == 0) { if (*pres < 0) *pres += neg_offset; if (*pres < min) *pres = min; else if (*pres > max) *pres = max; } return res; }
O2
c
JS_ToInt64Clamp: pushq %r15 pushq %r14 pushq %rbx movq %r9, %r15 movq %r8, %rbx movq %rsi, %r14 cmpl $-0x9, %ecx jb 0x214cc incl (%rdx) movq %r14, %rsi callq 0x2141f testl %eax, %eax jne 0x214f8 movq (%r14), %rcx testq %rcx, %rcx jns 0x214e8 addq 0x20(%rsp), %rcx movq %rcx, (%r14) cmpq %rbx, %rcx jl 0x214f5 movq %r15, %rbx cmpq %r15, %rcx jle 0x214f8 movq %rbx, (%r14) popq %rbx popq %r14 popq %r15 retq
JS_ToInt64Clamp: push r15 push r14 push rbx mov r15, r9 mov rbx, r8 mov r14, rsi cmp ecx, 0FFFFFFF7h jb short loc_214CC inc dword ptr [rdx] loc_214CC: mov rsi, r14 call JS_ToInt64SatFree test eax, eax jnz short loc_214F8 mov rcx, [r14] test rcx, rcx jns short loc_214E8 add rcx, [rsp+18h+arg_0] mov [r14], rcx loc_214E8: cmp rcx, rbx jl short loc_214F5 mov rbx, r15 cmp rcx, r15 jle short loc_214F8 loc_214F5: mov [r14], rbx loc_214F8: pop rbx pop r14 pop r15 retn
long long JS_ToInt64Clamp( long long a1, unsigned long long *a2, _DWORD *a3, long long a4, signed long long a5, signed long long a6, long long a7) { long long result; // rax signed long long v10; // rcx if ( (unsigned int)a4 >= 0xFFFFFFF7 ) ++*a3; result = JS_ToInt64SatFree(a1, a2, (long long)a3, a4); if ( !(_DWORD)result ) { v10 = *a2; if ( (*a2 & 0x8000000000000000LL) != 0LL ) { v10 += a7; *a2 = v10; } if ( v10 < a5 || (a5 = a6, v10 > a6) ) *a2 = a5; } return result; }
JS_ToInt64Clamp: PUSH R15 PUSH R14 PUSH RBX MOV R15,R9 MOV RBX,R8 MOV R14,RSI CMP ECX,-0x9 JC 0x001214cc INC dword ptr [RDX] LAB_001214cc: MOV RSI,R14 CALL 0x0012141f TEST EAX,EAX JNZ 0x001214f8 MOV RCX,qword ptr [R14] TEST RCX,RCX JNS 0x001214e8 ADD RCX,qword ptr [RSP + 0x20] MOV qword ptr [R14],RCX LAB_001214e8: CMP RCX,RBX JL 0x001214f5 MOV RBX,R15 CMP RCX,R15 JLE 0x001214f8 LAB_001214f5: MOV qword ptr [R14],RBX LAB_001214f8: POP RBX POP R14 POP R15 RET
void JS_ToInt64Clamp(int8 param_1,long *param_2,int *param_3,uint param_4,long param_5, long param_6,long param_7) { int iVar1; long lVar2; if (0xfffffff6 < param_4) { *param_3 = *param_3 + 1; } iVar1 = JS_ToInt64SatFree(param_1,param_2); if (iVar1 == 0) { lVar2 = *param_2; if (lVar2 < 0) { lVar2 = lVar2 + param_7; *param_2 = lVar2; } if ((lVar2 < param_5) || (param_5 = param_6, param_6 < lVar2)) { *param_2 = param_5; } } return; }
37,161
std::shared_ptr<entry_point_item> block::get_item<entry_point_item>()
msxemulator/build_O0/_deps/picotool-src/bintool/metadata.h
std::shared_ptr<I> get_item() { I tmp = I(); uint8_t type = tmp.type(); auto it = std::find_if(items.begin(), items.end(), [type](std::shared_ptr<item> i) { return i->type() == type; }); if (it != std::end(items)) { return std::dynamic_pointer_cast<I>(*it); } else { return nullptr; } }
O0
c
std::shared_ptr<entry_point_item> block::get_item<entry_point_item>(): subq $0xd8, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0xd0(%rsp) movq %rsi, 0xc8(%rsp) movq 0xc8(%rsp), %rax movq %rax, 0x28(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0xb0(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) leaq 0x80(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x95800 movq 0x30(%rsp), %rdi callq 0x95850 movb %al, 0x3b(%rsp) jmp 0x8e6f6 movq 0x28(%rsp), %rdi movb 0x3b(%rsp), %al movb %al, 0x7f(%rsp) addq $0x10, %rdi movq %rdi, 0x8(%rsp) callq 0x5f7a0 movq 0x8(%rsp), %rdi movq %rax, 0x58(%rsp) callq 0x5f7d0 movq %rax, 0x50(%rsp) movb 0x7f(%rsp), %al movb %al, 0x4f(%rsp) movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi movzbl 0x4f(%rsp), %edx callq 0x95860 movq %rax, 0x10(%rsp) jmp 0x8e748 movq 0x28(%rsp), %rdi movq 0x10(%rsp), %rax movq %rax, 0x60(%rsp) addq $0x10, %rdi callq 0x8e940 movq %rax, 0x40(%rsp) leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x8e900 testb $0x1, %al jne 0x8e77a jmp 0x8e7b8 leaq 0x60(%rsp), %rdi callq 0x8ea10 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x958d0 movl $0x1, 0x3c(%rsp) jmp 0x8e7ce movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x80(%rsp), %rdi callq 0x95990 jmp 0x8e7e8 movq 0x18(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x95970 movl $0x1, 0x3c(%rsp) leaq 0x80(%rsp), %rdi callq 0x95990 movq 0x20(%rsp), %rax addq $0xd8, %rsp retq movq 0x70(%rsp), %rdi callq 0xf9e0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5block8get_itemI14signature_itemEESt10shared_ptrIT_Ev: sub rsp, 0D8h mov [rsp+0D8h+var_C0], rdi mov rax, rdi mov [rsp+0D8h+var_B8], rax mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_10], rsi mov rax, [rsp+0D8h+var_10] mov [rsp+0D8h+var_B0], rax xorps xmm0, xmm0 movaps [rsp+0D8h+var_28], xmm0 movaps [rsp+0D8h+var_38], xmm0 movaps [rsp+0D8h+var_48], xmm0 movaps [rsp+0D8h+var_58], xmm0 lea rdi, [rsp+0D8h+var_58]; this mov [rsp+0D8h+var_A8], rdi call _ZN14signature_itemC2Ev; signature_item::signature_item(void) mov rdi, [rsp+0D8h+var_A8]; this call _ZNK14signature_item4typeEv; signature_item::type(void) mov [rsp+0D8h+var_9D], al jmp short $+2 loc_8E6F6: mov rdi, [rsp+0D8h+var_B0] mov al, [rsp+0D8h+var_9D] mov [rsp+0D8h+var_59], al add rdi, 10h mov [rsp+0D8h+var_D0], rdi call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EE5beginEv; std::vector<std::shared_ptr<item>>::begin(void) mov rdi, [rsp+0D8h+var_D0] mov [rsp+0D8h+var_80], rax call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EE3endEv; std::vector<std::shared_ptr<item>>::end(void) mov [rsp+0D8h+var_88], rax mov al, [rsp+0D8h+var_59] mov [rsp+0D8h+var_89], al mov rdi, [rsp+0D8h+var_80] mov rsi, [rsp+0D8h+var_88] movzx edx, [rsp+0D8h+var_89] call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI4itemESt6vectorIS4_SaIS4_EEEEZN5block8get_itemI14signature_itemEES2_IT_EvEUlS4_E_ESD_SD_SD_T0_; std::find_if<__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>,block::get_item<signature_item>(void)::{lambda(std::shared_ptr<item>)#1}>(signature_item,signature_item,block::get_item<signature_item>(void)::{lambda(std::shared_ptr<item>)#1}) mov [rsp+0D8h+var_C8], rax jmp short $+2 loc_8E748: mov rdi, [rsp+0D8h+var_B0] mov rax, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_78], rax add rdi, 10h call _ZSt3endISt6vectorISt10shared_ptrI4itemESaIS3_EEEDTcldtfp_3endEERT_ mov [rsp+0D8h+var_98], rax lea rdi, [rsp+0D8h+var_78] lea rsi, [rsp+0D8h+var_98] call _ZN9__gnu_cxxneIPSt10shared_ptrI4itemESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>> const&) test al, 1 jnz short loc_8E77A jmp short loc_8E7B8 loc_8E77A: lea rdi, [rsp+0D8h+var_78] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI4itemESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>::operator*(void) mov rdi, [rsp+0D8h+var_C0] mov rsi, rax call _ZSt20dynamic_pointer_castI14signature_item4itemESt10shared_ptrIT_ERKS2_IT0_E; std::dynamic_pointer_cast<signature_item,item>(std::shared_ptr const&<item>) mov [rsp+0D8h+var_9C], 1 jmp short loc_8E7CE mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_78]; this call _ZN14signature_itemD2Ev; signature_item::~signature_item() jmp short loc_8E7E8 loc_8E7B8: mov rdi, [rsp+0D8h+var_C0] xor eax, eax mov esi, eax call _ZNSt10shared_ptrI14signature_itemEC2EDn; std::shared_ptr<signature_item>::shared_ptr(decltype(nullptr)) mov [rsp+0D8h+var_9C], 1 loc_8E7CE: lea rdi, [rsp+0D8h+var_58]; this call _ZN14signature_itemD2Ev; signature_item::~signature_item() mov rax, [rsp+0D8h+var_B8] add rsp, 0D8h retn loc_8E7E8: mov rdi, [rsp+arg_68] call __Unwind_Resume
long long block::get_item<signature_item>(long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+40h] [rbp-98h] BYREF unsigned __int8 v5; // [rsp+4Fh] [rbp-89h] long long v6; // [rsp+50h] [rbp-88h] long long v7; // [rsp+58h] [rbp-80h] _QWORD v8[3]; // [rsp+60h] [rbp-78h] BYREF unsigned __int8 v9; // [rsp+7Fh] [rbp-59h] _OWORD v10[4]; // [rsp+80h] [rbp-58h] BYREF long long v11; // [rsp+C8h] [rbp-10h] long long v12; // [rsp+D0h] [rbp-8h] v12 = a1; v11 = a2; memset(v10, 0, sizeof(v10)); signature_item::signature_item((signature_item *)v10); v9 = signature_item::type((signature_item *)v10); v7 = std::vector<std::shared_ptr<item>>::begin(a2 + 16); v6 = std::vector<std::shared_ptr<item>>::end(a2 + 16); v5 = v9; v8[0] = std::find_if<__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>,std::shared_ptr<signature_item> block::get_item<signature_item>(void)::{lambda(std::shared_ptr<item>)#1}>( v7, v6, v9); v4 = std::end<std::vector<std::shared_ptr<item>>>(a2 + 16); if ( (__gnu_cxx::operator!=<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>(v8, &v4) & 1) != 0 ) { v2 = __gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>::operator*(v8); std::dynamic_pointer_cast<signature_item,item>(a1, v2); } else { std::shared_ptr<signature_item>::shared_ptr(a1, 0LL); } signature_item::~signature_item((signature_item *)v10); return a1; }
get_item<signature_item>: SUB RSP,0xd8 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0xd0],RDI MOV qword ptr [RSP + 0xc8],RSI MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x28],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xb0],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 LEA RDI,[RSP + 0x80] MOV qword ptr [RSP + 0x30],RDI CALL 0x00195800 MOV RDI,qword ptr [RSP + 0x30] LAB_0018e6eb: CALL 0x00195850 MOV byte ptr [RSP + 0x3b],AL JMP 0x0018e6f6 LAB_0018e6f6: MOV RDI,qword ptr [RSP + 0x28] MOV AL,byte ptr [RSP + 0x3b] MOV byte ptr [RSP + 0x7f],AL ADD RDI,0x10 MOV qword ptr [RSP + 0x8],RDI CALL 0x0015f7a0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x58],RAX CALL 0x0015f7d0 MOV qword ptr [RSP + 0x50],RAX MOV AL,byte ptr [RSP + 0x7f] MOV byte ptr [RSP + 0x4f],AL MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x50] MOVZX EDX,byte ptr [RSP + 0x4f] CALL 0x00195860 LAB_0018e741: MOV qword ptr [RSP + 0x10],RAX JMP 0x0018e748 LAB_0018e748: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x60],RAX ADD RDI,0x10 CALL 0x0018e940 MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x40] CALL 0x0018e900 TEST AL,0x1 JNZ 0x0018e77a JMP 0x0018e7b8 LAB_0018e77a: LEA RDI,[RSP + 0x60] CALL 0x0018ea10 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX CALL 0x001958d0 MOV dword ptr [RSP + 0x3c],0x1 JMP 0x0018e7ce LAB_0018e7b8: MOV RDI,qword ptr [RSP + 0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x00195970 MOV dword ptr [RSP + 0x3c],0x1 LAB_0018e7ce: LEA RDI,[RSP + 0x80] CALL 0x00195990 MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0xd8 RET
/* std::shared_ptr<signature_item> block::get_item<signature_item>() */ shared_ptr * block::get_item<signature_item>(void) { bool bVar1; long in_RSI; shared_ptr *in_RDI; int8 local_98; int1 local_89; int8 local_88; int8 local_80; int8 local_78 [3]; int1 local_59; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; local_28 = 0; uStack_20 = 0; local_38 = 0; uStack_30 = 0; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; signature_item::signature_item((signature_item *)&local_58); /* try { // try from 0018e6eb to 0018e740 has its CatchHandler @ 0018e79b */ local_59 = signature_item::type(); local_80 = std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>::begin ((vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>> *) (in_RSI + 0x10)); local_88 = std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>::end ((vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>> *) (in_RSI + 0x10)); local_89 = local_59; local_78[0] = std:: find_if<__gnu_cxx::__normal_iterator<std::shared_ptr<item>*,std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>>,block::get_item<signature_item>()::_lambda(std::shared_ptr<item>)_1_> (local_80,local_88,local_59); local_98 = std::end<std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>> ((vector *)(in_RSI + 0x10)); bVar1 = __gnu_cxx::operator!=((__normal_iterator *)local_78,(__normal_iterator *)&local_98); if (bVar1) { __gnu_cxx:: __normal_iterator<std::shared_ptr<item>*,std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>> ::operator*((__normal_iterator<std::shared_ptr<item>*,std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>> *)local_78); std::dynamic_pointer_cast<signature_item,item>(in_RDI); } else { std::shared_ptr<signature_item>::shared_ptr((_func_decltype_nullptr *)in_RDI); } signature_item::~signature_item((signature_item *)&local_58); return in_RDI; }
37,162
bitmap_bits_set
eloqsql/mysys/my_bitmap.c
uint bitmap_bits_set(const MY_BITMAP *map) { my_bitmap_map *data_ptr= map->bitmap; my_bitmap_map *end= map->last_word_ptr; uint res= 0; DBUG_ASSERT(map->bitmap); for (; data_ptr < end; data_ptr++) res+= my_count_bits_uint32(*data_ptr); /*Reset last bits to zero*/ res+= my_count_bits_uint32(*map->last_word_ptr & ~map->last_word_mask); return res; }
O3
c
bitmap_bits_set: pushq %rbp movq %rsp, %rbp movq (%rdi), %rdx movq 0x8(%rdi), %rax xorl %ecx, %ecx cmpq %rax, %rdx jae 0xa5180 xorl %ecx, %ecx movl $0x33333333, %esi # imm = 0x33333333 movl (%rdx), %r8d movl %r8d, %r9d shrl %r9d andl $0x55555555, %r9d # imm = 0x55555555 subl %r9d, %r8d movl %r8d, %r9d andl %esi, %r9d shrl $0x2, %r8d andl %esi, %r8d addl %r9d, %r8d movl %r8d, %r9d shrl $0x4, %r9d addl %r8d, %r9d andl $0xf0f0f0f, %r9d # imm = 0xF0F0F0F imull $0x1010101, %r9d, %r8d # imm = 0x1010101 shrl $0x18, %r8d addl %r8d, %ecx addq $0x4, %rdx cmpq %rax, %rdx jb 0xa5135 movl 0x18(%rdi), %edx notl %edx andl (%rax), %edx movl %edx, %eax shrl %eax andl $0x55555555, %eax # imm = 0x55555555 subl %eax, %edx movl $0x33333333, %eax # imm = 0x33333333 movl %edx, %esi andl %eax, %esi shrl $0x2, %edx andl %eax, %edx addl %esi, %edx movl %edx, %eax shrl $0x4, %eax addl %edx, %eax andl $0xf0f0f0f, %eax # imm = 0xF0F0F0F imull $0x1010101, %eax, %eax # imm = 0x1010101 shrl $0x18, %eax addl %ecx, %eax popq %rbp retq
bitmap_bits_set: push rbp mov rbp, rsp mov rdx, [rdi] mov rax, [rdi+8] xor ecx, ecx cmp rdx, rax jnb short loc_A5180 xor ecx, ecx mov esi, 33333333h loc_A5135: mov r8d, [rdx] mov r9d, r8d shr r9d, 1 and r9d, 55555555h sub r8d, r9d mov r9d, r8d and r9d, esi shr r8d, 2 and r8d, esi add r8d, r9d mov r9d, r8d shr r9d, 4 add r9d, r8d and r9d, 0F0F0F0Fh imul r8d, r9d, 1010101h shr r8d, 18h add ecx, r8d add rdx, 4 cmp rdx, rax jb short loc_A5135 loc_A5180: mov edx, [rdi+18h] not edx and edx, [rax] mov eax, edx shr eax, 1 and eax, 55555555h sub edx, eax mov eax, 33333333h mov esi, edx and esi, eax shr edx, 2 and edx, eax add edx, esi mov eax, edx shr eax, 4 add eax, edx and eax, 0F0F0F0Fh imul eax, 1010101h shr eax, 18h add eax, ecx pop rbp retn
long long bitmap_bits_set(long long a1) { _DWORD *v1; // rdx _DWORD *v2; // rax int v3; // ecx unsigned int v4; // edx v1 = *(_DWORD **)a1; v2 = *(_DWORD **)(a1 + 8); v3 = 0; if ( *(_QWORD *)a1 < (unsigned long long)v2 ) { v3 = 0; do { v3 += (16843009 * ((((*v1 - ((*v1 >> 1) & 0x55555555)) & 0x33333333) + (((*v1 - ((*v1 >> 1) & 0x55555555u)) >> 2) & 0x33333333) + ((((*v1 - ((*v1 >> 1) & 0x55555555)) & 0x33333333) + (((*v1 - ((*v1 >> 1) & 0x55555555u)) >> 2) & 0x33333333)) >> 4)) & 0xF0F0F0F)) >> 24; ++v1; } while ( v1 < v2 ); } v4 = (*v2 & ~*(_DWORD *)(a1 + 24)) - (((*v2 & (unsigned int)~*(_DWORD *)(a1 + 24)) >> 1) & 0x55555555); return v3 + ((16843009 * (((v4 & 0x33333333) + ((v4 >> 2) & 0x33333333) + (((v4 & 0x33333333) + ((v4 >> 2) & 0x33333333)) >> 4)) & 0xF0F0F0F)) >> 24); }
bitmap_bits_set: PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] XOR ECX,ECX CMP RDX,RAX JNC 0x001a5180 XOR ECX,ECX MOV ESI,0x33333333 LAB_001a5135: MOV R8D,dword ptr [RDX] MOV R9D,R8D SHR R9D,0x1 AND R9D,0x55555555 SUB R8D,R9D MOV R9D,R8D AND R9D,ESI SHR R8D,0x2 AND R8D,ESI ADD R8D,R9D MOV R9D,R8D SHR R9D,0x4 ADD R9D,R8D AND R9D,0xf0f0f0f IMUL R8D,R9D,0x1010101 SHR R8D,0x18 ADD ECX,R8D ADD RDX,0x4 CMP RDX,RAX JC 0x001a5135 LAB_001a5180: MOV EDX,dword ptr [RDI + 0x18] NOT EDX AND EDX,dword ptr [RAX] MOV EAX,EDX SHR EAX,0x1 AND EAX,0x55555555 SUB EDX,EAX MOV EAX,0x33333333 MOV ESI,EDX AND ESI,EAX SHR EDX,0x2 AND EDX,EAX ADD EDX,ESI MOV EAX,EDX SHR EAX,0x4 ADD EAX,EDX AND EAX,0xf0f0f0f IMUL EAX,EAX,0x1010101 SHR EAX,0x18 ADD EAX,ECX POP RBP RET
int bitmap_bits_set(int8 *param_1) { uint *puVar1; int iVar2; uint *puVar3; uint uVar4; puVar3 = (uint *)*param_1; puVar1 = (uint *)param_1[1]; iVar2 = 0; if (puVar3 < puVar1) { iVar2 = 0; do { uVar4 = *puVar3 - (*puVar3 >> 1 & 0x55555555); uVar4 = (uVar4 >> 2 & 0x33333333) + (uVar4 & 0x33333333); iVar2 = iVar2 + (((uVar4 >> 4) + uVar4 & 0xf0f0f0f) * 0x1010101 >> 0x18); puVar3 = puVar3 + 1; } while (puVar3 < puVar1); } uVar4 = (~*(uint *)(param_1 + 3) & *puVar1) - ((~*(uint *)(param_1 + 3) & *puVar1) >> 1 & 0x55555555); uVar4 = (uVar4 >> 2 & 0x33333333) + (uVar4 & 0x33333333); return (((uVar4 >> 4) + uVar4 & 0xf0f0f0f) * 0x1010101 >> 0x18) + iVar2; }
37,163
ps_fetch_string
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_string(MYSQL_BIND *r_param, const MYSQL_FIELD *field __attribute__((unused)), unsigned char **row) { /* C-API differs from PHP. While PHP just converts string to string, C-API needs to convert the string to the defined type with in the result bind buffer. */ ulong field_length= net_field_length(row); convert_froma_string(r_param, (char *)*row, field_length); (*row) += field_length; }
O3
c
ps_fetch_string: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movq %rdx, %rdi callq 0x15ac5 movq %rax, %r15 movq (%rbx), %rsi movq %r14, %rdi movq %rax, %rdx callq 0x249d5 addq %r15, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ps_fetch_string: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rdi mov rdi, rdx call net_field_length mov r15, rax mov rsi, [rbx] mov rdi, r14 mov rdx, rax call convert_froma_string add [rbx], r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ps_fetch_string(long long a1, long long a2, unsigned __int8 **a3) { unsigned long long v4; // r15 long long result; // rax v4 = net_field_length(a3); result = convert_froma_string(a1, *a3, v4); *a3 += v4; return result; }
ps_fetch_string: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI MOV RDI,RDX CALL 0x00115ac5 MOV R15,RAX MOV RSI,qword ptr [RBX] MOV RDI,R14 MOV RDX,RAX CALL 0x001249d5 ADD qword ptr [RBX],R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void ps_fetch_string(int8 param_1,int8 param_2,long *param_3) { long lVar1; lVar1 = net_field_length(param_3); convert_froma_string(param_1,*param_3,lVar1); *param_3 = *param_3 + lVar1; return; }
37,164
translog_fixed_length_header
eloqsql/storage/maria/ma_loghandler.c
static int translog_fixed_length_header(uchar *page, translog_size_t page_offset, TRANSLOG_HEADER_BUFFER *buff) { struct st_log_record_type_descriptor *desc= log_record_type_descriptor + buff->type; uchar *src= page + page_offset + 3; uchar *dst= buff->header; uchar *start= src; int lsns= desc->compressed_LSN; uint length= desc->fixed_length; DBUG_ENTER("translog_fixed_length_header"); buff->record_length= length; if (desc->rclass == LOGRECTYPE_PSEUDOFIXEDLENGTH) { DBUG_ASSERT(lsns > 0); src= translog_relative_LSN_decode(buff->lsn, src, dst, lsns); lsns*= LSN_STORE_SIZE; dst+= lsns; length-= lsns; buff->compressed_LSN_economy= (lsns - (int) (src - start)); } else buff->compressed_LSN_economy= 0; memcpy(dst, src, length); buff->non_header_data_start_offset= (uint16) (page_offset + ((src + length) - (page + page_offset))); buff->non_header_data_len= 0; DBUG_RETURN(buff->record_length); }
O0
c
translog_fixed_length_header: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x420(%rax), %eax movl %eax, %ecx leaq 0x422a6a(%rip), %rax # 0x4781c0 imulq $0x48, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx addq %rcx, %rax addq $0x3, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movswl 0x20(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x20(%rbp), %rax movzwl 0x4(%rax), %eax movl %eax, -0x40(%rbp) movl -0x40(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x20(%rbp), %rax cmpl $0x2, (%rax) jne 0x55812 jmp 0x557b2 jmp 0x557b4 movq -0x18(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx movl -0x3c(%rbp), %ecx callq 0x5c450 movq %rax, -0x28(%rbp) imull $0x7, -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %ecx movq -0x30(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x3c(%rbp), %ecx movl -0x40(%rbp), %eax subl %ecx, %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax movq -0x28(%rbp), %rcx movq -0x38(%rbp), %rdx subq %rdx, %rcx subl %ecx, %eax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, 0x430(%rax) jmp 0x5581f movq -0x18(%rbp), %rax movw $0x0, 0x430(%rax) movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi movl -0x40(%rbp), %eax movl %eax, %edx callq 0x2a090 movl -0xc(%rbp), %eax movq -0x28(%rbp), %rcx movl -0x40(%rbp), %edx addq %rdx, %rcx movq -0x8(%rbp), %rdx movl -0xc(%rbp), %esi addq %rsi, %rdx subq %rdx, %rcx addq %rcx, %rax movw %ax, %cx movq -0x18(%rbp), %rax movw %cx, 0x432(%rax) movq -0x18(%rbp), %rax movw $0x0, 0x434(%rax) movq -0x18(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
translog_fixed_length_header: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov eax, [rax+420h] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_8] mov ecx, [rbp+var_C] add rax, rcx add rax, 3 mov [rbp+var_28], rax mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_20] movsx eax, word ptr [rax+20h] mov [rbp+var_3C], eax mov rax, [rbp+var_20] movzx eax, word ptr [rax+4] mov [rbp+var_40], eax mov ecx, [rbp+var_40] mov rax, [rbp+var_18] mov [rax+14h], ecx mov rax, [rbp+var_20] cmp dword ptr [rax], 2 jnz short loc_55812 jmp short $+2 loc_557B2: jmp short $+2 loc_557B4: mov rax, [rbp+var_18] mov rdi, [rax] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] mov ecx, [rbp+var_3C] call translog_relative_LSN_decode mov [rbp+var_28], rax imul eax, [rbp+var_3C], 7 mov [rbp+var_3C], eax mov ecx, [rbp+var_3C] mov rax, [rbp+var_30] movsxd rcx, ecx add rax, rcx mov [rbp+var_30], rax mov ecx, [rbp+var_3C] mov eax, [rbp+var_40] sub eax, ecx mov [rbp+var_40], eax mov eax, [rbp+var_3C] mov rcx, [rbp+var_28] mov rdx, [rbp+var_38] sub rcx, rdx sub eax, ecx mov cx, ax mov rax, [rbp+var_18] mov [rax+430h], cx jmp short loc_5581F loc_55812: mov rax, [rbp+var_18] mov word ptr [rax+430h], 0 loc_5581F: mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] mov eax, [rbp+var_40] mov edx, eax call _memcpy mov eax, [rbp+var_C] mov rcx, [rbp+var_28] mov edx, [rbp+var_40] add rcx, rdx mov rdx, [rbp+var_8] mov esi, [rbp+var_C] add rdx, rsi sub rcx, rdx add rax, rcx mov cx, ax mov rax, [rbp+var_18] mov [rax+432h], cx mov rax, [rbp+var_18] mov word ptr [rax+434h], 0 mov rax, [rbp+var_18] mov eax, [rax+14h] mov [rbp+var_44], eax mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long translog_fixed_length_header(long long a1, unsigned int a2, long long a3) { unsigned int v4; // [rsp+10h] [rbp-40h] unsigned int v5; // [rsp+14h] [rbp-3Ch] int v6; // [rsp+14h] [rbp-3Ch] long long v7; // [rsp+20h] [rbp-30h] long long v8; // [rsp+28h] [rbp-28h] _DWORD *v9; // [rsp+30h] [rbp-20h] v9 = &log_record_type_descriptor[18 * *(unsigned int *)(a3 + 1056)]; v8 = a2 + a1 + 3; v7 = a3 + 24; v5 = *((__int16 *)v9 + 16); v4 = *((unsigned __int16 *)v9 + 2); *(_DWORD *)(a3 + 20) = v4; if ( *v9 == 2 ) { v8 = translog_relative_LSN_decode(*(_QWORD *)a3, v8, v7, v5); v6 = 7 * v5; v7 += v6; v4 -= v6; *(_WORD *)(a3 + 1072) = v6 - (v8 - (a2 + a1 + 3)); } else { *(_WORD *)(a3 + 1072) = 0; } memcpy(v7, v8, v4); *(_WORD *)(a3 + 1074) = v4 + v8 - a1; *(_WORD *)(a3 + 1076) = 0; return *(unsigned int *)(a3 + 20); }
translog_fixed_length_header: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x420] MOV ECX,EAX LEA RAX,[0x5781c0] IMUL RCX,RCX,0x48 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] ADD RAX,RCX ADD RAX,0x3 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,word ptr [RAX + 0x20] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x4] MOV dword ptr [RBP + -0x40],EAX MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x2 JNZ 0x00155812 JMP 0x001557b2 LAB_001557b2: JMP 0x001557b4 LAB_001557b4: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x3c] CALL 0x0015c450 MOV qword ptr [RBP + -0x28],RAX IMUL EAX,dword ptr [RBP + -0x3c],0x7 MOV dword ptr [RBP + -0x3c],EAX MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EAX,dword ptr [RBP + -0x40] SUB EAX,ECX MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,RDX SUB EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x430],CX JMP 0x0015581f LAB_00155812: MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x430],0x0 LAB_0015581f: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x40] MOV EDX,EAX CALL 0x0012a090 MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x40] ADD RCX,RDX MOV RDX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] ADD RDX,RSI SUB RCX,RDX ADD RAX,RCX MOV CX,AX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x432],CX MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX + 0x434],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int4 translog_fixed_length_header(long param_1,uint param_2,int8 *param_3) { int iVar1; void *pvVar2; long lVar3; uint local_48; int8 *local_38; void *local_30; lVar3 = (ulong)*(uint *)(param_3 + 0x84) * 0x48; local_30 = (void *)(param_1 + (ulong)param_2 + 3); local_38 = param_3 + 3; iVar1 = (int)*(short *)(log_record_type_descriptor + lVar3 + 0x20); local_48 = (uint)*(ushort *)(log_record_type_descriptor + lVar3 + 4); *(uint *)((long)param_3 + 0x14) = local_48; if (*(int *)(log_record_type_descriptor + lVar3) == 2) { pvVar2 = (void *)translog_relative_LSN_decode(*param_3,local_30,local_38,iVar1); local_38 = (int8 *)((long)local_38 + (long)(iVar1 * 7)); local_48 = local_48 + iVar1 * -7; *(short *)(param_3 + 0x86) = (short)(iVar1 * 7) - ((short)pvVar2 - (short)local_30); local_30 = pvVar2; } else { *(int2 *)(param_3 + 0x86) = 0; } memcpy(local_38,local_30,(ulong)local_48); *(short *)((long)param_3 + 0x432) = ((short)local_30 + (short)local_48) - (short)param_1; *(int2 *)((long)param_3 + 0x434) = 0; return *(int4 *)((long)param_3 + 0x14); }
37,165
google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format.cc
const char* _InternalParse(const char* ptr, internal::ParseContext* ctx) { // Parse a MessageSetItem auto metadata = reflection->MutableInternalMetadata(msg); enum class State { kNoTag, kHasType, kHasPayload, kDone }; State state = State::kNoTag; std::string payload; uint32_t type_id = 0; while (!ctx->Done(&ptr)) { // We use 64 bit tags in order to allow typeid's that span the whole // range of 32 bit numbers. uint32_t tag = static_cast<uint8_t>(*ptr++); if (tag == WireFormatLite::kMessageSetTypeIdTag) { uint64_t tmp; ptr = ParseBigVarint(ptr, &tmp); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); if (state == State::kNoTag) { type_id = tmp; state = State::kHasType; } else if (state == State::kHasPayload) { type_id = tmp; const FieldDescriptor* field; if (ctx->data().pool == nullptr) { field = reflection->FindKnownExtensionByNumber(type_id); } else { field = ctx->data().pool->FindExtensionByNumber(descriptor, type_id); } if (field == nullptr || field->message_type() == nullptr) { WriteLengthDelimited( type_id, payload, metadata->mutable_unknown_fields<UnknownFieldSet>()); } else { Message* value = field->is_repeated() ? reflection->AddMessage(msg, field, ctx->data().factory) : reflection->MutableMessage(msg, field, ctx->data().factory); const char* p; // We can't use regular parse from string as we have to track // proper recursion depth and descriptor pools. ParseContext tmp_ctx(ctx->depth(), false, &p, payload); tmp_ctx.data().pool = ctx->data().pool; tmp_ctx.data().factory = ctx->data().factory; GOOGLE_PROTOBUF_PARSER_ASSERT(value->_InternalParse(p, &tmp_ctx) && tmp_ctx.EndedAtLimit()); } state = State::kDone; } continue; } else if (tag == WireFormatLite::kMessageSetMessageTag) { if (state == State::kNoTag) { int32_t size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); ptr = ctx->ReadString(ptr, size, &payload); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); state = State::kHasPayload; } else if (state == State::kHasType) { // We're now parsing the payload const FieldDescriptor* field = nullptr; if (descriptor->IsExtensionNumber(type_id)) { if (ctx->data().pool == nullptr) { field = reflection->FindKnownExtensionByNumber(type_id); } else { field = ctx->data().pool->FindExtensionByNumber(descriptor, type_id); } } ptr = WireFormat::_InternalParseAndMergeField( msg, ptr, ctx, static_cast<uint64_t>(type_id) * 8 + 2, reflection, field); state = State::kDone; } else { int32_t size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); ptr = ctx->Skip(ptr, size); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); } } else { // An unknown field in MessageSetItem. ptr = ReadTag(ptr - 1, &tag); if (tag == 0 || (tag & 7) == WireFormatLite::WIRETYPE_END_GROUP) { ctx->SetLastTag(tag); return ptr; } // Skip field. ptr = internal::UnknownFieldParse( tag, static_cast<std::string*>(nullptr), ptr, ctx); } GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); } return ptr; }
O3
cpp
google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse(char const*, google::protobuf::internal::ParseContext*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %rbx movq %rsp, %r15 movq %rsi, (%r15) movq (%rdi), %rsi movq %rdi, 0x8(%rsp) movq 0x10(%rdi), %rdi callq 0x640e0 movq %rax, 0x10(%rsp) leaq 0x28(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) xorl %ebp, %ebp xorl %r14d, %r14d movl %ebp, %eax leaq 0x2(,%rax,8), %rax movq %rax, 0x38(%rsp) movl 0x5c(%rbx), %edx movq %rbx, %rdi movq %r15, %rsi callq 0x594d4 movl %eax, %ecx movq (%rsp), %rax testb %cl, %cl jne 0x9022b leaq 0x1(%rax), %r13 movq %r13, (%rsp) movzbl (%rax), %edx cmpl $0x1a, %edx je 0x8feda cmpl $0x10, %edx jne 0x8ff53 movzwl (%r13), %ecx movsbl %cl, %edx andl %edx, %ecx addl %edx, %ecx movl %ecx, %r12d shrl %r12d testw %cx, %cx js 0x9006e cmpl %edx, %ecx setb %al movzbl %al, %eax addq %r13, %rax incq %rax movq %rax, (%rsp) cmpl $0x2, %r14d je 0x900b5 testl %r14d, %r14d jne 0x8fe64 jmp 0x900d1 cmpl $0x1, %r14d je 0x8ff8e testl %r14d, %r14d je 0x8ff7b movzbl (%r13), %edx testb %dl, %dl js 0x8ff00 addq $0x2, %rax movq %rax, (%rsp) jmp 0x8ff17 movq %r13, %rdi movl %edx, %esi callq 0x10e3c movq %rax, (%rsp) testq %rax, %rax je 0x9023f movslq %edx, %rcx movq 0x8(%rbx), %rsi subq %rax, %rsi addq $0x10, %rsi cmpq %rcx, %rsi jge 0x8ff47 movq %rbx, %rdi movq %rax, %rsi callq 0x9eee6 movq %rax, (%rsp) testq %rax, %rax jne 0x8fe64 jmp 0x9023f addq %rcx, %rax movq %rax, (%rsp) jmp 0x8fe64 testb %dl, %dl jns 0x90040 movzbl (%r13), %ecx movl %ecx, %esi shll $0x7, %esi addl %esi, %edx addl $-0x80, %edx testb %cl, %cl js 0x90033 addq $0x2, %rax jmp 0x9003d movzbl (%r13), %edx testb %dl, %dl js 0x8ffbe addq $0x2, %rax movq %rax, (%rsp) jmp 0x8ffd5 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi movl %ebp, %esi callq 0x1f46e testq %rax, %rax je 0x8fff4 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x8fff8 movq 0x8(%rsp), %rax movq 0x8(%rax), %rsi movl %ebp, %edx callq 0x1e408 jmp 0x90008 movq %r13, %rdi movl %edx, %esi callq 0x10e3c movq %rax, (%rsp) testq %rax, %rax je 0x9023f movq %rbx, %rdi movq %rax, %rsi leaq 0x18(%rsp), %rcx callq 0x63c40 movq %rax, (%rsp) movl $0x2, %r14d jmp 0x8ff39 xorl %eax, %eax jmp 0x90008 movq 0x8(%rsp), %rax movq 0x10(%rax), %rdi movl %ebp, %esi callq 0x6bb02 movq (%rsp), %rsi movq 0x8(%rsp), %rcx movq (%rcx), %rdi movq 0x10(%rcx), %r8 movq %rbx, %rdx movq 0x38(%rsp), %rcx movq %rax, %r9 callq 0x8a96e movl $0x3, %r14d jmp 0x8ff35 movq %rax, %rdi movl %edx, %esi callq 0x9f24e movq %rax, %r13 movq %r13, (%rsp) testl %edx, %edx je 0x90230 movl %edx, %eax andl $0x7, %eax cmpl $0x4, %eax je 0x90230 movl %edx, %edi xorl %esi, %esi movq %r13, %rdx movq %rbx, %rcx callq 0x9f3cd jmp 0x8ff35 movl %r12d, %r12d addq $0x3, %rax movl $0xd, %ecx movq %rax, %r13 movq %r12, %rsi movzwl (%r13), %eax movsbl %al, %edx andl %edx, %eax addl %edx, %eax leaq -0x2(%rax), %r12 shlq %cl, %r12 addq %rsi, %r12 testw %ax, %ax jns 0x900ae addq $0xe, %rcx addq $0x2, %r13 cmpq $0x45, %rcx jne 0x9007d jmp 0x90237 cmpl %edx, %eax jmp 0x8feb6 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x900df movq 0x8(%rsp), %rax movq 0x8(%rax), %rsi movl %r12d, %edx callq 0x1e408 jmp 0x900f0 movl $0x1, %r14d movl %r12d, %ebp jmp 0x8fe55 movq 0x8(%rsp), %rax movq 0x10(%rax), %rdi movl %r12d, %esi callq 0x6bb02 movq %rax, %r13 testq %rax, %rax je 0x90129 movq %r13, %rdi callq 0x1e7ba testq %rax, %rax je 0x90129 movb 0x1(%r13), %al notb %al movq 0x8(%rsp), %rcx movq (%rcx), %rsi movq 0x10(%rcx), %rdi movq 0x68(%rbx), %rcx testb $0x60, %al jne 0x90177 movq %r13, %rdx callq 0x6af62 jmp 0x9017f movq 0x18(%rsp), %r13 movq 0x20(%rsp), %rbp movq 0x10(%rsp), %rax movq (%rax), %rdi testb $0x1, %dil je 0x90219 andq $-0x4, %rdi addq $0x8, %rdi movl %r12d, %esi callq 0x87d2a movq 0x8(%rax), %rdx movl $0x3, %r14d movq %rax, %rdi xorl %esi, %esi movq %r13, %rcx movq %rbp, %r8 callq 0x13d90 movl %r12d, %ebp jmp 0x8fe55 movq %r13, %rdx callq 0x6a5f2 movq %rax, %r13 movl 0x58(%rbx), %eax leaq 0x60(%rsp), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rcx) movups %xmm0, 0x10(%rcx) movups %xmm0, (%rcx) movl $0x0, 0x30(%rcx) movl $0x7fffffff, 0x94(%rsp) # imm = 0x7FFFFFFF movl %eax, 0x98(%rsp) movl $0x80000000, 0x9c(%rsp) # imm = 0x80000000 movups %xmm0, 0x40(%rcx) movq $0x0, 0x50(%rcx) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x63f0e movups 0x60(%rbx), %xmm0 movups %xmm0, 0xa0(%rsp) movq (%r13), %rcx movq %r13, %rdi movq %rax, %rsi movq %r14, %rdx callq *0x50(%rcx) testq %rax, %rax je 0x9023f cmpl $0x0, 0x90(%rsp) movl $0x3, %r14d movl %r12d, %ebp je 0x8fe55 jmp 0x9023f movq 0x10(%rsp), %rdi callq 0x59664 movq %rax, %rdi jmp 0x9014d movq %rax, %r13 jmp 0x90242 decl %edx movl %edx, 0x50(%rbx) jmp 0x90242 movq $0x0, (%rsp) xorl %r13d, %r13d movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x90256 callq 0xf330 movq %r13, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x90279 jmp 0x90279 jmp 0x90279 jmp 0x90279 jmp 0x90279 jmp 0x90279 jmp 0x90279 movq %rax, %rbx movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x90290 callq 0xf330 movq %rbx, %rdi callq 0xf570
_ZN6google8protobuf8internal10WireFormat16MessageSetParser14_InternalParseEPKcPNS1_12ParseContextE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbx, rdx mov r15, rsp mov [r15], rsi mov rsi, [rdi]; google::protobuf::Message * mov [rsp+0E8h+var_E0], rdi mov rdi, [rdi+10h]; this call _ZNK6google8protobuf10Reflection23MutableInternalMetadataEPNS0_7MessageE; google::protobuf::Reflection::MutableInternalMetadata(google::protobuf::Message *) mov [rsp+0E8h+var_D8], rax lea rax, [rsp+0E8h+var_C0] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 xor ebp, ebp xor r14d, r14d loc_8FE55: mov eax, ebp lea rax, ds:2[rax*8] mov [rsp+0E8h+var_B0], rax loc_8FE64: mov edx, [rbx+5Ch]; int mov rdi, rbx; this mov rsi, r15; char ** call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int) mov ecx, eax mov rax, [rsp+0E8h+var_E8] test cl, cl jnz loc_9022B lea r13, [rax+1] mov [rsp+0E8h+var_E8], r13; google::protobuf::FieldDescriptor * movzx edx, byte ptr [rax] cmp edx, 1Ah jz short loc_8FEDA cmp edx, 10h jnz loc_8FF53 movzx ecx, word ptr [r13+0] movsx edx, cl and ecx, edx add ecx, edx mov r12d, ecx shr r12d, 1 test cx, cx js loc_9006E cmp ecx, edx loc_8FEB6: setb al movzx eax, al add rax, r13 inc rax mov [rsp+0E8h+var_E8], rax cmp r14d, 2 jz loc_900B5 test r14d, r14d jnz short loc_8FE64 jmp loc_900D1 loc_8FEDA: cmp r14d, 1 jz loc_8FF8E test r14d, r14d jz loc_8FF7B movzx edx, byte ptr [r13+0]; unsigned int test dl, dl js short loc_8FF00 add rax, 2 mov [rsp+0E8h+var_E8], rax jmp short loc_8FF17 loc_8FF00: mov rdi, r13; this mov esi, edx; char * call _ZN6google8protobuf8internal16ReadSizeFallbackEPKcj; google::protobuf::internal::ReadSizeFallback(char const*,uint) mov [rsp+0E8h+var_E8], rax test rax, rax jz loc_9023F loc_8FF17: movsxd rcx, edx mov rsi, [rbx+8] sub rsi, rax add rsi, 10h cmp rsi, rcx jge short loc_8FF47 mov rdi, rbx; this mov rsi, rax; char * call _ZN6google8protobuf8internal18EpsCopyInputStream12SkipFallbackEPKci; google::protobuf::internal::EpsCopyInputStream::SkipFallback(char const*,int) loc_8FF35: mov [rsp+0E8h+var_E8], rax loc_8FF39: test rax, rax jnz loc_8FE64 jmp loc_9023F loc_8FF47: add rax, rcx mov [rsp+0E8h+var_E8], rax jmp loc_8FE64 loc_8FF53: test dl, dl jns loc_90040 movzx ecx, byte ptr [r13+0] mov esi, ecx shl esi, 7 add edx, esi add edx, 0FFFFFF80h; unsigned int test cl, cl js loc_90033 add rax, 2 jmp loc_9003D loc_8FF7B: movzx edx, byte ptr [r13+0]; unsigned int test dl, dl js short loc_8FFBE add rax, 2 mov [rsp+0E8h+var_E8], rax jmp short loc_8FFD5 loc_8FF8E: mov rax, [rsp+0E8h+var_E0] mov rdi, [rax+8]; this mov esi, ebp; int call _ZNK6google8protobuf10Descriptor34FindExtensionRangeContainingNumberEi; google::protobuf::Descriptor::FindExtensionRangeContainingNumber(int) test rax, rax jz short loc_8FFF4 mov rdi, [rbx+60h]; this test rdi, rdi jz short loc_8FFF8 mov rax, [rsp+0E8h+var_E0] mov rsi, [rax+8]; google::protobuf::Descriptor * mov edx, ebp; int call _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*,int) jmp short loc_90008 loc_8FFBE: mov rdi, r13; this mov esi, edx; char * call _ZN6google8protobuf8internal16ReadSizeFallbackEPKcj; google::protobuf::internal::ReadSizeFallback(char const*,uint) mov [rsp+0E8h+var_E8], rax test rax, rax jz loc_9023F loc_8FFD5: mov rdi, rbx mov rsi, rax lea rcx, [rsp+0E8h+var_D0] call _ZN6google8protobuf8internal18EpsCopyInputStream10ReadStringEPKciPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::EpsCopyInputStream::ReadString(char const*,int,std::string *) mov [rsp+0E8h+var_E8], rax mov r14d, 2 jmp loc_8FF39 loc_8FFF4: xor eax, eax jmp short loc_90008 loc_8FFF8: mov rax, [rsp+0E8h+var_E0] mov rdi, [rax+10h]; this mov esi, ebp; int call _ZNK6google8protobuf10Reflection26FindKnownExtensionByNumberEi; google::protobuf::Reflection::FindKnownExtensionByNumber(int) loc_90008: mov rsi, [rsp+0E8h+var_E8]; google::protobuf::Message * mov rcx, [rsp+0E8h+var_E0] mov rdi, [rcx]; this mov r8, [rcx+10h]; google::protobuf::Reflection * mov rdx, rbx; char * mov rcx, [rsp+0E8h+var_B0]; google::protobuf::internal::ParseContext * mov r9, rax; google::protobuf::Reflection * call _ZN6google8protobuf8internal10WireFormat27_InternalParseAndMergeFieldEPNS0_7MessageEPKcPNS1_12ParseContextEmPKNS0_10ReflectionEPKNS0_15FieldDescriptorE; google::protobuf::internal::WireFormat::_InternalParseAndMergeField(google::protobuf::Message *,char const*,google::protobuf::internal::ParseContext *,ulong,google::protobuf::Reflection const*,google::protobuf::FieldDescriptor const*) mov r14d, 3 jmp loc_8FF35 loc_90033: mov rdi, rax; this mov esi, edx; char * call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint) loc_9003D: mov r13, rax loc_90040: mov [rsp+0E8h+var_E8], r13 test edx, edx jz loc_90230 mov eax, edx and eax, 7 cmp eax, 4 jz loc_90230 mov edi, edx xor esi, esi mov rdx, r13 mov rcx, rbx call _ZN6google8protobuf8internal17UnknownFieldParseEjPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(uint,std::string *,char const*,google::protobuf::internal::ParseContext *) jmp loc_8FF35 loc_9006E: mov r12d, r12d add rax, 3 mov ecx, 0Dh mov r13, rax loc_9007D: mov rsi, r12 movzx eax, word ptr [r13+0] movsx edx, al and eax, edx add eax, edx lea r12, [rax-2] shl r12, cl add r12, rsi test ax, ax jns short loc_900AE add rcx, 0Eh add r13, 2 cmp rcx, 45h ; 'E' jnz short loc_9007D jmp loc_90237 loc_900AE: cmp eax, edx jmp loc_8FEB6 loc_900B5: mov rdi, [rbx+60h]; this test rdi, rdi jz short loc_900DF mov rax, [rsp+0E8h+var_E0] mov rsi, [rax+8]; google::protobuf::Descriptor * mov edx, r12d; int call _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*,int) jmp short loc_900F0 loc_900D1: mov r14d, 1 mov ebp, r12d jmp loc_8FE55 loc_900DF: mov rax, [rsp+0E8h+var_E0] mov rdi, [rax+10h]; this mov esi, r12d; int call _ZNK6google8protobuf10Reflection26FindKnownExtensionByNumberEi; google::protobuf::Reflection::FindKnownExtensionByNumber(int) loc_900F0: mov r13, rax test rax, rax jz short loc_90129 mov rdi, r13; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) test rax, rax jz short loc_90129 mov al, [r13+1] not al mov rcx, [rsp+0E8h+var_E0] mov rsi, [rcx]; google::protobuf::Message * mov rdi, [rcx+10h]; this mov rcx, [rbx+68h]; google::protobuf::MessageFactory * test al, 60h jnz short loc_90177 mov rdx, r13; google::protobuf::FieldDescriptor * call _ZNK6google8protobuf10Reflection10AddMessageEPNS0_7MessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE; google::protobuf::Reflection::AddMessage(google::protobuf::Message *,google::protobuf::FieldDescriptor const*,google::protobuf::MessageFactory *) jmp short loc_9017F loc_90129: mov r13, [rsp+0E8h+var_D0] mov rbp, [rsp+0E8h+var_C8] mov rax, [rsp+0E8h+var_D8] mov rdi, [rax] test dil, 1 jz loc_90219 and rdi, 0FFFFFFFFFFFFFFFCh add rdi, 8 loc_9014D: mov esi, r12d call _ZN6google8protobuf15UnknownFieldSet18AddLengthDelimitedB5cxx11Ei; google::protobuf::UnknownFieldSet::AddLengthDelimited(int) mov rdx, [rax+8] mov r14d, 3 mov rdi, rax xor esi, esi mov rcx, r13 mov r8, rbp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov ebp, r12d jmp loc_8FE55 loc_90177: mov rdx, r13; google::protobuf::FieldDescriptor * call _ZNK6google8protobuf10Reflection14MutableMessageEPNS0_7MessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE; google::protobuf::Reflection::MutableMessage(google::protobuf::Message *,google::protobuf::FieldDescriptor const*,google::protobuf::MessageFactory *) loc_9017F: mov r13, rax mov eax, [rbx+58h] lea rcx, [rsp+0E8h+var_88] xorps xmm0, xmm0 movups xmmword ptr [rcx+20h], xmm0 movups xmmword ptr [rcx+10h], xmm0 movups xmmword ptr [rcx], xmm0 mov dword ptr [rcx+30h], 0 mov [rsp+0E8h+var_54], 7FFFFFFFh mov [rsp+0E8h+var_50], eax mov [rsp+0E8h+var_4C], 80000000h movups xmmword ptr [rcx+40h], xmm0 mov qword ptr [rcx+50h], 0 mov rsi, [rsp+0E8h+var_D0] mov rdx, [rsp+0E8h+var_C8] lea r14, [rsp+0E8h+var_A8] mov rdi, r14 call _ZN6google8protobuf8internal18EpsCopyInputStream8InitFromENS0_20stringpiece_internal11StringPieceE; google::protobuf::internal::EpsCopyInputStream::InitFrom(google::protobuf::stringpiece_internal::StringPiece) movups xmm0, xmmword ptr [rbx+60h] movups [rsp+0E8h+var_48], xmm0 mov rcx, [r13+0] mov rdi, r13 mov rsi, rax mov rdx, r14 call qword ptr [rcx+50h] test rax, rax jz short loc_9023F cmp [rsp+0E8h+var_58], 0 mov r14d, 3 mov ebp, r12d jz loc_8FE55 jmp short loc_9023F loc_90219: mov rdi, [rsp+0E8h+var_D8] call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov rdi, rax jmp loc_9014D loc_9022B: mov r13, rax jmp short loc_90242 loc_90230: dec edx mov [rbx+50h], edx jmp short loc_90242 loc_90237: mov [rsp+0E8h+var_E8], 0 loc_9023F: xor r13d, r13d loc_90242: mov rdi, [rsp+0E8h+var_D0]; void * lea rax, [rsp+0E8h+var_C0] cmp rdi, rax jz short loc_90256 call __ZdlPv; operator delete(void *) loc_90256: mov rax, r13 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_90279 jmp short loc_90279 jmp short loc_90279 jmp short loc_90279 jmp short loc_90279 jmp short loc_90279 jmp short $+2 loc_90279: mov rbx, rax mov rdi, [rsp+arg_10]; void * lea rax, [rsp+arg_20] cmp rdi, rax jz short loc_90290 call __ZdlPv; operator delete(void *) loc_90290: mov rdi, rbx call __Unwind_Resume
google::protobuf::internal * google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse( google::protobuf::Reflection **this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { google::protobuf::Message *v4; // rsi unsigned int v5; // ebp int v6; // r14d char v7; // cl google::protobuf::internal *v8; // rax google::protobuf::internal *v9; // r13 unsigned int v10; // edx int v11; // ecx unsigned int v12; // edx unsigned int v13; // ecx long long v14; // r12 bool v15; // cf int v16; // edx char *SizeFallback; // rax google::protobuf::internal *v18; // rax long long TagFallback; // rax int v20; // edx char *v21; // rax google::protobuf::DescriptorPool *v22; // rdi const google::protobuf::Reflection *ExtensionByNumber; // rax long long v24; // rcx int v25; // eax unsigned int v26; // edx long long v27; // rax google::protobuf::DescriptorPool *v28; // rdi google::protobuf::FieldDescriptor *KnownExtensionByNumber; // rax google::protobuf::FieldDescriptor *v30; // r13 const char *v31; // r8 long long v32; // r9 google::protobuf::Message *v33; // rsi google::protobuf::_anonymous_namespace_ **v34; // rdi google::protobuf::MessageFactory *v35; // rcx long long v36; // rax _BYTE *v37; // r13 unsigned long long v38; // rbp unsigned long long v39; // rdi _QWORD *v40; // rax long long v41; // r13 int v42; // eax long long v43; // rax google::protobuf::internal *v45; // [rsp+0h] [rbp-E8h] BYREF google::protobuf::Reflection **v46; // [rsp+8h] [rbp-E0h] long long *v47; // [rsp+10h] [rbp-D8h] void *v48; // [rsp+18h] [rbp-D0h] BYREF unsigned long long v49; // [rsp+20h] [rbp-C8h] _BYTE v50[16]; // [rsp+28h] [rbp-C0h] BYREF google::protobuf::internal::ParseContext *v51; // [rsp+38h] [rbp-B0h] _BYTE v52[32]; // [rsp+40h] [rbp-A8h] BYREF __int128 v53; // [rsp+60h] [rbp-88h] __int128 v54; // [rsp+70h] [rbp-78h] __int128 v55; // [rsp+80h] [rbp-68h] int v56; // [rsp+90h] [rbp-58h] int v57; // [rsp+94h] [rbp-54h] int v58; // [rsp+98h] [rbp-50h] unsigned int v59; // [rsp+9Ch] [rbp-4Ch] __int128 v60; // [rsp+A0h] [rbp-48h] long long v61; // [rsp+B0h] [rbp-38h] v45 = a2; v4 = *this; v46 = this; v47 = (long long *)google::protobuf::Reflection::MutableInternalMetadata(this[2], v4); v48 = v50; v49 = 0LL; v50[0] = 0; v5 = 0; v6 = 0; do { LABEL_2: while ( 2 ) { v51 = (google::protobuf::internal::ParseContext *)(8LL * v5 + 2); while ( 1 ) { while ( 1 ) { v7 = google::protobuf::internal::EpsCopyInputStream::DoneWithCheck( a3, (const char **)&v45, *((_DWORD *)a3 + 23)); v8 = v45; if ( v7 ) { v9 = v45; goto LABEL_63; } v9 = (google::protobuf::internal *)((char *)v45 + 1); v45 = (google::protobuf::internal *)((char *)v45 + 1); v10 = *(unsigned __int8 *)v8; if ( v10 != 26 ) break; if ( v6 == 1 ) { if ( google::protobuf::Descriptor::FindExtensionRangeContainingNumber(v46[1], v5) ) { v22 = (google::protobuf::DescriptorPool *)*((_QWORD *)a3 + 12); if ( v22 ) ExtensionByNumber = (const google::protobuf::Reflection *)google::protobuf::DescriptorPool::FindExtensionByNumber( v22, v46[1], v5); else ExtensionByNumber = (const google::protobuf::Reflection *)google::protobuf::Reflection::FindKnownExtensionByNumber( (google::protobuf::DescriptorPool **)v46[2], v5); } else { ExtensionByNumber = 0LL; } v18 = google::protobuf::internal::WireFormat::_InternalParseAndMergeField( *v46, (char **)v45, (char *)a3, v51, (google::protobuf::_anonymous_namespace_ **)v46[2], ExtensionByNumber); v6 = 3; goto LABEL_18; } if ( v6 ) { v16 = *(unsigned __int8 *)v9; if ( (v16 & 0x80u) != 0 ) { SizeFallback = google::protobuf::internal::ReadSizeFallback( (google::protobuf::internal *)((char *)v8 + 1), (const char *)*(unsigned __int8 *)v9); v45 = (google::protobuf::internal *)SizeFallback; if ( !SizeFallback ) goto LABEL_62; } else { SizeFallback = (char *)v8 + 2; v45 = (google::protobuf::internal *)SizeFallback; } if ( *((_QWORD *)a3 + 1) - (_QWORD)SizeFallback + 16LL < v16 ) { v18 = (google::protobuf::internal *)google::protobuf::internal::EpsCopyInputStream::SkipFallback( a3, SizeFallback, v16); LABEL_18: v45 = v18; goto LABEL_19; } v45 = (google::protobuf::internal *)&SizeFallback[v16]; } else { v20 = *(unsigned __int8 *)v9; if ( (v20 & 0x80u) != 0 ) { v21 = google::protobuf::internal::ReadSizeFallback( (google::protobuf::internal *)((char *)v8 + 1), (const char *)*(unsigned __int8 *)v9); v45 = (google::protobuf::internal *)v21; if ( !v21 ) goto LABEL_62; } else { v21 = (char *)v8 + 2; v45 = (google::protobuf::internal *)v21; } v18 = (google::protobuf::internal *)google::protobuf::internal::EpsCopyInputStream::ReadString( a3, v21, v20, &v48); v45 = v18; v6 = 2; LABEL_19: if ( !v18 ) goto LABEL_62; } } if ( v10 != 16 ) { if ( (v10 & 0x80u) != 0 ) { v10 = (*(unsigned __int8 *)v9 << 7) + v10 - 128; if ( *(char *)v9 < 0 ) TagFallback = google::protobuf::internal::ReadTagFallback(v8, (const char *)v10, v10); else TagFallback = (long long)v8 + 2; v9 = (google::protobuf::internal *)TagFallback; } v45 = v9; if ( !v10 || (v10 & 7) == 4 ) { *((_DWORD *)a3 + 20) = v10 - 1; goto LABEL_63; } v18 = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse(v10, 0LL, v9, a3); goto LABEL_18; } v11 = *(unsigned __int16 *)v9; v12 = (char)v11; v13 = v12 + (v12 & v11); LODWORD(v14) = v13 >> 1; if ( (v13 & 0x8000u) != 0 ) { v14 = (unsigned int)v14; v24 = 13LL; v9 = (google::protobuf::internal *)((char *)v8 + 3); while ( 1 ) { v25 = *(unsigned __int16 *)v9; v26 = (char)v25; v27 = v26 + (v26 & v25); v14 += (v27 - 2) << v24; if ( (v27 & 0x8000u) == 0LL ) break; v24 += 14LL; v9 = (google::protobuf::internal *)((char *)v9 + 2); if ( v24 == 69 ) { v45 = 0LL; goto LABEL_62; } } v15 = (unsigned int)v27 < v26; } else { v15 = v13 < v12; } v45 = (google::protobuf::internal *)((char *)v9 + v15 + 1); if ( v6 == 2 ) break; if ( !v6 ) { v6 = 1; v5 = v14; goto LABEL_2; } } v28 = (google::protobuf::DescriptorPool *)*((_QWORD *)a3 + 12); if ( v28 ) KnownExtensionByNumber = (google::protobuf::FieldDescriptor *)google::protobuf::DescriptorPool::FindExtensionByNumber( v28, v46[1], v14); else KnownExtensionByNumber = (google::protobuf::FieldDescriptor *)google::protobuf::Reflection::FindKnownExtensionByNumber( (google::protobuf::DescriptorPool **)v46[2], v14); v30 = KnownExtensionByNumber; if ( !KnownExtensionByNumber || !google::protobuf::FieldDescriptor::message_type(KnownExtensionByNumber) ) { v37 = v48; v38 = v49; if ( (*v47 & 1) != 0 ) v39 = (*v47 & 0xFFFFFFFFFFFFFFFCLL) + 8; else v39 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(v47); v40 = (_QWORD *)google::protobuf::UnknownFieldSet::AddLengthDelimited[abi:cxx11](v39, v14); v6 = 3; std::string::_M_replace(v40, 0LL, v40[1], v37, v38); v5 = v14; continue; } break; } v33 = *v46; v34 = (google::protobuf::_anonymous_namespace_ **)v46[2]; v35 = (google::protobuf::MessageFactory *)*((_QWORD *)a3 + 13); if ( (~*((_BYTE *)v30 + 1) & 0x60) != 0 ) v36 = google::protobuf::Reflection::MutableMessage(v34, v33, v30, v35, v31, v32); else v36 = google::protobuf::Reflection::AddMessage(v34, v33, v30, v35, v31, v32); v41 = v36; v42 = *((_DWORD *)a3 + 22); v55 = 0LL; v54 = 0LL; v53 = 0LL; v56 = 0; v57 = 0x7FFFFFFF; v58 = v42; v59 = 0x80000000; v60 = 0LL; v61 = 0LL; v43 = google::protobuf::internal::EpsCopyInputStream::InitFrom((long long)v52, (long long)v48, v49); v60 = *((_OWORD *)a3 + 6); if ( !(*(long long ( **)(long long, long long, _BYTE *))(*(_QWORD *)v41 + 80LL))(v41, v43, v52) ) break; v6 = 3; v5 = v14; } while ( !v56 ); LABEL_62: v9 = 0LL; LABEL_63: if ( v48 != v50 ) operator delete(v48); return v9; }
_InternalParse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RBX,RDX MOV R15,RSP MOV qword ptr [R15],RSI MOV RSI,qword ptr [RDI] MOV qword ptr [RSP + 0x8],RDI MOV RDI,qword ptr [RDI + 0x10] CALL 0x001640e0 MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RSP + 0x28] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 XOR EBP,EBP XOR R14D,R14D LAB_0018fe55: MOV EAX,EBP LEA RAX,[0x2 + RAX*0x8] MOV qword ptr [RSP + 0x38],RAX LAB_0018fe64: MOV EDX,dword ptr [RBX + 0x5c] LAB_0018fe67: MOV RDI,RBX MOV RSI,R15 CALL 0x001594d4 MOV ECX,EAX MOV RAX,qword ptr [RSP] TEST CL,CL JNZ 0x0019022b LEA R13,[RAX + 0x1] MOV qword ptr [RSP],R13 MOVZX EDX,byte ptr [RAX] CMP EDX,0x1a JZ 0x0018feda CMP EDX,0x10 JNZ 0x0018ff53 MOVZX ECX,word ptr [R13] MOVSX EDX,CL AND ECX,EDX ADD ECX,EDX MOV R12D,ECX SHR R12D,0x1 TEST CX,CX JS 0x0019006e CMP ECX,EDX LAB_0018feb6: SETC AL MOVZX EAX,AL ADD RAX,R13 INC RAX MOV qword ptr [RSP],RAX CMP R14D,0x2 JZ 0x001900b5 TEST R14D,R14D JNZ 0x0018fe64 JMP 0x001900d1 LAB_0018feda: CMP R14D,0x1 JZ 0x0018ff8e TEST R14D,R14D JZ 0x0018ff7b MOVZX EDX,byte ptr [R13] TEST DL,DL JS 0x0018ff00 ADD RAX,0x2 MOV qword ptr [RSP],RAX JMP 0x0018ff17 LAB_0018ff00: MOV RDI,R13 MOV ESI,EDX CALL 0x00110e3c MOV qword ptr [RSP],RAX TEST RAX,RAX JZ 0x0019023f LAB_0018ff17: MOVSXD RCX,EDX MOV RSI,qword ptr [RBX + 0x8] SUB RSI,RAX ADD RSI,0x10 CMP RSI,RCX JGE 0x0018ff47 MOV RDI,RBX MOV RSI,RAX CALL 0x0019eee6 LAB_0018ff35: MOV qword ptr [RSP],RAX LAB_0018ff39: TEST RAX,RAX JNZ 0x0018fe64 JMP 0x0019023f LAB_0018ff47: ADD RAX,RCX MOV qword ptr [RSP],RAX JMP 0x0018fe64 LAB_0018ff53: TEST DL,DL JNS 0x00190040 MOVZX ECX,byte ptr [R13] MOV ESI,ECX SHL ESI,0x7 ADD EDX,ESI ADD EDX,-0x80 TEST CL,CL JS 0x00190033 ADD RAX,0x2 JMP 0x0019003d LAB_0018ff7b: MOVZX EDX,byte ptr [R13] TEST DL,DL JS 0x0018ffbe ADD RAX,0x2 MOV qword ptr [RSP],RAX JMP 0x0018ffd5 LAB_0018ff8e: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] LAB_0018ff97: MOV ESI,EBP CALL 0x0011f46e TEST RAX,RAX JZ 0x0018fff4 MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x0018fff8 MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x8] MOV EDX,EBP CALL 0x0011e408 JMP 0x00190008 LAB_0018ffbe: MOV RDI,R13 MOV ESI,EDX CALL 0x00110e3c MOV qword ptr [RSP],RAX TEST RAX,RAX JZ 0x0019023f LAB_0018ffd5: MOV RDI,RBX MOV RSI,RAX LEA RCX,[RSP + 0x18] CALL 0x00163c40 MOV qword ptr [RSP],RAX MOV R14D,0x2 JMP 0x0018ff39 LAB_0018fff4: XOR EAX,EAX JMP 0x00190008 LAB_0018fff8: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x10] LAB_00190001: MOV ESI,EBP CALL 0x0016bb02 LAB_00190008: MOV RSI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RCX] MOV R8,qword ptr [RCX + 0x10] MOV RDX,RBX MOV RCX,qword ptr [RSP + 0x38] MOV R9,RAX CALL 0x0018a96e MOV R14D,0x3 JMP 0x0018ff35 LAB_00190033: MOV RDI,RAX MOV ESI,EDX CALL 0x0019f24e LAB_0019003d: MOV R13,RAX LAB_00190040: MOV qword ptr [RSP],R13 TEST EDX,EDX JZ 0x00190230 MOV EAX,EDX AND EAX,0x7 CMP EAX,0x4 JZ 0x00190230 MOV EDI,EDX XOR ESI,ESI MOV RDX,R13 MOV RCX,RBX CALL 0x0019f3cd JMP 0x0018ff35 LAB_0019006e: MOV R12D,R12D ADD RAX,0x3 MOV ECX,0xd MOV R13,RAX LAB_0019007d: MOV RSI,R12 MOVZX EAX,word ptr [R13] MOVSX EDX,AL AND EAX,EDX ADD EAX,EDX LEA R12,[RAX + -0x2] SHL R12,CL ADD R12,RSI TEST AX,AX JNS 0x001900ae ADD RCX,0xe ADD R13,0x2 CMP RCX,0x45 JNZ 0x0019007d JMP 0x00190237 LAB_001900ae: CMP EAX,EDX JMP 0x0018feb6 LAB_001900b5: MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x001900df MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x8] LAB_001900c7: MOV EDX,R12D CALL 0x0011e408 JMP 0x001900f0 LAB_001900d1: MOV R14D,0x1 MOV EBP,R12D JMP 0x0018fe55 LAB_001900df: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x10] MOV ESI,R12D CALL 0x0016bb02 LAB_001900f0: MOV R13,RAX TEST RAX,RAX JZ 0x00190129 MOV RDI,R13 CALL 0x0011e7ba TEST RAX,RAX JZ 0x00190129 MOV AL,byte ptr [R13 + 0x1] NOT AL MOV RCX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RBX + 0x68] TEST AL,0x60 JNZ 0x00190177 LAB_0019011f: MOV RDX,R13 CALL 0x0016af62 JMP 0x0019017f LAB_00190129: MOV R13,qword ptr [RSP + 0x18] MOV RBP,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX] TEST DIL,0x1 JZ 0x00190219 AND RDI,-0x4 ADD RDI,0x8 LAB_0019014d: MOV ESI,R12D CALL 0x00187d2a MOV RDX,qword ptr [RAX + 0x8] MOV R14D,0x3 MOV RDI,RAX XOR ESI,ESI MOV RCX,R13 MOV R8,RBP CALL 0x00113d90 MOV EBP,R12D JMP 0x0018fe55 LAB_00190177: MOV RDX,R13 CALL 0x0016a5f2 LAB_0019017f: MOV R13,RAX MOV EAX,dword ptr [RBX + 0x58] LEA RCX,[RSP + 0x60] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX + 0x20],XMM0 MOVUPS xmmword ptr [RCX + 0x10],XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOV dword ptr [RCX + 0x30],0x0 MOV dword ptr [RSP + 0x94],0x7fffffff MOV dword ptr [RSP + 0x98],EAX MOV dword ptr [RSP + 0x9c],0x80000000 MOVUPS xmmword ptr [RCX + 0x40],XMM0 MOV qword ptr [RCX + 0x50],0x0 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x00163f0e MOVUPS XMM0,xmmword ptr [RBX + 0x60] MOVUPS xmmword ptr [RSP + 0xa0],XMM0 MOV RCX,qword ptr [R13] LAB_001901ef: MOV RDI,R13 MOV RSI,RAX MOV RDX,R14 CALL qword ptr [RCX + 0x50] TEST RAX,RAX JZ 0x0019023f CMP dword ptr [RSP + 0x90],0x0 MOV R14D,0x3 MOV EBP,R12D JZ 0x0018fe55 JMP 0x0019023f LAB_00190219: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00159664 LAB_00190223: MOV RDI,RAX JMP 0x0019014d LAB_0019022b: MOV R13,RAX JMP 0x00190242 LAB_00190230: DEC EDX MOV dword ptr [RBX + 0x50],EDX JMP 0x00190242 LAB_00190237: MOV qword ptr [RSP],0x0 LAB_0019023f: XOR R13D,R13D LAB_00190242: MOV RDI,qword ptr [RSP + 0x18] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x00190256 CALL 0x0010f330 LAB_00190256: MOV RAX,R13 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse(char const*, google::protobuf::internal::ParseContext*) */ ushort * __thiscall google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse (MessageSetParser *this,char *param_1,ParseContext *param_2) { byte bVar1; char *pcVar2; char cVar3; uint uVar10; int iVar11; ushort *puVar4; FieldDescriptor *pFVar5; long lVar6; long *plVar7; string *this_00; int8 uVar8; uint uVar9; ulong uVar12; int iVar13; UnknownFieldSet *this_01; ulong uVar14; ushort *puVar15; bool bVar16; int1 auVar17 [12]; int1 auVar18 [12]; int1 auVar19 [12]; ushort *local_e8; MessageSetParser *local_e0; InternalMetadata *local_d8; char *local_d0; ulong local_c8; char local_c0 [16]; ulong local_b0; int1 local_a8 [32]; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int local_58; int4 local_54; int4 local_50; int4 local_4c; int8 local_48; int8 uStack_40; int8 local_38; local_e8 = (ushort *)param_1; local_e0 = this; local_d8 = (InternalMetadata *) Reflection::MutableInternalMetadata(*(Reflection **)(this + 0x10),*(Message **)this); local_d0 = local_c0; local_c8 = 0; local_c0[0] = '\0'; uVar12 = 0; iVar13 = 0; LAB_0018fe55: local_b0 = uVar12 * 8 + 2; LAB_0018fe64: /* try { // try from 0018fe67 to 0018fe71 has its CatchHandler @ 00190279 */ cVar3 = EpsCopyInputStream::DoneWithCheck ((EpsCopyInputStream *)param_2,(char **)&local_e8,*(int *)(param_2 + 0x5c)); puVar15 = local_e8; if (cVar3 != '\0') goto LAB_00190242; puVar4 = (ushort *)((long)local_e8 + 1); bVar1 = (byte)*local_e8; auVar19[8] = bVar1; auVar19._0_8_ = puVar4; auVar19._9_3_ = 0; if (bVar1 == 0x1a) { if (iVar13 == 1) { iVar13 = (int)uVar12; local_e8 = puVar4; /* try { // try from 0018ff97 to 0018ffbb has its CatchHandler @ 00190273 */ lVar6 = Descriptor::FindExtensionRangeContainingNumber(*(Descriptor **)(local_e0 + 8),iVar13); if (lVar6 == 0) { pFVar5 = (FieldDescriptor *)0x0; } else if (*(DescriptorPool **)(param_2 + 0x60) == (DescriptorPool *)0x0) { /* try { // try from 00190001 to 00190027 has its CatchHandler @ 00190273 */ pFVar5 = (FieldDescriptor *) Reflection::FindKnownExtensionByNumber(*(Reflection **)(local_e0 + 0x10),iVar13); } else { pFVar5 = (FieldDescriptor *) DescriptorPool::FindExtensionByNumber (*(DescriptorPool **)(param_2 + 0x60),*(Descriptor **)(local_e0 + 8), iVar13); } local_e8 = (ushort *) _InternalParseAndMergeField (*(Message **)local_e0,(char *)local_e8,param_2,local_b0, *(Reflection **)(local_e0 + 0x10),pFVar5); iVar13 = 3; LAB_0018ff39: if (local_e8 != (ushort *)0x0) goto LAB_0018fe64; } else { if (iVar13 == 0) { bVar1 = *(byte *)puVar4; if ((char)bVar1 < '\0') { /* try { // try from 0018ffbe to 0018ffe4 has its CatchHandler @ 00190271 */ local_e8 = puVar4; auVar18 = ReadSizeFallback((char *)puVar4,(uint)bVar1); local_e8 = auVar18._0_8_; if (local_e8 == (ushort *)0x0) goto LAB_0019023f; } else { auVar18[8] = bVar1; auVar18._0_8_ = local_e8 + 1; auVar18._9_3_ = 0; } local_e8 = auVar18._0_8_; local_e8 = (ushort *) EpsCopyInputStream::ReadString ((EpsCopyInputStream *)param_2,(char *)local_e8,auVar18._8_4_, (string *)&local_d0); iVar13 = 2; goto LAB_0018ff39; } bVar1 = *(byte *)puVar4; if (-1 < (char)bVar1) { auVar17[8] = bVar1; auVar17._0_8_ = local_e8 + 1; auVar17._9_3_ = 0; LAB_0018ff17: iVar11 = auVar17._8_4_; local_e8 = auVar17._0_8_; if ((*(long *)(param_2 + 8) - (long)local_e8) + 0x10 < (long)iVar11) { local_e8 = (ushort *) EpsCopyInputStream::SkipFallback ((EpsCopyInputStream *)param_2,(char *)local_e8,iVar11); goto LAB_0018ff39; } local_e8 = (ushort *)((long)local_e8 + (long)iVar11); goto LAB_0018fe64; } /* try { // try from 0018ff00 to 0018ff34 has its CatchHandler @ 00190277 */ local_e8 = puVar4; auVar17 = ReadSizeFallback((char *)puVar4,(uint)bVar1); local_e8 = auVar17._0_8_; if (local_e8 != (ushort *)0x0) goto LAB_0018ff17; } } else { if (bVar1 != 0x10) { if ((char)bVar1 < '\0') { uVar9 = ((uint)bVar1 + (uint)*(byte *)puVar4 * 0x80) - 0x80; if ((char)*(byte *)puVar4 < '\0') { local_e8 = puVar4; /* try { // try from 00190033 to 00190068 has its CatchHandler @ 0019026f */ auVar19 = ReadTagFallback((char *)puVar15,uVar9); } else { auVar19._8_4_ = uVar9; auVar19._0_8_ = local_e8 + 1; } } uVar9 = auVar19._8_4_; local_e8 = auVar19._0_8_; if ((uVar9 == 0) || ((uVar9 & 7) == 4)) { *(uint *)(param_2 + 0x50) = uVar9 - 1; puVar15 = local_e8; goto LAB_00190242; } local_e8 = (ushort *)UnknownFieldParse(uVar9,(string *)0x0,(char *)local_e8,param_2); goto LAB_0018ff39; } uVar10 = (uint)(char)*puVar4; uVar9 = (*puVar4 & uVar10) + uVar10; uVar14 = (ulong)(uVar9 >> 1); if ((short)uVar9 < 0) { uVar14 = (ulong)(uVar9 >> 1); puVar4 = (ushort *)((long)local_e8 + 3); lVar6 = 0xd; while( true ) { uVar10 = (uint)(char)*puVar4; uVar9 = (*puVar4 & uVar10) + uVar10; uVar14 = ((ulong)uVar9 - 2 << ((byte)lVar6 & 0x3f)) + uVar14; if (-1 < (short)uVar9) break; lVar6 = lVar6 + 0xe; puVar4 = puVar4 + 1; if (lVar6 == 0x45) { local_e8 = (ushort *)0x0; goto LAB_0019023f; } } bVar16 = uVar9 < uVar10; } else { bVar16 = uVar9 < uVar10; } local_e8 = (ushort *)((long)puVar4 + (ulong)bVar16 + 1); iVar11 = (int)uVar14; if (iVar13 != 2) { if (iVar13 == 0) goto LAB_001900d1; goto LAB_0018fe64; } if (*(DescriptorPool **)(param_2 + 0x60) == (DescriptorPool *)0x0) { pFVar5 = (FieldDescriptor *) Reflection::FindKnownExtensionByNumber(*(Reflection **)(local_e0 + 0x10),iVar11); } else { /* try { // try from 001900c7 to 001900ff has its CatchHandler @ 00190275 */ pFVar5 = (FieldDescriptor *) DescriptorPool::FindExtensionByNumber (*(DescriptorPool **)(param_2 + 0x60),*(Descriptor **)(local_e0 + 8),iVar11 ); } if ((pFVar5 == (FieldDescriptor *)0x0) || (lVar6 = FieldDescriptor::message_type(pFVar5), lVar6 == 0)) { uVar12 = local_c8; pcVar2 = local_d0; if ((*(ulong *)local_d8 & 1) == 0) { /* try { // try from 00190219 to 00190222 has its CatchHandler @ 00190275 */ this_01 = InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet> (local_d8); } else { this_01 = (UnknownFieldSet *)((*(ulong *)local_d8 & 0xfffffffffffffffc) + 8); } /* try { // try from 0019014d to 0019016e has its CatchHandler @ 00190275 */ this_00 = (string *)UnknownFieldSet::AddLengthDelimited_abi_cxx11_(this_01,iVar11); iVar13 = 3; std::__cxx11::string::_M_replace(this_00,0,*(ulong *)(this_00 + 8),pcVar2,uVar12); uVar12 = uVar14 & 0xffffffff; goto LAB_0018fe55; } if ((~(byte)pFVar5[1] & 0x60) == 0) { /* try { // try from 0019011f to 00190126 has its CatchHandler @ 0019026d */ plVar7 = (long *)Reflection::AddMessage (*(Reflection **)(local_e0 + 0x10),*(Message **)local_e0,pFVar5, *(MessageFactory **)(param_2 + 0x68)); } else { /* try { // try from 00190177 to 0019017e has its CatchHandler @ 0019026d */ plVar7 = (long *)Reflection::MutableMessage (*(Reflection **)(local_e0 + 0x10),*(Message **)local_e0,pFVar5, *(MessageFactory **)(param_2 + 0x68)); } local_50 = *(int4 *)(param_2 + 0x58); local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; local_58 = 0; local_54 = 0x7fffffff; local_4c = 0x80000000; local_48 = 0; uStack_40 = 0; local_38 = 0; uVar8 = EpsCopyInputStream::InitFrom(local_a8,local_d0,local_c8); local_48 = *(int8 *)(param_2 + 0x60); uStack_40 = *(int8 *)(param_2 + 0x68); /* try { // try from 001901ef to 001901fa has its CatchHandler @ 0019026b */ lVar6 = (**(code **)(*plVar7 + 0x50))(plVar7,uVar8,local_a8); if (lVar6 == 0) goto LAB_0019023f; iVar13 = 3; uVar12 = uVar14 & 0xffffffff; if (local_58 == 0) goto LAB_0018fe55; } LAB_0019023f: puVar15 = (ushort *)0x0; LAB_00190242: if (local_d0 != local_c0) { operator_delete(local_d0); } return puVar15; LAB_001900d1: iVar13 = 1; uVar12 = uVar14 & 0xffffffff; goto LAB_0018fe55; }
37,166
my_uni_utf16
eloqsql/strings/ctype-ucs2.c
int my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (MY_UTF16_SURROGATE(wc)) return MY_CS_ILUNI; *s++= (uchar) (wc >> 8); *s= (uchar) (wc & 0xFF); return 2; } if (wc <= 0x10FFFF) { if (s + 4 > e) return MY_CS_TOOSMALL4; *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; *s++= (uchar) (wc >> 10) & 0xFF; *s++= (uchar) ((wc >> 8) & 3) | 0xDC; *s= (uchar) wc & 0xFF; return 4; } return MY_CS_ILUNI; }
O0
c
my_uni_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x61e5f movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x61e08 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x61f22 movq -0x18(%rbp), %rax andq $0xf800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0x61e26 movl $0x0, -0x4(%rbp) jmp 0x61f22 movq -0x18(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x2, -0x4(%rbp) jmp 0x61f22 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF ja 0x61f1b movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x61e87 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x61f22 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) shrq $0x12, %rax movzbl %al, %eax orl $0xd8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0xa, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax andq $0x3, %rax movzbl %al, %eax orl $0xdc, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x4, -0x4(%rbp) jmp 0x61f22 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 0FFFFh ja short loc_61E5F mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_61E08 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_61F22 loc_61E08: mov rax, [rbp+var_18] and rax, 0F800h cmp rax, 0D800h jnz short loc_61E26 mov [rbp+var_4], 0 jmp loc_61F22 loc_61E26: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 2 jmp loc_61F22 loc_61E5F: cmp [rbp+var_18], offset unk_10FFFF ja loc_61F1B mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_61E87 mov [rbp+var_4], 0FFFFFF98h jmp loc_61F22 loc_61E87: mov rax, [rbp+var_18] sub rax, offset stru_10000 mov [rbp+var_18], rax shr rax, 12h movzx eax, al or eax, 0D8h mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 0Ah movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 8 and rax, 3 movzx eax, al or eax, 0DCh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 4 jmp short loc_61F22 loc_61F1B: mov [rbp+var_4], 0 loc_61F22: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( a2 > 0xFFFF ) { if ( a2 > (unsigned long long)&unk_10FFFF ) { return 0; } else if ( (unsigned long long)(a3 + 4) <= a4 ) { *a3 = ((a2 - (unsigned long long)&stru_10000) >> 18) | 0xD8; a3[1] = (a2 - (unsigned long long)&stru_10000) >> 10; a3[2] = ((unsigned __int16)(a2 - (_QWORD)&stru_10000) >> 8) & 3 | 0xDC; a3[3] = a2 - (_QWORD)&stru_10000; return 4; } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (a2 & 0xF800) == 0xD800 ) { return 0; } else { *a3 = BYTE1(a2); a3[1] = a2; return 2; } } else { return (unsigned int)-102; } }
my_uni_utf16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0xffff JA 0x00161e5f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00161e08 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00161f22 LAB_00161e08: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xf800 CMP RAX,0xd800 JNZ 0x00161e26 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00161f22 LAB_00161e26: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00161f22 LAB_00161e5f: CMP qword ptr [RBP + -0x18],0x10ffff JA 0x00161f1b MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00161e87 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00161f22 LAB_00161e87: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX SHR RAX,0x12 MOVZX EAX,AL OR EAX,0xd8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 AND RAX,0x3 MOVZX EAX,AL OR EAX,0xdc MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x00161f22 LAB_00161f1b: MOV dword ptr [RBP + -0x4],0x0 LAB_00161f22: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_2 < 0x10000) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_2 & 0xf800) == 0xd800) { local_c = 0; } else { *param_3 = (byte)(param_2 >> 8); param_3[1] = (byte)param_2; local_c = 2; } } else if (param_2 < 0x110000) { if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else { param_2 = param_2 - 0x10000; *param_3 = (byte)(param_2 >> 0x12) | 0xd8; param_3[1] = (byte)(param_2 >> 10); param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc; param_3[3] = (byte)param_2; local_c = 4; } } else { local_c = 0; } return local_c; }
37,167
psi_prlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_pr_wrlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_prlock_wrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x2cc0cb(%rip), %r15 # 0x2f0a60 movq (%r15), %rax movq 0x68(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0x28ad9 movl %eax, %r14d testq %rbx, %rbx je 0x249cb movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_prlock_wrlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+68h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call rw_pr_wrlock mov r14d, eax test rbx, rbx jz short loc_249CB mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_249CB: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))( v6, *(_QWORD *)(a1 + 104), 1LL, a2, a3); v4 = rw_pr_wrlock(a1); if ( v3 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v3, v4); return v4; }
psi_prlock_wrlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x3f0a60] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x68] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x00128ad9 MOV R14D,EAX TEST RBX,RBX JZ 0x001249cb MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_001249cb: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3); uVar1 = rw_pr_wrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
37,168
expand_tilde
eloqsql/mysys/mf_pack.c
static char * expand_tilde(char **path) { if (path[0][0] == FN_LIBCHAR) return home_dir; /* ~/ expanded to home */ #ifdef HAVE_GETPWNAM { char *str,save; struct passwd *user_entry; if (!(str=strchr(*path,FN_LIBCHAR))) str=strend(*path); save= *str; *str= '\0'; user_entry=getpwnam(*path); *str=save; endpwent(); if (user_entry) { *path=str; return user_entry->pw_dir; } } #endif return (char *) 0; }
O0
c
expand_tilde: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x355de leaq 0x358536(%rip), %rax # 0x38db08 movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0x3565f movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x2f, %esi callq 0x24100 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x35609 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x7daf0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x241f0 movq %rax, -0x28(%rbp) movb -0x19(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, (%rax) callq 0x24330 cmpq $0x0, -0x28(%rbp) je 0x35657 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x3565f movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
expand_tilde: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_355DE lea rax, home_dir mov rax, [rax] mov [rbp+var_8], rax jmp loc_3565F loc_355DE: mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 2Fh ; '/' call _strchr mov [rbp+var_18], rax cmp rax, 0 jnz short loc_35609 mov rax, [rbp+var_10] mov rdi, [rax] call strend mov [rbp+var_18], rax loc_35609: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_19], al mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rdi, [rax] call _getpwnam mov [rbp+var_28], rax mov cl, [rbp+var_19] mov rax, [rbp+var_18] mov [rax], cl call _endpwent cmp [rbp+var_28], 0 jz short loc_35657 mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_28] mov rax, [rax+20h] mov [rbp+var_8], rax jmp short loc_3565F loc_35657: mov [rbp+var_8], 0 loc_3565F: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long expand_tilde(char **a1) { long long v2; // [rsp+8h] [rbp-28h] char v3; // [rsp+17h] [rbp-19h] char *v4; // [rsp+18h] [rbp-18h] if ( **a1 == 47 ) return home_dir; v4 = (char *)strchr(*a1, 47LL); if ( !v4 ) v4 = (char *)strend(*a1); v3 = *v4; *v4 = 0; v2 = getpwnam(*a1); *v4 = v3; endpwent(); if ( !v2 ) return 0LL; *a1 = v4; return *(_QWORD *)(v2 + 32); }
expand_tilde: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001355de LEA RAX,[0x48db08] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013565f LAB_001355de: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x2f CALL 0x00124100 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00135609 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0017daf0 MOV qword ptr [RBP + -0x18],RAX LAB_00135609: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001241f0 MOV qword ptr [RBP + -0x28],RAX MOV CL,byte ptr [RBP + -0x19] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL CALL 0x00124330 CMP qword ptr [RBP + -0x28],0x0 JZ 0x00135657 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013565f LAB_00135657: MOV qword ptr [RBP + -0x8],0x0 LAB_0013565f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * expand_tilde(int8 *param_1) { char cVar1; passwd *ppVar2; char *local_20; char *local_10; if (*(char *)*param_1 == '/') { local_10 = home_dir; } else { local_20 = strchr((char *)*param_1,0x2f); if (local_20 == (char *)0x0) { local_20 = (char *)strend(*param_1); } cVar1 = *local_20; *local_20 = '\0'; ppVar2 = getpwnam((char *)*param_1); *local_20 = cVar1; endpwent(); if (ppVar2 == (passwd *)0x0) { local_10 = (char *)0x0; } else { *param_1 = local_20; local_10 = ppVar2->pw_dir; } } return local_10; }
37,169
skip_all
eloqsql/libmariadb/unittest/mytap/tap.c
void skip_all(char const *reason, ...) { va_list ap; va_start(ap, reason); fprintf(tapout, "1..0 # skip "); vfprintf(tapout, reason, ap); va_end(ap); exit(0); }
O3
c
skip_all: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rdi, %rbx leaq -0xe0(%rbp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x174d9 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) leaq -0x30(%rbp), %r14 movq %rdi, 0x10(%r14) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r14) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%r14) movq 0x34ab3(%rip), %r15 # 0x4bfb0 movq (%r15), %rdi leaq 0x219b2(%rip), %rdx # 0x38eb9 movl $0x1, %esi xorl %eax, %eax callq 0x13740 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x13150 xorl %edi, %edi callq 0x13580
skip_all: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov rbx, rdi lea rdi, [rbp+var_E0] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_174D9 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_174D9: lea r14, [rbp+var_30] mov [r14+10h], rdi lea rax, [rbp+arg_0] mov [r14+8], rax mov rax, 3000000008h mov [r14], rax mov r15, cs:stdout_ptr mov rdi, [r15] lea rdx, a10Skip; "1..0 # skip " mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] mov esi, 1 mov rdx, rbx mov rcx, r14 call ___vfprintf_chk xor edi, edi call _exit
void __noreturn skip_all( 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, char a15) { char v15; // [rsp+0h] [rbp-E0h] BYREF long long v16; // [rsp+8h] [rbp-D8h] long long v17; // [rsp+10h] [rbp-D0h] long long v18; // [rsp+18h] [rbp-C8h] long long v19; // [rsp+20h] [rbp-C0h] long long v20; // [rsp+28h] [rbp-B8h] __m128 v21; // [rsp+30h] [rbp-B0h] __m128 v22; // [rsp+40h] [rbp-A0h] __m128 v23; // [rsp+50h] [rbp-90h] __m128 v24; // [rsp+60h] [rbp-80h] __m128 v25; // [rsp+70h] [rbp-70h] __m128 v26; // [rsp+80h] [rbp-60h] __m128 v27; // [rsp+90h] [rbp-50h] __m128 v28; // [rsp+A0h] [rbp-40h] _QWORD v29[6]; // [rsp+B0h] [rbp-30h] BYREF v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v16 = a2; v17 = a3; v18 = a4; v19 = a5; v20 = a6; v29[2] = &v15; v29[1] = &a15; v29[0] = 0x3000000008LL; __fprintf_chk(stdout, 1LL, "1..0 # skip "); __vfprintf_chk(stdout, 1LL, a1, v29); exit(0LL); }
skip_all: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV RBX,RDI LEA RDI,[RBP + -0xe0] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x001174d9 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_001174d9: LEA R14,[RBP + -0x30] MOV qword ptr [R14 + 0x10],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [R14 + 0x8],RAX MOV RAX,0x3000000008 MOV qword ptr [R14],RAX MOV R15,qword ptr [0x0014bfb0] MOV RDI,qword ptr [R15] LEA RDX,[0x138eb9] MOV ESI,0x1 XOR EAX,EAX CALL 0x00113740 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x00113150 XOR EDI,EDI CALL 0x00113580
void skip_all(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; int1 local_e8 [8]; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; puVar1 = PTR_stdout_0014bfb0; local_28 = local_e8; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_30 = &stack0x00000008; local_38 = 0x3000000008; local_e0 = param_10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; __fprintf_chk(*(int8 *)PTR_stdout_0014bfb0,1,"1..0 # skip "); __vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38); /* WARNING: Subroutine does not return */ exit(0); }
37,170
tailoring_append_abbreviation
eloqsql/strings/ctype.c
static int tailoring_append_abbreviation(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { size_t clen; const char *attrend= attr + len; my_wc_t wc; for ( ; (clen= scan_one_character(attr, attrend, &wc)) > 0; attr+= clen) { DBUG_ASSERT(attr < attrend); if (tailoring_append(st, fmt, clen, attr) != MY_XML_OK) return MY_XML_ERROR; } return MY_XML_OK; }
O0
c
tailoring_append_abbreviation: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x28(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rdi movq -0x38(%rbp), %rsi leaq -0x40(%rbp), %rdx callq 0x77470 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jbe 0x77456 jmp 0x77421 jmp 0x77423 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0x76f10 cmpl $0x0, %eax je 0x77446 movl $0x1, -0x4(%rbp) jmp 0x7745d jmp 0x77448 movq -0x30(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x77404 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
tailoring_append_abbreviation: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_28] add rax, [rbp+var_20] mov [rbp+var_38], rax loc_77404: mov rdi, [rbp+var_28] mov rsi, [rbp+var_38] lea rdx, [rbp+var_40] call scan_one_character mov [rbp+var_30], rax cmp rax, 0 jbe short loc_77456 jmp short $+2 loc_77421: jmp short $+2 loc_77423: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rcx, [rbp+var_28] call tailoring_append cmp eax, 0 jz short loc_77446 mov [rbp+var_4], 1 jmp short loc_7745D loc_77446: jmp short $+2 loc_77448: mov rax, [rbp+var_30] add rax, [rbp+var_28] mov [rbp+var_28], rax jmp short loc_77404 loc_77456: mov [rbp+var_4], 0 loc_7745D: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long tailoring_append_abbreviation(long long a1, const char *a2, long long a3, long long a4) { _BYTE v5[8]; // [rsp+0h] [rbp-40h] BYREF long long v6; // [rsp+8h] [rbp-38h] long long v7; // [rsp+10h] [rbp-30h] long long v8; // [rsp+18h] [rbp-28h] long long v9; // [rsp+20h] [rbp-20h] const char *v10; // [rsp+28h] [rbp-18h] long long v11; // [rsp+30h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v6 = a3 + a4; while ( 1 ) { v7 = scan_one_character(v8, v6, v5); if ( !v7 ) break; if ( (unsigned int)tailoring_append(v11, v10, v7, v8) ) return 1; v8 += v7; } return 0; }
tailoring_append_abbreviation: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX LAB_00177404: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x38] LEA RDX,[RBP + -0x40] CALL 0x00177470 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JBE 0x00177456 JMP 0x00177421 LAB_00177421: JMP 0x00177423 LAB_00177423: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] CALL 0x00176f10 CMP EAX,0x0 JZ 0x00177446 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0017745d LAB_00177446: JMP 0x00177448 LAB_00177448: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX JMP 0x00177404 LAB_00177456: MOV dword ptr [RBP + -0x4],0x0 LAB_0017745d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 tailoring_append_abbreviation(int8 param_1,int8 param_2,long param_3,long param_4) { int iVar1; int1 local_48 [8]; long local_40; long local_38; long local_30; long local_28; int8 local_20; int8 local_18; local_40 = param_4 + param_3; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; while( true ) { local_38 = scan_one_character(local_30,local_40,local_48); if (local_38 == 0) { return 0; } iVar1 = tailoring_append(local_18,local_20,local_38,local_30); if (iVar1 != 0) break; local_30 = local_38 + local_30; } return 1; }
37,171
ft_boolean_read_next
eloqsql/storage/myisam/ft_boolean_search.c
int ft_boolean_read_next(FT_INFO *ftb, char *record) { FTB_EXPR *ftbe; FTB_WORD *ftbw; MI_INFO *info=ftb->info; my_off_t curdoc; if (ftb->state != INDEX_SEARCH && ftb->state != INDEX_DONE) return -1; /* black magic ON */ if ((int) _mi_check_index(info, ftb->keynr) < 0) return my_errno; if (_mi_readinfo(info, F_RDLCK, 1)) return my_errno; /* black magic OFF */ if (!ftb->queue.elements) return my_errno=HA_ERR_END_OF_FILE; /* Attention!!! Address of a local variable is used here! See err: label */ ftb->queue.first_cmp_arg=(void *)&curdoc; while (ftb->state == INDEX_SEARCH && (curdoc=((FTB_WORD *)queue_top(& ftb->queue))->docid[0]) != HA_OFFSET_ERROR) { while (curdoc == (ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid[0]) { if (unlikely(_ftb_climb_the_tree(ftb, ftbw, 0))) { my_errno= HA_ERR_OUT_OF_MEM; goto err; } /* update queue */ _ft2_search(ftb, ftbw, 0); queue_replace_top(&ftb->queue); } ftbe=ftb->root; if (ftbe->docid[0]==curdoc && ftbe->cur_weight>0 && ftbe->yesses>=(ftbe->ythresh-ftbe->yweaks) && !ftbe->nos) { /* curdoc matched ! */ if (is_tree_inited(&ftb->no_dupes) && tree_insert(&ftb->no_dupes, &curdoc, 0, ftb->no_dupes.custom_arg)->count >1) /* but it managed already to get past this line once */ continue; info->lastpos=curdoc; /* Clear all states, except that the table was updated */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); if (!(*info->read_record)(info,curdoc, (uchar*) record)) { info->update|= HA_STATE_AKTIV; /* Record is read */ if (ftb->with_scan && ft_boolean_find_relevance(ftb,(uchar*) record,0)==0) continue; /* no match */ my_errno=0; goto err; } goto err; } } ftb->state=INDEX_DONE; my_errno=HA_ERR_END_OF_FILE; err: ftb->queue.first_cmp_arg=(void *)0; return my_errno; }
O3
c
ft_boolean_read_next: movl 0x348(%rdi), %ecx andl $-0x2, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x2, %ecx jne 0x71e6c pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x8(%rdi), %r15 movl 0x340(%rdi), %esi movq %r15, %rdi callq 0x84028 testl %eax, %eax js 0x71e57 movq %r15, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x7c823 testl %eax, %eax jne 0x71e57 cmpl $0x0, 0x80(%rbx) je 0x71e6d leaq -0x30(%rbp), %rax movq %rax, 0x78(%rbx) cmpl $0x2, 0x348(%rbx) jne 0x71e37 leaq 0x70(%rbx), %r12 leaq 0xa0(%rbx), %rax movq %rax, -0x38(%rbp) movq (%r12), %rax movq 0x8(%rax), %r13 movq 0x10(%r13), %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %rax je 0x71e37 movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x71e8c testl %eax, %eax jne 0x71e7f movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x72148 movq %r12, %rdi movl $0x1, %esi callq 0xa2401 movq -0x30(%rbp), %rsi movq 0x70(%rbx), %rax movq 0x8(%rax), %r13 cmpq 0x10(%r13), %rsi je 0x71d39 movq 0x18(%rbx), %rax cmpq %rsi, 0x10(%rax) jne 0x71da3 movss 0x2c(%rax), %xmm0 ucomiss 0x67278(%rip), %xmm0 # 0xd9008 jbe 0x71da3 movl 0x48(%rax), %ecx subl 0x4c(%rax), %ecx cmpl %ecx, 0x40(%rax) jb 0x71da3 cmpl $0x0, 0x44(%rax) je 0x71db5 cmpl $0x2, 0x348(%rbx) je 0x71d1f jmp 0x71e37 movq -0x38(%rbp), %rax cmpq $0x0, (%rax) je 0x71de2 movq 0x2d0(%rbx), %rcx movq -0x38(%rbp), %rdi leaq -0x30(%rbp), %rsi xorl %edx, %edx callq 0xa4852 testl $0x7ffffffe, 0x10(%rax) # imm = 0x7FFFFFFE jne 0x71da3 movq -0x30(%rbp), %rsi movq %rsi, 0x170(%r15) andl $0x401, 0x1d0(%r15) # imm = 0x401 movq %r15, %rdi movq %r14, %rdx callq *0x140(%r15) testl %eax, %eax jne 0x71e4f orb $0x2, 0x1d0(%r15) cmpb $0x0, 0x344(%rbx) je 0x71e87 xorl %r13d, %r13d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x2d4e8 ucomiss 0x671db(%rip), %xmm0 # 0xd9008 jne 0x71e47 jnp 0x71da3 jmp 0x71e47 movl $0x3, 0x348(%rbx) movl $0x89, %r13d callq 0xa1b22 movl %r13d, (%rax) movq $0x0, 0x78(%rbx) callq 0xa1b22 movl (%rax), %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa1b22 movl $0x89, (%rax) movl $0x89, %eax jmp 0x71e5e movl $0x80, %r13d jmp 0x71e47 xorl %r13d, %r13d jmp 0x71e47
ft_boolean_read_next: mov ecx, [rdi+348h] and ecx, 0FFFFFFFEh mov eax, 0FFFFFFFFh cmp ecx, 2 jnz locret_71E6C push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov r15, [rdi+8] mov esi, [rdi+340h] mov rdi, r15 call _mi_check_index test eax, eax js loc_71E57 mov rdi, r15 xor esi, esi mov edx, 1 call _mi_readinfo test eax, eax jnz loc_71E57 cmp dword ptr [rbx+80h], 0 jz loc_71E6D lea rax, [rbp-30h] mov [rbx+78h], rax cmp dword ptr [rbx+348h], 2 jnz loc_71E37 lea r12, [rbx+70h] lea rax, [rbx+0A0h] mov [rbp-38h], rax loc_71D1F: mov rax, [r12] mov r13, [rax+8] mov rax, [r13+10h] mov [rbp-30h], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_71E37 loc_71D39: mov rdi, rbx mov rsi, r13 xor edx, edx call _ftb_climb_the_tree test eax, eax jnz loc_71E7F mov rdi, rbx mov rsi, r13 xor edx, edx call _ft2_search mov rdi, r12 mov esi, 1 call _downheap mov rsi, [rbp-30h] mov rax, [rbx+70h] mov r13, [rax+8] cmp rsi, [r13+10h] jz short loc_71D39 mov rax, [rbx+18h] cmp [rax+10h], rsi jnz short loc_71DA3 movss xmm0, dword ptr [rax+2Ch] ucomiss xmm0, cs:dword_D9008 jbe short loc_71DA3 mov ecx, [rax+48h] sub ecx, [rax+4Ch] cmp [rax+40h], ecx jb short loc_71DA3 cmp dword ptr [rax+44h], 0 jz short loc_71DB5 loc_71DA3: cmp dword ptr [rbx+348h], 2 jz loc_71D1F jmp loc_71E37 loc_71DB5: mov rax, [rbp-38h] cmp qword ptr [rax], 0 jz short loc_71DE2 mov rcx, [rbx+2D0h] mov rdi, [rbp-38h] lea rsi, [rbp-30h] xor edx, edx call tree_insert test dword ptr [rax+10h], 7FFFFFFEh jnz short loc_71DA3 mov rsi, [rbp-30h] loc_71DE2: mov [r15+170h], rsi and dword ptr [r15+1D0h], 401h mov rdi, r15 mov rdx, r14 call qword ptr [r15+140h] test eax, eax jnz short loc_71E4F or byte ptr [r15+1D0h], 2 cmp byte ptr [rbx+344h], 0 jz short loc_71E87 xor r13d, r13d mov rdi, rbx mov rsi, r14 xor edx, edx call ft_boolean_find_relevance ucomiss xmm0, cs:dword_D9008 jnz short loc_71E47 jnp loc_71DA3 jmp short loc_71E47 loc_71E37: mov dword ptr [rbx+348h], 3 mov r13d, 89h loc_71E47: call _my_thread_var mov [rax], r13d loc_71E4F: mov qword ptr [rbx+78h], 0 loc_71E57: call _my_thread_var mov eax, [rax] loc_71E5E: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_71E6C: retn loc_71E6D: call _my_thread_var mov dword ptr [rax], 89h mov eax, 89h jmp short loc_71E5E loc_71E7F: mov r13d, 80h jmp short loc_71E47 loc_71E87: xor r13d, r13d jmp short loc_71E47
long long ft_boolean_read_next(long long a1, long long a2) { long long result; // rax long long v5; // r15 const char *v6; // rsi long long v7; // rdi long long v8; // r13 long long v9; // rax int v10; // r13d double relevance; // xmm0_8 _QWORD *v12; // [rsp-40h] [rbp-40h] _QWORD v13[7]; // [rsp-38h] [rbp-38h] BYREF result = 0xFFFFFFFFLL; if ( (*(_DWORD *)(a1 + 840) & 0xFFFFFFFE) == 2 ) { v5 = *(_QWORD *)(a1 + 8); v6 = (const char *)*(unsigned int *)(a1 + 832); v7 = v5; if ( (int)mi_check_index(v5, v6) < 0 ) return *(unsigned int *)my_thread_var(v7, v6); v7 = v5; v6 = 0LL; if ( (unsigned int)mi_readinfo(v5, 0LL, 1LL) ) return *(unsigned int *)my_thread_var(v7, v6); if ( !*(_DWORD *)(a1 + 128) ) { *(_DWORD *)my_thread_var(v5, 0LL) = 137; return 137LL; } *(_QWORD *)(a1 + 120) = v13; if ( *(_DWORD *)(a1 + 840) != 2 ) goto LABEL_23; v12 = (_QWORD *)(a1 + 160); while ( 2 ) { v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL); v13[0] = *(_QWORD *)(v8 + 16); if ( v13[0] == -1LL ) goto LABEL_23; do { v7 = a1; v6 = (const char *)v8; if ( (unsigned int)ftb_climb_the_tree(a1, v8, 0LL) ) { v10 = 128; goto LABEL_24; } ft2_search(a1, v8, 0LL); v7 = a1 + 112; downheap(a1 + 112, 1LL); v6 = (const char *)v13[0]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL); } while ( v13[0] == *(_QWORD *)(v8 + 16) ); v9 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v9 + 16) != v13[0] || *(float *)(v9 + 44) <= 0.0 || *(_DWORD *)(v9 + 64) < (unsigned int)(*(_DWORD *)(v9 + 72) - *(_DWORD *)(v9 + 76)) || *(_DWORD *)(v9 + 68) ) { LABEL_14: if ( *(_DWORD *)(a1 + 840) == 2 ) continue; LABEL_23: *(_DWORD *)(a1 + 840) = 3; v10 = 137; goto LABEL_24; } break; } if ( *v12 ) { v7 = a1 + 160; v6 = (const char *)v13; if ( (*(_DWORD *)(tree_insert(v12, v13, 0LL, *(_QWORD *)(a1 + 720)) + 16) & 0x7FFFFFFE) != 0 ) goto LABEL_14; v6 = (const char *)v13[0]; } *(_QWORD *)(v5 + 368) = v6; *(_DWORD *)(v5 + 464) &= 0x401u; v7 = v5; if ( (*(unsigned int ( **)(long long, const char *, long long))(v5 + 320))(v5, v6, a2) ) goto LABEL_25; *(_BYTE *)(v5 + 464) |= 2u; if ( !*(_BYTE *)(a1 + 836) ) { v10 = 0; LABEL_24: *(_DWORD *)my_thread_var(v7, v6) = v10; LABEL_25: *(_QWORD *)(a1 + 120) = 0LL; return *(unsigned int *)my_thread_var(v7, v6); } v10 = 0; v7 = a1; v6 = (const char *)a2; relevance = ft_boolean_find_relevance(a1, a2, 0); if ( *(float *)&relevance != 0.0 ) goto LABEL_24; goto LABEL_14; } return result; }
ft_boolean_read_next: MOV ECX,dword ptr [RDI + 0x348] AND ECX,0xfffffffe MOV EAX,0xffffffff CMP ECX,0x2 JNZ 0x00171e6c PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x8] MOV ESI,dword ptr [RDI + 0x340] MOV RDI,R15 CALL 0x00184028 TEST EAX,EAX JS 0x00171e57 MOV RDI,R15 XOR ESI,ESI MOV EDX,0x1 CALL 0x0017c823 TEST EAX,EAX JNZ 0x00171e57 CMP dword ptr [RBX + 0x80],0x0 JZ 0x00171e6d LEA RAX,[RBP + -0x30] MOV qword ptr [RBX + 0x78],RAX CMP dword ptr [RBX + 0x348],0x2 JNZ 0x00171e37 LEA R12,[RBX + 0x70] LEA RAX,[RBX + 0xa0] MOV qword ptr [RBP + -0x38],RAX LAB_00171d1f: MOV RAX,qword ptr [R12] MOV R13,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RBP + -0x30],RAX CMP RAX,-0x1 JZ 0x00171e37 LAB_00171d39: MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x00171e8c TEST EAX,EAX JNZ 0x00171e7f MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x00172148 MOV RDI,R12 MOV ESI,0x1 CALL 0x001a2401 MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBX + 0x70] MOV R13,qword ptr [RAX + 0x8] CMP RSI,qword ptr [R13 + 0x10] JZ 0x00171d39 MOV RAX,qword ptr [RBX + 0x18] CMP qword ptr [RAX + 0x10],RSI JNZ 0x00171da3 MOVSS XMM0,dword ptr [RAX + 0x2c] UCOMISS XMM0,dword ptr [0x001d9008] JBE 0x00171da3 MOV ECX,dword ptr [RAX + 0x48] SUB ECX,dword ptr [RAX + 0x4c] CMP dword ptr [RAX + 0x40],ECX JC 0x00171da3 CMP dword ptr [RAX + 0x44],0x0 JZ 0x00171db5 LAB_00171da3: CMP dword ptr [RBX + 0x348],0x2 JZ 0x00171d1f JMP 0x00171e37 LAB_00171db5: MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX],0x0 JZ 0x00171de2 MOV RCX,qword ptr [RBX + 0x2d0] MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x30] XOR EDX,EDX CALL 0x001a4852 TEST dword ptr [RAX + 0x10],0x7ffffffe JNZ 0x00171da3 MOV RSI,qword ptr [RBP + -0x30] LAB_00171de2: MOV qword ptr [R15 + 0x170],RSI AND dword ptr [R15 + 0x1d0],0x401 MOV RDI,R15 MOV RDX,R14 CALL qword ptr [R15 + 0x140] TEST EAX,EAX JNZ 0x00171e4f OR byte ptr [R15 + 0x1d0],0x2 CMP byte ptr [RBX + 0x344],0x0 JZ 0x00171e87 XOR R13D,R13D MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0012d4e8 UCOMISS XMM0,dword ptr [0x001d9008] JNZ 0x00171e47 JNP 0x00171da3 JMP 0x00171e47 LAB_00171e37: MOV dword ptr [RBX + 0x348],0x3 MOV R13D,0x89 LAB_00171e47: CALL 0x001a1b22 MOV dword ptr [RAX],R13D LAB_00171e4f: MOV qword ptr [RBX + 0x78],0x0 LAB_00171e57: CALL 0x001a1b22 MOV EAX,dword ptr [RAX] LAB_00171e5e: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00171e6c: RET LAB_00171e6d: CALL 0x001a1b22 MOV dword ptr [RAX],0x89 MOV EAX,0x89 JMP 0x00171e5e LAB_00171e7f: MOV R13D,0x80 JMP 0x00171e47 LAB_00171e87: XOR R13D,R13D JMP 0x00171e47
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int4 ft_boolean_read_next(long param_1,int8 param_2) { long lVar1; int iVar2; long lVar3; int4 *puVar4; int4 uVar5; float fVar6; long local_38; uVar5 = 0xffffffff; if ((*(uint *)(param_1 + 0x348) & 0xfffffffe) == 2) { lVar1 = *(long *)(param_1 + 8); iVar2 = _mi_check_index(lVar1,*(int4 *)(param_1 + 0x340)); if ((-1 < iVar2) && (iVar2 = _mi_readinfo(lVar1,0,1), iVar2 == 0)) { if (*(int *)(param_1 + 0x80) == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x89; return 0x89; } *(long **)(param_1 + 0x78) = &local_38; if (*(int *)(param_1 + 0x348) == 2) { do { lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8); local_38 = *(long *)(lVar3 + 0x10); if (local_38 == -1) break; do { iVar2 = _ftb_climb_the_tree(param_1,lVar3,0); if (iVar2 != 0) { uVar5 = 0x80; goto LAB_00171e47; } _ft2_search(param_1,lVar3,0); _downheap((long *)(param_1 + 0x70),1); lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8); } while (local_38 == *(long *)(lVar3 + 0x10)); lVar3 = *(long *)(param_1 + 0x18); if (((((*(long *)(lVar3 + 0x10) == local_38) && (_DAT_001d9008 < *(float *)(lVar3 + 0x2c)) ) && ((uint)(*(int *)(lVar3 + 0x48) - *(int *)(lVar3 + 0x4c)) <= *(uint *)(lVar3 + 0x40))) && (*(int *)(lVar3 + 0x44) == 0)) && ((*(long *)(param_1 + 0xa0) == 0 || (lVar3 = tree_insert((long *)(param_1 + 0xa0),&local_38,0, *(int8 *)(param_1 + 0x2d0)), (*(uint *)(lVar3 + 0x10) & 0x7ffffffe) == 0)))) { *(long *)(lVar1 + 0x170) = local_38; *(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) & 0x401; iVar2 = (**(code **)(lVar1 + 0x140))(lVar1,local_38,param_2); if (iVar2 != 0) goto LAB_00171e4f; *(byte *)(lVar1 + 0x1d0) = *(byte *)(lVar1 + 0x1d0) | 2; if (*(char *)(param_1 + 0x344) == '\0') { uVar5 = 0; goto LAB_00171e47; } fVar6 = (float)ft_boolean_find_relevance(param_1,param_2,0); uVar5 = 0; if ((fVar6 != _DAT_001d9008) || (uVar5 = 0, NAN(fVar6) || NAN(_DAT_001d9008))) goto LAB_00171e47; } } while (*(int *)(param_1 + 0x348) == 2); } *(int4 *)(param_1 + 0x348) = 3; uVar5 = 0x89; LAB_00171e47: puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar5; LAB_00171e4f: *(int8 *)(param_1 + 0x78) = 0; } puVar4 = (int4 *)_my_thread_var(); uVar5 = *puVar4; } return uVar5; }
37,172
CLI::detail::split_long(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Split_inl.hpp
CLI11_INLINE bool split_long(const std::string &current, std::string &name, std::string &value) { if(current.size() > 2 && current.substr(0, 2) == "--" && valid_first_char(current[2])) { auto loc = current.find_first_of('='); if(loc != std::string::npos) { name = current.substr(2, loc - 2); value = current.substr(loc + 1); } else { name = current.substr(2); value = ""; } return true; } return false; }
O0
cpp
CLI::detail::split_long(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x9410 movq %rax, %rcx movb $0x0, -0x41(%rbp) xorl %eax, %eax cmpq $0x2, %rcx movb %al, -0xc1(%rbp) jbe 0x37db2 movq -0x10(%rbp), %rsi xorl %eax, %eax movl %eax, %edx leaq -0x40(%rbp), %rdi movq %rdi, -0xd0(%rbp) movl $0x2, %ecx callq 0x9640 movq -0xd0(%rbp), %rdi movb $0x1, -0x41(%rbp) leaq 0x3796c(%rip), %rsi # 0x6f6e0 callq 0xd920 movb %al, -0xc2(%rbp) jmp 0x37d81 movb -0xc2(%rbp), %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0xc1(%rbp) jne 0x37d96 jmp 0x37db2 movq -0x10(%rbp), %rdi movl $0x2, %esi callq 0x96c0 movsbl (%rax), %edi callq 0x2ed90 movb %al, -0xc1(%rbp) movb -0xc1(%rbp), %al movb %al, -0xd1(%rbp) testb $0x1, -0x41(%rbp) jne 0x37dc6 jmp 0x37dcf leaq -0x40(%rbp), %rdi callq 0x9b90 movb -0xd1(%rbp), %al testb $0x1, %al jne 0x37dde jmp 0x37ed9 movq -0x10(%rbp), %rdi movl $0x3d, %esi xorl %eax, %eax movl %eax, %edx callq 0x93b0 movq %rax, -0x60(%rbp) cmpq $-0x1, -0x60(%rbp) je 0x37e8b movq -0x10(%rbp), %rsi movq -0x60(%rbp), %rcx subq $0x2, %rcx leaq -0x80(%rbp), %rdi movl $0x2, %edx callq 0x9640 movq -0x18(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x9790 leaq -0x80(%rbp), %rdi callq 0x9b90 movq -0x10(%rbp), %rsi movq -0x60(%rbp), %rdx addq $0x1, %rdx leaq -0xa0(%rbp), %rdi movq $-0x1, %rcx callq 0x9640 movq -0x20(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x9790 leaq -0xa0(%rbp), %rdi callq 0x9b90 jmp 0x37ed3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) testb $0x1, -0x41(%rbp) jne 0x37e80 jmp 0x37e89 leaq -0x40(%rbp), %rdi callq 0x9b90 jmp 0x37eeb movq -0x10(%rbp), %rsi leaq -0xc0(%rbp), %rdi movl $0x2, %edx movq $-0x1, %rcx callq 0x9640 movq -0x18(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0x9790 leaq -0xc0(%rbp), %rdi callq 0x9b90 movq -0x20(%rbp), %rdi leaq 0x38140(%rip), %rsi # 0x7000e callq 0x9870 movb $0x1, -0x1(%rbp) jmp 0x37edd movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xe0, %rsp popq %rbp retq movq -0x50(%rbp), %rdi callq 0x9a70 nopw %cs:(%rax,%rax) nop
_ZN3CLI6detail10split_longERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_S9_: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov [rbp+var_41], 0 xor eax, eax cmp rcx, 2 mov [rbp+var_C1], al jbe short loc_37DB2 mov rsi, [rbp+var_10] xor eax, eax mov edx, eax lea rdi, [rbp+var_40] mov [rbp+var_D0], rdi mov ecx, 2 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rbp+var_D0] mov [rbp+var_41], 1 lea rsi, asc_6F6E0; "--" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_C2], al jmp short $+2 loc_37D81: mov cl, [rbp+var_C2] xor eax, eax test cl, 1 mov [rbp+var_C1], al jnz short loc_37D96 jmp short loc_37DB2 loc_37D96: mov rdi, [rbp+var_10] mov esi, 2 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx edi, byte ptr [rax] call _ZN3CLI6detail16valid_first_charIcEEbT_; CLI::detail::valid_first_char<char>(char) mov [rbp+var_C1], al loc_37DB2: mov al, [rbp+var_C1] mov [rbp+var_D1], al test [rbp+var_41], 1 jnz short loc_37DC6 jmp short loc_37DCF loc_37DC6: lea rdi, [rbp+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_37DCF: mov al, [rbp+var_D1] test al, 1 jnz short loc_37DDE jmp loc_37ED9 loc_37DDE: mov rdi, [rbp+var_10] mov esi, 3Dh ; '=' xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13find_first_ofEcm; std::string::find_first_of(char,ulong) mov [rbp+var_60], rax cmp [rbp+var_60], 0FFFFFFFFFFFFFFFFh jz loc_37E8B mov rsi, [rbp+var_10] mov rcx, [rbp+var_60] sub rcx, 2 lea rdi, [rbp+var_80] mov edx, 2 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rbp+var_18] lea rsi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rsi, [rbp+var_10] mov rdx, [rbp+var_60] add rdx, 1 lea rdi, [rbp+var_A0] mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rbp+var_20] lea rsi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_37ED3 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax test [rbp+var_41], 1 jnz short loc_37E80 jmp short loc_37E89 loc_37E80: lea rdi, [rbp+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_37E89: jmp short loc_37EEB loc_37E8B: mov rsi, [rbp+var_10] lea rdi, [rbp+var_C0] mov edx, 2 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rbp+var_18] lea rsi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_20] lea rsi, asc_7000C+2; "" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) loc_37ED3: mov [rbp+var_1], 1 jmp short loc_37EDD loc_37ED9: mov [rbp+var_1], 0 loc_37EDD: mov al, [rbp+var_1] and al, 1 add rsp, 0E0h pop rbp retn loc_37EEB: mov rdi, [rbp+var_50] call __Unwind_Resume
char CLI::detail::split_long(long long a1, long long a2, long long a3) { char *v3; // rax bool valid; // [rsp+1Fh] [rbp-C1h] _BYTE v6[32]; // [rsp+20h] [rbp-C0h] BYREF _BYTE v7[32]; // [rsp+40h] [rbp-A0h] BYREF _BYTE v8[32]; // [rsp+60h] [rbp-80h] BYREF long long first_of; // [rsp+80h] [rbp-60h] char v10; // [rsp+9Fh] [rbp-41h] _BYTE v11[32]; // [rsp+A0h] [rbp-40h] BYREF long long v12; // [rsp+C0h] [rbp-20h] long long v13; // [rsp+C8h] [rbp-18h] long long v14; // [rsp+D0h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v10 = 0; valid = 0; if ( (unsigned long long)std::string::size(a1) > 2 ) { std::string::substr(v11, v14, 0LL, 2LL); v10 = 1; valid = 0; if ( std::operator==<char>((long long)v11, (long long)"--") ) { v3 = (char *)std::string::operator[](v14, 2LL); valid = CLI::detail::valid_first_char<char>(*v3); } } if ( (v10 & 1) != 0 ) std::string::~string(v11); if ( !valid ) return 0; first_of = std::string::find_first_of(v14, 61LL, 0LL); if ( first_of == -1 ) { std::string::substr(v6, v14, 2LL, -1LL); std::string::operator=(v13); std::string::~string(v6); std::string::operator=(v12, ""); } else { std::string::substr(v8, v14, 2LL, first_of - 2); std::string::operator=(v13); std::string::~string(v8); std::string::substr(v7, v14, first_of + 1, -1LL); std::string::operator=(v12); std::string::~string(v7); } return 1; }
split_long: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00109410 MOV RCX,RAX MOV byte ptr [RBP + -0x41],0x0 XOR EAX,EAX CMP RCX,0x2 MOV byte ptr [RBP + -0xc1],AL JBE 0x00137db2 MOV RSI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV EDX,EAX LEA RDI,[RBP + -0x40] MOV qword ptr [RBP + -0xd0],RDI MOV ECX,0x2 CALL 0x00109640 MOV RDI,qword ptr [RBP + -0xd0] MOV byte ptr [RBP + -0x41],0x1 LAB_00137d6d: LEA RSI,[0x16f6e0] CALL 0x0010d920 LAB_00137d79: MOV byte ptr [RBP + -0xc2],AL JMP 0x00137d81 LAB_00137d81: MOV CL,byte ptr [RBP + -0xc2] XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RBP + -0xc1],AL JNZ 0x00137d96 JMP 0x00137db2 LAB_00137d96: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 CALL 0x001096c0 MOVSX EDI,byte ptr [RAX] CALL 0x0012ed90 MOV byte ptr [RBP + -0xc1],AL LAB_00137db2: MOV AL,byte ptr [RBP + -0xc1] MOV byte ptr [RBP + -0xd1],AL TEST byte ptr [RBP + -0x41],0x1 JNZ 0x00137dc6 JMP 0x00137dcf LAB_00137dc6: LEA RDI,[RBP + -0x40] CALL 0x00109b90 LAB_00137dcf: MOV AL,byte ptr [RBP + -0xd1] TEST AL,0x1 JNZ 0x00137dde JMP 0x00137ed9 LAB_00137dde: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x3d XOR EAX,EAX MOV EDX,EAX CALL 0x001093b0 MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x60],-0x1 JZ 0x00137e8b MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x60] SUB RCX,0x2 LEA RDI,[RBP + -0x80] MOV EDX,0x2 CALL 0x00109640 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x80] CALL 0x00109790 LEA RDI,[RBP + -0x80] CALL 0x00109b90 MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x60] ADD RDX,0x1 LEA RDI,[RBP + -0xa0] MOV RCX,-0x1 CALL 0x00109640 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xa0] CALL 0x00109790 LEA RDI,[RBP + -0xa0] CALL 0x00109b90 JMP 0x00137ed3 LAB_00137e8b: MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0xc0] MOV EDX,0x2 MOV RCX,-0x1 CALL 0x00109640 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0xc0] CALL 0x00109790 LEA RDI,[RBP + -0xc0] CALL 0x00109b90 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[0x17000e] CALL 0x00109870 LAB_00137ed3: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00137edd LAB_00137ed9: MOV byte ptr [RBP + -0x1],0x0 LAB_00137edd: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xe0 POP RBP RET
/* CLI::detail::split_long(std::__cxx11::string const&, std::__cxx11::string&, std::__cxx11::string&) */ int8 CLI::detail::split_long(string *param_1,string *param_2,string *param_3) { bool bVar1; ulong uVar2; char *pcVar3; int7 extraout_var; int7 extraout_var_00; int7 uVar4; int7 extraout_var_01; int7 extraout_var_02; bool local_c9; string local_c8 [32]; string local_a8 [32]; string local_88 [32]; long local_68; byte local_49; string local_48 [32]; string *local_28; string *local_20; string *local_18; int1 local_9; local_28 = param_3; local_20 = param_2; local_18 = param_1; uVar2 = std::__cxx11::string::size(); local_49 = 0; uVar4 = 0; local_c9 = false; if (2 < uVar2) { std::__cxx11::string::substr((ulong)local_48,(ulong)local_18); local_49 = 1; /* try { // try from 00137d6d to 00137d78 has its CatchHandler @ 00137e6c */ bVar1 = std::operator==(local_48,"--"); uVar4 = 0; local_c9 = false; if (bVar1) { pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_18); local_c9 = valid_first_char<char>(*pcVar3); uVar4 = extraout_var; } } if ((local_49 & 1) != 0) { std::__cxx11::string::~string(local_48); uVar4 = extraout_var_00; } if (local_c9 == false) { local_9 = 0; } else { local_68 = std::__cxx11::string::find_first_of((char)local_18,0x3d); if (local_68 == -1) { std::__cxx11::string::substr((ulong)local_c8,(ulong)local_18); std::__cxx11::string::operator=(local_20,local_c8); std::__cxx11::string::~string(local_c8); std::__cxx11::string::operator=(local_28,""); uVar4 = extraout_var_02; } else { std::__cxx11::string::substr((ulong)local_88,(ulong)local_18); std::__cxx11::string::operator=(local_20,local_88); std::__cxx11::string::~string(local_88); std::__cxx11::string::substr((ulong)local_a8,(ulong)local_18); std::__cxx11::string::operator=(local_28,local_a8); std::__cxx11::string::~string(local_a8); uVar4 = extraout_var_01; } local_9 = 1; } return CONCAT71(uVar4,local_9); }
37,173
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x235d28(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x53672 leaq 0x235cda(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xbef30 movl %eax, -0x34(%rbp) leaq 0x235ca9(%rip), %rax # 0x289300 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5368b movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xbef30 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_53672 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_5368B loc_53672: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_5368B: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8); if ( v8 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13); v9 = my_open(v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00153672 LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001bef30 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x389300] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015368b LAB_00153672: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001bef30 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0015368b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
37,174
js_free_shape0
bluesky950520[P]quickjs/quickjs.c
static void js_free_shape0(JSRuntime *rt, JSShape *sh) { uint32_t i; JSShapeProperty *pr; assert(sh->header.ref_count == 0); if (sh->is_hashed) js_shape_hash_unlink(rt, sh); if (sh->proto != NULL) { JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_OBJECT, sh->proto)); } pr = get_shape_prop(sh); for(i = 0; i < sh->prop_count; i++) { JS_FreeAtomRT(rt, pr->atom); pr++; } remove_gc_object(&sh->header); js_free_rt(rt, get_alloc_from_shape(sh)); }
O0
c
js_free_shape0: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x28(%rsp), %rax cmpb $0x0, 0x18(%rax) je 0x639f8 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x63ab0 movq 0x28(%rsp), %rax cmpq $0x0, 0x38(%rax) je 0x63a2f movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x8(%rsp) movq $-0x1, 0x10(%rsp) movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x2a000 movq 0x28(%rsp), %rdi callq 0x32570 movq %rax, 0x18(%rsp) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x28(%rcx), %eax jae 0x63a81 movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rax movl 0x4(%rax), %esi callq 0x2a090 movq 0x18(%rsp), %rax addq $0x8, %rax movq %rax, 0x18(%rsp) movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x63a46 movq 0x28(%rsp), %rdi callq 0x2e1d0 movq 0x30(%rsp), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rdi callq 0x63b50 movq (%rsp), %rdi movq %rax, %rsi callq 0x27c50 addq $0x38, %rsp retq nop
js_free_shape0: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_10] cmp byte ptr [rax+18h], 0 jz short loc_639F8 mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call js_shape_hash_unlink loc_639F8: mov rax, [rsp+38h+var_10] cmp qword ptr [rax+38h], 0 jz short loc_63A2F mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rax, [rax+38h] mov [rsp+38h+var_30], rax mov [rsp+38h+var_28], 0FFFFFFFFFFFFFFFFh mov rsi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] call JS_FreeValueRT loc_63A2F: mov rdi, [rsp+38h+var_10] call get_shape_prop mov [rsp+38h+var_20], rax mov [rsp+38h+var_14], 0 loc_63A46: mov eax, [rsp+38h+var_14] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+28h] jnb short loc_63A81 mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_20] mov esi, [rax+4] call JS_FreeAtomRT mov rax, [rsp+38h+var_20] add rax, 8 mov [rsp+38h+var_20], rax mov eax, [rsp+38h+var_14] add eax, 1 mov [rsp+38h+var_14], eax jmp short loc_63A46 loc_63A81: mov rdi, [rsp+38h+var_10] call remove_gc_object mov rax, [rsp+38h+var_8] mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_10] call get_alloc_from_shape mov rdi, [rsp+38h+var_38] mov rsi, rax call js_free_rt add rsp, 38h retn
void js_free_shape0(long long a1, long long a2) { long long alloc_from_shape; // rax long long shape_prop; // [rsp+18h] [rbp-20h] unsigned int i; // [rsp+24h] [rbp-14h] if ( *(_BYTE *)(a2 + 24) ) js_shape_hash_unlink(a1, a2); if ( *(_QWORD *)(a2 + 56) ) JS_FreeValueRT(a1, *(_DWORD **)(a2 + 56), -1LL); shape_prop = get_shape_prop(a2); for ( i = 0; i < *(_DWORD *)(a2 + 40); ++i ) { JS_FreeAtomRT(a1, *(_DWORD *)(shape_prop + 4)); shape_prop += 8LL; } remove_gc_object(a2); alloc_from_shape = get_alloc_from_shape(a2); js_free_rt(a1, alloc_from_shape); }
js_free_shape0: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x28] CMP byte ptr [RAX + 0x18],0x0 JZ 0x001639f8 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00163ab0 LAB_001639f8: MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00163a2f MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],-0x1 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0012a000 LAB_00163a2f: MOV RDI,qword ptr [RSP + 0x28] CALL 0x00132570 MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x24],0x0 LAB_00163a46: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x28] JNC 0x00163a81 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RAX + 0x4] CALL 0x0012a090 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x8 MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x00163a46 LAB_00163a81: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0012e1d0 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x00163b50 MOV RDI,qword ptr [RSP] MOV RSI,RAX CALL 0x00127c50 ADD RSP,0x38 RET
void js_free_shape0(int8 param_1,long param_2) { int8 uVar1; int8 local_20; int4 local_14; if (*(char *)(param_2 + 0x18) != '\0') { js_shape_hash_unlink(param_1,param_2); } if (*(long *)(param_2 + 0x38) != 0) { JS_FreeValueRT(param_1,*(int8 *)(param_2 + 0x38),0xffffffffffffffff); } local_20 = get_shape_prop(param_2); for (local_14 = 0; local_14 < *(uint *)(param_2 + 0x28); local_14 = local_14 + 1) { JS_FreeAtomRT(param_1,*(int4 *)(local_20 + 4)); local_20 = local_20 + 8; } remove_gc_object(param_2); uVar1 = get_alloc_from_shape(param_2); js_free_rt(param_1,uVar1); return; }
37,175
ma_crypt_data_post_read_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_post_read_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; const uchar page_type= args->page[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; if (res == 0) { const uchar *src= args->page; uchar* dst= args->crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version= uint4korr(src + key_version_offset); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - decrypt page */ res= ma_decrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, key_version); /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 clear key version to get correct crc */ int4store(dst + key_version_offset, 0); } if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } return maria_page_crc_check_data(res, args); }
O0
c
ma_crypt_data_post_read_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax movb %al, -0x1d(%rbp) movzbl -0x1d(%rbp), %edx movl $0x8, %eax movl $0xc, %ecx cmpl $0x2, %edx cmovlel %ecx, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x4(%rbp) jne 0x89066 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x30(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x30(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x48(%rbp) movzbl -0x1d(%rbp), %eax cmpl $0x2, %eax jg 0x88faf movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movl %eax, -0x6c(%rbp) jmp 0x88fbf movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax movl %eax, -0x6c(%rbp) movl -0x6c(%rbp), %eax movl %eax, -0x4c(%rbp) movl $0x4, -0x50(%rbp) movq -0x30(%rbp), %rax movl -0x24(%rbp), %ecx movl (%rax,%rcx), %eax movl %eax, -0x54(%rbp) movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x4c(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x30(%rbp), %rdx movl -0x4c(%rbp), %eax addq %rax, %rdx movq -0x38(%rbp), %rcx movl -0x4c(%rbp), %eax addq %rax, %rcx movl -0x1c(%rbp), %r8d movl -0x4c(%rbp), %eax addl $0x4, %eax subl %eax, %r8d movl -0x3c(%rbp), %r9d movq -0x48(%rbp), %r10 movl -0x54(%rbp), %eax movq %r10, (%rsp) movl %eax, 0x8(%rsp) callq 0x89840 movl %eax, -0x4(%rbp) movq -0x38(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x38(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl $0x0, (%rax) jmp 0x89066 movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x890a0 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x68(%rbp), %rdi callq 0xf9d70 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq 0x3f770 addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_crypt_data_post_read_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] movzx eax, byte ptr [rax+7] and eax, 7 mov [rbp+var_1D], al movzx edx, [rbp+var_1D] mov eax, 8 mov ecx, 0Ch cmp edx, 2 cmovle eax, ecx mov [rbp+var_24], eax cmp [rbp+var_4], 0 jnz loc_89066 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_30] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_48], rax movzx eax, [rbp+var_1D] cmp eax, 2 jg short loc_88FAF mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 0Ch mov [rbp+var_6C], eax jmp short loc_88FBF loc_88FAF: mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 8 mov [rbp+var_6C], eax loc_88FBF: mov eax, [rbp+var_6C] mov [rbp+var_4C], eax mov [rbp+var_50], 4 mov rax, [rbp+var_30] mov ecx, [rbp+var_24] mov eax, [rax+rcx] mov [rbp+var_54], eax mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] mov eax, [rbp+var_4C] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_30] mov eax, [rbp+var_4C] add rdx, rax mov rcx, [rbp+var_38] mov eax, [rbp+var_4C] add rcx, rax mov r8d, [rbp+var_1C] mov eax, [rbp+var_4C] add eax, 4 sub r8d, eax mov r9d, [rbp+var_3C] mov r10, [rbp+var_48] mov eax, [rbp+var_54] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], eax call ma_decrypt mov [rbp+var_4], eax mov rax, [rbp+var_38] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_30] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_38] mov ecx, [rbp+var_24] add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov dword ptr [rax], 0 jmp short $+2 loc_89066: mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jz short loc_890A0 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rdi, [rbp+var_68] call my_free loc_890A0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call maria_page_crc_check_data add rsp, 80h pop rbp retn
char ma_crypt_data_post_read_hook(int a1, long long *a2) { int v2; // eax unsigned int v3; // eax long long v5; // [rsp+18h] [rbp-68h] int v6; // [rsp+2Ch] [rbp-54h] unsigned int v7; // [rsp+34h] [rbp-4Ch] unsigned long long v8; // [rsp+38h] [rbp-48h] int v9; // [rsp+44h] [rbp-3Ch] long long v10; // [rsp+48h] [rbp-38h] unsigned __int16 *v11; // [rsp+50h] [rbp-30h] unsigned int v12; // [rsp+5Ch] [rbp-24h] unsigned __int8 v13; // [rsp+63h] [rbp-1Dh] unsigned int v14; // [rsp+64h] [rbp-1Ch] long long v15; // [rsp+68h] [rbp-18h] int v16; // [rsp+7Ch] [rbp-4h] v16 = a1; v15 = a2[2]; v14 = *(_DWORD *)(v15 + 1980); v13 = *(_BYTE *)(*a2 + 7) & 7; v2 = 8; if ( v13 <= 2u ) v2 = 12; v12 = v2; if ( !a1 ) { v11 = (unsigned __int16 *)*a2; v10 = a2[3]; v9 = a2[1]; v8 = *(unsigned int *)((char *)v11 + 3) | ((unsigned long long)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) << 32); if ( v13 > 2u ) v3 = *(_DWORD *)(v15 + 3096) + 8; else v3 = *(_DWORD *)(v15 + 3096) + 12; v7 = v3; v6 = *(_DWORD *)((char *)v11 + v12); memcpy(v10, v11, v3); v16 = ma_decrypt( v15, *(_QWORD *)(v15 + 3104), v7 + (unsigned int)v11, v7 + (unsigned int)v10, v14 - (v7 + 4), v9, v8, v6); *(_DWORD *)(v10 + v14 - 4) = *(_DWORD *)((char *)v11 + v14 - 4); *(_DWORD *)(v12 + v10) = 0; } if ( a2[3] ) { v5 = *a2; *a2 = a2[3]; a2[3] = 0LL; my_free(v5); } return maria_page_crc_check_data(v16, a2); }
ma_crypt_data_post_read_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 MOV byte ptr [RBP + -0x1d],AL MOVZX EDX,byte ptr [RBP + -0x1d] MOV EAX,0x8 MOV ECX,0xc CMP EDX,0x2 CMOVLE EAX,ECX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x4],0x0 JNZ 0x00189066 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOVZX EAX,byte ptr [RBP + -0x1d] CMP EAX,0x2 JG 0x00188faf MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV dword ptr [RBP + -0x6c],EAX JMP 0x00188fbf LAB_00188faf: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 MOV dword ptr [RBP + -0x6c],EAX LAB_00188fbf: MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x4c],EAX MOV dword ptr [RBP + -0x50],0x4 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x54],EAX MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX CALL 0x0012a0b0 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x4c] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x4c] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x4 SUB R8D,EAX MOV R9D,dword ptr [RBP + -0x3c] MOV R10,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x54] MOV qword ptr [RSP],R10 MOV dword ptr [RSP + 0x8],EAX CALL 0x00189840 MOV dword ptr [RBP + -0x4],EAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0x0 JMP 0x00189066 LAB_00189066: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JZ 0x001890a0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x001f9d70 LAB_001890a0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0013f770 ADD RSP,0x80 POP RBP RET
void ma_crypt_data_post_read_hook(int param_1,long *param_2) { uint uVar1; int4 uVar2; int4 uVar3; long lVar4; int3 *__src; void *__dest; ulong uVar5; int3 uVar6; byte bVar7; uint uVar8; uint local_74; int local_c; lVar4 = param_2[2]; uVar1 = *(uint *)(lVar4 + 0x7bc); bVar7 = *(byte *)(*param_2 + 7) & 7; uVar8 = 8; if (bVar7 < 3) { uVar8 = 0xc; } local_c = param_1; if (param_1 == 0) { __src = (int3 *)*param_2; __dest = (void *)param_2[3]; uVar5 = param_2[1]; uVar6 = *__src; uVar2 = *(int4 *)((long)__src + 3); if (bVar7 < 3) { local_74 = *(int *)(lVar4 + 0xc18) + 0xc; } else { local_74 = *(int *)(lVar4 + 0xc18) + 8; } uVar3 = *(int4 *)((long)__src + (ulong)uVar8); memcpy(__dest,__src,(ulong)local_74); local_c = ma_decrypt(lVar4,*(int8 *)(lVar4 + 0xc20),(long)__src + (ulong)local_74, (long)__dest + (ulong)local_74,uVar1 - (local_74 + 4),uVar5 & 0xffffffff, (ulong)CONCAT34(uVar6,uVar2),uVar3); *(int4 *)((long)__dest + ((ulong)uVar1 - 4)) = *(int4 *)((long)__src + ((ulong)uVar1 - 4)); *(int4 *)((long)__dest + (ulong)uVar8) = 0; } if (param_2[3] != 0) { lVar4 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar4); } maria_page_crc_check_data(local_c,param_2); return; }
37,176
my_fill_mb2
eloqsql/strings/ctype-ucs2.c
static void my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill) { char buf[10], *last; size_t buflen, remainder; DBUG_ASSERT((slen % 2) == 0); buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); /* "last" in the last position where a sequence of "buflen" bytes can start. */ for (last= s + slen - buflen; s <= last; s+= buflen) { /* Enough space for the character */ memcpy(s, buf, buflen); } /* If there are some more space which is not enough for the whole multibyte character, then add trailing zeros. */ if ((remainder= last + buflen - s) > 0) bzero(s, (size_t) remainder); }
O0
c
my_fill_mb2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) jmp 0x5f806 movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x20(%rbp), %rdi movslq -0x34(%rbp), %rsi leaq -0x12(%rbp), %rdx leaq -0x12(%rbp), %rcx addq $0xa, %rcx callq *%rax cltq movq %rax, -0x48(%rbp) jmp 0x5f833 movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax xorl %ecx, %ecx subq -0x48(%rbp), %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0x5f871 movq -0x28(%rbp), %rdi leaq -0x12(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0x24200 movq -0x48(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x5f848 movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq %rax, -0x50(%rbp) cmpq $0x0, %rax jbe 0x5f899 movq -0x28(%rbp), %rdi movq -0x50(%rbp), %rdx xorl %esi, %esi callq 0x24180 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5f8b1 addq $0x50, %rsp popq %rbp retq callq 0x24300 nopw %cs:(%rax,%rax)
my_fill_mb2: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx jmp short $+2 loc_5F806: mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_20] movsxd rsi, [rbp+var_34] lea rdx, [rbp+var_12] lea rcx, [rbp+var_12] add rcx, 0Ah call rax cdqe mov [rbp+var_48], rax jmp short $+2 loc_5F833: mov rax, [rbp+var_28] add rax, [rbp+var_30] xor ecx, ecx sub rcx, [rbp+var_48] add rax, rcx mov [rbp+var_40], rax loc_5F848: mov rax, [rbp+var_28] cmp rax, [rbp+var_40] ja short loc_5F871 mov rdi, [rbp+var_28] lea rsi, [rbp+var_12] mov rdx, [rbp+var_48] call _memcpy mov rax, [rbp+var_48] add rax, [rbp+var_28] mov [rbp+var_28], rax jmp short loc_5F848 loc_5F871: mov rax, [rbp+var_40] add rax, [rbp+var_48] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_50], rax cmp rax, 0 jbe short loc_5F899 mov rdi, [rbp+var_28] mov rdx, [rbp+var_50] xor esi, esi call _memset loc_5F899: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5F8B1 add rsp, 50h pop rbp retn loc_5F8B1: call ___stack_chk_fail
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4) { long long i; // [rsp+8h] [rbp-48h] unsigned long long v7; // [rsp+28h] [rbp-28h] _BYTE v8[10]; // [rsp+3Eh] [rbp-12h] BYREF unsigned long long v9; // [rsp+48h] [rbp-8h] BYREF v9 = __readfsqword(0x28u); v7 = a2; for ( i = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a4, v8, &v9); v7 <= a3 + a2 - i; v7 += i ) memcpy(v7, v8, i); if ( a3 + a2 != v7 ) memset(v7, 0LL, a3 + a2 - v7); return __readfsqword(0x28u); }
my_fill_mb2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX JMP 0x0015f806 LAB_0015f806: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x20] MOVSXD RSI,dword ptr [RBP + -0x34] LEA RDX,[RBP + -0x12] LEA RCX,[RBP + -0x12] ADD RCX,0xa CALL RAX CDQE MOV qword ptr [RBP + -0x48],RAX JMP 0x0015f833 LAB_0015f833: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x48] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_0015f848: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x40] JA 0x0015f871 MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x12] MOV RDX,qword ptr [RBP + -0x48] CALL 0x00124200 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX JMP 0x0015f848 LAB_0015f871: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JBE 0x0015f899 MOV RDI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] XOR ESI,ESI CALL 0x00124180 LAB_0015f899: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015f8b1 ADD RSP,0x50 POP RBP RET LAB_0015f8b1: CALL 0x00124300
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4) { int iVar1; size_t sVar2; void *pvVar3; long in_FS_OFFSET; void *local_30; int1 local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_1a); sVar2 = (size_t)iVar1; pvVar3 = (void *)((long)param_2 + (param_3 - sVar2)); for (local_30 = param_2; local_30 <= pvVar3; local_30 = (void *)(sVar2 + (long)local_30)) { memcpy(local_30,local_1a,sVar2); } sVar2 = (long)pvVar3 + (sVar2 - (long)local_30); if (sVar2 != 0) { memset(local_30,0,sVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
37,177
my_fill_mb2
eloqsql/strings/ctype-ucs2.c
static void my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill) { char buf[10], *last; size_t buflen, remainder; DBUG_ASSERT((slen % 2) == 0); buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); /* "last" in the last position where a sequence of "buflen" bytes can start. */ for (last= s + slen - buflen; s <= last; s+= buflen) { /* Enough space for the character */ memcpy(s, buf, buflen); } /* If there are some more space which is not enough for the whole multibyte character, then add trailing zeros. */ if ((remainder= last + buflen - s) > 0) bzero(s, (size_t) remainder); }
O3
c
my_fill_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movslq %ecx, %rsi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0x30(%rax) movslq %eax, %r15 addq %r14, %rbx movq %rbx, %r13 subq %r15, %r13 cmpq %r14, %r13 jb 0x4a34b leaq -0x3a(%rbp), %r12 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x24220 addq %r15, %r14 cmpq %r13, %r14 jbe 0x4a335 subq %r14, %rbx je 0x4a35d movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x24180 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4a37b addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24350
my_fill_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] movsxd rsi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+30h] movsxd r15, eax add rbx, r14 mov r13, rbx sub r13, r15 cmp r13, r14 jb short loc_4A34B lea r12, [rbp+var_3A] loc_4A335: mov rdi, r14 mov rsi, r12 mov rdx, r15 call _memcpy add r14, r15 cmp r14, r13 jbe short loc_4A335 loc_4A34B: sub rbx, r14 jz short loc_4A35D mov rdi, r14 xor esi, esi mov rdx, rbx call _memset loc_4A35D: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4A37B add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4A37B: call ___stack_chk_fail
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4) { unsigned long long v5; // r14 long long v6; // r15 long long v7; // rbx long long v8; // rbx _BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v11[0] = __readfsqword(0x28u); v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a4, v10, v11); v7 = a2 + a3; if ( v7 - v6 >= a2 ) { do { memcpy(v5, v10, v6); v5 += v6; } while ( v5 <= v7 - v6 ); } v8 = v7 - v5; if ( v8 ) memset(v5, 0LL, v8); return __readfsqword(0x28u); }
my_fill_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOVSXD RSI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0x30] MOVSXD R15,EAX ADD RBX,R14 MOV R13,RBX SUB R13,R15 CMP R13,R14 JC 0x0014a34b LEA R12,[RBP + -0x3a] LAB_0014a335: MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x00124220 ADD R14,R15 CMP R14,R13 JBE 0x0014a335 LAB_0014a34b: SUB RBX,R14 JZ 0x0014a35d MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX CALL 0x00124180 LAB_0014a35d: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014a37b ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014a37b: CALL 0x00124350
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4) { int iVar1; void *pvVar2; void *__dest; size_t sVar3; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38); sVar3 = (size_t)iVar1; pvVar2 = (void *)((long)param_2 + (param_3 - sVar3)); __dest = param_2; if (param_2 <= pvVar2) { do { memcpy(__dest,local_42,sVar3); __dest = (void *)((long)__dest + sVar3); } while (__dest <= pvVar2); } sVar3 = (long)param_2 + (param_3 - (long)__dest); if (sVar3 != 0) { memset(__dest,0,sVar3); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
37,178
std::optional<std::vector<int, std::allocator<int>>> mjXUtil::ReadAttrVec<int>(tinyxml2::XMLElement*, char const*, bool)
aimrt_mujoco_sim/_deps/mujoco-src/src/xml/xml_util.cc
std::optional<std::vector<T>> mjXUtil::ReadAttrVec(XMLElement* elem, const char* attr, bool required) { std::vector<T> vec; ReadAttrValues<T>(elem, attr, [&](int i, T num) { vec.push_back(num); }); if (!vec.size()) { if (required) { throw mjXError(elem, "required attribute missing: '%s'", attr); } else { return std::nullopt; } } return vec; }
O0
cpp
std::optional<std::vector<int, std::allocator<int>>> mjXUtil::ReadAttrVec<int>(tinyxml2::XMLElement*, char const*, bool): subq $0xb8, %rsp movq %rdi, 0x10(%rsp) movb %cl, %al movq %rdi, %rcx movq %rcx, 0x18(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) andb $0x1, %al movb %al, 0x9f(%rsp) leaq 0x80(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x3231b0 movq 0x20(%rsp), %rax movq 0xa8(%rsp), %rcx movq %rcx, 0x28(%rsp) movq 0xa0(%rsp), %rcx movq %rcx, 0x30(%rsp) movq %rax, 0x58(%rsp) leaq 0x60(%rsp), %rdi movq %rdi, 0x38(%rsp) leaq 0x58(%rsp), %rsi callq 0x46df30 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x46cc20 jmp 0x46de0c leaq 0x60(%rsp), %rdi callq 0x46dfc0 leaq 0x80(%rsp), %rdi callq 0x30f720 cmpq $0x0, %rax jne 0x46dee3 testb $0x1, 0x9f(%rsp) je 0x46decf movl $0x3e8, %edi # imm = 0x3E8 callq 0x4c0c0 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x8(%rsp) movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rcx leaq 0xc2610(%rip), %rdx # 0x530477 xorl %r8d, %r8d callq 0x469920 jmp 0x46de71 movq 0x8(%rsp), %rdi leaq 0x18a8d3(%rip), %rsi # 0x5f8750 xorl %eax, %eax movl %eax, %edx callq 0x4c0d0 jmp 0x46df2e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x60(%rsp), %rdi callq 0x46dfc0 jmp 0x46df17 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) callq 0x4c0e0 jmp 0x46df17 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x46df17 movq 0x10(%rsp), %rdi callq 0x314b90 movl $0x1, 0x44(%rsp) jmp 0x46defd movq 0x10(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x314bb0 movl $0x1, 0x44(%rsp) leaq 0x80(%rsp), %rdi callq 0x30c590 movq 0x18(%rsp), %rax addq $0xb8, %rsp retq leaq 0x80(%rsp), %rdi callq 0x30c590 movq 0x50(%rsp), %rdi callq 0x4a070 nop
_ZN7mjXUtil11ReadAttrVecIiEESt8optionalISt6vectorIT_SaIS3_EEEPN8tinyxml210XMLElementEPKcb: sub rsp, 0B8h mov qword ptr [rsp+0B8h+var_A8], rdi; int mov al, cl mov rcx, rdi mov qword ptr [rsp+0B8h+var_A0], rcx; int mov qword ptr [rsp+0B8h+var_8], rdi; int mov [rsp+0B8h+var_10], rsi; int mov [rsp+0B8h+var_18], rdx; int and al, 1 mov [rsp+0B8h+var_19], al lea rdi, [rsp+0B8h+var_38] mov qword ptr [rsp+0B8h+var_98], rdi; int call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rax, qword ptr [rsp+0B8h+var_98] mov rcx, [rsp+0B8h+var_10] mov qword ptr [rsp+0B8h+var_90], rcx; int mov rcx, [rsp+0B8h+var_18] mov qword ptr [rsp+0B8h+var_88], rcx; int mov qword ptr [rsp+0B8h+var_60], rax; int lea rdi, [rsp+0B8h+var_58] mov qword ptr [rsp+0B8h+var_80], rdi; int lea rsi, [rsp+0B8h+var_60] call _ZNSt8functionIFviiEEC2IZN7mjXUtil11ReadAttrVecIiEESt8optionalISt6vectorIT_SaIS7_EEEPN8tinyxml210XMLElementEPKcbEUliiE_vEEOS7_; std::function<void ()(int,int)>::function<mjXUtil::ReadAttrVec<int>(tinyxml2::XMLElement *,char const*,bool)::{lambda(int,int)#1},void>(int&&) mov rdi, qword ptr [rsp+0B8h+var_90]; int mov rsi, qword ptr [rsp+0B8h+var_88]; int mov rdx, qword ptr [rsp+0B8h+var_80]; int mov ecx, 0FFFFFFFFh; int call _ZN7mjXUtil14ReadAttrValuesIiEEbPN8tinyxml210XMLElementEPKcSt8functionIFviT_EEi; mjXUtil::ReadAttrValues<int>(tinyxml2::XMLElement *,char const*,std::function<void ()(int,int)>,int) jmp short $+2 loc_46DE0C: lea rdi, [rsp+0B8h+var_58] call _ZNSt8functionIFviiEED2Ev; std::function<void ()(int,int)>::~function() lea rdi, [rsp+0B8h+var_38] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) cmp rax, 0 jnz loc_46DEE3 test [rsp+0B8h+var_19], 1 jz loc_46DECF mov edi, 3E8h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_B0], rax mov rsi, [rsp+0B8h+var_10]; tinyxml2::XMLElement * mov rcx, [rsp+0B8h+var_18]; char * lea rdx, aRequiredAttrib; "required attribute missing: '%s'" xor r8d, r8d; int call _ZN8mjXErrorC2EPKN8tinyxml210XMLElementEPKcS5_i; mjXError::mjXError(tinyxml2::XMLElement const*,char const*,char const*,int) jmp short $+2 loc_46DE71: mov rdi, [rsp+0B8h+var_B0]; void * lea rsi, _ZTI8mjXError; lptinfo xor eax, eax mov edx, eax; void (*)(void *) call ___cxa_throw jmp loc_46DF2E mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_58] call _ZNSt8functionIFviiEED2Ev; std::function<void ()(int,int)>::~function() jmp short loc_46DF17 mov rdi, [rsp+arg_0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax call ___cxa_free_exception jmp short loc_46DF17 mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax jmp short loc_46DF17 loc_46DECF: mov rdi, qword ptr [rsp+0B8h+var_A8] call _ZNSt8optionalISt6vectorIiSaIiEEEC2ESt9nullopt_t; std::optional<std::vector<int>>::optional(std::nullopt_t) mov [rsp+0B8h+var_74], 1 jmp short loc_46DEFD loc_46DEE3: mov rdi, qword ptr [rsp+0B8h+var_A8] lea rsi, [rsp+0B8h+var_38] call _ZNSt8optionalISt6vectorIiSaIiEEEC2IS2_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_IS7_ISt10in_place_tSE_EESt16is_constructibleIS2_JSA_EESt14is_convertibleISA_S2_EEEbE4typeELb1EEEOSA_ mov [rsp+0B8h+var_74], 1 loc_46DEFD: lea rdi, [rsp+0B8h+var_38] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rax, qword ptr [rsp+0B8h+var_A0] add rsp, 0B8h retn loc_46DF17: lea rdi, [rsp+arg_78] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rsp+arg_48] call __Unwind_Resume loc_46DF2E: xchg ax, ax
long long mjXUtil::ReadAttrVec<int>(long long a1, tinyxml2::XMLElement *a2, char *a3, char a4) { double v4; // xmm0_8 int v5; // r9d mjXError *exception; // [rsp+8h] [rbp-B0h] tinyxml2::XMLElement *v8; // [rsp+28h] [rbp-90h] char *v9; // [rsp+30h] [rbp-88h] int v10[2]; // [rsp+58h] [rbp-60h] BYREF int v11[8]; // [rsp+60h] [rbp-58h] BYREF long long v12[3]; // [rsp+80h] [rbp-38h] BYREF char v13; // [rsp+9Fh] [rbp-19h] char *v14; // [rsp+A0h] [rbp-18h] tinyxml2::XMLElement *v15; // [rsp+A8h] [rbp-10h] int v16[2]; // [rsp+B0h] [rbp-8h] *(_QWORD *)v16 = a1; v15 = a2; v14 = a3; v13 = a4 & 1; std::vector<int>::vector((long long)v12); v8 = v15; v9 = v14; *(_QWORD *)v10 = v12; v4 = std::function<void ()(int,int)>::function<std::optional<std::vector<int>> mjXUtil::ReadAttrVec<int>(tinyxml2::XMLElement *,char const*,bool)::{lambda(int,int)#1},void>( v11, v10); mjXUtil::ReadAttrValues<int>(v8, v9, (long long)v11, -1, v4); std::function<void ()(int,int)>::~function(v11); if ( std::vector<int>::size(v12) ) { ZNSt8optionalISt6vectorIiSaIiEEEC2IS2_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS3_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES6_IS7_ISt10in_place_tSE_EESt16is_constructibleIS2_JSA_EESt14is_convertibleISA_S2_EEEbE4typeELb1EEEOSA_(); } else { if ( (v13 & 1) != 0 ) { exception = (mjXError *)__cxa_allocate_exception(0x3E8uLL); mjXError::mjXError(exception, v15, "required attribute missing: '%s'", v14, 0, v5); __cxa_throw(exception, (struct type_info *)&`typeinfo for'mjXError, 0LL); } std::optional<std::vector<int>>::optional(a1); } std::vector<int>::~vector(v12); return a1; }
construct<MC::mcVec3f,MC::mcVec3f>: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX MOV RAX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RSP + -0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV ECX,dword ptr [RCX + 0x8] MOV dword ptr [RAX + 0x8],ECX RET
/* void __gnu_cxx::new_allocator<MC::mcVec3f>::construct<MC::mcVec3f, MC::mcVec3f>(MC::mcVec3f*, MC::mcVec3f&&) */ void __thiscall __gnu_cxx::new_allocator<MC::mcVec3f>::construct<MC::mcVec3f,MC::mcVec3f> (new_allocator<MC::mcVec3f> *this,mcVec3f *param_1,mcVec3f *param_2) { *(int8 *)param_1 = *(int8 *)param_2; *(int4 *)(param_1 + 8) = *(int4 *)(param_2 + 8); return; }
37,179
mariadb_compress
eloqsql/libmariadb/libmariadb/ma_compress.c
my_bool _mariadb_compress(NET *net, unsigned char *packet, size_t *len, size_t *complen) { if (*len < MIN_COMPRESS_LENGTH || !compression_plugin(net)) *complen=0; else { unsigned char *compbuf=_mariadb_compress_alloc(net,packet,len,complen); if (!compbuf) return *complen ? 0 : 1; memcpy(packet,compbuf,*len); free(compbuf); } return 0; }
O3
c
mariadb_compress: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx cmpq $0x96, (%rdx) jb 0x1eaf2 movq 0x2a0(%rdi), %rax cmpq $0x0, 0x10(%rax) je 0x1eaf2 movq %rdx, %r15 movq %rsi, %r14 movq %rbx, %rcx callq 0x1eb0d testq %rax, %rax je 0x1eb04 movq %rax, %r12 movq (%r15), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x13390 movq %r12, %rdi callq 0x13570 jmp 0x1eaf9 movq $0x0, (%rbx) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq $0x0, (%rbx) sete %al jmp 0x1eafb
_mariadb_compress: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx cmp qword ptr [rdx], 96h jb short loc_1EAF2 mov rax, [rdi+2A0h] cmp qword ptr [rax+10h], 0 jz short loc_1EAF2 mov r15, rdx mov r14, rsi mov rcx, rbx call _mariadb_compress_alloc test rax, rax jz short loc_1EB04 mov r12, rax mov rdx, [r15] mov rdi, r14 mov rsi, rax call _memcpy mov rdi, r12 call _free jmp short loc_1EAF9 loc_1EAF2: mov qword ptr [rbx], 0 loc_1EAF9: xor eax, eax loc_1EAFB: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1EB04: cmp qword ptr [rbx], 0 setz al jmp short loc_1EAFB
_BOOL8 mariadb_compress(long long a1, long long a2, _QWORD *a3, _QWORD *a4) { long long v6; // rax long long v7; // r12 if ( *a3 < 0x96uLL || !*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) ) { *a4 = 0LL; return 0LL; } v6 = mariadb_compress_alloc(a1, a2, a3, a4); if ( v6 ) { v7 = v6; memcpy(a2, v6, *a3); free(v7); return 0LL; } return *a4 == 0LL; }
_mariadb_compress: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX CMP qword ptr [RDX],0x96 JC 0x0011eaf2 MOV RAX,qword ptr [RDI + 0x2a0] CMP qword ptr [RAX + 0x10],0x0 JZ 0x0011eaf2 MOV R15,RDX MOV R14,RSI MOV RCX,RBX CALL 0x0011eb0d TEST RAX,RAX JZ 0x0011eb04 MOV R12,RAX MOV RDX,qword ptr [R15] MOV RDI,R14 MOV RSI,RAX CALL 0x00113390 MOV RDI,R12 CALL 0x00113570 JMP 0x0011eaf9 LAB_0011eaf2: MOV qword ptr [RBX],0x0 LAB_0011eaf9: XOR EAX,EAX LAB_0011eafb: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011eb04: CMP qword ptr [RBX],0x0 SETZ AL JMP 0x0011eafb
bool _mariadb_compress(long param_1,void *param_2,size_t *param_3,long *param_4) { void *__src; if ((*param_3 < 0x96) || (*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) == 0)) { *param_4 = 0; } else { __src = (void *)_mariadb_compress_alloc(); if (__src == (void *)0x0) { return *param_4 == 0; } memcpy(param_2,__src,*param_3); free(__src); } return false; }
37,180
get_simple_key_cache_statistics
eloqsql/mysys/mf_keycache.c
static void get_simple_key_cache_statistics(SIMPLE_KEY_CACHE_CB *keycache, uint partition_no __attribute__((unused)), KEY_CACHE_STATISTICS *keycache_stats) { DBUG_ENTER("simple_get_key_cache_statistics"); keycache_stats->mem_size= (longlong) keycache->key_cache_mem_size; keycache_stats->block_size= (longlong) keycache->key_cache_block_size; keycache_stats->blocks_used= keycache->blocks_used; keycache_stats->blocks_unused= keycache->blocks_unused; keycache_stats->blocks_changed= keycache->global_blocks_changed; keycache_stats->blocks_warm= keycache->warm_blocks; keycache_stats->read_requests= keycache->global_cache_r_requests; keycache_stats->reads= keycache->global_cache_read; keycache_stats->write_requests= keycache->global_cache_w_requests; keycache_stats->writes= keycache->global_cache_write; DBUG_VOID_RETURN; }
O0
c
get_simple_key_cache_statistics: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movl 0x18(%rax), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq 0x50(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x58(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax movq 0x138(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x8(%rbp), %rax movq 0x150(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax movq 0x158(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x8(%rbp), %rax movq 0x140(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rax movq 0x148(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x48(%rax) jmp 0xf11b0 popq %rbp retq nopw %cs:(%rax,%rax)
get_simple_key_cache_statistics: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rcx, [rax+8] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_8] mov eax, [rax+18h] mov ecx, eax mov rax, [rbp+var_18] mov [rax+8], rcx mov rax, [rbp+var_8] mov rcx, [rax+50h] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rax, [rbp+var_8] mov rcx, [rax+58h] mov rax, [rbp+var_18] mov [rax+18h], rcx mov rax, [rbp+var_8] mov rcx, [rax+138h] mov rax, [rbp+var_18] mov [rax+20h], rcx mov rax, [rbp+var_8] mov rcx, [rax+68h] mov rax, [rbp+var_18] mov [rax+28h], rcx mov rax, [rbp+var_8] mov rcx, [rax+150h] mov rax, [rbp+var_18] mov [rax+30h], rcx mov rax, [rbp+var_8] mov rcx, [rax+158h] mov rax, [rbp+var_18] mov [rax+38h], rcx mov rax, [rbp+var_8] mov rcx, [rax+140h] mov rax, [rbp+var_18] mov [rax+40h], rcx mov rax, [rbp+var_8] mov rcx, [rax+148h] mov rax, [rbp+var_18] mov [rax+48h], rcx jmp short $+2 loc_F11B0: pop rbp retn
_QWORD * get_simple_key_cache_statistics(long long a1, long long a2, _QWORD *a3) { _QWORD *result; // rax *a3 = *(_QWORD *)(a1 + 8); a3[1] = *(unsigned int *)(a1 + 24); a3[2] = *(_QWORD *)(a1 + 80); a3[3] = *(_QWORD *)(a1 + 88); a3[4] = *(_QWORD *)(a1 + 312); a3[5] = *(_QWORD *)(a1 + 104); a3[6] = *(_QWORD *)(a1 + 336); a3[7] = *(_QWORD *)(a1 + 344); a3[8] = *(_QWORD *)(a1 + 320); result = a3; a3[9] = *(_QWORD *)(a1 + 328); return result; }
get_simple_key_cache_statistics: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x150] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x158] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x140] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x148] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],RCX JMP 0x001f11b0 LAB_001f11b0: POP RBP RET
void get_simple_key_cache_statistics(long param_1,int8 param_2,int8 *param_3) { *param_3 = *(int8 *)(param_1 + 8); param_3[1] = (ulong)*(uint *)(param_1 + 0x18); param_3[2] = *(int8 *)(param_1 + 0x50); param_3[3] = *(int8 *)(param_1 + 0x58); param_3[4] = *(int8 *)(param_1 + 0x138); param_3[5] = *(int8 *)(param_1 + 0x68); param_3[6] = *(int8 *)(param_1 + 0x150); param_3[7] = *(int8 *)(param_1 + 0x158); param_3[8] = *(int8 *)(param_1 + 0x140); param_3[9] = *(int8 *)(param_1 + 0x148); return; }
37,181
get_simple_key_cache_statistics
eloqsql/mysys/mf_keycache.c
static void get_simple_key_cache_statistics(SIMPLE_KEY_CACHE_CB *keycache, uint partition_no __attribute__((unused)), KEY_CACHE_STATISTICS *keycache_stats) { DBUG_ENTER("simple_get_key_cache_statistics"); keycache_stats->mem_size= (longlong) keycache->key_cache_mem_size; keycache_stats->block_size= (longlong) keycache->key_cache_block_size; keycache_stats->blocks_used= keycache->blocks_used; keycache_stats->blocks_unused= keycache->blocks_unused; keycache_stats->blocks_changed= keycache->global_blocks_changed; keycache_stats->blocks_warm= keycache->warm_blocks; keycache_stats->read_requests= keycache->global_cache_r_requests; keycache_stats->reads= keycache->global_cache_read; keycache_stats->write_requests= keycache->global_cache_w_requests; keycache_stats->writes= keycache->global_cache_write; DBUG_VOID_RETURN; }
O3
c
get_simple_key_cache_statistics: pushq %rbp movq %rsp, %rbp movq 0x8(%rdi), %rax movq %rax, (%rdx) movl 0x18(%rdi), %eax movq %rax, 0x8(%rdx) movq 0x50(%rdi), %rax movq %rax, 0x10(%rdx) movq 0x58(%rdi), %rax movq %rax, 0x18(%rdx) movq 0x138(%rdi), %rax movq %rax, 0x20(%rdx) movq 0x68(%rdi), %rax movq %rax, 0x28(%rdx) movq 0x150(%rdi), %rax movq %rax, 0x30(%rdx) movq 0x158(%rdi), %rax movq %rax, 0x38(%rdx) movq 0x140(%rdi), %rax movq %rax, 0x40(%rdx) movq 0x148(%rdi), %rax movq %rax, 0x48(%rdx) popq %rbp retq
get_simple_key_cache_statistics: push rbp mov rbp, rsp mov rax, [rdi+8] mov [rdx], rax mov eax, [rdi+18h] mov [rdx+8], rax mov rax, [rdi+50h] mov [rdx+10h], rax mov rax, [rdi+58h] mov [rdx+18h], rax mov rax, [rdi+138h] mov [rdx+20h], rax mov rax, [rdi+68h] mov [rdx+28h], rax mov rax, [rdi+150h] mov [rdx+30h], rax mov rax, [rdi+158h] mov [rdx+38h], rax mov rax, [rdi+140h] mov [rdx+40h], rax mov rax, [rdi+148h] mov [rdx+48h], rax pop rbp retn
long long get_simple_key_cache_statistics(long long a1, long long a2, _QWORD *a3) { long long result; // rax *a3 = *(_QWORD *)(a1 + 8); a3[1] = *(unsigned int *)(a1 + 24); a3[2] = *(_QWORD *)(a1 + 80); a3[3] = *(_QWORD *)(a1 + 88); a3[4] = *(_QWORD *)(a1 + 312); a3[5] = *(_QWORD *)(a1 + 104); a3[6] = *(_QWORD *)(a1 + 336); a3[7] = *(_QWORD *)(a1 + 344); a3[8] = *(_QWORD *)(a1 + 320); result = *(_QWORD *)(a1 + 328); a3[9] = result; return result; }
get_simple_key_cache_statistics: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RDX],RAX MOV EAX,dword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RAX MOV RAX,qword ptr [RDI + 0x50] MOV qword ptr [RDX + 0x10],RAX MOV RAX,qword ptr [RDI + 0x58] MOV qword ptr [RDX + 0x18],RAX MOV RAX,qword ptr [RDI + 0x138] MOV qword ptr [RDX + 0x20],RAX MOV RAX,qword ptr [RDI + 0x68] MOV qword ptr [RDX + 0x28],RAX MOV RAX,qword ptr [RDI + 0x150] MOV qword ptr [RDX + 0x30],RAX MOV RAX,qword ptr [RDI + 0x158] MOV qword ptr [RDX + 0x38],RAX MOV RAX,qword ptr [RDI + 0x140] MOV qword ptr [RDX + 0x40],RAX MOV RAX,qword ptr [RDI + 0x148] MOV qword ptr [RDX + 0x48],RAX POP RBP RET
void get_simple_key_cache_statistics(long param_1,int8 param_2,int8 *param_3) { *param_3 = *(int8 *)(param_1 + 8); param_3[1] = (ulong)*(uint *)(param_1 + 0x18); param_3[2] = *(int8 *)(param_1 + 0x50); param_3[3] = *(int8 *)(param_1 + 0x58); param_3[4] = *(int8 *)(param_1 + 0x138); param_3[5] = *(int8 *)(param_1 + 0x68); param_3[6] = *(int8 *)(param_1 + 0x150); param_3[7] = *(int8 *)(param_1 + 0x158); param_3[8] = *(int8 *)(param_1 + 0x140); param_3[9] = *(int8 *)(param_1 + 0x148); return; }
37,182
google::protobuf::compiler::python::Generator::PrintServiceStub(google::protobuf::ServiceDescriptor const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
void Generator::PrintServiceStub(const ServiceDescriptor& descriptor) const { // Print the service stub. printer_->Print( "$class_name$_Stub = " "service_reflection.GeneratedServiceStubType(" "'$class_name$_Stub', ($class_name$,), dict(\n", "class_name", descriptor.name()); printer_->Indent(); Generator::PrintDescriptorKeyAndModuleName(descriptor); printer_->Print("))\n\n"); printer_->Outdent(); }
O0
cpp
google::protobuf::compiler::python::Generator::PrintServiceStub(google::protobuf::ServiceDescriptor const&) const: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x58(%rax), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi callq 0x7dfe0 movq 0x8(%rsp), %rdi movq %rax, %rcx leaq 0x2fd81d(%rip), %rsi # 0x3b6517 leaq 0x2f569b(%rip), %rdx # 0x3ae39c callq 0x6ec00 movq 0x10(%rsp), %rax movq 0x58(%rax), %rdi callq 0x323ec0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xb8f50 movq 0x10(%rsp), %rax movq 0x58(%rax), %rdi leaq 0x2fd7df(%rip), %rsi # 0x3b6512 callq 0x39230 movq 0x10(%rsp), %rax movq 0x58(%rax), %rdi callq 0x323ee0 addq $0x28, %rsp retq nopl (%rax,%rax)
_ZNK6google8protobuf8compiler6python9Generator16PrintServiceStubERKNS0_17ServiceDescriptorE: 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_18], rax mov rax, [rax+58h] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_10] call _ZNK6google8protobuf17ServiceDescriptor4nameB5cxx11Ev; google::protobuf::ServiceDescriptor::name(void) mov rdi, [rsp+28h+var_20] mov rcx, rax lea rsi, aClassNameStubS; "$class_name$_Stub = service_reflection."... lea rdx, aFullReflection_0+10h; "class_name" call _ZN6google8protobuf2io7Printer5PrintIJA11_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [11],std::string>(char const*,char [11],std::string const&) mov rax, [rsp+28h+var_18] mov rdi, [rax+58h]; this call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void) mov rdi, [rsp+28h+var_18]; this mov rsi, [rsp+28h+var_10]; google::protobuf::ServiceDescriptor * call _ZNK6google8protobuf8compiler6python9Generator31PrintDescriptorKeyAndModuleNameERKNS0_17ServiceDescriptorE; google::protobuf::compiler::python::Generator::PrintDescriptorKeyAndModuleName(google::protobuf::ServiceDescriptor const&) mov rax, [rsp+28h+var_18] mov rdi, [rax+58h] lea rsi, asc_3B6512; "))\n\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ mov rax, [rsp+28h+var_18] mov rdi, [rax+58h]; this call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void) add rsp, 28h retn
long long google::protobuf::compiler::python::Generator::PrintServiceStub( google::protobuf::compiler::python::Generator *this, const google::protobuf::ServiceDescriptor *a2) { long long v2; // rax long long v4; // [rsp+8h] [rbp-20h] v4 = *((_QWORD *)this + 11); v2 = google::protobuf::ServiceDescriptor::name[abi:cxx11]((long long)a2); google::protobuf::io::Printer::Print<char [11],std::string>( v4, (long long)"$class_name$_Stub = service_reflection.GeneratedServiceStubType('$class_name$_Stub', ($class_name$,), dict(\n", "class_name", v2); google::protobuf::io::Printer::Indent(*((google::protobuf::io::Printer **)this + 11)); google::protobuf::compiler::python::Generator::PrintDescriptorKeyAndModuleName(this, a2); google::protobuf::io::Printer::Print<>(*((_QWORD *)this + 11), (long long)"))\n\n"); return google::protobuf::io::Printer::Outdent(*((google::protobuf::io::Printer **)this + 11)); }
PrintServiceStub: 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 + 0x10],RAX MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x0017dfe0 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,RAX LEA RSI,[0x4b6517] LEA RDX,[0x4ae39c] CALL 0x0016ec00 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x58] CALL 0x00423ec0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001b8f50 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x58] LEA RSI,[0x4b6512] CALL 0x00139230 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x58] CALL 0x00423ee0 ADD RSP,0x28 RET
/* google::protobuf::compiler::python::Generator::PrintServiceStub(google::protobuf::ServiceDescriptor const&) const */ void __thiscall google::protobuf::compiler::python::Generator::PrintServiceStub (Generator *this,ServiceDescriptor *param_1) { Printer *this_00; string *psVar1; this_00 = *(Printer **)(this + 0x58); psVar1 = (string *)ServiceDescriptor::name_abi_cxx11_(param_1); io::Printer::Print<char[11],std::__cxx11::string> (this_00, "$class_name$_Stub = service_reflection.GeneratedServiceStubType(\'$class_name$_Stub\', ($class_name$,), dict(\n" ,"class_name",psVar1); io::Printer::Indent(*(Printer **)(this + 0x58)); PrintDescriptorKeyAndModuleName(this,param_1); io::Printer::Print<>(*(Printer **)(this + 0x58),"))\n\n"); io::Printer::Outdent(*(Printer **)(this + 0x58)); return; }
37,183
common_sampler_print[abi:cxx11](common_sampler const*)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_print(const struct common_sampler * gsmpl) { std::string result = "logits "; for (int i = 0; i < llama_sampler_chain_n(gsmpl->chain); i++) { const auto * smpl = llama_sampler_chain_get(gsmpl->chain, i); result += std::string("-> ") + llama_sampler_name(smpl) + " "; } return result; }
O3
cpp
common_sampler_print[abi:cxx11](common_sampler const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 leaq 0x10(%rdi), %rax movq %rax, 0x8(%rsp) movq %rax, (%rdi) leaq 0x2164a(%rip), %rsi # 0xf3e36 leaq 0x2164a(%rip), %rdx # 0xf3e3d movq %rdi, 0x10(%rsp) callq 0x289be leaq 0x48(%rsp), %rbx xorl %ebp, %ebp leaq 0x28(%rsp), %r12 leaq 0x58(%rsp), %r13 movq 0x140(%r14), %rdi callq 0x1bfe0 cmpl %eax, %ebp jge 0xd2960 movq 0x140(%r14), %rdi movl %ebp, %esi callq 0x1b9f0 movq %rax, %r15 leaq 0x68(%rsp), %rax movq %rax, 0x58(%rsp) movq %r13, %rdi leaq 0x27d25(%rip), %rsi # 0xfa56c leaq 0x27d21(%rip), %rdx # 0xfa56f callq 0x289be movq %r15, %rdi callq 0x1b370 movq %r13, %rdi movq %rax, %rsi callq 0x1c160 movq %rbx, 0x38(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xd2889 movq %rdx, 0x38(%rsp) movq (%rcx), %rdx movq %rdx, 0x48(%rsp) jmp 0xd288f movups (%rcx), %xmm0 movups %xmm0, (%rbx) movq 0x8(%rax), %rdx movq %rdx, 0x40(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x38(%rsp), %rdi leaq 0x21da2(%rip), %rsi # 0xf4655 callq 0x1c160 movq %r12, 0x18(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xd28db movq %rdx, 0x18(%rsp) movq (%rcx), %rdx movq %rdx, 0x28(%rsp) jmp 0xd28e3 movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x20(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x10(%rsp), %rdi callq 0x1b270 movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0xd2926 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b910 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0xd293d movq 0x48(%rsp), %rsi incq %rsi callq 0x1b910 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0xd2959 movq 0x68(%rsp), %rsi incq %rsi callq 0x1b910 incl %ebp jmp 0xd280e movq 0x10(%rsp), %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd29b0 movq %rax, %r14 movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0xd2995 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xd2995 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0xd29b8 movq 0x48(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0xd29b8 jmp 0xd29b0 movq %rax, %r14 jmp 0xd29d4 movq %rax, %r14 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rax cmpq %rax, %rdi je 0xd29d4 movq 0x68(%rsp), %rsi incq %rsi callq 0x1b910 movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq (%rcx), %rdi cmpq %rax, %rdi je 0xd29f1 movq (%rax), %rsi incq %rsi callq 0x1b910 movq %r14, %rdi callq 0x1bff0
_Z20common_sampler_printB5cxx11PK14common_sampler: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi lea rax, [rdi+10h] mov [rsp+0A8h+var_A0], rax mov [rdi], rax lea rsi, aLogits+2; "logits " lea rdx, aLogits+9; "" mov [rsp+0A8h+var_98], rdi 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 rbx, [rsp+0A8h+var_60] xor ebp, ebp lea r12, [rsp+0A8h+var_80] lea r13, [rsp+0A8h+var_50] loc_D280E: mov rdi, [r14+140h] call _llama_sampler_chain_n cmp ebp, eax jge loc_D2960 mov rdi, [r14+140h] mov esi, ebp call _llama_sampler_chain_get mov r15, rax lea rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_50], rax mov rdi, r13 lea rsi, asc_FA56C; "-> " lea rdx, asc_FA56C+3; "" 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, r15 call _llama_sampler_name mov rdi, r13 mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+0A8h+var_70], rbx mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_D2889 mov [rsp+0A8h+var_70], rdx mov rdx, [rcx] mov [rsp+0A8h+var_60], rdx jmp short loc_D288F loc_D2889: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbx], xmm0 loc_D288F: mov rdx, [rax+8] mov [rsp+0A8h+var_68], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+0A8h+var_70] lea rsi, aForMessageInMe+144h; " " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+0A8h+var_90], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_D28DB mov [rsp+0A8h+var_90], rdx mov rdx, [rcx] mov [rsp+0A8h+var_80], rdx jmp short loc_D28E3 loc_D28DB: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_D28E3: mov rdx, [rax+8] mov [rsp+0A8h+var_88], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [rsp+0A8h+var_90] mov rdx, [rsp+0A8h+var_88] mov rdi, [rsp+0A8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0A8h+var_90]; void * cmp rdi, r12 jz short loc_D2926 mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D2926: mov rdi, [rsp+0A8h+var_70]; void * cmp rdi, rbx jz short loc_D293D mov rsi, [rsp+0A8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D293D: mov rdi, [rsp+0A8h+var_50]; void * lea rax, [rsp+0A8h+var_40] cmp rdi, rax jz short loc_D2959 mov rsi, [rsp+0A8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D2959: inc ebp jmp loc_D280E loc_D2960: mov rax, [rsp+0A8h+var_98] add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_D29B0 mov r14, rax mov rdi, [rsp+arg_10]; void * cmp rdi, r12 jz short loc_D2995 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D2995 mov r14, rax loc_D2995: mov rdi, [rsp+arg_30]; void * cmp rdi, rbx jz short loc_D29B8 mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D29B8 jmp short $+2 loc_D29B0: mov r14, rax jmp short loc_D29D4 mov r14, rax loc_D29B8: mov rdi, [rsp+arg_50]; void * lea rax, [rsp+arg_60] cmp rdi, rax jz short loc_D29D4 mov rsi, [rsp+arg_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D29D4: mov rax, [rsp+arg_0] mov rcx, [rsp+arg_8] mov rdi, [rcx]; void * cmp rdi, rax jz short loc_D29F1 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D29F1: mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_print[abi:cxx11](_QWORD *a1, long long a2) { int i; // ebp long long v3; // r15 long long v4; // rax long long v5; // rax __int128 *v6; // rcx long long v7; // rax __int128 *v8; // rcx __int128 *v10; // [rsp+18h] [rbp-90h] long long v11; // [rsp+20h] [rbp-88h] __int128 v12; // [rsp+28h] [rbp-80h] BYREF void *v13[2]; // [rsp+38h] [rbp-70h] BYREF __int128 v14; // [rsp+48h] [rbp-60h] BYREF void *v15[2]; // [rsp+58h] [rbp-50h] BYREF _QWORD v16[8]; // [rsp+68h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "logits ", (long long)""); for ( i = 0; i < (int)llama_sampler_chain_n(*(_QWORD *)(a2 + 320)); ++i ) { v3 = llama_sampler_chain_get(*(_QWORD *)(a2 + 320), (unsigned int)i); v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "-> ", (long long)""); v4 = llama_sampler_name(v3); v5 = std::string::append(v15, v4); v13[0] = &v14; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v14 = *v6; } else { v13[0] = *(void **)v5; *(_QWORD *)&v14 = *(_QWORD *)v6; } v13[1] = *(void **)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v7 = std::string::append(v13, " "); v10 = &v12; v8 = (__int128 *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { v12 = *v8; } else { v10 = *(__int128 **)v7; *(_QWORD *)&v12 = *(_QWORD *)v8; } v11 = *(_QWORD *)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; std::string::_M_append(a1, v10, v11); if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); } return a1; }
common_sampler_print[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RDI],RAX LEA RSI,[0x1f3e36] LEA RDX,[0x1f3e3d] MOV qword ptr [RSP + 0x10],RDI CALL 0x001289be LEA RBX,[RSP + 0x48] XOR EBP,EBP LEA R12,[RSP + 0x28] LEA R13,[RSP + 0x58] LAB_001d280e: MOV RDI,qword ptr [R14 + 0x140] LAB_001d2815: CALL 0x0011bfe0 CMP EBP,EAX JGE 0x001d2960 MOV RDI,qword ptr [R14 + 0x140] LAB_001d2829: MOV ESI,EBP CALL 0x0011b9f0 MOV R15,RAX LEA RAX,[RSP + 0x68] MOV qword ptr [RSP + 0x58],RAX LAB_001d283d: MOV RDI,R13 LEA RSI,[0x1fa56c] LEA RDX,[0x1fa56f] CALL 0x001289be LAB_001d2853: MOV RDI,R15 CALL 0x0011b370 MOV RDI,R13 MOV RSI,RAX CALL 0x0011c160 MOV qword ptr [RSP + 0x38],RBX MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001d2889 MOV qword ptr [RSP + 0x38],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x48],RDX JMP 0x001d288f LAB_001d2889: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBX],XMM0 LAB_001d288f: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001d28a7: LEA RDI,[RSP + 0x38] LEA RSI,[0x1f4655] CALL 0x0011c160 MOV qword ptr [RSP + 0x18],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001d28db MOV qword ptr [RSP + 0x18],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x28],RDX JMP 0x001d28e3 LAB_001d28db: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_001d28e3: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001d2905: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011b270 LAB_001d290f: MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R12 JZ 0x001d2926 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011b910 LAB_001d2926: MOV RDI,qword ptr [RSP + 0x38] CMP RDI,RBX JZ 0x001d293d MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011b910 LAB_001d293d: MOV RDI,qword ptr [RSP + 0x58] LEA RAX,[RSP + 0x68] CMP RDI,RAX JZ 0x001d2959 MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x0011b910 LAB_001d2959: INC EBP JMP 0x001d280e LAB_001d2960: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_sampler_print[abi:cxx11](common_sampler const*) */ common_sampler * common_sampler_print_abi_cxx11_(common_sampler *param_1) { int iVar1; int8 uVar2; long *plVar3; long *plVar4; int iVar5; long in_RSI; long *local_90; long local_80; long lStack_78; long *local_70; long local_68; long local_60; long lStack_58; long *local_50 [2]; long local_40 [2]; *(common_sampler **)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<char_const*>(param_1,"logits ",""); iVar5 = 0; while( true ) { /* try { // try from 001d2815 to 001d2819 has its CatchHandler @ 001d29b0 */ iVar1 = llama_sampler_chain_n(*(int8 *)(in_RSI + 0x140)); if (iVar1 <= iVar5) break; /* try { // try from 001d2829 to 001d282f has its CatchHandler @ 001d2974 */ uVar2 = llama_sampler_chain_get(*(int8 *)(in_RSI + 0x140),iVar5); local_50[0] = local_40; /* try { // try from 001d283d to 001d2852 has its CatchHandler @ 001d29ae */ std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_001fa56c,&DAT_001fa56f); /* try { // try from 001d2853 to 001d2865 has its CatchHandler @ 001d29b5 */ llama_sampler_name(uVar2); plVar3 = (long *)std::__cxx11::string::append((char *)local_50); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_60 = *plVar4; lStack_58 = plVar3[3]; local_70 = &local_60; } else { local_60 = *plVar4; local_70 = (long *)*plVar3; } local_68 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 001d28a7 to 001d28b7 has its CatchHandler @ 001d2992 */ plVar3 = (long *)std::__cxx11::string::append((char *)&local_70); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_80 = *plVar4; lStack_78 = plVar3[3]; local_90 = &local_80; } else { local_80 = *plVar4; local_90 = (long *)*plVar3; } *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 001d2905 to 001d290e has its CatchHandler @ 001d2976 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_90); if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } if (local_70 != &local_60) { operator_delete(local_70,local_60 + 1); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } iVar5 = iVar5 + 1; } return param_1; }
37,184
google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_message_field.cc
void MessageFieldGenerator::GenerateCodecCode(io::Printer* printer) { if (descriptor_->type() == FieldDescriptor::Type::TYPE_MESSAGE) { printer->Print( variables_, "pb::FieldCodec.ForMessage($tag$, $type_name$.Parser)"); } else { printer->Print( variables_, "pb::FieldCodec.ForGroup($tag$, $end_tag$, $type_name$.Parser)"); } }
O0
cpp
google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) movq 0x10(%rax), %rdi callq 0x3d920 cmpl $0xb, %eax jne 0x6b4d0 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x20, %rsi leaq 0x341ab9(%rip), %rdx # 0x3acf82 callq 0x3235f0 jmp 0x6b4e9 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x20, %rsi leaq 0x341ad3(%rip), %rdx # 0x3acfb7 callq 0x3235f0 addq $0x18, %rsp retq nop
_ZN6google8protobuf8compiler6csharp21MessageFieldGenerator17GenerateCodecCodeEPNS0_2io7PrinterE: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax mov rdi, [rax+10h]; this call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void) cmp eax, 0Bh jnz short loc_6B4D0 mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 20h ; ' ' lea rdx, aPbFieldcodecFo; "pb::FieldCodec.ForMessage($tag$, $type_"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) jmp short loc_6B4E9 loc_6B4D0: mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 20h ; ' ' lea rdx, aPbFieldcodecFo_0; "pb::FieldCodec.ForGroup($tag$, $end_tag"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) loc_6B4E9: add rsp, 18h retn
GenerateCodecCode: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RAX + 0x10] CALL 0x0013d920 CMP EAX,0xb JNZ 0x0016b4d0 MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] ADD RSI,0x20 LEA RDX,[0x4acf82] CALL 0x004235f0 JMP 0x0016b4e9 LAB_0016b4d0: MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] ADD RSI,0x20 LEA RDX,[0x4acfb7] CALL 0x004235f0 LAB_0016b4e9: ADD RSP,0x18 RET
/* google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*) */ void __thiscall google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode (MessageFieldGenerator *this,Printer *param_1) { int iVar1; iVar1 = FieldDescriptor::type(*(FieldDescriptor **)(this + 0x10)); if (iVar1 == 0xb) { io::Printer::Print(param_1,(map *)(this + 0x20), "pb::FieldCodec.ForMessage($tag$, $type_name$.Parser)"); } else { io::Printer::Print(param_1,(map *)(this + 0x20), "pb::FieldCodec.ForGroup($tag$, $end_tag$, $type_name$.Parser)"); } return; }
37,185
google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_message_field.cc
void MessageFieldGenerator::GenerateCodecCode(io::Printer* printer) { if (descriptor_->type() == FieldDescriptor::Type::TYPE_MESSAGE) { printer->Print( variables_, "pb::FieldCodec.ForMessage($tag$, $type_name$.Parser)"); } else { printer->Print( variables_, "pb::FieldCodec.ForGroup($tag$, $end_tag$, $type_name$.Parser)"); } }
O3
cpp
google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rdi), %r15 movq 0x18(%r15), %rdi testq %rdi, %rdi je 0x3eba0 leaq 0xfb0a7(%rip), %rax # 0x139c34 leaq 0x8(%rsp), %rsi movq %rax, (%rsi) movq %rsp, %rdx movq %r15, (%rdx) callq 0x2f19d addq $0x20, %r14 cmpb $0xb, 0x2(%r15) leaq 0x16025d(%rip), %rax # 0x19ee0d leaq 0x16028b(%rip), %rdx # 0x19ee42 cmoveq %rax, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN6google8protobuf8compiler6csharp21MessageFieldGenerator17GenerateCodecCodeEPNS0_2io7PrinterE: push r15; int push r14; int push rbx; char sub rsp, 10h mov rbx, rsi mov r14, rdi mov r15, [rdi+10h] mov rdi, [r15+18h] test rdi, rdi jz short loc_3EBA0 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+28h+var_20] mov [rsi], rax mov rdx, rsp mov [rdx], r15 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_3EBA0: add r14, 20h ; ' ' cmp byte ptr [r15+2], 0Bh lea rax, aPbFieldcodecFo; "pb::FieldCodec.ForMessage($tag$, $type_"... lea rdx, aPbFieldcodecFo_0; "pb::FieldCodec.ForGroup($tag$, $end_tag"... cmovz rdx, rax mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) add rsp, 10h pop rbx pop r14 pop r15 retn
GenerateCodecCode: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0x10] MOV RDI,qword ptr [R15 + 0x18] TEST RDI,RDI JZ 0x0013eba0 LEA RAX,[0x239c34] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX MOV RDX,RSP MOV qword ptr [RDX],R15 CALL 0x0012f19d LAB_0013eba0: ADD R14,0x20 CMP byte ptr [R15 + 0x2],0xb LEA RAX,[0x29ee0d] LEA RDX,[0x29ee42] CMOVZ RDX,RAX MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode(google::protobuf::io::Printer*) */ void __thiscall google::protobuf::compiler::csharp::MessageFieldGenerator::GenerateCodecCode (MessageFieldGenerator *this,Printer *param_1) { FieldDescriptor *pFVar1; char *pcVar2; FieldDescriptor *local_28; code *local_20; pFVar1 = *(FieldDescriptor **)(this + 0x10); if (*(once_flag **)(pFVar1 + 0x18) != (once_flag *)0x0) { local_20 = FieldDescriptor::TypeOnceInit; local_28 = pFVar1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(pFVar1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_20,&local_28) ; } pcVar2 = "pb::FieldCodec.ForGroup($tag$, $end_tag$, $type_name$.Parser)"; if (pFVar1[2] == (FieldDescriptor)0xb) { pcVar2 = "pb::FieldCodec.ForMessage($tag$, $type_name$.Parser)"; } io::Printer::Print(param_1,(map *)(this + 0x20),pcVar2); return; }
37,186
ftxui::(anonymous namespace)::BorderPixel::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/border.cpp
void Render(Screen& screen) override { // Draw content. children_[0]->Render(screen); // Draw the border. if (box_.x_min >= box_.x_max || box_.y_min >= box_.y_max) { return; } screen.PixelAt(box_.x_min, box_.y_min) = pixel_; screen.PixelAt(box_.x_max, box_.y_min) = pixel_; screen.PixelAt(box_.x_min, box_.y_max) = pixel_; screen.PixelAt(box_.x_max, box_.y_max) = pixel_; for (int x = box_.x_min + 1; x < box_.x_max; ++x) { screen.PixelAt(x, box_.y_min) = pixel_; screen.PixelAt(x, box_.y_max) = pixel_; } for (int y = box_.y_min + 1; y < box_.y_max; ++y) { screen.PixelAt(box_.x_min, y) = pixel_; screen.PixelAt(box_.x_max, y) = pixel_; } }
O1
cpp
ftxui::(anonymous namespace)::BorderPixel::Render(ftxui::Screen&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rax movq (%rax), %rdi movq (%rdi), %rax callq *0x20(%rax) movl 0x4c(%r14), %esi cmpl 0x50(%r14), %esi jge 0x2283d movl 0x54(%r14), %edx cmpl 0x58(%r14), %edx jge 0x2283d movq %rbx, %rdi callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi leaq 0x68(%r14), %r15 movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) movl 0x50(%r14), %esi movl 0x54(%r14), %edx movq %rbx, %rdi callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) movl 0x4c(%r14), %esi movl 0x58(%r14), %edx movq %rbx, %rdi callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) movl 0x50(%r14), %esi movl 0x58(%r14), %edx movq %rbx, %rdi callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) movl 0x4c(%r14), %ebp incl %ebp cmpl 0x50(%r14), %ebp jge 0x227c7 movl 0x54(%r14), %edx movq %rbx, %rdi movl %ebp, %esi callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) movl 0x58(%r14), %edx movq %rbx, %rdi movl %ebp, %esi callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) jmp 0x22755 movl 0x54(%r14), %ebp incl %ebp cmpl 0x58(%r14), %ebp jge 0x2283d movl 0x4c(%r14), %esi movq %rbx, %rdi movl %ebp, %edx callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) movl 0x50(%r14), %esi movq %rbx, %rdi movl %ebp, %edx callq 0x3a522 movq %rax, %r12 movzwl 0x60(%r14), %eax movw %ax, (%r12) leaq 0x8(%r12), %rdi movq %r15, %rsi callq 0xb1f0 movq 0x88(%r14), %rax movq %rax, 0x28(%r12) jmp 0x227cb popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN5ftxui12_GLOBAL__N_111BorderPixel6RenderERNS_6ScreenE: push rbp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi mov rax, [rdi+8] mov rdi, [rax] mov rax, [rdi] call qword ptr [rax+20h] mov esi, [r14+4Ch]; int cmp esi, [r14+50h] jge loc_2283D mov edx, [r14+54h]; int cmp edx, [r14+58h] jge loc_2283D mov rdi, rbx; this call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] lea r15, [r14+68h] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax mov esi, [r14+50h]; int mov edx, [r14+54h]; int mov rdi, rbx; this call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax mov esi, [r14+4Ch]; int mov edx, [r14+58h]; int mov rdi, rbx; this call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax mov esi, [r14+50h]; int mov edx, [r14+58h]; int mov rdi, rbx; this call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax mov ebp, [r14+4Ch] loc_22755: inc ebp cmp ebp, [r14+50h] jge short loc_227C7 mov edx, [r14+54h]; int mov rdi, rbx; this mov esi, ebp; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax mov edx, [r14+58h]; int mov rdi, rbx; this mov esi, ebp; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax jmp short loc_22755 loc_227C7: mov ebp, [r14+54h] loc_227CB: inc ebp cmp ebp, [r14+58h] jge short loc_2283D mov esi, [r14+4Ch]; int mov rdi, rbx; this mov edx, ebp; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax mov esi, [r14+50h]; int mov rdi, rbx; this mov edx, ebp; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov r12, rax movzx eax, word ptr [r14+60h] mov [r12], ax lea rdi, [r12+8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rax, [r14+88h] mov [r12+28h], rax jmp short loc_227CB loc_2283D: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ftxui::`anonymous namespace'::BorderPixel::Render( ftxui::_anonymous_namespace_::BorderPixel *this, ftxui::Screen *a2) { long long result; // rax int v4; // esi int v5; // edx long long v6; // r12 long long v7; // r12 long long v8; // r12 long long v9; // r12 int v10; // ebp long long v11; // r12 long long v12; // r12 int v13; // ebp long long v14; // r12 long long v15; // r12 result = (*(long long ( **)(_QWORD))(***((_QWORD ***)this + 1) + 32LL))(**((_QWORD **)this + 1)); v4 = *((_DWORD *)this + 19); if ( v4 < *((_DWORD *)this + 20) ) { v5 = *((_DWORD *)this + 21); if ( v5 < *((_DWORD *)this + 22) ) { v6 = ftxui::Screen::PixelAt(a2, v4, v5); *(_WORD *)v6 = *((_WORD *)this + 48); std::string::_M_assign(v6 + 8, (char *)this + 104); *(_QWORD *)(v6 + 40) = *((_QWORD *)this + 17); v7 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), *((_DWORD *)this + 21)); *(_WORD *)v7 = *((_WORD *)this + 48); std::string::_M_assign(v7 + 8, (char *)this + 104); *(_QWORD *)(v7 + 40) = *((_QWORD *)this + 17); v8 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 19), *((_DWORD *)this + 22)); *(_WORD *)v8 = *((_WORD *)this + 48); std::string::_M_assign(v8 + 8, (char *)this + 104); *(_QWORD *)(v8 + 40) = *((_QWORD *)this + 17); v9 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), *((_DWORD *)this + 22)); *(_WORD *)v9 = *((_WORD *)this + 48); std::string::_M_assign(v9 + 8, (char *)this + 104); result = *((_QWORD *)this + 17); *(_QWORD *)(v9 + 40) = result; v10 = *((_DWORD *)this + 19); while ( ++v10 < *((_DWORD *)this + 20) ) { v11 = ftxui::Screen::PixelAt(a2, v10, *((_DWORD *)this + 21)); *(_WORD *)v11 = *((_WORD *)this + 48); std::string::_M_assign(v11 + 8, (char *)this + 104); *(_QWORD *)(v11 + 40) = *((_QWORD *)this + 17); v12 = ftxui::Screen::PixelAt(a2, v10, *((_DWORD *)this + 22)); *(_WORD *)v12 = *((_WORD *)this + 48); std::string::_M_assign(v12 + 8, (char *)this + 104); result = *((_QWORD *)this + 17); *(_QWORD *)(v12 + 40) = result; } v13 = *((_DWORD *)this + 21); while ( ++v13 < *((_DWORD *)this + 22) ) { v14 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 19), v13); *(_WORD *)v14 = *((_WORD *)this + 48); std::string::_M_assign(v14 + 8, (char *)this + 104); *(_QWORD *)(v14 + 40) = *((_QWORD *)this + 17); v15 = ftxui::Screen::PixelAt(a2, *((_DWORD *)this + 20), v13); *(_WORD *)v15 = *((_WORD *)this + 48); std::string::_M_assign(v15 + 8, (char *)this + 104); result = *((_QWORD *)this + 17); *(_QWORD *)(v15 + 40) = result; } } } return result; }
Render: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] MOV ESI,dword ptr [R14 + 0x4c] CMP ESI,dword ptr [R14 + 0x50] JGE 0x0012283d MOV EDX,dword ptr [R14 + 0x54] CMP EDX,dword ptr [R14 + 0x58] JGE 0x0012283d MOV RDI,RBX CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] LEA R15,[R14 + 0x68] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX MOV ESI,dword ptr [R14 + 0x50] MOV EDX,dword ptr [R14 + 0x54] MOV RDI,RBX CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX MOV ESI,dword ptr [R14 + 0x4c] MOV EDX,dword ptr [R14 + 0x58] MOV RDI,RBX CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX MOV ESI,dword ptr [R14 + 0x50] MOV EDX,dword ptr [R14 + 0x58] MOV RDI,RBX CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX MOV EBP,dword ptr [R14 + 0x4c] LAB_00122755: INC EBP CMP EBP,dword ptr [R14 + 0x50] JGE 0x001227c7 MOV EDX,dword ptr [R14 + 0x54] MOV RDI,RBX MOV ESI,EBP CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX MOV EDX,dword ptr [R14 + 0x58] MOV RDI,RBX MOV ESI,EBP CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX JMP 0x00122755 LAB_001227c7: MOV EBP,dword ptr [R14 + 0x54] LAB_001227cb: INC EBP CMP EBP,dword ptr [R14 + 0x58] JGE 0x0012283d MOV ESI,dword ptr [R14 + 0x4c] MOV RDI,RBX MOV EDX,EBP CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX MOV ESI,dword ptr [R14 + 0x50] MOV RDI,RBX MOV EDX,EBP CALL 0x0013a522 MOV R12,RAX MOVZX EAX,word ptr [R14 + 0x60] MOV word ptr [R12],AX LEA RDI,[R12 + 0x8] MOV RSI,R15 CALL 0x0010b1f0 MOV RAX,qword ptr [R14 + 0x88] MOV qword ptr [R12 + 0x28],RAX JMP 0x001227cb LAB_0012283d: POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* ftxui::(anonymous namespace)::BorderPixel::Render(ftxui::Screen&) */ void __thiscall ftxui::(anonymous_namespace)::BorderPixel::Render(BorderPixel *this,Screen *param_1) { int2 *puVar1; int iVar2; (**(code **)(*(long *)**(int8 **)(this + 8) + 0x20))(); if ((*(int *)(this + 0x4c) < *(int *)(this + 0x50)) && (*(int *)(this + 0x54) < *(int *)(this + 0x58))) { puVar1 = (int2 *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),*(int *)(this + 0x54)); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); puVar1 = (int2 *)Screen::PixelAt(param_1,*(int *)(this + 0x50),*(int *)(this + 0x54)); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); puVar1 = (int2 *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),*(int *)(this + 0x58)); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); puVar1 = (int2 *)Screen::PixelAt(param_1,*(int *)(this + 0x50),*(int *)(this + 0x58)); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); iVar2 = *(int *)(this + 0x4c); while (iVar2 = iVar2 + 1, iVar2 < *(int *)(this + 0x50)) { puVar1 = (int2 *)Screen::PixelAt(param_1,iVar2,*(int *)(this + 0x54)); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); puVar1 = (int2 *)Screen::PixelAt(param_1,iVar2,*(int *)(this + 0x58)); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); } iVar2 = *(int *)(this + 0x54); while (iVar2 = iVar2 + 1, iVar2 < *(int *)(this + 0x58)) { puVar1 = (int2 *)Screen::PixelAt(param_1,*(int *)(this + 0x4c),iVar2); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); puVar1 = (int2 *)Screen::PixelAt(param_1,*(int *)(this + 0x50),iVar2); *puVar1 = *(int2 *)(this + 0x60); std::__cxx11::string::_M_assign((string *)(puVar1 + 4)); *(int8 *)(puVar1 + 0x14) = *(int8 *)(this + 0x88); } } return; }
37,187
string_view::operator==(string_view const&) const
monkey531[P]llama/common/json-schema-to-grammar.cpp
bool operator==(const string_view & other) const { std::string this_str = *this; std::string other_str = other; return this_str == other_str; }
O3
cpp
string_view::operator==(string_view const&) const: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq (%rdi), %rsi movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rcx subq %rdx, %rcx leaq 0x8(%rsp), %rdi callq 0x1a940 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq 0x10(%rbx), %rcx subq %rdx, %rcx leaq 0x28(%rsp), %rdi callq 0x1a940 movq 0x10(%rsp), %rdx cmpq 0x30(%rsp), %rdx jne 0xcaa2e movq 0x28(%rsp), %r14 testq %rdx, %rdx je 0xcaa37 movq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x1a930 testl %eax, %eax sete %bl jmp 0xcaa39 movq 0x28(%rsp), %r14 xorl %ebx, %ebx jmp 0xcaa39 movb $0x1, %bl leaq 0x38(%rsp), %rax cmpq %rax, %r14 je 0xcaa53 movq 0x38(%rsp), %rsi incq %rsi movq %r14, %rdi callq 0x1a8f0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xcaa6e movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xcaa96 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rdi callq 0x1afd0
_ZNK11string_vieweqERKS_: push r14 push rbx sub rsp, 48h mov rbx, rsi mov rsi, [rdi] mov rdx, [rdi+8] mov rcx, [rdi+10h] sub rcx, rdx lea rdi, [rsp+58h+var_50] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rbx] mov rdx, [rbx+8] mov rcx, [rbx+10h] sub rcx, rdx lea rdi, [rsp+58h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdx, [rsp+58h+var_48] cmp rdx, [rsp+58h+var_28] jnz short loc_CAA2E mov r14, [rsp+58h+var_30] test rdx, rdx jz short loc_CAA37 mov rdi, [rsp+58h+var_50] mov rsi, r14 call _bcmp test eax, eax setz bl jmp short loc_CAA39 loc_CAA2E: mov r14, [rsp+58h+var_30] xor ebx, ebx jmp short loc_CAA39 loc_CAA37: mov bl, 1 loc_CAA39: lea rax, [rsp+58h+var_20] cmp r14, rax jz short loc_CAA53 mov rsi, [rsp+58h+var_20] inc rsi; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_CAA53: lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CAA6E mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CAA6E: mov eax, ebx add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CAA96 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CAA96: mov rdi, rbx call __Unwind_Resume
long long string_view::operator==(_QWORD *a1, _QWORD *a2) { long long *v3; // r14 long long *v5; // [rsp+8h] [rbp-50h] BYREF void *v6; // [rsp+10h] [rbp-48h] long long v7; // [rsp+18h] [rbp-40h] BYREF void *v8[2]; // [rsp+28h] [rbp-30h] BYREF long long v9; // [rsp+38h] [rbp-20h] BYREF std::string::substr(&v5, *a1, a1[1], a1[2] - a1[1]); std::string::substr(v8, *a2, a2[1], a2[2] - a2[1]); if ( v6 == v8[1] ) { v3 = (long long *)v8[0]; if ( v6 ) LOBYTE(a2) = (unsigned int)bcmp(v5, v8[0]) == 0; else LOBYTE(a2) = 1; } else { v3 = (long long *)v8[0]; LODWORD(a2) = 0; } if ( v3 != &v9 ) operator delete(v3, v9 + 1); if ( v5 != &v7 ) operator delete(v5, v7 + 1); return (unsigned int)a2; }
operator==: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV RSI,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] SUB RCX,RDX LEA RDI,[RSP + 0x8] CALL 0x0011a940 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] SUB RCX,RDX LAB_001ca9fa: LEA RDI,[RSP + 0x28] CALL 0x0011a940 LAB_001caa04: MOV RDX,qword ptr [RSP + 0x10] CMP RDX,qword ptr [RSP + 0x30] JNZ 0x001caa2e MOV R14,qword ptr [RSP + 0x28] TEST RDX,RDX JZ 0x001caa37 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R14 CALL 0x0011a930 TEST EAX,EAX SETZ BL JMP 0x001caa39 LAB_001caa2e: MOV R14,qword ptr [RSP + 0x28] XOR EBX,EBX JMP 0x001caa39 LAB_001caa37: MOV BL,0x1 LAB_001caa39: LEA RAX,[RSP + 0x38] CMP R14,RAX JZ 0x001caa53 MOV RSI,qword ptr [RSP + 0x38] INC RSI MOV RDI,R14 CALL 0x0011a8f0 LAB_001caa53: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001caa6e MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001caa6e: MOV EAX,EBX ADD RSP,0x48 POP RBX POP R14 RET
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */ ulong __thiscall string_view::operator==(string_view *this,string_view *param_1) { int iVar1; int7 uVar3; ulong uVar2; long *local_50; size_t local_48; long local_40 [2]; long *local_30; size_t local_28; long local_20 [2]; std::__cxx11::string::substr((ulong)&local_50,*(ulong *)this); /* try { // try from 001ca9fa to 001caa03 has its CatchHandler @ 001caa78 */ std::__cxx11::string::substr((ulong)&local_30,*(ulong *)param_1); if (local_48 == local_28) { uVar3 = (int7)((ulong)param_1 >> 8); if (local_48 == 0) { uVar2 = CONCAT71(uVar3,1); } else { iVar1 = bcmp(local_50,local_30,local_48); uVar2 = CONCAT71(uVar3,iVar1 == 0); } } else { uVar2 = 0; } if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } return uVar2 & 0xffffffff; }
37,188
exec_REDO_LOGREC_REDO_DROP_TABLE
eloqsql/storage/maria/ma_recovery.c
prototype_redo_exec_hook(REDO_DROP_TABLE) { char *name; int error= 1; MARIA_HA *info; if (skip_DDLs) { tprint(tracef, "we skip DDLs\n"); return 0; } enlarge_buffer(rec); if (log_record_buffer.str == NULL || translog_read_record(rec->lsn, 0, rec->record_length, log_record_buffer.str, NULL) != rec->record_length) { eprint(tracef, "Failed to read record"); return 1; } name= (char *)log_record_buffer.str; tprint(tracef, "Table '%s'", name); info= maria_open(name, O_RDONLY, HA_OPEN_FOR_REPAIR, 0); if (info) { MARIA_SHARE *share= info->s; if (!share->base.born_transactional) { tprint(tracef, ", is not transactional, ignoring removal\n"); ALERT_USER(); error= 0; goto end; } if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0) { tprint(tracef, ", has create_rename_lsn " LSN_FMT " more recent than" " record, ignoring removal", LSN_IN_PARTS(share->state.create_rename_lsn)); error= 0; goto end; } if (maria_is_crashed(info)) { tprint(tracef, ", is crashed, can't drop it"); ALERT_USER(); goto end; } if (close_one_table(info->s->open_file_name.str, rec->lsn) || maria_close(info)) goto end; info= NULL; /* if it is older, or its header is corrupted, drop it */ tprint(tracef, ", dropping '%s'", name); if (maria_delete_table(name)) { eprint(tracef, "Failed to drop table"); goto end; } } else /* one or two files absent, or header corrupted... */ tprint(tracef,", can't be opened, probably does not exist"); error= 0; end: tprint(tracef, "\n"); if (info != NULL) error|= maria_close(info); return error; }
O3
c
exec_REDO_LOGREC_REDO_DROP_TABLE: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx cmpb $0x0, 0xbc8288(%rip) # 0xc52c84 je 0x8aa1d leaq 0xbc83c3(%rip), %rax # 0xc52dc8 movq (%rax), %rdi leaq 0x7b772(%rip), %rsi # 0x106181 xorl %ebx, %ebx xorl %eax, %eax callq 0x8da80 jmp 0x8ac0e movq %rdi, %r14 movl 0x14(%rdi), %edx cmpq %rdx, 0xbc8286(%rip) # 0xc52cb0 jae 0x8aa52 movq %rdx, 0xbc827d(%rip) # 0xc52cb0 movq 0xbc826e(%rip), %rsi # 0xc52ca8 movl $0x50, %ecx xorl %edi, %edi callq 0xc3bf0 movq %rax, %rcx movq %rax, 0xbc8258(%rip) # 0xc52ca8 jmp 0x8aa59 movq 0xbc824f(%rip), %rcx # 0xc52ca8 testq %rcx, %rcx je 0x8ab5e movq (%r14), %rdi movl 0x14(%r14), %edx xorl %esi, %esi xorl %r8d, %r8d callq 0x7d716 cmpl 0x14(%r14), %eax jne 0x8ab5e movq 0xbc8224(%rip), %r15 # 0xc52ca8 leaq 0xbc833d(%rip), %r12 # 0xc52dc8 movq (%r12), %rdi leaq 0x7bcfc(%rip), %rsi # 0x106792 movq %r15, %rdx xorl %eax, %eax callq 0x8da80 movq %r15, %rdi xorl %esi, %esi movl $0x20, %edx xorl %ecx, %ecx callq 0x38013 testq %rax, %rax je 0x8ab80 movq %rax, %rbx movq (%rax), %rax cmpb $0x0, 0x44c(%rax) je 0x8aba2 movq 0x178(%rax), %rcx movq (%r14), %rsi cmpq %rsi, %rcx jge 0x8abb9 testb $0x2, 0x170(%rax) jne 0x8abd7 movq 0x5e0(%rax), %rdi callq 0x8cbe4 movl $0x1, %r14d testb %al, %al jne 0x8abef movq %rbx, %rdi callq 0x5da84 testl %eax, %eax jne 0x8abef movq (%r12), %rdi leaq 0x7bd0d(%rip), %rsi # 0x10682f movq %r15, %rdx xorl %eax, %eax callq 0x8da80 movq %r15, %rdi callq 0x8fea4 testl %eax, %eax je 0x8ab92 movq (%r12), %rdi leaq 0x7bad1(%rip), %rsi # 0x106614 xorl %eax, %eax callq 0x8db08 movq (%r12), %rdi leaq 0x782b1(%rip), %rsi # 0x102e06 xorl %eax, %eax callq 0x8da80 jmp 0x8ab76 leaq 0xbc8263(%rip), %rax # 0xc52dc8 movq (%rax), %rdi leaq 0x7b620(%rip), %rsi # 0x10618f xorl %eax, %eax callq 0x8db08 movl $0x1, %ebx jmp 0x8ac0e movq (%r12), %rdi leaq 0x7b98f(%rip), %rsi # 0x10651a xorl %eax, %eax callq 0x8da80 movq (%r12), %rdi leaq 0x78269(%rip), %rsi # 0x102e06 jmp 0x8aa0f movq (%r12), %rdi leaq 0x7bbf0(%rip), %rsi # 0x10679d xorl %r14d, %r14d xorl %eax, %eax callq 0x8da80 jmp 0x8abef movq (%r12), %rdi movq %rcx, %rdx shrq $0x20, %rdx leaq 0x7bbfc(%rip), %rsi # 0x1067c7 xorl %r14d, %r14d xorl %eax, %eax callq 0x8da80 jmp 0x8abef movq (%r12), %rdi leaq 0x7bc31(%rip), %rsi # 0x106813 xorl %eax, %eax callq 0x8da80 movl $0x1, %r14d movq (%r12), %rdi leaq 0x7820c(%rip), %rsi # 0x102e06 xorl %eax, %eax callq 0x8da80 movq %rbx, %rdi callq 0x5da84 movl %eax, %ebx orl %r14d, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
exec_REDO_LOGREC_REDO_DROP_TABLE: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx cmp cs:skip_DDLs, 0 jz short loc_8AA1D lea rax, tracef mov rdi, [rax] lea rsi, aWeSkipDdls; "we skip DDLs\n" loc_8AA0F: xor ebx, ebx xor eax, eax call tprint jmp loc_8AC0E loc_8AA1D: mov r14, rdi mov edx, [rdi+14h] cmp cs:log_record_buffer_1, rdx jnb short loc_8AA52 mov cs:log_record_buffer_1, rdx mov rsi, cs:log_record_buffer_0 mov ecx, 50h ; 'P' xor edi, edi call my_realloc mov rcx, rax mov cs:log_record_buffer_0, rax jmp short loc_8AA59 loc_8AA52: mov rcx, cs:log_record_buffer_0 loc_8AA59: test rcx, rcx jz loc_8AB5E mov rdi, [r14] mov edx, [r14+14h] xor esi, esi xor r8d, r8d call translog_read_record cmp eax, [r14+14h] jnz loc_8AB5E mov r15, cs:log_record_buffer_0 lea r12, tracef mov rdi, [r12] lea rsi, aTableS; "Table '%s'" mov rdx, r15 xor eax, eax call tprint mov rdi, r15 xor esi, esi mov edx, 20h ; ' ' xor ecx, ecx call maria_open test rax, rax jz loc_8AB80 mov rbx, rax mov rax, [rax] cmp byte ptr [rax+44Ch], 0 jz loc_8ABA2 mov rcx, [rax+178h] mov rsi, [r14] cmp rcx, rsi jge loc_8ABB9 test byte ptr [rax+170h], 2 jnz loc_8ABD7 mov rdi, [rax+5E0h] call close_one_table mov r14d, 1 test al, al jnz loc_8ABEF mov rdi, rbx call maria_close test eax, eax jnz loc_8ABEF mov rdi, [r12] lea rsi, aDroppingS; ", dropping '%s'" mov rdx, r15 xor eax, eax call tprint mov rdi, r15 call maria_delete_table test eax, eax jz short loc_8AB92 mov rdi, [r12] lea rsi, aFailedToDropTa; "Failed to drop table" xor eax, eax call eprint mov rdi, [r12] lea rsi, aTotalKeyblocks+2Fh; "\n" xor eax, eax call tprint jmp short loc_8AB76 loc_8AB5E: lea rax, tracef mov rdi, [rax] lea rsi, aFailedToReadRe; "Failed to read record" xor eax, eax call eprint loc_8AB76: mov ebx, 1 jmp loc_8AC0E loc_8AB80: mov rdi, [r12] lea rsi, aCanTBeOpenedPr; ", can't be opened, probably does not ex"... xor eax, eax call tprint loc_8AB92: mov rdi, [r12] lea rsi, aTotalKeyblocks+2Fh; "\n" jmp loc_8AA0F loc_8ABA2: mov rdi, [r12] lea rsi, aIsNotTransacti_0; ", is not transactional, ignoring remova"... xor r14d, r14d xor eax, eax call tprint jmp short loc_8ABEF loc_8ABB9: mov rdi, [r12] mov rdx, rcx shr rdx, 20h lea rsi, aHasCreateRenam_0; ", has create_rename_lsn (%u,0x%x) more "... xor r14d, r14d xor eax, eax call tprint jmp short loc_8ABEF loc_8ABD7: mov rdi, [r12] lea rsi, aIsCrashedCanTD; ", is crashed, can't drop it" xor eax, eax call tprint mov r14d, 1 loc_8ABEF: mov rdi, [r12] lea rsi, aTotalKeyblocks+2Fh; "\n" xor eax, eax call tprint mov rdi, rbx call maria_close mov ebx, eax or ebx, r14d loc_8AC0E: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long exec_REDO_LOGREC_REDO_DROP_TABLE(long long *a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // edi char *v7; // rsi unsigned int v8; // ebx unsigned long long v9; // rdx long long v10; // rcx _BYTE *v11; // r15 long long *v12; // rax int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d long long v17; // rbx long long v18; // rax long long v19; // rcx int v20; // edx int v21; // ecx int v22; // r8d int v23; // r9d int v24; // r14d int v25; // edx int v26; // ecx int v27; // r8d int v28; // r9d if ( !skip_DDLs ) { v9 = *((unsigned int *)a1 + 5); if ( log_record_buffer_1 >= v9 ) { v10 = log_record_buffer_0; } else { log_record_buffer_1 = *((unsigned int *)a1 + 5); v10 = my_realloc(0LL, log_record_buffer_0, v9, 80LL); log_record_buffer_0 = v10; } if ( !v10 || (unsigned int)translog_read_record(*a1, 0, *((unsigned int *)a1 + 5), v10, 0LL) != *((_DWORD *)a1 + 5) ) { eprint(tracef, (unsigned int)"Failed to read record", v9, v10, a5, a6); return 1; } v11 = (_BYTE *)log_record_buffer_0; tprint(tracef, (unsigned int)"Table '%s'", log_record_buffer_0, v10, a5, a6); v12 = (long long *)maria_open(v11, 0, 32, 0LL); if ( v12 ) { v17 = (long long)v12; v18 = *v12; if ( *(_BYTE *)(v18 + 1100) ) { v19 = *(_QWORD *)(v18 + 376); if ( v19 >= *a1 ) { v24 = 0; tprint( tracef, (unsigned int)", has create_rename_lsn (%u,0x%x) more recent than record, ignoring removal", HIDWORD(v19), v19, v15, v16); } else if ( (*(_BYTE *)(v18 + 368) & 2) != 0 ) { tprint(tracef, (unsigned int)", is crashed, can't drop it", v13, v19, v15, v16); v24 = 1; } else { v24 = 1; if ( !(unsigned __int8)close_one_table(*(_QWORD *)(v18 + 1504), *a1) && !(unsigned int)maria_close(v17) ) { tprint(tracef, (unsigned int)", dropping '%s'", (_DWORD)v11, v21, v22, v23); if ( (unsigned int)maria_delete_table(v11) ) { eprint(tracef, (unsigned int)"Failed to drop table", a3, a4, a5, a6); tprint(tracef, (unsigned int)"\n", v25, v26, v27, v28); return 1; } LABEL_20: v6 = tracef; v7 = "\n"; goto LABEL_3; } } } else { v24 = 0; tprint(tracef, (unsigned int)", is not transactional, ignoring removal\n", v13, v14, v15, v16); } tprint(tracef, (unsigned int)"\n", v20, v21, v22, v23); return v24 | (unsigned int)maria_close(v17); } tprint(tracef, (unsigned int)", can't be opened, probably does not exist", v13, v14, v15, v16); goto LABEL_20; } v6 = tracef; v7 = "we skip DDLs\n"; LABEL_3: v8 = 0; tprint(v6, (_DWORD)v7, a3, a4, a5, a6); return v8; }
exec_REDO_LOGREC_REDO_DROP_TABLE: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX CMP byte ptr [0x00d52c84],0x0 JZ 0x0018aa1d LEA RAX,[0xd52dc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x206181] LAB_0018aa0f: XOR EBX,EBX XOR EAX,EAX CALL 0x0018da80 JMP 0x0018ac0e LAB_0018aa1d: MOV R14,RDI MOV EDX,dword ptr [RDI + 0x14] CMP qword ptr [0x00d52cb0],RDX JNC 0x0018aa52 MOV qword ptr [0x00d52cb0],RDX MOV RSI,qword ptr [0x00d52ca8] MOV ECX,0x50 XOR EDI,EDI CALL 0x001c3bf0 MOV RCX,RAX MOV qword ptr [0x00d52ca8],RAX JMP 0x0018aa59 LAB_0018aa52: MOV RCX,qword ptr [0x00d52ca8] LAB_0018aa59: TEST RCX,RCX JZ 0x0018ab5e MOV RDI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x14] XOR ESI,ESI XOR R8D,R8D CALL 0x0017d716 CMP EAX,dword ptr [R14 + 0x14] JNZ 0x0018ab5e MOV R15,qword ptr [0x00d52ca8] LEA R12,[0xd52dc8] MOV RDI,qword ptr [R12] LEA RSI,[0x206792] MOV RDX,R15 XOR EAX,EAX CALL 0x0018da80 MOV RDI,R15 XOR ESI,ESI MOV EDX,0x20 XOR ECX,ECX CALL 0x00138013 TEST RAX,RAX JZ 0x0018ab80 MOV RBX,RAX MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x44c],0x0 JZ 0x0018aba2 MOV RCX,qword ptr [RAX + 0x178] MOV RSI,qword ptr [R14] CMP RCX,RSI JGE 0x0018abb9 TEST byte ptr [RAX + 0x170],0x2 JNZ 0x0018abd7 MOV RDI,qword ptr [RAX + 0x5e0] CALL 0x0018cbe4 MOV R14D,0x1 TEST AL,AL JNZ 0x0018abef MOV RDI,RBX CALL 0x0015da84 TEST EAX,EAX JNZ 0x0018abef MOV RDI,qword ptr [R12] LEA RSI,[0x20682f] MOV RDX,R15 XOR EAX,EAX CALL 0x0018da80 MOV RDI,R15 CALL 0x0018fea4 TEST EAX,EAX JZ 0x0018ab92 MOV RDI,qword ptr [R12] LEA RSI,[0x206614] XOR EAX,EAX CALL 0x0018db08 MOV RDI,qword ptr [R12] LEA RSI,[0x202e06] XOR EAX,EAX CALL 0x0018da80 JMP 0x0018ab76 LAB_0018ab5e: LEA RAX,[0xd52dc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x20618f] XOR EAX,EAX CALL 0x0018db08 LAB_0018ab76: MOV EBX,0x1 JMP 0x0018ac0e LAB_0018ab80: MOV RDI,qword ptr [R12] LEA RSI,[0x20651a] XOR EAX,EAX CALL 0x0018da80 LAB_0018ab92: MOV RDI,qword ptr [R12] LEA RSI,[0x202e06] JMP 0x0018aa0f LAB_0018aba2: MOV RDI,qword ptr [R12] LEA RSI,[0x20679d] XOR R14D,R14D XOR EAX,EAX CALL 0x0018da80 JMP 0x0018abef LAB_0018abb9: MOV RDI,qword ptr [R12] MOV RDX,RCX SHR RDX,0x20 LEA RSI,[0x2067c7] XOR R14D,R14D XOR EAX,EAX CALL 0x0018da80 JMP 0x0018abef LAB_0018abd7: MOV RDI,qword ptr [R12] LEA RSI,[0x206813] XOR EAX,EAX CALL 0x0018da80 MOV R14D,0x1 LAB_0018abef: MOV RDI,qword ptr [R12] LEA RSI,[0x202e06] XOR EAX,EAX CALL 0x0018da80 MOV RDI,RBX CALL 0x0015da84 MOV EBX,EAX OR EBX,R14D LAB_0018ac0e: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
uint exec_REDO_LOGREC_REDO_DROP_TABLE(long *param_1) { long lVar1; long lVar2; char cVar3; int iVar4; uint uVar5; long *plVar6; ulong uVar7; char *pcVar8; uint uVar9; if (skip_DDLs == '\0') { uVar7 = (ulong)*(uint *)((long)param_1 + 0x14); if (log_record_buffer_1 < uVar7) { log_record_buffer_1 = uVar7; log_record_buffer_0 = my_realloc(0,log_record_buffer_0,uVar7,0x50); } if ((log_record_buffer_0 == 0) || (iVar4 = translog_read_record (*param_1,0,*(int4 *)((long)param_1 + 0x14),log_record_buffer_0,0), lVar2 = log_record_buffer_0, iVar4 != *(int *)((long)param_1 + 0x14))) { eprint(tracef,"Failed to read record"); return 1; } tprint(tracef,"Table \'%s\'",log_record_buffer_0); plVar6 = (long *)maria_open(lVar2,0,0x20,0); if (plVar6 == (long *)0x0) { tprint(tracef,", can\'t be opened, probably does not exist"); } else { lVar1 = *plVar6; if (*(char *)(lVar1 + 0x44c) == '\0') { uVar9 = 0; tprint(tracef,", is not transactional, ignoring removal\n"); LAB_0018abef: tprint(tracef,"\n"); uVar5 = maria_close(plVar6); return uVar5 | uVar9; } if (*param_1 <= (long)*(ulong *)(lVar1 + 0x178)) { uVar9 = 0; tprint(tracef,", has create_rename_lsn (%u,0x%x) more recent than record, ignoring removal", *(ulong *)(lVar1 + 0x178) >> 0x20); goto LAB_0018abef; } if ((*(byte *)(lVar1 + 0x170) & 2) != 0) { tprint(tracef,", is crashed, can\'t drop it"); uVar9 = 1; goto LAB_0018abef; } cVar3 = close_one_table(*(int8 *)(lVar1 + 0x5e0)); uVar9 = 1; if ((cVar3 != '\0') || (iVar4 = maria_close(plVar6), iVar4 != 0)) goto LAB_0018abef; tprint(tracef,", dropping \'%s\'",lVar2); iVar4 = maria_delete_table(lVar2); if (iVar4 != 0) { eprint(tracef,"Failed to drop table"); tprint(tracef,"\n"); return 1; } } pcVar8 = "\n"; } else { pcVar8 = "we skip DDLs\n"; } tprint(tracef,pcVar8); return 0; }
37,189
ftxui::animation::Animator::Animator(float*, float, std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>, std::chrono::duration<float, std::ratio<1l, 1l>>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/animation.cpp
Animator::Animator(float* from, float to, Duration duration, easing::Function easing_function, Duration delay) : value_(from), from_(*from), to_(to), duration_(duration), easing_function_(std::move(easing_function)), current_(-delay) { RequestAnimationFrame(); }
O2
cpp
ftxui::animation::Animator::Animator(float*, float, std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float (float)>, std::chrono::duration<float, std::ratio<1l, 1l>>): pushq %r14 pushq %rbx subq $0x18, %rsp movaps %xmm2, (%rsp) movq %rdi, %r14 movq %rsi, (%rdi) movss (%rsi), %xmm2 movss %xmm2, 0x8(%rdi) movss %xmm0, 0xc(%rdi) movss %xmm1, 0x10(%rdi) leaq 0x18(%rdi), %rbx movq %rbx, %rdi movq %rdx, %rsi callq 0x2e0ec movaps (%rsp), %xmm0 xorps 0x745c(%rip), %xmm0 # 0x354a0 movss %xmm0, 0x38(%r14) callq 0x26e08 addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x13b10 movq %r14, %rdi callq 0xc7f0
_ZN5ftxui9animation8AnimatorC2EPffNSt6chrono8durationIfSt5ratioILl1ELl1EEEESt8functionIFffEES7_: push r14; Alternative name is 'ftxui::animation::Animator::Animator(float *, float, std::chrono::duration<float, std::ratio<1l, 1l>>, std::function<float ()(float)>, std::chrono::duration<float, std::ratio<1l, 1l>>)' push rbx sub rsp, 18h movaps [rsp+28h+var_28], xmm2 mov r14, rdi mov [rdi], rsi movss xmm2, dword ptr [rsi] movss dword ptr [rdi+8], xmm2 movss dword ptr [rdi+0Ch], xmm0 movss dword ptr [rdi+10h], xmm1 lea rbx, [rdi+18h] mov rdi, rbx; this mov rsi, rdx call _ZNSt8functionIFffEEC2EOS1_; std::function<float ()(float)>::function(std::function<float ()(float)>&&) movaps xmm0, [rsp+28h+var_28] xorps xmm0, cs:xmmword_354A0 movss dword ptr [r14+38h], xmm0 call _ZN5ftxui9animation21RequestAnimationFrameEv; ftxui::animation::RequestAnimationFrame(void) add rsp, 18h pop rbx pop r14 retn mov r14, rax mov rdi, rbx; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r14 call __Unwind_Resume
long long ftxui::animation::Animator::Animator( long long a1, _DWORD *a2, long long a3, float a4, float a5, float a6) { ftxui::animation *v7; // rdi *(_QWORD *)a1 = a2; *(_DWORD *)(a1 + 8) = *a2; *(float *)(a1 + 12) = a4; *(float *)(a1 + 16) = a5; v7 = (ftxui::animation *)(a1 + 24); std::function<float ()(float)>::function(v7, a3); *(float *)(a1 + 56) = -a6; return ftxui::animation::RequestAnimationFrame(v7); }
Animator: PUSH R14 PUSH RBX SUB RSP,0x18 MOVAPS xmmword ptr [RSP],XMM2 MOV R14,RDI MOV qword ptr [RDI],RSI MOVSS XMM2,dword ptr [RSI] MOVSS dword ptr [RDI + 0x8],XMM2 MOVSS dword ptr [RDI + 0xc],XMM0 MOVSS dword ptr [RDI + 0x10],XMM1 LEA RBX,[RDI + 0x18] MOV RDI,RBX MOV RSI,RDX CALL 0x0012e0ec MOVAPS XMM0,xmmword ptr [RSP] XORPS XMM0,xmmword ptr [0x001354a0] MOVSS dword ptr [R14 + 0x38],XMM0 LAB_0012e04a: CALL 0x00126e08 LAB_0012e04f: ADD RSP,0x18 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ftxui::animation::Animator::Animator(float*, float, std::chrono::duration<float, std::ratio<1l, 1l> >, std::function<float (float)>, std::chrono::duration<float, std::ratio<1l, 1l> >) */ void __thiscall ftxui::animation::Animator::Animator (int4 param_2,int4 param_2_00,uint param_3,Animator *this,int4 *param_1, function *param_6) { *(int4 **)this = param_1; *(int4 *)(this + 8) = *param_1; *(int4 *)(this + 0xc) = param_2; *(int4 *)(this + 0x10) = param_2_00; std::function<float(float)>::function((function<float(float)> *)(this + 0x18),param_6); *(uint *)(this + 0x38) = param_3 ^ _DAT_001354a0; /* try { // try from 0012e04a to 0012e04e has its CatchHandler @ 0012e057 */ RequestAnimationFrame(); return; }
37,190
partitioned_key_cache_insert
eloqsql/mysys/mf_keycache.c
static int partitioned_key_cache_insert(PARTITIONED_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length) { uint w_length; uint offset= (uint) (filepos % keycache->key_cache_block_size); DBUG_ENTER("partitioned_key_cache_insert"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file,(ulong) filepos, length)); /* Write data in key_cache_block_size increments */ do { SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache, file, filepos); w_length= length; set_if_smaller(w_length, keycache->key_cache_block_size - offset); if (simple_key_cache_insert((void *) partition, file, filepos, level, buff, w_length)) DBUG_RETURN(1); filepos+= w_length; buff+= w_length; offset = 0; } while ((length-= w_length)); DBUG_RETURN(0); }
O0
c
partitioned_key_cache_insert: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x3c(%rbp) jmp 0xe8205 jmp 0xe8207 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xe8730 movq %rax, -0x48(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx subl -0x3c(%rbp), %ecx cmpl %ecx, %eax jbe 0xe823f movq -0x10(%rbp), %rax movl 0x18(%rax), %eax subl -0x3c(%rbp), %eax movl %eax, -0x38(%rbp) jmp 0xe8241 movq -0x48(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 movl -0x38(%rbp), %r9d callq 0xe6110 cmpl $0x0, %eax je 0xe826c jmp 0xe8263 movl $0x1, -0x4(%rbp) jmp 0xe82ab movl -0x38(%rbp), %eax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movl -0x38(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl $0x0, -0x3c(%rbp) movl -0x38(%rbp), %ecx movl -0x34(%rbp), %eax subl %ecx, %eax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jne 0xe8207 jmp 0xe82a4 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
partitioned_key_cache_insert: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov ecx, [rcx+18h] xor edx, edx div rcx mov eax, edx mov [rbp+var_3C], eax jmp short $+2 loc_E8205: jmp short $+2 loc_E8207: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call get_key_cache_partition mov [rbp+var_48], rax mov eax, [rbp+var_34] mov [rbp+var_38], eax mov eax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+18h] sub ecx, [rbp+var_3C] cmp eax, ecx jbe short loc_E823F mov rax, [rbp+var_10] mov eax, [rax+18h] sub eax, [rbp+var_3C] mov [rbp+var_38], eax loc_E823F: jmp short $+2 loc_E8241: mov rdi, [rbp+var_48] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] mov r9d, [rbp+var_38] call simple_key_cache_insert cmp eax, 0 jz short loc_E826C jmp short $+2 loc_E8263: mov [rbp+var_4], 1 jmp short loc_E82AB loc_E826C: mov eax, [rbp+var_38] add rax, [rbp+var_20] mov [rbp+var_20], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov [rbp+var_3C], 0 mov ecx, [rbp+var_38] mov eax, [rbp+var_34] sub eax, ecx mov [rbp+var_34], eax cmp eax, 0 jnz loc_E8207 jmp short $+2 loc_E82A4: mov [rbp+var_4], 0 loc_E82AB: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long partitioned_key_cache_insert( long long a1, unsigned int a2, unsigned long long a3, int a4, long long a5, unsigned int a6) { _QWORD *key_cache_partition; // [rsp+8h] [rbp-48h] int v8; // [rsp+14h] [rbp-3Ch] unsigned int v9; // [rsp+18h] [rbp-38h] unsigned long long v13; // [rsp+30h] [rbp-20h] v13 = a3; v8 = a3 % *(unsigned int *)(a1 + 24); do { key_cache_partition = (_QWORD *)get_key_cache_partition(a1, a2, v13); v9 = a6; if ( a6 > *(_DWORD *)(a1 + 24) - v8 ) v9 = *(_DWORD *)(a1 + 24) - v8; if ( (unsigned int)simple_key_cache_insert(key_cache_partition, a2, v13, a4, a5, v9) ) return 1; v13 += v9; a5 += v9; v8 = 0; a6 -= v9; } while ( a6 ); return 0; }
partitioned_key_cache_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001e8205 LAB_001e8205: JMP 0x001e8207 LAB_001e8207: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e8730 MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,dword ptr [RBP + -0x3c] CMP EAX,ECX JBE 0x001e823f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x38],EAX LAB_001e823f: JMP 0x001e8241 LAB_001e8241: MOV RDI,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x38] CALL 0x001e6110 CMP EAX,0x0 JZ 0x001e826c JMP 0x001e8263 LAB_001e8263: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001e82ab LAB_001e826c: MOV EAX,dword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x3c],0x0 MOV ECX,dword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x34] SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JNZ 0x001e8207 JMP 0x001e82a4 LAB_001e82a4: MOV dword ptr [RBP + -0x4],0x0 LAB_001e82ab: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 partitioned_key_cache_insert (long param_1,int4 param_2,ulong param_3,int4 param_4,long param_5, uint param_6) { int iVar1; int8 uVar2; int local_44; uint local_40; uint local_3c; long local_38; ulong local_28; local_44 = (int)(param_3 % (ulong)*(uint *)(param_1 + 0x18)); local_3c = param_6; local_38 = param_5; local_28 = param_3; while( true ) { uVar2 = get_key_cache_partition(param_1,param_2,local_28); local_40 = local_3c; if ((uint)(*(int *)(param_1 + 0x18) - local_44) < local_3c) { local_40 = *(int *)(param_1 + 0x18) - local_44; } iVar1 = simple_key_cache_insert(uVar2,param_2,local_28,param_4,local_38,local_40); if (iVar1 != 0) break; local_28 = local_40 + local_28; local_38 = local_38 + (ulong)local_40; local_44 = 0; local_3c = local_3c - local_40; if (local_3c == 0) { return 0; } } return 1; }
37,191
js_parseInt
bluesky950520[P]quickjs/quickjs.c
static JSValue js_parseInt(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *str; int radix, flags; JSValue ret; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; if (JS_ToInt32(ctx, &radix, argv[1])) { JS_FreeCString(ctx, str); return JS_EXCEPTION; } flags = ATOD_TRIM_SPACES; if (radix == 0) { flags |= ATOD_ACCEPT_HEX_PREFIX; // Only 0x and 0X are supported radix = 10; } ret = js_atof(ctx, str, len, NULL, radix, flags); JS_FreeCString(ctx, str); return ret; }
O0
c
js_parseInt: subq $0x78, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x18(%rsp), %rsi callq 0x691c0 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0xd634a movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0xd6415 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x34(%rsp), %rsi callq 0x3f210 cmpl $0x0, %eax je 0xd6390 movq 0x50(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x30140 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0xd6415 movl $0x1, 0x30(%rsp) cmpl $0x0, 0x34(%rsp) jne 0xd63b2 movl 0x30(%rsp), %eax orl $0x20, %eax movl %eax, 0x30(%rsp) movl $0xa, 0x34(%rsp) movq 0x50(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x18(%rsp), %rdx movl 0x34(%rsp), %r8d movl 0x30(%rsp), %r9d xorl %eax, %eax movl %eax, %ecx callq 0x69200 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x50(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x30140 movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
js_parseInt: sub rsp, 78h mov [rsp+78h+var_20], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_28], rdi mov [rsp+78h+var_2C], ecx mov [rsp+78h+var_38], r8 mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+78h+var_60] call JS_ToCStringLen_1 mov [rsp+78h+var_40], rax cmp [rsp+78h+var_40], 0 jnz short loc_D634A mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp loc_D6415 loc_D634A: mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+78h+var_44] call JS_ToInt32 cmp eax, 0 jz short loc_D6390 mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_40] call JS_FreeCString mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp loc_D6415 loc_D6390: mov [rsp+78h+var_48], 1 cmp [rsp+78h+var_44], 0 jnz short loc_D63B2 mov eax, [rsp+78h+var_48] or eax, 20h mov [rsp+78h+var_48], eax mov [rsp+78h+var_44], 0Ah loc_D63B2: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_40] mov rdx, [rsp+78h+var_60] mov r8d, [rsp+78h+var_44] mov r9d, [rsp+78h+var_48] xor eax, eax mov ecx, eax call js_atof mov [rsp+78h+var_70], rax mov [rsp+78h+var_68], rdx mov rax, [rsp+78h+var_70] mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_68] mov [rsp+78h+var_50], rax mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_40] call JS_FreeCString mov rax, [rsp+78h+var_58] mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_50] mov [rsp+78h+var_8], rax loc_D6415: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long js_parseInt(long long a1, long long a2, long long a3, int a4, long long *a5) { long long v5; // rdx unsigned __int8 *v7; // [rsp+18h] [rbp-60h] BYREF long long v8; // [rsp+20h] [rbp-58h] long long v9; // [rsp+28h] [rbp-50h] int v10; // [rsp+30h] [rbp-48h] int v11; // [rsp+34h] [rbp-44h] BYREF unsigned __int8 *v12; // [rsp+38h] [rbp-40h] long long *v13; // [rsp+40h] [rbp-38h] int v14; // [rsp+4Ch] [rbp-2Ch] long long v15; // [rsp+50h] [rbp-28h] long long v16; // [rsp+58h] [rbp-20h] long long v17; // [rsp+60h] [rbp-18h] long long v18; // [rsp+68h] [rbp-10h] long long v19; // [rsp+70h] [rbp-8h] v16 = a2; v17 = a3; v15 = a1; v14 = a4; v13 = a5; v12 = (unsigned __int8 *)JS_ToCStringLen_1(a1, &v7, *a5, a5[1]); if ( v12 ) { if ( (unsigned int)JS_ToInt32(v15, (long long)&v11, (_DWORD *)v13[2], v13[3]) ) { JS_FreeCString(v15, (long long)v12); LODWORD(v18) = 0; v19 = 6LL; } else { v10 = 1; if ( !v11 ) { v10 |= 0x20u; v11 = 10; } v8 = js_atof(v15, v12, v7, 0LL, v11, v10); v9 = v5; JS_FreeCString(v15, (long long)v12); v18 = v8; v19 = v9; } } else { LODWORD(v18) = 0; v19 = 6LL; } return v18; }
js_parseInt: SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x18] CALL 0x001691c0 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x001d634a MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x001d6415 LAB_001d634a: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x34] CALL 0x0013f210 CMP EAX,0x0 JZ 0x001d6390 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00130140 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x001d6415 LAB_001d6390: MOV dword ptr [RSP + 0x30],0x1 CMP dword ptr [RSP + 0x34],0x0 JNZ 0x001d63b2 MOV EAX,dword ptr [RSP + 0x30] OR EAX,0x20 MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x34],0xa LAB_001d63b2: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x18] MOV R8D,dword ptr [RSP + 0x34] MOV R9D,dword ptr [RSP + 0x30] XOR EAX,EAX MOV ECX,EAX CALL 0x00169200 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00130140 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x70],RAX LAB_001d6415: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] js_parseInt(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; int8 local_60; int1 local_58 [16]; int4 local_48; int local_44; long local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_40 = JS_ToCStringLen(param_1,&local_60,*param_5,param_5[1]); if (local_40 == 0) { local_10 = 0; local_8 = 6; } else { iVar2 = JS_ToInt32(local_28,&local_44,local_38[2],local_38[3]); if (iVar2 == 0) { local_48 = 1; if (local_44 == 0) { local_48 = 0x21; local_44 = 10; } local_58 = js_atof(local_28,local_40,local_60,0,local_44,local_48); JS_FreeCString(local_28,local_40); local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } else { JS_FreeCString(local_28,local_40); local_10 = 0; local_8 = 6; } } auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
37,192
js_parseInt
bluesky950520[P]quickjs/quickjs.c
static JSValue js_parseInt(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *str; int radix, flags; JSValue ret; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; if (JS_ToInt32(ctx, &radix, argv[1])) { JS_FreeCString(ctx, str); return JS_EXCEPTION; } flags = ATOD_TRIM_SPACES; if (radix == 0) { flags |= ATOD_ACCEPT_HEX_PREFIX; // Only 0x and 0X are supported radix = 10; } ret = js_atof(ctx, str, len, NULL, radix, flags); JS_FreeCString(ctx, str); return ret; }
O1
c
js_parseInt: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %r8, %r13 movq %rdi, %r15 movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x8(%rsp), %rsi xorl %r12d, %r12d xorl %r8d, %r8d callq 0x24c53 movl $0x6, %ebx testq %rax, %rax je 0x7d364 movq %rax, %r14 movq 0x10(%r13), %rdx movq 0x18(%r13), %rcx movq %rdx, (%rsp) cmpl $-0x9, %ecx jb 0x7d32b movq (%rsp), %rax incl (%rax) movq %rsp, %rsi movq %r15, %rdi callq 0x2ba1f testl %eax, %eax je 0x7d368 movq 0x18(%r15), %rdi movl -0x18(%r14), %eax leal -0x1(%rax), %ecx movl %ecx, -0x18(%r14) cmpl $0x1, %eax jg 0x7d361 addq $-0x18, %r14 movq %r14, %rsi movq $-0x7, %rdx callq 0x252c2 xorl %r12d, %r12d xorl %eax, %eax jmp 0x7d3db movl (%rsp), %eax xorl %r9d, %r9d testl %eax, %eax sete %r9b movl $0xa, %r8d cmovnel %eax, %r8d movl %r8d, (%rsp) shll $0x5, %r9d incl %r9d movq 0x8(%rsp), %rdx movq %r15, %rdi movq %r14, %rsi xorl %ecx, %ecx callq 0x4266a movq %rax, %r12 movq %rdx, %rbx movq 0x18(%r15), %rdi movl -0x18(%r14), %eax leal -0x1(%rax), %ecx movl %ecx, -0x18(%r14) cmpl $0x1, %eax jg 0x7d3c8 addq $-0x18, %r14 movq %r14, %rsi movq $-0x7, %rdx callq 0x252c2 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r12, %rax andq %rcx, %rax movl %r12d, %r12d orq %rax, %r12 movq %r12, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_parseInt: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r13, r8 mov r15, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+38h+var_30] xor r12d, r12d xor r8d, r8d call JS_ToCStringLen2 mov ebx, 6 test rax, rax jz short loc_7D364 mov r14, rax mov rdx, [r13+10h] mov rcx, [r13+18h] mov [rsp+38h+var_38], rdx cmp ecx, 0FFFFFFF7h jb short loc_7D32B mov rax, [rsp+38h+var_38] inc dword ptr [rax] loc_7D32B: mov rsi, rsp mov rdi, r15 call JS_ToInt32Free test eax, eax jz short loc_7D368 mov rdi, [r15+18h] mov eax, [r14-18h] lea ecx, [rax-1] mov [r14-18h], ecx cmp eax, 1 jg short loc_7D361 add r14, 0FFFFFFFFFFFFFFE8h mov rsi, r14 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_7D361: xor r12d, r12d loc_7D364: xor eax, eax jmp short loc_7D3DB loc_7D368: mov eax, dword ptr [rsp+38h+var_38] xor r9d, r9d test eax, eax setz r9b mov r8d, 0Ah cmovnz r8d, eax mov dword ptr [rsp+38h+var_38], r8d shl r9d, 5 inc r9d mov rdx, [rsp+38h+var_30] mov rdi, r15 mov rsi, r14 xor ecx, ecx call js_atof mov r12, rax mov rbx, rdx mov rdi, [r15+18h] mov eax, [r14-18h] lea ecx, [rax-1] mov [r14-18h], ecx cmp eax, 1 jg short loc_7D3C8 add r14, 0FFFFFFFFFFFFFFE8h mov rsi, r14 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_7D3C8: mov rcx, 0FFFFFFFF00000000h mov rax, r12 and rax, rcx mov r12d, r12d loc_7D3DB: or r12, rax mov rax, r12 mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
unsigned long long js_parseInt( long long a1, double a2, __m128d a3, long long a4, long long a5, long long a6, long long *a7) { long long v8; // r12 long long v9; // rax unsigned __int8 *v10; // r14 unsigned long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 long long v15; // rdi int v16; // eax long long v17; // rcx unsigned long long v18; // rax __int16 v19; // r9 int v20; // r8d long long v21; // r8 long long v22; // r9 long long v23; // rdi int v24; // eax long long v25; // rcx _DWORD *v27; // [rsp+0h] [rbp-38h] BYREF long long v28[6]; // [rsp+8h] [rbp-30h] BYREF v8 = 0LL; v9 = JS_ToCStringLen2(a1, v28, *a7, a7[1], 0); if ( !v9 ) { LABEL_8: v18 = 0LL; return v18 | v8; } v10 = (unsigned __int8 *)v9; v11 = a7[2]; v12 = a7[3]; v27 = (_DWORD *)v11; if ( (unsigned int)v12 >= 0xFFFFFFF7 ) ++*v27; if ( (unsigned int)JS_ToInt32Free(a1, (int *)&v27, v11, v12) ) { v15 = *(_QWORD *)(a1 + 24); v16 = *((_DWORD *)v10 - 6); v17 = (unsigned int)(v16 - 1); *((_DWORD *)v10 - 6) = v17; if ( v16 <= 1 ) js_free_value_rt(v15, (_QWORD *)v10 - 3, -7LL, v17, v13, v14); v8 = 0LL; goto LABEL_8; } v19 = (_DWORD)v27 == 0; v20 = 10; if ( (_DWORD)v27 ) v20 = (int)v27; LODWORD(v27) = v20; v8 = js_atof(a1, v10, v28[0], 0LL, v20, 32 * v19 + 1, a2, a3); v23 = *(_QWORD *)(a1 + 24); v24 = *((_DWORD *)v10 - 6); v25 = (unsigned int)(v24 - 1); *((_DWORD *)v10 - 6) = v25; if ( v24 <= 1 ) js_free_value_rt(v23, (_QWORD *)v10 - 3, -7LL, v25, v21, v22); v18 = v8 & 0xFFFFFFFF00000000LL; v8 = (unsigned int)v8; return v18 | v8; }
js_parseInt: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R13,R8 MOV R15,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x8] XOR R12D,R12D XOR R8D,R8D CALL 0x00124c53 MOV EBX,0x6 TEST RAX,RAX JZ 0x0017d364 MOV R14,RAX MOV RDX,qword ptr [R13 + 0x10] MOV RCX,qword ptr [R13 + 0x18] MOV qword ptr [RSP],RDX CMP ECX,-0x9 JC 0x0017d32b MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_0017d32b: MOV RSI,RSP MOV RDI,R15 CALL 0x0012ba1f TEST EAX,EAX JZ 0x0017d368 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14 + -0x18] LEA ECX,[RAX + -0x1] MOV dword ptr [R14 + -0x18],ECX CMP EAX,0x1 JG 0x0017d361 ADD R14,-0x18 MOV RSI,R14 MOV RDX,-0x7 CALL 0x001252c2 LAB_0017d361: XOR R12D,R12D LAB_0017d364: XOR EAX,EAX JMP 0x0017d3db LAB_0017d368: MOV EAX,dword ptr [RSP] XOR R9D,R9D TEST EAX,EAX SETZ R9B MOV R8D,0xa CMOVNZ R8D,EAX MOV dword ptr [RSP],R8D SHL R9D,0x5 INC R9D MOV RDX,qword ptr [RSP + 0x8] MOV RDI,R15 MOV RSI,R14 XOR ECX,ECX CALL 0x0014266a MOV R12,RAX MOV RBX,RDX MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14 + -0x18] LEA ECX,[RAX + -0x1] MOV dword ptr [R14 + -0x18],ECX CMP EAX,0x1 JG 0x0017d3c8 ADD R14,-0x18 MOV RSI,R14 MOV RDX,-0x7 CALL 0x001252c2 LAB_0017d3c8: MOV RCX,-0x100000000 MOV RAX,R12 AND RAX,RCX MOV R12D,R12D LAB_0017d3db: OR R12,RAX MOV RAX,R12 MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_parseInt(long param_1) { int8 uVar1; int iVar2; long lVar3; int8 uVar4; int8 *in_R8; ulong uVar5; ulong uVar6; bool bVar7; int1 auVar8 [16]; int *local_38; int8 local_30; lVar3 = JS_ToCStringLen2(param_1,&local_30,*in_R8,in_R8[1],0); uVar4 = 6; if (lVar3 != 0) { local_38 = (int *)in_R8[2]; if (0xfffffff6 < (uint)in_R8[3]) { *local_38 = *local_38 + 1; } iVar2 = JS_ToInt32Free(param_1,&local_38); if (iVar2 == 0) { bVar7 = (int)local_38 == 0; uVar5 = 10; if (!bVar7) { uVar5 = (ulong)local_38 & 0xffffffff; } local_38 = (int *)CONCAT44(local_38._4_4_,(int)uVar5); auVar8 = js_atof(param_1,lVar3,local_30,0,uVar5,bVar7 * ' ' + '\x01'); uVar4 = auVar8._8_8_; uVar1 = *(int8 *)(param_1 + 0x18); iVar2 = *(int *)(lVar3 + -0x18); *(int *)(lVar3 + -0x18) = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar1,lVar3 + -0x18,0xfffffffffffffff9); } uVar5 = auVar8._0_8_ & 0xffffffff00000000; uVar6 = auVar8._0_8_ & 0xffffffff; goto LAB_0017d3db; } uVar1 = *(int8 *)(param_1 + 0x18); iVar2 = *(int *)(lVar3 + -0x18); *(int *)(lVar3 + -0x18) = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar1,lVar3 + -0x18,0xfffffffffffffff9); } } uVar6 = 0; uVar5 = 0; LAB_0017d3db: auVar8._8_8_ = uVar4; auVar8._0_8_ = uVar6 | uVar5; return auVar8; }
37,193
inline_mysql_file_close
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_close( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); result= my_close(file, flags); PSI_FILE_CALL(end_file_close_wait)(locker, result); return result; } #endif result= my_close(file, flags); return result; }
O0
c
inline_mysql_file_close: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq 0x250058(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x4, %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 0x7104b leaq 0x250015(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x220(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf5d90 movl %eax, -0x24(%rbp) leaq 0x24ffe8(%rip), %rax # 0x2c1018 movq (%rax), %rax movq 0x228(%rax), %rax movq -0x30(%rbp), %rdi movl -0x24(%rbp), %esi callq *%rax movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x71060 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xf5d90 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax)
inline_mysql_file_close_2: 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 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 4 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_7104B lea rax, PSI_server mov rax, [rax] mov rax, [rax+220h] mov rdi, [rbp+var_30] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_close mov [rbp+var_24], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+228h] mov rdi, [rbp+var_30] mov esi, [rbp+var_24] call rax mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_71060 loc_7104B: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_close mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_71060: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_close_2(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; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 4LL); if ( v6 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[68])(v6, v11, v10); v7 = my_close(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[69])(v6, v7); } else { return (unsigned int)my_close(v9, v8); } return v7; }
inline_mysql_file_close: 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 LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x4 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 0x0017104b LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x220] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f5d90 MOV dword ptr [RBP + -0x24],EAX LEA RAX,[0x3c1018] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x228] MOV RDI,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x24] CALL RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x00171060 LAB_0017104b: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001f5d90 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_00171060: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_close(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_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,4); if (local_38 == 0) { local_c = my_close(local_20,local_28); } else { (**(code **)(PSI_server + 0x220))(local_38,local_18,local_1c); local_2c = my_close(local_20,local_28); (**(code **)(PSI_server + 0x228))(local_38,local_2c); local_c = local_2c; } return local_c; }
37,194
inline_mysql_file_close
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_close( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); result= my_close(file, flags); PSI_FILE_CALL(end_file_close_wait)(locker, result); return result; } #endif result= my_close(file, flags); return result; }
O3
c
inline_mysql_file_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movl %esi, %ebx movl %edi, %r14d leaq 0x32cb0e(%rip), %rax # 0x387050 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x5a56d movl %ebx, %edi xorl %esi, %esi callq 0xa1ac1 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 0x2a71f movl (%r15), %eax jmp 0x5a562
inline_mysql_file_close: 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, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_5A56D mov edi, ebx xor esi, esi call my_close loc_5A562: add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_5A56D: lea r15, [rbp+var_1C] mov rdi, rax mov esi, r14d mov edx, ebx mov rcx, r15 call inline_mysql_file_close_cold_1 mov eax, [r15] jmp short loc_5A562
long long inline_mysql_file_close(unsigned int a1, long long a2) { long long v2; // rax _BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF unsigned int v5[7]; // [rsp+54h] [rbp-1Ch] BYREF v2 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v4, a2, 4LL); if ( !v2 ) return my_close((unsigned int)a2, 0LL); inline_mysql_file_close_cold_1(v2, a1, a2, v5); return v5[0]; }
inline_mysql_file_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV EBX,ESI MOV R14D,EDI LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0015a56d MOV EDI,EBX XOR ESI,ESI CALL 0x001a1ac1 LAB_0015a562: ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_0015a56d: LEA R15,[RBP + -0x1c] MOV RDI,RAX MOV ESI,R14D MOV EDX,EBX MOV RCX,R15 CALL 0x0012a71f MOV EAX,dword ptr [R15] JMP 0x0015a562
ulong inline_mysql_file_close(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,4); if (lVar1 == 0) { uVar2 = my_close(param_2 & 0xffffffff,0); } else { inline_mysql_file_close_cold_1(lVar1,param_1,param_2 & 0xffffffff,&local_24); uVar2 = (ulong)local_24; } return uVar2; }
37,195
int10_to_str
eloqsql/strings/int2str.c
char *int10_to_str(long int val,char *dst,int radix) { char buffer[65]; register char *p; long int new_val; unsigned long int uval = (unsigned long int) val; if (radix < 0) /* -10 */ { if (val < 0) { *dst++ = '-'; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (unsigned long int)0 - uval; } } p = &buffer[sizeof(buffer)-1]; *p = '\0'; new_val= (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } while ((*dst++ = *p++) != 0) ; return dst-1; }
O3
c
int10_to_str: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) testl %edx, %edx setns %al testq %rdi, %rdi setns %cl orb %al, %cl jne 0xd5807 movb $0x2d, (%rsi) incq %rsi negq %rdi leaq -0x11(%rbp), %r8 movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD movq %rdi, %rax mulq %r9 movq %rdx, %rcx movb $0x0, 0x1(%r8) shrq $0x3, %rcx imull $0xf6, %ecx, %eax addl %edi, %eax addb $0x30, %al movb %al, (%r8) cmpq $0xa, %rdi jb 0xd585e movq %rcx, %rax mulq %r9 shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %ecx, %eax addb $0x30, %al movb %al, -0x1(%r8) decq %r8 cmpq $0x9, %rcx movq %rdx, %rcx ja 0xd583a decq %rsi movb (%r8), %al incq %r8 movb %al, 0x1(%rsi) incq %rsi testb %al, %al jne 0xd5861 movq %fs:0x28, %rax cmpq -0x8(%rbp), %rax jne 0xd5889 movq %rsi, %rax addq $0x50, %rsp popq %rbp retq callq 0x29270 nop
int10_to_str: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax test edx, edx setns al test rdi, rdi setns cl or cl, al jnz short loc_D5807 mov byte ptr [rsi], 2Dh ; '-' inc rsi neg rdi loc_D5807: lea r8, [rbp+var_11] mov r9, 0CCCCCCCCCCCCCCCDh mov rax, rdi mul r9 mov rcx, rdx mov byte ptr [r8+1], 0 shr rcx, 3 imul eax, ecx, 0F6h add eax, edi add al, 30h ; '0' mov [r8], al cmp rdi, 0Ah jb short loc_D585E loc_D583A: mov rax, rcx mul r9 shr rdx, 3 imul eax, edx, 0F6h add eax, ecx add al, 30h ; '0' mov [r8-1], al dec r8 cmp rcx, 9 mov rcx, rdx ja short loc_D583A loc_D585E: dec rsi loc_D5861: mov al, [r8] inc r8 mov [rsi+1], al inc rsi test al, al jnz short loc_D5861 mov rax, fs:28h cmp rax, [rbp+var_8] jnz short loc_D5889 mov rax, rsi add rsp, 50h pop rbp retn loc_D5889: call ___stack_chk_fail
_BYTE * int10_to_str(unsigned long long a1, _BYTE *a2, int a3) { char *v3; // r8 unsigned long long v4; // rcx bool v5; // cc _BYTE *v6; // rsi char v7; // al _BYTE v9[9]; // [rsp+3Fh] [rbp-11h] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] v10 = __readfsqword(0x28u); if ( a3 < 0 && (a1 & 0x8000000000000000LL) != 0LL ) { *a2++ = 45; a1 = -(long long)a1; } v3 = v9; v9[1] = 0; v4 = a1 / 0xA; v9[0] = a1 % 0xA + 48; if ( a1 >= 0xA ) { do { *--v3 = v4 % 0xA + 48; v5 = v4 <= 9; v4 /= 0xAuLL; } while ( !v5 ); } v6 = a2 - 1; do { v7 = *v3++; *++v6 = v7; } while ( v7 ); return v6; }
int10_to_str: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX TEST EDX,EDX SETNS AL TEST RDI,RDI SETNS CL OR CL,AL JNZ 0x001d5807 MOV byte ptr [RSI],0x2d INC RSI NEG RDI LAB_001d5807: LEA R8,[RBP + -0x11] MOV R9,-0x3333333333333333 MOV RAX,RDI MUL R9 MOV RCX,RDX MOV byte ptr [R8 + 0x1],0x0 SHR RCX,0x3 IMUL EAX,ECX,0xf6 ADD EAX,EDI ADD AL,0x30 MOV byte ptr [R8],AL CMP RDI,0xa JC 0x001d585e LAB_001d583a: MOV RAX,RCX MUL R9 SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,ECX ADD AL,0x30 MOV byte ptr [R8 + -0x1],AL DEC R8 CMP RCX,0x9 MOV RCX,RDX JA 0x001d583a LAB_001d585e: DEC RSI LAB_001d5861: MOV AL,byte ptr [R8] INC R8 MOV byte ptr [RSI + 0x1],AL INC RSI TEST AL,AL JNZ 0x001d5861 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x001d5889 MOV RAX,RSI ADD RSP,0x50 POP RBP RET LAB_001d5889: CALL 0x00129270
int1 * int10_to_str(ulong param_1,int1 *param_2,int param_3) { char cVar1; ulong uVar2; ulong uVar3; char *pcVar4; long in_FS_OFFSET; char local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_1 < 0 && param_3 < 0) { *param_2 = 0x2d; param_2 = param_2 + 1; param_1 = -param_1; } pcVar4 = local_1a + 1; local_1a[2] = 0; local_1a[1] = (char)(param_1 / 10) * -10 + (char)param_1 + '0'; uVar3 = param_1 / 10; while (uVar2 = uVar3, 9 < param_1) { pcVar4[-1] = (char)(uVar2 / 10) * -10 + (char)uVar2 + '0'; pcVar4 = pcVar4 + -1; uVar3 = uVar2 / 10; param_1 = uVar2; } param_2 = param_2 + -1; do { cVar1 = *pcVar4; pcVar4 = pcVar4 + 1; param_2[1] = cVar1; param_2 = param_2 + 1; } while (cVar1 != '\0'); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return param_2; }
37,196
ImPlot::FloorTime(ImPlotTime const&, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
ImPlotTime FloorTime(const ImPlotTime& t, ImPlotTimeUnit unit) { ImPlotContext& gp = *GImPlot; GetTime(t, &gp.Tm); switch (unit) { case ImPlotTimeUnit_S: return ImPlotTime(t.S, 0); case ImPlotTimeUnit_Ms: return ImPlotTime(t.S, (t.Us / 1000) * 1000); case ImPlotTimeUnit_Us: return t; case ImPlotTimeUnit_Yr: gp.Tm.tm_mon = 0; // fall-through case ImPlotTimeUnit_Mo: gp.Tm.tm_mday = 1; // fall-through case ImPlotTimeUnit_Day: gp.Tm.tm_hour = 0; // fall-through case ImPlotTimeUnit_Hr: gp.Tm.tm_min = 0; // fall-through case ImPlotTimeUnit_Min: gp.Tm.tm_sec = 0; break; default: return t; } return MkTime(&gp.Tm); }
O1
cpp
ImPlot::FloorTime(ImPlotTime const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movq 0x28698c(%rip), %r15 # 0x336ca0 testq %r15, %r15 jne 0xb0325 leaq 0x1ea3bb(%rip), %rdi # 0x29a6db callq 0x2161f4 leaq 0x3e0(%r15), %r14 movq 0x28696d(%rip), %rax # 0x336ca0 cmpb $0x1, 0x304(%rax) jne 0xb0349 movq %rbx, %rdi movq %r14, %rsi callq 0xf570 jmp 0xb0354 movq %rbx, %rdi movq %r14, %rsi callq 0x10370 cmpl $0x7, %ebp ja 0xb036b movl %ebp, %eax leaq 0x1e98c2(%rip), %rcx # 0x299c24 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%rbx), %rax movl 0x8(%rbx), %edx jmp 0xb03ee movq (%rbx), %rax xorl %edx, %edx jmp 0xb03ee movl $0x0, 0x3f0(%r15) movl $0x1, 0x3ec(%r15) movl $0x0, 0x3e8(%r15) movl $0x0, 0x3e4(%r15) movl $0x0, (%r14) cmpq $0x0, 0x2868eb(%rip) # 0x336ca0 jne 0xb03c3 leaq 0x1ea31d(%rip), %rdi # 0x29a6db callq 0x2161f4 movq 0x2868d6(%rip), %rax # 0x336ca0 cmpb $0x1, 0x304(%rax) jne 0xb03dd movq %r14, %rdi callq 0xf6a0 jmp 0xb03e5 movq %r14, %rdi callq 0x10150 xorl %edx, %edx testq %rax, %rax cmovleq %rdx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movslq 0x8(%rbx), %rax imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3 movq %rax, %rcx shrq $0x3f, %rcx sarq $0x26, %rax addl %ecx, %eax imull $0x3e8, %eax, %eax # imm = 0x3E8 movslq %eax, %rdx imulq $0x431bde83, %rdx, %rax # imm = 0x431BDE83 movq %rax, %rcx shrq $0x3f, %rcx sarq $0x32, %rax addl %ecx, %eax movslq %eax, %rcx movq (%rbx), %rax addq %rcx, %rax imull $0xf4240, %ecx, %ecx # imm = 0xF4240 subl %ecx, %edx jmp 0xb03ee
_ZN6ImPlot9FloorTimeERK10ImPlotTimei: push rbp push r15 push r14 push rbx push rax mov ebp, esi mov rbx, rdi mov r15, cs:GImPlot test r15, r15 jnz short loc_B0325 lea rdi, aNoCurrentConte_0; "No current context. Did you call ImPlot"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_B0325: lea r14, [r15+3E0h] mov rax, cs:GImPlot cmp byte ptr [rax+304h], 1 jnz short loc_B0349 mov rdi, rbx mov rsi, r14 call _localtime_r jmp short loc_B0354 loc_B0349: mov rdi, rbx mov rsi, r14; char * call _gmtime_r loc_B0354: cmp ebp, 7; switch 8 cases ja short def_B0369; jumptable 00000000000B0369 default case, case 0 mov eax, ebp lea rcx, jpt_B0369 movsxd rax, ds:(jpt_B0369 - 299C24h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_B0369: mov rax, [rbx]; jumptable 00000000000B0369 default case, case 0 mov edx, [rbx+8] jmp short loc_B03EE loc_B0373: mov rax, [rbx]; jumptable 00000000000B0369 case 2 xor edx, edx jmp short loc_B03EE loc_B037A: mov dword ptr [r15+3F0h], 0; jumptable 00000000000B0369 case 7 loc_B0385: mov dword ptr [r15+3ECh], 1; jumptable 00000000000B0369 case 6 loc_B0390: mov dword ptr [r15+3E8h], 0; jumptable 00000000000B0369 case 5 loc_B039B: mov dword ptr [r15+3E4h], 0; jumptable 00000000000B0369 case 4 loc_B03A6: mov dword ptr [r14], 0; jumptable 00000000000B0369 case 3 cmp cs:GImPlot, 0 jnz short loc_B03C3 lea rdi, aNoCurrentConte_0; "No current context. Did you call ImPlot"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_B03C3: mov rax, cs:GImPlot cmp byte ptr [rax+304h], 1 jnz short loc_B03DD mov rdi, r14 call _mktime jmp short loc_B03E5 loc_B03DD: mov rdi, r14 call _timegm loc_B03E5: xor edx, edx test rax, rax cmovle rax, rdx loc_B03EE: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_B03F9: movsxd rax, dword ptr [rbx+8]; jumptable 00000000000B0369 case 1 imul rax, 10624DD3h mov rcx, rax shr rcx, 3Fh sar rax, 26h add eax, ecx imul eax, 3E8h movsxd rdx, eax imul rax, rdx, 431BDE83h mov rcx, rax shr rcx, 3Fh sar rax, 32h add eax, ecx movsxd rcx, eax mov rax, [rbx] add rax, rcx imul ecx, 0F4240h sub edx, ecx jmp short loc_B03EE
long long ImPlot::FloorTime(_DWORD *a1, const char *a2) { ImGui *v2; // r15 long long result; // rax v2 = GImPlot; if ( !GImPlot ) ImGui::ErrorLog( (ImGui *)"No current context. Did you call ImPlot::CreateContext() or ImPlot::SetCurrentContext()?", a2); if ( *((_BYTE *)GImPlot + 772) == 1 ) localtime_r(a1, (char *)v2 + 992); else gmtime_r(a1, (char *)v2 + 992); switch ( (int)a2 ) { case 1: return 1000 * (a1[2] / 1000) / 1000000 + *(_QWORD *)a1; case 2: return *(_QWORD *)a1; case 3: goto LABEL_13; case 4: goto LABEL_12; case 5: goto LABEL_11; case 6: goto LABEL_10; case 7: *((_DWORD *)v2 + 252) = 0; LABEL_10: *((_DWORD *)v2 + 251) = 1; LABEL_11: *((_DWORD *)v2 + 250) = 0; LABEL_12: *((_DWORD *)v2 + 249) = 0; LABEL_13: *((_DWORD *)v2 + 248) = 0; if ( !GImPlot ) ImGui::ErrorLog( (ImGui *)"No current context. Did you call ImPlot::CreateContext() or ImPlot::SetCurrentContext()?", (const char *)v2 + 992); if ( *((_BYTE *)GImPlot + 772) == 1 ) result = mktime((char *)v2 + 992); else result = timegm((char *)v2 + 992); if ( result <= 0 ) result = 0LL; break; default: result = *(_QWORD *)a1; break; } return result; }
FloorTime: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI MOV R15,qword ptr [0x00436ca0] TEST R15,R15 JNZ 0x001b0325 LEA RDI,[0x39a6db] CALL 0x003161f4 LAB_001b0325: LEA R14,[R15 + 0x3e0] MOV RAX,qword ptr [0x00436ca0] CMP byte ptr [RAX + 0x304],0x1 JNZ 0x001b0349 MOV RDI,RBX MOV RSI,R14 CALL 0x0010f570 JMP 0x001b0354 LAB_001b0349: MOV RDI,RBX MOV RSI,R14 CALL 0x00110370 LAB_001b0354: CMP EBP,0x7 JA 0x001b036b MOV EAX,EBP LEA RCX,[0x399c24] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RAX,qword ptr [RBX] MOV EDX,dword ptr [RBX + 0x8] JMP 0x001b03ee caseD_2: MOV RAX,qword ptr [RBX] XOR EDX,EDX JMP 0x001b03ee caseD_7: MOV dword ptr [R15 + 0x3f0],0x0 caseD_6: MOV dword ptr [R15 + 0x3ec],0x1 caseD_5: MOV dword ptr [R15 + 0x3e8],0x0 caseD_4: MOV dword ptr [R15 + 0x3e4],0x0 caseD_3: MOV dword ptr [R14],0x0 CMP qword ptr [0x00436ca0],0x0 JNZ 0x001b03c3 LEA RDI,[0x39a6db] CALL 0x003161f4 LAB_001b03c3: MOV RAX,qword ptr [0x00436ca0] CMP byte ptr [RAX + 0x304],0x1 JNZ 0x001b03dd MOV RDI,R14 CALL 0x0010f6a0 JMP 0x001b03e5 LAB_001b03dd: MOV RDI,R14 CALL 0x00110150 LAB_001b03e5: XOR EDX,EDX TEST RAX,RAX CMOVLE RAX,RDX LAB_001b03ee: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET caseD_1: MOVSXD RAX,dword ptr [RBX + 0x8] IMUL RAX,RAX,0x10624dd3 MOV RCX,RAX SHR RCX,0x3f SAR RAX,0x26 ADD EAX,ECX IMUL EAX,EAX,0x3e8 MOVSXD RDX,EAX IMUL RAX,RDX,0x431bde83 MOV RCX,RAX SHR RCX,0x3f SAR RAX,0x32 ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBX] ADD RAX,RCX IMUL ECX,ECX,0xf4240 SUB EDX,ECX JMP 0x001b03ee
/* ImPlot::FloorTime(ImPlotTime const&, int) */ int1 [16] ImPlot::FloorTime(ImPlotTime *param_1,int param_2) { tm *__tp; long lVar1; int iVar2; ulong uVar3; ulong uVar4; int1 auVar5 [16]; lVar1 = GImPlot; if (GImPlot == 0) { ImGui::ErrorLog( "No current context. Did you call ImPlot::CreateContext() or ImPlot::SetCurrentContext()?" ); } __tp = (tm *)(lVar1 + 0x3e0); if (*(char *)(GImPlot + 0x304) == '\x01') { localtime_r((time_t *)param_1,__tp); } else { gmtime_r((time_t *)param_1,__tp); } switch(param_2) { default: uVar4 = (ulong)*(uint *)(param_1 + 8); uVar3 = *(ulong *)param_1; break; case 1: iVar2 = (*(int *)(param_1 + 8) / 1000) * 1000; uVar3 = *(long *)param_1 + (long)(iVar2 / 1000000); uVar4 = (ulong)(uint)(iVar2 % 1000000); break; case 2: uVar3 = *(ulong *)param_1; uVar4 = 0; break; case 7: *(int4 *)(lVar1 + 0x3f0) = 0; case 6: *(int4 *)(lVar1 + 0x3ec) = 1; case 5: *(int4 *)(lVar1 + 1000) = 0; case 4: *(int4 *)(lVar1 + 0x3e4) = 0; case 3: __tp->tm_sec = 0; if (GImPlot == 0) { ImGui::ErrorLog( "No current context. Did you call ImPlot::CreateContext() or ImPlot::SetCurrentContext()?" ); } if (*(char *)(GImPlot + 0x304) == '\x01') { uVar3 = mktime(__tp); } else { uVar3 = timegm(__tp); } uVar4 = 0; if ((long)uVar3 < 1) { uVar3 = uVar4; } } auVar5._8_8_ = uVar4; auVar5._0_8_ = uVar3; return auVar5; }
37,197
mysql_server_init
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) { #ifdef _WIN32 BOOL ret = InitOnceExecuteOnce(&init_once, win_init_once, NULL, NULL); return ret? 0: 1; #else return pthread_once(&init_once, mysql_once_init); #endif }
O0
c
mysql_server_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x47fb6(%rip), %rdi # 0x676a0 leaq 0x809f(%rip), %rsi # 0x27790 callq 0x133d0 addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_server_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rdi, init_once lea rsi, mysql_once_init call _pthread_once add rsp, 20h pop rbp retn
long long mysql_server_init() { return pthread_once(&init_once, mysql_once_init); }
mysql_server_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RDI,[0x1676a0] LEA RSI,[0x127790] CALL 0x001133d0 ADD RSP,0x20 POP RBP RET
void mysql_server_init(void) { pthread_once(&init_once,mysql_once_init); return; }
37,198
my_strnxfrm_unicode_full_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (flags & MY_STRXFRM_PAD_WITH_SPACE) { for ( ; dst < de && nweights; nweights--) { *dst++= 0x00; if (dst < de) { *dst++= 0x00; if (dst < de) *dst++= 0x20; } } } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if (flags & MY_STRXFRM_PAD_TO_MAXLEN) { while (dst < de) { *dst++= 0x00; if (dst < de) { *dst++= 0x00; if (dst < de) *dst++= 0x20; } } } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r12 movq %rsi, %rbx movl 0x10(%rbp), %r15d leaq -0x24(%rbp), %rax movl %ecx, (%rax) leaq (%rsi,%rdx), %r14 addq %r8, %r9 movq %r14, %rdx movq %rax, %rcx callq 0x8fdab leaq (%rbx,%rax), %rcx testb $0x40, %r15b jne 0x8fef4 movq %rcx, %r12 movq %rbx, %rdi movq %r12, %rsi movl %r15d, %edx xorl %ecx, %ecx callq 0x7ad52 testb %r15b, %r15b setns %al cmpq %r14, %r12 setae %cl orb %al, %cl jne 0x8ff40 leaq 0x1(%r12), %rax movb $0x0, (%r12) cmpq %r14, %rax jae 0x8feea leaq 0x2(%r12), %rax movb $0x0, 0x1(%r12) cmpq %r14, %rax jae 0x8feea movb $0x20, 0x2(%r12) addq $0x3, %r12 movq %r12, %rax movq %rax, %r12 cmpq %r14, %rax jb 0x8febe jmp 0x8ff43 cmpq %r12, %rax jge 0x8fe97 cmpl $0x0, -0x24(%rbp) je 0x8fe97 leaq 0x1(%rcx), %r12 movb $0x0, (%rcx) cmpq %r14, %r12 jae 0x8ff23 leaq 0x2(%rcx), %r12 movb $0x0, 0x1(%rcx) cmpq %r14, %r12 jae 0x8ff23 movb $0x20, 0x2(%rcx) addq $0x3, %rcx movq %rcx, %r12 movl -0x24(%rbp), %eax decl %eax movl %eax, -0x24(%rbp) cmpq %r14, %r12 jae 0x8fe9a movq %r12, %rcx testl %eax, %eax jne 0x8feff jmp 0x8fe9a movq %r12, %rax subq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_bin: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r12, rdx mov rbx, rsi mov r15d, [rbp+arg_0] lea rax, [rbp+var_24] mov [rax], ecx lea r14, [rsi+rdx] add r9, r8 mov rdx, r14 mov rcx, rax call my_strnxfrm_unicode_full_bin_internal lea rcx, [rbx+rax] test r15b, 40h jnz short loc_8FEF4 loc_8FE97: mov r12, rcx loc_8FE9A: mov rdi, rbx mov rsi, r12 mov edx, r15d xor ecx, ecx call my_strxfrm_desc_and_reverse test r15b, r15b setns al cmp r12, r14 setnb cl or cl, al jnz loc_8FF40 loc_8FEBE: lea rax, [r12+1] mov byte ptr [r12], 0 cmp rax, r14 jnb short loc_8FEEA lea rax, [r12+2] mov byte ptr [r12+1], 0 cmp rax, r14 jnb short loc_8FEEA mov byte ptr [r12+2], 20h ; ' ' add r12, 3 mov rax, r12 loc_8FEEA: mov r12, rax cmp rax, r14 jb short loc_8FEBE jmp short loc_8FF43 loc_8FEF4: cmp rax, r12 jge short loc_8FE97 cmp [rbp+var_24], 0 jz short loc_8FE97 loc_8FEFF: lea r12, [rcx+1] mov byte ptr [rcx], 0 cmp r12, r14 jnb short loc_8FF23 lea r12, [rcx+2] mov byte ptr [rcx+1], 0 cmp r12, r14 jnb short loc_8FF23 mov byte ptr [rcx+2], 20h ; ' ' add rcx, 3 mov r12, rcx loc_8FF23: mov eax, [rbp+var_24] dec eax mov [rbp+var_24], eax cmp r12, r14 jnb loc_8FE9A mov rcx, r12 test eax, eax jnz short loc_8FEFF jmp loc_8FE9A loc_8FF40: mov rax, r12 loc_8FF43: sub rax, rbx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { unsigned long long v8; // r14 long long v9; // rax _BYTE *v10; // rcx _BYTE *v11; // r12 _BYTE *v12; // rax int v13; // eax int v15[9]; // [rsp+Ch] [rbp-24h] BYREF v15[0] = a4; v8 = (unsigned long long)&a2[a3]; v9 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v15, a5, a5 + a6); v10 = &a2[v9]; if ( (a7 & 0x40) != 0 && v9 < a3 && v15[0] ) { do { v11 = v10 + 1; *v10 = 0; if ( (unsigned long long)(v10 + 1) < v8 ) { v11 = v10 + 2; v10[1] = 0; if ( (unsigned long long)(v10 + 2) < v8 ) { v10[2] = 32; v11 = v10 + 3; } } v13 = --v15[0]; if ( (unsigned long long)v11 >= v8 ) break; v10 = v11; } while ( v13 ); } else { v11 = &a2[v9]; } my_strxfrm_desc_and_reverse(a2, v11, a7, 0); if ( (a7 & 0x80u) == 0 || (unsigned long long)v11 >= v8 ) { v12 = v11; } else { do { v12 = v11 + 1; *v11 = 0; if ( (unsigned long long)(v11 + 1) < v8 ) { v12 = v11 + 2; v11[1] = 0; if ( (unsigned long long)(v11 + 2) < v8 ) { v11[2] = 32; v12 = v11 + 3; } } v11 = v12; } while ( (unsigned long long)v12 < v8 ); } return v12 - a2; }
my_strnxfrm_unicode_full_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RDX MOV RBX,RSI MOV R15D,dword ptr [RBP + 0x10] LEA RAX,[RBP + -0x24] MOV dword ptr [RAX],ECX LEA R14,[RSI + RDX*0x1] ADD R9,R8 MOV RDX,R14 MOV RCX,RAX CALL 0x0018fdab LEA RCX,[RBX + RAX*0x1] TEST R15B,0x40 JNZ 0x0018fef4 LAB_0018fe97: MOV R12,RCX LAB_0018fe9a: MOV RDI,RBX MOV RSI,R12 MOV EDX,R15D XOR ECX,ECX CALL 0x0017ad52 TEST R15B,R15B SETNS AL CMP R12,R14 SETNC CL OR CL,AL JNZ 0x0018ff40 LAB_0018febe: LEA RAX,[R12 + 0x1] MOV byte ptr [R12],0x0 CMP RAX,R14 JNC 0x0018feea LEA RAX,[R12 + 0x2] MOV byte ptr [R12 + 0x1],0x0 CMP RAX,R14 JNC 0x0018feea MOV byte ptr [R12 + 0x2],0x20 ADD R12,0x3 MOV RAX,R12 LAB_0018feea: MOV R12,RAX CMP RAX,R14 JC 0x0018febe JMP 0x0018ff43 LAB_0018fef4: CMP RAX,R12 JGE 0x0018fe97 CMP dword ptr [RBP + -0x24],0x0 JZ 0x0018fe97 LAB_0018feff: LEA R12,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP R12,R14 JNC 0x0018ff23 LEA R12,[RCX + 0x2] MOV byte ptr [RCX + 0x1],0x0 CMP R12,R14 JNC 0x0018ff23 MOV byte ptr [RCX + 0x2],0x20 ADD RCX,0x3 MOV R12,RCX LAB_0018ff23: MOV EAX,dword ptr [RBP + -0x24] DEC EAX MOV dword ptr [RBP + -0x24],EAX CMP R12,R14 JNC 0x0018fe9a MOV RCX,R12 TEST EAX,EAX JNZ 0x0018feff JMP 0x0018fe9a LAB_0018ff40: MOV RAX,R12 LAB_0018ff43: SUB RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { int1 *puVar1; long lVar2; int1 *puVar3; int1 *puVar4; int local_2c; puVar1 = (int1 *)(param_2 + param_3); local_2c = param_4; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,puVar1,&local_2c,param_5,param_6 + param_5); puVar4 = (int1 *)(param_2 + lVar2); if (((param_7 & 0x40) != 0) && (lVar2 < param_3)) { do { if (local_2c == 0) break; puVar3 = puVar4 + 1; *puVar4 = 0; if (puVar3 < puVar1) { puVar3 = puVar4 + 2; puVar4[1] = 0; if (puVar3 < puVar1) { puVar4[2] = 0x20; puVar3 = puVar4 + 3; } } local_2c = local_2c + -1; puVar4 = puVar3; } while (puVar3 < puVar1); } my_strxfrm_desc_and_reverse(param_2,puVar4,param_7,0); puVar3 = puVar4; if (puVar4 < puVar1 && (char)param_7 < '\0') { do { puVar4 = puVar3 + 1; *puVar3 = 0; if (puVar4 < puVar1) { puVar4 = puVar3 + 2; puVar3[1] = 0; if (puVar4 < puVar1) { puVar3[2] = 0x20; puVar4 = puVar3 + 3; } } puVar3 = puVar4; } while (puVar4 < puVar1); } return (long)puVar4 - param_2; }
37,199
char* flux::common::Arena::allocArray<char>(unsigned long)
kvthweatt[P]FluxLang/src/common/arena.h
T* allocArray(size_t count) { static_assert(alignof(T) <= alignof(max_align_t), "Alignment too large"); void* memory = allocRaw(sizeof(T) * count); T* array = static_cast<T*>(memory); // Initialize elements with default constructor for (size_t i = 0; i < count; ++i) { new(array + i) T(); } return array; }
O0
c
char* flux::common::Arena::allocArray<char>(unsigned long): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi shlq $0x0, %rsi callq 0xec80 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x10e19 movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x10df5 movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN4flux6common5Arena10allocArrayIcEEPT_m: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8]; this mov rsi, [rbp+var_10] shl rsi, 0; unsigned __int64 call _ZN4flux6common5Arena8allocRawEm; flux::common::Arena::allocRaw(ulong) mov [rbp+var_18], rax mov rax, [rbp+var_18] mov [rbp+var_20], rax mov [rbp+var_28], 0 loc_10DF5: mov rax, [rbp+var_28] cmp rax, [rbp+var_10] jnb short loc_10E19 mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_10DF5 loc_10E19: mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
char * flux::common::Arena::allocArray<char>(flux::common::Arena *a1, unsigned long long a2) { unsigned long long i; // [rsp+8h] [rbp-28h] char *v4; // [rsp+10h] [rbp-20h] v4 = flux::common::Arena::allocRaw(a1, a2); for ( i = 0LL; i < a2; ++i ) v4[i] = 0; return v4; }
allocArray<char>: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] SHL RSI,0x0 CALL 0x0010ec80 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_00110df5: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00110e19 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00110df5 LAB_00110e19: MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
/* char* flux::common::Arena::allocArray<char>(unsigned long) */ char * __thiscall flux::common::Arena::allocArray<char>(Arena *this,ulong param_1) { char *pcVar1; ulong local_30; pcVar1 = (char *)allocRaw(this,param_1); for (local_30 = 0; local_30 < param_1; local_30 = local_30 + 1) { pcVar1[local_30] = '\0'; } return pcVar1; }