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
38,800
lunasvg::Canvas::fillText(std::basic_string_view<char32_t, std::char_traits<char32_t>> const&, lunasvg::Font const&, lunasvg::Point const&, lunasvg::Transform const&)
dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp
void Canvas::fillText(const std::u32string_view& text, const Font& font, const Point& origin, const Transform& transform) { plutovg_canvas_reset_matrix(m_canvas); plutovg_canvas_translate(m_canvas, -m_x, -m_y); plutovg_canvas_transform(m_canvas, &transform.matrix()); plutovg_canvas_set_fill_rule(m_canvas, PLUTOVG_FILL_RULE_NON_ZERO); plutovg_canvas_set_operator(m_canvas, PLUTOVG_OPERATOR_SRC_OVER); plutovg_canvas_set_font(m_canvas, font.face().get(), font.size()); plutovg_canvas_fill_text(m_canvas, text.data(), text.length(), PLUTOVG_TEXT_ENCODING_UTF32, origin.x, origin.y); }
O0
cpp
lunasvg::Canvas::fillText(std::basic_string_view<char32_t, std::char_traits<char32_t>> const&, lunasvg::Font const&, lunasvg::Point const&, lunasvg::Transform const&): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x8(%rax), %rdi callq 0x55600 movq -0x40(%rbp), %rcx movq 0x8(%rcx), %rdi xorl %eax, %eax subl 0x10(%rcx), %eax cvtsi2ss %eax, %xmm0 xorl %eax, %eax subl 0x14(%rcx), %eax cvtsi2ss %eax, %xmm1 callq 0x554d0 movq -0x40(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rdi callq 0xe6c0 movq -0x58(%rbp), %rdi movq %rax, %rsi callq 0x555c0 movq -0x40(%rbp), %rax movq 0x8(%rax), %rdi xorl %esi, %esi callq 0x550a0 movq -0x40(%rbp), %rax movq 0x8(%rax), %rdi movl $0x3, %esi callq 0x550e0 movq -0x40(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rdi callq 0x14e70 movq %rax, %rdi callq 0x146e0 movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rdi callq 0x14e80 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x54fa0 movq -0x40(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi callq 0x14bb0 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi callq 0x14bd0 movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movl %eax, %edx movq -0x20(%rbp), %rax movss (%rax), %xmm0 movq -0x20(%rbp), %rax movss 0x4(%rax), %xmm1 movl $0x3, %ecx callq 0x564c0 addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7lunasvg6Canvas8fillTextERKSt17basic_string_viewIDiSt11char_traitsIDiEERKNS_4FontERKNS_5PointERKNS_9TransformE: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov [rbp+var_40], rax mov rdi, [rax+8] call plutovg_canvas_reset_matrix mov rcx, [rbp+var_40] mov rdi, [rcx+8] xor eax, eax sub eax, [rcx+10h] cvtsi2ss xmm0, eax xor eax, eax sub eax, [rcx+14h] cvtsi2ss xmm1, eax call plutovg_canvas_translate mov rax, [rbp+var_40] mov rax, [rax+8] mov [rbp+var_58], rax mov rdi, [rbp+var_28]; this call _ZNK7lunasvg9Transform6matrixEv; lunasvg::Transform::matrix(void) mov rdi, [rbp+var_58] mov rsi, rax call plutovg_canvas_transform mov rax, [rbp+var_40] mov rdi, [rax+8] xor esi, esi call plutovg_canvas_set_fill_rule mov rax, [rbp+var_40] mov rdi, [rax+8] mov esi, 3 call plutovg_canvas_set_operator mov rax, [rbp+var_40] mov rax, [rax+8] mov [rbp+var_50], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg4Font4faceEv; lunasvg::Font::face(void) mov rdi, rax; this call _ZNK7lunasvg8FontFace3getEv; lunasvg::FontFace::get(void) mov [rbp+var_48], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg4Font4sizeEv; lunasvg::Font::size(void) mov rdi, [rbp+var_50] mov rsi, [rbp+var_48] call plutovg_canvas_set_font mov rax, [rbp+var_40] mov rax, [rax+8] mov [rbp+var_38], rax mov rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIDiSt11char_traitsIDiEE4dataEv; std::basic_string_view<char32_t>::data(void) mov [rbp+var_30], rax mov rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIDiSt11char_traitsIDiEE6lengthEv; std::basic_string_view<char32_t>::length(void) mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] mov edx, eax mov rax, [rbp+var_20] movss xmm0, dword ptr [rax] mov rax, [rbp+var_20] movss xmm1, dword ptr [rax+4] mov ecx, 3 call plutovg_canvas_fill_text add rsp, 60h pop rbp retn
long long lunasvg::Canvas::fillText( long long a1, long long a2, lunasvg::Font *a3, float *a4, lunasvg::Transform *a5) { lunasvg::Transform *v5; // rax lunasvg::FontFace *v6; // rax unsigned int v7; // eax long long v9; // [rsp+8h] [rbp-58h] long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+28h] [rbp-38h] long long v13; // [rsp+30h] [rbp-30h] plutovg_canvas_reset_matrix(*(_QWORD *)(a1 + 8)); plutovg_canvas_translate(*(_QWORD *)(a1 + 8), (float)-*(_DWORD *)(a1 + 16), (float)-*(_DWORD *)(a1 + 20)); v9 = *(_QWORD *)(a1 + 8); v5 = lunasvg::Transform::matrix(a5); plutovg_canvas_transform(v9, v5); plutovg_canvas_set_fill_rule(*(_QWORD *)(a1 + 8), 0LL); plutovg_canvas_set_operator(*(_QWORD *)(a1 + 8), 3LL); v10 = *(_QWORD *)(a1 + 8); v6 = (lunasvg::FontFace *)lunasvg::Font::face(a3); v11 = lunasvg::FontFace::get(v6); lunasvg::Font::size(a3); plutovg_canvas_set_font(v10, v11); v12 = *(_QWORD *)(a1 + 8); v13 = std::basic_string_view<char32_t>::data(a2); v7 = std::basic_string_view<char32_t>::length(a2); return plutovg_canvas_fill_text(v12, v13, v7, 3LL, *a4, a4[1]); }
fillText: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RAX + 0x8] CALL 0x00155600 MOV RCX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RCX + 0x8] XOR EAX,EAX SUB EAX,dword ptr [RCX + 0x10] CVTSI2SS XMM0,EAX XOR EAX,EAX SUB EAX,dword ptr [RCX + 0x14] CVTSI2SS XMM1,EAX CALL 0x001554d0 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x0010e6c0 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,RAX CALL 0x001555c0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x001550a0 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x8] MOV ESI,0x3 CALL 0x001550e0 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00114e70 MOV RDI,RAX CALL 0x001146e0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00114e80 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x48] CALL 0x00154fa0 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00114bb0 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00114bd0 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSS XMM0,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOVSS XMM1,dword ptr [RAX + 0x4] MOV ECX,0x3 CALL 0x001564c0 ADD RSP,0x60 POP RBP RET
/* lunasvg::Canvas::fillText(std::basic_string_view<char32_t, std::char_traits<char32_t> > const&, lunasvg::Font const&, lunasvg::Point const&, lunasvg::Transform const&) */ void __thiscall lunasvg::Canvas::fillText (Canvas *this,basic_string_view *param_1,Font *param_2,Point *param_3,Transform *param_4) { int8 uVar1; int4 uVar2; int8 uVar3; FontFace *this_00; plutovg_canvas_reset_matrix(*(int8 *)(this + 8)); plutovg_canvas_translate ((float)-*(int *)(this + 0x10),(float)-*(int *)(this + 0x14),*(int8 *)(this + 8)); uVar1 = *(int8 *)(this + 8); uVar3 = Transform::matrix(param_4); plutovg_canvas_transform(uVar1,uVar3); plutovg_canvas_set_fill_rule(*(int8 *)(this + 8),0); plutovg_canvas_set_operator(*(int8 *)(this + 8),3); uVar1 = *(int8 *)(this + 8); this_00 = (FontFace *)Font::face(param_2); uVar3 = FontFace::get(this_00); Font::size(param_2); plutovg_canvas_set_font(uVar1,uVar3); uVar1 = *(int8 *)(this + 8); uVar3 = std::basic_string_view<char32_t,std::char_traits<char32_t>>::data ((basic_string_view<char32_t,std::char_traits<char32_t>> *)param_1); uVar2 = std::basic_string_view<char32_t,std::char_traits<char32_t>>::length ((basic_string_view<char32_t,std::char_traits<char32_t>> *)param_1); plutovg_canvas_fill_text(*(int4 *)param_3,*(int4 *)(param_3 + 4),uVar1,uVar3,uVar2,3); return; }
38,801
minja::CommentTemplateToken::~CommentTemplateToken()
monkey531[P]llama/common/minja.hpp
CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {}
O1
cpp
minja::CommentTemplateToken::~CommentTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0xa7a2b(%rip), %rax # 0x1312a0 addq $0x10, %rax movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x89894 movq (%rax), %rsi incq %rsi callq 0x1b930 leaq 0xa7a4d(%rip), %rax # 0x1312e8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x898b1 popq %rbx jmp 0x26758 popq %rbx retq nop
_ZN5minja20CommentTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_89894 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89894: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_898B1 pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_898B1: pop rbx retn
void minja::CommentTemplateToken::~CommentTemplateToken(minja::CommentTemplateToken *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::CommentTemplateToken + 2; v2 = (char *)*((_QWORD *)this + 6); if ( v2 != (char *)this + 64 ) operator delete(v2, *((_QWORD *)this + 8) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~CommentTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x2312a0] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x00189894 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b930 LAB_00189894: LEA RAX,[0x2312e8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x001898b1 POP RBX JMP 0x00126758 LAB_001898b1: POP RBX RET
/* minja::CommentTemplateToken::~CommentTemplateToken() */ void __thiscall minja::CommentTemplateToken::~CommentTemplateToken(CommentTemplateToken *this) { *(int ***)this = &PTR__CommentTemplateToken_002312b0; if (*(CommentTemplateToken **)(this + 0x30) != this + 0x40) { operator_delete(*(CommentTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1); } *(int ***)this = &PTR__TemplateToken_002312f8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
38,802
minja::CommentTemplateToken::~CommentTemplateToken()
monkey531[P]llama/common/minja.hpp
CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {}
O3
cpp
minja::CommentTemplateToken::~CommentTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0xa5db3(%rip), %rax # 0x12f2a0 addq $0x10, %rax movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x8950c movq (%rax), %rsi incq %rsi callq 0x1b930 leaq 0xa5dd5(%rip), %rax # 0x12f2e8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x89529 popq %rbx jmp 0x267a6 popq %rbx retq nop
_ZN5minja20CommentTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_8950C mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8950C: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_89529 pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_89529: pop rbx retn
void minja::CommentTemplateToken::~CommentTemplateToken(minja::CommentTemplateToken *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::CommentTemplateToken + 2; v2 = (char *)*((_QWORD *)this + 6); if ( v2 != (char *)this + 64 ) operator delete(v2, *((_QWORD *)this + 8) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~CommentTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22f2a0] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x0018950c MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b930 LAB_0018950c: LEA RAX,[0x22f2e8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x00189529 POP RBX JMP 0x001267a6 LAB_00189529: POP RBX RET
/* minja::CommentTemplateToken::~CommentTemplateToken() */ void __thiscall minja::CommentTemplateToken::~CommentTemplateToken(CommentTemplateToken *this) { *(int ***)this = &PTR__CommentTemplateToken_0022f2b0; if (*(CommentTemplateToken **)(this + 0x30) != this + 0x40) { operator_delete(*(CommentTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1); } *(int ***)this = &PTR__TemplateToken_0022f2f8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
38,803
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
T& operator[](const key_type& key) { return emplace(key, T{}).first->second; }
O1
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %r15 movb $0x0, (%r15) movq $0x0, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x6adae movq %r15, %rdi movl $0x1, %esi callq 0x6adae movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x71b20 movq %rax, %rbx addq $0x20, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x6adae movq %r14, %rdi callq 0x70460 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x6adae movq %r14, %rdi callq 0x70460 movq %rbx, %rdi callq 0x1bff0 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_: push r15 push r14 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi mov r15, rsp mov byte ptr [r15], 0 mov qword ptr [r15+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rbx, rax add rbx, 20h ; ' ' mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( long long a1, long long a2) { long long v2; // rbx char v4[8]; // [rsp+0h] [rbp-28h] BYREF long long v5; // [rsp+8h] [rbp-20h] v4[0] = 0; v5 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v4); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v4); v2 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( a1, a2, v4) + 32; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(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>::data::~data(v4); return v2; }
operator[]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI MOV R15,RSP MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x0016adae MOV RDI,R15 MOV ESI,0x1 CALL 0x0016adae LAB_00171a8c: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x00171b20 LAB_00171a9a: MOV RBX,RAX ADD RBX,0x20 MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x0016adae MOV RDI,R14 CALL 0x00170460 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::operator[](std::__cxx11::string const&) */ long __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,string *param_1) { long lVar1; bool bVar2; basic_json local_28 [8]; int8 local_20; local_28[0] = (basic_json)0x0; local_20 = 0; bVar2 = SUB81(local_28,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar2); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar2); /* try { // try from 00171a8c to 00171a99 has its CatchHandler @ 00171ac3 */ lVar1 = emplace(this,param_1,local_28); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar2); 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_28); return lVar1 + 0x20; }
38,804
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
T& operator[](const key_type& key) { return emplace(key, T{}).first->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x6b800 movq %r14, %rdi movl $0x1, %esi callq 0x6b800 movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x94a1e movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x6b800 movq %r14, %rdi callq 0x70bac movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x949a5 callq 0x33c02 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x949b4 callq 0x33c02 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x949c3 callq 0x33c02 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x949f9 movq 0x9c5ac(%rip), %rax # 0x130f80 cmpb $0x0, (%rax) je 0x949e4 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x949ee movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x949f9 movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x8bd8e movq %rbx, %rdi callq 0x1bff0 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 mov byte ptr [r14], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(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&&) mov rbx, rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+68h+var_30] test rdi, rdi jz short loc_949A5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_949A5: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_949B4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_949B4: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_949C3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_949C3: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_949F9 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_949E4 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_949EE loc_949E4: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_949EE: cmp eax, 1 jnz short loc_949F9 mov rax, [rdi] call qword ptr [rax+18h] loc_949F9: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
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>>>::operator[]( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] __int128 v8; // [rsp+20h] [rbp-48h] __int128 v9; // [rsp+30h] [rbp-38h] char v10[8]; // [rsp+40h] [rbp-28h] BYREF long long v11; // [rsp+48h] [rbp-20h] v11 = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; v10[0] = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); v2 = 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>>>::emplace( a1, a2, &v6); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10); if ( *((_QWORD *)&v9 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1)); if ( *((_QWORD *)&v8 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1)); if ( *((_QWORD *)&v7 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1)); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
operator[]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0016b800 MOV RDI,R14 MOV ESI,0x1 CALL 0x0016b800 LAB_00194973: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x00194a1e LAB_00194981: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x0016b800 MOV RDI,R14 CALL 0x00170bac MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x001949a5 CALL 0x00133c02 LAB_001949a5: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x001949b4 CALL 0x00133c02 LAB_001949b4: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001949c3 CALL 0x00133c02 LAB_001949c3: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001949f9 MOV RAX,qword ptr [0x00230f80] CMP byte ptr [RAX],0x0 JZ 0x001949e4 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001949ee LAB_001949e4: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001949ee: CMP EAX,0x1 JNZ 0x001949f9 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001949f9: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::operator[](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&) */ long __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>>> ::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; int8 local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = 0; p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar4); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar4); /* try { // try from 00194973 to 00194980 has its CatchHandler @ 00194a0a */ lVar3 = emplace(this,param_1,(Value *)&local_68); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar4); 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_28); if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30); } if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50); } if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_00230f80 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
38,805
ggml_scale_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_scale_impl( struct ggml_context * ctx, struct ggml_tensor * a, float s, bool inplace) { GGML_ASSERT(ggml_is_padded_1d(a)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, &s, sizeof(s)); result->op = GGML_OP_SCALE; result->src[0] = a; return result; }
O0
c
ggml_scale_impl: subq $0x28, %rsp movb %dl, %al movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movss %xmm0, 0x14(%rsp) andb $0x1, %al movb %al, 0x13(%rsp) movq 0x18(%rsp), %rdi callq 0x5a380 testb $0x1, %al jne 0x4d2ab leaq 0x67326(%rip), %rdi # 0xb45b7 movl $0xb19, %esi # imm = 0xB19 leaq 0x67365(%rip), %rdx # 0xb4602 leaq 0x6960a(%rip), %rcx # 0xb68ae movb $0x0, %al callq 0x46780 testb $0x1, 0x13(%rsp) je 0x4d2c7 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x408f0 movq %rax, (%rsp) jmp 0x4d2da movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x43c20 movq %rax, (%rsp) movq (%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi leaq 0x14(%rsp), %rsi movl $0x4, %edx callq 0x4c4d0 movq 0x8(%rsp), %rax movl $0x1e, 0x50(%rax) movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x8(%rsp), %rax addq $0x28, %rsp retq nop
ggml_scale_impl: sub rsp, 28h mov al, dl mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi movss [rsp+28h+var_14], xmm0 and al, 1 mov [rsp+28h+var_15], al mov rdi, [rsp+28h+var_10] call ggml_is_padded_1d test al, 1 jnz short loc_4D2AB lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0B19h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsPadded1d; "ggml_is_padded_1d(a)" mov al, 0 call _ggml_abort loc_4D2AB: test [rsp+28h+var_15], 1 jz short loc_4D2C7 mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] call _ggml_view_tensor mov [rsp+28h+var_28], rax jmp short loc_4D2DA loc_4D2C7: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] call _ggml_dup_tensor mov [rsp+28h+var_28], rax loc_4D2DA: mov rax, [rsp+28h+var_28] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_20] lea rsi, [rsp+28h+var_14] mov edx, 4 call ggml_set_op_params mov rax, [rsp+28h+var_20] mov dword ptr [rax+50h], 1Eh mov rcx, [rsp+28h+var_10] mov rax, [rsp+28h+var_20] mov [rax+98h], rcx mov rax, [rsp+28h+var_20] add rsp, 28h retn
long long ggml_scale_impl( long long a1, unsigned int *a2, char a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { double v11; // xmm4_8 double v12; // xmm5_8 long long v14; // [rsp+0h] [rbp-28h] char v15; // [rsp+13h] [rbp-15h] __int32 v16; // [rsp+14h] [rbp-14h] BYREF unsigned int *v17; // [rsp+18h] [rbp-10h] long long v18; // [rsp+20h] [rbp-8h] v18 = a1; v17 = a2; v16 = a4.m128_i32[0]; v15 = a3 & 1; if ( (ggml_is_padded_1d(a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 2841, (long long)"GGML_ASSERT(%s) failed", "ggml_is_padded_1d(a)"); if ( (v15 & 1) != 0 ) v14 = (long long)ggml_view_tensor(v18, (long long)v17, a4, a5, a6, a7, v11, v12, a10, a11); else v14 = ggml_dup_tensor(v18, v17); ggml_set_op_params(v14, (long long)&v16, 4LL); *(_DWORD *)(v14 + 80) = 30; *(_QWORD *)(v14 + 152) = v17; return v14; }
ggml_scale_impl: SUB RSP,0x28 MOV AL,DL MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOVSS dword ptr [RSP + 0x14],XMM0 AND AL,0x1 MOV byte ptr [RSP + 0x13],AL MOV RDI,qword ptr [RSP + 0x18] CALL 0x0015a380 TEST AL,0x1 JNZ 0x0014d2ab LEA RDI,[0x1b45b7] MOV ESI,0xb19 LEA RDX,[0x1b4602] LEA RCX,[0x1b68ae] MOV AL,0x0 CALL 0x00146780 LAB_0014d2ab: TEST byte ptr [RSP + 0x13],0x1 JZ 0x0014d2c7 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001408f0 MOV qword ptr [RSP],RAX JMP 0x0014d2da LAB_0014d2c7: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00143c20 MOV qword ptr [RSP],RAX LAB_0014d2da: MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x14] MOV EDX,0x4 CALL 0x0014c4d0 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x50],0x1e MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 RET
long ggml_scale_impl(int4 param_1,int8 param_2,int8 param_3,byte param_4) { ulong uVar1; long local_28; int4 local_14; int8 local_10; int8 local_8; local_14 = param_1; local_10 = param_3; local_8 = param_2; uVar1 = ggml_is_padded_1d(param_3); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xb19, "GGML_ASSERT(%s) failed","ggml_is_padded_1d(a)"); } if ((param_4 & 1) == 0) { local_28 = ggml_dup_tensor(local_8,local_10); } else { local_28 = ggml_view_tensor(local_8,local_10); } ggml_set_op_params(local_28,&local_14,4); *(int4 *)(local_28 + 0x50) = 0x1e; *(int8 *)(local_28 + 0x98) = local_10; return local_28; }
38,806
ggml_scale_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_scale_impl( struct ggml_context * ctx, struct ggml_tensor * a, float s, bool inplace) { GGML_ASSERT(ggml_is_padded_1d(a)); struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, &s, sizeof(s)); result->op = GGML_OP_SCALE; result->src[0] = a; return result; }
O1
c
ggml_scale_impl: pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq 0x30(%rsi), %rax movl (%rsi), %esi imulq $0x38, %rsi, %rcx leaq 0x4d770(%rip), %r8 # 0x68dc0 cmpq 0x18(%rcx,%r8), %rax jne 0x1b6c0 movq 0x18(%rbx), %rcx movq 0x40(%rbx), %rax imulq 0x38(%rbx), %rcx cmpq %rcx, %rax jne 0x1b6c0 imulq 0x20(%rbx), %rax cmpq %rax, 0x48(%rbx) jne 0x1b6c0 movss %xmm0, 0xc(%rsp) testb %dl, %dl je 0x1b688 movq %rbx, %rsi callq 0x16260 jmp 0x1b69c leaq 0x10(%rbx), %rcx movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19cd9 testq %rax, %rax movss 0xc(%rsp), %xmm0 je 0x1b6dc movss %xmm0, 0x54(%rax) movl $0x1e, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x10, %rsp popq %rbx retq leaq 0x2ef48(%rip), %rdi # 0x4a60f leaq 0x2ef8c(%rip), %rdx # 0x4a65a leaq 0x310ae(%rip), %rcx # 0x4c783 movl $0xb19, %esi # imm = 0xB19 jmp 0x1b6f6 leaq 0x310f5(%rip), %rdi # 0x4c7d8 leaq 0x2ef70(%rip), %rdx # 0x4a65a leaq 0x31137(%rip), %rcx # 0x4c828 movl $0x70, %esi xorl %eax, %eax callq 0x17c70
ggml_scale_impl: push rbx sub rsp, 10h mov rbx, rsi mov rax, [rsi+30h] mov esi, [rsi] imul rcx, rsi, 38h ; '8' lea r8, type_traits cmp rax, [rcx+r8+18h] jnz short loc_1B6C0 mov rcx, [rbx+18h] mov rax, [rbx+40h] imul rcx, [rbx+38h] cmp rax, rcx jnz short loc_1B6C0 imul rax, [rbx+20h] cmp [rbx+48h], rax jnz short loc_1B6C0 movss [rsp+18h+var_C], xmm0 test dl, dl jz short loc_1B688 mov rsi, rbx call _ggml_view_tensor jmp short loc_1B69C loc_1B688: lea rcx, [rbx+10h] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1B69C: test rax, rax movss xmm0, [rsp+18h+var_C] jz short loc_1B6DC movss dword ptr [rax+54h], xmm0 mov dword ptr [rax+50h], 1Eh mov [rax+98h], rbx add rsp, 10h pop rbx retn loc_1B6C0: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsPadded1d; "ggml_is_padded_1d(a)" mov esi, 0B19h jmp short loc_1B6F6 loc_1B6DC: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1B6F6: xor eax, eax call _ggml_abort
long long ggml_scale_impl(long long a1, _QWORD *a2, char a3, float a4, long long a5, long long a6, int a7) { char *v8; // rax long long v9; // rsi char **v10; // r8 long long v11; // rax long long result; // rax const char *v13; // rdi const char *v14; // rcx int v15; // esi v8 = (char *)a2[6]; v9 = *(unsigned int *)a2; v10 = &type_traits; if ( v8 != (&type_traits)[7 * v9 + 3] || (v11 = a2[8], v11 != a2[7] * a2[3]) || a2[9] != a2[4] * v11 ) { v13 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c"; v14 = "ggml_is_padded_1d(a)"; v15 = 2841; goto LABEL_11; } if ( a3 ) result = ggml_view_tensor(a1, (long long)a2); else result = ggml_new_tensor_impl(a1, v9, 4, a2 + 2, 0LL, 0LL); if ( !result ) { v13 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-impl.h"; v14 = "tensor != NULL"; v15 = 112; LABEL_11: ggml_abort((_DWORD)v13, v15, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v14, (_DWORD)v10, a7); } *(float *)(result + 84) = a4; *(_DWORD *)(result + 80) = 30; *(_QWORD *)(result + 152) = a2; return result; }
ggml_scale_impl: PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV RAX,qword ptr [RSI + 0x30] MOV ESI,dword ptr [RSI] IMUL RCX,RSI,0x38 LEA R8,[0x168dc0] CMP RAX,qword ptr [RCX + R8*0x1 + 0x18] JNZ 0x0011b6c0 MOV RCX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RBX + 0x40] IMUL RCX,qword ptr [RBX + 0x38] CMP RAX,RCX JNZ 0x0011b6c0 IMUL RAX,qword ptr [RBX + 0x20] CMP qword ptr [RBX + 0x48],RAX JNZ 0x0011b6c0 MOVSS dword ptr [RSP + 0xc],XMM0 TEST DL,DL JZ 0x0011b688 MOV RSI,RBX CALL 0x00116260 JMP 0x0011b69c LAB_0011b688: LEA RCX,[RBX + 0x10] MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119cd9 LAB_0011b69c: TEST RAX,RAX MOVSS XMM0,dword ptr [RSP + 0xc] JZ 0x0011b6dc MOVSS dword ptr [RAX + 0x54],XMM0 MOV dword ptr [RAX + 0x50],0x1e MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x10 POP RBX RET LAB_0011b6c0: LEA RDI,[0x14a60f] LEA RDX,[0x14a65a] LEA RCX,[0x14c783] MOV ESI,0xb19 JMP 0x0011b6f6 LAB_0011b6dc: LEA RDI,[0x14c7d8] LEA RDX,[0x14a65a] LEA RCX,[0x14c828] MOV ESI,0x70 LAB_0011b6f6: XOR EAX,EAX CALL 0x00117c70
void ggml_scale_impl(int4 param_1,int8 param_2,uint *param_3,char param_4) { long lVar1; char *pcVar2; int8 uVar3; char *pcVar4; if (*(long *)(param_3 + 0xc) == *(long *)(type_traits + (ulong)*param_3 * 0x38 + 0x18)) { if ((*(long *)(param_3 + 0x10) == *(long *)(param_3 + 6) * *(long *)(param_3 + 0xe)) && (*(long *)(param_3 + 0x12) == *(long *)(param_3 + 0x10) * *(long *)(param_3 + 8))) { if (param_4 == '\0') { lVar1 = ggml_new_tensor_impl(param_2,(ulong)*param_3,4,param_3 + 4,0,0); } else { lVar1 = ggml_view_tensor(param_2,param_3); } if (lVar1 != 0) { *(int4 *)(lVar1 + 0x54) = param_1; *(int4 *)(lVar1 + 0x50) = 0x1e; *(uint **)(lVar1 + 0x98) = param_3; return; } pcVar4 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-impl.h"; pcVar2 = "tensor != NULL"; uVar3 = 0x70; goto LAB_0011b6f6; } } pcVar4 = "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c"; pcVar2 = "ggml_is_padded_1d(a)"; uVar3 = 0xb19; LAB_0011b6f6: /* WARNING: Subroutine does not return */ ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
38,807
my_charpos_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_charpos_utf16(CHARSET_INFO *cs, const char *b, const char *e, size_t pos) { const char *b0= b; uint charlen; for ( ; pos; b+= charlen, pos--) { if (!(charlen= my_ismbchar(cs, b, e))) return (e + 2 - b0); /* Error, return pos outside the string */ } return (size_t) (pos ? (e + 2 - b0) : (b - b0)); }
O0
c
my_charpos_utf16: 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 -0x18(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x28(%rbp) je 0xee585 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xf1c20 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jne 0xee565 movq -0x20(%rbp), %rax addq $0x2, %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xee5b8 jmp 0xee567 movl -0x34(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rax addq $-0x1, %rax movq %rax, -0x28(%rbp) jmp 0xee530 cmpq $0x0, -0x28(%rbp) je 0xee5a1 movq -0x20(%rbp), %rax addq $0x2, %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x40(%rbp) jmp 0xee5b0 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_charpos_utf16: 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_18] mov [rbp+var_30], rax loc_EE530: cmp [rbp+var_28], 0 jz short loc_EE585 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_ismbchar_1 mov [rbp+var_34], eax cmp eax, 0 jnz short loc_EE565 mov rax, [rbp+var_20] add rax, 2 mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_EE5B8 loc_EE565: jmp short $+2 loc_EE567: mov ecx, [rbp+var_34] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_28] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rax jmp short loc_EE530 loc_EE585: cmp [rbp+var_28], 0 jz short loc_EE5A1 mov rax, [rbp+var_20] add rax, 2 mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_40], rax jmp short loc_EE5B0 loc_EE5A1: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_40], rax loc_EE5B0: mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_EE5B8: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4) { unsigned int v5; // [rsp+Ch] [rbp-34h] long long v8; // [rsp+28h] [rbp-18h] v8 = a2; while ( a4 ) { v5 = my_ismbchar_1(a1, v8, a3); if ( !v5 ) return a3 + 2 - a2; v8 += v5; --a4; } return v8 - a2; }
my_charpos_utf16: 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 + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_001ee530: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001ee585 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001f1c20 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JNZ 0x001ee565 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001ee5b8 LAB_001ee565: JMP 0x001ee567 LAB_001ee567: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,-0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001ee530 LAB_001ee585: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001ee5a1 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX JMP 0x001ee5b0 LAB_001ee5a1: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001ee5b0: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_001ee5b8: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001ee58c) */ long my_charpos_utf16(int8 param_1,long param_2,long param_3,long param_4) { uint uVar1; long local_30; long local_20; local_30 = param_4; local_20 = param_2; while( true ) { if (local_30 == 0) { return local_20 - param_2; } uVar1 = my_ismbchar(param_1,local_20,param_3); if (uVar1 == 0) break; local_20 = local_20 + (ulong)uVar1; local_30 = local_30 + -1; } return (param_3 + 2) - param_2; }
38,808
minja::Parser::parseConstant()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Value> parseConstant() { auto start = it; consumeSpaces(); if (it == end) return nullptr; if (*it == '"' || *it == '\'') { auto str = parseString(); if (str) return std::make_shared<Value>(*str); } static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)"); auto token = consumeToken(prim_tok); if (!token.empty()) { if (token == "true" || token == "True") return std::make_shared<Value>(true); if (token == "false" || token == "False") return std::make_shared<Value>(false); if (token == "None") return std::make_shared<Value>(nullptr); throw std::runtime_error("Unknown constant token: " + token); } auto number = parseNumber(it, end); if (!number.is_null()) return std::make_shared<Value>(number); it = start; return nullptr; }
O2
cpp
minja::Parser::parseConstant(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 pushq $0x1 popq %rsi movq %r14, %rdi callq 0x66180 movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x6aab9 movzbl (%rax), %eax cmpl $0x27, %eax je 0x6aa8e cmpl $0x22, %eax jne 0x6aacc movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x6b7a6 movq (%r15), %rsi testq %rsi, %rsi je 0x6aac4 movq %rbx, %rdi callq 0x6b7fc movq %rsp, %rdi callq 0x6b81a jmp 0x6abb5 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) jmp 0x6abb5 movq %rsp, %rdi callq 0x6b81a leaq 0x9a785(%rip), %rax # 0x105258 movb (%rax), %al testb %al, %al je 0x6abeb leaq 0x9a754(%rip), %rdx # 0x105238 movq %rsp, %r15 pushq $0x1 popq %rcx movq %r15, %rdi movq %r14, %rsi callq 0x65288 cmpq $0x0, 0x8(%r15) je 0x6ab34 leaq 0x4600f(%rip), %rsi # 0xb0b12 movq %rsp, %rdi callq 0x2cbe9 testb %al, %al jne 0x6ab22 leaq 0x4e2de(%rip), %rsi # 0xb8df4 movq %rsp, %rdi callq 0x2cbe9 testb %al, %al je 0x6ab62 leaq 0x20(%rsp), %rsi movb $0x1, (%rsi) movq %rbx, %rdi callq 0x6b834 jmp 0x6abad leaq 0x20(%r14), %r15 leaq 0x18(%r14), %rcx leaq 0x20(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx callq 0x6b870 cmpb $0x0, 0x20(%rsp) je 0x6ab9a leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x6bb39 jmp 0x6aba3 leaq 0x48c92(%rip), %rsi # 0xb37fb movq %rsp, %rdi callq 0x2cbe9 testb %al, %al jne 0x6ab88 leaq 0x4e27d(%rip), %rsi # 0xb8df9 movq %rsp, %rdi callq 0x2cbe9 testb %al, %al je 0x6abc5 leaq 0x20(%rsp), %rsi movb $0x0, (%rsi) movq %rbx, %rdi callq 0x6b834 jmp 0x6abad movq %r12, (%r15) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x20(%rsp), %rdi callq 0x4d9cc movq %rsp, %rdi callq 0x25258 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x4e648(%rip), %rsi # 0xb9214 movq %rsp, %rdi callq 0x2cbe9 testb %al, %al je 0x6ac40 leaq 0x20(%rsp), %rsi andq $0x0, (%rsi) movq %rbx, %rdi callq 0x6b852 jmp 0x6abad leaq 0x9a666(%rip), %rdi # 0x105258 callq 0x25060 testl %eax, %eax je 0x6aadd leaq 0x9a632(%rip), %rdi # 0x105238 leaq 0x4e5e2(%rip), %rsi # 0xb91ef pushq $0x10 popq %rdx callq 0x2b33e leaq -0x3f828(%rip), %rdi # 0x2b3f4 leaq 0x9a615(%rip), %rsi # 0x105238 leaq 0x99d0e(%rip), %rdx # 0x104938 callq 0x24800 leaq 0x9a622(%rip), %rdi # 0x105258 callq 0x245f0 jmp 0x6aadd pushq $0x10 popq %rdi callq 0x24470 movq %rax, %r14 leaq 0x4e5c7(%rip), %rsi # 0xb9219 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x2da83 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x24e80 xorl %ebp, %ebp movq 0x99378(%rip), %rsi # 0x103ff0 movq 0x992d9(%rip), %rdx # 0x103f58 movq %r14, %rdi callq 0x24f50 movq %rax, %rbx leaq 0x9a5c7(%rip), %rdi # 0x105258 callq 0x245e0 jmp 0x6ace6 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x25258 testb %bpl, %bpl jne 0x6acaf jmp 0x6acd1 movq %rax, %rbx movq %r14, %rdi callq 0x246b0 jmp 0x6acd1 jmp 0x6acce jmp 0x6acce movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x4d9cc jmp 0x6acd1 jmp 0x6acce movq %rax, %rbx movq %rsp, %rdi callq 0x25258 jmp 0x6ace6 movq %rax, %rbx movq %rsp, %rdi callq 0x6b81a movq %rbx, %rdi callq 0x24fe0
_ZN5minja6Parser13parseConstantEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] push 1 pop rsi mov rdi, r14 call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) mov rax, [r14+20h] cmp rax, [r14+18h] jz short loc_6AAB9 movzx eax, byte ptr [rax] cmp eax, 27h ; ''' jz short loc_6AA8E cmp eax, 22h ; '"' jnz short loc_6AACC loc_6AA8E: mov r15, rsp mov rdi, r15 mov rsi, r14 call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void) mov rsi, [r15] test rsi, rsi jz short loc_6AAC4 mov rdi, rbx call _ZSt11make_sharedIN5minja5ValueEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,std::string &>(std::string &) mov rdi, rsp call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr() jmp loc_6ABB5 loc_6AAB9: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 jmp loc_6ABB5 loc_6AAC4: mov rdi, rsp call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr() loc_6AACC: lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok mov al, [rax] test al, al jz loc_6ABEB loc_6AADD: lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok mov r15, rsp push 1 pop rcx mov rdi, r15 mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) cmp qword ptr [r15+8], 0 jz short loc_6AB34 lea rsi, aTrue; "true" mov rdi, rsp call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_6AB22 lea rsi, aTrue_0; "True" mov rdi, rsp call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_6AB62 loc_6AB22: lea rsi, [rsp+68h+var_48] mov byte ptr [rsi], 1 mov rdi, rbx call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&) jmp short loc_6ABAD loc_6AB34: lea r15, [r14+20h] lea rcx, [r14+18h] lea rdi, [rsp+68h+var_48] mov rsi, r14 mov rdx, r15 call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&) cmp [rsp+68h+var_48], 0 jz short loc_6AB9A lea rsi, [rsp+68h+var_48] mov rdi, rbx call _ZSt11make_sharedIN5minja5ValueEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) jmp short loc_6ABA3 loc_6AB62: lea rsi, aAdvancedOption+0ABh; "false" mov rdi, rsp call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_6AB88 lea rsi, aFalse; "False" mov rdi, rsp call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_6ABC5 loc_6AB88: lea rsi, [rsp+68h+var_48] mov byte ptr [rsi], 0 mov rdi, rbx call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&) jmp short loc_6ABAD loc_6AB9A: mov [r15], r12 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_6ABA3: lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_6ABAD: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6ABB5: mov rax, rbx add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_6ABC5: lea rsi, aNone_0; "None" mov rdi, rsp call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_6AC40 lea rsi, [rsp+68h+var_48] and qword ptr [rsi], 0 mov rdi, rbx call _ZSt11make_sharedIN5minja5ValueEJDnEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,decltype(nullptr)>(decltype(nullptr) &&) jmp short loc_6ABAD loc_6ABEB: lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_6AADD lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"... push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_6AADD loc_6AC40: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnknownConstan; "Unknown constant token: " lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+68h+var_48] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_6ACE6 mov rbx, rax lea rdi, [rsp+68h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6ACAF jmp short loc_6ACD1 mov rbx, rax loc_6ACAF: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_6ACD1 jmp short loc_6ACCE jmp short loc_6ACCE mov rbx, rax lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_6ACD1 jmp short $+2 loc_6ACCE: mov rbx, rax loc_6ACD1: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6ACE6 mov rbx, rax mov rdi, rsp call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr() loc_6ACE6: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseConstant(minja::Parser *this, long long a2) { long long v2; // r12 unsigned __int8 *v3; // rax int v4; // eax void *exception; // r14 _QWORD v7[4]; // [rsp+0h] [rbp-68h] BYREF _QWORD v8[9]; // [rsp+20h] [rbp-48h] BYREF v2 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, 1); v3 = *(unsigned __int8 **)(a2 + 32); if ( v3 == *(unsigned __int8 **)(a2 + 24) ) { *(_OWORD *)this = 0LL; return this; } v4 = *v3; if ( v4 == 39 || v4 == 34 ) { minja::Parser::parseString[abi:cxx11](v7, a2); if ( v7[0] ) { std::make_shared<minja::Value,std::string &>(this); std::unique_ptr<std::string>::~unique_ptr(v7); return this; } std::unique_ptr<std::string>::~unique_ptr(v7); } if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], (long long)"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]); } minja::Parser::consumeToken(v7, a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u); if ( v7[1] ) { if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) ) { LOBYTE(v8[0]) = 1; std::make_shared<minja::Value,bool>(this, v8); } else if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) ) { LOBYTE(v8[0]) = 0; std::make_shared<minja::Value,bool>(this, v8); } else { if ( !std::operator==<char>((long long)v7) ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v8, (long long)"Unknown constant token: ", (long long)v7); std::runtime_error::runtime_error(exception, v8); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v8[0] = 0LL; std::make_shared<minja::Value,decltype(nullptr)>(this, v8); } } else { minja::Parser::parseNumber(v8, a2, a2 + 32, a2 + 24); if ( LOBYTE(v8[0]) ) { std::make_shared<minja::Value,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> &>( this, v8); } else { *(_QWORD *)(a2 + 32) = v2; *(_OWORD *)this = 0LL; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v8); } std::string::~string(v7); return this; }
parseConstant: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x00166180 MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x0016aab9 MOVZX EAX,byte ptr [RAX] CMP EAX,0x27 JZ 0x0016aa8e CMP EAX,0x22 JNZ 0x0016aacc LAB_0016aa8e: MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL 0x0016b7a6 MOV RSI,qword ptr [R15] TEST RSI,RSI JZ 0x0016aac4 LAB_0016aaa4: MOV RDI,RBX CALL 0x0016b7fc LAB_0016aaac: MOV RDI,RSP CALL 0x0016b81a JMP 0x0016abb5 LAB_0016aab9: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x0016abb5 LAB_0016aac4: MOV RDI,RSP CALL 0x0016b81a LAB_0016aacc: LEA RAX,[0x205258] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0016abeb LAB_0016aadd: LEA RDX,[0x205238] MOV R15,RSP PUSH 0x1 POP RCX MOV RDI,R15 MOV RSI,R14 CALL 0x00165288 CMP qword ptr [R15 + 0x8],0x0 JZ 0x0016ab34 LEA RSI,[0x1b0b12] MOV RDI,RSP CALL 0x0012cbe9 TEST AL,AL JNZ 0x0016ab22 LEA RSI,[0x1b8df4] MOV RDI,RSP CALL 0x0012cbe9 TEST AL,AL JZ 0x0016ab62 LAB_0016ab22: LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],0x1 LAB_0016ab2a: MOV RDI,RBX CALL 0x0016b834 JMP 0x0016abad LAB_0016ab34: LEA R15,[R14 + 0x20] LEA RCX,[R14 + 0x18] LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV RDX,R15 CALL 0x0016b870 CMP byte ptr [RSP + 0x20],0x0 JZ 0x0016ab9a LAB_0016ab53: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0016bb39 JMP 0x0016aba3 LAB_0016ab62: LEA RSI,[0x1b37fb] MOV RDI,RSP CALL 0x0012cbe9 TEST AL,AL JNZ 0x0016ab88 LEA RSI,[0x1b8df9] MOV RDI,RSP CALL 0x0012cbe9 TEST AL,AL JZ 0x0016abc5 LAB_0016ab88: LEA RSI,[RSP + 0x20] MOV byte ptr [RSI],0x0 LAB_0016ab90: MOV RDI,RBX CALL 0x0016b834 JMP 0x0016abad LAB_0016ab9a: MOV qword ptr [R15],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_0016aba3: LEA RDI,[RSP + 0x20] CALL 0x0014d9cc LAB_0016abad: MOV RDI,RSP CALL 0x00125258 LAB_0016abb5: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0016abc5: LEA RSI,[0x1b9214] MOV RDI,RSP CALL 0x0012cbe9 TEST AL,AL JZ 0x0016ac40 LEA RSI,[RSP + 0x20] AND qword ptr [RSI],0x0 LAB_0016abe1: MOV RDI,RBX CALL 0x0016b852 JMP 0x0016abad LAB_0016abeb: LEA RDI,[0x205258] CALL 0x00125060 TEST EAX,EAX JZ 0x0016aadd LAB_0016abff: LEA RDI,[0x205238] LEA RSI,[0x1b91ef] PUSH 0x10 POP RDX CALL 0x0012b33e LAB_0016ac15: LEA RDI,[0x12b3f4] LEA RSI,[0x205238] LEA RDX,[0x204938] CALL 0x00124800 LEA RDI,[0x205258] CALL 0x001245f0 JMP 0x0016aadd LAB_0016ac40: PUSH 0x10 POP RDI CALL 0x00124470 MOV R14,RAX LAB_0016ac4b: LEA RSI,[0x1b9219] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0012da83 MOV BPL,0x1 LAB_0016ac62: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00124e80 XOR EBP,EBP MOV RSI,qword ptr [0x00203ff0] MOV RDX,qword ptr [0x00203f58] MOV RDI,R14 CALL 0x00124f50
/* minja::Parser::parseConstant() */ void minja::Parser::parseConstant(void) { char cVar1; int8 uVar2; bool bVar3; int iVar4; runtime_error *this; __normal_iterator *in_RSI; string *in_RDI; long local_68; long local_60; ulong local_48 [4]; uVar2 = *(int8 *)(in_RSI + 0x20); consumeSpaces(); if (*(char **)(in_RSI + 0x20) == *(char **)(in_RSI + 0x18)) { *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; return; } cVar1 = **(char **)(in_RSI + 0x20); if ((cVar1 == '\'') || (cVar1 == '\"')) { parseString_abi_cxx11_(); if (local_68 != 0) { /* try { // try from 0016aaa4 to 0016aaab has its CatchHandler @ 0016acdb */ std::make_shared<minja::Value,std::__cxx11::string&>(in_RDI); std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr ((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *) &local_68); return; } std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr ((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *) &local_68); } if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') && (iVar4 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar4 != 0)) { /* try { // try from 0016abff to 0016ac14 has its CatchHandler @ 0016ac87 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b",0x10 ); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseConstant()::prim_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_); } consumeToken(&local_68); if (local_60 == 0) { /* try { // try from 0016ab34 to 0016ab4b has its CatchHandler @ 0016accc */ parseNumber((__normal_iterator *)local_48,in_RSI); if (local_48[0]._0_1_ == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *(int8 *)(in_RSI + 0x20) = uVar2; *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; } else { /* try { // try from 0016ab53 to 0016ab5f has its CatchHandler @ 0016acbd */ std:: make_shared<minja::Value,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>&> (in_RDI); } 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_48); } else { bVar3 = std::operator==((string *)&local_68,"true"); if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"True"), bVar3)) { local_48[0] = CONCAT71(local_48[0]._1_7_,1); /* try { // try from 0016ab2a to 0016ab31 has its CatchHandler @ 0016acce */ std::make_shared<minja::Value,bool>((bool *)in_RDI); } else { bVar3 = std::operator==((string *)&local_68,"false"); if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"False"), bVar3)) { local_48[0] = local_48[0] & 0xffffffffffffff00; /* try { // try from 0016ab90 to 0016ab97 has its CatchHandler @ 0016acbb */ std::make_shared<minja::Value,bool>((bool *)in_RDI); } else { bVar3 = std::operator==((string *)&local_68,"None"); if (!bVar3) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016ac4b to 0016ac5e has its CatchHandler @ 0016acac */ std::operator+((char *)local_48,(string *)"Unknown constant token: "); /* try { // try from 0016ac62 to 0016ac86 has its CatchHandler @ 0016ac98 */ std::runtime_error::runtime_error(this,(string *)local_48); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58); } local_48[0] = 0; /* try { // try from 0016abe1 to 0016abe8 has its CatchHandler @ 0016acb9 */ std::make_shared<minja::Value,decltype(nullptr)>((_func_decltype_nullptr **)in_RDI); } } } std::__cxx11::string::~string((string *)&local_68); return; }
38,809
minja::Parser::parseConstant()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Value> parseConstant() { auto start = it; consumeSpaces(); if (it == end) return nullptr; if (*it == '"' || *it == '\'') { auto str = parseString(); if (str) return std::make_shared<Value>(*str); } static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)"); auto token = consumeToken(prim_tok); if (!token.empty()) { if (token == "true" || token == "True") return std::make_shared<Value>(true); if (token == "false" || token == "False") return std::make_shared<Value>(false); if (token == "None") return std::make_shared<Value>(nullptr); throw std::runtime_error("Unknown constant token: " + token); } auto number = parseNumber(it, end); if (!number.is_null()) return std::make_shared<Value>(number); it = start; return nullptr; }
O3
cpp
minja::Parser::parseConstant(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x20(%rsi), %r14 movq 0x18(%rsi), %r12 movq 0x20(%rsi), %r13 movq %r13, %rbp cmpq %r12, %r13 je 0x8fe83 movq %r13, %rbp movsbl (%rbp), %edi callq 0x1b0c0 testl %eax, %eax je 0x8fe83 incq %rbp movq %rbp, (%r14) cmpq %r12, %rbp jne 0x8fe6b cmpq %r12, %rbp je 0x8fed9 movzbl (%rbp), %eax cmpl $0x27, %eax je 0x8fe96 cmpl $0x22, %eax jne 0x8fee4 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x91228 movq (%r12), %rdx testq %rdx, %rdx je 0x8fee4 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x9187c movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0x90041 leaq 0x8(%rsp), %rdi callq 0x91a9c jmp 0x90041 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) jmp 0x90041 leaq 0xa234d(%rip), %rax # 0x132238 movb (%rax), %al testb %al, %al je 0x90053 leaq 0xa231c(%rip), %rdx # 0x132218 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movl $0x1, %ecx callq 0x8954e cmpq $0x0, 0x8(%r12) je 0x8ffc0 leaq 0x5cbee(%rip), %rsi # 0xecb12 leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8ffa9 leaq 0x64eab(%rip), %rsi # 0xf4de4 leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8ffa9 leaq 0x5f8ad(%rip), %rsi # 0xef7fb leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8ffef leaq 0x64e82(%rip), %rsi # 0xf4de9 leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8ffef leaq 0x65288(%rip), %rsi # 0xf5204 leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax jne 0x900aa leaq 0x28(%rsp), %rdx movq $0x0, (%rdx) leaq 0x7(%rsp), %rsi movq %rbx, %rdi callq 0x91bbc jmp 0x90026 leaq 0x7(%rsp), %rdx movb $0x1, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x91aca jmp 0x90026 leaq 0x18(%r15), %rcx leaq 0x28(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x912a8 cmpb $0x0, 0x28(%rsp) je 0x90006 leaq 0x7(%rsp), %rsi leaq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x91dd0 jmp 0x9000f leaq 0x7(%rsp), %rdx movb $0x0, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x91aca jmp 0x90026 movq %r13, (%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x6b800 movq %r14, %rdi callq 0x70bac leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x90041 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b910 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa21de(%rip), %rdi # 0x132238 callq 0x1c060 testl %eax, %eax je 0x8fef5 leaq 0xa21aa(%rip), %rdi # 0x132218 leaq 0x6516a(%rip), %rsi # 0xf51df movl $0x10, %edx callq 0x26358 leaq -0x69cc6(%rip), %rdi # 0x263c0 leaq 0xa218b(%rip), %rsi # 0x132218 leaq 0xa1884(%rip), %rdx # 0x131918 callq 0x1b7f0 leaq 0xa2198(%rip), %rdi # 0x132238 callq 0x1b5c0 jmp 0x8fef5 movl $0x10, %edi callq 0x1b450 movq %rax, %r14 leaq 0x6514b(%rip), %rsi # 0xf5209 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x288ef movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x1be70 xorl %ebp, %ebp movq 0xa0f02(%rip), %rsi # 0x130fe8 movq 0xa0e6b(%rip), %rdx # 0x130f58 movq %r14, %rdi callq 0x1bf60 movq %rax, %rbx leaq 0xa2139(%rip), %rdi # 0x132238 callq 0x1b5b0 jmp 0x90194 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x90127 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b910 testb %bpl, %bpl jne 0x90131 jmp 0x90160 movq %rax, %rbx movq %r14, %rdi callq 0x1b690 jmp 0x90160 jmp 0x9015d jmp 0x9015d movq %rax, %rbx leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x6b800 movq %r14, %rdi callq 0x70bac jmp 0x90160 jmp 0x9015d movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x90194 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x90194 movq %rax, %rbx movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0x90194 leaq 0x8(%rsp), %rdi callq 0x91a9c movq %rbx, %rdi callq 0x1bff0
_ZN5minja6Parser13parseConstantEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rsi mov rbx, rdi lea r14, [rsi+20h] mov r12, [rsi+18h] mov r13, [rsi+20h] mov rbp, r13 cmp r13, r12 jz short loc_8FE83 mov rbp, r13 loc_8FE6B: movsx edi, byte ptr [rbp+0] call _isspace test eax, eax jz short loc_8FE83 inc rbp mov [r14], rbp cmp rbp, r12 jnz short loc_8FE6B loc_8FE83: cmp rbp, r12 jz short loc_8FED9 movzx eax, byte ptr [rbp+0] cmp eax, 27h ; ''' jz short loc_8FE96 cmp eax, 22h ; '"' jnz short loc_8FEE4 loc_8FE96: lea r12, [rsp+78h+var_70] mov rdi, r12; int mov rsi, r15; void * call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void) mov rdx, [r12] test rdx, rdx jz short loc_8FEE4 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,std::string &>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,std::string &) mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz loc_90041 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp loc_90041 loc_8FED9: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 jmp loc_90041 loc_8FEE4: lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok mov al, [rax] test al, al jz loc_90053 loc_8FEF5: lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea r12, [rsp+78h+var_70] mov rdi, r12 mov rsi, r15 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) cmp qword ptr [r12+8], 0 jz loc_8FFC0 lea rsi, aTrue; "true" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8FFA9 lea rsi, aTrue_0; "True" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8FFA9 lea rsi, aAdvancedOption+0ABh; "false" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_8FFEF lea rsi, aFalse; "False" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8FFEF lea rsi, aNone_0; "None" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz loc_900AA lea rdx, [rsp+78h+var_50] mov qword ptr [rdx], 0 lea rsi, [rsp+78h+var_71] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJDnEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,decltype(nullptr) &&) jmp short loc_90026 loc_8FFA9: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 1 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,bool &&) jmp short loc_90026 loc_8FFC0: lea rcx, [r15+18h] lea rdi, [rsp+78h+var_50] mov rsi, r15 mov rdx, r14 call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&) cmp [rsp+78h+var_50], 0 jz short loc_90006 lea rsi, [rsp+78h+var_71] lea rdx, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) jmp short loc_9000F loc_8FFEF: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 0 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,bool &&) jmp short loc_90026 loc_90006: mov [r14], r13 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_9000F: lea r14, [rsp+78h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_90026: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_90041 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_90041: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_90053: lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_8FEF5 lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_8FEF5 loc_900AA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnknownConstan; "Unknown constant token: " lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+78h+var_50] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_abort jmp loc_90194 mov rbx, rax lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_90127 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_90127: test bpl, bpl jnz short loc_90131 jmp short loc_90160 mov rbx, rax loc_90131: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_90160 jmp short loc_9015D jmp short loc_9015D mov rbx, rax lea r14, [rsp+78h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_90160 jmp short $+2 loc_9015D: mov rbx, rax loc_90160: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_90194 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_90194 mov rbx, rax mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz short loc_90194 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_90194: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseConstant(minja::Parser *this, unsigned __int8 **a2) { unsigned __int8 **v2; // r14 char *v3; // r12 unsigned __int8 *v4; // r13 unsigned __int8 *v5; // rbp int v6; // eax void *exception; // r14 char v9; // [rsp+7h] [rbp-71h] BYREF int v10[2]; // [rsp+8h] [rbp-70h] BYREF long long v11; // [rsp+10h] [rbp-68h] long long v12; // [rsp+18h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-50h] BYREF v2 = a2 + 4; v3 = (char *)a2[3]; v4 = a2[4]; v5 = v4; if ( v4 != (unsigned __int8 *)v3 ) { v5 = a2[4]; do { if ( !(unsigned int)isspace((unsigned int)(char)*v5) ) break; *v2 = ++v5; } while ( v5 != (unsigned __int8 *)v3 ); } if ( v5 == (unsigned __int8 *)v3 ) { *(_OWORD *)this = 0LL; } else { v6 = *v5; if ( (v6 == 39 || v6 == 34) && (minja::Parser::parseString[abi:cxx11]((int)v10, a2), *(_QWORD *)v10) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,std::string &>( this, v13); if ( *(_QWORD *)v10 ) std::default_delete<std::string>::operator()(v10); } else { if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], (long long)"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]); } minja::Parser::consumeToken( (long long)v10, (long long)a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u); if ( v11 ) { if ( !(unsigned int)std::string::compare(v10, "true") || !(unsigned int)std::string::compare(v10, "True") ) { v9 = 1; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>( this, v13, &v9); } else if ( !(unsigned int)std::string::compare(v10, "false") || !(unsigned int)std::string::compare(v10, "False") ) { v9 = 0; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>( this, v13, &v9); } else { if ( (unsigned int)std::string::compare(v10, "None") ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v13, (long long)"Unknown constant token: ", v10); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13[0] = 0LL; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>( this, &v9, v13); } } else { minja::Parser::parseNumber(v13, a2, v2, a2 + 3); if ( LOBYTE(v13[0]) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,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> &>( this, &v9, v13); } else { *v2 = v4; *(_OWORD *)this = 0LL; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13); 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(v13); } if ( *(long long **)v10 != &v12 ) operator delete(*(void **)v10, v12 + 1); } } return this; }
parseConstant: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV RBX,RDI LEA R14,[RSI + 0x20] MOV R12,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RBP,R13 CMP R13,R12 JZ 0x0018fe83 MOV RBP,R13 LAB_0018fe6b: MOVSX EDI,byte ptr [RBP] CALL 0x0011b0c0 TEST EAX,EAX JZ 0x0018fe83 INC RBP MOV qword ptr [R14],RBP CMP RBP,R12 JNZ 0x0018fe6b LAB_0018fe83: CMP RBP,R12 JZ 0x0018fed9 MOVZX EAX,byte ptr [RBP] CMP EAX,0x27 JZ 0x0018fe96 CMP EAX,0x22 JNZ 0x0018fee4 LAB_0018fe96: LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x00191228 MOV RDX,qword ptr [R12] TEST RDX,RDX JZ 0x0018fee4 LAB_0018feaf: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0019187c LAB_0018febc: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x00190041 LEA RDI,[RSP + 0x8] CALL 0x00191a9c JMP 0x00190041 LAB_0018fed9: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x00190041 LAB_0018fee4: LEA RAX,[0x232238] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00190053 LAB_0018fef5: LEA RDX,[0x232218] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 MOV ECX,0x1 CALL 0x0018954e CMP qword ptr [R12 + 0x8],0x0 JZ 0x0018ffc0 LEA RSI,[0x1ecb12] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018ffa9 LEA RSI,[0x1f4de4] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018ffa9 LEA RSI,[0x1ef7fb] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018ffef LEA RSI,[0x1f4de9] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018ffef LEA RSI,[0x1f5204] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JNZ 0x001900aa LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],0x0 LAB_0018ff9a: LEA RSI,[RSP + 0x7] MOV RDI,RBX CALL 0x00191bbc JMP 0x00190026 LAB_0018ffa9: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x1 LAB_0018ffb1: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00191aca JMP 0x00190026 LAB_0018ffc0: LEA RCX,[R15 + 0x18] LEA RDI,[RSP + 0x28] MOV RSI,R15 MOV RDX,R14 CALL 0x001912a8 CMP byte ptr [RSP + 0x28],0x0 JZ 0x00190006 LAB_0018ffdb: LEA RSI,[RSP + 0x7] LEA RDX,[RSP + 0x28] MOV RDI,RBX CALL 0x00191dd0 JMP 0x0019000f LAB_0018ffef: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x0 LAB_0018fff7: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00191aca JMP 0x00190026 LAB_00190006: MOV qword ptr [R14],R13 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_0019000f: LEA R14,[RSP + 0x28] MOV RDI,R14 XOR ESI,ESI CALL 0x0016b800 MOV RDI,R14 CALL 0x00170bac LAB_00190026: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00190041 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b910 LAB_00190041: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00190053: LEA RDI,[0x232238] CALL 0x0011c060 TEST EAX,EAX JZ 0x0018fef5 LAB_00190067: LEA RDI,[0x232218] LEA RSI,[0x1f51df] MOV EDX,0x10 CALL 0x00126358 LAB_0019007f: LEA RDI,[0x1263c0] LEA RSI,[0x232218] LEA RDX,[0x231918] CALL 0x0011b7f0 LEA RDI,[0x232238] CALL 0x0011b5c0 JMP 0x0018fef5 LAB_001900aa: MOV EDI,0x10 CALL 0x0011b450 MOV R14,RAX LAB_001900b7: LEA RSI,[0x1f5209] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x001288ef MOV BPL,0x1 LAB_001900d0: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x0011be70 XOR EBP,EBP MOV RSI,qword ptr [0x00230fe8] MOV RDX,qword ptr [0x00230f58] MOV RDI,R14 CALL 0x0011bf60
/* minja::Parser::parseConstant() */ void minja::Parser::parseConstant(void) { char *pcVar1; char *pcVar2; int iVar3; runtime_error *this; char *pcVar4; __normal_iterator *in_RSI; int8 *in_RDI; string *local_70; long local_68; long local_60 [2]; int8 local_50 [4]; pcVar1 = *(char **)(in_RSI + 0x18); pcVar2 = *(char **)(in_RSI + 0x20); pcVar4 = pcVar2; while ((pcVar4 != pcVar1 && (iVar3 = isspace((int)*pcVar4), iVar3 != 0))) { pcVar4 = pcVar4 + 1; *(char **)(in_RSI + 0x20) = pcVar4; } if (pcVar4 == pcVar1) { *in_RDI = 0; in_RDI[1] = 0; } else if (((*pcVar4 == '\'') || (*pcVar4 == '\"')) && (parseString_abi_cxx11_(), local_70 != (string *)0x0)) { /* try { // try from 0018feaf to 0018febb has its CatchHandler @ 0019017d */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,std::__cxx11::string&>(); if (local_70 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_70,local_70); } } else { if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') && (iVar3 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar3 != 0)) { /* try { // try from 00190067 to 0019007e has its CatchHandler @ 001900f5 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseConstant()::prim_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_); } consumeToken(&local_70); if (local_68 == 0) { /* try { // try from 0018ffc0 to 0018ffd3 has its CatchHandler @ 0019015b */ parseNumber((__normal_iterator *)local_50,in_RSI); if (local_50[0]._0_1_ == (data)0x0) { *(char **)(in_RSI + 0x20) = pcVar2; *in_RDI = 0; in_RDI[1] = 0; } else { /* try { // try from 0018ffdb to 0018ffec has its CatchHandler @ 0019013f */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,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> ::assert_invariant(SUB81((data *)local_50,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_50); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 0018ffb1 to 0018ffbd has its CatchHandler @ 0019015d */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 0018fff7 to 00190003 has its CatchHandler @ 0019013d */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if (iVar3 != 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001900b7 to 001900cc has its CatchHandler @ 0019012e */ std::operator+((char *)local_50,(string *)"Unknown constant token: "); /* try { // try from 001900d0 to 001900f4 has its CatchHandler @ 00190109 */ std::runtime_error::runtime_error(this,(string *)local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58); } local_50[0] = 0; /* try { // try from 0018ff9a to 0018ffa6 has its CatchHandler @ 0019013b */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>(); } } } if (local_70 != (string *)local_60) { operator_delete(local_70,local_60[0] + 1); } } return; }
38,810
ReadWriteQueue::writeQueueToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
666mxvbee[P]BattleShip/lib/ReadWriteQueue/ReadWriteQueue.cpp
void ReadWriteQueue::writeQueueToFile(const std::string& filename, int player) { std::lock_guard<std::mutex> lock(queue_mutex); std::ofstream out(filename, std::ios::trunc); if (!out.is_open()) { std::cerr << "ReadWriteQueue: Unable to open " << filename << " for writing." << std::endl; return; } out << player; out.close(); }
O2
cpp
ReadWriteQueue::writeQueueToFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): pushq %rbp pushq %r14 pushq %rbx subq $0x200, %rsp # imm = 0x200 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx callq 0x6d3c movq %rsp, %rdi pushq $0x20 popq %rdx movq %r14, %rsi callq 0x5610 leaq 0x70(%rsp), %rdi callq 0x5080 testb %al, %al je 0x1330e movq %rsp, %rdi movl %ebp, %esi callq 0x5590 movq %rsp, %rdi callq 0x5490 jmp 0x13343 movq 0x11cd3(%rip), %rdi # 0x24fe8 leaq 0x4fbd(%rip), %rsi # 0x182d9 callq 0x5360 movq %rax, %rdi movq %r14, %rsi callq 0x5330 leaq 0x50c4(%rip), %rsi # 0x183f7 movq %rax, %rdi callq 0x5360 movq %rax, %rdi callq 0x5190 movq %rsp, %rdi callq 0x54e0 movq %rbx, %rdi callq 0x52e0 addq $0x200, %rsp # imm = 0x200 popq %rbx popq %r14 popq %rbp retq movq %rax, %r14 jmp 0x1336f movq %rax, %r14 movq %rsp, %rdi callq 0x54e0 movq %rbx, %rdi callq 0x52e0 movq %r14, %rdi callq 0x55b0 nop
_ZN14ReadWriteQueue16writeQueueToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp push r14 push rbx sub rsp, 200h mov ebp, edx mov r14, rsi mov rbx, rdi call _ZNSt5mutex4lockEv; std::mutex::lock(void) mov rdi, rsp push 20h ; ' ' pop rdx mov rsi, r14 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) lea rdi, [rsp+218h+var_1A8] call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) test al, al jz short loc_1330E mov rdi, rsp mov esi, ebp call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rsp call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void) jmp short loc_13343 loc_1330E: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aReadwritequeue; "ReadWriteQueue: Unable to open " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, aMasterSetupshi+35h; " for writing." mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) loc_13343: mov rdi, rsp call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() mov rdi, rbx call _pthread_mutex_unlock add rsp, 200h pop rbx pop r14 pop rbp retn mov r14, rax jmp short loc_1336F mov r14, rax mov rdi, rsp call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() loc_1336F: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long ReadWriteQueue::writeQueueToFile(std::mutex *a1, long long a2, unsigned int a3) { long long v4; // rax long long v5; // rax long long v6; // rax _BYTE v8[112]; // [rsp+0h] [rbp-218h] BYREF _BYTE v9[424]; // [rsp+70h] [rbp-1A8h] BYREF std::mutex::lock(a1); std::ofstream::basic_ofstream(v8, a2, 32LL); if ( (unsigned __int8)std::__basic_file<char>::is_open(v9) ) { std::ostream::operator<<(v8, a3); std::ofstream::close(v8); } else { v4 = std::operator<<<std::char_traits<char>>(&std::cerr, "ReadWriteQueue: Unable to open "); v5 = std::operator<<<char>(v4, a2); v6 = std::operator<<<std::char_traits<char>>(v5, " for writing."); std::endl<char,std::char_traits<char>>(v6); } std::ofstream::~ofstream(v8); return pthread_mutex_unlock(a1); }
writeQueueToFile: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x200 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI CALL 0x00106d3c LAB_001132de: MOV RDI,RSP PUSH 0x20 POP RDX MOV RSI,R14 CALL 0x00105610 LEA RDI,[RSP + 0x70] CALL 0x00105080 TEST AL,AL JZ 0x0011330e LAB_001132fa: MOV RDI,RSP MOV ESI,EBP CALL 0x00105590 MOV RDI,RSP CALL 0x00105490 JMP 0x00113343 LAB_0011330e: MOV RDI,qword ptr [0x00124fe8] LEA RSI,[0x1182d9] CALL 0x00105360 MOV RDI,RAX MOV RSI,R14 CALL 0x00105330 LEA RSI,[0x1183f7] MOV RDI,RAX CALL 0x00105360 MOV RDI,RAX CALL 0x00105190 LAB_00113343: MOV RDI,RSP CALL 0x001054e0 MOV RDI,RBX CALL 0x001052e0 ADD RSP,0x200 POP RBX POP R14 POP RBP RET
/* ReadWriteQueue::writeQueueToFile(std::__cxx11::string const&, int) */ void __thiscall ReadWriteQueue::writeQueueToFile(ReadWriteQueue *this,string *param_1,int param_2) { char cVar1; ostream *poVar2; ostream aoStack_218 [512]; std::mutex::lock(); /* try { // try from 001132de to 001132eb has its CatchHandler @ 0011335f */ std::ofstream::ofstream((ofstream *)aoStack_218,param_1,0x20); cVar1 = std::__basic_file<char>::is_open(); if (cVar1 == '\0') { poVar2 = std::operator<<((ostream *)PTR_cerr_00124fe8,"ReadWriteQueue: Unable to open "); poVar2 = std::operator<<(poVar2,param_1); poVar2 = std::operator<<(poVar2," for writing."); std::endl<char,std::char_traits<char>>(poVar2); } else { /* try { // try from 001132fa to 00113342 has its CatchHandler @ 00113364 */ std::ostream::operator<<(aoStack_218,param_2); std::ofstream::close(); } std::ofstream::~ofstream((ofstream *)aoStack_218); pthread_mutex_unlock((pthread_mutex_t *)this); return; }
38,811
ma_calc_bin_pack_key_length
eloqsql/storage/maria/ma_search.c
int _ma_calc_bin_pack_key_length(const MARIA_KEY *int_key, uint nod_flag, uchar *next_key, uchar *org_key, uchar *prev_key, MARIA_KEY_PARAM *s_temp) { uint length,key_length,ref_length; const uchar *key= int_key->data; s_temp->totlength= key_length= (int_key->data_length + int_key->ref_length+ nod_flag); #ifdef HAVE_valgrind s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */ #endif s_temp->key=key; s_temp->prev_key=org_key; if (prev_key) /* If not first key in block */ { /* pack key against previous key */ /* As keys may be identical when running a sort in maria_chk, we have to guard against the case where keys may be identical */ const uchar *end; end=key+key_length; for ( ; *key == *prev_key && key < end; key++,prev_key++) ; s_temp->ref_length= ref_length=(uint) (key-s_temp->key); length=key_length - ref_length + get_pack_length(ref_length); } else { /* No previous key */ s_temp->ref_length=ref_length=0; length=key_length+1; } if ((s_temp->next_key_pos=next_key)) /* If another key after */ { /* pack key against next key */ uint next_length,next_length_pack; get_key_pack_length(next_length,next_length_pack,next_key); /* If first key and next key is packed (only on delete) */ if (!prev_key && org_key && next_length) { const uchar *end; for (key= s_temp->key, end=key+next_length ; *key == *org_key && key < end; key++,org_key++) ; ref_length= (uint) (key - s_temp->key); } if (next_length > ref_length) { /* We put a key with different case between two keys with the same prefix Extend next key to have same prefix as this key */ s_temp->n_ref_length= ref_length; s_temp->prev_length= next_length-ref_length; s_temp->prev_key+= ref_length; return s_temp->move_length= ((int) (length+ s_temp->prev_length - next_length_pack + get_pack_length(ref_length))); } /* Check how many characters are identical to next key */ key= s_temp->key+next_length; s_temp->prev_length= 0; while (*key++ == *next_key++) ; if ((ref_length= (uint) (key - s_temp->key)-1) == next_length) { s_temp->next_key_pos=0; return (s_temp->move_length= length); /* Can't pack next key */ } s_temp->n_ref_length=ref_length; return s_temp->move_length= (int) (length-(ref_length - next_length) - next_length_pack + get_pack_length(ref_length)); } return (s_temp->move_length= (int) length); }
O0
c
ma_calc_bin_pack_key_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %ecx movq -0x10(%rbp), %rax addl 0x14(%rax), %ecx addl -0x14(%rbp), %ecx movl %ecx, -0x40(%rbp) movq -0x38(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x50(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) cmpq $0x0, -0x30(%rbp) je 0x6f688 movq -0x50(%rbp), %rax movl -0x40(%rbp), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movzbl (%rax), %ecx movq -0x30(%rbp), %rax movzbl (%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x69(%rbp) jne 0x6f626 movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax setb %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al testb $0x1, %al jne 0x6f62f jmp 0x6f64b jmp 0x6f631 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x6f601 movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movl %ecx, -0x44(%rbp) movq -0x38(%rbp), %rax movl %ecx, 0x20(%rax) movl -0x40(%rbp), %eax subl -0x44(%rbp), %eax movl -0x44(%rbp), %esi movl $0x1, %ecx movl $0x3, %edx cmpl $0xff, %esi cmovael %edx, %ecx addl %ecx, %eax movl %eax, -0x3c(%rbp) jmp 0x6f6a3 movl $0x0, -0x44(%rbp) movq -0x38(%rbp), %rax movl $0x0, 0x20(%rax) movl -0x40(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) movq -0x20(%rbp), %rax movq -0x38(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax je 0x6f8c2 movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0xff, %eax je 0x6f6e5 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movzbl (%rax), %eax movl %eax, -0x5c(%rbp) movl $0x1, -0x60(%rbp) jmp 0x6f719 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax movzwl %ax, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x5c(%rbp) movq -0x20(%rbp), %rax addq $0x3, %rax movq %rax, -0x20(%rbp) movl $0x3, -0x60(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x6f7a5 cmpq $0x0, -0x28(%rbp) je 0x6f7a5 cmpl $0x0, -0x5c(%rbp) je 0x6f7a5 movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movl -0x5c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x50(%rbp), %rax movzbl (%rax), %ecx movq -0x28(%rbp), %rax movzbl (%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x6a(%rbp) jne 0x6f76f movq -0x50(%rbp), %rax cmpq -0x68(%rbp), %rax setb %al movb %al, -0x6a(%rbp) movb -0x6a(%rbp), %al testb $0x1, %al jne 0x6f778 jmp 0x6f794 jmp 0x6f77a movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x6f74a movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax movl %eax, -0x44(%rbp) movl -0x5c(%rbp), %eax cmpl -0x44(%rbp), %eax jbe 0x6f80c movl -0x44(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x28(%rax) movl -0x5c(%rbp), %ecx subl -0x44(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x38(%rax) movl -0x44(%rbp), %edx movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, 0x8(%rax) movl -0x3c(%rbp), %eax movq -0x38(%rbp), %rcx addl 0x38(%rcx), %eax subl -0x60(%rbp), %eax movl -0x44(%rbp), %esi movl $0x1, %ecx movl $0x3, %edx cmpl $0xff, %esi cmovael %edx, %ecx addl %ecx, %eax movq -0x38(%rbp), %rcx movl %eax, 0x44(%rcx) movl %eax, -0x4(%rbp) jmp 0x6f8cf movq -0x38(%rbp), %rax movq (%rax), %rax movl -0x5c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x38(%rbp), %rax movl $0x0, 0x38(%rax) movq -0x50(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x50(%rbp) movzbl (%rax), %eax movq -0x20(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax jne 0x6f852 jmp 0x6f828 movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax subl $0x1, %eax movl %eax, -0x44(%rbp) cmpl -0x5c(%rbp), %eax jne 0x6f886 movq -0x38(%rbp), %rax movq $0x0, 0x10(%rax) movl -0x3c(%rbp), %eax movq -0x38(%rbp), %rcx movl %eax, 0x44(%rcx) movl %eax, -0x4(%rbp) jmp 0x6f8cf movl -0x44(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x28(%rax) movl -0x3c(%rbp), %eax movl -0x44(%rbp), %ecx subl -0x5c(%rbp), %ecx subl %ecx, %eax subl -0x60(%rbp), %eax movl -0x44(%rbp), %esi movl $0x1, %ecx movl $0x3, %edx cmpl $0xff, %esi cmovael %edx, %ecx addl %ecx, %eax movq -0x38(%rbp), %rcx movl %eax, 0x44(%rcx) movl %eax, -0x4(%rbp) jmp 0x6f8cf movl -0x3c(%rbp), %eax movq -0x38(%rbp), %rcx movl %eax, 0x44(%rcx) movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_calc_bin_pack_key_length: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov ecx, [rax+10h] mov rax, [rbp+var_10] add ecx, [rax+14h] add ecx, [rbp+var_14] mov [rbp+var_40], ecx mov rax, [rbp+var_38] mov [rax+30h], ecx mov rcx, [rbp+var_50] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_38] mov [rax+8], rcx cmp [rbp+var_30], 0 jz loc_6F688 mov rax, [rbp+var_50] mov ecx, [rbp+var_40] add rax, rcx mov [rbp+var_58], rax loc_6F601: mov rax, [rbp+var_50] movzx ecx, byte ptr [rax] mov rax, [rbp+var_30] movzx edx, byte ptr [rax] xor eax, eax cmp ecx, edx mov [rbp+var_69], al jnz short loc_6F626 mov rax, [rbp+var_50] cmp rax, [rbp+var_58] setb al mov [rbp+var_69], al loc_6F626: mov al, [rbp+var_69] test al, 1 jnz short loc_6F62F jmp short loc_6F64B loc_6F62F: jmp short $+2 loc_6F631: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_6F601 loc_6F64B: mov rax, [rbp+var_50] mov rcx, [rbp+var_38] mov rcx, [rcx] sub rax, rcx mov ecx, eax mov [rbp+var_44], ecx mov rax, [rbp+var_38] mov [rax+20h], ecx mov eax, [rbp+var_40] sub eax, [rbp+var_44] mov esi, [rbp+var_44] mov ecx, 1 mov edx, 3 cmp esi, 0FFh cmovnb ecx, edx add eax, ecx mov [rbp+var_3C], eax jmp short loc_6F6A3 loc_6F688: mov [rbp+var_44], 0 mov rax, [rbp+var_38] mov dword ptr [rax+20h], 0 mov eax, [rbp+var_40] add eax, 1 mov [rbp+var_3C], eax loc_6F6A3: mov rax, [rbp+var_20] mov rcx, [rbp+var_38] mov [rcx+10h], rax cmp rax, 0 jz loc_6F8C2 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 0FFh jz short loc_6F6E5 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx movzx eax, byte ptr [rax] mov [rbp+var_5C], eax mov [rbp+var_60], 1 jmp short loc_6F719 loc_6F6E5: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] movzx eax, ax mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_5C], eax mov rax, [rbp+var_20] add rax, 3 mov [rbp+var_20], rax mov [rbp+var_60], 3 loc_6F719: cmp [rbp+var_30], 0 jnz loc_6F7A5 cmp [rbp+var_28], 0 jz short loc_6F7A5 cmp [rbp+var_5C], 0 jz short loc_6F7A5 mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov ecx, [rbp+var_5C] add rax, rcx mov [rbp+var_68], rax loc_6F74A: mov rax, [rbp+var_50] movzx ecx, byte ptr [rax] mov rax, [rbp+var_28] movzx edx, byte ptr [rax] xor eax, eax cmp ecx, edx mov [rbp+var_6A], al jnz short loc_6F76F mov rax, [rbp+var_50] cmp rax, [rbp+var_68] setb al mov [rbp+var_6A], al loc_6F76F: mov al, [rbp+var_6A] test al, 1 jnz short loc_6F778 jmp short loc_6F794 loc_6F778: jmp short $+2 loc_6F77A: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_6F74A loc_6F794: mov rax, [rbp+var_50] mov rcx, [rbp+var_38] mov rcx, [rcx] sub rax, rcx mov [rbp+var_44], eax loc_6F7A5: mov eax, [rbp+var_5C] cmp eax, [rbp+var_44] jbe short loc_6F80C mov ecx, [rbp+var_44] mov rax, [rbp+var_38] mov [rax+28h], ecx mov ecx, [rbp+var_5C] sub ecx, [rbp+var_44] mov rax, [rbp+var_38] mov [rax+38h], ecx mov edx, [rbp+var_44] mov rax, [rbp+var_38] mov rcx, [rax+8] mov edx, edx add rcx, rdx mov [rax+8], rcx mov eax, [rbp+var_3C] mov rcx, [rbp+var_38] add eax, [rcx+38h] sub eax, [rbp+var_60] mov esi, [rbp+var_44] mov ecx, 1 mov edx, 3 cmp esi, 0FFh cmovnb ecx, edx add eax, ecx mov rcx, [rbp+var_38] mov [rcx+44h], eax mov [rbp+var_4], eax jmp loc_6F8CF loc_6F80C: mov rax, [rbp+var_38] mov rax, [rax] mov ecx, [rbp+var_5C] add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_38] mov dword ptr [rax+38h], 0 loc_6F828: mov rax, [rbp+var_50] mov rcx, rax add rcx, 1 mov [rbp+var_50], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] mov rdx, rcx add rdx, 1 mov [rbp+var_20], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jnz short loc_6F852 jmp short loc_6F828 loc_6F852: mov rax, [rbp+var_50] mov rcx, [rbp+var_38] mov rcx, [rcx] sub rax, rcx sub eax, 1 mov [rbp+var_44], eax cmp eax, [rbp+var_5C] jnz short loc_6F886 mov rax, [rbp+var_38] mov qword ptr [rax+10h], 0 mov eax, [rbp+var_3C] mov rcx, [rbp+var_38] mov [rcx+44h], eax mov [rbp+var_4], eax jmp short loc_6F8CF loc_6F886: mov ecx, [rbp+var_44] mov rax, [rbp+var_38] mov [rax+28h], ecx mov eax, [rbp+var_3C] mov ecx, [rbp+var_44] sub ecx, [rbp+var_5C] sub eax, ecx sub eax, [rbp+var_60] mov esi, [rbp+var_44] mov ecx, 1 mov edx, 3 cmp esi, 0FFh cmovnb ecx, edx add eax, ecx mov rcx, [rbp+var_38] mov [rcx+44h], eax mov [rbp+var_4], eax jmp short loc_6F8CF loc_6F8C2: mov eax, [rbp+var_3C] mov rcx, [rbp+var_38] mov [rcx+44h], eax mov [rbp+var_4], eax loc_6F8CF: mov eax, [rbp+var_4] pop rbp retn
long long ma_calc_bin_pack_key_length( unsigned __int8 **a1, int a2, unsigned __int8 *a3, unsigned __int8 *a4, unsigned __int8 *a5, unsigned __int8 **a6) { int v6; // ecx int v7; // ecx unsigned int v8; // eax unsigned __int8 *v9; // rax unsigned __int8 *v10; // rcx int v11; // ecx bool v13; // [rsp+0h] [rbp-6Ah] bool v14; // [rsp+1h] [rbp-69h] int v15; // [rsp+Ah] [rbp-60h] unsigned int v16; // [rsp+Eh] [rbp-5Ch] unsigned __int8 *v17; // [rsp+12h] [rbp-58h] unsigned __int8 *v18; // [rsp+1Ah] [rbp-50h] unsigned __int8 *i; // [rsp+1Ah] [rbp-50h] unsigned __int8 *v20; // [rsp+1Ah] [rbp-50h] unsigned int v21; // [rsp+26h] [rbp-44h] unsigned int v22; // [rsp+26h] [rbp-44h] int v23; // [rsp+2Ah] [rbp-40h] unsigned int v24; // [rsp+2Eh] [rbp-3Ch] unsigned __int8 *v25; // [rsp+3Ah] [rbp-30h] unsigned __int8 *v26; // [rsp+42h] [rbp-28h] unsigned __int8 *v27; // [rsp+4Ah] [rbp-20h] v26 = a4; v25 = a5; v18 = *a1; v23 = a2 + *((_DWORD *)a1 + 5) + *((_DWORD *)a1 + 4); *((_DWORD *)a6 + 12) = v23; *a6 = v18; a6[1] = a4; if ( a5 ) { v17 = &v18[v23]; while ( 1 ) { v14 = 0; if ( *v18 == *v25 ) v14 = v18 < v17; if ( !v14 ) break; ++v18; ++v25; } v21 = (_DWORD)v18 - (unsigned int)*a6; *((_DWORD *)a6 + 8) = v21; v6 = 1; if ( v21 >= 0xFF ) v6 = 3; v24 = v6 + v23 - v21; } else { v21 = 0; *((_DWORD *)a6 + 8) = 0; v24 = v23 + 1; } a6[2] = a3; if ( a3 ) { if ( *a3 == 255 ) { v16 = _byteswap_ushort(*(_WORD *)(a3 + 1)); v27 = a3 + 3; v15 = 3; } else { v27 = a3 + 1; v16 = *a3; v15 = 1; } if ( !v25 && v26 && v16 ) { for ( i = *a6; ; ++i ) { v13 = 0; if ( *i == *v26 ) v13 = i < &(*a6)[v16]; if ( !v13 ) break; ++v26; } v21 = (_DWORD)i - *(_DWORD *)a6; } if ( v16 <= v21 ) { v20 = &(*a6)[v16]; *((_DWORD *)a6 + 14) = 0; do { v9 = v20++; v10 = v27++; } while ( *v9 == *v10 ); v22 = (_DWORD)v20 - (unsigned int)*a6 - 1; if ( v22 == v16 ) { a6[2] = 0LL; *((_DWORD *)a6 + 17) = v24; return v24; } else { *((_DWORD *)a6 + 10) = v22; v11 = 1; if ( v22 >= 0xFF ) v11 = 3; *((_DWORD *)a6 + 17) = v11 + v24 - (v22 - v16) - v15; return v11 + v24 - (v22 - v16) - v15; } } else { *((_DWORD *)a6 + 10) = v21; *((_DWORD *)a6 + 14) = v16 - v21; a6[1] += v21; v7 = 1; if ( v21 >= 0xFF ) v7 = 3; v8 = v7 + *((_DWORD *)a6 + 14) + v24 - v15; *((_DWORD *)a6 + 17) = v8; return v8; } } else { *((_DWORD *)a6 + 17) = v24; return v24; } }
_ma_calc_bin_pack_key_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0x14] ADD ECX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x40],ECX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x30],ECX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0016f688 MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x40] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX LAB_0016f601: MOV RAX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] MOVZX EDX,byte ptr [RAX] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x69],AL JNZ 0x0016f626 MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] SETC AL MOV byte ptr [RBP + -0x69],AL LAB_0016f626: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x0016f62f JMP 0x0016f64b LAB_0016f62f: JMP 0x0016f631 LAB_0016f631: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016f601 LAB_0016f64b: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX] SUB RAX,RCX MOV ECX,EAX MOV dword ptr [RBP + -0x44],ECX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x20],ECX MOV EAX,dword ptr [RBP + -0x40] SUB EAX,dword ptr [RBP + -0x44] MOV ESI,dword ptr [RBP + -0x44] MOV ECX,0x1 MOV EDX,0x3 CMP ESI,0xff CMOVNC ECX,EDX ADD EAX,ECX MOV dword ptr [RBP + -0x3c],EAX JMP 0x0016f6a3 LAB_0016f688: MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x20],0x0 MOV EAX,dword ptr [RBP + -0x40] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX LAB_0016f6a3: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JZ 0x0016f8c2 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x0016f6e5 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x5c],EAX MOV dword ptr [RBP + -0x60],0x1 JMP 0x0016f719 LAB_0016f6e5: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x60],0x3 LAB_0016f719: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0016f7a5 CMP qword ptr [RBP + -0x28],0x0 JZ 0x0016f7a5 CMP dword ptr [RBP + -0x5c],0x0 JZ 0x0016f7a5 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x5c] ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX LAB_0016f74a: MOV RAX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOVZX EDX,byte ptr [RAX] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x6a],AL JNZ 0x0016f76f MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x68] SETC AL MOV byte ptr [RBP + -0x6a],AL LAB_0016f76f: MOV AL,byte ptr [RBP + -0x6a] TEST AL,0x1 JNZ 0x0016f778 JMP 0x0016f794 LAB_0016f778: JMP 0x0016f77a LAB_0016f77a: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0016f74a LAB_0016f794: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX] SUB RAX,RCX MOV dword ptr [RBP + -0x44],EAX LAB_0016f7a5: MOV EAX,dword ptr [RBP + -0x5c] CMP EAX,dword ptr [RBP + -0x44] JBE 0x0016f80c MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x28],ECX MOV ECX,dword ptr [RBP + -0x5c] SUB ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x38],ECX MOV EDX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x38] ADD EAX,dword ptr [RCX + 0x38] SUB EAX,dword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x44] MOV ECX,0x1 MOV EDX,0x3 CMP ESI,0xff CMOVNC ECX,EDX ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX + 0x44],EAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0016f8cf LAB_0016f80c: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x5c] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x38],0x0 LAB_0016f828: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x50],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JNZ 0x0016f852 JMP 0x0016f828 LAB_0016f852: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX] SUB RAX,RCX SUB EAX,0x1 MOV dword ptr [RBP + -0x44],EAX CMP EAX,dword ptr [RBP + -0x5c] JNZ 0x0016f886 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],0x0 MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX + 0x44],EAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0016f8cf LAB_0016f886: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x28],ECX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,dword ptr [RBP + -0x44] SUB ECX,dword ptr [RBP + -0x5c] SUB EAX,ECX SUB EAX,dword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x44] MOV ECX,0x1 MOV EDX,0x3 CMP ESI,0xff CMOVNC ECX,EDX ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX + 0x44],EAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0016f8cf LAB_0016f8c2: MOV EAX,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX + 0x44],EAX MOV dword ptr [RBP + -0x4],EAX LAB_0016f8cf: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int _ma_calc_bin_pack_key_length (int8 *param_1,int param_2,byte *param_3,char *param_4,char *param_5, long *param_6) { byte bVar1; byte bVar2; char *pcVar3; uint uVar4; byte *pbVar5; int local_68; uint local_64; byte *local_58; uint local_4c; int local_44; char *local_38; char *local_30; byte *local_28; int local_c; local_58 = (byte *)*param_1; uVar4 = *(int *)(param_1 + 2) + *(int *)((long)param_1 + 0x14) + param_2; *(uint *)(param_6 + 6) = uVar4; *param_6 = (long)local_58; param_6[1] = (long)param_4; local_38 = param_5; if (param_5 == (char *)0x0) { local_4c = 0; *(int4 *)(param_6 + 4) = 0; local_44 = uVar4 + 1; } else { pcVar3 = (char *)local_58 + uVar4; for (; *local_58 == *local_38 && local_58 < pcVar3; local_58 = local_58 + 1) { local_38 = local_38 + 1; } local_4c = (int)local_58 - (int)*param_6; *(uint *)(param_6 + 4) = local_4c; local_44 = 1; if (0xfe < local_4c) { local_44 = 3; } local_44 = (uVar4 - local_4c) + local_44; } param_6[2] = (long)param_3; if (param_3 == (byte *)0x0) { *(int *)((long)param_6 + 0x44) = local_44; local_c = local_44; } else { if (*param_3 == 0xff) { local_64 = (uint)CONCAT11(param_3[1],param_3[2]); local_28 = param_3 + 3; local_68 = 3; } else { local_28 = param_3 + 1; local_64 = (uint)*param_3; local_68 = 1; } if (((local_38 == (char *)0x0) && (param_4 != (char *)0x0)) && (local_64 != 0)) { local_58 = (byte *)*param_6; pcVar3 = (char *)local_58 + local_64; local_30 = param_4; for (; *local_58 == *local_30 && local_58 < pcVar3; local_58 = local_58 + 1) { local_30 = local_30 + 1; } local_4c = (int)local_58 - (int)*param_6; } if (local_4c < local_64) { *(uint *)(param_6 + 5) = local_4c; *(uint *)(param_6 + 7) = local_64 - local_4c; param_6[1] = param_6[1] + (ulong)local_4c; local_c = 1; if (0xfe < local_4c) { local_c = 3; } local_c = ((local_44 + (int)param_6[7]) - local_68) + local_c; *(int *)((long)param_6 + 0x44) = local_c; } else { *(int4 *)(param_6 + 7) = 0; local_58 = (byte *)(*param_6 + (ulong)local_64); do { pbVar5 = local_58 + 1; bVar1 = *local_58; bVar2 = *local_28; local_58 = pbVar5; local_28 = local_28 + 1; } while (bVar1 == bVar2); uVar4 = ((int)pbVar5 - (int)*param_6) - 1; if (uVar4 == local_64) { param_6[2] = 0; *(int *)((long)param_6 + 0x44) = local_44; local_c = local_44; } else { *(uint *)(param_6 + 5) = uVar4; local_c = 1; if (0xfe < uVar4) { local_c = 3; } local_c = ((local_44 - (uVar4 - local_64)) - local_68) + local_c; *(int *)((long)param_6 + 0x44) = local_c; } } } return local_c; }
38,812
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O0
c
my_thread_global_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0xfddda cmpb $0x0, 0xb909af(%rip) # 0xc8e790 je 0xfdde9 movb $0x0, -0x1(%rbp) jmp 0xfde5c movb $0x1, 0xb909a0(%rip) # 0xc8e790 leaq 0xb906d5(%rip), %rax # 0xc8e4cc cmpb $0x0, (%rax) jne 0xfde35 leaq 0xb90991(%rip), %rdi # 0xc8e794 xorl %eax, %eax movl %eax, %esi callq 0x29660 movl %eax, -0x8(%rbp) cmpl $0x0, %eax je 0xfde35 movq 0x1c71bd(%rip), %rax # 0x2c4fd8 movq (%rax), %rdi movl -0x8(%rbp), %edx leaq 0x5e67e(%rip), %rsi # 0x15c4a6 movb $0x0, %al callq 0x29160 movb $0x1, -0x1(%rbp) jmp 0xfde5c leaq 0xb90690(%rip), %rax # 0xc8e4cc movb $0x1, (%rax) callq 0xfdcd0 callq 0xfde70 cmpb $0x0, %al je 0xfde53 movb $0x1, -0x1(%rbp) jmp 0xfde5c callq 0xfdc00 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_global_init: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_FDDDA: cmp cs:my_thread_global_init_done, 0 jz short loc_FDDE9 mov [rbp+var_1], 0 jmp short loc_FDE5C loc_FDDE9: mov cs:my_thread_global_init_done, 1 lea rax, my_thr_key_mysys_exists cmp byte ptr [rax], 0 jnz short loc_FDE35 lea rdi, THR_KEY_mysys xor eax, eax mov esi, eax call _pthread_key_create mov [rbp+var_8], eax cmp eax, 0 jz short loc_FDE35 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rbp+var_8] lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp short loc_FDE5C loc_FDE35: lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 1 call my_thread_init_internal_mutex call my_thread_init cmp al, 0 jz short loc_FDE53 mov [rbp+var_1], 1 jmp short loc_FDE5C loc_FDE53: call my_thread_init_common_mutex mov [rbp+var_1], 0 loc_FDE5C: mov al, [rbp+var_1] add rsp, 10h pop rbp retn
char my_thread_global_init() { int v1; // [rsp+8h] [rbp-8h] if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); if ( (unsigned __int8)my_thread_init() ) { return 1; } else { my_thread_init_common_mutex(); return 0; } } else { fprintf(stderr, "Can't initialize threads: error %d\n", v1); return 1; } }
my_thread_global_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 JMP 0x001fddda LAB_001fddda: CMP byte ptr [0x00d8e790],0x0 JZ 0x001fdde9 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001fde5c LAB_001fdde9: MOV byte ptr [0x00d8e790],0x1 LEA RAX,[0xd8e4cc] CMP byte ptr [RAX],0x0 JNZ 0x001fde35 LEA RDI,[0xd8e794] XOR EAX,EAX MOV ESI,EAX CALL 0x00129660 MOV dword ptr [RBP + -0x8],EAX CMP EAX,0x0 JZ 0x001fde35 MOV RAX,qword ptr [0x003c4fd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x8] LEA RSI,[0x25c4a6] MOV AL,0x0 CALL 0x00129160 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001fde5c LAB_001fde35: LEA RAX,[0xd8e4cc] MOV byte ptr [RAX],0x1 CALL 0x001fdcd0 CALL 0x001fde70 CMP AL,0x0 JZ 0x001fde53 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001fde5c LAB_001fde53: CALL 0x001fdc00 MOV byte ptr [RBP + -0x1],0x0 LAB_001fde5c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x10 POP RBP RET
int1 my_thread_global_init(void) { char cVar1; uint uVar2; int1 local_9; if (my_thread_global_init_done == '\0') { my_thread_global_init_done = '\x01'; if ((my_thr_key_mysys_exists == '\0') && (uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) { fprintf(*(FILE **)PTR_stderr_003c4fd8,"Can\'t initialize threads: error %d\n",(ulong)uVar2); return 1; } my_thr_key_mysys_exists = '\x01'; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
38,813
llama_context::llama_context(llama_model const&)
monkey531[P]llama/src/llama-context.h
llama_context(const llama_model & model) : model(model) , t_start_us(model.t_start_us) , t_load_us(model.t_load_us) {}
O0
c
llama_context::llama_context(llama_model const&): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rdi movq %rdi, (%rsp) movq 0x8(%rsp), %rax movq %rax, (%rdi) addq $0x60, %rdi callq 0x1ff0f0 movq (%rsp), %rdi addq $0x158, %rdi # imm = 0x158 callq 0x212b10 movq (%rsp), %rdi addq $0x1f0, %rdi # imm = 0x1F0 callq 0x2084a0 movq (%rsp), %rdi addq $0x240, %rdi # imm = 0x240 callq 0x207190 movq (%rsp), %rdi addq $0x278, %rdi # imm = 0x278 callq 0x2174f0 movq (%rsp), %rdi addq $0x290, %rdi # imm = 0x290 callq 0x2034f0 movq (%rsp), %rdi movq $0x0, 0x2a8(%rdi) movq $0x0, 0x2b0(%rdi) movq $0x0, 0x2b8(%rdi) movb $0x0, 0x2c0(%rdi) movq 0x8(%rsp), %rax movq 0x1a70(%rax), %rax movq %rax, 0x2c8(%rdi) movq 0x8(%rsp), %rax movq 0x1a68(%rax), %rax movq %rax, 0x2d0(%rdi) movq $0x0, 0x2d8(%rdi) movq $0x0, 0x2e0(%rdi) movq $0x0, 0x2e8(%rdi) movq $0x0, 0x2f0(%rdi) movl $0x0, 0x2f8(%rdi) movl $0x0, 0x2fc(%rdi) addq $0x300, %rdi # imm = 0x300 callq 0x206d70 movq (%rsp), %rdi movq $0x0, 0x308(%rdi) movq $0x0, 0x310(%rdi) addq $0x318, %rdi # imm = 0x318 callq 0x211fa0 movq (%rsp), %rdi movq $0x0, 0x330(%rdi) movl $0x0, 0x338(%rdi) movb $0x0, 0x33c(%rdi) movq $0x0, 0x340(%rdi) movq $0x0, 0x348(%rdi) addq $0x350, %rdi # imm = 0x350 callq 0x216570 movq (%rsp), %rdi movb $0x0, 0x380(%rdi) movl $0x1, 0x384(%rdi) addq $0x388, %rdi # imm = 0x388 callq 0x205dd0 movq (%rsp), %rdi addq $0x3a0, %rdi # imm = 0x3A0 callq 0x2129e0 movq (%rsp), %rdi addq $0x3b8, %rdi # imm = 0x3B8 callq 0x1f5340 movq (%rsp), %rdi addq $0x3d0, %rdi # imm = 0x3D0 callq 0x1ef030 movq (%rsp), %rax movq $0x0, 0x3d8(%rax) movq $0x0, 0x3e0(%rax) addq $0x18, %rsp retq nop
_ZN13llama_contextC2ERK11llama_model: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rdi, [rsp+18h+var_8] mov [rsp+18h+var_18], rdi mov rax, [rsp+18h+var_10] mov [rdi], rax add rdi, 60h ; '`'; this call __ZN12llama_sbatchC2Ev; llama_sbatch::llama_sbatch(void) mov rdi, [rsp+18h+var_18] add rdi, 158h; this call __ZN14llama_kv_cacheC2Ev; llama_kv_cache::llama_kv_cache(void) mov rdi, [rsp+18h+var_18] add rdi, 1F0h; this call __ZN18llama_adapter_cvecC2Ev; llama_adapter_cvec::llama_adapter_cvec(void) mov rdi, [rsp+18h+var_18] add rdi, 240h call __ZNSt13unordered_mapIP18llama_adapter_lorafSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_fEEEC2Ev; std::unordered_map<llama_adapter_lora *,float>::unordered_map(void) mov rdi, [rsp+18h+var_18] add rdi, 278h call __ZNSt6vectorISt10unique_ptrI12ggml_backend20ggml_backend_deleterESaIS3_EEC2Ev; std::vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>>::vector(void) mov rdi, [rsp+18h+var_18] add rdi, 290h call __ZNSt6vectorISt4pairIP12ggml_backendPFvS2_iEESaIS5_EEC2Ev; std::vector<std::pair<ggml_backend *,void (*)(ggml_backend *,int)>>::vector(void) mov rdi, [rsp+18h+var_18] mov qword ptr [rdi+2A8h], 0 mov qword ptr [rdi+2B0h], 0 mov qword ptr [rdi+2B8h], 0 mov byte ptr [rdi+2C0h], 0 mov rax, [rsp+18h+var_10] mov rax, [rax+1A70h] mov [rdi+2C8h], rax mov rax, [rsp+18h+var_10] mov rax, [rax+1A68h] mov [rdi+2D0h], rax mov qword ptr [rdi+2D8h], 0 mov qword ptr [rdi+2E0h], 0 mov qword ptr [rdi+2E8h], 0 mov qword ptr [rdi+2F0h], 0 mov dword ptr [rdi+2F8h], 0 mov dword ptr [rdi+2FCh], 0 add rdi, 300h call __ZNSt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterEC2IS1_vEEv; std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::unique_ptr<ggml_backend_buffer_deleter,void>(void) mov rdi, [rsp+18h+var_18] mov qword ptr [rdi+308h], 0 mov qword ptr [rdi+310h], 0 add rdi, 318h call __ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rdi, [rsp+18h+var_18] mov qword ptr [rdi+330h], 0 mov dword ptr [rdi+338h], 0 mov byte ptr [rdi+33Ch], 0 mov qword ptr [rdi+340h], 0 mov qword ptr [rdi+348h], 0 add rdi, 350h call __ZNSt3mapIiSt6vectorIfSaIfEESt4lessIiESaISt4pairIKiS2_EEEC2Ev; std::map<int,std::vector<float>>::map(void) mov rdi, [rsp+18h+var_18] mov byte ptr [rdi+380h], 0 mov dword ptr [rdi+384h], 1 add rdi, 388h call __ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void) mov rdi, [rsp+18h+var_18] add rdi, 3A0h call __ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EEC2Ev; std::vector<std::set<int>>::vector(void) mov rdi, [rsp+18h+var_18] add rdi, 3B8h call __ZNSt6vectorIhSaIhEEC2Ev; std::vector<uchar>::vector(void) mov rdi, [rsp+18h+var_18] add rdi, 3D0h call __ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterEC2IS1_vEEv; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::unique_ptr<ggml_backend_sched_deleter,void>(void) mov rax, [rsp+18h+var_18] mov qword ptr [rax+3D8h], 0 mov qword ptr [rax+3E0h], 0 add rsp, 18h retn
void llama_context::llama_context(llama_context *this, const llama_model *a2) { *(_QWORD *)this = a2; llama_sbatch::llama_sbatch((llama_context *)((char *)this + 96)); llama_kv_cache::llama_kv_cache((llama_context *)((char *)this + 344)); llama_adapter_cvec::llama_adapter_cvec((llama_context *)((char *)this + 496)); std::unordered_map<llama_adapter_lora *,float>::unordered_map((char *)this + 576); std::vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>>::vector((char *)this + 632); std::vector<std::pair<ggml_backend *,void (*)(ggml_backend *,int)>>::vector((char *)this + 656); *((_QWORD *)this + 85) = 0LL; *((_QWORD *)this + 86) = 0LL; *((_QWORD *)this + 87) = 0LL; *((_BYTE *)this + 704) = 0; *((_QWORD *)this + 89) = *((_QWORD *)a2 + 846); *((_QWORD *)this + 90) = *((_QWORD *)a2 + 845); *((_QWORD *)this + 91) = 0LL; *((_QWORD *)this + 92) = 0LL; *((_QWORD *)this + 93) = 0LL; *((_QWORD *)this + 94) = 0LL; *((_DWORD *)this + 190) = 0; *((_DWORD *)this + 191) = 0; std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::unique_ptr<ggml_backend_buffer_deleter,void>((char *)this + 768); *((_QWORD *)this + 97) = 0LL; *((_QWORD *)this + 98) = 0LL; std::vector<int>::vector((char *)this + 792); *((_QWORD *)this + 102) = 0LL; *((_DWORD *)this + 206) = 0; *((_BYTE *)this + 828) = 0; *((_QWORD *)this + 104) = 0LL; *((_QWORD *)this + 105) = 0LL; std::map<int,std::vector<float>>::map((char *)this + 848); *((_BYTE *)this + 896) = 0; *((_DWORD *)this + 225) = 1; std::vector<float>::vector((char *)this + 904); std::vector<std::set<int>>::vector((char *)this + 928); std::vector<unsigned char>::vector((char *)this + 952); std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::unique_ptr<ggml_backend_sched_deleter,void>((char *)this + 976); *((_QWORD *)this + 123) = 0LL; *((_QWORD *)this + 124) = 0LL; }
38,814
llama_context::llama_context(llama_model const&)
monkey531[P]llama/src/llama-context.h
llama_context(const llama_model & model) : model(model) , t_start_us(model.t_start_us) , t_load_us(model.t_load_us) {}
O1
c
llama_context::llama_context(llama_model const&): pushq %rbx movq %rdi, %rbx addq $0x3d0, %rdi # imm = 0x3D0 callq 0x6b970 movq 0x3b8(%rbx), %rdi testq %rdi, %rdi je 0xa1c8f movq 0x3c8(%rbx), %rsi subq %rdi, %rsi callq 0x69220 leaq 0x3a0(%rbx), %rdi callq 0x69b60 movq 0x388(%rbx), %rdi testq %rdi, %rdi je 0xa1cb6 movq 0x398(%rbx), %rsi subq %rdi, %rsi callq 0x69220 leaq 0x350(%rbx), %rdi callq 0x68dc0 movq 0x318(%rbx), %rdi testq %rdi, %rdi je 0xa1cdd movq 0x328(%rbx), %rsi subq %rdi, %rsi callq 0x69220 leaq 0x300(%rbx), %rdi callq 0x6b560 movq 0x290(%rbx), %rdi testq %rdi, %rdi je 0xa1d04 movq 0x2a0(%rbx), %rsi subq %rdi, %rsi callq 0x69220 leaq 0x278(%rbx), %rdi callq 0x653b0 leaq 0x240(%rbx), %rdi callq 0x66940 movq 0x228(%rbx), %rdi testq %rdi, %rdi je 0xa1d37 movq 0x238(%rbx), %rsi subq %rdi, %rsi callq 0x69220 leaq 0x210(%rbx), %rdi callq 0x69040 leaq 0x1f8(%rbx), %rdi callq 0x67e90 leaq 0x1d8(%rbx), %rdi callq 0x69040 leaq 0x1c0(%rbx), %rdi callq 0x67e90 movq 0x1a8(%rbx), %rdi testq %rdi, %rdi je 0xa1d82 movq 0x1b8(%rbx), %rsi subq %rdi, %rsi callq 0x69220 movq 0x190(%rbx), %rdi testq %rdi, %rdi je 0xa1d9d movq 0x1a0(%rbx), %rsi subq %rdi, %rsi callq 0x69220 leaq 0x178(%rbx), %rdi callq 0x66d10 addq $0x60, %rbx movq %rbx, %rdi popq %rbx jmp 0x69900
_ZN13llama_contextD2Ev: push rbx mov rbx, rdi add rdi, 3D0h call __ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterED2Ev; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr() mov rdi, [rbx+3B8h]; void * test rdi, rdi jz short loc_A1C8F mov rsi, [rbx+3C8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1C8F: lea rdi, [rbx+3A0h] call __ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EED2Ev; std::vector<std::set<int>>::~vector() mov rdi, [rbx+388h]; void * test rdi, rdi jz short loc_A1CB6 mov rsi, [rbx+398h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1CB6: lea rdi, [rbx+350h] call __ZNSt8_Rb_treeIiSt4pairIKiSt6vectorIfSaIfEEESt10_Select1stIS5_ESt4lessIiESaIS5_EED2Ev; std::_Rb_tree<int,std::pair<int const,std::vector<float>>,std::_Select1st<std::pair<int const,std::vector<float>>>,std::less<int>,std::allocator<std::pair<int const,std::vector<float>>>>::~_Rb_tree() mov rdi, [rbx+318h]; void * test rdi, rdi jz short loc_A1CDD mov rsi, [rbx+328h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1CDD: lea rdi, [rbx+300h] call __ZNSt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterED2Ev; std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::~unique_ptr() mov rdi, [rbx+290h]; void * test rdi, rdi jz short loc_A1D04 mov rsi, [rbx+2A0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1D04: lea rdi, [rbx+278h] call __ZNSt6vectorISt10unique_ptrI12ggml_backend20ggml_backend_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>>::~vector() lea rdi, [rbx+240h] call __ZNSt10_HashtableIP18llama_adapter_loraSt4pairIKS1_fESaIS4_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<llama_adapter_lora *,std::pair<llama_adapter_lora * const,float>,std::allocator<std::pair<llama_adapter_lora * const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora *>,std::hash<llama_adapter_lora *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, [rbx+228h]; void * test rdi, rdi jz short loc_A1D37 mov rsi, [rbx+238h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1D37: lea rdi, [rbx+210h] call __ZNSt6vectorISt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector() lea rdi, [rbx+1F8h] call __ZNSt6vectorISt10unique_ptrI12ggml_context20ggml_context_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector() lea rdi, [rbx+1D8h] call __ZNSt6vectorISt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector() lea rdi, [rbx+1C0h] call __ZNSt6vectorISt10unique_ptrI12ggml_context20ggml_context_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector() mov rdi, [rbx+1A8h]; void * test rdi, rdi jz short loc_A1D82 mov rsi, [rbx+1B8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1D82: mov rdi, [rbx+190h]; void * test rdi, rdi jz short loc_A1D9D mov rsi, [rbx+1A0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1D9D: lea rdi, [rbx+178h] call __ZNSt6vectorI13llama_kv_cellSaIS0_EED2Ev; std::vector<llama_kv_cell>::~vector() add rbx, 60h ; '`' mov rdi, rbx; this pop rbx jmp __ZN12llama_sbatchD2Ev; llama_sbatch::~llama_sbatch()
void llama_context::~llama_context(llama_context *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi void *v5; // rdi void *v6; // rdi void *v7; // rdi void *v8; // rdi std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr((char *)this + 976); v2 = (void *)*((_QWORD *)this + 119); if ( v2 ) operator delete(v2, *((_QWORD *)this + 121) - (_QWORD)v2); std::vector<std::set<int>>::~vector((char *)this + 928); v3 = (void *)*((_QWORD *)this + 113); if ( v3 ) operator delete(v3, *((_QWORD *)this + 115) - (_QWORD)v3); std::_Rb_tree<int,std::pair<int const,std::vector<float>>,std::_Select1st<std::pair<int const,std::vector<float>>>,std::less<int>,std::allocator<std::pair<int const,std::vector<float>>>>::~_Rb_tree((char *)this + 848); v4 = (void *)*((_QWORD *)this + 99); if ( v4 ) operator delete(v4, *((_QWORD *)this + 101) - (_QWORD)v4); std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::~unique_ptr((char *)this + 768); v5 = (void *)*((_QWORD *)this + 82); if ( v5 ) operator delete(v5, *((_QWORD *)this + 84) - (_QWORD)v5); std::vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>>::~vector((char *)this + 632); std::_Hashtable<llama_adapter_lora *,std::pair<llama_adapter_lora * const,float>,std::allocator<std::pair<llama_adapter_lora * const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora *>,std::hash<llama_adapter_lora *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((char *)this + 576); v6 = (void *)*((_QWORD *)this + 69); if ( v6 ) operator delete(v6, *((_QWORD *)this + 71) - (_QWORD)v6); std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector((char *)this + 528); std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector((char *)this + 504); std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector((char *)this + 472); std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector((char *)this + 448); v7 = (void *)*((_QWORD *)this + 53); if ( v7 ) operator delete(v7, *((_QWORD *)this + 55) - (_QWORD)v7); v8 = (void *)*((_QWORD *)this + 50); if ( v8 ) operator delete(v8, *((_QWORD *)this + 52) - (_QWORD)v8); std::vector<llama_kv_cell>::~vector((char *)this + 376); llama_sbatch::~llama_sbatch((llama_context *)((char *)this + 96)); }
~llama_context: PUSH RBX MOV RBX,RDI ADD RDI,0x3d0 CALL 0x0016b970 MOV RDI,qword ptr [RBX + 0x3b8] TEST RDI,RDI JZ 0x001a1c8f MOV RSI,qword ptr [RBX + 0x3c8] SUB RSI,RDI CALL 0x00169220 LAB_001a1c8f: LEA RDI,[RBX + 0x3a0] CALL 0x00169b60 MOV RDI,qword ptr [RBX + 0x388] TEST RDI,RDI JZ 0x001a1cb6 MOV RSI,qword ptr [RBX + 0x398] SUB RSI,RDI CALL 0x00169220 LAB_001a1cb6: LEA RDI,[RBX + 0x350] CALL 0x00168dc0 MOV RDI,qword ptr [RBX + 0x318] TEST RDI,RDI JZ 0x001a1cdd MOV RSI,qword ptr [RBX + 0x328] SUB RSI,RDI CALL 0x00169220 LAB_001a1cdd: LEA RDI,[RBX + 0x300] CALL 0x0016b560 MOV RDI,qword ptr [RBX + 0x290] TEST RDI,RDI JZ 0x001a1d04 MOV RSI,qword ptr [RBX + 0x2a0] SUB RSI,RDI CALL 0x00169220 LAB_001a1d04: LEA RDI,[RBX + 0x278] CALL 0x001653b0 LEA RDI,[RBX + 0x240] CALL 0x00166940 MOV RDI,qword ptr [RBX + 0x228] TEST RDI,RDI JZ 0x001a1d37 MOV RSI,qword ptr [RBX + 0x238] SUB RSI,RDI CALL 0x00169220 LAB_001a1d37: LEA RDI,[RBX + 0x210] CALL 0x00169040 LEA RDI,[RBX + 0x1f8] CALL 0x00167e90 LEA RDI,[RBX + 0x1d8] CALL 0x00169040 LEA RDI,[RBX + 0x1c0] CALL 0x00167e90 MOV RDI,qword ptr [RBX + 0x1a8] TEST RDI,RDI JZ 0x001a1d82 MOV RSI,qword ptr [RBX + 0x1b8] SUB RSI,RDI CALL 0x00169220 LAB_001a1d82: MOV RDI,qword ptr [RBX + 0x190] TEST RDI,RDI JZ 0x001a1d9d MOV RSI,qword ptr [RBX + 0x1a0] SUB RSI,RDI CALL 0x00169220 LAB_001a1d9d: LEA RDI,[RBX + 0x178] CALL 0x00166d10 ADD RBX,0x60 MOV RDI,RBX POP RBX JMP 0x00169900
/* llama_context::~llama_context() */ void __thiscall llama_context::~llama_context(llama_context *this) { void *pvVar1; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr ((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0x3d0)); pvVar1 = *(void **)(this + 0x3b8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x3c8) - (long)pvVar1); } std:: vector<std::set<int,std::less<int>,std::allocator<int>>,std::allocator<std::set<int,std::less<int>,std::allocator<int>>>> ::~vector((vector<std::set<int,std::less<int>,std::allocator<int>>,std::allocator<std::set<int,std::less<int>,std::allocator<int>>>> *)(this + 0x3a0)); pvVar1 = *(void **)(this + 0x388); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x398) - (long)pvVar1); } std:: _Rb_tree<int,std::pair<int_const,std::vector<float,std::allocator<float>>>,std::_Select1st<std::pair<int_const,std::vector<float,std::allocator<float>>>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<float,std::allocator<float>>>>> ::~_Rb_tree((_Rb_tree<int,std::pair<int_const,std::vector<float,std::allocator<float>>>,std::_Select1st<std::pair<int_const,std::vector<float,std::allocator<float>>>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<float,std::allocator<float>>>>> *)(this + 0x350)); pvVar1 = *(void **)(this + 0x318); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x328) - (long)pvVar1); } std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::~unique_ptr ((unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter> *)(this + 0x300)); pvVar1 = *(void **)(this + 0x290); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x2a0) - (long)pvVar1); } std:: vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>,std::allocator<std::unique_ptr<ggml_backend,ggml_backend_deleter>>> ::~vector((vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>,std::allocator<std::unique_ptr<ggml_backend,ggml_backend_deleter>>> *)(this + 0x278)); std:: _Hashtable<llama_adapter_lora*,std::pair<llama_adapter_lora*const,float>,std::allocator<std::pair<llama_adapter_lora*const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora*>,std::hash<llama_adapter_lora*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<llama_adapter_lora*,std::pair<llama_adapter_lora*const,float>,std::allocator<std::pair<llama_adapter_lora*const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora*>,std::hash<llama_adapter_lora*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(this + 0x240)); pvVar1 = *(void **)(this + 0x228); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x238) - (long)pvVar1); } std:: vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> ::~vector((vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> *)(this + 0x210)); std:: vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> ::~vector((vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> *)(this + 0x1f8)); std:: vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> ::~vector((vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> *)(this + 0x1d8)); std:: vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> ::~vector((vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> *)(this + 0x1c0)); pvVar1 = *(void **)(this + 0x1a8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x1b8) - (long)pvVar1); } pvVar1 = *(void **)(this + 400); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x1a0) - (long)pvVar1); } std::vector<llama_kv_cell,std::allocator<llama_kv_cell>>::~vector ((vector<llama_kv_cell,std::allocator<llama_kv_cell>> *)(this + 0x178)); llama_sbatch::~llama_sbatch((llama_sbatch *)(this + 0x60)); return; }
38,815
llama_context::llama_context(llama_model const&)
monkey531[P]llama/src/llama-context.h
llama_context(const llama_model & model) : model(model) , t_start_us(model.t_start_us) , t_load_us(model.t_load_us) {}
O3
c
llama_context::llama_context(llama_model const&): pushq %rbx movq %rdi, %rbx addq $0x3d0, %rdi # imm = 0x3D0 callq 0x6a900 movq 0x3b8(%rbx), %rdi testq %rdi, %rdi je 0x9fe4f movq 0x3c8(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 leaq 0x3a0(%rbx), %rdi callq 0x68af0 movq 0x388(%rbx), %rdi testq %rdi, %rdi je 0x9fe76 movq 0x398(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 leaq 0x350(%rbx), %rdi callq 0x67d40 movq 0x318(%rbx), %rdi testq %rdi, %rdi je 0x9fe9d movq 0x328(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 leaq 0x300(%rbx), %rdi callq 0x6a4f0 movq 0x290(%rbx), %rdi testq %rdi, %rdi je 0x9fec4 movq 0x2a0(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 leaq 0x278(%rbx), %rdi callq 0x643a0 leaq 0x240(%rbx), %rdi callq 0x65910 movq 0x228(%rbx), %rdi testq %rdi, %rdi je 0x9fef7 movq 0x238(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 leaq 0x210(%rbx), %rdi callq 0x67fc0 leaq 0x1f8(%rbx), %rdi callq 0x66e10 leaq 0x1d8(%rbx), %rdi callq 0x67fc0 leaq 0x1c0(%rbx), %rdi callq 0x66e10 movq 0x1a8(%rbx), %rdi testq %rdi, %rdi je 0x9ff42 movq 0x1b8(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 movq 0x190(%rbx), %rdi testq %rdi, %rdi je 0x9ff5d movq 0x1a0(%rbx), %rsi subq %rdi, %rsi callq 0x681a0 leaq 0x178(%rbx), %rdi callq 0x65ce0 addq $0x60, %rbx movq %rbx, %rdi popq %rbx jmp 0x68890
_ZN13llama_contextD2Ev: push rbx mov rbx, rdi add rdi, 3D0h call __ZNSt10unique_ptrI18ggml_backend_sched26ggml_backend_sched_deleterED2Ev; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr() mov rdi, [rbx+3B8h]; void * test rdi, rdi jz short loc_9FE4F mov rsi, [rbx+3C8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FE4F: lea rdi, [rbx+3A0h] call __ZNSt6vectorISt3setIiSt4lessIiESaIiEESaIS4_EED2Ev; std::vector<std::set<int>>::~vector() mov rdi, [rbx+388h]; void * test rdi, rdi jz short loc_9FE76 mov rsi, [rbx+398h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FE76: lea rdi, [rbx+350h] call __ZNSt8_Rb_treeIiSt4pairIKiSt6vectorIfSaIfEEESt10_Select1stIS5_ESt4lessIiESaIS5_EED2Ev; std::_Rb_tree<int,std::pair<int const,std::vector<float>>,std::_Select1st<std::pair<int const,std::vector<float>>>,std::less<int>,std::allocator<std::pair<int const,std::vector<float>>>>::~_Rb_tree() mov rdi, [rbx+318h]; void * test rdi, rdi jz short loc_9FE9D mov rsi, [rbx+328h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FE9D: lea rdi, [rbx+300h] call __ZNSt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterED2Ev; std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::~unique_ptr() mov rdi, [rbx+290h]; void * test rdi, rdi jz short loc_9FEC4 mov rsi, [rbx+2A0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FEC4: lea rdi, [rbx+278h] call __ZNSt6vectorISt10unique_ptrI12ggml_backend20ggml_backend_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>>::~vector() lea rdi, [rbx+240h] call __ZNSt10_HashtableIP18llama_adapter_loraSt4pairIKS1_fESaIS4_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<llama_adapter_lora *,std::pair<llama_adapter_lora * const,float>,std::allocator<std::pair<llama_adapter_lora * const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora *>,std::hash<llama_adapter_lora *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, [rbx+228h]; void * test rdi, rdi jz short loc_9FEF7 mov rsi, [rbx+238h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FEF7: lea rdi, [rbx+210h] call __ZNSt6vectorISt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector() lea rdi, [rbx+1F8h] call __ZNSt6vectorISt10unique_ptrI12ggml_context20ggml_context_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector() lea rdi, [rbx+1D8h] call __ZNSt6vectorISt10unique_ptrI19ggml_backend_buffer27ggml_backend_buffer_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector() lea rdi, [rbx+1C0h] call __ZNSt6vectorISt10unique_ptrI12ggml_context20ggml_context_deleterESaIS3_EED2Ev; std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector() mov rdi, [rbx+1A8h]; void * test rdi, rdi jz short loc_9FF42 mov rsi, [rbx+1B8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FF42: mov rdi, [rbx+190h]; void * test rdi, rdi jz short loc_9FF5D mov rsi, [rbx+1A0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9FF5D: lea rdi, [rbx+178h] call __ZNSt6vectorI13llama_kv_cellSaIS0_EED2Ev; std::vector<llama_kv_cell>::~vector() add rbx, 60h ; '`' mov rdi, rbx; this pop rbx jmp __ZN12llama_sbatchD2Ev; llama_sbatch::~llama_sbatch()
void llama_context::~llama_context(llama_context *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi void *v5; // rdi void *v6; // rdi void *v7; // rdi void *v8; // rdi std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr((char *)this + 976); v2 = (void *)*((_QWORD *)this + 119); if ( v2 ) operator delete(v2, *((_QWORD *)this + 121) - (_QWORD)v2); std::vector<std::set<int>>::~vector((char *)this + 928); v3 = (void *)*((_QWORD *)this + 113); if ( v3 ) operator delete(v3, *((_QWORD *)this + 115) - (_QWORD)v3); std::_Rb_tree<int,std::pair<int const,std::vector<float>>,std::_Select1st<std::pair<int const,std::vector<float>>>,std::less<int>,std::allocator<std::pair<int const,std::vector<float>>>>::~_Rb_tree((char *)this + 848); v4 = (void *)*((_QWORD *)this + 99); if ( v4 ) operator delete(v4, *((_QWORD *)this + 101) - (_QWORD)v4); std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::~unique_ptr((char *)this + 768); v5 = (void *)*((_QWORD *)this + 82); if ( v5 ) operator delete(v5, *((_QWORD *)this + 84) - (_QWORD)v5); std::vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>>::~vector((char *)this + 632); std::_Hashtable<llama_adapter_lora *,std::pair<llama_adapter_lora * const,float>,std::allocator<std::pair<llama_adapter_lora * const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora *>,std::hash<llama_adapter_lora *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((char *)this + 576); v6 = (void *)*((_QWORD *)this + 69); if ( v6 ) operator delete(v6, *((_QWORD *)this + 71) - (_QWORD)v6); std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector((char *)this + 528); std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector((char *)this + 504); std::vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>::~vector((char *)this + 472); std::vector<std::unique_ptr<ggml_context,ggml_context_deleter>>::~vector((char *)this + 448); v7 = (void *)*((_QWORD *)this + 53); if ( v7 ) operator delete(v7, *((_QWORD *)this + 55) - (_QWORD)v7); v8 = (void *)*((_QWORD *)this + 50); if ( v8 ) operator delete(v8, *((_QWORD *)this + 52) - (_QWORD)v8); std::vector<llama_kv_cell>::~vector((char *)this + 376); llama_sbatch::~llama_sbatch((llama_context *)((char *)this + 96)); }
~llama_context: PUSH RBX MOV RBX,RDI ADD RDI,0x3d0 CALL 0x0016a900 MOV RDI,qword ptr [RBX + 0x3b8] TEST RDI,RDI JZ 0x0019fe4f MOV RSI,qword ptr [RBX + 0x3c8] SUB RSI,RDI CALL 0x001681a0 LAB_0019fe4f: LEA RDI,[RBX + 0x3a0] CALL 0x00168af0 MOV RDI,qword ptr [RBX + 0x388] TEST RDI,RDI JZ 0x0019fe76 MOV RSI,qword ptr [RBX + 0x398] SUB RSI,RDI CALL 0x001681a0 LAB_0019fe76: LEA RDI,[RBX + 0x350] CALL 0x00167d40 MOV RDI,qword ptr [RBX + 0x318] TEST RDI,RDI JZ 0x0019fe9d MOV RSI,qword ptr [RBX + 0x328] SUB RSI,RDI CALL 0x001681a0 LAB_0019fe9d: LEA RDI,[RBX + 0x300] CALL 0x0016a4f0 MOV RDI,qword ptr [RBX + 0x290] TEST RDI,RDI JZ 0x0019fec4 MOV RSI,qword ptr [RBX + 0x2a0] SUB RSI,RDI CALL 0x001681a0 LAB_0019fec4: LEA RDI,[RBX + 0x278] CALL 0x001643a0 LEA RDI,[RBX + 0x240] CALL 0x00165910 MOV RDI,qword ptr [RBX + 0x228] TEST RDI,RDI JZ 0x0019fef7 MOV RSI,qword ptr [RBX + 0x238] SUB RSI,RDI CALL 0x001681a0 LAB_0019fef7: LEA RDI,[RBX + 0x210] CALL 0x00167fc0 LEA RDI,[RBX + 0x1f8] CALL 0x00166e10 LEA RDI,[RBX + 0x1d8] CALL 0x00167fc0 LEA RDI,[RBX + 0x1c0] CALL 0x00166e10 MOV RDI,qword ptr [RBX + 0x1a8] TEST RDI,RDI JZ 0x0019ff42 MOV RSI,qword ptr [RBX + 0x1b8] SUB RSI,RDI CALL 0x001681a0 LAB_0019ff42: MOV RDI,qword ptr [RBX + 0x190] TEST RDI,RDI JZ 0x0019ff5d MOV RSI,qword ptr [RBX + 0x1a0] SUB RSI,RDI CALL 0x001681a0 LAB_0019ff5d: LEA RDI,[RBX + 0x178] CALL 0x00165ce0 ADD RBX,0x60 MOV RDI,RBX POP RBX JMP 0x00168890
/* llama_context::~llama_context() */ void __thiscall llama_context::~llama_context(llama_context *this) { void *pvVar1; std::unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter>::~unique_ptr ((unique_ptr<ggml_backend_sched,ggml_backend_sched_deleter> *)(this + 0x3d0)); pvVar1 = *(void **)(this + 0x3b8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x3c8) - (long)pvVar1); } std:: vector<std::set<int,std::less<int>,std::allocator<int>>,std::allocator<std::set<int,std::less<int>,std::allocator<int>>>> ::~vector((vector<std::set<int,std::less<int>,std::allocator<int>>,std::allocator<std::set<int,std::less<int>,std::allocator<int>>>> *)(this + 0x3a0)); pvVar1 = *(void **)(this + 0x388); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x398) - (long)pvVar1); } std:: _Rb_tree<int,std::pair<int_const,std::vector<float,std::allocator<float>>>,std::_Select1st<std::pair<int_const,std::vector<float,std::allocator<float>>>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<float,std::allocator<float>>>>> ::~_Rb_tree((_Rb_tree<int,std::pair<int_const,std::vector<float,std::allocator<float>>>,std::_Select1st<std::pair<int_const,std::vector<float,std::allocator<float>>>>,std::less<int>,std::allocator<std::pair<int_const,std::vector<float,std::allocator<float>>>>> *)(this + 0x350)); pvVar1 = *(void **)(this + 0x318); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x328) - (long)pvVar1); } std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>::~unique_ptr ((unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter> *)(this + 0x300)); pvVar1 = *(void **)(this + 0x290); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x2a0) - (long)pvVar1); } std:: vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>,std::allocator<std::unique_ptr<ggml_backend,ggml_backend_deleter>>> ::~vector((vector<std::unique_ptr<ggml_backend,ggml_backend_deleter>,std::allocator<std::unique_ptr<ggml_backend,ggml_backend_deleter>>> *)(this + 0x278)); std:: _Hashtable<llama_adapter_lora*,std::pair<llama_adapter_lora*const,float>,std::allocator<std::pair<llama_adapter_lora*const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora*>,std::hash<llama_adapter_lora*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<llama_adapter_lora*,std::pair<llama_adapter_lora*const,float>,std::allocator<std::pair<llama_adapter_lora*const,float>>,std::__detail::_Select1st,std::equal_to<llama_adapter_lora*>,std::hash<llama_adapter_lora*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(this + 0x240)); pvVar1 = *(void **)(this + 0x228); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x238) - (long)pvVar1); } std:: vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> ::~vector((vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> *)(this + 0x210)); std:: vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> ::~vector((vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> *)(this + 0x1f8)); std:: vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> ::~vector((vector<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>,std::allocator<std::unique_ptr<ggml_backend_buffer,ggml_backend_buffer_deleter>>> *)(this + 0x1d8)); std:: vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> ::~vector((vector<std::unique_ptr<ggml_context,ggml_context_deleter>,std::allocator<std::unique_ptr<ggml_context,ggml_context_deleter>>> *)(this + 0x1c0)); pvVar1 = *(void **)(this + 0x1a8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x1b8) - (long)pvVar1); } pvVar1 = *(void **)(this + 400); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x1a0) - (long)pvVar1); } std::vector<llama_kv_cell,std::allocator<llama_kv_cell>>::~vector ((vector<llama_kv_cell,std::allocator<llama_kv_cell>> *)(this + 0x178)); llama_sbatch::~llama_sbatch((llama_sbatch *)(this + 0x60)); return; }
38,816
js_worker_set_onmessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_set_onmessage(JSContext *ctx, JSValue this_val, JSValue func) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessageHandler *port; if (!worker) return JS_EXCEPTION; port = worker->msg_handler; if (JS_IsNull(func)) { if (port) { js_free_port(rt, port); worker->msg_handler = NULL; } } else { if (!JS_IsFunction(ctx, func)) return JS_ThrowTypeError(ctx, "not a function"); if (!port) { port = js_mallocz(ctx, sizeof(*port)); if (!port) return JS_EXCEPTION; port->recv_pipe = js_dup_message_pipe(worker->recv_pipe); port->on_message_func = JS_NULL; list_add_tail(&port->link, &ts->port_list); worker->msg_handler = port; } JS_FreeValue(ctx, port->on_message_func); port->on_message_func = JS_DupValue(ctx, func); } return JS_UNDEFINED; }
O0
c
js_worker_set_onmessage: subq $0x88, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x58(%rsp) movq %r8, 0x60(%rsp) movq %rdi, 0x50(%rsp) movq 0x50(%rsp), %rdi callq 0x26c40 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi callq 0x10310 movq %rax, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movl 0x7c(%rax), %ecx movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x370f0 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x16290 movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x16429 movq 0x38(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x30(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x15560 cmpl $0x0, %eax je 0x162db cmpq $0x0, 0x30(%rsp) je 0x162d6 movq 0x48(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x15d30 movq 0x38(%rsp), %rax movq $0x0, 0x10(%rax) jmp 0x16415 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x2d250 cmpl $0x0, %eax jne 0x16319 movq 0x50(%rsp), %rdi leaq 0xf78c4(%rip), %rsi # 0x10dbc4 movb $0x0, %al callq 0x2c040 movq %rax, 0x78(%rsp) movq %rdx, 0x80(%rsp) jmp 0x16429 cmpq $0x0, 0x30(%rsp) jne 0x163bc movq 0x50(%rsp), %rdi movl $0x28, %esi callq 0x20a70 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x1635a movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x16429 movq 0x38(%rsp), %rax movq (%rax), %rdi callq 0x164e0 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x30(%rsp), %rax movl $0x0, 0x20(%rsp) movq $0x2, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x30(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x30, %rsi callq 0x16460 movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rax movq 0x18(%rax), %rsi movq 0x20(%rax), %rdx callq 0x229d0 movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x203d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x20(%rax) movl $0x0, 0x78(%rsp) movq $0x3, 0x80(%rsp) movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nop
js_worker_set_onmessage: sub rsp, 88h mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_30], rcx mov [rsp+88h+var_28], r8 mov [rsp+88h+var_38], rdi mov rdi, [rsp+88h+var_38] call JS_GetRuntime mov [rsp+88h+var_40], rax mov rdi, [rsp+88h+var_40] call js_get_thread_state mov [rsp+88h+var_48], rax mov rdi, [rsp+88h+var_38] mov rax, [rsp+88h+var_48] mov ecx, [rax+7Ch] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_GetOpaque2 mov [rsp+88h+var_50], rax cmp [rsp+88h+var_50], 0 jnz short loc_16290 mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp loc_16429 loc_16290: mov rax, [rsp+88h+var_50] mov rax, [rax+10h] mov [rsp+88h+var_58], rax mov rdi, [rsp+88h+var_30] mov rsi, [rsp+88h+var_28] call JS_IsNull cmp eax, 0 jz short loc_162DB cmp [rsp+88h+var_58], 0 jz short loc_162D6 mov rdi, [rsp+88h+var_40] mov rsi, [rsp+88h+var_58] call js_free_port mov rax, [rsp+88h+var_50] mov qword ptr [rax+10h], 0 loc_162D6: jmp loc_16415 loc_162DB: mov rdi, [rsp+88h+var_38] mov rsi, [rsp+88h+var_30] mov rdx, [rsp+88h+var_28] call JS_IsFunction cmp eax, 0 jnz short loc_16319 mov rdi, [rsp+88h+var_38] lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov al, 0 call JS_ThrowTypeError mov [rsp+88h+var_10], rax mov [rsp+88h+var_8], rdx jmp loc_16429 loc_16319: cmp [rsp+88h+var_58], 0 jnz loc_163BC mov rdi, [rsp+88h+var_38] mov esi, 28h ; '(' call js_mallocz mov [rsp+88h+var_58], rax cmp [rsp+88h+var_58], 0 jnz short loc_1635A mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp loc_16429 loc_1635A: mov rax, [rsp+88h+var_50] mov rdi, [rax] call js_dup_message_pipe mov rcx, rax mov rax, [rsp+88h+var_58] mov [rax+10h], rcx mov rax, [rsp+88h+var_58] mov dword ptr [rsp+88h+var_68], 0 mov [rsp+88h+var_60], 2 mov rcx, [rsp+88h+var_68] mov [rax+18h], rcx mov rcx, [rsp+88h+var_60] mov [rax+20h], rcx mov rdi, [rsp+88h+var_58] mov rsi, [rsp+88h+var_48] add rsi, 30h ; '0' call list_add_tail mov rcx, [rsp+88h+var_58] mov rax, [rsp+88h+var_50] mov [rax+10h], rcx loc_163BC: mov rdi, [rsp+88h+var_38] mov rax, [rsp+88h+var_58] mov rsi, [rax+18h] mov rdx, [rax+20h] call JS_FreeValue mov rax, [rsp+88h+var_58] mov [rsp+88h+var_80], rax mov rdi, [rsp+88h+var_38] mov rsi, [rsp+88h+var_30] mov rdx, [rsp+88h+var_28] call JS_DupValue mov rcx, rax mov rax, [rsp+88h+var_80] mov [rsp+88h+var_78], rcx mov [rsp+88h+var_70], rdx mov rcx, [rsp+88h+var_78] mov [rax+18h], rcx mov rcx, [rsp+88h+var_70] mov [rax+20h], rcx loc_16415: mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 3 loc_16429: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
long long js_worker_set_onmessage(long long a1, long long a2, long long a3, long long a4, long long a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long v13; // rdx long long v15; // [rsp+20h] [rbp-68h] long long *v16; // [rsp+30h] [rbp-58h] _QWORD *Opaque2; // [rsp+38h] [rbp-50h] long long thread_state; // [rsp+40h] [rbp-48h] long long Runtime; // [rsp+48h] [rbp-40h] long long v23; // [rsp+78h] [rbp-10h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8); Opaque2 = (_QWORD *)JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 124)); if ( Opaque2 ) { v16 = (long long *)Opaque2[2]; if ( JS_IsNull(a4, a5) ) { if ( v16 ) { js_free_port(Runtime, v16); Opaque2[2] = 0LL; } } else { if ( !(unsigned int)JS_IsFunction(a1, a4, a5) ) return JS_ThrowTypeError(a1, (unsigned int)"not a function", v9, v10, v11, v12); if ( !v16 ) { v16 = (long long *)js_mallocz(a1, 40LL); if ( !v16 ) { LODWORD(v23) = 0; return v23; } v16[2] = js_dup_message_pipe(*Opaque2); LODWORD(v15) = 0; v16[3] = v15; v16[4] = 2LL; list_add_tail(v16, thread_state + 48); Opaque2[2] = v16; } JS_FreeValue(a1, v16[3], v16[4]); v16[3] = JS_DupValue(a1, a4, a5); v16[4] = v13; } LODWORD(v23) = 0; return v23; } LODWORD(v23) = 0; return v23; }
js_worker_set_onmessage: SUB RSP,0x88 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x60],R8 MOV qword ptr [RSP + 0x50],RDI MOV RDI,qword ptr [RSP + 0x50] CALL 0x00126c40 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00110310 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RAX + 0x7c] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x001370f0 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x00116290 MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x00116429 LAB_00116290: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x00115560 CMP EAX,0x0 JZ 0x001162db CMP qword ptr [RSP + 0x30],0x0 JZ 0x001162d6 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00115d30 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x10],0x0 LAB_001162d6: JMP 0x00116415 LAB_001162db: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] CALL 0x0012d250 CMP EAX,0x0 JNZ 0x00116319 MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x20dbc4] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RDX JMP 0x00116429 LAB_00116319: CMP qword ptr [RSP + 0x30],0x0 JNZ 0x001163bc MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x28 CALL 0x00120a70 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x0011635a MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x00116429 LAB_0011635a: MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX] CALL 0x001164e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x2 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x20],RCX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x30 CALL 0x00116460 MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x10],RCX LAB_001163bc: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] CALL 0x001203d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RDX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x20],RCX LAB_00116415: MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x3 LAB_00116429: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] js_worker_set_onmessage (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int8 uVar2; long lVar3; int8 *puVar4; int1 auVar5 [16]; uint uStack_64; long local_58; int4 local_10; int4 uStack_c; int8 local_8; uVar2 = JS_GetRuntime(param_1); lVar3 = js_get_thread_state(uVar2); puVar4 = (int8 *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar3 + 0x7c)); if (puVar4 == (int8 *)0x0) { local_10 = 0; local_8 = 6; } else { local_58 = puVar4[2]; iVar1 = JS_IsNull(param_4,param_5); if (iVar1 == 0) { iVar1 = JS_IsFunction(param_1,param_4,param_5); if (iVar1 == 0) { auVar5 = JS_ThrowTypeError(param_1,"not a function"); local_8 = auVar5._8_8_; local_10 = auVar5._0_4_; uStack_c = auVar5._4_4_; goto LAB_00116429; } if (local_58 == 0) { local_58 = js_mallocz(param_1,0x28); if (local_58 == 0) { local_10 = 0; local_8 = 6; goto LAB_00116429; } uVar2 = js_dup_message_pipe(*puVar4); *(int8 *)(local_58 + 0x10) = uVar2; *(ulong *)(local_58 + 0x18) = (ulong)uStack_64 << 0x20; *(int8 *)(local_58 + 0x20) = 2; list_add_tail(local_58,lVar3 + 0x30); puVar4[2] = local_58; } JS_FreeValue(param_1,*(int8 *)(local_58 + 0x18),*(int8 *)(local_58 + 0x20)); auVar5 = JS_DupValue(param_1,param_4,param_5); *(int1 (*) [16])(local_58 + 0x18) = auVar5; } else if (local_58 != 0) { js_free_port(uVar2,local_58); puVar4[2] = 0; } local_10 = 0; local_8 = 3; } LAB_00116429: auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
38,817
js_worker_set_onmessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_set_onmessage(JSContext *ctx, JSValue this_val, JSValue func) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessageHandler *port; if (!worker) return JS_EXCEPTION; port = worker->msg_handler; if (JS_IsNull(func)) { if (port) { js_free_port(rt, port); worker->msg_handler = NULL; } } else { if (!JS_IsFunction(ctx, func)) return JS_ThrowTypeError(ctx, "not a function"); if (!port) { port = js_mallocz(ctx, sizeof(*port)); if (!port) return JS_EXCEPTION; port->recv_pipe = js_dup_message_pipe(worker->recv_pipe); port->on_message_func = JS_NULL; list_add_tail(&port->link, &ts->port_list); worker->msg_handler = port; } JS_FreeValue(ctx, port->on_message_func); port->on_message_func = JS_DupValue(ctx, func); } return JS_UNDEFINED; }
O3
c
js_worker_set_onmessage: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r12 movq %rcx, 0x10(%rsp) movq %rdx, %rbx movq %rsi, %rbp movq %rdi, %r15 callq 0x1f8ad movq %rax, %r14 xorl %r13d, %r13d xorl %edi, %edi movq %rax, %rsi xorl %eax, %eax callq 0x3af34 movq %rax, 0x8(%rsp) movl 0x7c(%rax), %ecx movq %r15, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x27095 movl $0x6, %ebx testq %rax, %rax je 0x183c0 movq %rax, %rbp movq 0x10(%rax), %r13 cmpl $0x2, %r12d jne 0x1831b movl $0x3, %ebx testq %r13, %r13 je 0x183bd movq %r14, %rdi movq %r13, %rsi callq 0x17fda movq $0x0, 0x10(%rbp) jmp 0x183bd movq %r12, %rdx movq %r15, %rdi movq 0x10(%rsp), %r12 movq %r12, %rsi movq %rdx, %r14 callq 0x229df testl %eax, %eax je 0x183da testq %r13, %r13 jne 0x18392 movl $0x28, %esi movq %r15, %rdi callq 0xedb6 testq %rax, %rax je 0x183bd movq %rax, %r13 movq (%rbp), %rax lock incl (%rax) movq %rax, 0x10(%r13) movl $0x0, 0x18(%r13) movq $0x2, 0x20(%r13) movq 0x8(%rsp), %rdx movq %rdx, %rax addq $0x30, %rax movq 0x30(%rdx), %rcx movq %r13, 0x8(%rcx) movq %rcx, (%r13) movq %rax, 0x8(%r13) movq %r13, 0x30(%rdx) movq %r13, 0x10(%rbp) movq 0x18(%r13), %rsi movq 0x20(%r13), %rdx movq %r15, %rdi callq 0x1d599 movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1c71a movq %rax, 0x18(%r13) movq %rdx, 0x20(%r13) movl $0x3, %ebx xorl %r13d, %r13d xorl %ecx, %ecx orq %rcx, %r13 movq %r13, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x897a1(%rip), %rsi # 0xa1b82 movq %r15, %rdi xorl %eax, %eax callq 0x2214f movq %rdx, %rbx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r13d jmp 0x183c2
js_worker_set_onmessage: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, r8 mov [rsp+48h+var_38], rcx mov rbx, rdx mov rbp, rsi mov r15, rdi call JS_GetRuntime mov r14, rax xor r13d, r13d xor edi, edi mov rsi, rax xor eax, eax call js_std_cmd mov [rsp+48h+var_40], rax mov ecx, [rax+7Ch] mov rdi, r15 mov rsi, rbp mov rdx, rbx call JS_GetOpaque2 mov ebx, 6 test rax, rax jz loc_183C0 mov rbp, rax mov r13, [rax+10h] cmp r12d, 2 jnz short loc_1831B mov ebx, 3 test r13, r13 jz loc_183BD mov rdi, r14 mov rsi, r13 call js_free_port mov qword ptr [rbp+10h], 0 jmp loc_183BD loc_1831B: mov rdx, r12 mov rdi, r15 mov r12, [rsp+48h+var_38] mov rsi, r12 mov r14, rdx call JS_IsFunction test eax, eax jz loc_183DA test r13, r13 jnz short loc_18392 mov esi, 28h ; '(' mov rdi, r15 call js_mallocz test rax, rax jz short loc_183BD mov r13, rax mov rax, [rbp+0] lock inc dword ptr [rax] mov [r13+10h], rax mov dword ptr [r13+18h], 0 mov qword ptr [r13+20h], 2 mov rdx, [rsp+48h+var_40] mov rax, rdx add rax, 30h ; '0' mov rcx, [rdx+30h] mov [rcx+8], r13 mov [r13+0], rcx mov [r13+8], rax mov [rdx+30h], r13 mov [rbp+10h], r13 loc_18392: mov rsi, [r13+18h] mov rdx, [r13+20h] mov rdi, r15 call JS_FreeValue mov rdi, r15 mov rsi, r12 mov rdx, r14 call JS_DupValue mov [r13+18h], rax mov [r13+20h], rdx mov ebx, 3 loc_183BD: xor r13d, r13d loc_183C0: xor ecx, ecx loc_183C2: or r13, rcx mov rax, r13 mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_183DA: lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov rdi, r15 xor eax, eax call JS_ThrowTypeError mov rbx, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r13d, eax jmp short loc_183C2
unsigned long long js_worker_set_onmessage(long long a1, long long a2, long long a3, long long a4, long long a5) { long long Runtime; // r14 long long v8; // r13 int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long Opaque2; // rax long long v14; // rbp long long v15; // r13 int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d long long v20; // rax volatile signed __int32 *v21; // roff long long v22; // rcx long long v23; // rdx unsigned long long v24; // rcx long long v26; // rax long long v27; // [rsp+8h] [rbp-40h] Runtime = JS_GetRuntime(a1); v8 = 0LL; v27 = js_std_cmd(0, Runtime, v9, v10, v11, v12); Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(v27 + 124)); if ( !Opaque2 ) goto LABEL_11; v14 = Opaque2; v15 = *(_QWORD *)(Opaque2 + 16); if ( (_DWORD)a5 == 2 ) { if ( v15 ) { js_free_port(Runtime, *(long long **)(Opaque2 + 16)); *(_QWORD *)(v14 + 16) = 0LL; } goto LABEL_10; } if ( !(unsigned int)JS_IsFunction(a1, a4) ) { v26 = JS_ThrowTypeError(a1, (unsigned int)"not a function", v16, v17, v18, v19); v24 = v26 & 0xFFFFFFFF00000000LL; v8 = (unsigned int)v26; return v24 | v8; } if ( v15 ) goto LABEL_9; v20 = js_mallocz(a1, 0x28uLL); if ( v20 ) { v15 = v20; v21 = *(volatile signed __int32 **)v14; _InterlockedIncrement(*(volatile signed __int32 **)v14); *(_QWORD *)(v20 + 16) = v21; *(_DWORD *)(v20 + 24) = 0; *(_QWORD *)(v20 + 32) = 2LL; v22 = *(_QWORD *)(v27 + 48); *(_QWORD *)(v22 + 8) = v20; *(_QWORD *)v20 = v22; *(_QWORD *)(v20 + 8) = v27 + 48; *(_QWORD *)(v27 + 48) = v20; *(_QWORD *)(v14 + 16) = v20; LABEL_9: JS_FreeValue(a1, *(_QWORD *)(v15 + 24), *(_QWORD *)(v15 + 32)); *(_QWORD *)(v15 + 24) = JS_DupValue(a1, a4, a5); *(_QWORD *)(v15 + 32) = v23; } LABEL_10: v8 = 0LL; LABEL_11: v24 = 0LL; return v24 | v8; }
js_worker_set_onmessage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R8 MOV qword ptr [RSP + 0x10],RCX MOV RBX,RDX MOV RBP,RSI MOV R15,RDI CALL 0x0011f8ad MOV R14,RAX XOR R13D,R13D XOR EDI,EDI MOV RSI,RAX XOR EAX,EAX CALL 0x0013af34 MOV qword ptr [RSP + 0x8],RAX MOV ECX,dword ptr [RAX + 0x7c] MOV RDI,R15 MOV RSI,RBP MOV RDX,RBX CALL 0x00127095 MOV EBX,0x6 TEST RAX,RAX JZ 0x001183c0 MOV RBP,RAX MOV R13,qword ptr [RAX + 0x10] CMP R12D,0x2 JNZ 0x0011831b MOV EBX,0x3 TEST R13,R13 JZ 0x001183bd MOV RDI,R14 MOV RSI,R13 CALL 0x00117fda MOV qword ptr [RBP + 0x10],0x0 JMP 0x001183bd LAB_0011831b: MOV RDX,R12 MOV RDI,R15 MOV R12,qword ptr [RSP + 0x10] MOV RSI,R12 MOV R14,RDX CALL 0x001229df TEST EAX,EAX JZ 0x001183da TEST R13,R13 JNZ 0x00118392 MOV ESI,0x28 MOV RDI,R15 CALL 0x0010edb6 TEST RAX,RAX JZ 0x001183bd MOV R13,RAX MOV RAX,qword ptr [RBP] INC.LOCK dword ptr [RAX] MOV qword ptr [R13 + 0x10],RAX MOV dword ptr [R13 + 0x18],0x0 MOV qword ptr [R13 + 0x20],0x2 MOV RDX,qword ptr [RSP + 0x8] MOV RAX,RDX ADD RAX,0x30 MOV RCX,qword ptr [RDX + 0x30] MOV qword ptr [RCX + 0x8],R13 MOV qword ptr [R13],RCX MOV qword ptr [R13 + 0x8],RAX MOV qword ptr [RDX + 0x30],R13 MOV qword ptr [RBP + 0x10],R13 LAB_00118392: MOV RSI,qword ptr [R13 + 0x18] MOV RDX,qword ptr [R13 + 0x20] MOV RDI,R15 CALL 0x0011d599 MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 CALL 0x0011c71a MOV qword ptr [R13 + 0x18],RAX MOV qword ptr [R13 + 0x20],RDX MOV EBX,0x3 LAB_001183bd: XOR R13D,R13D LAB_001183c0: XOR ECX,ECX LAB_001183c2: OR R13,RCX MOV RAX,R13 MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001183da: LEA RSI,[0x1a1b82] MOV RDI,R15 XOR EAX,EAX CALL 0x0012214f MOV RBX,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R13D,EAX JMP 0x001183c2
int1 [16] js_worker_set_onmessage (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int *piVar1; long lVar2; int iVar3; int8 uVar4; long lVar5; int8 *puVar6; long *plVar7; ulong uVar8; int8 uVar9; ulong uVar10; int1 auVar11 [16]; uVar4 = JS_GetRuntime(); lVar5 = js_std_cmd(0,uVar4); puVar6 = (int8 *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar5 + 0x7c)); uVar9 = 6; if (puVar6 != (int8 *)0x0) { plVar7 = (long *)puVar6[2]; if ((int)param_5 == 2) { uVar9 = 3; if (plVar7 != (long *)0x0) { js_free_port(uVar4,plVar7); puVar6[2] = 0; } } else { iVar3 = JS_IsFunction(param_1,param_4); if (iVar3 == 0) { auVar11 = JS_ThrowTypeError(param_1,"not a function"); uVar9 = auVar11._8_8_; uVar8 = auVar11._0_8_ & 0xffffffff00000000; uVar10 = auVar11._0_8_ & 0xffffffff; goto LAB_001183c2; } if (plVar7 == (long *)0x0) { plVar7 = (long *)js_mallocz(param_1,0x28); if (plVar7 == (long *)0x0) goto LAB_001183c0; piVar1 = (int *)*puVar6; LOCK(); *piVar1 = *piVar1 + 1; UNLOCK(); plVar7[2] = (long)piVar1; *(int4 *)(plVar7 + 3) = 0; plVar7[4] = 2; lVar2 = *(long *)(lVar5 + 0x30); *(long **)(lVar2 + 8) = plVar7; *plVar7 = lVar2; plVar7[1] = lVar5 + 0x30; *(long **)(lVar5 + 0x30) = plVar7; puVar6[2] = plVar7; } JS_FreeValue(param_1,plVar7[3],plVar7[4]); auVar11 = JS_DupValue(param_1,param_4,param_5); *(int1 (*) [16])(plVar7 + 3) = auVar11; uVar9 = 3; } } LAB_001183c0: uVar10 = 0; uVar8 = 0; LAB_001183c2: auVar11._8_8_ = uVar9; auVar11._0_8_ = uVar10 | uVar8; return auVar11; }
38,818
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2f30fa(%rip), %rax # 0x3856f8 movq (%rax), %r15 cmpl %edi, (%r15) je 0x92705 movq %rsi, %r14 movl %edi, %ebx leaq 0xb7551a(%rip), %rdi # 0xc07b30 leaq -0x382(%rip), %rsi # 0x9229b callq 0x29240 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x9269a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x91ace movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x91add movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x91af8 movq %rax, 0x90(%rdi) leaq 0xd4c9(%rip), %rax # 0x9fb2e movq %rax, 0x98(%rdi) leaq 0x2f307d(%rip), %rax # 0x3856f0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x91b16 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x9272a movq %rax, %r15 jmp 0x9269d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x92705 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x9205b movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0xd5352 xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x9dd27 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x92725 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29270
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_92705 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_9269A lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_9269D loc_9269A: xor r15d, r15d loc_9269D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_92705 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_92705: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_92725 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_92725: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long, long long, long long, long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x4856f8] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x00192705 MOV R14,RSI MOV EBX,EDI LEA RDI,[0xd07b30] LEA RSI,[0x19229b] CALL 0x00129240 CMP EBX,0x7ff JA 0x0019269a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x191ace] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x191add] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x191af8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x19fb2e] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x4856f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x191b16] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0019272a MOV R15,RAX JMP 0x0019269d LAB_0019269a: XOR R15D,R15D LAB_0019269d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00192705 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0019205b MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x001d5352 XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0019dd27 LAB_00192705: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00192725 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00192725: CALL 0x00129270
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
38,819
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
int Surface<REAL>::evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const { // // The control points of a regular patch are always the full set // of points required by a patch, i.e. phantom points will have an // entry of some kind (a duplicate). For example, for an isolated // quad, its regular patch still has 16 control points. So we can // return the basis weights as stencil weights for all cases. // Far::PatchParam patchParam; patchParam.Set(0, 0, 0, 0, 0, getRegPatchMask(), 0, true); Far::internal::EvaluatePatchBasisNormalized( getRegPatchType(), patchParam, uv[0], uv[1], sDeriv[0], sDeriv[1], sDeriv[2], sDeriv[3], sDeriv[4], sDeriv[5]); return GetNumControlPoints(); }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) callq 0xc9310 movzbl %al, %eax leaq -0x20(%rbp), %rdi xorl %r9d, %r9d movl %r9d, %esi movl %r9d, %edx movl %r9d, %ecx movl %r9d, %r8d movzwl %ax, %eax movl %eax, (%rsp) movl $0x0, 0x8(%rsp) movl $0x1, 0x10(%rsp) callq 0xd7710 movq -0x28(%rbp), %rdi callq 0xc9cf0 movzbl %al, %edi movq -0x10(%rbp), %rax movsd (%rax), %xmm0 movq -0x10(%rbp), %rax movsd 0x8(%rax), %xmm1 movq -0x18(%rbp), %rax movq (%rax), %rdx movq -0x18(%rbp), %rax movq 0x8(%rax), %rcx movq -0x18(%rbp), %rax movq 0x10(%rax), %r8 movq -0x18(%rbp), %rax movq 0x18(%rax), %r9 movq -0x18(%rbp), %rax movq 0x20(%rax), %r10 movq -0x18(%rbp), %rax movq 0x28(%rax), %rax leaq -0x20(%rbp), %rsi xorps %xmm2, %xmm2 movq %r10, (%rsp) movq %rax, 0x8(%rsp) callq 0xca910 movq -0x28(%rbp), %rdi callq 0xce660 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalRegularStencilsEPKdPPd: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov [rbp+var_28], rdi call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE15getRegPatchMaskEv; OpenSubdiv::v3_6_0::Bfr::Surface<double>::getRegPatchMask(void) movzx eax, al lea rdi, [rbp+var_20]; this xor r9d, r9d; bool mov esi, r9d; int mov edx, r9d; __int16 mov ecx, r9d; __int16 mov r8d, r9d; unsigned __int16 movzx eax, ax mov dword ptr [rsp+40h+var_40], eax; unsigned __int16 mov dword ptr [rsp+40h+var_38], 0; unsigned __int16 mov dword ptr [rsp+40h+var_30], 1; bool call __ZN10OpenSubdiv6v3_6_03Far10PatchParam3SetEisstbttb; OpenSubdiv::v3_6_0::Far::PatchParam::Set(int,short,short,ushort,bool,ushort,ushort,bool) mov rdi, [rbp+var_28] call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE15getRegPatchTypeEv; OpenSubdiv::v3_6_0::Bfr::Surface<double>::getRegPatchType(void) movzx edi, al mov rax, [rbp+var_10] movsd xmm0, qword ptr [rax] mov rax, [rbp+var_10] movsd xmm1, qword ptr [rax+8] mov rax, [rbp+var_18] mov rdx, [rax] mov rax, [rbp+var_18] mov rcx, [rax+8] mov rax, [rbp+var_18] mov r8, [rax+10h] mov rax, [rbp+var_18] mov r9, [rax+18h] mov rax, [rbp+var_18] mov r10, [rax+20h] mov rax, [rbp+var_18] mov rax, [rax+28h] lea rsi, [rbp+var_20] xorps xmm2, xmm2 mov qword ptr [rsp+40h+var_40], r10 mov qword ptr [rsp+40h+var_38], rax 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) mov rdi, [rbp+var_28] call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19GetNumControlPointsEv; OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumControlPoints(void) add rsp, 40h pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils( OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a1, double *a2, long long a3) { unsigned __int8 RegPatchMask; // al unsigned __int8 RegPatchType; // al _BYTE v6[8]; // [rsp+20h] [rbp-20h] BYREF long long v7; // [rsp+28h] [rbp-18h] double *v8; // [rsp+30h] [rbp-10h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v9; // [rsp+38h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; RegPatchMask = OpenSubdiv::v3_6_0::Bfr::Surface<double>::getRegPatchMask(); OpenSubdiv::v3_6_0::Far::PatchParam::Set((OpenSubdiv::v3_6_0::Far::PatchParam *)v6, 0, 0, 0, 0, 0, RegPatchMask, 0, 1); RegPatchType = OpenSubdiv::v3_6_0::Bfr::Surface<double>::getRegPatchType(a1); OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<double>( RegPatchType, (OpenSubdiv::v3_6_0::Far::PatchParam *)v6, *(double **)v7, *(_QWORD **)(v7 + 8), *(_QWORD **)(v7 + 16), *(_QWORD **)(v7 + 24), *v8, v8[1], 0.0, *(_QWORD **)(v7 + 32), *(_QWORD **)(v7 + 40)); return OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumControlPoints(a1); }
38,820
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
int Surface<REAL>::evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const { // // The control points of a regular patch are always the full set // of points required by a patch, i.e. phantom points will have an // entry of some kind (a duplicate). For example, for an isolated // quad, its regular patch still has 16 control points. So we can // return the basis weights as stencil weights for all cases. // Far::PatchParam patchParam; patchParam.Set(0, 0, 0, 0, 0, getRegPatchMask(), 0, true); Far::internal::EvaluatePatchBasisNormalized( getRegPatchType(), patchParam, uv[0], uv[1], sDeriv[0], sDeriv[1], sDeriv[2], sDeriv[3], sDeriv[4], sDeriv[5]); return GetNumControlPoints(); }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movzbl 0x6e(%rdi), %ecx andl $0x1f, %ecx shlq $0x27, %rcx btsq $0x25, %rcx leaq 0x18(%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 0x3a620 movl 0x8(%rbx), %eax addq $0x20, %rsp popq %rbx retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE19evalRegularStencilsEPKfPPf: push rbx sub rsp, 20h mov rbx, rdi movzx ecx, byte ptr [rdi+6Eh] and ecx, 1Fh shl rcx, 27h bts rcx, 25h ; '%' lea rax, [rsp+28h+var_10] 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+28h+var_28], 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) mov eax, [rbx+8] add rsp, 20h pop rbx retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularStencils(long long a1, float *a2, float **a3) { unsigned long long v4; // [rsp+18h] [rbp-10h] BYREF v4 = ((unsigned long long)(*(_BYTE *)(a1 + 110) & 0x1F) << 39) | 0x2000000000LL; OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<float>( *(unsigned __int8 *)(a1 + 109), &v4, *a3, a3[1], a3[2], a3[3], *a2, a2[1], 0.0, a3[4], a3[5]); return *(unsigned int *)(a1 + 8); }
evalRegularStencils: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOVZX ECX,byte ptr [RDI + 0x6e] AND ECX,0x1f SHL RCX,0x27 BTS RCX,0x25 LEA RAX,[RSP + 0x18] 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 0x0013a620 MOV EAX,dword ptr [RBX + 0x8] ADD RSP,0x20 POP RBX RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularStencils(float const*, float**) const */ int4 __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularStencils (Surface<float> *this,float *param_1,float **param_2) { ulong local_10; local_10 = (ulong)((byte)this[0x6e] & 0x1f) << 0x27 | 0x2000000000; Far::internal::EvaluatePatchBasisNormalized<float> ((uint)(byte)this[0x6d],(PatchParam *)&local_10,*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 *(int4 *)(this + 8); }
38,821
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
int Surface<REAL>::evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const { // // The control points of a regular patch are always the full set // of points required by a patch, i.e. phantom points will have an // entry of some kind (a duplicate). For example, for an isolated // quad, its regular patch still has 16 control points. So we can // return the basis weights as stencil weights for all cases. // Far::PatchParam patchParam; patchParam.Set(0, 0, 0, 0, 0, getRegPatchMask(), 0, true); Far::internal::EvaluatePatchBasisNormalized( getRegPatchType(), patchParam, uv[0], uv[1], sDeriv[0], sDeriv[1], sDeriv[2], sDeriv[3], sDeriv[4], sDeriv[5]); return GetNumControlPoints(); }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movzbl 0x6e(%rdi), %ecx andl $0x1f, %ecx shlq $0x27, %rcx btsq $0x25, %rcx leaq 0x18(%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 0x51910 movl 0x8(%rbx), %eax addq $0x20, %rsp popq %rbx retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalRegularStencilsEPKdPPd: push rbx sub rsp, 20h mov rbx, rdi movzx ecx, byte ptr [rdi+6Eh] and ecx, 1Fh shl rcx, 27h bts rcx, 25h ; '%' lea rax, [rsp+28h+var_10] 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+28h+var_28], 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) mov eax, [rbx+8] add rsp, 20h pop rbx retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils( long long a1, unsigned long long *a2, __m128d **a3) { unsigned long long v4; // [rsp+18h] [rbp-10h] BYREF v4 = ((unsigned long long)(*(_BYTE *)(a1 + 110) & 0x1F) << 39) | 0x2000000000LL; OpenSubdiv::v3_6_0::Far::internal::EvaluatePatchBasisNormalized<double>( *(unsigned __int8 *)(a1 + 109), &v4, *a3, a3[1], a3[2], a3[3], (__m128d)*a2, (__m128d)a2[1], 0.0, a3[4], a3[5]); return *(unsigned int *)(a1 + 8); }
evalRegularStencils: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOVZX ECX,byte ptr [RDI + 0x6e] AND ECX,0x1f SHL RCX,0x27 BTS RCX,0x25 LEA RAX,[RSP + 0x18] 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 0x00151910 MOV EAX,dword ptr [RBX + 0x8] ADD RSP,0x20 POP RBX RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const */ int4 __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils (Surface<double> *this,double *param_1,double **param_2) { ulong local_10; local_10 = (ulong)((byte)this[0x6e] & 0x1f) << 0x27 | 0x2000000000; Far::internal::EvaluatePatchBasisNormalized<double> ((uint)(byte)this[0x6d],(PatchParam *)&local_10,*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 *(int4 *)(this + 8); }
38,822
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
int Surface<REAL>::evalRegularStencils(REAL const uv[2], REAL * sDeriv[]) const { // // The control points of a regular patch are always the full set // of points required by a patch, i.e. phantom points will have an // entry of some kind (a duplicate). For example, for an isolated // quad, its regular patch still has 16 control points. So we can // return the basis weights as stencil weights for all cases. // Far::PatchParam patchParam; patchParam.Set(0, 0, 0, 0, 0, getRegPatchMask(), 0, true); Far::internal::EvaluatePatchBasisNormalized( getRegPatchType(), patchParam, uv[0], uv[1], sDeriv[0], sDeriv[1], sDeriv[2], sDeriv[3], sDeriv[4], sDeriv[5]); return GetNumControlPoints(); }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularStencils(double const*, double**) const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movzbl 0x6e(%rdi), %ecx andl $0x1f, %ecx shlq $0x27, %rcx btsq $0x25, %rcx leaq 0x18(%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 movl 0x8(%rbx), %eax addq $0x20, %rsp popq %rbx retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE19evalRegularStencilsEPKfPPf: push rbx sub rsp, 20h mov rbx, rdi movzx ecx, byte ptr [rdi+6Eh] and ecx, 1Fh shl rcx, 27h bts rcx, 25h ; '%' lea rax, [rsp+28h+var_10] 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+28h+var_28], 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) mov eax, [rbx+8] add rsp, 20h pop rbx retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularStencils( long long a1, unsigned int *a2, __m128 **a3) { unsigned long long v4; // [rsp+18h] [rbp-10h] BYREF v4 = ((unsigned long long)(*(_BYTE *)(a1 + 110) & 0x1F) << 39) | 0x2000000000LL; 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]); return *(unsigned int *)(a1 + 8); }
evalRegularStencils: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOVZX ECX,byte ptr [RDI + 0x6e] AND ECX,0x1f SHL RCX,0x27 BTS RCX,0x25 LEA RAX,[RSP + 0x18] 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 MOV EAX,dword ptr [RBX + 0x8] ADD RSP,0x20 POP RBX RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularStencils(float const*, float**) const */ int4 __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalRegularStencils (Surface<float> *this,float *param_1,float **param_2) { ulong local_10; local_10 = (ulong)((byte)this[0x6e] & 0x1f) << 0x27 | 0x2000000000; Far::internal::EvaluatePatchBasisNormalized<float> ((uint)(byte)this[0x6d],(PatchParam *)&local_10,*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 *(int4 *)(this + 8); }
38,823
my_rmtree
eloqsql/mysys/my_delete.c
int my_rmtree(const char *dir, myf MyFlags) { char path[FN_REFLEN]; char sep[] = { FN_LIBCHAR, 0 }; int err = 0; uint i; MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT)); if (!dir_info) return 1; for (i = 0; i < dir_info->number_of_files; i++) { FILEINFO *file = dir_info->dir_entry + i; /* Skip "." and ".." */ if (!strcmp(file->name, ".") || !strcmp(file->name, "..")) continue; strxnmov(path, sizeof(path), dir, sep, file->name, NULL); if (!MY_S_ISDIR(file->mystat->st_mode)) { err = my_delete(path, MyFlags); #ifdef _WIN32 /* On Windows, check and possible reset readonly attribute. my_delete(), or DeleteFile does not remove theses files. */ if (err) { DWORD attr = GetFileAttributes(path); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY); err = my_delete(path, MyFlags); } } #endif } else err = my_rmtree(path, MyFlags); if (err) break; } my_dirend(dir_info); if (!err) err = rmdir(dir); return err; }
O3
c
my_rmtree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, -0x240(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movw $0x2f, -0x232(%rbp) movl $0x4000, %esi # imm = 0x4000 movq %rdi, -0x248(%rbp) callq 0x9f765 testq %rax, %rax je 0x9df4d movq %rax, %r15 movl 0x8(%rax), %eax testl %eax, %eax je 0x9df34 movl $0x8, %r14d leaq -0x230(%rbp), %rbx xorl %r12d, %r12d movq (%r15), %r13 movq -0x8(%r13,%r14), %r8 cmpb $0x2e, (%r8) jne 0x9debd cmpb $0x0, 0x1(%r8) je 0x9df22 cmpb $0x2e, 0x1(%r8) jne 0x9debd cmpb $0x0, 0x2(%r8) je 0x9df22 movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movq -0x248(%rbp), %rdx leaq -0x232(%rbp), %rcx xorl %r9d, %r9d xorl %eax, %eax callq 0xd722c movq (%r13,%r14), %rax movl 0x18(%rax), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax movq %rbx, %rdi cmpl $0x4000, %eax # imm = 0x4000 jne 0x9df04 movq -0x240(%rbp), %rsi callq 0x9de31 jmp 0x9df10 movq -0x240(%rbp), %rsi callq 0x9dd5c movl %eax, %r13d testl %eax, %eax jne 0x9df55 movl 0x8(%r15), %eax leaq -0x230(%rbp), %rbx incq %r12 movl %eax, %ecx addq $0x10, %r14 cmpq %rcx, %r12 jb 0x9de9a movq %r15, %rdi callq 0x9f734 movq -0x248(%rbp), %rdi callq 0x29360 movl %eax, %r13d jmp 0x9df5d movl $0x1, %r13d jmp 0x9df5d movq %r15, %rdi callq 0x9f734 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9df81 movl %r13d, %eax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250 nop
my_rmtree: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov [rbp+var_240], rsi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_232], 2Fh ; '/' mov esi, 4000h mov [rbp+var_248], rdi call my_dir test rax, rax jz loc_9DF4D mov r15, rax mov eax, [rax+8] test eax, eax jz loc_9DF34 mov r14d, 8 lea rbx, [rbp+var_230] xor r12d, r12d loc_9DE9A: mov r13, [r15] mov r8, [r13+r14-8] cmp byte ptr [r8], 2Eh ; '.' jnz short loc_9DEBD cmp byte ptr [r8+1], 0 jz short loc_9DF22 cmp byte ptr [r8+1], 2Eh ; '.' jnz short loc_9DEBD cmp byte ptr [r8+2], 0 jz short loc_9DF22 loc_9DEBD: mov esi, 200h mov rdi, rbx mov rdx, [rbp+var_248] lea rcx, [rbp+var_232] xor r9d, r9d xor eax, eax call strxnmov mov rax, [r13+r14+0] mov eax, [rax+18h] mov ecx, 0F000h and eax, ecx mov rdi, rbx cmp eax, 4000h jnz short loc_9DF04 mov rsi, [rbp+var_240] call my_rmtree jmp short loc_9DF10 loc_9DF04: mov rsi, [rbp+var_240] call my_delete loc_9DF10: mov r13d, eax test eax, eax jnz short loc_9DF55 mov eax, [r15+8] lea rbx, [rbp+var_230] loc_9DF22: inc r12 mov ecx, eax add r14, 10h cmp r12, rcx jb loc_9DE9A loc_9DF34: mov rdi, r15 call my_dirend mov rdi, [rbp+var_248] call _rmdir mov r13d, eax jmp short loc_9DF5D loc_9DF4D: mov r13d, 1 jmp short loc_9DF5D loc_9DF55: mov rdi, r15 call my_dirend loc_9DF5D: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9DF81 mov eax, r13d add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9DF81: call ___stack_chk_fail
long long my_rmtree(long long a1, long long a2) { long long v2; // rax long long v3; // r15 unsigned int v4; // eax long long v5; // r14 unsigned long long i; // r12 long long v7; // r13 _BYTE *v8; // r8 unsigned int v9; // eax unsigned int v10; // r13d char v12; // [rsp+0h] [rbp-250h] __int16 v13; // [rsp+1Eh] [rbp-232h] BYREF _BYTE v14[512]; // [rsp+20h] [rbp-230h] BYREF unsigned long long v15; // [rsp+220h] [rbp-30h] v15 = __readfsqword(0x28u); v13 = 47; v2 = my_dir(a1, 0x4000LL); if ( v2 ) { v3 = v2; v4 = *(_DWORD *)(v2 + 8); if ( v4 ) { v5 = 8LL; for ( i = 0LL; i < v4; ++i ) { v7 = *(_QWORD *)v3; v8 = *(_BYTE **)(*(_QWORD *)v3 + v5 - 8); if ( *v8 != 46 || v8[1] && (v8[1] != 46 || v8[2]) ) { strxnmov((unsigned int)v14, 512, a1, (unsigned int)&v13, (_DWORD)v8, 0, v12); if ( (*(_DWORD *)(*(_QWORD *)(v7 + v5) + 24LL) & 0xF000) == 0x4000 ) v9 = my_rmtree(v14, a2); else v9 = my_delete((long long)v14, a2); v10 = v9; if ( v9 ) { my_dirend(v3); return v10; } v4 = *(_DWORD *)(v3 + 8); } v5 += 16LL; } } my_dirend(v3); return (unsigned int)rmdir(a1); } else { return 1; } }
my_rmtree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV qword ptr [RBP + -0x240],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV word ptr [RBP + -0x232],0x2f MOV ESI,0x4000 MOV qword ptr [RBP + -0x248],RDI CALL 0x0019f765 TEST RAX,RAX JZ 0x0019df4d MOV R15,RAX MOV EAX,dword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x0019df34 MOV R14D,0x8 LEA RBX,[RBP + -0x230] XOR R12D,R12D LAB_0019de9a: MOV R13,qword ptr [R15] MOV R8,qword ptr [R13 + R14*0x1 + -0x8] CMP byte ptr [R8],0x2e JNZ 0x0019debd CMP byte ptr [R8 + 0x1],0x0 JZ 0x0019df22 CMP byte ptr [R8 + 0x1],0x2e JNZ 0x0019debd CMP byte ptr [R8 + 0x2],0x0 JZ 0x0019df22 LAB_0019debd: MOV ESI,0x200 MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x248] LEA RCX,[RBP + -0x232] XOR R9D,R9D XOR EAX,EAX CALL 0x001d722c MOV RAX,qword ptr [R13 + R14*0x1] MOV EAX,dword ptr [RAX + 0x18] MOV ECX,0xf000 AND EAX,ECX MOV RDI,RBX CMP EAX,0x4000 JNZ 0x0019df04 MOV RSI,qword ptr [RBP + -0x240] CALL 0x0019de31 JMP 0x0019df10 LAB_0019df04: MOV RSI,qword ptr [RBP + -0x240] CALL 0x0019dd5c LAB_0019df10: MOV R13D,EAX TEST EAX,EAX JNZ 0x0019df55 MOV EAX,dword ptr [R15 + 0x8] LEA RBX,[RBP + -0x230] LAB_0019df22: INC R12 MOV ECX,EAX ADD R14,0x10 CMP R12,RCX JC 0x0019de9a LAB_0019df34: MOV RDI,R15 CALL 0x0019f734 MOV RDI,qword ptr [RBP + -0x248] CALL 0x00129360 MOV R13D,EAX JMP 0x0019df5d LAB_0019df4d: MOV R13D,0x1 JMP 0x0019df5d LAB_0019df55: MOV RDI,R15 CALL 0x0019f734 LAB_0019df5d: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019df81 MOV EAX,R13D ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019df81: CALL 0x00129250
int my_rmtree(char *param_1,int8 param_2) { long lVar1; char *pcVar2; uint uVar3; int iVar4; long *plVar5; ulong uVar6; long lVar7; long in_FS_OFFSET; int2 local_23a; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_23a = 0x2f; plVar5 = (long *)my_dir(param_1,0x4000); if (plVar5 == (long *)0x0) { iVar4 = 1; } else { uVar3 = *(uint *)(plVar5 + 1); if (uVar3 != 0) { lVar7 = 8; uVar6 = 0; do { lVar1 = *plVar5; pcVar2 = *(char **)(lVar1 + -8 + lVar7); if ((*pcVar2 != '.') || ((pcVar2[1] != '\0' && ((pcVar2[1] != '.' || (pcVar2[2] != '\0'))))) ) { strxnmov(local_238,0x200,param_1,&local_23a,pcVar2,0); if ((*(uint *)(*(long *)(lVar1 + lVar7) + 0x18) & 0xf000) == 0x4000) { iVar4 = my_rmtree(local_238,param_2); } else { iVar4 = my_delete(local_238,param_2); } if (iVar4 != 0) { my_dirend(plVar5); goto LAB_0019df5d; } uVar3 = *(uint *)(plVar5 + 1); } uVar6 = uVar6 + 1; lVar7 = lVar7 + 0x10; } while (uVar6 < uVar3); } my_dirend(plVar5); iVar4 = rmdir(param_1); } LAB_0019df5d: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
38,824
ma_bitmap_unpin_all
eloqsql/storage/maria/ma_bitmap.c
static void _ma_bitmap_unpin_all(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; MARIA_PINNED_PAGE *page_link= ((MARIA_PINNED_PAGE*) dynamic_array_ptr(&bitmap->pinned_pages, 0)); MARIA_PINNED_PAGE *pinned_page= page_link + bitmap->pinned_pages.elements; DBUG_ENTER("_ma_bitmap_unpin_all"); DBUG_PRINT("info", ("pinned: %u", bitmap->pinned_pages.elements)); while (pinned_page-- != page_link) pagecache_unlock_by_link(share->pagecache, pinned_page->link, pinned_page->unlock, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, FALSE, TRUE); bitmap->pinned_pages.elements= 0; DBUG_VOID_RETURN; }
O3
c
ma_bitmap_unpin_all: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0xb58(%rdi), %eax testq %rax, %rax je 0x52e4f movq 0xb50(%rbx), %r14 shlq $0x3, %rax leaq (%rax,%rax,2), %r15 movq 0x600(%rbx), %rdi movq -0x18(%r14,%r15), %rsi movl -0x10(%r14,%r15), %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq $0x1 pushq $0x0 callq 0x3af3d addq $0x10, %rsp addq $-0x18, %r15 jne 0x52e20 movl $0x0, 0xb58(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_bitmap_unpin_all: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+0B58h] test rax, rax jz short loc_52E4F mov r14, [rbx+0B50h] shl rax, 3 lea r15, [rax+rax*2] loc_52E20: mov rdi, [rbx+600h] mov rsi, [r14+r15-18h] mov edx, [r14+r15-10h] mov ecx, 3 xor r8d, r8d xor r9d, r9d push 1 push 0 call pagecache_unlock_by_link add rsp, 10h add r15, 0FFFFFFFFFFFFFFE8h jnz short loc_52E20 loc_52E4F: mov dword ptr [rbx+0B58h], 0 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_bitmap_unpin_all(long long a1) { long long result; // rax long long v2; // r14 long long v3; // r15 result = *(unsigned int *)(a1 + 2904); if ( *(_DWORD *)(a1 + 2904) ) { v2 = *(_QWORD *)(a1 + 2896); v3 = 24 * result; do { result = pagecache_unlock_by_link( *(_QWORD *)(a1 + 1536), *(_QWORD *)(v2 + v3 - 24), *(_DWORD *)(v2 + v3 - 16), 3, 0LL, 0LL, 0); v3 -= 24LL; } while ( v3 ); } *(_DWORD *)(a1 + 2904) = 0; return result; }
_ma_bitmap_unpin_all: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0xb58] TEST RAX,RAX JZ 0x00152e4f MOV R14,qword ptr [RBX + 0xb50] SHL RAX,0x3 LEA R15,[RAX + RAX*0x2] LAB_00152e20: MOV RDI,qword ptr [RBX + 0x600] MOV RSI,qword ptr [R14 + R15*0x1 + -0x18] MOV EDX,dword ptr [R14 + R15*0x1 + -0x10] MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH 0x1 PUSH 0x0 CALL 0x0013af3d ADD RSP,0x10 ADD R15,-0x18 JNZ 0x00152e20 LAB_00152e4f: MOV dword ptr [RBX + 0xb58],0x0 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void _ma_bitmap_unpin_all(long param_1) { long lVar1; long lVar2; if ((ulong)*(uint *)(param_1 + 0xb58) != 0) { lVar1 = *(long *)(param_1 + 0xb50); lVar2 = (ulong)*(uint *)(param_1 + 0xb58) * 0x18; do { pagecache_unlock_by_link (*(int8 *)(param_1 + 0x600),*(int8 *)(lVar1 + -0x18 + lVar2), *(int4 *)(lVar1 + -0x10 + lVar2),3,0,0,0,1); lVar2 = lVar2 + -0x18; } while (lVar2 != 0); } *(int4 *)(param_1 + 0xb58) = 0; return; }
38,825
ma_bitmap_unpin_all
eloqsql/storage/maria/ma_bitmap.c
static void _ma_bitmap_unpin_all(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; MARIA_PINNED_PAGE *page_link= ((MARIA_PINNED_PAGE*) dynamic_array_ptr(&bitmap->pinned_pages, 0)); MARIA_PINNED_PAGE *pinned_page= page_link + bitmap->pinned_pages.elements; DBUG_ENTER("_ma_bitmap_unpin_all"); DBUG_PRINT("info", ("pinned: %u", bitmap->pinned_pages.elements)); while (pinned_page-- != page_link) pagecache_unlock_by_link(share->pagecache, pinned_page->link, pinned_page->unlock, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, FALSE, TRUE); bitmap->pinned_pages.elements= 0; DBUG_VOID_RETURN; }
O0
c
ma_bitmap_unpin_all: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq -0x10(%rbp), %rcx imull $0x0, 0x154(%rcx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x148(%rcx), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x5edb4 jmp 0x5edb6 movq -0x20(%rbp), %rax movq %rax, %rcx addq $-0x18, %rcx movq %rcx, -0x20(%rbp) cmpq -0x18(%rbp), %rax je 0x5ee09 movq -0x8(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rax movl 0x8(%rax), %edx movl $0x3, %ecx xorl %eax, %eax movl %eax, %r9d xorl %eax, %eax movq %r9, %r8 movl $0x0, (%rsp) movl $0x1, 0x8(%rsp) callq 0x96b90 jmp 0x5edb6 movq -0x10(%rbp), %rax movl $0x0, 0x148(%rax) jmp 0x5ee19 addq $0x30, %rsp popq %rbp retq nop
_ma_bitmap_unpin_all: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 0A10h mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+140h] mov rcx, [rbp+var_10] imul ecx, [rcx+154h], 0 mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov ecx, [rcx+148h] imul rcx, 18h add rax, rcx mov [rbp+var_20], rax jmp short $+2 loc_5EDB4: jmp short $+2 loc_5EDB6: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFE8h mov [rbp+var_20], rcx cmp rax, [rbp+var_18] jz short loc_5EE09 mov rax, [rbp+var_8] mov rdi, [rax+600h] mov rax, [rbp+var_20] mov rsi, [rax] mov rax, [rbp+var_20] mov edx, [rax+8] mov ecx, 3 xor eax, eax mov r9d, eax xor eax, eax mov r8, r9 mov [rsp+30h+var_30], 0 mov [rsp+30h+var_28], 1 call pagecache_unlock_by_link jmp short loc_5EDB6 loc_5EE09: mov rax, [rbp+var_10] mov dword ptr [rax+148h], 0 jmp short $+2 loc_5EE19: add rsp, 30h pop rbp retn
long long ma_bitmap_unpin_all(long long a1) { long long v1; // rax long long result; // rax long long i; // [rsp+10h] [rbp-20h] long long v4; // [rsp+18h] [rbp-18h] v4 = *(_QWORD *)(a1 + 2896); for ( i = 24LL * *(unsigned int *)(a1 + 2904) + v4; ; pagecache_unlock_by_link(*(_QWORD *)(a1 + 1536), *(_QWORD *)i, *(_DWORD *)(i + 8), 3, 0, 0, 0, 1) ) { v1 = i; i -= 24LL; if ( v1 == v4 ) break; } result = a1 + 2576; *(_DWORD *)(a1 + 2904) = 0; return result; }
_ma_bitmap_unpin_all: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0xa10 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV RCX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RCX + 0x154],0x0 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x148] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x0015edb4 LAB_0015edb4: JMP 0x0015edb6 LAB_0015edb6: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x18 MOV qword ptr [RBP + -0x20],RCX CMP RAX,qword ptr [RBP + -0x18] JZ 0x0015ee09 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x600] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x8] MOV ECX,0x3 XOR EAX,EAX MOV R9D,EAX XOR EAX,EAX MOV R8,R9 MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x1 CALL 0x00196b90 JMP 0x0015edb6 LAB_0015ee09: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x148],0x0 JMP 0x0015ee19 LAB_0015ee19: ADD RSP,0x30 POP RBP RET
void _ma_bitmap_unpin_all(long param_1) { int8 *puVar1; int8 *local_28; puVar1 = *(int8 **)(param_1 + 0xb50); local_28 = puVar1 + (ulong)*(uint *)(param_1 + 0xb58) * 3; while (local_28 != puVar1) { pagecache_unlock_by_link (*(int8 *)(param_1 + 0x600),local_28[-3],*(int4 *)(local_28 + -2),3,0,0,0, 1); local_28 = local_28 + -3; } *(int4 *)(param_1 + 0xb58) = 0; return; }
38,826
req_header
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) { buffer_t tmp = {0}; if (slot.type == JSON_TYPE_STRING) bprintf(&tmp, "eth/v1/beacon/headers/%j", slot); else bprintf(&tmp, "eth/v1/beacon/headers/head"); data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data); if (req) buffer_free(&tmp); if (req && req->response.data) { json_t res = json_parse((char*) req->response.data); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message"); if (res.type == JSON_TYPE_OBJECT) { *data = res; return true; } else { state->error = strdup("Invalid response for header"); return false; } } else if (req && req->error) { state->error = strdup(req->error); return false; } data_request_t* new_req = safe_calloc(1, sizeof(data_request_t)); new_req->chain_id = chain_id; new_req->url = (char*) tmp.data.data; new_req->encoding = C4_DATA_ENCODING_JSON; new_req->type = C4_DATA_TYPE_BEACON_API; c4_state_add_request(state, new_req); return false; }
O0
c
req_header: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp leaq 0x10(%rbp), %rax movq %rax, -0xb0(%rbp) movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) leaq -0x38(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x231c0 movq -0xb0(%rbp), %rax cmpl $0x1, 0x10(%rax) jne 0x27842 movq -0xb0(%rbp), %rax leaq -0x38(%rbp), %rdi leaq 0xb4e84(%rip), %rsi # 0xdc6a4 movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) movb $0x0, %al callq 0x9ebf0 jmp 0x27854 leaq -0x38(%rbp), %rdi leaq 0xb4e70(%rip), %rsi # 0xdc6bd movb $0x0, %al callq 0x9ebf0 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xa7810 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) je 0x27875 leaq -0x38(%rbp), %rdi callq 0x9e240 cmpq $0x0, -0x40(%rbp) je 0x279dd movq -0x40(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x279dd movq -0x40(%rbp), %rax movq 0x38(%rax), %rsi leaq -0x58(%rbp), %rdi callq 0xa51e0 cmpl $0x3, -0x48(%rbp) jne 0x278eb leaq -0x70(%rbp), %rdi leaq -0x58(%rbp), %rax leaq 0xb4d5a(%rip), %rsi # 0xdc60f movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa59b0 movq -0x70(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x48(%rbp) cmpl $0x3, -0x48(%rbp) jne 0x2793c leaq -0x88(%rbp), %rdi leaq -0x58(%rbp), %rax leaq 0xb4df2(%rip), %rsi # 0xdc6f5 movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa59b0 movq -0x88(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x48(%rbp) cmpl $0x3, -0x48(%rbp) jne 0x27993 leaq -0xa0(%rbp), %rdi leaq -0x58(%rbp), %rax leaq 0xb4d84(%rip), %rsi # 0xdc6d8 movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa59b0 movq -0xa0(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x48(%rbp) cmpl $0x3, -0x48(%rbp) jne 0x279bd movq -0x20(%rbp), %rax movq -0x58(%rbp), %rcx movq %rcx, (%rax) movq -0x50(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x48(%rbp), %rcx movq %rcx, 0x10(%rax) movb $0x1, -0x1(%rbp) jmp 0x27a70 leaq 0xb4d1c(%rip), %rdi # 0xdc6e0 callq 0x23030 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movb $0x0, -0x1(%rbp) jmp 0x27a70 cmpq $0x0, -0x40(%rbp) je 0x27a0d movq -0x40(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x27a0d movq -0x40(%rbp), %rax movq 0x48(%rax), %rdi callq 0x23030 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movb $0x0, -0x1(%rbp) jmp 0x27a70 jmp 0x27a0f movl $0x1, %edi movl $0x80, %esi callq 0x9dad0 movq %rax, -0xa8(%rbp) movl -0x14(%rbp), %ecx movq -0xa8(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rcx movq -0xa8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0xa8(%rbp), %rax movl $0x0, 0x8(%rax) movq -0xa8(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x10(%rbp), %rdi movq -0xa8(%rbp), %rsi callq 0xa78b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xd0, %rsp popq %rbp retq nop
req_header: push rbp mov rbp, rsp sub rsp, 0D0h lea rax, [rbp+arg_0] mov [rbp+var_B0], rax mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx lea rdi, [rbp+var_38] xor esi, esi mov edx, 18h call _memset mov rax, [rbp+var_B0] cmp dword ptr [rax+10h], 1 jnz short loc_27842 mov rax, [rbp+var_B0] lea rdi, [rbp+var_38] lea rsi, aEthV1BeaconHea; "eth/v1/beacon/headers/%j" mov rcx, [rax] mov [rsp+0D0h+var_D0], rcx mov rcx, [rax+8] mov [rsp+0D0h+var_C8], rcx mov rax, [rax+10h] mov [rsp+0D0h+var_C0], rax mov al, 0 call bprintf jmp short loc_27854 loc_27842: lea rdi, [rbp+var_38] lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/head" mov al, 0 call bprintf loc_27854: mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] call c4_state_get_data_request_by_url mov [rbp+var_40], rax cmp [rbp+var_40], 0 jz short loc_27875 lea rdi, [rbp+var_38] call buffer_free loc_27875: cmp [rbp+var_40], 0 jz loc_279DD mov rax, [rbp+var_40] cmp qword ptr [rax+38h], 0 jz loc_279DD mov rax, [rbp+var_40] mov rsi, [rax+38h] lea rdi, [rbp+var_58] call json_parse cmp dword ptr [rbp+var_48], 3 jnz short loc_278EB lea rdi, [rbp+var_70] lea rax, [rbp+var_58] lea rsi, aSyncData+5; "data" mov rcx, [rax] mov [rsp+0D0h+var_D0], rcx mov rcx, [rax+8] mov [rsp+0D0h+var_C8], rcx mov rax, [rax+10h] mov [rsp+0D0h+var_C0], rax call json_get mov rax, [rbp+var_70] mov [rbp+var_58], rax mov rax, [rbp+var_68] mov [rbp+var_50], rax mov rax, [rbp+var_60] mov [rbp+var_48], rax loc_278EB: cmp dword ptr [rbp+var_48], 3 jnz short loc_2793C lea rdi, [rbp+var_88] lea rax, [rbp+var_58] lea rsi, aInvalidRespons+15h; "header" mov rcx, [rax] mov [rsp+0D0h+var_D0], rcx mov rcx, [rax+8] mov [rsp+0D0h+var_C8], rcx mov rax, [rax+10h] mov [rsp+0D0h+var_C0], rax call json_get mov rax, [rbp+var_88] mov [rbp+var_58], rax mov rax, [rbp+var_80] mov [rbp+var_50], rax mov rax, [rbp+var_78] mov [rbp+var_48], rax loc_2793C: cmp dword ptr [rbp+var_48], 3 jnz short loc_27993 lea rdi, [rbp+var_A0] lea rax, [rbp+var_58] lea rsi, aMessage; "message" mov rcx, [rax] mov [rsp+0D0h+var_D0], rcx mov rcx, [rax+8] mov [rsp+0D0h+var_C8], rcx mov rax, [rax+10h] mov [rsp+0D0h+var_C0], rax call json_get mov rax, [rbp+var_A0] mov [rbp+var_58], rax mov rax, [rbp+var_98] mov [rbp+var_50], rax mov rax, [rbp+var_90] mov [rbp+var_48], rax loc_27993: cmp dword ptr [rbp+var_48], 3 jnz short loc_279BD mov rax, [rbp+var_20] mov rcx, [rbp+var_58] mov [rax], rcx mov rcx, [rbp+var_50] mov [rax+8], rcx mov rcx, [rbp+var_48] mov [rax+10h], rcx mov [rbp+var_1], 1 jmp loc_27A70 loc_279BD: lea rdi, aInvalidRespons; "Invalid response for header" call _strdup mov rcx, rax mov rax, [rbp+var_10] mov [rax+8], rcx mov [rbp+var_1], 0 jmp loc_27A70 loc_279DD: cmp [rbp+var_40], 0 jz short loc_27A0D mov rax, [rbp+var_40] cmp qword ptr [rax+48h], 0 jz short loc_27A0D mov rax, [rbp+var_40] mov rdi, [rax+48h] call _strdup mov rcx, rax mov rax, [rbp+var_10] mov [rax+8], rcx mov [rbp+var_1], 0 jmp short loc_27A70 loc_27A0D: jmp short $+2 loc_27A0F: mov edi, 1 mov esi, 80h call safe_calloc mov [rbp+var_A8], rax mov ecx, [rbp+var_14] mov rax, [rbp+var_A8] mov [rax], ecx mov rcx, [rbp+var_30] mov rax, [rbp+var_A8] mov [rax+10h], rcx mov rax, [rbp+var_A8] mov dword ptr [rax+8], 0 mov rax, [rbp+var_A8] mov dword ptr [rax+4], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_A8] call c4_state_add_request mov [rbp+var_1], 0 loc_27A70: mov al, [rbp+var_1] and al, 1 add rsp, 0D0h pop rbp retn
char req_header( long long a1, int a2, long long *a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, long long a8, long long a9) { int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d int v13; // edx int v14; // r8d int v15; // r9d long long *v16; // rax long long v17; // rcx long long v18; // rcx long long v20; // [rsp+28h] [rbp-A8h] _QWORD v21[3]; // [rsp+30h] [rbp-A0h] BYREF _QWORD v22[3]; // [rsp+48h] [rbp-88h] BYREF _QWORD v23[3]; // [rsp+60h] [rbp-70h] BYREF long long v24; // [rsp+78h] [rbp-58h] BYREF long long v25; // [rsp+80h] [rbp-50h] long long v26; // [rsp+88h] [rbp-48h] long long data_request_by_url; // [rsp+90h] [rbp-40h] _BYTE v28[8]; // [rsp+98h] [rbp-38h] BYREF long long v29; // [rsp+A0h] [rbp-30h] long long *v30; // [rsp+B0h] [rbp-20h] int v31; // [rsp+BCh] [rbp-14h] long long v32; // [rsp+C0h] [rbp-10h] v32 = a1; v31 = a2; v30 = a3; memset(v28, 0LL, 24LL); if ( (_DWORD)a9 == 1 ) bprintf((unsigned int)v28, (unsigned int)"eth/v1/beacon/headers/%j", v9, a8, v11, v12, a7, a8, a9); else bprintf((unsigned int)v28, (unsigned int)"eth/v1/beacon/headers/head", v9, v10, v11, v12); data_request_by_url = c4_state_get_data_request_by_url(v32, v29); if ( data_request_by_url && (buffer_free(v28), *(_QWORD *)(data_request_by_url + 56)) ) { json_parse(&v24, *(_QWORD *)(data_request_by_url + 56)); if ( (_DWORD)v26 == 3 ) { json_get((unsigned int)v23, (unsigned int)"data", v13, v25, v14, v15, v24, v25, v26); v24 = v23[0]; v25 = v23[1]; v26 = v23[2]; } if ( (_DWORD)v26 == 3 ) { json_get((unsigned int)v22, (unsigned int)"header", v13, v25, v14, v15, v24, v25, v26); v24 = v22[0]; v25 = v22[1]; v26 = v22[2]; } if ( (_DWORD)v26 == 3 ) { json_get((unsigned int)v21, (unsigned int)"message", v13, v25, v14, v15, v24, v25, v26); v24 = v21[0]; v25 = v21[1]; v26 = v21[2]; } if ( (_DWORD)v26 == 3 ) { v16 = v30; *v30 = v24; v16[1] = v25; v16[2] = v26; return 1; } else { v17 = strdup("Invalid response for header"); *(_QWORD *)(v32 + 8) = v17; return 0; } } else if ( data_request_by_url && *(_QWORD *)(data_request_by_url + 72) ) { v18 = strdup(*(_QWORD *)(data_request_by_url + 72)); *(_QWORD *)(v32 + 8) = v18; return 0; } else { v20 = safe_calloc(1LL, 128LL); *(_DWORD *)v20 = v31; *(_QWORD *)(v20 + 16) = v29; *(_DWORD *)(v20 + 8) = 0; *(_DWORD *)(v20 + 4) = 0; c4_state_add_request(v32, v20); return 0; } }
req_header: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0xb0],RAX MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX LEA RDI,[RBP + -0x38] XOR ESI,ESI MOV EDX,0x18 CALL 0x001231c0 MOV RAX,qword ptr [RBP + -0xb0] CMP dword ptr [RAX + 0x10],0x1 JNZ 0x00127842 MOV RAX,qword ptr [RBP + -0xb0] LEA RDI,[RBP + -0x38] LEA RSI,[0x1dc6a4] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV AL,0x0 CALL 0x0019ebf0 JMP 0x00127854 LAB_00127842: LEA RDI,[RBP + -0x38] LEA RSI,[0x1dc6bd] MOV AL,0x0 CALL 0x0019ebf0 LAB_00127854: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] CALL 0x001a7810 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JZ 0x00127875 LEA RDI,[RBP + -0x38] CALL 0x0019e240 LAB_00127875: CMP qword ptr [RBP + -0x40],0x0 JZ 0x001279dd MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x38],0x0 JZ 0x001279dd MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x38] LEA RDI,[RBP + -0x58] CALL 0x001a51e0 CMP dword ptr [RBP + -0x48],0x3 JNZ 0x001278eb LEA RDI,[RBP + -0x70] LEA RAX,[RBP + -0x58] LEA RSI,[0x1dc60f] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a59b0 MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x48],RAX LAB_001278eb: CMP dword ptr [RBP + -0x48],0x3 JNZ 0x0012793c LEA RDI,[RBP + -0x88] LEA RAX,[RBP + -0x58] LEA RSI,[0x1dc6f5] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a59b0 MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x48],RAX LAB_0012793c: CMP dword ptr [RBP + -0x48],0x3 JNZ 0x00127993 LEA RDI,[RBP + -0xa0] LEA RAX,[RBP + -0x58] LEA RSI,[0x1dc6d8] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a59b0 MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x48],RAX LAB_00127993: CMP dword ptr [RBP + -0x48],0x3 JNZ 0x001279bd MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x00127a70 LAB_001279bd: LEA RDI,[0x1dc6e0] CALL 0x00123030 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00127a70 LAB_001279dd: CMP qword ptr [RBP + -0x40],0x0 JZ 0x00127a0d MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x48],0x0 JZ 0x00127a0d MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00123030 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00127a70 LAB_00127a0d: JMP 0x00127a0f LAB_00127a0f: MOV EDI,0x1 MOV ESI,0x80 CALL 0x0019dad0 MOV qword ptr [RBP + -0xa8],RAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0xa8] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0xa8] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0xa8] MOV dword ptr [RAX + 0x4],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0xa8] CALL 0x001a78b0 MOV byte ptr [RBP + -0x1],0x0 LAB_00127a70: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xd0 POP RBP RET
int1 req_header(long param_1,int4 param_2,int8 *param_3) { char *pcVar1; int4 *puVar2; int in_stack_00000018; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; long local_48; int1 local_40 [8]; int8 local_38; int8 *local_28; int4 local_1c; long local_18; int1 local_9; local_28 = param_3; local_1c = param_2; local_18 = param_1; memset(local_40,0,0x18); if (in_stack_00000018 == 1) { bprintf(local_40,"eth/v1/beacon/headers/%j"); } else { bprintf(local_40,"eth/v1/beacon/headers/head"); } local_48 = c4_state_get_data_request_by_url(local_18,local_38); if (local_48 != 0) { buffer_free(local_40); } if ((local_48 == 0) || (*(long *)(local_48 + 0x38) == 0)) { if ((local_48 == 0) || (*(long *)(local_48 + 0x48) == 0)) { puVar2 = (int4 *)safe_calloc(1,0x80); *puVar2 = local_1c; *(int8 *)(puVar2 + 4) = local_38; puVar2[2] = 0; puVar2[1] = 0; c4_state_add_request(local_18,puVar2); local_9 = 0; } else { pcVar1 = strdup(*(char **)(local_48 + 0x48)); *(char **)(local_18 + 8) = pcVar1; local_9 = 0; } } else { json_parse(&local_60,*(int8 *)(local_48 + 0x38)); if ((int)local_50 == 3) { json_get(&local_78,"data"); local_60 = local_78; local_58 = local_70; local_50 = local_68; } if ((int)local_50 == 3) { json_get(&local_90,"header"); local_60 = local_90; local_58 = local_88; local_50 = local_80; } if ((int)local_50 == 3) { json_get(&local_a8,"message"); local_60 = local_a8; local_58 = local_a0; local_50 = local_98; } if ((int)local_50 == 3) { *local_28 = local_60; local_28[1] = local_58; local_28[2] = local_50; local_9 = 1; } else { pcVar1 = strdup("Invalid response for header"); *(char **)(local_18 + 8) = pcVar1; local_9 = 0; } } return local_9; }
38,827
req_header
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) { buffer_t tmp = {0}; if (slot.type == JSON_TYPE_STRING) bprintf(&tmp, "eth/v1/beacon/headers/%j", slot); else bprintf(&tmp, "eth/v1/beacon/headers/head"); data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data); if (req) buffer_free(&tmp); if (req && req->response.data) { json_t res = json_parse((char*) req->response.data); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message"); if (res.type == JSON_TYPE_OBJECT) { *data = res; return true; } else { state->error = strdup("Invalid response for header"); return false; } } else if (req && req->error) { state->error = strdup(req->error); return false; } data_request_t* new_req = safe_calloc(1, sizeof(data_request_t)); new_req->chain_id = chain_id; new_req->url = (char*) tmp.data.data; new_req->encoding = C4_DATA_ENCODING_JSON; new_req->type = C4_DATA_TYPE_BEACON_API; c4_state_add_request(state, new_req); return false; }
O1
c
req_header: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) cmpl $0x1, 0xb0(%rsp) jne 0x26796 leaq 0xa0(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) leaq 0x5ee88(%rip), %rsi # 0x8561c jmp 0x2679d leaq 0x5ee98(%rip), %rsi # 0x85635 leaq 0x40(%rsp), %rdi xorl %eax, %eax callq 0x57769 movq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x5ce80 testq %rax, %rax je 0x268d9 movq %rax, %r15 leaq 0x40(%rsp), %rdi callq 0x57107 movq 0x38(%r15), %rsi testq %rsi, %rsi je 0x268c5 leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x5b748 cmpl $0x3, 0x10(%r15) jne 0x26826 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x5ed80(%rip), %rsi # 0x85587 leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x5bb90 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, 0x30(%rsp) jne 0x26866 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x5ee26(%rip), %rsi # 0x8566d leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x5bb90 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, 0x30(%rsp) jne 0x268a6 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x5edc9(%rip), %rsi # 0x85650 leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x5bb90 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, 0x30(%rsp) sete %bpl jne 0x2690a movq 0x30(%rsp), %rax movq %rax, 0x10(%r14) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%r14) jmp 0x2691a movq 0x48(%r15), %rdi testq %rdi, %rdi je 0x268d9 callq 0x22030 movq %rax, 0x8(%rbx) jmp 0x26906 movl $0x1, %edi movl $0x80, %esi callq 0x56f2f movl %ebp, (%rax) movq 0x48(%rsp), %rcx movq %rcx, 0x10(%rax) movq $0x0, 0x4(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x5cecd xorl %ebp, %ebp jmp 0x2691a leaq 0x5ed47(%rip), %rdi # 0x85658 callq 0x22030 movq %rax, 0x8(%rbx) movl %ebp, %eax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
req_header: push rbp push r15 push r14 push rbx sub rsp, 78h mov r14, rdx mov ebp, esi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+98h+var_58], xmm0 mov [rsp+98h+var_48], 0 cmp [rsp+98h+arg_10], 1 jnz short loc_26796 lea rax, [rsp+98h+arg_0] mov rcx, [rax+10h] mov [rsp+98h+var_88], rcx movups xmm0, xmmword ptr [rax] movups [rsp+98h+var_98], xmm0 lea rsi, aEthV1BeaconHea; "eth/v1/beacon/headers/%j" jmp short loc_2679D loc_26796: lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/head" loc_2679D: lea rdi, [rsp+98h+var_58] xor eax, eax call bprintf mov rsi, qword ptr [rsp+98h+var_58+8] mov rdi, rbx call c4_state_get_data_request_by_url test rax, rax jz loc_268D9 mov r15, rax lea rdi, [rsp+98h+var_58] call buffer_free mov rsi, [r15+38h] test rsi, rsi jz loc_268C5 lea r15, [rsp+98h+var_78] mov rdi, r15 call json_parse cmp dword ptr [r15+10h], 3 jnz short loc_26826 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aSyncData+5; "data" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 loc_26826: cmp dword ptr [rsp+98h+var_68], 3 jnz short loc_26866 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aInvalidRespons+15h; "header" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 loc_26866: cmp dword ptr [rsp+98h+var_68], 3 jnz short loc_268A6 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aMessage; "message" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 loc_268A6: cmp dword ptr [rsp+98h+var_68], 3 setz bpl jnz short loc_2690A mov rax, [rsp+98h+var_68] mov [r14+10h], rax movaps xmm0, [rsp+98h+var_78] movups xmmword ptr [r14], xmm0 jmp short loc_2691A loc_268C5: mov rdi, [r15+48h] test rdi, rdi jz short loc_268D9 call _strdup mov [rbx+8], rax jmp short loc_26906 loc_268D9: mov edi, 1 mov esi, 80h call safe_calloc mov [rax], ebp mov rcx, qword ptr [rsp+98h+var_58+8] mov [rax+10h], rcx mov qword ptr [rax+4], 0 mov rdi, rbx mov rsi, rax call c4_state_add_request loc_26906: xor ebp, ebp jmp short loc_2691A loc_2690A: lea rdi, aInvalidRespons; "Invalid response for header" call _strdup mov [rbx+8], rax loc_2691A: mov eax, ebp add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn
long long req_header( long long a1, unsigned int a2, long long a3, int a4, int a5, int a6, long long a7, long long a8, long long a9) { long long data_request_by_url; // rax long long v13; // r15 long long v14; // rsi int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d long long v19; // rdi long long v20; // rax __int128 v22; // [rsp+20h] [rbp-78h] BYREF long long v23; // [rsp+30h] [rbp-68h] __int128 v24; // [rsp+40h] [rbp-58h] BYREF long long v25; // [rsp+50h] [rbp-48h] __int128 v26; // [rsp+60h] [rbp-38h] BYREF long long v27; // [rsp+70h] [rbp-28h] v24 = 0LL; v25 = 0LL; if ( (_DWORD)a9 == 1 ) bprintf((unsigned int)&v24, (unsigned int)"eth/v1/beacon/headers/%j", a3, 1, a5, a6, a7, a8, a9); else bprintf((unsigned int)&v24, (unsigned int)"eth/v1/beacon/headers/head", a3, a4, a5, a6); data_request_by_url = c4_state_get_data_request_by_url(a1, *((_QWORD *)&v24 + 1)); if ( !data_request_by_url ) goto LABEL_16; v13 = data_request_by_url; buffer_free(&v24); v14 = *(_QWORD *)(v13 + 56); if ( !v14 ) { v19 = *(_QWORD *)(v13 + 72); if ( v19 ) { *(_QWORD *)(a1 + 8) = strdup(v19); return 0; } LABEL_16: v20 = safe_calloc(1LL, 128LL); *(_DWORD *)v20 = a2; *(_QWORD *)(v20 + 16) = *((_QWORD *)&v24 + 1); *(_QWORD *)(v20 + 4) = 0LL; c4_state_add_request(a1, v20); return 0; } json_parse(&v22, v14); if ( (_DWORD)v23 == 3 ) { json_get((unsigned int)&v26, (unsigned int)"data", v15, v16, v17, v18, v22, v23); v23 = v27; v22 = v26; } if ( (_DWORD)v23 == 3 ) { json_get((unsigned int)&v26, (unsigned int)"header", v15, v16, v17, v18, v22, v23); v23 = v27; v22 = v26; } if ( (_DWORD)v23 == 3 ) { json_get((unsigned int)&v26, (unsigned int)"message", v15, v16, v17, v18, v22, v23); v23 = v27; v22 = v26; } LOBYTE(a2) = (_DWORD)v23 == 3; if ( (_DWORD)v23 == 3 ) { *(_QWORD *)(a3 + 16) = v23; *(_OWORD *)a3 = v22; } else { *(_QWORD *)(a1 + 8) = strdup("Invalid response for header"); } return a2; }
req_header: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV EBP,ESI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 CMP dword ptr [RSP + 0xb0],0x1 JNZ 0x00126796 LEA RAX,[RSP + 0xa0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x18561c] JMP 0x0012679d LAB_00126796: LEA RSI,[0x185635] LAB_0012679d: LEA RDI,[RSP + 0x40] XOR EAX,EAX CALL 0x00157769 MOV RSI,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x0015ce80 TEST RAX,RAX JZ 0x001268d9 MOV R15,RAX LEA RDI,[RSP + 0x40] CALL 0x00157107 MOV RSI,qword ptr [R15 + 0x38] TEST RSI,RSI JZ 0x001268c5 LEA R15,[RSP + 0x20] MOV RDI,R15 CALL 0x0015b748 CMP dword ptr [R15 + 0x10],0x3 JNZ 0x00126826 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x185587] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x0015bb90 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LAB_00126826: CMP dword ptr [RSP + 0x30],0x3 JNZ 0x00126866 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x18566d] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x0015bb90 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LAB_00126866: CMP dword ptr [RSP + 0x30],0x3 JNZ 0x001268a6 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x185650] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x0015bb90 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LAB_001268a6: CMP dword ptr [RSP + 0x30],0x3 SETZ BPL JNZ 0x0012690a MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [R14 + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [R14],XMM0 JMP 0x0012691a LAB_001268c5: MOV RDI,qword ptr [R15 + 0x48] TEST RDI,RDI JZ 0x001268d9 CALL 0x00122030 MOV qword ptr [RBX + 0x8],RAX JMP 0x00126906 LAB_001268d9: MOV EDI,0x1 MOV ESI,0x80 CALL 0x00156f2f MOV dword ptr [RAX],EBP MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x4],0x0 MOV RDI,RBX MOV RSI,RAX CALL 0x0015cecd LAB_00126906: XOR EBP,EBP JMP 0x0012691a LAB_0012690a: LEA RDI,[0x185658] CALL 0x00122030 MOV qword ptr [RBX + 0x8],RAX LAB_0012691a: MOV EAX,EBP ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET
ulong req_header(long param_1,int8 param_2,int8 *param_3) { long lVar1; int4 *puVar2; ulong uVar3; char *pcVar4; int in_stack_00000018; int8 local_78; int8 uStack_70; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int8 local_38; int8 uStack_30; int8 local_28; local_58 = 0; uStack_50 = 0; local_48 = 0; if (in_stack_00000018 == 1) { pcVar4 = "eth/v1/beacon/headers/%j"; } else { pcVar4 = "eth/v1/beacon/headers/head"; } bprintf(&local_58,pcVar4); lVar1 = c4_state_get_data_request_by_url(param_1,uStack_50); if (lVar1 != 0) { buffer_free(&local_58); if (*(long *)(lVar1 + 0x38) != 0) { json_parse(&local_78); if ((int)local_68 == 3) { json_get(&local_38,"data"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; } if ((int)local_68 == 3) { json_get(&local_38,"header"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; } if ((int)local_68 == 3) { json_get(&local_38,"message"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; } uVar3 = CONCAT71((int7)((ulong)param_2 >> 8),(int)local_68 == 3) & 0xffffffff; if ((int)local_68 != 3) { pcVar4 = strdup("Invalid response for header"); *(char **)(param_1 + 8) = pcVar4; return uVar3; } param_3[2] = local_68; *param_3 = local_78; param_3[1] = uStack_70; return uVar3; } if (*(char **)(lVar1 + 0x48) != (char *)0x0) { pcVar4 = strdup(*(char **)(lVar1 + 0x48)); *(char **)(param_1 + 8) = pcVar4; return 0; } } puVar2 = (int4 *)safe_calloc(1,0x80); *puVar2 = (int)param_2; *(int8 *)(puVar2 + 4) = uStack_50; *(int8 *)(puVar2 + 1) = 0; c4_state_add_request(param_1,puVar2); return 0; }
38,828
req_header
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) { buffer_t tmp = {0}; if (slot.type == JSON_TYPE_STRING) bprintf(&tmp, "eth/v1/beacon/headers/%j", slot); else bprintf(&tmp, "eth/v1/beacon/headers/head"); data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data); if (req) buffer_free(&tmp); if (req && req->response.data) { json_t res = json_parse((char*) req->response.data); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message"); if (res.type == JSON_TYPE_OBJECT) { *data = res; return true; } else { state->error = strdup("Invalid response for header"); return false; } } else if (req && req->error) { state->error = strdup(req->error); return false; } data_request_t* new_req = safe_calloc(1, sizeof(data_request_t)); new_req->chain_id = chain_id; new_req->url = (char*) tmp.data.data; new_req->encoding = C4_DATA_ENCODING_JSON; new_req->type = C4_DATA_TYPE_BEACON_API; c4_state_add_request(state, new_req); return false; }
O2
c
req_header: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx andq $0x0, 0x50(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) cmpl $0x1, 0xb0(%rsp) jne 0x2550a leaq 0xa0(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) leaq 0x4f114(%rip), %rsi # 0x7461c jmp 0x25511 leaq 0x4f124(%rip), %rsi # 0x74635 leaq 0x40(%rsp), %rdi xorl %eax, %eax callq 0x4b737 movq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x505ab testq %rax, %rax je 0x25656 movq %rax, %r15 leaq 0x40(%rsp), %rdi callq 0x4b16d movq 0x38(%r15), %rsi testq %rsi, %rsi je 0x25642 leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x4f17c cmpl $0x3, 0x10(%r15) jne 0x25639 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x4f008(%rip), %rsi # 0x74587 leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x4f541 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, %eax jne 0x25639 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x4f0ac(%rip), %rsi # 0x7466d leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x4f541 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, %eax jne 0x25639 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x4f051(%rip), %rsi # 0x74650 leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x4f541 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, %eax jne 0x25639 movq 0x30(%rsp), %rax movq %rax, 0x10(%r14) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%r14) movb $0x1, %al jmp 0x25680 leaq 0x4f018(%rip), %rdi # 0x74658 jmp 0x2564b movq 0x48(%r15), %rdi testq %rdi, %rdi je 0x25656 callq 0x22030 movq %rax, 0x8(%rbx) jmp 0x2567e pushq $0x1 popq %rdi movl $0x80, %esi callq 0x4af39 movl %ebp, (%rax) movq 0x48(%rsp), %rcx movq %rcx, 0x10(%rax) andq $0x0, 0x4(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x505f6 xorl %eax, %eax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
req_header: push rbp push r15 push r14 push rbx sub rsp, 78h mov r14, rdx mov ebp, esi mov rbx, rdi and [rsp+98h+var_48], 0 xorps xmm0, xmm0 movaps [rsp+98h+var_58], xmm0 cmp [rsp+98h+arg_10], 1 jnz short loc_2550A lea rax, [rsp+98h+arg_0] mov rcx, [rax+10h] mov [rsp+98h+var_88], rcx movups xmm0, xmmword ptr [rax] movups [rsp+98h+var_98], xmm0 lea rsi, aEthV1BeaconHea; "eth/v1/beacon/headers/%j" jmp short loc_25511 loc_2550A: lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/head" loc_25511: lea rdi, [rsp+98h+var_58] xor eax, eax call bprintf mov rsi, qword ptr [rsp+98h+var_58+8] mov rdi, rbx call c4_state_get_data_request_by_url test rax, rax jz loc_25656 mov r15, rax lea rdi, [rsp+98h+var_58] call buffer_free mov rsi, [r15+38h] test rsi, rsi jz loc_25642 lea r15, [rsp+98h+var_78] mov rdi, r15 call json_parse cmp dword ptr [r15+10h], 3 jnz loc_25639 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aSyncData+5; "data" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 cmp eax, 3 jnz loc_25639 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aInvalidRespons+15h; "header" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 cmp eax, 3 jnz short loc_25639 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aMessage; "message" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 cmp eax, 3 jnz short loc_25639 mov rax, [rsp+98h+var_68] mov [r14+10h], rax movaps xmm0, [rsp+98h+var_78] movups xmmword ptr [r14], xmm0 mov al, 1 jmp short loc_25680 loc_25639: lea rdi, aInvalidRespons; "Invalid response for header" jmp short loc_2564B loc_25642: mov rdi, [r15+48h] test rdi, rdi jz short loc_25656 loc_2564B: call _strdup mov [rbx+8], rax jmp short loc_2567E loc_25656: push 1 pop rdi mov esi, 80h call safe_calloc mov [rax], ebp mov rcx, qword ptr [rsp+98h+var_58+8] mov [rax+10h], rcx and qword ptr [rax+4], 0 mov rdi, rbx mov rsi, rax call c4_state_add_request loc_2567E: xor eax, eax loc_25680: add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn
char req_header(long long a1, int a2, long long a3, int a4, int a5, int a6, long long a7, long long a8, long long a9) { long long data_request_by_url; // rax long long v13; // r15 long long v14; // rsi int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v23; // edx int v24; // ecx int v25; // r8d int v26; // r9d const char *v28; // rdi long long v29; // rax __int128 v30; // [rsp+20h] [rbp-78h] BYREF long long v31; // [rsp+30h] [rbp-68h] __int128 v32; // [rsp+40h] [rbp-58h] BYREF long long v33; // [rsp+50h] [rbp-48h] __int128 v34; // [rsp+60h] [rbp-38h] BYREF long long v35; // [rsp+70h] [rbp-28h] v33 = 0LL; v32 = 0LL; if ( (_DWORD)a9 == 1 ) bprintf((unsigned int)&v32, (unsigned int)"eth/v1/beacon/headers/%j", a3, 1, a5, a6, a7, a8, a9); else bprintf((unsigned int)&v32, (unsigned int)"eth/v1/beacon/headers/head", a3, a4, a5, a6); data_request_by_url = c4_state_get_data_request_by_url(a1, *((_QWORD *)&v32 + 1)); if ( !data_request_by_url ) goto LABEL_14; v13 = data_request_by_url; buffer_free(&v32); v14 = *(_QWORD *)(v13 + 56); if ( v14 ) { json_parse(&v30, v14); if ( (_DWORD)v31 == 3 ) { json_get((unsigned int)&v34, (unsigned int)"data", v15, v16, v17, v18, v30, v31); v31 = v35; v30 = v34; if ( (_DWORD)v35 == 3 ) { json_get((unsigned int)&v34, (unsigned int)"header", v19, v20, v21, v22, v30, v31); v31 = v35; v30 = v34; if ( (_DWORD)v35 == 3 ) { json_get((unsigned int)&v34, (unsigned int)"message", v23, v24, v25, v26, v30, v31); v31 = v35; v30 = v34; if ( (_DWORD)v35 == 3 ) { *(_QWORD *)(a3 + 16) = v31; *(_OWORD *)a3 = v30; return 1; } } } } v28 = "Invalid response for header"; goto LABEL_13; } v28 = *(const char **)(v13 + 72); if ( !v28 ) { LABEL_14: v29 = safe_calloc(1LL, 128LL); *(_DWORD *)v29 = a2; *(_QWORD *)(v29 + 16) = *((_QWORD *)&v32 + 1); *(_QWORD *)(v29 + 4) = 0LL; c4_state_add_request(a1, v29); return 0; } LABEL_13: *(_QWORD *)(a1 + 8) = strdup(v28); return 0; }
req_header: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV EBP,ESI MOV RBX,RDI AND qword ptr [RSP + 0x50],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 CMP dword ptr [RSP + 0xb0],0x1 JNZ 0x0012550a LEA RAX,[RSP + 0xa0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x17461c] JMP 0x00125511 LAB_0012550a: LEA RSI,[0x174635] LAB_00125511: LEA RDI,[RSP + 0x40] XOR EAX,EAX CALL 0x0014b737 MOV RSI,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x001505ab TEST RAX,RAX JZ 0x00125656 MOV R15,RAX LEA RDI,[RSP + 0x40] CALL 0x0014b16d MOV RSI,qword ptr [R15 + 0x38] TEST RSI,RSI JZ 0x00125642 LEA R15,[RSP + 0x20] MOV RDI,R15 CALL 0x0014f17c CMP dword ptr [R15 + 0x10],0x3 JNZ 0x00125639 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x174587] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x0014f541 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP EAX,0x3 JNZ 0x00125639 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x17466d] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x0014f541 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP EAX,0x3 JNZ 0x00125639 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x174650] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x0014f541 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP EAX,0x3 JNZ 0x00125639 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [R14 + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [R14],XMM0 MOV AL,0x1 JMP 0x00125680 LAB_00125639: LEA RDI,[0x174658] JMP 0x0012564b LAB_00125642: MOV RDI,qword ptr [R15 + 0x48] TEST RDI,RDI JZ 0x00125656 LAB_0012564b: CALL 0x00122030 MOV qword ptr [RBX + 0x8],RAX JMP 0x0012567e LAB_00125656: PUSH 0x1 POP RDI MOV ESI,0x80 CALL 0x0014af39 MOV dword ptr [RAX],EBP MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x10],RCX AND qword ptr [RAX + 0x4],0x0 MOV RDI,RBX MOV RSI,RAX CALL 0x001505f6 LAB_0012567e: XOR EAX,EAX LAB_00125680: ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET
int8 req_header(long param_1,int4 param_2,int8 *param_3) { long lVar1; int4 *puVar2; char *pcVar3; int in_stack_00000018; int8 local_78; int8 uStack_70; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int8 local_38; int8 uStack_30; int8 local_28; local_48 = 0; local_58 = 0; uStack_50 = 0; if (in_stack_00000018 == 1) { pcVar3 = "eth/v1/beacon/headers/%j"; } else { pcVar3 = "eth/v1/beacon/headers/head"; } bprintf(&local_58,pcVar3); lVar1 = c4_state_get_data_request_by_url(param_1,uStack_50); if (lVar1 == 0) { LAB_00125656: puVar2 = (int4 *)safe_calloc(1,0x80); *puVar2 = param_2; *(int8 *)(puVar2 + 4) = uStack_50; *(int8 *)(puVar2 + 1) = 0; c4_state_add_request(param_1,puVar2); } else { buffer_free(&local_58); if (*(long *)(lVar1 + 0x38) == 0) { pcVar3 = *(char **)(lVar1 + 0x48); if (pcVar3 == (char *)0x0) goto LAB_00125656; } else { json_parse(&local_78); if ((int)local_68 == 3) { json_get(&local_38,"data"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; if ((int)local_28 == 3) { json_get(&local_38,"header"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; if ((int)local_28 == 3) { json_get(&local_38,"message"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; if ((int)local_28 == 3) { param_3[2] = local_28; *param_3 = local_38; param_3[1] = uStack_30; return 1; } } } } pcVar3 = "Invalid response for header"; } pcVar3 = strdup(pcVar3); *(char **)(param_1 + 8) = pcVar3; } return 0; }
38,829
req_header
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
static bool req_header(c4_state_t* state, json_t slot, chain_id_t chain_id, json_t* data) { buffer_t tmp = {0}; if (slot.type == JSON_TYPE_STRING) bprintf(&tmp, "eth/v1/beacon/headers/%j", slot); else bprintf(&tmp, "eth/v1/beacon/headers/head"); data_request_t* req = c4_state_get_data_request_by_url(state, (char*) tmp.data.data); if (req) buffer_free(&tmp); if (req && req->response.data) { json_t res = json_parse((char*) req->response.data); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "data"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "header"); if (res.type == JSON_TYPE_OBJECT) res = json_get(res, "message"); if (res.type == JSON_TYPE_OBJECT) { *data = res; return true; } else { state->error = strdup("Invalid response for header"); return false; } } else if (req && req->error) { state->error = strdup(req->error); return false; } data_request_t* new_req = safe_calloc(1, sizeof(data_request_t)); new_req->chain_id = chain_id; new_req->url = (char*) tmp.data.data; new_req->encoding = C4_DATA_ENCODING_JSON; new_req->type = C4_DATA_TYPE_BEACON_API; c4_state_add_request(state, new_req); return false; }
O3
c
req_header: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) cmpl $0x1, 0xb0(%rsp) jne 0x262d1 leaq 0xa0(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) leaq 0x5b34d(%rip), %rsi # 0x8161c jmp 0x262d8 leaq 0x5b35d(%rip), %rsi # 0x81635 leaq 0x40(%rsp), %rdi xorl %eax, %eax callq 0x53780 movq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x58900 testq %rax, %rax je 0x2641d movq %rax, %r15 leaq 0x40(%rsp), %rdi callq 0x5310b movq 0x38(%r15), %rsi testq %rsi, %rsi je 0x26409 leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x57320 cmpl $0x3, 0x10(%r15) jne 0x26400 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x5b241(%rip), %rsi # 0x81587 leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x57731 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, %eax jne 0x26400 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x5b2e5(%rip), %rsi # 0x8166d leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x57731 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, %eax jne 0x26400 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x5b28a(%rip), %rsi # 0x81650 leaq 0x60(%rsp), %r15 movq %r15, %rdi callq 0x57731 movq 0x10(%r15), %rax movq %rax, 0x30(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x20(%rsp) cmpl $0x3, %eax jne 0x26400 movq 0x30(%rsp), %rax movq %rax, 0x10(%r14) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%r14) movb $0x1, %al jmp 0x2644c leaq 0x5b251(%rip), %rdi # 0x81658 jmp 0x26412 movq 0x48(%r15), %rdi testq %rdi, %rdi je 0x2641d callq 0x22030 movq %rax, 0x8(%rbx) jmp 0x2644a movl $0x1, %edi movl $0x80, %esi callq 0x52f3b movl %ebp, (%rax) movq 0x48(%rsp), %rcx movq %rcx, 0x10(%rax) movq $0x0, 0x4(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x5894d xorl %eax, %eax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
req_header: push rbp push r15 push r14 push rbx sub rsp, 78h mov r14, rdx mov ebp, esi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+98h+var_58], xmm0 mov [rsp+98h+var_48], 0 cmp [rsp+98h+arg_10], 1 jnz short loc_262D1 lea rax, [rsp+98h+arg_0] mov rcx, [rax+10h] mov [rsp+98h+var_88], rcx movups xmm0, xmmword ptr [rax] movups [rsp+98h+var_98], xmm0 lea rsi, aEthV1BeaconHea; "eth/v1/beacon/headers/%j" jmp short loc_262D8 loc_262D1: lea rsi, aEthV1BeaconHea_0; "eth/v1/beacon/headers/head" loc_262D8: lea rdi, [rsp+98h+var_58] xor eax, eax call bprintf mov rsi, qword ptr [rsp+98h+var_58+8] mov rdi, rbx call c4_state_get_data_request_by_url test rax, rax jz loc_2641D mov r15, rax lea rdi, [rsp+98h+var_58] call buffer_free mov rsi, [r15+38h] test rsi, rsi jz loc_26409 lea r15, [rsp+98h+var_78] mov rdi, r15 call json_parse cmp dword ptr [r15+10h], 3 jnz loc_26400 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aSyncData+5; "data" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 cmp eax, 3 jnz loc_26400 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aInvalidRespons+15h; "header" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 cmp eax, 3 jnz short loc_26400 mov rax, [rsp+98h+var_68] mov [rsp+98h+var_88], rax movaps xmm0, [rsp+98h+var_78] movups [rsp+98h+var_98], xmm0 lea rsi, aMessage; "message" lea r15, [rsp+98h+var_38] mov rdi, r15 call json_get mov rax, [r15+10h] mov [rsp+98h+var_68], rax movups xmm0, xmmword ptr [r15] movaps [rsp+98h+var_78], xmm0 cmp eax, 3 jnz short loc_26400 mov rax, [rsp+98h+var_68] mov [r14+10h], rax movaps xmm0, [rsp+98h+var_78] movups xmmword ptr [r14], xmm0 mov al, 1 jmp short loc_2644C loc_26400: lea rdi, aInvalidRespons; "Invalid response for header" jmp short loc_26412 loc_26409: mov rdi, [r15+48h] test rdi, rdi jz short loc_2641D loc_26412: call _strdup mov [rbx+8], rax jmp short loc_2644A loc_2641D: mov edi, 1 mov esi, 80h call safe_calloc mov [rax], ebp mov rcx, qword ptr [rsp+98h+var_58+8] mov [rax+10h], rcx mov qword ptr [rax+4], 0 mov rdi, rbx mov rsi, rax call c4_state_add_request loc_2644A: xor eax, eax loc_2644C: add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn
char req_header(long long a1, int a2, long long a3, int a4, int a5, int a6, long long a7, long long a8, long long a9) { long long data_request_by_url; // rax long long v13; // r15 long long v14; // rsi int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v23; // edx int v24; // ecx int v25; // r8d int v26; // r9d const char *v28; // rdi long long v29; // rax __int128 v30; // [rsp+20h] [rbp-78h] BYREF long long v31; // [rsp+30h] [rbp-68h] __int128 v32; // [rsp+40h] [rbp-58h] BYREF long long v33; // [rsp+50h] [rbp-48h] __int128 v34; // [rsp+60h] [rbp-38h] BYREF long long v35; // [rsp+70h] [rbp-28h] v32 = 0LL; v33 = 0LL; if ( (_DWORD)a9 == 1 ) bprintf((unsigned int)&v32, (unsigned int)"eth/v1/beacon/headers/%j", a3, 1, a5, a6, a7, a8, a9); else bprintf((unsigned int)&v32, (unsigned int)"eth/v1/beacon/headers/head", a3, a4, a5, a6); data_request_by_url = c4_state_get_data_request_by_url(a1, *((_QWORD *)&v32 + 1)); if ( !data_request_by_url ) goto LABEL_14; v13 = data_request_by_url; buffer_free(&v32); v14 = *(_QWORD *)(v13 + 56); if ( v14 ) { json_parse(&v30, v14); if ( (_DWORD)v31 == 3 ) { json_get((unsigned int)&v34, (unsigned int)"data", v15, v16, v17, v18, v30, v31); v31 = v35; v30 = v34; if ( (_DWORD)v35 == 3 ) { json_get((unsigned int)&v34, (unsigned int)"header", v19, v20, v21, v22, v30, v31); v31 = v35; v30 = v34; if ( (_DWORD)v35 == 3 ) { json_get((unsigned int)&v34, (unsigned int)"message", v23, v24, v25, v26, v30, v31); v31 = v35; v30 = v34; if ( (_DWORD)v35 == 3 ) { *(_QWORD *)(a3 + 16) = v31; *(_OWORD *)a3 = v30; return 1; } } } } v28 = "Invalid response for header"; goto LABEL_13; } v28 = *(const char **)(v13 + 72); if ( !v28 ) { LABEL_14: v29 = safe_calloc(1LL, 128LL); *(_DWORD *)v29 = a2; *(_QWORD *)(v29 + 16) = *((_QWORD *)&v32 + 1); *(_QWORD *)(v29 + 4) = 0LL; c4_state_add_request(a1, v29); return 0; } LABEL_13: *(_QWORD *)(a1 + 8) = strdup(v28); return 0; }
req_header: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV EBP,ESI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 CMP dword ptr [RSP + 0xb0],0x1 JNZ 0x001262d1 LEA RAX,[RSP + 0xa0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x18161c] JMP 0x001262d8 LAB_001262d1: LEA RSI,[0x181635] LAB_001262d8: LEA RDI,[RSP + 0x40] XOR EAX,EAX CALL 0x00153780 MOV RSI,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x00158900 TEST RAX,RAX JZ 0x0012641d MOV R15,RAX LEA RDI,[RSP + 0x40] CALL 0x0015310b MOV RSI,qword ptr [R15 + 0x38] TEST RSI,RSI JZ 0x00126409 LEA R15,[RSP + 0x20] MOV RDI,R15 CALL 0x00157320 CMP dword ptr [R15 + 0x10],0x3 JNZ 0x00126400 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x181587] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x00157731 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP EAX,0x3 JNZ 0x00126400 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x18166d] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x00157731 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP EAX,0x3 JNZ 0x00126400 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x181650] LEA R15,[RSP + 0x60] MOV RDI,R15 CALL 0x00157731 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP EAX,0x3 JNZ 0x00126400 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [R14 + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [R14],XMM0 MOV AL,0x1 JMP 0x0012644c LAB_00126400: LEA RDI,[0x181658] JMP 0x00126412 LAB_00126409: MOV RDI,qword ptr [R15 + 0x48] TEST RDI,RDI JZ 0x0012641d LAB_00126412: CALL 0x00122030 MOV qword ptr [RBX + 0x8],RAX JMP 0x0012644a LAB_0012641d: MOV EDI,0x1 MOV ESI,0x80 CALL 0x00152f3b MOV dword ptr [RAX],EBP MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x4],0x0 MOV RDI,RBX MOV RSI,RAX CALL 0x0015894d LAB_0012644a: XOR EAX,EAX LAB_0012644c: ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET
int8 req_header(long param_1,int4 param_2,int8 *param_3) { long lVar1; int4 *puVar2; char *pcVar3; int in_stack_00000018; int8 local_78; int8 uStack_70; int8 local_68; int8 local_58; int8 uStack_50; int8 local_48; int8 local_38; int8 uStack_30; int8 local_28; local_58 = 0; uStack_50 = 0; local_48 = 0; if (in_stack_00000018 == 1) { pcVar3 = "eth/v1/beacon/headers/%j"; } else { pcVar3 = "eth/v1/beacon/headers/head"; } bprintf(&local_58,pcVar3); lVar1 = c4_state_get_data_request_by_url(param_1,uStack_50); if (lVar1 == 0) { LAB_0012641d: puVar2 = (int4 *)safe_calloc(1,0x80); *puVar2 = param_2; *(int8 *)(puVar2 + 4) = uStack_50; *(int8 *)(puVar2 + 1) = 0; c4_state_add_request(param_1,puVar2); } else { buffer_free(&local_58); if (*(long *)(lVar1 + 0x38) == 0) { pcVar3 = *(char **)(lVar1 + 0x48); if (pcVar3 == (char *)0x0) goto LAB_0012641d; } else { json_parse(&local_78); if ((int)local_68 == 3) { json_get(&local_38,"data"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; if ((int)local_28 == 3) { json_get(&local_38,"header"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; if ((int)local_28 == 3) { json_get(&local_38,"message"); local_68 = local_28; local_78 = local_38; uStack_70 = uStack_30; if ((int)local_28 == 3) { param_3[2] = local_28; *param_3 = local_38; param_3[1] = uStack_30; return 1; } } } } pcVar3 = "Invalid response for header"; } pcVar3 = strdup(pcVar3); *(char **)(param_1 + 8) = pcVar3; } return 0; }
38,830
my_coll_lexem_print_error
eloqsql/strings/ctype-uca.c
static void my_coll_lexem_print_error(MY_COLL_LEXEM *lexem, char *errstr, size_t errsize, const char *txt) { char tail[30]; size_t len= lexem->end - lexem->prev; strmake (tail, lexem->prev, (size_t) MY_MIN(len, sizeof(tail)-1)); errstr[errsize-1]= '\0'; my_snprintf(errstr, errsize - 1, "%s at '%s'", txt[0] ? txt : "Syntax error", tail); }
O0
c
my_coll_lexem_print_error: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x38(%rbp) movq %rsi, -0x40(%rbp) movq %rdx, -0x48(%rbp) movq %rcx, -0x50(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq -0x38(%rbp), %rcx movq 0x18(%rcx), %rcx subq %rcx, %rax movq %rax, -0x58(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x60(%rbp) cmpq $0x1d, -0x58(%rbp) jae 0xacf74 movq -0x58(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0xacf7f movl $0x1d, %eax movq %rax, -0x70(%rbp) jmp 0xacf7f movq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdi movq -0x70(%rbp), %rdx callq 0xd5860 movq -0x40(%rbp), %rax movq -0x48(%rbp), %rcx subq $0x1, %rcx movb $0x0, (%rax,%rcx) movq -0x40(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x48(%rbp), %rax subq $0x1, %rax movq %rax, -0x78(%rbp) movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xacfcd movq -0x50(%rbp), %rax movq %rax, -0x88(%rbp) jmp 0xacfdd leaq 0x378e3(%rip), %rax # 0xe48b7 movq %rax, -0x88(%rbp) jmp 0xacfdd movq -0x78(%rbp), %rsi movq -0x80(%rbp), %rdi movq -0x88(%rbp), %rcx leaq 0x378b9(%rip), %rdx # 0xe48ac xorl %eax, %eax leaq -0x30(%rbp), %r8 callq 0xd4cd0 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xad019 addq $0x90, %rsp popq %rbp retq callq 0x382c0 nop
my_coll_lexem_print_error: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_38], rdi mov [rbp+var_40], rsi mov [rbp+var_48], rdx mov [rbp+var_50], rcx mov rax, [rbp+var_38] mov rax, [rax+10h] mov rcx, [rbp+var_38] mov rcx, [rcx+18h] sub rax, rcx mov [rbp+var_58], rax lea rax, [rbp+var_30] mov [rbp+var_68], rax mov rax, [rbp+var_38] mov rax, [rax+18h] mov [rbp+var_60], rax cmp [rbp+var_58], 1Dh jnb short loc_ACF74 mov rax, [rbp+var_58] mov [rbp+var_70], rax jmp short loc_ACF7F loc_ACF74: mov eax, 1Dh mov [rbp+var_70], rax jmp short $+2 loc_ACF7F: mov rsi, [rbp+var_60] mov rdi, [rbp+var_68] mov rdx, [rbp+var_70] call strmake mov rax, [rbp+var_40] mov rcx, [rbp+var_48] sub rcx, 1 mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_40] mov [rbp+var_80], rax mov rax, [rbp+var_48] sub rax, 1 mov [rbp+var_78], rax mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_ACFCD mov rax, [rbp+var_50] mov [rbp+var_88], rax jmp short loc_ACFDD loc_ACFCD: lea rax, aSyntaxError; "Syntax error" mov [rbp+var_88], rax jmp short $+2 loc_ACFDD: mov rsi, [rbp+var_78] mov rdi, [rbp+var_80] mov rcx, [rbp+var_88] lea rdx, aSAtS; "%s at '%s'" xor eax, eax lea r8, [rbp+var_30] call my_snprintf mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_AD019 add rsp, 90h pop rbp retn loc_AD019: call ___stack_chk_fail
unsigned long long my_coll_lexem_print_error(long long a1, long long a2, long long a3, _BYTE *a4) { int v4; // r9d int v6; // [rsp+18h] [rbp-78h] long long v7; // [rsp+30h] [rbp-60h] unsigned long long v8; // [rsp+38h] [rbp-58h] _BYTE v11[40]; // [rsp+60h] [rbp-30h] BYREF unsigned long long v12; // [rsp+88h] [rbp-8h] v12 = __readfsqword(0x28u); v8 = *(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 24); v7 = *(_QWORD *)(a1 + 24); if ( v8 >= 0x1D ) strmake(v11, v7, 29LL); else strmake(v11, v7, v8); *(_BYTE *)(a2 + a3 - 1) = 0; v6 = a3 - 1; if ( *a4 ) my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (_DWORD)a4, (unsigned int)v11, v4); else my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (unsigned int)"Syntax error", (unsigned int)v11, v4); return __readfsqword(0x28u); }
my_coll_lexem_print_error: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV qword ptr [RBP + -0x48],RDX MOV qword ptr [RBP + -0x50],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x58],RAX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x58],0x1d JNC 0x001acf74 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x70],RAX JMP 0x001acf7f LAB_001acf74: MOV EAX,0x1d MOV qword ptr [RBP + -0x70],RAX JMP 0x001acf7f LAB_001acf7f: MOV RSI,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x70] CALL 0x001d5860 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x48] SUB RCX,0x1 MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x48] SUB RAX,0x1 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001acfcd MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x88],RAX JMP 0x001acfdd LAB_001acfcd: LEA RAX,[0x1e48b7] MOV qword ptr [RBP + -0x88],RAX JMP 0x001acfdd LAB_001acfdd: MOV RSI,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x88] LEA RDX,[0x1e48ac] XOR EAX,EAX LEA R8,[RBP + -0x30] CALL 0x001d4cd0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001ad019 ADD RSP,0x90 POP RBP RET LAB_001ad019: CALL 0x001382c0
void my_coll_lexem_print_error(long param_1,long param_2,long param_3,char *param_4) { long in_FS_OFFSET; char *local_90; ulong local_78; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_78 = *(long *)(param_1 + 0x10) - *(long *)(param_1 + 0x18); if (0x1c < local_78) { local_78 = 0x1d; } strmake(local_38,*(int8 *)(param_1 + 0x18),local_78); *(int1 *)(param_2 + param_3 + -1) = 0; local_90 = param_4; if (*param_4 == '\0') { local_90 = "Syntax error"; } my_snprintf(param_2,param_3 + -1,"%s at \'%s\'",local_90,local_38); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
38,831
PFS_memory_stat::count_realloc(unsigned long, unsigned long, PFS_memory_stat_delta*)
eloqsql/storage/perfschema/pfs_stat.h
inline PFS_memory_stat_delta *count_realloc(size_t old_size, size_t new_size, PFS_memory_stat_delta *delta) { m_used= true; size_t size_delta= new_size - old_size; m_alloc_count++; m_alloc_size+= new_size; m_free_count++; m_free_size+= old_size; if (new_size == old_size) { return NULL; } if (new_size > old_size) { /* Growing */ size_delta= new_size - old_size; m_free_size_capacity+= size_delta; if (m_alloc_size_capacity >= size_delta) { m_alloc_size_capacity-= size_delta; return NULL; } delta->reset(); delta->m_alloc_size_delta= size_delta - m_alloc_size_capacity; m_alloc_size_capacity= 0; } else { /* Shrinking */ size_delta= old_size - new_size; m_alloc_size_capacity+= size_delta; if (m_free_size_capacity >= size_delta) { m_free_size_capacity-= size_delta; return NULL; } delta->reset(); delta->m_free_size_delta= size_delta - m_free_size_capacity; m_free_size_capacity= 0; } return delta; }
O0
c
PFS_memory_stat::count_realloc(unsigned long, unsigned long, PFS_memory_stat_delta*): 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 -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movb $0x1, (%rax) movq -0x20(%rbp), %rcx subq -0x18(%rbp), %rcx movq %rcx, -0x30(%rbp) movq 0x8(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rcx addq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) movq 0x10(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx addq 0x20(%rax), %rcx movq %rcx, 0x20(%rax) movq -0x20(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x4ea96 movq $0x0, -0x8(%rbp) jmp 0x4eb7d movq -0x20(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x4eb0d movq -0x38(%rbp), %rax movq -0x20(%rbp), %rcx subq -0x18(%rbp), %rcx movq %rcx, -0x30(%rbp) movq -0x30(%rbp), %rcx addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) movq 0x38(%rax), %rax cmpq -0x30(%rbp), %rax jb 0x4eae6 movq -0x38(%rbp), %rax movq -0x30(%rbp), %rdx movq 0x38(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x38(%rax) movq $0x0, -0x8(%rbp) jmp 0x4eb7d movq -0x28(%rbp), %rdi callq 0x4ed20 movq -0x38(%rbp), %rax movq -0x30(%rbp), %rdx subq 0x38(%rax), %rdx movq -0x28(%rbp), %rcx movq %rdx, 0x10(%rcx) movq $0x0, 0x38(%rax) jmp 0x4eb75 movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx subq -0x20(%rbp), %rcx movq %rcx, -0x30(%rbp) movq -0x30(%rbp), %rcx addq 0x38(%rax), %rcx movq %rcx, 0x38(%rax) movq 0x40(%rax), %rax cmpq -0x30(%rbp), %rax jb 0x4eb50 movq -0x38(%rbp), %rax movq -0x30(%rbp), %rdx movq 0x40(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x40(%rax) movq $0x0, -0x8(%rbp) jmp 0x4eb7d movq -0x28(%rbp), %rdi callq 0x4ed20 movq -0x38(%rbp), %rax movq -0x30(%rbp), %rdx subq 0x40(%rax), %rdx movq -0x28(%rbp), %rcx movq %rdx, 0x18(%rcx) movq $0x0, 0x40(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN15PFS_memory_stat13count_reallocEmmP21PFS_memory_stat_delta: 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_10] mov [rbp+var_38], rax mov byte ptr [rax], 1 mov rcx, [rbp+var_20] sub rcx, [rbp+var_18] mov [rbp+var_30], rcx mov rcx, [rax+8] add rcx, 1 mov [rax+8], rcx mov rcx, [rbp+var_20] add rcx, [rax+18h] mov [rax+18h], rcx mov rcx, [rax+10h] add rcx, 1 mov [rax+10h], rcx mov rcx, [rbp+var_18] add rcx, [rax+20h] mov [rax+20h], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_18] jnz short loc_4EA96 mov [rbp+var_8], 0 jmp loc_4EB7D loc_4EA96: mov rax, [rbp+var_20] cmp rax, [rbp+var_18] jbe short loc_4EB0D mov rax, [rbp+var_38] mov rcx, [rbp+var_20] sub rcx, [rbp+var_18] mov [rbp+var_30], rcx mov rcx, [rbp+var_30] add rcx, [rax+40h] mov [rax+40h], rcx mov rax, [rax+38h] cmp rax, [rbp+var_30] jb short loc_4EAE6 mov rax, [rbp+var_38] mov rdx, [rbp+var_30] mov rcx, [rax+38h] sub rcx, rdx mov [rax+38h], rcx mov [rbp+var_8], 0 jmp loc_4EB7D loc_4EAE6: mov rdi, [rbp+var_28]; this call _ZN21PFS_memory_stat_delta5resetEv; PFS_memory_stat_delta::reset(void) mov rax, [rbp+var_38] mov rdx, [rbp+var_30] sub rdx, [rax+38h] mov rcx, [rbp+var_28] mov [rcx+10h], rdx mov qword ptr [rax+38h], 0 jmp short loc_4EB75 loc_4EB0D: mov rax, [rbp+var_38] mov rcx, [rbp+var_18] sub rcx, [rbp+var_20] mov [rbp+var_30], rcx mov rcx, [rbp+var_30] add rcx, [rax+38h] mov [rax+38h], rcx mov rax, [rax+40h] cmp rax, [rbp+var_30] jb short loc_4EB50 mov rax, [rbp+var_38] mov rdx, [rbp+var_30] mov rcx, [rax+40h] sub rcx, rdx mov [rax+40h], rcx mov [rbp+var_8], 0 jmp short loc_4EB7D loc_4EB50: mov rdi, [rbp+var_28]; this call _ZN21PFS_memory_stat_delta5resetEv; PFS_memory_stat_delta::reset(void) mov rax, [rbp+var_38] mov rdx, [rbp+var_30] sub rdx, [rax+40h] mov rcx, [rbp+var_28] mov [rcx+18h], rdx mov qword ptr [rax+40h], 0 loc_4EB75: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_4EB7D: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
PFS_memory_stat_delta * PFS_memory_stat::count_realloc( PFS_memory_stat *this, unsigned long long a2, unsigned long long a3, PFS_memory_stat_delta *a4) { unsigned long long v5; // [rsp+10h] [rbp-30h] unsigned long long v6; // [rsp+10h] [rbp-30h] *(_BYTE *)this = 1; ++*((_QWORD *)this + 1); *((_QWORD *)this + 3) += a3; ++*((_QWORD *)this + 2); *((_QWORD *)this + 4) += a2; if ( a3 != a2 ) { if ( a3 <= a2 ) { v6 = a2 - a3; *((_QWORD *)this + 7) += a2 - a3; if ( *((_QWORD *)this + 8) >= a2 - a3 ) { *((_QWORD *)this + 8) -= v6; return 0LL; } PFS_memory_stat_delta::reset(a4); *((_QWORD *)a4 + 3) = v6 - *((_QWORD *)this + 8); *((_QWORD *)this + 8) = 0LL; } else { v5 = a3 - a2; *((_QWORD *)this + 8) += a3 - a2; if ( *((_QWORD *)this + 7) >= a3 - a2 ) { *((_QWORD *)this + 7) -= v5; return 0LL; } PFS_memory_stat_delta::reset(a4); *((_QWORD *)a4 + 2) = v5 - *((_QWORD *)this + 7); *((_QWORD *)this + 7) = 0LL; } return a4; } return 0LL; }
count_realloc: 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 + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV byte ptr [RAX],0x1 MOV RCX,qword ptr [RBP + -0x20] SUB RCX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RCX MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RAX + 0x18] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RAX + 0x10] ADD RCX,0x1 MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0014ea96 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014eb7d LAB_0014ea96: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x18] JBE 0x0014eb0d MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] SUB RCX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RCX MOV RCX,qword ptr [RBP + -0x30] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RAX + 0x38] CMP RAX,qword ptr [RBP + -0x30] JC 0x0014eae6 MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x38] SUB RCX,RDX MOV qword ptr [RAX + 0x38],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014eb7d LAB_0014eae6: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0014ed20 MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] SUB RDX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + 0x10],RDX MOV qword ptr [RAX + 0x38],0x0 JMP 0x0014eb75 LAB_0014eb0d: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] SUB RCX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RCX MOV RCX,qword ptr [RBP + -0x30] ADD RCX,qword ptr [RAX + 0x38] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RAX + 0x40] CMP RAX,qword ptr [RBP + -0x30] JC 0x0014eb50 MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x40] SUB RCX,RDX MOV qword ptr [RAX + 0x40],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014eb7d LAB_0014eb50: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0014ed20 MOV RAX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] SUB RDX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + 0x18],RDX MOV qword ptr [RAX + 0x40],0x0 LAB_0014eb75: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0014eb7d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* PFS_memory_stat::count_realloc(unsigned long, unsigned long, PFS_memory_stat_delta*) */ PFS_memory_stat_delta * __thiscall PFS_memory_stat::count_realloc (PFS_memory_stat *this,ulong param_1,ulong param_2,PFS_memory_stat_delta *param_3) { ulong uVar1; PFS_memory_stat_delta *local_10; *this = (PFS_memory_stat)0x1; *(long *)(this + 8) = *(long *)(this + 8) + 1; *(ulong *)(this + 0x18) = param_2 + *(long *)(this + 0x18); *(long *)(this + 0x10) = *(long *)(this + 0x10) + 1; *(ulong *)(this + 0x20) = param_1 + *(long *)(this + 0x20); if (param_2 == param_1) { local_10 = (PFS_memory_stat_delta *)0x0; } else { local_10 = param_3; if (param_1 < param_2) { uVar1 = param_2 - param_1; *(ulong *)(this + 0x40) = uVar1 + *(long *)(this + 0x40); if (*(ulong *)(this + 0x38) < uVar1) { PFS_memory_stat_delta::reset(param_3); *(ulong *)(param_3 + 0x10) = uVar1 - *(long *)(this + 0x38); *(int8 *)(this + 0x38) = 0; } else { *(ulong *)(this + 0x38) = *(long *)(this + 0x38) - uVar1; local_10 = (PFS_memory_stat_delta *)0x0; } } else { uVar1 = param_1 - param_2; *(ulong *)(this + 0x38) = uVar1 + *(long *)(this + 0x38); if (*(ulong *)(this + 0x40) < uVar1) { PFS_memory_stat_delta::reset(param_3); *(ulong *)(param_3 + 0x18) = uVar1 - *(long *)(this + 0x40); *(int8 *)(this + 0x40) = 0; } else { *(ulong *)(this + 0x40) = *(long *)(this + 0x40) - uVar1; local_10 = (PFS_memory_stat_delta *)0x0; } } } return local_10; }
38,832
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O0
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x2d0(%rax), %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x286eb movq $0x0, -0x8(%rbp) jmp 0x2875d movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x13600 movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x13600 movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x13600 movq %rax, -0x28(%rbp) imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710 imulq $0x64, -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mariadb_server_version_id: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+2D0h] mov [rbp+var_30], rax cmp rax, 0 jnz short loc_286EB mov [rbp+var_8], 0 jmp short loc_2875D loc_286EB: mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_28], rax imul rax, [rbp+var_18], 2710h imul rcx, [rbp+var_20], 64h ; 'd' add rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax loc_2875D: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v2; // [rsp+0h] [rbp-30h] BYREF long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a1; v2 = *(_QWORD *)(a1 + 720); if ( !v2 ) return 0LL; v5 = strtol(v2, &v2, 10LL); ++v2; v4 = strtol(v2, &v2, 10LL); ++v2; v3 = strtol(v2, &v2, 10LL); return v3 + 100 * v4 + 10000 * v5; }
mariadb_server_version_id: 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 + 0x2d0] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x001286eb MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012875d LAB_001286eb: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x18],0x2710 IMUL RCX,qword ptr [RBP + -0x20],0x64 ADD RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0012875d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long mariadb_server_version_id(long param_1) { long lVar1; char *local_38 [2]; long local_28; long local_20; long local_18; long local_10; local_38[0] = *(char **)(param_1 + 0x2d0); if (local_38[0] == (char *)0x0) { local_10 = 0; } else { local_18 = param_1; local_20 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; local_28 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; lVar1 = strtol(local_38[0],local_38,10); local_10 = local_20 * 10000 + local_28 * 100 + lVar1; } return local_10; }
38,833
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O3
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, -0x20(%rbp) testq %rdi, %rdi je 0x20ee1 leaq -0x20(%rbp), %rbx movq %rbx, %rsi movl $0xa, %edx callq 0x13650 movq %rax, %r14 movq (%rbx), %rdi incq %rdi movq %rdi, (%rbx) movq %rbx, %rsi movl $0xa, %edx callq 0x13650 movq %rax, %r15 movq (%rbx), %rdi incq %rdi movq %rdi, (%rbx) movq %rbx, %rsi movl $0xa, %edx callq 0x13650 movq %rax, %rcx imulq $0x2710, %r14, %rax # imm = 0x2710 imulq $0x64, %r15, %rdx addq %rcx, %rax addq %rdx, %rax jmp 0x20ee3 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mariadb_server_version_id: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov [rbp+var_20], rdi test rdi, rdi jz short loc_20EE1 lea rbx, [rbp+var_20] mov rsi, rbx mov edx, 0Ah call _strtol mov r14, rax mov rdi, [rbx] inc rdi mov [rbx], rdi mov rsi, rbx mov edx, 0Ah call _strtol mov r15, rax mov rdi, [rbx] inc rdi mov [rbx], rdi mov rsi, rbx mov edx, 0Ah call _strtol mov rcx, rax imul rax, r14, 2710h imul rdx, r15, 64h ; 'd' add rax, rcx add rax, rdx jmp short loc_20EE3 loc_20EE1: xor eax, eax loc_20EE3: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v1; // r14 long long v2; // r15 _QWORD v4[4]; // [rsp+0h] [rbp-20h] BYREF v4[0] = a1; if ( !a1 ) return 0LL; v1 = strtol(a1, v4, 10LL); v2 = strtol(++v4[0], v4, 10LL); return 100 * v2 + strtol(v4[0] + 1LL, v4, 10LL) + 10000 * v1; }
mariadb_server_version_id: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x20],RDI TEST RDI,RDI JZ 0x00120ee1 LEA RBX,[RBP + -0x20] MOV RSI,RBX MOV EDX,0xa CALL 0x00113650 MOV R14,RAX MOV RDI,qword ptr [RBX] INC RDI MOV qword ptr [RBX],RDI MOV RSI,RBX MOV EDX,0xa CALL 0x00113650 MOV R15,RAX MOV RDI,qword ptr [RBX] INC RDI MOV qword ptr [RBX],RDI MOV RSI,RBX MOV EDX,0xa CALL 0x00113650 MOV RCX,RAX IMUL RAX,R14,0x2710 IMUL RDX,R15,0x64 ADD RAX,RCX ADD RAX,RDX JMP 0x00120ee3 LAB_00120ee1: XOR EAX,EAX LAB_00120ee3: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
long mariadb_server_version_id(char *param_1) { long lVar1; long lVar2; long lVar3; char *local_28; if (param_1 == (char *)0x0) { lVar1 = 0; } else { local_28 = param_1; lVar1 = strtol(param_1,&local_28,10); local_28 = local_28 + 1; lVar2 = strtol(local_28,&local_28,10); local_28 = local_28 + 1; lVar3 = strtol(local_28,&local_28,10); lVar1 = lVar1 * 10000 + lVar3 + lVar2 * 100; } return lVar1; }
38,834
scramble_323(char*, char const*, char const*)
eloqsql/sql/password.c
void scramble_323(char *to, const char *message, const char *password) { struct my_rnd_struct rand_st; ulong hash_pass[2], hash_message[2]; if (password && password[0]) { char extra, *to_start=to; const char *message_end= message + SCRAMBLE_LENGTH_323; hash_password(hash_pass,password, (uint) strlen(password)); hash_password(hash_message, message, SCRAMBLE_LENGTH_323); my_rnd_init(&rand_st,hash_pass[0] ^ hash_message[0], hash_pass[1] ^ hash_message[1]); for (; message < message_end; message++) *to++= (char) (floor(my_rnd(&rand_st)*31)+64); extra=(char) (floor(my_rnd(&rand_st)*31)); while (to_start != to) *(to_start++)^=extra; } *to= 0; }
O3
c
scramble_323(char*, char const*, char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %rbx testq %rdx, %rdx je 0x46f76 movq %rdx, %r15 cmpb $0x0, (%rdx) je 0x46f76 movq %rsi, %r14 movq %r15, %rdi callq 0x3a4c0 leaq -0x40(%rbp), %r12 movq %r12, %rdi movq %r15, %rsi movl %eax, %edx callq 0x46d94 leaq -0x30(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi movl $0x8, %edx callq 0x46d94 movq (%r15), %rsi movq 0x8(%r15), %rdx xorq (%r12), %rsi xorq 0x8(%r12), %rdx leaq -0x60(%rbp), %r14 movq %r14, %rdi callq 0x86f64 xorl %r15d, %r15d movq %r14, %rdi callq 0x86fda mulsd 0x71f96(%rip), %xmm0 # 0xb8eb8 callq 0x3a160 addsd 0x71f91(%rip), %xmm0 # 0xb8ec0 cvttsd2si %xmm0, %eax movb %al, (%rbx,%r15) incq %r15 cmpq $0x8, %r15 jne 0x46f12 leaq -0x60(%rbp), %rdi callq 0x86fda mulsd 0x71f67(%rip), %xmm0 # 0xb8eb8 callq 0x3a160 cvttsd2si %xmm0, %eax movd %eax, %xmm0 punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] pshuflw $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0,4,5,6,7] movq (%rbx), %xmm1 pxor %xmm0, %xmm1 movq %xmm1, (%rbx) addq %r15, %rbx movb $0x0, (%rbx) addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_Z12scramble_323PcPKcS1_: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rdi test rdx, rdx jz loc_46F76 mov r15, rdx cmp byte ptr [rdx], 0 jz loc_46F76 mov r14, rsi mov rdi, r15 call _strlen lea r12, [rbp+var_40] mov rdi, r12 mov rsi, r15 mov edx, eax call hash_password lea r15, [rbp+var_30] mov rdi, r15 mov rsi, r14 mov edx, 8 call hash_password mov rsi, [r15] mov rdx, [r15+8] xor rsi, [r12] xor rdx, [r12+8] lea r14, [rbp+var_60] mov rdi, r14 call my_rnd_init xor r15d, r15d loc_46F12: mov rdi, r14 call my_rnd mulsd xmm0, cs:qword_B8EB8 call _floor addsd xmm0, cs:qword_B8EC0 cvttsd2si eax, xmm0 mov [rbx+r15], al inc r15 cmp r15, 8 jnz short loc_46F12 lea rdi, [rbp+var_60] call my_rnd mulsd xmm0, cs:qword_B8EB8 call _floor cvttsd2si eax, xmm0 movd xmm0, eax punpcklbw xmm0, xmm0 pshuflw xmm0, xmm0, 0 movq xmm1, qword ptr [rbx] pxor xmm1, xmm0 movq qword ptr [rbx], xmm1 add rbx, r15 loc_46F76: mov byte ptr [rbx], 0 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn
void scramble_323(__m128i *a1, char *a2, char *a3) { __m128i *v3; // rbx int v5; // eax long long i; // r15 double v7; // xmm0_8 double v8; // xmm0_8 __m128i v9; // xmm0 _BYTE v10[32]; // [rsp+0h] [rbp-60h] BYREF long long v11[2]; // [rsp+20h] [rbp-40h] BYREF long long v12[6]; // [rsp+30h] [rbp-30h] BYREF v3 = a1; if ( a3 && *a3 ) { v5 = strlen(a3); hash_password(v11, (unsigned __int8 *)a3, v5); hash_password(v12, (unsigned __int8 *)a2, 8); my_rnd_init(v10, v11[0] ^ v12[0], v11[1] ^ v12[1]); for ( i = 0LL; i != 8; ++i ) { v7 = my_rnd(v10); a1->m128i_i8[i] = (int)(floor(v7 * 31.0) + 64.0); } v8 = my_rnd(v10); v9 = _mm_cvtsi32_si128((int)floor(v8 * 31.0)); a1->m128i_i64[0] = _mm_xor_si128(_mm_loadl_epi64(a1), _mm_shufflelo_epi16(_mm_unpacklo_epi8(v9, v9), 0)).m128i_u64[0]; v3 = (__m128i *)&a1->m128i_u64[1]; } v3->m128i_i8[0] = 0; }
scramble_323: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RDI TEST RDX,RDX JZ 0x00146f76 MOV R15,RDX CMP byte ptr [RDX],0x0 JZ 0x00146f76 MOV R14,RSI MOV RDI,R15 CALL 0x0013a4c0 LEA R12,[RBP + -0x40] MOV RDI,R12 MOV RSI,R15 MOV EDX,EAX CALL 0x00146d94 LEA R15,[RBP + -0x30] MOV RDI,R15 MOV RSI,R14 MOV EDX,0x8 CALL 0x00146d94 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] XOR RSI,qword ptr [R12] XOR RDX,qword ptr [R12 + 0x8] LEA R14,[RBP + -0x60] MOV RDI,R14 CALL 0x00186f64 XOR R15D,R15D LAB_00146f12: MOV RDI,R14 CALL 0x00186fda MULSD XMM0,qword ptr [0x001b8eb8] CALL 0x0013a160 ADDSD XMM0,qword ptr [0x001b8ec0] CVTTSD2SI EAX,XMM0 MOV byte ptr [RBX + R15*0x1],AL INC R15 CMP R15,0x8 JNZ 0x00146f12 LEA RDI,[RBP + -0x60] CALL 0x00186fda MULSD XMM0,qword ptr [0x001b8eb8] CALL 0x0013a160 CVTTSD2SI EAX,XMM0 MOVD XMM0,EAX PUNPCKLBW XMM0,XMM0 PSHUFLW XMM0,XMM0,0x0 MOVQ XMM1,qword ptr [RBX] PXOR XMM1,XMM0 MOVQ qword ptr [RBX],XMM1 ADD RBX,R15 LAB_00146f76: MOV byte ptr [RBX],0x0 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* scramble_323(char*, char const*, char const*) */ void scramble_323(char *param_1,char *param_2,char *param_3) { int iVar1; size_t sVar2; long lVar3; int1 uVar6; int1 uVar7; int1 uVar8; double dVar4; int1 auVar5 [16]; int1 local_68 [32]; ulong local_48; ulong local_40; ulong local_38; ulong local_30; if ((param_3 != (char *)0x0) && (*param_3 != '\0')) { sVar2 = strlen(param_3); hash_password(&local_48,param_3,sVar2 & 0xffffffff); hash_password(&local_38,param_2,8); my_rnd_init(local_68,local_38 ^ local_48,local_30 ^ local_40); lVar3 = 0; do { dVar4 = (double)my_rnd(local_68); dVar4 = floor(dVar4 * _DAT_001b8eb8); param_1[lVar3] = (char)(int)(dVar4 + _DAT_001b8ec0); lVar3 = lVar3 + 1; } while (lVar3 != 8); dVar4 = (double)my_rnd(local_68); dVar4 = floor(dVar4 * _DAT_001b8eb8); iVar1 = (int)dVar4; uVar8 = (int1)((uint)iVar1 >> 0x18); uVar7 = (int1)((uint)iVar1 >> 0x10); uVar6 = (int1)((uint)iVar1 >> 8); auVar5._4_4_ = (int)(CONCAT35(CONCAT21(CONCAT11(uVar8,uVar8),uVar7),CONCAT14(uVar7,iVar1)) >> 0x20); auVar5[3] = uVar6; auVar5[2] = uVar6; auVar5[0] = (int1)iVar1; auVar5[1] = auVar5[0]; auVar5._8_8_ = 0; auVar5 = pshuflw(auVar5,auVar5,0); *(ulong *)param_1 = *(ulong *)param_1 ^ auVar5._0_8_; param_1 = param_1 + 8; } *param_1 = '\0'; return; }
38,835
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
llama.cpp/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0xd0181 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x20640 movq %rax, %rbx movq %r14, %rdi callq 0x89d5c leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4ae28(%rip), %rsi # 0x11afcd leaq 0x10(%rsp), %rdi callq 0x80997 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0xbb664 xorl %ebp, %ebp leaq 0x8fe70(%rip), %rsi # 0x160040 leaq -0x5a4c7(%rip), %rdx # 0x75d10 movq %rbx, %rdi callq 0x20a40 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xd01fd movq 0x20(%rsp), %rsi incq %rsi callq 0x20170 testb %bpl, %bpl jne 0xd0207 jmp 0xd020f movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20ae0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_D0181 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_D0181: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_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_D01FD mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D01FD: test bpl, bpl jnz short loc_D0207 jmp short loc_D020F mov r14, rax loc_D0207: mov rdi, rbx; void * call ___cxa_free_exception loc_D020F: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, 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 != 2 ) { 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(&)[52],char const*>( (long long)v5, (long long)"cannot use operator[] with a numeric argument with ", &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, 305, 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 **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001d0181 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001d0181: MOV EDI,0x20 CALL 0x00120640 MOV RBX,RAX MOV RDI,R14 CALL 0x00189d5c LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001d019e: LEA RSI,[0x21afcd] LEA RDI,[RSP + 0x10] CALL 0x00180997 MOV BPL,0x1 LAB_001d01b2: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001bb664 XOR EBP,EBP LEA RSI,[0x260040] LEA RDX,[0x175d10] MOV RDI,RBX CALL 0x00120a40
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001d019e to 001d01ae has its CatchHandler @ 001d0204 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001d01b2 to 001d01de has its CatchHandler @ 001d01df */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
38,836
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rax movq %rax, (%rsp) movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq $0x0, 0x28(%rax) addq $0x30, %rax movq %rax, 0x8(%rsp) leaq 0x1f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x50d70 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rdx leaq 0x9603d(%rip), %rsi # 0x1bafb1 callq 0x55710 jmp 0x124f7b leaq 0x1f(%rsp), %rdi callq 0x510b0 movq (%rsp), %rdi addq $0x50, %rdi callq 0x504a0 addq $0x38, %rsp retq movq %rax, %rdi callq 0x55f40 nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_8] mov [rsp+38h+var_38], rax movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 mov rcx, [rsp+38h+var_18] mov [rax+20h], rcx mov qword ptr [rax+28h], 0 add rax, 30h ; '0' mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_19] mov [rsp+38h+var_28], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] lea rsi, aMinExp0+0Ah; "0" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_124F7B: lea rdi, [rsp+38h+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+38h+var_38] add rdi, 50h ; 'P' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) add rsp, 38h retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value( long long a1, _OWORD *a2, long long a3) { __int128 v3; // xmm0 char v5; // [rsp+1Fh] [rbp-19h] BYREF long long v6; // [rsp+20h] [rbp-18h] _OWORD *v7; // [rsp+28h] [rbp-10h] long long v8; // [rsp+30h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = v6; *(_QWORD *)(a1 + 40) = 0LL; std::allocator<char>::allocator(&v5, a2, a3); std::string::basic_string<std::allocator<char>>(a1 + 48, (long long)"0", (long long)&v5); std::allocator<char>::~allocator(&v5); return std::string::basic_string(a1 + 80); }
38,837
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long): pushq %rbx movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) movq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x40(%rbx), %rax movq %rax, 0x30(%rbx) leaq 0x3cd20(%rip), %rsi # 0xae47f leaq 0x3cd1a(%rip), %rdx # 0xae480 callq 0x1c80a leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) popq %rbx retq movq %rax, %rdi callq 0x2a807
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m: push rbx mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx mov qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rax, [rbx+40h] mov [rbx+30h], rax lea rsi, aMinExp0+0Ah; "0" lea rdx, aMinExp0+0Bh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rbx+60h] mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = a1 + 64; std::string::_M_construct<char const*>((_QWORD *)(a1 + 48), "0", (long long)""); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX MOV qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LEA RAX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RAX LAB_00171758: LEA RSI,[0x1ae47f] LEA RDX,[0x1ae480] CALL 0x0011c80a LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *this,int4 *param_2,int8 param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[5]; uVar6 = param_2[6]; uVar7 = param_2[7]; *(int4 *)(this + 0x10) = param_2[4]; *(int4 *)(this + 0x14) = uVar5; *(int4 *)(this + 0x18) = uVar6; *(int4 *)(this + 0x1c) = uVar7; *(int4 *)this = uVar1; *(int4 *)(this + 4) = uVar2; *(int4 *)(this + 8) = uVar3; *(int4 *)(this + 0xc) = uVar4; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 0x30) = this + 0x40; /* try { // try from 00171758 to 0017176a has its CatchHandler @ 00171781 */ std::__cxx11::string::_M_construct<char_const*>(this + 0x30,"0",""); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> )0x0; return; }
38,838
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, unsigned long): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) andq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x27898(%rip), %rsi # 0x9147a leaq 0xf(%rsp), %rdx callq 0x22836 leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) andq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) addq $0x10, %rsp popq %rbx retq movq %rax, %rdi callq 0x2296d nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: push rbx sub rsp, 10h mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx and qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rsi, aMinExp0+0Ah; "0" lea rdx, [rsp+18h+var_9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rax, [rbx+60h] mov [rbx+50h], rax and qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 add rsp, 10h pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 48), (long long)"0"); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX AND qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LAB_00169bdb: LEA RSI,[0x19147a] LEA RDX,[RSP + 0xf] CALL 0x00122836 LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX AND qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 ADD RSP,0x10 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::iteration_proxy_value (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this,int8 *param_2,int8 param_3) { int8 uVar1; int8 uVar2; int8 uVar3; allocator local_9; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[3]; *(int8 *)(this + 0x10) = param_2[2]; *(int8 *)(this + 0x18) = uVar3; *(int8 *)this = uVar1; *(int8 *)(this + 8) = uVar2; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; /* try { // try from 00169bdb to 00169beb has its CatchHandler @ 00169c03 */ std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x30),"0",&local_9); *(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> )0x0; return; }
38,839
ps_fetch_int8
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_int8(MYSQL_BIND *r_param, const MYSQL_FIELD * const field, unsigned char **row) { switch(r_param->buffer_type) { case MYSQL_TYPE_TINY: ps_fetch_from_1_to_8_bytes(r_param, field, row, 1); break; default: { uchar val= **row; longlong lval= field->flags & UNSIGNED_FLAG ? (longlong) val : (longlong)(signed char)val; convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG); (*row) += 1; } break; } }
O0
c
ps_fetch_int8: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x60(%rax), %eax subl $0x1, %eax jne 0x32e0a jmp 0x32df2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl $0x1, %ecx callq 0x31c10 jmp 0x32e6c movq -0x18(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x19(%rbp) movq -0x10(%rbp), %rax movl 0x64(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x32e2f movzbl -0x19(%rbp), %eax movq %rax, -0x30(%rbp) jmp 0x32e38 movsbq -0x19(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x10(%rbp), %rax movl 0x64(%rax), %eax andl $0x20, %eax movsbl %al, %ecx callq 0x33920 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_int8: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+60h] sub eax, 1 jnz short loc_32E0A jmp short $+2 loc_32DF2: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov ecx, 1 call ps_fetch_from_1_to_8_bytes jmp short loc_32E6C loc_32E0A: mov rax, [rbp+var_18] mov rax, [rax] mov al, [rax] mov [rbp+var_19], al mov rax, [rbp+var_10] mov eax, [rax+64h] and eax, 20h cmp eax, 0 jz short loc_32E2F movzx eax, [rbp+var_19] mov [rbp+var_30], rax jmp short loc_32E38 loc_32E2F: movsx rax, [rbp+var_19] mov [rbp+var_30], rax loc_32E38: mov rax, [rbp+var_30] mov [rbp+var_28], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] mov rax, [rbp+var_10] mov eax, [rax+64h] and eax, 20h movsx ecx, al call convert_from_long mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 1 mov [rax], rcx loc_32E6C: add rsp, 30h pop rbp retn
unsigned __int8 ** ps_fetch_int8(long long a1, long long a2, unsigned __int8 **a3) { unsigned __int8 **result; // rax long long v4; // [rsp+0h] [rbp-30h] unsigned __int8 v5; // [rsp+17h] [rbp-19h] if ( *(_DWORD *)(a1 + 96) == 1 ) return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 1u); v5 = **a3; if ( (*(_DWORD *)(a2 + 100) & 0x20) != 0 ) v4 = v5; else v4 = (char)v5; convert_from_long(a1, a2, v4, *(_BYTE *)(a2 + 100) & 0x20); result = a3; ++*a3; return result; }
ps_fetch_int8: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x60] SUB EAX,0x1 JNZ 0x00132e0a JMP 0x00132df2 LAB_00132df2: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,0x1 CALL 0x00131c10 JMP 0x00132e6c LAB_00132e0a: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] AND EAX,0x20 CMP EAX,0x0 JZ 0x00132e2f MOVZX EAX,byte ptr [RBP + -0x19] MOV qword ptr [RBP + -0x30],RAX JMP 0x00132e38 LAB_00132e2f: MOVSX RAX,byte ptr [RBP + -0x19] MOV qword ptr [RBP + -0x30],RAX LAB_00132e38: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] AND EAX,0x20 MOVSX ECX,AL CALL 0x00133920 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX LAB_00132e6c: ADD RSP,0x30 POP RBP RET
void ps_fetch_int8(long param_1,long param_2,long *param_3) { int8 local_38; if (*(int *)(param_1 + 0x60) == 1) { ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,1); } else { if ((*(uint *)(param_2 + 100) & 0x20) == 0) { local_38 = (ulong)(char)*(byte *)*param_3; } else { local_38 = (ulong)*(byte *)*param_3; } convert_from_long(param_1,param_2,local_38,(byte)*(int4 *)(param_2 + 100) & 0x20); *param_3 = *param_3 + 1; } return; }
38,840
JS_AtomIsNumericIndex1
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_AtomIsNumericIndex1(JSContext *ctx, JSAtom atom) { JSRuntime *rt = ctx->rt; JSAtomStruct *p1; JSString *p; int c, len, ret; JSValue num, str; if (__JS_AtomIsTaggedInt(atom)) return js_int32(__JS_AtomToUInt32(atom)); assert(atom < rt->atom_size); p1 = rt->atom_array[atom]; if (p1->atom_type != JS_ATOM_TYPE_STRING) return JS_UNDEFINED; p = p1; len = p->len; if (p->is_wide_char) { const uint16_t *r = p->u.str16, *r_end = p->u.str16 + len; if (r >= r_end) return JS_UNDEFINED; c = *r; if (c == '-') { if (r >= r_end) return JS_UNDEFINED; r++; c = *r; /* -0 case is specific */ if (c == '0' && len == 2) goto minus_zero; } /* XXX: should test NaN, but the tests do not check it */ if (!is_num(c)) { /* XXX: String should be normalized, therefore 8-bit only */ const uint16_t nfinity16[7] = { 'n', 'f', 'i', 'n', 'i', 't', 'y' }; if (!(c =='I' && (r_end - r) == 8 && !memcmp(r + 1, nfinity16, sizeof(nfinity16)))) return JS_UNDEFINED; } } else { const uint8_t *r = p->u.str8, *r_end = p->u.str8 + len; if (r >= r_end) return JS_UNDEFINED; c = *r; if (c == '-') { if (r >= r_end) return JS_UNDEFINED; r++; c = *r; /* -0 case is specific */ if (c == '0' && len == 2) { minus_zero: return js_float64(-0.0); } } if (!is_num(c)) { if (!(c =='I' && (r_end - r) == 8 && !memcmp(r + 1, "nfinity", 7))) return JS_UNDEFINED; } } /* this is ECMA CanonicalNumericIndexString primitive */ num = JS_ToNumber(ctx, JS_MKPTR(JS_TAG_STRING, p)); if (JS_IsException(num)) return num; str = JS_ToString(ctx, num); if (JS_IsException(str)) { JS_FreeValue(ctx, num); return str; } ret = js_string_eq(p, JS_VALUE_GET_STRING(str)); JS_FreeValue(ctx, str); if (ret) { return num; } else { JS_FreeValue(ctx, num); return JS_UNDEFINED; } }
O0
c
JS_AtomIsNumericIndex1: subq $0xc8, %rsp movq %rdi, 0xb0(%rsp) movl %esi, 0xac(%rsp) movq 0xb0(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0xa0(%rsp) movl 0xac(%rsp), %edi callq 0x360c0 cmpl $0x0, %eax je 0x36303 movl 0xac(%rsp), %edi callq 0x360e0 movl %eax, %edi callq 0x33cc0 movq %rax, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) jmp 0x367d8 movq 0xa0(%rsp), %rax movq 0x68(%rax), %rax movl 0xac(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax movzbl %al, %eax cmpl $0x1, %eax je 0x36356 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x98(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, 0x88(%rsp) movq 0x90(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0x364ff movq 0x90(%rsp), %rax addq $0x18, %rax movq %rax, 0x58(%rsp) movq 0x90(%rsp), %rax addq $0x18, %rax movslq 0x88(%rsp), %rcx shlq %rcx addq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rax cmpq 0x50(%rsp), %rax jb 0x363f3 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x58(%rsp), %rax movzwl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x2d, 0x8c(%rsp) jne 0x3646c movq 0x58(%rsp), %rax cmpq 0x50(%rsp), %rax jb 0x36434 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x58(%rsp), %rax addq $0x2, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movzwl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x30, 0x8c(%rsp) jne 0x3646a cmpl $0x2, 0x88(%rsp) jne 0x3646a jmp 0x365c8 jmp 0x3646c movl 0x8c(%rsp), %edi callq 0x5cc20 cmpl $0x0, %eax jne 0x364fa movq 0xd720a(%rip), %rax # 0x10d68e movq %rax, 0x42(%rsp) movl 0xd7207(%rip), %eax # 0x10d696 movl %eax, 0x4a(%rsp) movw 0xd7200(%rip), %ax # 0x10d69a movw %ax, 0x4e(%rsp) cmpl $0x49, 0x8c(%rsp) jne 0x364dc movq 0x50(%rsp), %rax movq 0x58(%rsp), %rcx subq %rcx, %rax sarq %rax cmpq $0x8, %rax jne 0x364dc movq 0x58(%rsp), %rdi addq $0x2, %rdi leaq 0x42(%rsp), %rsi movl $0xe, %edx callq 0xe480 cmpl $0x0, %eax je 0x364f8 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 jmp 0x364fa jmp 0x36659 movq 0x90(%rsp), %rax addq $0x18, %rax movq %rax, 0x38(%rsp) movq 0x90(%rsp), %rax addq $0x18, %rax movslq 0x88(%rsp), %rcx addq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax cmpq 0x30(%rsp), %rax jb 0x36554 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x38(%rsp), %rax movzbl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x2d, 0x8c(%rsp) jne 0x365ec movq 0x38(%rsp), %rax cmpq 0x30(%rsp), %rax jb 0x36595 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 movq 0x38(%rsp), %rax addq $0x1, %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movzbl (%rax), %eax movl %eax, 0x8c(%rsp) cmpl $0x30, 0x8c(%rsp) jne 0x365ea cmpl $0x2, 0x88(%rsp) jne 0x365ea jmp 0x365c8 movsd 0xd7270(%rip), %xmm0 # 0x10d840 callq 0x4d660 movq %rax, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) jmp 0x367d8 jmp 0x365ec movl 0x8c(%rsp), %edi callq 0x5cc20 cmpl $0x0, %eax jne 0x36657 cmpl $0x49, 0x8c(%rsp) jne 0x36639 movq 0x30(%rsp), %rax movq 0x38(%rsp), %rcx subq %rcx, %rax cmpq $0x8, %rax jne 0x36639 movq 0x38(%rsp), %rdi addq $0x1, %rdi leaq 0xd7bfb(%rip), %rsi # 0x10e225 movl $0x7, %edx callq 0xe480 cmpl $0x0, %eax je 0x36655 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) jmp 0x367d8 jmp 0x36657 jmp 0x36659 movq 0xb0(%rsp), %rdi movq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) movq $-0x7, 0x18(%rsp) movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x61860 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x366d7 movq 0x70(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x367d8 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x29d40 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x60(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x36754 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movq 0x60(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x367d8 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x618d0 movl %eax, 0x84(%rsp) movq 0xb0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 cmpl $0x0, 0x84(%rsp) je 0x367aa movq 0x70(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x367d8 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movl $0x0, 0xb8(%rsp) movq $0x3, 0xc0(%rsp) movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rdx addq $0xc8, %rsp retq
JS_AtomIsNumericIndex1: sub rsp, 0C8h mov [rsp+0C8h+var_18], rdi mov [rsp+0C8h+var_1C], esi mov rax, [rsp+0C8h+var_18] mov rax, [rax+18h] mov [rsp+0C8h+var_28], rax mov edi, [rsp+0C8h+var_1C] call __JS_AtomIsTaggedInt cmp eax, 0 jz short loc_36303 mov edi, [rsp+0C8h+var_1C] call __JS_AtomToUInt32 mov edi, eax call js_int32 mov [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_8], rdx jmp loc_367D8 loc_36303: mov rax, [rsp+0C8h+var_28] mov rax, [rax+68h] mov ecx, [rsp+0C8h+var_1C] mov rax, [rax+rcx*8] mov [rsp+0C8h+var_30], rax mov rax, [rsp+0C8h+var_30] mov rax, [rax+4] shr rax, 3Eh movzx eax, al cmp eax, 1 jz short loc_36356 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36356: mov rax, [rsp+0C8h+var_30] mov [rsp+0C8h+var_38], rax mov rax, [rsp+0C8h+var_38] mov rax, [rax+4] and rax, 7FFFFFFFh mov [rsp+0C8h+var_40], eax mov rax, [rsp+0C8h+var_38] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz loc_364FF mov rax, [rsp+0C8h+var_38] add rax, 18h mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_38] add rax, 18h movsxd rcx, [rsp+0C8h+var_40] shl rcx, 1 add rax, rcx mov [rsp+0C8h+var_78], rax mov rax, [rsp+0C8h+var_70] cmp rax, [rsp+0C8h+var_78] jb short loc_363F3 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_363F3: mov rax, [rsp+0C8h+var_70] movzx eax, word ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 2Dh ; '-' jnz short loc_3646C mov rax, [rsp+0C8h+var_70] cmp rax, [rsp+0C8h+var_78] jb short loc_36434 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36434: mov rax, [rsp+0C8h+var_70] add rax, 2 mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_70] movzx eax, word ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 30h ; '0' jnz short loc_3646A cmp [rsp+0C8h+var_40], 2 jnz short loc_3646A jmp loc_365C8 loc_3646A: jmp short $+2 loc_3646C: mov edi, [rsp+0C8h+var_3C] call is_num cmp eax, 0 jnz short loc_364FA mov rax, cs:qword_10D68E mov [rsp+0C8h+var_86], rax mov eax, cs:dword_10D696 mov [rsp+0C8h+var_7E], eax mov ax, cs:word_10D69A mov [rsp+0C8h+var_7A], ax cmp [rsp+0C8h+var_3C], 49h ; 'I' jnz short loc_364DC mov rax, [rsp+0C8h+var_78] mov rcx, [rsp+0C8h+var_70] sub rax, rcx sar rax, 1 cmp rax, 8 jnz short loc_364DC mov rdi, [rsp+0C8h+var_70] add rdi, 2 lea rsi, [rsp+0C8h+var_86] mov edx, 0Eh call _memcmp cmp eax, 0 jz short loc_364F8 loc_364DC: mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_364F8: jmp short $+2 loc_364FA: jmp loc_36659 loc_364FF: mov rax, [rsp+0C8h+var_38] add rax, 18h mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_38] add rax, 18h movsxd rcx, [rsp+0C8h+var_40] add rax, rcx mov [rsp+0C8h+var_98], rax mov rax, [rsp+0C8h+var_90] cmp rax, [rsp+0C8h+var_98] jb short loc_36554 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36554: mov rax, [rsp+0C8h+var_90] movzx eax, byte ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 2Dh ; '-' jnz short loc_365EC mov rax, [rsp+0C8h+var_90] cmp rax, [rsp+0C8h+var_98] jb short loc_36595 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36595: mov rax, [rsp+0C8h+var_90] add rax, 1 mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_90] movzx eax, byte ptr [rax] mov [rsp+0C8h+var_3C], eax cmp [rsp+0C8h+var_3C], 30h ; '0' jnz short loc_365EA cmp [rsp+0C8h+var_40], 2 jnz short loc_365EA jmp short $+2 loc_365C8: movsd xmm0, cs:qword_10D840 call js_float64 mov [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_8], rdx jmp loc_367D8 loc_365EA: jmp short $+2 loc_365EC: mov edi, [rsp+0C8h+var_3C] call is_num cmp eax, 0 jnz short loc_36657 cmp [rsp+0C8h+var_3C], 49h ; 'I' jnz short loc_36639 mov rax, [rsp+0C8h+var_98] mov rcx, [rsp+0C8h+var_90] sub rax, rcx cmp rax, 8 jnz short loc_36639 mov rdi, [rsp+0C8h+var_90] add rdi, 1 lea rsi, aInfinity+2; "nfinity" mov edx, 7 call _memcmp cmp eax, 0 jz short loc_36655 loc_36639: mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 jmp loc_367D8 loc_36655: jmp short $+2 loc_36657: jmp short $+2 loc_36659: mov rdi, [rsp+0C8h+var_18] mov rax, [rsp+0C8h+var_38] mov [rsp+0C8h+var_B8], rax mov [rsp+0C8h+var_B0], 0FFFFFFFFFFFFFFF9h mov rsi, [rsp+0C8h+var_B8] mov rdx, [rsp+0C8h+var_B0] call JS_ToNumber mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], rdx mov rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_58], rax mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_50], rax mov rdi, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_366D7 mov rax, [rsp+0C8h+var_58] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_8], rax jmp loc_367D8 loc_366D7: mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_ToString mov [rsp+0C8h+var_C8], rax mov [rsp+0C8h+var_C0], rdx mov rax, [rsp+0C8h+var_C8] mov [rsp+0C8h+var_68], rax mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_60], rax mov rdi, [rsp+0C8h+var_68] mov rsi, [rsp+0C8h+var_60] call JS_IsException_1 cmp eax, 0 jz short loc_36754 mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_FreeValue mov rax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_60] mov [rsp+0C8h+var_8], rax jmp loc_367D8 loc_36754: mov rdi, [rsp+0C8h+var_38] mov rsi, [rsp+0C8h+var_68] call js_string_eq mov [rsp+0C8h+var_44], eax mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_68] mov rdx, [rsp+0C8h+var_60] call JS_FreeValue cmp [rsp+0C8h+var_44], 0 jz short loc_367AA mov rax, [rsp+0C8h+var_58] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_8], rax jmp short loc_367D8 loc_367AA: mov rdi, [rsp+0C8h+var_18] mov rsi, [rsp+0C8h+var_58] mov rdx, [rsp+0C8h+var_50] call JS_FreeValue mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 3 loc_367D8: mov rax, [rsp+0C8h+var_10] mov rdx, [rsp+0C8h+var_8] add rsp, 0C8h retn
long long JS_AtomIsNumericIndex1(long long a1, int a2) { int v2; // eax long long v3; // rdx long long v4; // rdx long long v5; // rdx long long v6; // rcx long long v7; // r8 long long v8; // r9 long long v9; // rdx unsigned long long v11; // [rsp+30h] [rbp-98h] unsigned __int8 *v12; // [rsp+38h] [rbp-90h] long long v13; // [rsp+42h] [rbp-86h] BYREF int v14; // [rsp+4Ah] [rbp-7Eh] __int16 v15; // [rsp+4Eh] [rbp-7Ah] unsigned long long v16; // [rsp+50h] [rbp-78h] unsigned __int16 *v17; // [rsp+58h] [rbp-70h] long long v18; // [rsp+60h] [rbp-68h] long long v19; // [rsp+68h] [rbp-60h] long long v20; // [rsp+70h] [rbp-58h] long long v21; // [rsp+78h] [rbp-50h] int v22; // [rsp+84h] [rbp-44h] int v23; // [rsp+88h] [rbp-40h] unsigned int v24; // [rsp+8Ch] [rbp-3Ch] long long v25; // [rsp+90h] [rbp-38h] long long v26; // [rsp+98h] [rbp-30h] long long v27; // [rsp+A0h] [rbp-28h] unsigned int v28; // [rsp+ACh] [rbp-1Ch] long long v29; // [rsp+B0h] [rbp-18h] long long v30; // [rsp+B8h] [rbp-10h] long long v31; // [rsp+C0h] [rbp-8h] v29 = a1; v28 = a2; v27 = *(_QWORD *)(a1 + 24); if ( _JS_AtomIsTaggedInt(a2) ) { v2 = _JS_AtomToUInt32(v28); v30 = js_int32(v2); v31 = v3; return v30; } v26 = *(_QWORD *)(*(_QWORD *)(v27 + 104) + 8LL * v28); if ( *(_QWORD *)(v26 + 4) >> 62 != 1 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v25 = v26; v23 = *(_QWORD *)(v26 + 4) & 0x7FFFFFFF; if ( (*(_QWORD *)(v26 + 4) & 0x80000000LL) != 0 ) { v17 = (unsigned __int16 *)(v25 + 24); v16 = 2LL * v23 + v25 + 24; if ( v25 + 24 >= v16 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v24 = *v17; if ( v24 != 45 ) goto LABEL_42; if ( (unsigned long long)v17 >= v16 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v24 = *++v17; if ( v24 != 48 || v23 != 2 ) { LABEL_42: if ( !(unsigned int)is_num(v24) ) { v13 = 0x6E00690066006ELL; v14 = 7602281; v15 = 121; if ( v24 != 73 || (long long)(v16 - (_QWORD)v17) >> 1 != 8 || (unsigned int)memcmp(v17 + 1, &v13, 14LL) ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } } goto LABEL_32; } LABEL_26: v30 = js_float64(-0.0); v31 = v4; return v30; } v12 = (unsigned __int8 *)(v25 + 24); v11 = v23 + v25 + 24; if ( v25 + 24 >= v11 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v24 = *v12; if ( v24 == 45 ) { if ( (unsigned long long)v12 >= v11 ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } v12 = (unsigned __int8 *)(v25 + 25); v24 = *(unsigned __int8 *)(v25 + 25); if ( v24 == 48 && v23 == 2 ) goto LABEL_26; } if ( !(unsigned int)is_num(v24) && (v24 != 73 || v11 - (_QWORD)v12 != 8 || (unsigned int)memcmp(v12 + 1, "nfinity", 7LL)) ) { LODWORD(v30) = 0; v31 = 3LL; return v30; } LABEL_32: v20 = JS_ToNumber(v29, v25, -7LL); v21 = v5; if ( JS_IsException_1(v20, v5) ) { v30 = v20; v31 = v21; } else { v18 = JS_ToString(v29, v20, v21, v6, v7, v8); v19 = v9; if ( JS_IsException_1(v18, v9) ) { JS_FreeValue(v29, v20, v21); v30 = v18; v31 = v19; } else { v22 = js_string_eq(v25, v18); JS_FreeValue(v29, v18, v19); if ( v22 ) { v30 = v20; v31 = v21; } else { JS_FreeValue(v29, v20, v21); LODWORD(v30) = 0; v31 = 3LL; } } } return v30; }
JS_AtomIsNumericIndex1: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb0],RDI MOV dword ptr [RSP + 0xac],ESI MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xa0],RAX MOV EDI,dword ptr [RSP + 0xac] CALL 0x001360c0 CMP EAX,0x0 JZ 0x00136303 MOV EDI,dword ptr [RSP + 0xac] CALL 0x001360e0 MOV EDI,EAX CALL 0x00133cc0 MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RDX JMP 0x001367d8 LAB_00136303: MOV RAX,qword ptr [RSP + 0xa0] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0xac] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x3e MOVZX EAX,AL CMP EAX,0x1 JZ 0x00136356 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136356: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV dword ptr [RSP + 0x88],EAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x001364ff MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOVSXD RCX,dword ptr [RSP + 0x88] SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RSP + 0x50] JC 0x001363f3 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_001363f3: MOV RAX,qword ptr [RSP + 0x58] MOVZX EAX,word ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x2d JNZ 0x0013646c MOV RAX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RSP + 0x50] JC 0x00136434 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136434: MOV RAX,qword ptr [RSP + 0x58] ADD RAX,0x2 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x58] MOVZX EAX,word ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x30 JNZ 0x0013646a CMP dword ptr [RSP + 0x88],0x2 JNZ 0x0013646a JMP 0x001365c8 LAB_0013646a: JMP 0x0013646c LAB_0013646c: MOV EDI,dword ptr [RSP + 0x8c] CALL 0x0015cc20 CMP EAX,0x0 JNZ 0x001364fa MOV RAX,qword ptr [0x0020d68e] MOV qword ptr [RSP + 0x42],RAX MOV EAX,dword ptr [0x0020d696] MOV dword ptr [RSP + 0x4a],EAX MOV AX,word ptr [0x0020d69a] MOV word ptr [RSP + 0x4e],AX CMP dword ptr [RSP + 0x8c],0x49 JNZ 0x001364dc MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] SUB RAX,RCX SAR RAX,0x1 CMP RAX,0x8 JNZ 0x001364dc MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x2 LEA RSI,[RSP + 0x42] MOV EDX,0xe CALL 0x0010e480 CMP EAX,0x0 JZ 0x001364f8 LAB_001364dc: MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_001364f8: JMP 0x001364fa LAB_001364fa: JMP 0x00136659 LAB_001364ff: MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x90] ADD RAX,0x18 MOVSXD RCX,dword ptr [RSP + 0x88] ADD RAX,RCX MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0x30] JC 0x00136554 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136554: MOV RAX,qword ptr [RSP + 0x38] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x2d JNZ 0x001365ec MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0x30] JC 0x00136595 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136595: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x1 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0x8c],EAX CMP dword ptr [RSP + 0x8c],0x30 JNZ 0x001365ea CMP dword ptr [RSP + 0x88],0x2 JNZ 0x001365ea JMP 0x001365c8 LAB_001365c8: MOVSD XMM0,qword ptr [0x0020d840] CALL 0x0014d660 MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xc0],RDX JMP 0x001367d8 LAB_001365ea: JMP 0x001365ec LAB_001365ec: MOV EDI,dword ptr [RSP + 0x8c] CALL 0x0015cc20 CMP EAX,0x0 JNZ 0x00136657 CMP dword ptr [RSP + 0x8c],0x49 JNZ 0x00136639 MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] SUB RAX,RCX CMP RAX,0x8 JNZ 0x00136639 MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x1 LEA RSI,[0x20e225] MOV EDX,0x7 CALL 0x0010e480 CMP EAX,0x0 JZ 0x00136655 LAB_00136639: MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 JMP 0x001367d8 LAB_00136655: JMP 0x00136657 LAB_00136657: JMP 0x00136659 LAB_00136659: MOV RDI,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],-0x7 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00161860 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001366d7 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001367d8 LAB_001366d7: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00129d40 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00136754 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001367d8 LAB_00136754: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001618d0 MOV dword ptr [RSP + 0x84],EAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 CMP dword ptr [RSP + 0x84],0x0 JZ 0x001367aa MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001367d8 LAB_001367aa: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x3 LAB_001367d8: MOV RAX,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
int1 [16] JS_AtomIsNumericIndex1(long param_1,uint param_2) { int iVar1; int4 uVar2; byte *pbVar3; int1 auVar4 [16]; byte *local_90; int8 local_86; int4 local_7e; int2 local_7a; ushort *local_78; ushort *local_70; int1 local_68 [16]; int1 local_58 [16]; int local_44; uint local_40; uint local_3c; long local_38; long local_30; long local_28; uint local_1c; long local_18; int4 local_10; int4 uStack_c; int8 local_8; local_28 = *(long *)(param_1 + 0x18); local_1c = param_2; local_18 = param_1; iVar1 = __JS_AtomIsTaggedInt(param_2); if (iVar1 != 0) { uVar2 = __JS_AtomToUInt32(local_1c); auVar4 = js_int32(uVar2); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; goto LAB_001367d8; } local_38 = *(long *)(*(long *)(local_28 + 0x68) + (ulong)local_1c * 8); if ((uint)((ulong)*(int8 *)(local_38 + 4) >> 0x3e) != 1) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_40 = (uint)*(int8 *)(local_38 + 4) & 0x7fffffff; local_30 = local_38; if ((*(ulong *)(local_38 + 4) >> 0x1f & 1) == 0) { local_90 = (byte *)(local_38 + 0x18); pbVar3 = (byte *)(local_38 + 0x18 + (long)(int)local_40); if (pbVar3 <= local_90) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_3c = (uint)*local_90; if (local_3c == 0x2d) { if (pbVar3 <= local_90) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_90 = (byte *)(local_38 + 0x19); local_3c = (uint)*local_90; if ((local_3c == 0x30) && (local_40 == 2)) goto LAB_001365c8; } iVar1 = is_num(local_3c); if ((iVar1 == 0) && (((local_3c != 0x49 || ((long)pbVar3 - (long)local_90 != 8)) || (iVar1 = memcmp(local_90 + 1,"nfinity",7), iVar1 != 0)))) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } } else { local_70 = (ushort *)(local_38 + 0x18); local_78 = (ushort *)(local_38 + 0x18 + (long)(int)local_40 * 2); if (local_78 <= local_70) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_3c = (uint)*local_70; if (local_3c == 0x2d) { if (local_78 <= local_70) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } local_70 = (ushort *)(local_38 + 0x1a); local_3c = (uint)*local_70; if ((local_3c == 0x30) && (local_40 == 2)) { LAB_001365c8: local_3c = 0x30; auVar4 = js_float64(DAT_0020d840); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; goto LAB_001367d8; } } iVar1 = is_num(local_3c); if (iVar1 == 0) { local_86 = DAT_0020d68e; local_7e = DAT_0020d696; local_7a = DAT_0020d69a; if (((local_3c != 0x49) || ((long)local_78 - (long)local_70 >> 1 != 8)) || (iVar1 = memcmp(local_70 + 1,&local_86,0xe), iVar1 != 0)) { local_10 = 0; local_8 = 3; goto LAB_001367d8; } } } local_58 = JS_ToNumber(local_18,local_38,0xfffffffffffffff9); iVar1 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar1 == 0) { local_68 = JS_ToString(local_18,local_58._0_8_,local_58._8_8_); iVar1 = JS_IsException(local_68._0_8_,local_68._8_8_); if (iVar1 == 0) { local_44 = js_string_eq(local_38,local_68._0_8_); JS_FreeValue(local_18,local_68._0_8_,local_68._8_8_); if (local_44 == 0) { JS_FreeValue(local_18,local_58._0_8_,local_58._8_8_); local_10 = 0; local_8 = 3; } else { local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } } else { JS_FreeValue(local_18,local_58._0_8_,local_58._8_8_); local_10 = local_68._0_4_; uStack_c = local_68._4_4_; local_8 = local_68._8_8_; } } else { local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } LAB_001367d8: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
38,841
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
monkey531[P]llama/common/json.hpp
static diyfp mul(const diyfp& x, const diyfp& y) noexcept { static_assert(kPrecision == 64, "internal error"); // Computes: // f = round((x.f * y.f) / 2^q) // e = x.e + y.e + q // Emulate the 64-bit * 64-bit multiplication: // // p = u * v // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) // // (Since Q might be larger than 2^32 - 1) // // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) // // (Q_hi + H does not overflow a 64-bit int) // // = p_lo + 2^64 p_hi const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; const std::uint64_t u_hi = x.f >> 32u; const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; const std::uint64_t v_hi = y.f >> 32u; const std::uint64_t p0 = u_lo * v_lo; const std::uint64_t p1 = u_lo * v_hi; const std::uint64_t p2 = u_hi * v_lo; const std::uint64_t p3 = u_hi * v_hi; const std::uint64_t p0_hi = p0 >> 32u; const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; const std::uint64_t p1_hi = p1 >> 32u; const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; const std::uint64_t p2_hi = p2 >> 32u; std::uint64_t Q = p0_hi + p1_lo + p2_lo; // The full product might now be computed as // // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) // p_lo = p0_lo + (Q << 32) // // But in this particular case here, the full p_lo is not required. // Effectively we only need to add the highest bit in p_lo to p_hi (and // Q_hi + 1 does not overflow). Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); return {h, x.e + y.e + 64}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&): movq (%rdi), %rax movl %eax, %ecx shrq $0x20, %rax movq (%rsi), %r8 movl %r8d, %edx shrq $0x20, %r8 movq %rdx, %r9 imulq %rcx, %r9 imulq %r8, %rcx imulq %rax, %rdx imulq %rax, %r8 shrq $0x20, %r9 movl %ecx, %r10d addq %r9, %r10 shrq $0x20, %rcx movl %edx, %eax addq %r10, %rax shrq $0x20, %rdx addq %r8, %rdx addq %rcx, %rdx subq $-0x80000000, %rax # imm = 0x80000000 shrq $0x20, %rax addq %rdx, %rax movl 0x8(%rdi), %ecx movl 0x8(%rsi), %edx addl %ecx, %edx addl $0x40, %edx retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_: mov rax, [rdi] mov ecx, eax shr rax, 20h mov r8, [rsi] mov edx, r8d shr r8, 20h mov r9, rdx imul r9, rcx imul rcx, r8 imul rdx, rax imul r8, rax shr r9, 20h mov r10d, ecx add r10, r9 shr rcx, 20h mov eax, edx add rax, r10 shr rdx, 20h add rdx, r8 add rdx, rcx sub rax, 0FFFFFFFF80000000h shr rax, 20h add rax, rdx mov ecx, [rdi+8] mov edx, [rsi+8] add edx, ecx add edx, 40h ; '@' retn
unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(_QWORD *a1, _QWORD *a2) { long long v2; // rcx v2 = (unsigned int)*a1; return ((unsigned long long)(HIDWORD(*a2) * v2) >> 32) + HIDWORD(*a1) * HIDWORD(*a2) + ((HIDWORD(*a1) * (unsigned long long)(unsigned int)*a2) >> 32) + ((((v2 * (unsigned long long)(unsigned int)*a2) >> 32) + (unsigned int)(HIDWORD(*a2) * v2) + (unsigned int)(HIDWORD(*a1) * *a2) + 0x80000000) >> 32); }
mul: MOV RAX,qword ptr [RDI] MOV ECX,EAX SHR RAX,0x20 MOV R8,qword ptr [RSI] MOV EDX,R8D SHR R8,0x20 MOV R9,RDX IMUL R9,RCX IMUL RCX,R8 IMUL RDX,RAX IMUL R8,RAX SHR R9,0x20 MOV R10D,ECX ADD R10,R9 SHR RCX,0x20 MOV EAX,EDX ADD RAX,R10 SHR RDX,0x20 ADD RDX,R8 ADD RDX,RCX SUB RAX,-0x80000000 SHR RAX,0x20 ADD RAX,RDX MOV ECX,dword ptr [RDI + 0x8] MOV EDX,dword ptr [RSI + 0x8] ADD EDX,ECX ADD EDX,0x40 RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */ int1 [16] nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2) { ulong uVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; ulong uVar6; int1 auVar7 [16]; uVar2 = *(ulong *)param_1 & 0xffffffff; uVar1 = *(ulong *)param_1 >> 0x20; uVar4 = *(ulong *)param_2 & 0xffffffff; uVar6 = *(ulong *)param_2 >> 0x20; uVar3 = uVar2 * uVar6; uVar5 = uVar4 * uVar1; auVar7._0_8_ = ((uVar5 & 0xffffffff) + (uVar3 & 0xffffffff) + (uVar4 * uVar2 >> 0x20) + 0x80000000 >> 0x20) + (uVar5 >> 0x20) + uVar6 * uVar1 + (uVar3 >> 0x20); auVar7._8_4_ = *(int *)(param_2 + 8) + *(int *)(param_1 + 8) + 0x40; auVar7._12_4_ = 0; return auVar7; }
38,842
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&)
monkey531[P]llama/common/minja.hpp
Context(Value && values, const std::shared_ptr<Context> & parent = nullptr) : values_(std::move(values)), parent_(parent) { if (!values_.is_object()) throw std::runtime_error("Context values must be an object: " + values_.dump()); }
O3
cpp
minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) leaq 0x8ee03(%rip), %rax # 0x130130 addq $0x10, %rax movq %rax, (%rdi) movups %xmm0, 0x18(%rdi) xorl %r13d, %r13d movq %r13, 0x30(%rdi) movups 0x10(%rsi), %xmm0 movq %r13, 0x18(%rsi) movups %xmm0, 0x28(%rdi) movq %r13, 0x10(%rsi) movq %r13, 0x40(%rdi) movups 0x20(%rsi), %xmm0 movq %r13, 0x28(%rsi) movups %xmm0, 0x38(%rdi) movq %r13, 0x20(%rsi) movq %r13, 0x50(%rdi) movups 0x30(%rsi), %xmm0 movq %r13, 0x38(%rsi) movups %xmm0, 0x48(%rdi) movq %r13, 0x30(%rsi) leaq 0x58(%rdi), %r12 leaq 0x40(%rsi), %rdi movups 0x40(%rsi), %xmm0 movups %xmm0, 0x58(%rbx) xorl %esi, %esi callq 0x5d708 movb $0x0, 0x40(%r15) movq %r13, 0x48(%r15) movq %r12, %rdi movl $0x1, %esi callq 0x5d708 movq (%r14), %rax movq %rax, 0x68(%rbx) movq 0x8(%r14), %rax movq %rax, 0x70(%rbx) testq %rax, %rax je 0xa13cd movq 0x8fbb9(%rip), %rcx # 0x130f78 cmpb $0x0, (%rcx) je 0xa13c9 incl 0x8(%rax) jmp 0xa13cd lock incl 0x8(%rax) cmpq $0x0, 0x38(%rbx) je 0xa13e3 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x18(%rbx), %r14 movl $0x10, %edi callq 0x1b480 movq %rax, %r15 leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x8afc2 leaq 0x54525(%rip), %rsi # 0xf5934 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x7d841 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0x1bf20 xorl %ebp, %ebp movq 0x8fbb1(%rip), %rsi # 0x130fe8 movq 0x8fb12(%rip), %rdx # 0x130f50 movq %r15, %rdi callq 0x1c040 movq %rax, %r12 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa1464 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa147f movq 0x18(%rsp), %rsi incq %rsi callq 0x1b930 testb %bpl, %bpl jne 0xa14a9 jmp 0xa14b1 movq %rax, %r12 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa14a9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b930 jmp 0xa14a9 movq %rax, %r12 movq %r15, %rdi callq 0x1b6c0 movq 0x70(%rbx), %rdi addq $0x8, %rbx testq %rdi, %rdi je 0xa14c3 callq 0x267a6 movq %r14, %rdi callq 0x8aca0 movq %rbx, %rdi callq 0xa14dc movq %r12, %rdi callq 0x1c0d0 nop
_ZN5minja7ContextC2EONS_5ValueERKSt10shared_ptrIS0_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context add rax, 10h mov [rdi], rax movups xmmword ptr [rdi+18h], xmm0 xor r13d, r13d mov [rdi+30h], r13 movups xmm0, xmmword ptr [rsi+10h] mov [rsi+18h], r13 movups xmmword ptr [rdi+28h], xmm0 mov [rsi+10h], r13 mov [rdi+40h], r13 movups xmm0, xmmword ptr [rsi+20h] mov [rsi+28h], r13 movups xmmword ptr [rdi+38h], xmm0 mov [rsi+20h], r13 mov [rdi+50h], r13 movups xmm0, xmmword ptr [rsi+30h] mov [rsi+38h], r13 movups xmmword ptr [rdi+48h], xmm0 mov [rsi+30h], r13 lea r12, [rdi+58h] lea rdi, [rsi+40h] movups xmm0, xmmword ptr [rsi+40h] movups xmmword ptr [rbx+58h], xmm0 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r15+40h], 0 mov [r15+48h], r13 mov rdi, r12 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, [r14] mov [rbx+68h], rax mov rax, [r14+8] mov [rbx+70h], rax test rax, rax jz short loc_A13CD mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_A13C9 inc dword ptr [rax+8] jmp short loc_A13CD loc_A13C9: lock inc dword ptr [rax+8] loc_A13CD: cmp qword ptr [rbx+38h], 0 jz short loc_A13E3 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A13E3: lea r14, [rbx+18h] mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rdi, [rsp+78h+var_70] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aContextValuesM; "Context values must be an object: " lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_50] mov rdi, r15 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r12, rax lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A1464 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A1464: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A147F mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A147F: test bpl, bpl jnz short loc_A14A9 jmp short loc_A14B1 mov r12, rax lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A14A9 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A14A9 mov r12, rax loc_A14A9: mov rdi, r15; void * call ___cxa_free_exception loc_A14B1: mov rdi, [rbx+70h] add rbx, 8 test rdi, rdi jz short loc_A14C3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A14C3: mov rdi, r14; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call _ZNSt23enable_shared_from_thisIN5minja7ContextEED2Ev; std::enable_shared_from_this<minja::Context>::~enable_shared_from_this() mov rdi, r12 call __Unwind_Resume
long long minja::Context::Context(long long a1, long long a2, _QWORD *a3) { __int128 v4; // xmm0 __int128 v5; // xmm0 __int128 v6; // xmm0 long long result; // rax void *exception; // r15 _BYTE v9[16]; // [rsp+8h] [rbp-70h] BYREF _BYTE v10[16]; // [rsp+28h] [rbp-50h] BYREF *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)a1 = &`vtable for'minja::Context + 2; *(_OWORD *)(a1 + 24) = 0LL; *(_QWORD *)(a1 + 48) = 0LL; v4 = *(_OWORD *)(a2 + 16); *(_QWORD *)(a2 + 24) = 0LL; *(_OWORD *)(a1 + 40) = v4; *(_QWORD *)(a2 + 16) = 0LL; *(_QWORD *)(a1 + 64) = 0LL; v5 = *(_OWORD *)(a2 + 32); *(_QWORD *)(a2 + 40) = 0LL; *(_OWORD *)(a1 + 56) = v5; *(_QWORD *)(a2 + 32) = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v6 = *(_OWORD *)(a2 + 48); *(_QWORD *)(a2 + 56) = 0LL; *(_OWORD *)(a1 + 72) = v6; *(_QWORD *)(a2 + 48) = 0LL; *(_OWORD *)(a1 + 88) = *(_OWORD *)(a2 + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64)); *(_BYTE *)(a2 + 64) = 0; *(_QWORD *)(a2 + 72) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 88)); *(_QWORD *)(a1 + 104) = *a3; result = a3[1]; *(_QWORD *)(a1 + 112) = result; if ( result ) { if ( _libc_single_threaded ) ++*(_DWORD *)(result + 8); else _InterlockedIncrement((volatile signed __int32 *)(result + 8)); } if ( !*(_QWORD *)(a1 + 56) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v9, a1 + 24, 0xFFFFFFFF, 0); std::operator+<char>((long long)v10, (long long)"Context values must be an object: ", (long long)v9); std::runtime_error::runtime_error(exception, v10); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
Context: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 LEA RAX,[0x230130] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOVUPS xmmword ptr [RDI + 0x18],XMM0 XOR R13D,R13D MOV qword ptr [RDI + 0x30],R13 MOVUPS XMM0,xmmword ptr [RSI + 0x10] MOV qword ptr [RSI + 0x18],R13 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOV qword ptr [RSI + 0x10],R13 MOV qword ptr [RDI + 0x40],R13 MOVUPS XMM0,xmmword ptr [RSI + 0x20] MOV qword ptr [RSI + 0x28],R13 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOV qword ptr [RSI + 0x20],R13 MOV qword ptr [RDI + 0x50],R13 MOVUPS XMM0,xmmword ptr [RSI + 0x30] MOV qword ptr [RSI + 0x38],R13 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOV qword ptr [RSI + 0x30],R13 LEA R12,[RDI + 0x58] LEA RDI,[RSI + 0x40] MOVUPS XMM0,xmmword ptr [RSI + 0x40] MOVUPS xmmword ptr [RBX + 0x58],XMM0 XOR ESI,ESI CALL 0x0015d708 MOV byte ptr [R15 + 0x40],0x0 MOV qword ptr [R15 + 0x48],R13 MOV RDI,R12 MOV ESI,0x1 CALL 0x0015d708 MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x68],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x001a13cd MOV RCX,qword ptr [0x00230f78] CMP byte ptr [RCX],0x0 JZ 0x001a13c9 INC dword ptr [RAX + 0x8] JMP 0x001a13cd LAB_001a13c9: INC.LOCK dword ptr [RAX + 0x8] LAB_001a13cd: CMP qword ptr [RBX + 0x38],0x0 JZ 0x001a13e3 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a13e3: LEA R14,[RBX + 0x18] MOV EDI,0x10 CALL 0x0011b480 MOV R15,RAX LAB_001a13f4: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0018afc2 LAB_001a1408: LEA RSI,[0x1f5934] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0017d841 MOV BPL,0x1 LAB_001a1421: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x0011bf20 XOR EBP,EBP MOV RSI,qword ptr [0x00230fe8] MOV RDX,qword ptr [0x00230f50] MOV RDI,R15 CALL 0x0011c040
/* minja::Context::Context(minja::Value&&, std::shared_ptr<minja::Context> const&) */ void __thiscall minja::Context::Context(Context *this,Value *param_1,shared_ptr *param_2) { long lVar1; int8 uVar2; runtime_error *this_00; int1 local_70 [32]; string local_50 [32]; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int ***)this = &PTR__Context_00230140; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x30) = 0; uVar2 = *(int8 *)(param_1 + 0x18); *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(this + 0x28) = *(int8 *)(param_1 + 0x10); *(int8 *)(this + 0x30) = uVar2; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(this + 0x40) = 0; uVar2 = *(int8 *)(param_1 + 0x28); *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(this + 0x38) = *(int8 *)(param_1 + 0x20); *(int8 *)(this + 0x40) = uVar2; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(this + 0x50) = 0; uVar2 = *(int8 *)(param_1 + 0x38); *(int8 *)(param_1 + 0x38) = 0; *(int8 *)(this + 0x48) = *(int8 *)(param_1 + 0x30); *(int8 *)(this + 0x50) = uVar2; *(int8 *)(param_1 + 0x30) = 0; uVar2 = *(int8 *)(param_1 + 0x48); *(int8 *)(this + 0x58) = *(int8 *)(param_1 + 0x40); *(int8 *)(this + 0x60) = 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> ::assert_invariant((bool)((char)param_1 + '@')); param_1[0x40] = (Value)0x0; *(int8 *)(param_1 + 0x48) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant((bool)((char)this + 'X')); *(int8 *)(this + 0x68) = *(int8 *)param_2; lVar1 = *(long *)(param_2 + 8); *(long *)(this + 0x70) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00230f78 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } if (*(long *)(this + 0x38) != 0) { return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a13f4 to 001a1407 has its CatchHandler @ 001a14a6 */ Value::dump_abi_cxx11_((int)local_70,(bool)((char)this + '\x18')); /* try { // try from 001a1408 to 001a141d has its CatchHandler @ 001a1486 */ std::operator+((char *)local_50,(string *)"Context values must be an object: "); /* try { // try from 001a1421 to 001a1445 has its CatchHandler @ 001a1446 */ std::runtime_error::runtime_error(this_00,local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f50); }
38,843
my_hash_init2
eloqsql/mysys/hash.c
my_bool my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, my_hash_function hash_function, void (*free_element)(void*), uint flags) { my_bool res; DBUG_ENTER("my_hash_init2"); DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size)); hash->records=0; hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->get_key=get_key; hash->hash_function= hash_function ? hash_function : my_hash_sort; hash->free=free_element; hash->flags=flags; hash->charset=charset; res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size, growth_size, MYF((flags & HASH_THREAD_SPECIFIC ? MY_THREAD_SPECIFIC : 0))); DBUG_RETURN(res); }
O0
c
my_hash_init2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x30(%rbp), %eax movq 0x28(%rbp), %rax movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) jmp 0x768f3 movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x1, 0x10(%rax) movq 0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x50(%rax) cmpq $0x0, 0x20(%rbp) je 0x7693f movq 0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x7694c leaq -0x126(%rip), %rax # 0x76820 movq %rax, -0x40(%rbp) jmp 0x7694c movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq 0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movl 0x30(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x68(%rax) movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x28(%rbp), %rax movl %eax, %r8d movl -0x14(%rbp), %r9d movl 0x30(%rbp), %edx andl $0x2, %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, %eax movl $0x10, %edx xorl %ecx, %ecx movq %rax, (%rsp) callq 0x848a0 movb %al, -0x31(%rbp) movb -0x31(%rbp), %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
my_hash_init2: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_20] mov rax, [rbp+arg_18] mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 jmp short $+2 loc_768F3: mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov qword ptr [rax+10h], 1 mov rcx, [rbp+arg_8] mov rax, [rbp+var_10] mov [rax+50h], rcx cmp [rbp+arg_10], 0 jz short loc_7693F mov rax, [rbp+arg_10] mov [rbp+var_40], rax jmp short loc_7694C loc_7693F: lea rax, my_hash_sort mov [rbp+var_40], rax jmp short $+2 loc_7694C: mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rcx, [rbp+arg_18] mov rax, [rbp+var_10] mov [rax+60h], rcx mov ecx, [rbp+arg_20] mov rax, [rbp+var_10] mov [rax+20h], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+68h], rcx mov edi, [rbp+var_4] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rax, [rbp+var_28] mov r8d, eax mov r9d, [rbp+var_14] mov edx, [rbp+arg_20] and edx, 2 xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx mov eax, eax mov edx, 10h xor ecx, ecx mov [rsp+50h+var_50], rax call init_dynamic_array2 mov [rbp+var_31], al mov al, [rbp+var_31] mov [rbp+var_41], al mov al, [rbp+var_41] add rsp, 50h pop rbp retn
long long my_hash_init2( int a1, long long a2, int a3, long long a4, int a5, long long a6, long long a7, long long a8, long long ( *a9)(long long a1, long long a2, long long a3), long long a10, int a11) { int v11; // esi unsigned int v12; // eax long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h] *(_QWORD *)(a2 + 24) = 0LL; *(_QWORD *)a2 = a6; *(_QWORD *)(a2 + 8) = a7; *(_QWORD *)(a2 + 16) = 1LL; *(_QWORD *)(a2 + 80) = a8; if ( a9 ) v14 = a9; else v14 = my_hash_sort; *(_QWORD *)(a2 + 88) = v14; *(_QWORD *)(a2 + 96) = a10; *(_DWORD *)(a2 + 32) = a11; *(_QWORD *)(a2 + 104) = a4; v11 = a2 + 40; v12 = 0; if ( (a11 & 2) != 0 ) v12 = 0x10000; return init_dynamic_array2(a1, v11, 16, 0, a5, a3, v12); }
my_hash_init2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x30] MOV RAX,qword ptr [RBP + 0x28] MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 JMP 0x001768f3 LAB_001768f3: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x1 MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x50],RCX CMP qword ptr [RBP + 0x20],0x0 JZ 0x0017693f MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x0017694c LAB_0017693f: LEA RAX,[0x176820] MOV qword ptr [RBP + -0x40],RAX JMP 0x0017694c LAB_0017694c: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RCX,qword ptr [RBP + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV ECX,dword ptr [RBP + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],RCX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RAX,qword ptr [RBP + -0x28] MOV R8D,EAX MOV R9D,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + 0x30] AND EDX,0x2 XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV EDX,0x10 XOR ECX,ECX MOV qword ptr [RSP],RAX CALL 0x001848a0 MOV byte ptr [RBP + -0x31],AL MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x41],AL MOV AL,byte ptr [RBP + -0x41] ADD RSP,0x50 POP RBP RET
int8 my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6,int8 param_7,int8 param_8, code *param_9,int8 param_10,uint param_11) { int4 uVar1; int8 uVar2; code *local_48; param_2[3] = 0; *param_2 = param_6; param_2[1] = param_7; param_2[2] = 1; param_2[10] = param_8; if (param_9 == (code *)0x0) { local_48 = my_hash_sort; } else { local_48 = param_9; } param_2[0xb] = local_48; param_2[0xc] = param_10; *(uint *)(param_2 + 4) = param_11; param_2[0xd] = param_4; uVar1 = 0; if ((param_11 & 2) != 0) { uVar1 = 0x10000; } uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1); return uVar2; }
38,844
my_fill_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill) { if (fill < 0x80) my_fill_8bit(cs, str, length, fill); else my_fill_utf8mb3_mb(cs, str, length, fill); }
O3
c
my_fill_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpl $0x7f, %ecx jg 0xcb635 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xcb6b9 movq %rbx, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xb56fb leaq (%rbx,%r15), %r14 movq 0xb8(%rdi), %rax movl %ecx, %esi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0xd8(%rax) movsbq %al, %r12 cmpq %r15, %r12 jle 0xcb65e movq %rbx, %r13 jmp 0xcb683 movsbq %al, %r15 movq %rbx, %r13 movq %rbx, %rdi leaq -0x3a(%rbp), %rsi movq %r15, %rdx callq 0x29090 addq %r12, %rbx addq %r12, %r13 leaq (%rbx,%r12), %rax cmpq %r14, %rax jbe 0xcb665 cmpq %r14, %rbx jae 0xcb69b subq %r13, %r14 movq %rbx, %rdi movl $0x20, %esi movq %r14, %rdx callq 0x292b0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xcb6b9 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
my_fill_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax cmp ecx, 7Fh jg short loc_CB635 mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_CB6B9 mov rsi, rbx mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_fill_8bit loc_CB635: lea r14, [rbx+r15] mov rax, [rdi+0B8h] mov esi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+0D8h] movsx r12, al cmp r12, r15 jle short loc_CB65E mov r13, rbx jmp short loc_CB683 loc_CB65E: movsx r15, al mov r13, rbx loc_CB665: mov rdi, rbx lea rsi, [rbp+var_3A] mov rdx, r15 call _memcpy add rbx, r12 add r13, r12 lea rax, [rbx+r12] cmp rax, r14 jbe short loc_CB665 loc_CB683: cmp rbx, r14 jnb short loc_CB69B sub r14, r13 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r14 call _memset loc_CB69B: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_CB6B9 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CB6B9: call ___stack_chk_fail
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4) { unsigned long long v5; // rbx unsigned long long v7; // r14 char v8; // al long long v9; // r12 long long v10; // r13 long long v11; // r15 _BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v13[0] = __readfsqword(0x28u); if ( a4 <= 127 ) return my_fill_8bit(a1, a2, a3, a4); v7 = a2 + a3; v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, (unsigned int)a4, v12, v13); v9 = v8; if ( v8 <= a3 ) { v11 = v8; v10 = a2; do { memcpy(v5, v12, v11); v5 += v9; v10 += v9; } while ( v5 + v9 <= v7 ); } else { v10 = a2; } if ( v5 < v7 ) memset(v5, 32LL, v7 - v10); return __readfsqword(0x28u); }
my_fill_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP ECX,0x7f JG 0x001cb635 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001cb6b9 MOV RSI,RBX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001b56fb LAB_001cb635: LEA R14,[RBX + R15*0x1] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0xd8] MOVSX R12,AL CMP R12,R15 JLE 0x001cb65e MOV R13,RBX JMP 0x001cb683 LAB_001cb65e: MOVSX R15,AL MOV R13,RBX LAB_001cb665: MOV RDI,RBX LEA RSI,[RBP + -0x3a] MOV RDX,R15 CALL 0x00129090 ADD RBX,R12 ADD R13,R12 LEA RAX,[RBX + R12*0x1] CMP RAX,R14 JBE 0x001cb665 LAB_001cb683: CMP RBX,R14 JNC 0x001cb69b SUB R14,R13 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R14 CALL 0x001292b0 LAB_001cb69b: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001cb6b9 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cb6b9: CALL 0x00129260
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4) { void *pvVar1; char cVar2; long lVar3; void *pvVar4; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 < 0x80) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { my_fill_8bit(param_1,param_2,param_3); return; } } else { pvVar1 = (void *)((long)param_2 + param_3); cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38); lVar3 = (long)cVar2; pvVar4 = param_2; if (lVar3 <= param_3) { do { memcpy(param_2,local_42,(long)cVar2); param_2 = (void *)((long)param_2 + lVar3); pvVar4 = (void *)((long)pvVar4 + lVar3); } while ((void *)((long)param_2 + lVar3) <= pvVar1); } if (param_2 < pvVar1) { memset(param_2,0x20,(long)pvVar1 - (long)pvVar4); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
38,845
thr_abort_locks_for_thread
eloqsql/mysys/thr_lock.c
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread_id) { THR_LOCK_DATA *data; my_bool found= FALSE; DBUG_ENTER("thr_abort_locks_for_thread"); mysql_mutex_lock(&lock->mutex); for (data= lock->read_wait.data; data ; data= data->next) { if (data->owner->thread_id == thread_id) /* purecov: tested */ { DBUG_PRINT("info",("Aborting read-wait lock")); data->type= TL_UNLOCK; /* Mark killed */ /* It's safe to signal the cond first: we're still holding the mutex. */ found= TRUE; mysql_cond_signal(data->cond); data->cond= 0; /* Removed from list */ if (((*data->prev)= data->next)) data->next->prev= data->prev; else lock->read_wait.last= data->prev; } } for (data= lock->write_wait.data; data ; data= data->next) { if (data->owner->thread_id == thread_id) /* purecov: tested */ { DBUG_PRINT("info",("Aborting write-wait lock")); data->type= TL_UNLOCK; found= TRUE; mysql_cond_signal(data->cond); data->cond= 0; if (((*data->prev)= data->next)) data->next->prev= data->prev; else lock->write_wait.last= data->prev; } } wake_up_waiters(lock); mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(found); }
O3
c
thr_abort_locks_for_thread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 addq $0x18, %rdi cmpq $0x0, 0x58(%r14) movq %rdi, -0x30(%rbp) jne 0xa3047 callq 0x29210 movq 0x60(%r14), %r13 testq %r13, %r13 je 0xa2f98 leaq 0x68(%r14), %rbx xorl %r12d, %r12d movq (%r13), %rax cmpq %r15, 0x8(%rax) jne 0xa2f7b movl $0x0, 0x40(%r13) movq 0x20(%r13), %r12 movq 0x30(%r12), %rdi testq %rdi, %rdi jne 0xa2f86 movq %r12, %rdi callq 0x295a0 movq $0x0, 0x20(%r13) movq 0x8(%r13), %rax movq 0x10(%r13), %rcx movq %rax, (%rcx) leaq 0x10(%rax), %rcx testq %rax, %rax movq 0x10(%r13), %rax cmoveq %rbx, %rcx movq %rax, (%rcx) movb $0x1, %r12b movq 0x8(%r13), %r13 testq %r13, %r13 jne 0xa2f2b jmp 0xa2f9b leaq 0x2e2083(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x170(%rax) jmp 0xa2f4b xorl %r12d, %r12d movq 0x80(%r14), %r13 testq %r13, %r13 je 0xa301b leaq 0x88(%r14), %rbx movq (%r13), %rax cmpq %r15, 0x8(%rax) jne 0xa2ffe movl $0x0, 0x40(%r13) movq 0x20(%r13), %r12 movq 0x30(%r12), %rdi testq %rdi, %rdi jne 0xa3009 movq %r12, %rdi callq 0x295a0 movq $0x0, 0x20(%r13) movq 0x8(%r13), %rax movq 0x10(%r13), %rcx movq %rax, (%rcx) leaq 0x10(%rax), %rcx testq %rax, %rax movq 0x10(%r13), %rax cmoveq %rbx, %rcx movq %rax, (%rcx) movb $0x1, %r12b movq 0x8(%r13), %r13 testq %r13, %r13 jne 0xa2fae jmp 0xa301b leaq 0x2e2000(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x170(%rax) jmp 0xa2fce movq %r14, %rdi callq 0xa2115 movq 0x58(%r14), %rdi testq %rdi, %rdi jne 0xa305d movq -0x30(%rbp), %rdi callq 0x291e0 movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x38634(%rip), %rsi # 0xdb682 movl $0x545, %edx # imm = 0x545 callq 0x2eb6f jmp 0xa2f1b leaq 0x2e1fac(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x160(%rax) jmp 0xa302c
thr_abort_locks_for_thread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rsi mov r14, rdi add rdi, 18h cmp qword ptr [r14+58h], 0 mov [rbp+var_30], rdi jnz loc_A3047 call _pthread_mutex_lock loc_A2F1B: mov r13, [r14+60h] test r13, r13 jz short loc_A2F98 lea rbx, [r14+68h] xor r12d, r12d loc_A2F2B: mov rax, [r13+0] cmp [rax+8], r15 jnz short loc_A2F7B mov dword ptr [r13+40h], 0 mov r12, [r13+20h] mov rdi, [r12+30h] test rdi, rdi jnz short loc_A2F86 loc_A2F4B: mov rdi, r12 call _pthread_cond_signal mov qword ptr [r13+20h], 0 mov rax, [r13+8] mov rcx, [r13+10h] mov [rcx], rax lea rcx, [rax+10h] test rax, rax mov rax, [r13+10h] cmovz rcx, rbx mov [rcx], rax mov r12b, 1 loc_A2F7B: mov r13, [r13+8] test r13, r13 jnz short loc_A2F2B jmp short loc_A2F9B loc_A2F86: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A2F4B loc_A2F98: xor r12d, r12d loc_A2F9B: mov r13, [r14+80h] test r13, r13 jz short loc_A301B lea rbx, [r14+88h] loc_A2FAE: mov rax, [r13+0] cmp [rax+8], r15 jnz short loc_A2FFE mov dword ptr [r13+40h], 0 mov r12, [r13+20h] mov rdi, [r12+30h] test rdi, rdi jnz short loc_A3009 loc_A2FCE: mov rdi, r12 call _pthread_cond_signal mov qword ptr [r13+20h], 0 mov rax, [r13+8] mov rcx, [r13+10h] mov [rcx], rax lea rcx, [rax+10h] test rax, rax mov rax, [r13+10h] cmovz rcx, rbx mov [rcx], rax mov r12b, 1 loc_A2FFE: mov r13, [r13+8] test r13, r13 jnz short loc_A2FAE jmp short loc_A301B loc_A3009: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A2FCE loc_A301B: mov rdi, r14 call wake_up_waiters mov rdi, [r14+58h] test rdi, rdi jnz short loc_A305D loc_A302C: mov rdi, [rbp+var_30] call _pthread_mutex_unlock mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A3047: lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 545h call psi_mutex_lock jmp loc_A2F1B loc_A305D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A302C
long long thr_abort_locks_for_thread(_QWORD *a1, long long a2) { long long v3; // rdi long long v4; // r13 long long v5; // r12 long long v6; // rdi long long v7; // rax _QWORD *v8; // rcx long long i; // r13 long long v10; // rdi long long v11; // rax _QWORD *v12; // rcx long long v13; // rdi long long v15; // [rsp+0h] [rbp-30h] v3 = (long long)(a1 + 3); v15 = v3; if ( a1[11] ) psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x545u); else pthread_mutex_lock(v3); v4 = a1[12]; if ( v4 ) { LODWORD(v5) = 0; do { if ( *(_QWORD *)(*(_QWORD *)v4 + 8LL) == a2 ) { *(_DWORD *)(v4 + 64) = 0; v5 = *(_QWORD *)(v4 + 32); v6 = *(_QWORD *)(v5 + 48); if ( v6 ) ((void ( *)(long long))PSI_server[46])(v6); pthread_cond_signal(v5); *(_QWORD *)(v4 + 32) = 0LL; v7 = *(_QWORD *)(v4 + 8); **(_QWORD **)(v4 + 16) = v7; v8 = (_QWORD *)(v7 + 16); if ( !v7 ) v8 = a1 + 13; *v8 = *(_QWORD *)(v4 + 16); LOBYTE(v5) = 1; } v4 = *(_QWORD *)(v4 + 8); } while ( v4 ); } else { LODWORD(v5) = 0; } for ( i = a1[16]; i; i = *(_QWORD *)(i + 8) ) { if ( *(_QWORD *)(*(_QWORD *)i + 8LL) == a2 ) { *(_DWORD *)(i + 64) = 0; v5 = *(_QWORD *)(i + 32); v10 = *(_QWORD *)(v5 + 48); if ( v10 ) ((void ( *)(long long))PSI_server[46])(v10); pthread_cond_signal(v5); *(_QWORD *)(i + 32) = 0LL; v11 = *(_QWORD *)(i + 8); **(_QWORD **)(i + 16) = v11; v12 = (_QWORD *)(v11 + 16); if ( !v11 ) v12 = a1 + 17; *v12 = *(_QWORD *)(i + 16); LOBYTE(v5) = 1; } } wake_up_waiters((long long)a1); v13 = a1[11]; if ( v13 ) ((void ( *)(long long))PSI_server[44])(v13); pthread_mutex_unlock(v15); return (unsigned int)v5; }
thr_abort_locks_for_thread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV R14,RDI ADD RDI,0x18 CMP qword ptr [R14 + 0x58],0x0 MOV qword ptr [RBP + -0x30],RDI JNZ 0x001a3047 CALL 0x00129210 LAB_001a2f1b: MOV R13,qword ptr [R14 + 0x60] TEST R13,R13 JZ 0x001a2f98 LEA RBX,[R14 + 0x68] XOR R12D,R12D LAB_001a2f2b: MOV RAX,qword ptr [R13] CMP qword ptr [RAX + 0x8],R15 JNZ 0x001a2f7b MOV dword ptr [R13 + 0x40],0x0 MOV R12,qword ptr [R13 + 0x20] MOV RDI,qword ptr [R12 + 0x30] TEST RDI,RDI JNZ 0x001a2f86 LAB_001a2f4b: MOV RDI,R12 CALL 0x001295a0 MOV qword ptr [R13 + 0x20],0x0 MOV RAX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [R13 + 0x10] MOV qword ptr [RCX],RAX LEA RCX,[RAX + 0x10] TEST RAX,RAX MOV RAX,qword ptr [R13 + 0x10] CMOVZ RCX,RBX MOV qword ptr [RCX],RAX MOV R12B,0x1 LAB_001a2f7b: MOV R13,qword ptr [R13 + 0x8] TEST R13,R13 JNZ 0x001a2f2b JMP 0x001a2f9b LAB_001a2f86: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a2f4b LAB_001a2f98: XOR R12D,R12D LAB_001a2f9b: MOV R13,qword ptr [R14 + 0x80] TEST R13,R13 JZ 0x001a301b LEA RBX,[R14 + 0x88] LAB_001a2fae: MOV RAX,qword ptr [R13] CMP qword ptr [RAX + 0x8],R15 JNZ 0x001a2ffe MOV dword ptr [R13 + 0x40],0x0 MOV R12,qword ptr [R13 + 0x20] MOV RDI,qword ptr [R12 + 0x30] TEST RDI,RDI JNZ 0x001a3009 LAB_001a2fce: MOV RDI,R12 CALL 0x001295a0 MOV qword ptr [R13 + 0x20],0x0 MOV RAX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [R13 + 0x10] MOV qword ptr [RCX],RAX LEA RCX,[RAX + 0x10] TEST RAX,RAX MOV RAX,qword ptr [R13 + 0x10] CMOVZ RCX,RBX MOV qword ptr [RCX],RAX MOV R12B,0x1 LAB_001a2ffe: MOV R13,qword ptr [R13 + 0x8] TEST R13,R13 JNZ 0x001a2fae JMP 0x001a301b LAB_001a3009: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a2fce LAB_001a301b: MOV RDI,R14 CALL 0x001a2115 MOV RDI,qword ptr [R14 + 0x58] TEST RDI,RDI JNZ 0x001a305d LAB_001a302c: MOV RDI,qword ptr [RBP + -0x30] CALL 0x001291e0 MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a3047: LEA RSI,[0x1db682] MOV EDX,0x545 CALL 0x0012eb6f JMP 0x001a2f1b LAB_001a305d: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a302c
ulong thr_abort_locks_for_thread(long param_1,long param_2) { pthread_cond_t *ppVar1; long lVar2; long *plVar3; pthread_mutex_t *__mutex; ulong uVar4; long *plVar5; __mutex = (pthread_mutex_t *)(param_1 + 0x18); if (*(long *)(param_1 + 0x58) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x545); } plVar5 = *(long **)(param_1 + 0x60); if (plVar5 == (long *)0x0) { uVar4 = 0; } else { uVar4 = 0; do { if (*(long *)(*plVar5 + 8) == param_2) { *(int4 *)(plVar5 + 8) = 0; ppVar1 = (pthread_cond_t *)plVar5[4]; if (ppVar1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar1); plVar5[4] = 0; lVar2 = plVar5[1]; *(long *)plVar5[2] = lVar2; plVar3 = (long *)(lVar2 + 0x10); if (lVar2 == 0) { plVar3 = (long *)(param_1 + 0x68); } *plVar3 = plVar5[2]; uVar4 = CONCAT71((int7)((ulong)ppVar1 >> 8),1); } plVar5 = (long *)plVar5[1]; } while (plVar5 != (long *)0x0); } plVar5 = *(long **)(param_1 + 0x80); if (plVar5 != (long *)0x0) { do { if (*(long *)(*plVar5 + 8) == param_2) { *(int4 *)(plVar5 + 8) = 0; ppVar1 = (pthread_cond_t *)plVar5[4]; if (ppVar1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar1); plVar5[4] = 0; lVar2 = plVar5[1]; *(long *)plVar5[2] = lVar2; plVar3 = (long *)(lVar2 + 0x10); if (lVar2 == 0) { plVar3 = (long *)(param_1 + 0x88); } *plVar3 = plVar5[2]; uVar4 = CONCAT71((int7)((ulong)ppVar1 >> 8),1); } plVar5 = (long *)plVar5[1]; } while (plVar5 != (long *)0x0); } wake_up_waiters(param_1); if (*(long *)(param_1 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return uVar4 & 0xffffffff; }
38,846
MouseButtonCallback
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
static void MouseButtonCallback(GLFWwindow *window, int button, int action, int mods) { // WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now, // but future releases may add more actions (i.e. GLFW_REPEAT) CORE.Input.Mouse.currentButtonState[button] = action; CORE.Input.Touch.currentTouchState[button] = action; #if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES) // Process mouse events as touches to be able to use mouse-gestures GestureEvent gestureEvent = { 0 }; // Register touch actions if ((CORE.Input.Mouse.currentButtonState[button] == 1) && (CORE.Input.Mouse.previousButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_ACTION_DOWN; else if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) gestureEvent.touchAction = TOUCH_ACTION_UP; // NOTE: TOUCH_ACTION_MOVE event is registered in MouseCursorPosCallback() // Assign a pointer ID gestureEvent.pointId[0] = 0; // Register touch points count gestureEvent.pointCount = 1; // Register touch points position, only one point registered gestureEvent.position[0] = GetMousePosition(); // Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height gestureEvent.position[0].x /= (float)GetScreenWidth(); gestureEvent.position[0].y /= (float)GetScreenHeight(); // Gesture data is sent to gestures-system for processing ProcessGestureEvent(gestureEvent); #endif }
O0
c
MouseButtonCallback: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movl -0x10(%rbp), %eax movb %al, %dl movslq -0xc(%rbp), %rcx leaq 0x14e7e8(%rip), %rax # 0x21ac80 movb %dl, 0x772(%rax,%rcx) movl -0x10(%rbp), %eax movb %al, %dl movslq -0xc(%rbp), %rcx leaq 0x14e7d1(%rip), %rax # 0x21ac80 movb %dl, 0x7f8(%rax,%rcx) leaq -0x80(%rbp), %rdi xorl %esi, %esi movl $0x68, %edx callq 0xa2d0 movslq -0xc(%rbp), %rcx leaq 0x14e7af(%rip), %rax # 0x21ac80 movsbl 0x772(%rax,%rcx), %eax cmpl $0x1, %eax jne 0xcc4ff movslq -0xc(%rbp), %rcx leaq 0x14e797(%rip), %rax # 0x21ac80 movsbl 0x77a(%rax,%rcx), %eax cmpl $0x0, %eax jne 0xcc4ff movl $0x1, -0x80(%rbp) jmp 0xcc538 movslq -0xc(%rbp), %rcx leaq 0x14e776(%rip), %rax # 0x21ac80 movsbl 0x772(%rax,%rcx), %eax cmpl $0x0, %eax jne 0xcc536 movslq -0xc(%rbp), %rcx leaq 0x14e75e(%rip), %rax # 0x21ac80 movsbl 0x77a(%rax,%rcx), %eax cmpl $0x1, %eax jne 0xcc536 movl $0x0, -0x80(%rbp) jmp 0xcc538 movl $0x0, -0x78(%rbp) movl $0x1, -0x7c(%rbp) callq 0xd4100 movlpd %xmm0, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0x58(%rbp) callq 0xcce20 cvtsi2ss %eax, %xmm1 movss -0x58(%rbp), %xmm0 divss %xmm1, %xmm0 movss %xmm0, -0x58(%rbp) callq 0xcce30 cvtsi2ss %eax, %xmm1 movss -0x54(%rbp), %xmm0 divss %xmm1, %xmm0 movss %xmm0, -0x54(%rbp) movq -0x20(%rbp), %rcx movq %rsp, %rax movq %rcx, 0x60(%rax) movups -0x30(%rbp), %xmm0 movups %xmm0, 0x50(%rax) movups -0x40(%rbp), %xmm0 movups %xmm0, 0x40(%rax) movups -0x80(%rbp), %xmm0 movups -0x70(%rbp), %xmm1 movups -0x60(%rbp), %xmm2 movups -0x50(%rbp), %xmm3 movups %xmm3, 0x30(%rax) movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) callq 0xc2940 addq $0xf0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
MouseButtonCallback: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov eax, [rbp+var_10] mov dl, al movsxd rcx, [rbp+var_C] lea rax, CORE mov [rax+rcx+772h], dl mov eax, [rbp+var_10] mov dl, al movsxd rcx, [rbp+var_C] lea rax, CORE mov [rax+rcx+7F8h], dl lea rdi, [rbp+var_80] xor esi, esi mov edx, 68h ; 'h' call _memset movsxd rcx, [rbp+var_C] lea rax, CORE movsx eax, byte ptr [rax+rcx+772h] cmp eax, 1 jnz short loc_CC4FF movsxd rcx, [rbp+var_C] lea rax, CORE movsx eax, byte ptr [rax+rcx+77Ah] cmp eax, 0 jnz short loc_CC4FF mov dword ptr [rbp+var_80], 1 jmp short loc_CC538 loc_CC4FF: movsxd rcx, [rbp+var_C] lea rax, CORE movsx eax, byte ptr [rax+rcx+772h] cmp eax, 0 jnz short loc_CC536 movsxd rcx, [rbp+var_C] lea rax, CORE movsx eax, byte ptr [rax+rcx+77Ah] cmp eax, 1 jnz short loc_CC536 mov dword ptr [rbp+var_80], 0 loc_CC536: jmp short $+2 loc_CC538: mov dword ptr [rbp+var_80+8], 0 mov dword ptr [rbp+var_80+4], 1 call GetMousePosition movlpd [rbp+var_88], xmm0 mov rax, [rbp+var_88] mov [rbp+var_58], rax call GetScreenWidth cvtsi2ss xmm1, eax movss xmm0, dword ptr [rbp+var_58] divss xmm0, xmm1 movss dword ptr [rbp+var_58], xmm0 call GetScreenHeight cvtsi2ss xmm1, eax movss xmm0, dword ptr [rbp+var_58+4] divss xmm0, xmm1 movss dword ptr [rbp+var_58+4], xmm0 mov rcx, [rbp+var_20] mov rax, rsp mov [rax+60h], rcx movups xmm0, [rbp+var_30] movups xmmword ptr [rax+50h], xmm0 movups xmm0, [rbp+var_40] movups xmmword ptr [rax+40h], xmm0 movups xmm0, [rbp+var_80] movups xmm1, [rbp+var_70] movups xmm2, xmmword ptr [rbp-60h] movups xmm3, [rbp+var_50] movups xmmword ptr [rax+30h], xmm3 movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 call ProcessGestureEvent add rsp, 0F0h pop rbp retn
void MouseButtonCallback(long long a1, int a2, int a3, int a4) { long long v4; // rdx long long v5; // r8 long long v6; // r9 __int128 v7; // [rsp+70h] [rbp-80h] BYREF long long v8; // [rsp+80h] [rbp-70h] long long v9; // [rsp+88h] [rbp-68h] long long v10; // [rsp+90h] [rbp-60h] long long MousePosition; // [rsp+98h] [rbp-58h] __int128 v12; // [rsp+A0h] [rbp-50h] long long v13; // [rsp+D0h] [rbp-20h] int v14; // [rsp+DCh] [rbp-14h] int v15; // [rsp+E0h] [rbp-10h] int v16; // [rsp+E4h] [rbp-Ch] long long v17; // [rsp+E8h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; *((_BYTE *)&CORE[238] + a2 + 2) = a3; *((_BYTE *)&CORE[255] + v16) = v15; memset(&v7, 0LL, 104LL); if ( *((_BYTE *)&CORE[238] + v16 + 2) != 1 || *((_BYTE *)&CORE[239] + v16 + 2) ) { if ( !*((_BYTE *)&CORE[238] + v16 + 2) && *((_BYTE *)&CORE[239] + v16 + 2) == 1 ) LODWORD(v7) = 0; } else { LODWORD(v7) = 1; } *(_QWORD *)((char *)&v7 + 4) = 1LL; MousePosition = GetMousePosition(); *(float *)&MousePosition = *(float *)&MousePosition / (float)(int)GetScreenWidth(); *((float *)&MousePosition + 1) = *((float *)&MousePosition + 1) / (float)(int)GetScreenHeight(); ProcessGestureEvent((long long)&v7, 0LL, v4, v13, v5, v6, v7, *((long long *)&v7 + 1), v8, v9, v10, MousePosition, v12); }
MouseButtonCallback: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV EAX,dword ptr [RBP + -0x10] MOV DL,AL MOVSXD RCX,dword ptr [RBP + -0xc] LEA RAX,[0x31ac80] MOV byte ptr [RAX + RCX*0x1 + 0x772],DL MOV EAX,dword ptr [RBP + -0x10] MOV DL,AL MOVSXD RCX,dword ptr [RBP + -0xc] LEA RAX,[0x31ac80] MOV byte ptr [RAX + RCX*0x1 + 0x7f8],DL LEA RDI,[RBP + -0x80] XOR ESI,ESI MOV EDX,0x68 CALL 0x0010a2d0 MOVSXD RCX,dword ptr [RBP + -0xc] LEA RAX,[0x31ac80] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x772] CMP EAX,0x1 JNZ 0x001cc4ff MOVSXD RCX,dword ptr [RBP + -0xc] LEA RAX,[0x31ac80] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x77a] CMP EAX,0x0 JNZ 0x001cc4ff MOV dword ptr [RBP + -0x80],0x1 JMP 0x001cc538 LAB_001cc4ff: MOVSXD RCX,dword ptr [RBP + -0xc] LEA RAX,[0x31ac80] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x772] CMP EAX,0x0 JNZ 0x001cc536 MOVSXD RCX,dword ptr [RBP + -0xc] LEA RAX,[0x31ac80] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x77a] CMP EAX,0x1 JNZ 0x001cc536 MOV dword ptr [RBP + -0x80],0x0 LAB_001cc536: JMP 0x001cc538 LAB_001cc538: MOV dword ptr [RBP + -0x78],0x0 MOV dword ptr [RBP + -0x7c],0x1 CALL 0x001d4100 MOVLPD qword ptr [RBP + -0x88],XMM0 MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x58],RAX CALL 0x001cce20 CVTSI2SS XMM1,EAX MOVSS XMM0,dword ptr [RBP + -0x58] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x58],XMM0 CALL 0x001cce30 CVTSI2SS XMM1,EAX MOVSS XMM0,dword ptr [RBP + -0x54] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x54],XMM0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,RSP MOV qword ptr [RAX + 0x60],RCX MOVUPS XMM0,xmmword ptr [RBP + -0x30] MOVUPS xmmword ptr [RAX + 0x50],XMM0 MOVUPS XMM0,xmmword ptr [RBP + -0x40] MOVUPS xmmword ptr [RAX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [RBP + -0x80] MOVUPS XMM1,xmmword ptr [RBP + -0x70] MOVUPS XMM2,xmmword ptr [RBP + -0x60] MOVUPS XMM3,xmmword ptr [RBP + -0x50] MOVUPS xmmword ptr [RAX + 0x30],XMM3 MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 CALL 0x001c2940 ADD RSP,0xf0 POP RBP RET
void MouseButtonCallback(int8 param_1,int param_2,int4 param_3,int4 param_4) { int iVar1; int4 local_88; int4 uStack_84; int4 uStack_80; int8 uStack_60; int4 local_1c; int4 local_18; int local_14; int8 local_10; (&DAT_0031b3f2)[param_2] = (char)param_3; (&DAT_0031b478)[param_2] = (char)param_3; local_1c = param_4; local_18 = param_3; local_14 = param_2; local_10 = param_1; memset(&local_88,0,0x68); if (((&DAT_0031b3f2)[local_14] == '\x01') && ((&DAT_0031b3fa)[local_14] == '\0')) { local_88 = 1; } else if (((&DAT_0031b3f2)[local_14] == '\0') && ((&DAT_0031b3fa)[local_14] == '\x01')) { local_88 = 0; } uStack_80 = 0; uStack_84 = 1; uStack_60 = GetMousePosition(); iVar1 = GetScreenWidth(); uStack_60._0_4_ = (float)uStack_60 / (float)iVar1; iVar1 = GetScreenHeight(); uStack_60 = CONCAT44(uStack_60._4_4_ / (float)iVar1,(float)uStack_60); ProcessGestureEvent(); return; }
38,847
MouseButtonCallback
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
static void MouseButtonCallback(GLFWwindow *window, int button, int action, int mods) { // WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now, // but future releases may add more actions (i.e. GLFW_REPEAT) CORE.Input.Mouse.currentButtonState[button] = action; CORE.Input.Touch.currentTouchState[button] = action; #if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES) // Process mouse events as touches to be able to use mouse-gestures GestureEvent gestureEvent = { 0 }; // Register touch actions if ((CORE.Input.Mouse.currentButtonState[button] == 1) && (CORE.Input.Mouse.previousButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_ACTION_DOWN; else if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) gestureEvent.touchAction = TOUCH_ACTION_UP; // NOTE: TOUCH_ACTION_MOVE event is registered in MouseCursorPosCallback() // Assign a pointer ID gestureEvent.pointId[0] = 0; // Register touch points count gestureEvent.pointCount = 1; // Register touch points position, only one point registered gestureEvent.position[0] = GetMousePosition(); // Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height gestureEvent.position[0].x /= (float)GetScreenWidth(); gestureEvent.position[0].y /= (float)GetScreenHeight(); // Gesture data is sent to gestures-system for processing ProcessGestureEvent(gestureEvent); #endif }
O2
c
MouseButtonCallback: pushq %rbx subq $0xe0, %rsp movslq %esi, %rax leaq 0xc7a83(%rip), %rcx # 0x127be0 movb %dl, 0x772(%rax,%rcx) movb %dl, 0x7f8(%rax,%rcx) xorps %xmm0, %xmm0 movaps %xmm0, 0xc0(%rsp) movaps %xmm0, 0xb0(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) andq $0x0, 0xd0(%rsp) cmpb $0x1, %dl jne 0x601bb cmpb $0x0, 0x77a(%rax,%rcx) jne 0x601bb movl $0x1, 0x70(%rsp) leaq 0x70(%rsp), %rbx movq $0x1, 0x4(%rbx) callq 0x65166 movsd 0xc7a37(%rip), %xmm1 # 0x127c0c cvtdq2ps %xmm1, %xmm1 divps %xmm1, %xmm0 movlps %xmm0, 0x28(%rbx) pushq $0xd popq %rcx movq %rsp, %rdi movq %rbx, %rsi rep movsq (%rsi), %es:(%rdi) callq 0x5a665 addq $0xe0, %rsp popq %rbx retq
MouseButtonCallback: push rbx sub rsp, 0E0h movsxd rax, esi lea rcx, CORE mov [rax+rcx+772h], dl mov [rax+rcx+7F8h], dl xorps xmm0, xmm0 movaps [rsp+0E8h+var_28], xmm0 movaps [rsp+0E8h+var_38], xmm0 movaps [rsp+0E8h+var_48], xmm0 movaps [rsp+0E8h+var_58], xmm0 movaps [rsp+0E8h+var_68], xmm0 movaps [rsp+0E8h+var_78], xmm0 and [rsp+0E8h+var_18], 0 cmp dl, 1 jnz short loc_601BB cmp byte ptr [rax+rcx+77Ah], 0 jnz short loc_601BB mov dword ptr [rsp+0E8h+var_78], 1 loc_601BB: lea rbx, [rsp+0E8h+var_78] mov qword ptr [rbx+4], 1 call GetMousePosition movsd xmm1, cs:qword_127C0C cvtdq2ps xmm1, xmm1 divps xmm0, xmm1 movlps qword ptr [rbx+28h], xmm0 push 0Dh pop rcx mov rdi, rsp mov rsi, rbx rep movsq call ProcessGestureEvent add rsp, 0E0h pop rbx retn
void MouseButtonCallback( double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, long long a9, int a10, char a11) { __m128 v11; // xmm0 __m128 v12; // xmm1 __m128 v13; // xmm0 long long v14; // rdx long long v15; // r8 long long v16; // r9 double v17; // xmm4_8 double v18; // xmm5_8 long long v19[13]; // [rsp+0h] [rbp-E8h] BYREF long long v20; // [rsp+68h] [rbp-80h] BYREF _BYTE v21[104]; // [rsp+70h] [rbp-78h] BYREF long long v22; // [rsp+D8h] [rbp-10h] BYREF *((_BYTE *)&CORE[238] + a10 + 2) = a11; *((_BYTE *)&CORE[255] + a10) = a11; v11 = 0LL; memset(v21, 0, sizeof(v21)); if ( a11 == 1 && !*((_BYTE *)&CORE[239] + a10 + 2) ) *(_DWORD *)v21 = 1; *(_QWORD *)&v21[4] = 1LL; *(double *)v11.m128_u64 = GetMousePosition(); v12 = _mm_cvtepi32_ps((__m128i)(unsigned long long)qword_127C0C); v13 = _mm_div_ps(v11, v12); _mm_storel_ps((double *)&v21[40], v13); qmemcpy(v19, v21, sizeof(v19)); ProcessGestureEvent( *(double *)v13.m128_u64, *(double *)v12.m128_u64, a3, a4, v17, v18, a7, a8, (long long)&v20, (long long)&v22, v14, 0LL, v15, v16, v19[0], v19[1], v19[2], v19[3], v19[4], v19[5], v19[6]); }
MouseButtonCallback: PUSH RBX SUB RSP,0xe0 MOVSXD RAX,ESI LEA RCX,[0x227be0] MOV byte ptr [RAX + RCX*0x1 + 0x772],DL MOV byte ptr [RAX + RCX*0x1 + 0x7f8],DL XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xc0],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 MOVAPS xmmword ptr [RSP + 0x70],XMM0 AND qword ptr [RSP + 0xd0],0x0 CMP DL,0x1 JNZ 0x001601bb CMP byte ptr [RAX + RCX*0x1 + 0x77a],0x0 JNZ 0x001601bb MOV dword ptr [RSP + 0x70],0x1 LAB_001601bb: LEA RBX,[RSP + 0x70] MOV qword ptr [RBX + 0x4],0x1 CALL 0x00165166 MOVSD XMM1,qword ptr [0x00227c0c] CVTDQ2PS XMM1,XMM1 DIVPS XMM0,XMM1 MOVLPS qword ptr [RBX + 0x28],XMM0 PUSH 0xd POP RCX MOV RDI,RSP MOV RSI,RBX MOVSQ.REP RDI,RSI CALL 0x0015a665 ADD RSP,0xe0 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void MouseButtonCallback(int8 param_1,int param_2,char param_3) { long lVar1; int8 *puVar2; int8 *puVar3; byte bVar4; int1 auVar5 [16]; int1 auVar6 [16]; int8 auStack_e8 [14]; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; int8 local_18; int8 extraout_XMM0_Qb; bVar4 = 0; (&DAT_00228352)[param_2] = param_3; (&DAT_002283d8)[param_2] = param_3; local_28 = 0; uStack_20 = 0; local_38 = 0; uStack_30 = 0; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_6c = 0; local_18 = 0; if ((param_3 == '\x01') && ((&DAT_0022835a)[param_2] == '\0')) { local_78 = 1; } uStack_74 = 1; uStack_70 = 0; auVar5._0_8_ = GetMousePosition(); auVar5._8_8_ = extraout_XMM0_Qb; auVar6._4_4_ = (float)(int)((ulong)_DAT_00227c0c >> 0x20); auVar6._0_4_ = (float)(int)_DAT_00227c0c; auVar6._8_8_ = 0; auVar6 = divps(auVar5,auVar6); uStack_50 = auVar6._0_8_; puVar2 = (int8 *)&local_78; puVar3 = auStack_e8; for (lVar1 = 0xd; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar3 = *puVar2; puVar2 = puVar2 + (ulong)bVar4 * -2 + 1; puVar3 = puVar3 + (ulong)bVar4 * -2 + 1; } ProcessGestureEvent(); return; }
38,848
MouseButtonCallback
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
static void MouseButtonCallback(GLFWwindow *window, int button, int action, int mods) { // WARNING: GLFW could only return GLFW_PRESS (1) or GLFW_RELEASE (0) for now, // but future releases may add more actions (i.e. GLFW_REPEAT) CORE.Input.Mouse.currentButtonState[button] = action; CORE.Input.Touch.currentTouchState[button] = action; #if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES) // Process mouse events as touches to be able to use mouse-gestures GestureEvent gestureEvent = { 0 }; // Register touch actions if ((CORE.Input.Mouse.currentButtonState[button] == 1) && (CORE.Input.Mouse.previousButtonState[button] == 0)) gestureEvent.touchAction = TOUCH_ACTION_DOWN; else if ((CORE.Input.Mouse.currentButtonState[button] == 0) && (CORE.Input.Mouse.previousButtonState[button] == 1)) gestureEvent.touchAction = TOUCH_ACTION_UP; // NOTE: TOUCH_ACTION_MOVE event is registered in MouseCursorPosCallback() // Assign a pointer ID gestureEvent.pointId[0] = 0; // Register touch points count gestureEvent.pointCount = 1; // Register touch points position, only one point registered gestureEvent.position[0] = GetMousePosition(); // Normalize gestureEvent.position[0] for CORE.Window.screen.width and CORE.Window.screen.height gestureEvent.position[0].x /= (float)GetScreenWidth(); gestureEvent.position[0].y /= (float)GetScreenHeight(); // Gesture data is sent to gestures-system for processing ProcessGestureEvent(gestureEvent); #endif }
O3
c
MouseButtonCallback: subq $0xd8, %rsp movslq %esi, %rax leaq 0xca3e9(%rip), %rcx # 0x13bbc0 movb %dl, 0x772(%rax,%rcx) movb %dl, 0x7f8(%rax,%rcx) xorps %xmm0, %xmm0 movaps %xmm0, 0xc0(%rsp) movaps %xmm0, 0xb0(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movq $0x0, 0xd0(%rsp) cmpb $0x1, %dl jne 0x71838 cmpb $0x0, 0x77a(%rax,%rcx) jne 0x71838 movl $0x1, 0x70(%rsp) leaq 0x70(%rsp), %rsi movq $0x1, 0x4(%rsi) movsd 0xcaacf(%rip), %xmm0 # 0x13c31c movsd 0xcaab7(%rip), %xmm1 # 0x13c30c addps %xmm0, %xmm1 movsd 0xcaab4(%rip), %xmm0 # 0x13c314 mulps %xmm1, %xmm0 movsd 0xca381(%rip), %xmm1 # 0x13bbec cvtdq2ps %xmm1, %xmm1 divps %xmm1, %xmm0 movlps %xmm0, 0x28(%rsi) movl $0xd, %ecx movq %rsp, %rdi rep movsq (%rsi), %es:(%rdi) callq 0x6a785 addq $0xd8, %rsp retq
MouseButtonCallback: sub rsp, 0D8h movsxd rax, esi lea rcx, CORE mov [rax+rcx+772h], dl mov [rax+rcx+7F8h], dl xorps xmm0, xmm0 movaps [rsp+0D8h+var_18], 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 movaps [rsp+0D8h+var_68], xmm0 mov [rsp+0D8h+var_8], 0 cmp dl, 1 jnz short loc_71838 cmp byte ptr [rax+rcx+77Ah], 0 jnz short loc_71838 mov dword ptr [rsp+0D8h+var_68], 1 loc_71838: lea rsi, [rsp+0D8h+var_68] mov qword ptr [rsi+4], 1 movsd xmm0, qword ptr cs:xmmword_13C31C movsd xmm1, cs:qword_13C30C addps xmm1, xmm0 movsd xmm0, cs:qword_13C314 mulps xmm0, xmm1 movsd xmm1, cs:qword_13BBEC cvtdq2ps xmm1, xmm1 divps xmm0, xmm1 movlps qword ptr [rsi+28h], xmm0 mov ecx, 0Dh mov rdi, rsp rep movsq call ProcessGestureEvent add rsp, 0D8h retn
void MouseButtonCallback( double a1, double a2, double a3, double a4, double a5, long long a6, int a7, long long a8, long long a9, long long a10, long long a11) { __m128 v11; // xmm1 __m128 v12; // xmm0 long long v13[13]; // [rsp+0h] [rbp-D8h] BYREF long long v14; // [rsp+68h] [rbp-70h] BYREF _BYTE v15[104]; // [rsp+70h] [rbp-68h] BYREF _UNKNOWN *retaddr; // [rsp+D8h] [rbp+0h] BYREF *((_BYTE *)&CORE[238] + a7 + 2) = a8; *((_BYTE *)&CORE[255] + a7) = a8; memset(v15, 0, sizeof(v15)); if ( (_BYTE)a8 == 1 && !*((_BYTE *)&CORE[239] + a7 + 2) ) *(_DWORD *)v15 = 1; *(_QWORD *)&v15[4] = 1LL; v11 = _mm_cvtepi32_ps((__m128i)(unsigned long long)qword_13BBEC); v12 = _mm_div_ps( _mm_mul_ps( (__m128)(unsigned long long)qword_13C314, _mm_add_ps((__m128)(unsigned long long)qword_13C30C, (__m128)(unsigned long long)xmmword_13C31C)), v11); _mm_storel_ps((double *)&v15[40], v12); qmemcpy(v13, v15, sizeof(v13)); ProcessGestureEvent( *(double *)v12.m128_u64, *(double *)v11.m128_u64, a3, a4, a5, (long long)&v14, (long long)&retaddr, a8, 0LL, a10, a11, v13[0], v13[1], v13[2], v13[3], v13[4], v13[5], v13[6]); }
MouseButtonCallback: SUB RSP,0xd8 MOVSXD RAX,ESI LEA RCX,[0x23bbc0] MOV byte ptr [RAX + RCX*0x1 + 0x772],DL MOV byte ptr [RAX + RCX*0x1 + 0x7f8],DL XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xc0],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 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOV qword ptr [RSP + 0xd0],0x0 CMP DL,0x1 JNZ 0x00171838 CMP byte ptr [RAX + RCX*0x1 + 0x77a],0x0 JNZ 0x00171838 MOV dword ptr [RSP + 0x70],0x1 LAB_00171838: LEA RSI,[RSP + 0x70] MOV qword ptr [RSI + 0x4],0x1 MOVSD XMM0,qword ptr [0x0023c31c] MOVSD XMM1,qword ptr [0x0023c30c] ADDPS XMM1,XMM0 MOVSD XMM0,qword ptr [0x0023c314] MULPS XMM0,XMM1 MOVSD XMM1,qword ptr [0x0023bbec] CVTDQ2PS XMM1,XMM1 DIVPS XMM0,XMM1 MOVLPS qword ptr [RSI + 0x28],XMM0 MOV ECX,0xd MOV RDI,RSP MOVSQ.REP RDI,RSI CALL 0x0016a785 ADD RSP,0xd8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void MouseButtonCallback(int8 param_1,int param_2,char param_3) { long lVar1; int8 *puVar2; int8 *puVar3; int1 auVar4 [16]; int1 auVar5 [16]; int8 auStack_d8 [14]; int8 local_68; int4 uStack_60; int4 uStack_5c; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; int8 local_18; int8 uStack_10; int8 local_8; lVar1 = (long)param_2; *(char *)((long)&DAT_0023c332 + lVar1) = param_3; *(char *)((long)&DAT_0023c3b8 + lVar1) = param_3; local_18 = 0; uStack_10 = 0; local_28 = 0; uStack_20 = 0; local_38 = 0; uStack_30 = 0; local_48 = 0; local_58 = 0; uStack_50 = 0; local_68._0_4_ = 0; uStack_5c = 0; local_8 = 0; if ((param_3 == '\x01') && ((&DAT_0023c33a)[lVar1] == '\0')) { local_68._0_4_ = 1; } local_68._4_4_ = 1; uStack_60 = 0; auVar4._0_4_ = (float)_DAT_0023c314 * ((float)_DAT_0023c30c + (float)DAT_0023c31c); auVar4._4_4_ = (float)((ulong)_DAT_0023c314 >> 0x20) * ((float)((ulong)_DAT_0023c30c >> 0x20) + (float)((ulong)DAT_0023c31c >> 0x20)); auVar4._8_8_ = 0; auVar5._4_4_ = (float)(int)((ulong)_DAT_0023bbec >> 0x20); auVar5._0_4_ = (float)(int)_DAT_0023bbec; auVar5._8_8_ = 0; auVar5 = divps(auVar4,auVar5); uStack_40 = auVar5._0_8_; puVar2 = &local_68; puVar3 = auStack_d8; for (lVar1 = 0xd; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar3 = *puVar2; puVar2 = puVar2 + 1; puVar3 = puVar3 + 1; } ProcessGestureEvent(); return; }
38,849
init_state_maps
eloqsql/mysys/charset.c
static my_bool init_state_maps(struct charset_info_st *cs) { uint i; uchar *state_map; uchar *ident_map; if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME)))) return 1; cs->ident_map= ident_map= state_map + 256; /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { if (my_isalpha(cs,i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isdigit(cs,i)) state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; else if (is_multi_byte_ident(cs, i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isspace(cs,i)) state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; state_map[0]=(uchar) MY_LEX_EOL; state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT; state_map[(uchar)',']= (uchar) MY_LEX_COMMA; state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER; /* Create a second map to make it faster to find identifiers */ for (i=0; i < 256 ; i++) { ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || state_map[i] == MY_LEX_NUMBER_IDENT); } /* Special handling of hex and binary strings */ state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; return 0; }
O0
c
init_state_maps: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x200, %edi # imm = 0x200 movl $0x10, %esi callq 0xfa670 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rcx movq %rax, 0x80(%rcx) cmpq $0x0, %rax jne 0xe0009 movb $0x1, -0x1(%rbp) jmp 0xe0236 movq -0x20(%rbp), %rcx addq $0x100, %rcx # imm = 0x100 movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movl $0x0, -0x14(%rbp) cmpl $0x100, -0x14(%rbp) # imm = 0x100 jae 0xe00f3 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x3, %eax cmpl $0x0, %eax je 0xe0062 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x2, (%rax,%rcx) jmp 0xe00e3 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x4, %eax cmpl $0x0, %eax je 0xe008a movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0xe, (%rax,%rcx) jmp 0xe00e1 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movzbl %al, %esi callq 0xe0310 cmpb $0x0, %al je 0xe00aa movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x2, (%rax,%rcx) jmp 0xe00df movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movl -0x14(%rbp), %ecx movzbl %cl, %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xe00d2 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x1a, (%rax,%rcx) jmp 0xe00dd movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movb $0x1, (%rax,%rcx) jmp 0xe00df jmp 0xe00e1 jmp 0xe00e3 jmp 0xe00e5 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xe002a movq -0x20(%rbp), %rax movb $0x2, 0x24(%rax) movq -0x20(%rbp), %rax movb $0x2, 0x5f(%rax) movq -0x20(%rbp), %rax movb $0xa, 0x27(%rax) movq -0x20(%rbp), %rax movb $0x10, 0x2e(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x21(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x3d(%rax) movq -0x20(%rbp), %rax movb $0x8, 0x3e(%rax) movq -0x20(%rbp), %rax movb $0x9, 0x3c(%rax) movq -0x20(%rbp), %rax movb $0x11, 0x7c(%rax) movq -0x20(%rbp), %rax movb $0x11, 0x26(%rax) movq -0x20(%rbp), %rax movb $0xb, 0x23(%rax) movq -0x20(%rbp), %rax movb $0x16, 0x3b(%rax) movq -0x20(%rbp), %rax movb $0x17, 0x3a(%rax) movq -0x20(%rbp), %rax movb $0x12, (%rax) movq -0x20(%rbp), %rax movb $0x13, 0x5c(%rax) movq -0x20(%rbp), %rax movb $0x14, 0x2f(%rax) movq -0x20(%rbp), %rax movb $0x15, 0x2a(%rax) movq -0x20(%rbp), %rax movb $0x18, 0x40(%rax) movq -0x20(%rbp), %rax movb $0x1b, 0x60(%rax) movq -0x20(%rbp), %rax movb $0x21, 0x22(%rax) movq -0x20(%rbp), %rax movb $0x22, 0x2d(%rax) movq -0x20(%rbp), %rax movb $0x24, 0x2c(%rax) movq -0x20(%rbp), %rax movb $0x23, 0x3f(%rax) movl $0x0, -0x14(%rbp) cmpl $0x100, -0x14(%rbp) # imm = 0x100 jae 0xe0202 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %ecx movb $0x1, %al cmpl $0x2, %ecx movb %al, -0x29(%rbp) je 0xe01e3 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0xe, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %dl movq -0x28(%rbp), %rax movl -0x14(%rbp), %ecx movb %dl, (%rax,%rcx) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xe01b1 movq -0x20(%rbp), %rax movb $0x1e, 0x58(%rax) movq -0x20(%rbp), %rax movb $0x1e, 0x78(%rax) movq -0x20(%rbp), %rax movb $0x1f, 0x42(%rax) movq -0x20(%rbp), %rax movb $0x1f, 0x62(%rax) movq -0x20(%rbp), %rax movb $0x20, 0x4e(%rax) movq -0x20(%rbp), %rax movb $0x20, 0x6e(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
init_state_maps: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov edi, 200h mov esi, 10h call my_once_alloc mov [rbp+var_20], rax mov rcx, [rbp+var_10] mov [rcx+80h], rax cmp rax, 0 jnz short loc_E0009 mov [rbp+var_1], 1 jmp loc_E0236 loc_E0009: mov rcx, [rbp+var_20] add rcx, 100h mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov [rax+88h], rcx mov [rbp+var_14], 0 loc_E002A: cmp [rbp+var_14], 100h jnb loc_E00F3 mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 3 cmp eax, 0 jz short loc_E0062 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 2 jmp loc_E00E3 loc_E0062: mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 4 cmp eax, 0 jz short loc_E008A mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 0Eh jmp short loc_E00E1 loc_E008A: mov rdi, [rbp+var_10] mov eax, [rbp+var_14] movzx esi, al call is_multi_byte_ident cmp al, 0 jz short loc_E00AA mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 2 jmp short loc_E00DF loc_E00AA: mov rax, [rbp+var_10] mov rax, [rax+40h] mov ecx, [rbp+var_14] movzx ecx, cl movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_E00D2 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 1Ah jmp short loc_E00DD loc_E00D2: mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov byte ptr [rax+rcx], 1 loc_E00DD: jmp short $+2 loc_E00DF: jmp short $+2 loc_E00E1: jmp short $+2 loc_E00E3: jmp short $+2 loc_E00E5: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp loc_E002A loc_E00F3: mov rax, [rbp+var_20] mov byte ptr [rax+24h], 2 mov rax, [rbp+var_20] mov byte ptr [rax+5Fh], 2 mov rax, [rbp+var_20] mov byte ptr [rax+27h], 0Ah mov rax, [rbp+var_20] mov byte ptr [rax+2Eh], 10h mov rax, [rbp+var_20] mov byte ptr [rax+21h], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Dh], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Eh], 8 mov rax, [rbp+var_20] mov byte ptr [rax+3Ch], 9 mov rax, [rbp+var_20] mov byte ptr [rax+7Ch], 11h mov rax, [rbp+var_20] mov byte ptr [rax+26h], 11h mov rax, [rbp+var_20] mov byte ptr [rax+23h], 0Bh mov rax, [rbp+var_20] mov byte ptr [rax+3Bh], 16h mov rax, [rbp+var_20] mov byte ptr [rax+3Ah], 17h mov rax, [rbp+var_20] mov byte ptr [rax], 12h mov rax, [rbp+var_20] mov byte ptr [rax+5Ch], 13h mov rax, [rbp+var_20] mov byte ptr [rax+2Fh], 14h mov rax, [rbp+var_20] mov byte ptr [rax+2Ah], 15h mov rax, [rbp+var_20] mov byte ptr [rax+40h], 18h mov rax, [rbp+var_20] mov byte ptr [rax+60h], 1Bh mov rax, [rbp+var_20] mov byte ptr [rax+22h], 21h ; '!' mov rax, [rbp+var_20] mov byte ptr [rax+2Dh], 22h ; '"' mov rax, [rbp+var_20] mov byte ptr [rax+2Ch], 24h ; '$' mov rax, [rbp+var_20] mov byte ptr [rax+3Fh], 23h ; '#' mov [rbp+var_14], 0 loc_E01B1: cmp [rbp+var_14], 100h jnb short loc_E0202 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] movzx ecx, byte ptr [rax+rcx] mov al, 1 cmp ecx, 2 mov [rbp+var_29], al jz short loc_E01E3 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] movzx eax, byte ptr [rax+rcx] cmp eax, 0Eh setz al mov [rbp+var_29], al loc_E01E3: mov al, [rbp+var_29] and al, 1 movzx eax, al mov dl, al mov rax, [rbp+var_28] mov ecx, [rbp+var_14] mov [rax+rcx], dl mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_E01B1 loc_E0202: mov rax, [rbp+var_20] mov byte ptr [rax+58h], 1Eh mov rax, [rbp+var_20] mov byte ptr [rax+78h], 1Eh mov rax, [rbp+var_20] mov byte ptr [rax+42h], 1Fh mov rax, [rbp+var_20] mov byte ptr [rax+62h], 1Fh mov rax, [rbp+var_20] mov byte ptr [rax+4Eh], 20h ; ' ' mov rax, [rbp+var_20] mov byte ptr [rax+6Eh], 20h ; ' ' mov [rbp+var_1], 0 loc_E0236: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char init_state_maps(_QWORD *a1) { bool v2; // [rsp+7h] [rbp-29h] _BYTE *v3; // [rsp+10h] [rbp-20h] unsigned int i; // [rsp+1Ch] [rbp-14h] unsigned int j; // [rsp+1Ch] [rbp-14h] v3 = (_BYTE *)my_once_alloc(512LL, 16LL); a1[16] = v3; if ( !v3 ) return 1; a1[17] = v3 + 256; for ( i = 0; i < 0x100; ++i ) { if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 ) { v3[i] = 2; } else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 ) { v3[i] = 14; } else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) ) { v3[i] = 2; } else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 ) { v3[i] = 26; } else { v3[i] = 1; } } v3[36] = 2; v3[95] = 2; v3[39] = 10; v3[46] = 16; v3[33] = 8; v3[61] = 8; v3[62] = 8; v3[60] = 9; v3[124] = 17; v3[38] = 17; v3[35] = 11; v3[59] = 22; v3[58] = 23; *v3 = 18; v3[92] = 19; v3[47] = 20; v3[42] = 21; v3[64] = 24; v3[96] = 27; v3[34] = 33; v3[45] = 34; v3[44] = 36; v3[63] = 35; for ( j = 0; j < 0x100; ++j ) { v2 = 1; if ( v3[j] != 2 ) v2 = v3[j] == 14; v3[j + 256] = v2; } v3[88] = 30; v3[120] = 30; v3[66] = 31; v3[98] = 31; v3[78] = 32; v3[110] = 32; return 0; }
init_state_maps: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV EDI,0x200 MOV ESI,0x10 CALL 0x001fa670 MOV qword ptr [RBP + -0x20],RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x80],RAX CMP RAX,0x0 JNZ 0x001e0009 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001e0236 LAB_001e0009: MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x100 MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV dword ptr [RBP + -0x14],0x0 LAB_001e002a: CMP dword ptr [RBP + -0x14],0x100 JNC 0x001e00f3 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x3 CMP EAX,0x0 JZ 0x001e0062 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x2 JMP 0x001e00e3 LAB_001e0062: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x4 CMP EAX,0x0 JZ 0x001e008a MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0xe JMP 0x001e00e1 LAB_001e008a: MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOVZX ESI,AL CALL 0x001e0310 CMP AL,0x0 JZ 0x001e00aa MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x2 JMP 0x001e00df LAB_001e00aa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,CL MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 JZ 0x001e00d2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x1a JMP 0x001e00dd LAB_001e00d2: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],0x1 LAB_001e00dd: JMP 0x001e00df LAB_001e00df: JMP 0x001e00e1 LAB_001e00e1: JMP 0x001e00e3 LAB_001e00e3: JMP 0x001e00e5 LAB_001e00e5: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001e002a LAB_001e00f3: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x24],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x5f],0x2 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x27],0xa MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2e],0x10 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x21],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3d],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3e],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3c],0x9 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x7c],0x11 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x26],0x11 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x23],0xb MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3b],0x16 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3a],0x17 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x12 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x5c],0x13 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2f],0x14 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2a],0x15 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x40],0x18 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x60],0x1b MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x22],0x21 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2d],0x22 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2c],0x24 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3f],0x23 MOV dword ptr [RBP + -0x14],0x0 LAB_001e01b1: CMP dword ptr [RBP + -0x14],0x100 JNC 0x001e0202 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOVZX ECX,byte ptr [RAX + RCX*0x1] MOV AL,0x1 CMP ECX,0x2 MOV byte ptr [RBP + -0x29],AL JZ 0x001e01e3 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xe SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001e01e3: MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOVZX EAX,AL MOV DL,AL MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001e01b1 LAB_001e0202: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x58],0x1e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x78],0x1e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x42],0x1f MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x62],0x1f MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x4e],0x20 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x6e],0x20 MOV byte ptr [RBP + -0x1],0x0 LAB_001e0236: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 init_state_maps(long param_1) { char cVar1; int1 *puVar2; bool local_31; uint local_1c; int1 local_9; puVar2 = (int1 *)my_once_alloc(0x200,0x10); *(int1 **)(param_1 + 0x80) = puVar2; if (puVar2 == (int1 *)0x0) { local_9 = 1; } else { *(int1 **)(param_1 + 0x88) = puVar2 + 0x100; for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) { cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff); if (cVar1 == '\0') { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) { puVar2[local_1c] = 1; } else { puVar2[local_1c] = 0x1a; } } else { puVar2[local_1c] = 2; } } else { puVar2[local_1c] = 0xe; } } else { puVar2[local_1c] = 2; } } puVar2[0x24] = 2; puVar2[0x5f] = 2; puVar2[0x27] = 10; puVar2[0x2e] = 0x10; puVar2[0x21] = 8; puVar2[0x3d] = 8; puVar2[0x3e] = 8; puVar2[0x3c] = 9; puVar2[0x7c] = 0x11; puVar2[0x26] = 0x11; puVar2[0x23] = 0xb; puVar2[0x3b] = 0x16; puVar2[0x3a] = 0x17; *puVar2 = 0x12; puVar2[0x5c] = 0x13; puVar2[0x2f] = 0x14; puVar2[0x2a] = 0x15; puVar2[0x40] = 0x18; puVar2[0x60] = 0x1b; puVar2[0x22] = 0x21; puVar2[0x2d] = 0x22; puVar2[0x2c] = 0x24; puVar2[0x3f] = 0x23; for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) { local_31 = true; if (puVar2[local_1c] != '\x02') { local_31 = puVar2[local_1c] == '\x0e'; } (puVar2 + 0x100)[local_1c] = local_31; } puVar2[0x58] = 0x1e; puVar2[0x78] = 0x1e; puVar2[0x42] = 0x1f; puVar2[0x62] = 0x1f; puVar2[0x4e] = 0x20; puVar2[0x6e] = 0x20; local_9 = 0; } return local_9; }
38,850
Cache::Block::Block(Cache::Block const&)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.h
Block(const Block &b) : valid(b.valid), modified(b.modified), tag(b.tag), id(b.id), size(b.size) { data = b.data; }
O1
c
Cache::Block::Block(Cache::Block const&): pushq %r14 pushq %rbx pushq %rax movb (%rsi), %al movb %al, (%rdi) movb 0x1(%rsi), %al movb %al, 0x1(%rdi) movq 0x4(%rsi), %rax movq %rax, 0x4(%rdi) movl 0xc(%rsi), %eax movl %eax, 0xc(%rdi) leaq 0x18(%rdi), %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rdi) movq $0x0, 0x28(%rdi) addq $0x18, %rsi movq %rbx, %rdi callq 0x1417c addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x14173 callq 0xb1a0 movq %r14, %rdi callq 0xb360 nop
_ZN5Cache5BlockC2ERKS0_: push r14 push rbx push rax mov al, [rsi] mov [rdi], al mov al, [rsi+1] mov [rdi+1], al mov rax, [rsi+4] mov [rdi+4], rax mov eax, [rsi+0Ch] mov [rdi+0Ch], eax lea rbx, [rdi+18h] xorps xmm0, xmm0 movups xmmword ptr [rdi+18h], xmm0 mov qword ptr [rdi+28h], 0 add rsi, 18h mov rdi, rbx call _ZNSt6vectorIhSaIhEEaSERKS1_; std::vector<uchar>::operator=(std::vector<uchar> const&) add rsp, 8 pop rbx pop r14 retn mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_14173 call __ZdlPv; operator delete(void *) loc_14173: mov rdi, r14 call __Unwind_Resume
long long Cache::Block::Block(long long a1, long long a2) { *(_BYTE *)a1 = *(_BYTE *)a2; *(_BYTE *)(a1 + 1) = *(_BYTE *)(a2 + 1); *(_QWORD *)(a1 + 4) = *(_QWORD *)(a2 + 4); *(_DWORD *)(a1 + 12) = *(_DWORD *)(a2 + 12); *(_OWORD *)(a1 + 24) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; return std::vector<unsigned char>::operator=(a1 + 24, a2 + 24); }
Block: PUSH R14 PUSH RBX PUSH RAX MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL MOV AL,byte ptr [RSI + 0x1] MOV byte ptr [RDI + 0x1],AL MOV RAX,qword ptr [RSI + 0x4] MOV qword ptr [RDI + 0x4],RAX MOV EAX,dword ptr [RSI + 0xc] MOV dword ptr [RDI + 0xc],EAX LEA RBX,[RDI + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOV qword ptr [RDI + 0x28],0x0 ADD RSI,0x18 LAB_00114153: MOV RDI,RBX CALL 0x0011417c LAB_0011415b: ADD RSP,0x8 POP RBX POP R14 RET
/* Cache::Block::Block(Cache::Block const&) */ void __thiscall Cache::Block::Block(Block *this,Block *param_1) { *this = *param_1; this[1] = param_1[1]; *(int8 *)(this + 4) = *(int8 *)(param_1 + 4); *(int4 *)(this + 0xc) = *(int4 *)(param_1 + 0xc); *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; /* try { // try from 00114153 to 0011415a has its CatchHandler @ 00114163 */ std::vector<unsigned_char,std::allocator<unsigned_char>>::operator= ((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x18), (vector *)(param_1 + 0x18)); return; }
38,851
Cache::Block::Block(Cache::Block const&)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.h
Block(const Block &b) : valid(b.valid), modified(b.modified), tag(b.tag), id(b.id), size(b.size) { data = b.data; }
O3
c
Cache::Block::Block(Cache::Block const&): pushq %r14 pushq %rbx pushq %rax movb (%rsi), %al movb %al, (%rdi) movb 0x1(%rsi), %al movb %al, 0x1(%rdi) movq 0x4(%rsi), %rax movq %rax, 0x4(%rdi) movl 0xc(%rsi), %eax movl %eax, 0xc(%rdi) leaq 0x18(%rdi), %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rdi) movq $0x0, 0x28(%rdi) addq $0x18, %rsi movq %rbx, %rdi callq 0x13fae addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x13fa5 callq 0xb1a0 movq %r14, %rdi callq 0xb360 nop
_ZN5Cache5BlockC2ERKS0_: push r14 push rbx push rax mov al, [rsi] mov [rdi], al mov al, [rsi+1] mov [rdi+1], al mov rax, [rsi+4] mov [rdi+4], rax mov eax, [rsi+0Ch] mov [rdi+0Ch], eax lea rbx, [rdi+18h] xorps xmm0, xmm0 movups xmmword ptr [rdi+18h], xmm0 mov qword ptr [rdi+28h], 0 add rsi, 18h mov rdi, rbx call _ZNSt6vectorIhSaIhEEaSERKS1_; std::vector<uchar>::operator=(std::vector<uchar> const&) add rsp, 8 pop rbx pop r14 retn mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_13FA5 call __ZdlPv; operator delete(void *) loc_13FA5: mov rdi, r14 call __Unwind_Resume
long long Cache::Block::Block(long long a1, long long a2) { *(_BYTE *)a1 = *(_BYTE *)a2; *(_BYTE *)(a1 + 1) = *(_BYTE *)(a2 + 1); *(_QWORD *)(a1 + 4) = *(_QWORD *)(a2 + 4); *(_DWORD *)(a1 + 12) = *(_DWORD *)(a2 + 12); *(_OWORD *)(a1 + 24) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; return std::vector<unsigned char>::operator=(a1 + 24, a2 + 24); }
Block: PUSH R14 PUSH RBX PUSH RAX MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL MOV AL,byte ptr [RSI + 0x1] MOV byte ptr [RDI + 0x1],AL MOV RAX,qword ptr [RSI + 0x4] MOV qword ptr [RDI + 0x4],RAX MOV EAX,dword ptr [RSI + 0xc] MOV dword ptr [RDI + 0xc],EAX LEA RBX,[RDI + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOV qword ptr [RDI + 0x28],0x0 ADD RSI,0x18 LAB_00113f85: MOV RDI,RBX CALL 0x00113fae LAB_00113f8d: ADD RSP,0x8 POP RBX POP R14 RET
/* Cache::Block::Block(Cache::Block const&) */ void __thiscall Cache::Block::Block(Block *this,Block *param_1) { *this = *param_1; this[1] = param_1[1]; *(int8 *)(this + 4) = *(int8 *)(param_1 + 4); *(int4 *)(this + 0xc) = *(int4 *)(param_1 + 0xc); *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; /* try { // try from 00113f85 to 00113f8c has its CatchHandler @ 00113f95 */ std::vector<unsigned_char,std::allocator<unsigned_char>>::operator= ((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x18), (vector *)(param_1 + 0x18)); return; }
38,852
stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) { stbi__result_info ri; void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); if (result == NULL) return NULL; // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); if (ri.bits_per_channel != 16) { result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); ri.bits_per_channel = 16; } // @TODO: move stbi__convert_format16 to here // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision if (stbi__vertically_flip_on_load) { int channels = req_comp ? req_comp : *comp; stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); } return (stbi__uint16 *) result; }
O0
c
stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int): subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq %rcx, 0x50(%rsp) movl %r8d, 0x4c(%rsp) movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x50(%rsp), %rcx movl 0x4c(%rsp), %r8d leaq 0x40(%rsp), %r9 movl $0x10, (%rsp) callq 0x13d00 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0xe172 movq $0x0, 0x70(%rsp) jmp 0xe268 cmpl $0x10, 0x40(%rsp) je 0xe1d8 movq 0x38(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0x2c(%rsp) movq 0x58(%rsp), %rax movl (%rax), %eax movl %eax, 0x30(%rsp) cmpl $0x0, 0x4c(%rsp) jne 0xe1ad movq 0x50(%rsp), %rax movl (%rax), %eax movl %eax, 0x1c(%rsp) jmp 0xe1b5 movl 0x4c(%rsp), %eax movl %eax, 0x1c(%rsp) movl 0x30(%rsp), %edx movl 0x2c(%rsp), %esi movq 0x20(%rsp), %rdi movl 0x1c(%rsp), %ecx callq 0x2b6d0 movq %rax, 0x38(%rsp) movl $0x10, 0x40(%rsp) movq %fs:0x0, %rax leaq -0x14(%rax), %rax cmpl $0x0, (%rax) je 0xe205 movq %fs:0x0, %rax leaq -0x18(%rax), %rax movl (%rax), %eax movl %eax, 0x18(%rsp) jmp 0xe20f movl 0x24b96d(%rip), %eax # 0x259b78 movl %eax, 0x18(%rsp) movl 0x18(%rsp), %eax cmpl $0x0, %eax je 0xe25e cmpl $0x0, 0x4c(%rsp) je 0xe229 movl 0x4c(%rsp), %eax movl %eax, 0x14(%rsp) jmp 0xe234 movq 0x50(%rsp), %rax movl (%rax), %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax movl %eax, 0x34(%rsp) movq 0x38(%rsp), %rdi movq 0x60(%rsp), %rax movl (%rax), %esi movq 0x58(%rsp), %rax movl (%rax), %edx movslq 0x34(%rsp), %rax shlq %rax movl %eax, %ecx callq 0x140c0 movq 0x38(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
_ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov [rsp+78h+var_20], rdx mov [rsp+78h+var_28], rcx mov [rsp+78h+var_2C], r8d mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_18] mov rdx, [rsp+78h+var_20] mov rcx, [rsp+78h+var_28] mov r8d, [rsp+78h+var_2C] lea r9, [rsp+78h+var_38] mov [rsp+78h+var_78], 10h call _ZL15stbi__load_mainP13stbi__contextPiS1_S1_iP17stbi__result_infoi; stbi__load_main(stbi__context *,int *,int *,int *,int,stbi__result_info *,int) mov [rsp+78h+var_40], rax cmp [rsp+78h+var_40], 0 jnz short loc_E172 mov [rsp+78h+var_8], 0 jmp loc_E268 loc_E172: cmp [rsp+78h+var_38], 10h jz short loc_E1D8 mov rax, [rsp+78h+var_40] mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_18] mov eax, [rax] mov [rsp+78h+var_4C], eax mov rax, [rsp+78h+var_20] mov eax, [rax] mov [rsp+78h+var_48], eax cmp [rsp+78h+var_2C], 0 jnz short loc_E1AD mov rax, [rsp+78h+var_28] mov eax, [rax] mov [rsp+78h+var_5C], eax jmp short loc_E1B5 loc_E1AD: mov eax, [rsp+78h+var_2C] mov [rsp+78h+var_5C], eax loc_E1B5: mov edx, [rsp+78h+var_48]; int mov esi, [rsp+78h+var_4C]; int mov rdi, [rsp+78h+var_58]; unsigned __int8 * mov ecx, [rsp+78h+var_5C]; int call _ZL21stbi__convert_8_to_16Phiii; stbi__convert_8_to_16(uchar *,int,int,int) mov [rsp+78h+var_40], rax mov [rsp+78h+var_38], 10h loc_E1D8: mov rax, fs:0 lea rax, [rax-14h] cmp dword ptr [rax], 0 jz short loc_E205 mov rax, fs:0 lea rax, [rax-18h] mov eax, [rax] mov [rsp+78h+var_60], eax jmp short loc_E20F loc_E205: mov eax, cs:_ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global mov [rsp+78h+var_60], eax loc_E20F: mov eax, [rsp+78h+var_60] cmp eax, 0 jz short loc_E25E cmp [rsp+78h+var_2C], 0 jz short loc_E229 mov eax, [rsp+78h+var_2C] mov [rsp+78h+var_64], eax jmp short loc_E234 loc_E229: mov rax, [rsp+78h+var_28] mov eax, [rax] mov [rsp+78h+var_64], eax loc_E234: mov eax, [rsp+78h+var_64] mov [rsp+78h+var_44], eax mov rdi, [rsp+78h+var_40]; void * mov rax, [rsp+78h+var_18] mov esi, [rax]; int mov rax, [rsp+78h+var_20] mov edx, [rax]; int movsxd rax, [rsp+78h+var_44] shl rax, 1 mov ecx, eax; int call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int) loc_E25E: mov rax, [rsp+78h+var_40] mov [rsp+78h+var_8], rax loc_E268: mov rax, [rsp+78h+var_8] add rsp, 78h retn
unsigned __int8 * stbi__load_and_postprocess_16bit(long long a1, int *a2, int *a3, int *a4, int a5) { long long v5; // rax int v7; // [rsp+14h] [rbp-64h] int v8; // [rsp+18h] [rbp-60h] int v9; // [rsp+2Ch] [rbp-4Ch] int v10; // [rsp+30h] [rbp-48h] unsigned __int8 *main; // [rsp+38h] [rbp-40h] int v12; // [rsp+40h] [rbp-38h] BYREF int v13; // [rsp+4Ch] [rbp-2Ch] int *v14; // [rsp+50h] [rbp-28h] int *v15; // [rsp+58h] [rbp-20h] int *v16; // [rsp+60h] [rbp-18h] long long v17; // [rsp+68h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; main = (unsigned __int8 *)stbi__load_main(a1, (_DWORD)a2, (_DWORD)a3, (_DWORD)a4, a5, (unsigned int)&v12, 16); if ( !main ) return 0LL; if ( v12 != 16 ) { v9 = *v16; v10 = *v15; if ( v13 ) v5 = stbi__convert_8_to_16(main, v9, v10, v13); else v5 = stbi__convert_8_to_16(main, v9, v10, *v14); main = (unsigned __int8 *)v5; v12 = 16; } if ( *(_DWORD *)(__readfsqword(0) - 20) ) v8 = *(_DWORD *)(__readfsqword(0) - 24); else v8 = stbi__vertically_flip_on_load_global; if ( v8 ) { if ( v13 ) v7 = v13; else v7 = *v14; stbi__vertical_flip(main, *v16, *v15, 2 * v7); } return main; }
stbi__load_and_postprocess_16bit: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],R8D MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x50] MOV R8D,dword ptr [RSP + 0x4c] LEA R9,[RSP + 0x40] MOV dword ptr [RSP],0x10 CALL 0x00113d00 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x0010e172 MOV qword ptr [RSP + 0x70],0x0 JMP 0x0010e268 LAB_0010e172: CMP dword ptr [RSP + 0x40],0x10 JZ 0x0010e1d8 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x30],EAX CMP dword ptr [RSP + 0x4c],0x0 JNZ 0x0010e1ad MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX JMP 0x0010e1b5 LAB_0010e1ad: MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x1c],EAX LAB_0010e1b5: MOV EDX,dword ptr [RSP + 0x30] MOV ESI,dword ptr [RSP + 0x2c] MOV RDI,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + 0x1c] CALL 0x0012b6d0 MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x40],0x10 LAB_0010e1d8: MOV RAX,qword ptr FS:[0x0] LEA RAX,[RAX + -0x14] CMP dword ptr [RAX],0x0 JZ 0x0010e205 MOV RAX,qword ptr FS:[0x0] LEA RAX,[RAX + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x18],EAX JMP 0x0010e20f LAB_0010e205: MOV EAX,dword ptr [0x00359b78] MOV dword ptr [RSP + 0x18],EAX LAB_0010e20f: MOV EAX,dword ptr [RSP + 0x18] CMP EAX,0x0 JZ 0x0010e25e CMP dword ptr [RSP + 0x4c],0x0 JZ 0x0010e229 MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x14],EAX JMP 0x0010e234 LAB_0010e229: MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x14],EAX LAB_0010e234: MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x34],EAX MOV RDI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x58] MOV EDX,dword ptr [RAX] MOVSXD RAX,dword ptr [RSP + 0x34] SHL RAX,0x1 MOV ECX,EAX CALL 0x001140c0 LAB_0010e25e: MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x70],RAX LAB_0010e268: MOV RAX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
/* stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int) */ uchar * stbi__load_and_postprocess_16bit (stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5) { long *in_FS_OFFSET; int local_64; int local_60; int local_5c; uchar *local_40; int local_38 [3]; int local_2c; int *local_28; int *local_20; int *local_18; stbi__context *local_10; uchar *local_8; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_40 = (uchar *)stbi__load_main(param_1,param_2,param_3,param_4,param_5, (stbi__result_info *)local_38,0x10); if (local_40 == (uchar *)0x0) { local_8 = (uchar *)0x0; } else { if (local_38[0] != 0x10) { if (local_2c == 0) { local_5c = *local_28; } else { local_5c = local_2c; } local_40 = (uchar *)stbi__convert_8_to_16(local_40,*local_18,*local_20,local_5c); local_38[0] = 0x10; } if (*(int *)(*in_FS_OFFSET + -0x14) == 0) { local_60 = stbi__vertically_flip_on_load_global; } else { local_60 = *(int *)(*in_FS_OFFSET + -0x18); } if (local_60 != 0) { if (local_2c == 0) { local_64 = *local_28; } else { local_64 = local_2c; } stbi__vertical_flip(local_40,*local_18,*local_20,(int)((long)local_64 << 1)); } local_8 = local_40; } return local_8; }
38,853
stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) { stbi__result_info ri; void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); if (result == NULL) return NULL; // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); if (ri.bits_per_channel != 16) { result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); ri.bits_per_channel = 16; } // @TODO: move stbi__convert_format16 to here // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision if (stbi__vertically_flip_on_load) { int channels = req_comp ? req_comp : *comp; stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); } return (stbi__uint16 *) result; }
O2
c
stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebx movq %rcx, %r13 movq %rdx, %r14 movq %rsi, %r15 movl $0x10, (%rsp) leaq 0x1c(%rsp), %r9 callq 0x1059a testq %rax, %rax je 0xbe9d movq %rax, %rbp cmpl $0x10, 0x1c(%rsp) movq %r13, 0x10(%rsp) jne 0xbea5 movq %rbp, %r13 jmp 0xbf0f xorl %r13d, %r13d jmp 0xbf55 movl (%r15), %eax movl (%r14), %r12d movl %ebx, %ecx testl %ebx, %ebx jne 0xbeb5 movl (%r13), %ecx imull %eax, %r12d imull %ecx, %r12d leal (%r12,%r12), %eax movslq %eax, %rdi callq 0xa7e0 movq %rax, %r13 testq %rax, %rax je 0xbeff xorl %eax, %eax testl %r12d, %r12d cmovlel %eax, %r12d cmpq %rax, %r12 je 0xbef5 movzbl (%rbp,%rax), %ecx imull $0x101, %ecx, %ecx # imm = 0x101 movw %cx, (%r13,%rax,2) incq %rax jmp 0xbeda movq %rbp, %rdi callq 0xa710 jmp 0xbf0f leaq 0x8c821(%rip), %rax # 0x98727 movq %rax, %fs:-0x20 cmpl $0x0, %fs:-0x14 movq %fs:0x0, %rax leaq -0x18(%rax), %rax leaq 0x14af29(%rip), %rcx # 0x156e58 cmovneq %rax, %rcx cmpl $0x0, (%rcx) je 0xbf55 testl %ebx, %ebx jne 0xbf43 movq 0x10(%rsp), %rax movl (%rax), %ebx movl (%r15), %esi movl (%r14), %edx addl %ebx, %ebx movq %r13, %rdi movl %ebx, %ecx callq 0x13cd0 movq %r13, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, r8d mov r13, rcx mov r14, rdx mov r15, rsi mov [rsp+58h+var_58], 10h lea r9, [rsp+58h+var_3C] call _ZL15stbi__load_mainP13stbi__contextPiS1_S1_iP17stbi__result_infoi; stbi__load_main(stbi__context *,int *,int *,int *,int,stbi__result_info *,int) test rax, rax jz short loc_BE9D mov rbp, rax cmp [rsp+58h+var_3C], 10h mov [rsp+58h+var_48], r13 jnz short loc_BEA5 mov r13, rbp jmp short loc_BF0F loc_BE9D: xor r13d, r13d jmp loc_BF55 loc_BEA5: mov eax, [r15] mov r12d, [r14] mov ecx, ebx test ebx, ebx jnz short loc_BEB5 mov ecx, [r13+0] loc_BEB5: imul r12d, eax imul r12d, ecx lea eax, [r12+r12] movsxd rdi, eax call _malloc mov r13, rax test rax, rax jz short loc_BEFF xor eax, eax test r12d, r12d cmovle r12d, eax loc_BEDA: cmp r12, rax jz short loc_BEF5 movzx ecx, byte ptr [rbp+rax+0] imul ecx, 101h mov [r13+rax*2+0], cx inc rax jmp short loc_BEDA loc_BEF5: mov rdi, rbp call _free jmp short loc_BF0F loc_BEFF: lea rax, aOutofmem; "outofmem" mov fs:0FFFFFFFFFFFFFFE0h, rax loc_BF0F: cmp dword ptr fs:0FFFFFFFFFFFFFFECh, 0 mov rax, fs:0 lea rax, [rax-18h] lea rcx, _ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global cmovnz rcx, rax cmp dword ptr [rcx], 0 jz short loc_BF55 test ebx, ebx jnz short loc_BF43 mov rax, [rsp+58h+var_48] mov ebx, [rax] loc_BF43: mov esi, [r15]; int mov edx, [r14]; int add ebx, ebx mov rdi, r13; void * mov ecx, ebx; int call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int) loc_BF55: mov rax, r13 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_WORD * stbi__load_and_postprocess_16bit(long long a1, int *a2, int *a3, int *a4, long long a5) { int v5; // ebx long long main; // rax long long v9; // rbp _WORD *v10; // r13 int v11; // ecx long long v12; // r12 long long v13; // rax unsigned long long v14; // rax int *v15; // rcx int *v17; // [rsp+10h] [rbp-48h] _DWORD v18[15]; // [rsp+1Ch] [rbp-3Ch] BYREF v5 = a5; main = stbi__load_main(a1, a2, a3, a4, a5, v18, 16); if ( !main ) return 0LL; v9 = main; v17 = a4; if ( v18[0] == 16 ) { v10 = (_WORD *)main; } else { v11 = v5; if ( !v5 ) v11 = *a4; v12 = (unsigned int)(v11 * *a2 * *a3); v10 = (_WORD *)malloc(2 * (int)v12); if ( v10 ) { v13 = 0LL; if ( (int)v12 <= 0 ) v12 = 0LL; while ( v12 != v13 ) { v10[v13] = 257 * *(unsigned __int8 *)(v9 + v13); ++v13; } free(v9); } else { __writefsqword(0xFFFFFFE0, (unsigned long long)"outofmem"); } } v14 = __readfsqword(0) - 24; v15 = &stbi__vertically_flip_on_load_global; if ( __readfsdword(0xFFFFFFEC) ) v15 = (int *)v14; if ( *v15 ) { if ( !v5 ) v5 = *v17; stbi__vertical_flip(v10, *a2, *a3, 2 * v5); } return v10; }
stbi__load_and_postprocess_16bit: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,R8D MOV R13,RCX MOV R14,RDX MOV R15,RSI MOV dword ptr [RSP],0x10 LEA R9,[RSP + 0x1c] CALL 0x0011059a TEST RAX,RAX JZ 0x0010be9d MOV RBP,RAX CMP dword ptr [RSP + 0x1c],0x10 MOV qword ptr [RSP + 0x10],R13 JNZ 0x0010bea5 MOV R13,RBP JMP 0x0010bf0f LAB_0010be9d: XOR R13D,R13D JMP 0x0010bf55 LAB_0010bea5: MOV EAX,dword ptr [R15] MOV R12D,dword ptr [R14] MOV ECX,EBX TEST EBX,EBX JNZ 0x0010beb5 MOV ECX,dword ptr [R13] LAB_0010beb5: IMUL R12D,EAX IMUL R12D,ECX LEA EAX,[R12 + R12*0x1] MOVSXD RDI,EAX CALL 0x0010a7e0 MOV R13,RAX TEST RAX,RAX JZ 0x0010beff XOR EAX,EAX TEST R12D,R12D CMOVLE R12D,EAX LAB_0010beda: CMP R12,RAX JZ 0x0010bef5 MOVZX ECX,byte ptr [RBP + RAX*0x1] IMUL ECX,ECX,0x101 MOV word ptr [R13 + RAX*0x2],CX INC RAX JMP 0x0010beda LAB_0010bef5: MOV RDI,RBP CALL 0x0010a710 JMP 0x0010bf0f LAB_0010beff: LEA RAX,[0x198727] MOV qword ptr FS:[-0x20],RAX LAB_0010bf0f: CMP dword ptr FS:[-0x14],0x0 MOV RAX,qword ptr FS:[0x0] LEA RAX,[RAX + -0x18] LEA RCX,[0x256e58] CMOVNZ RCX,RAX CMP dword ptr [RCX],0x0 JZ 0x0010bf55 TEST EBX,EBX JNZ 0x0010bf43 MOV RAX,qword ptr [RSP + 0x10] MOV EBX,dword ptr [RAX] LAB_0010bf43: MOV ESI,dword ptr [R15] MOV EDX,dword ptr [R14] ADD EBX,EBX MOV RDI,R13 MOV ECX,EBX CALL 0x00113cd0 LAB_0010bf55: MOV RAX,R13 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* stbi__load_and_postprocess_16bit(stbi__context*, int*, int*, int*, int) */ void * stbi__load_and_postprocess_16bit (stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5) { void *__ptr; void *pvVar1; ulong uVar2; int iVar3; int *piVar4; uint uVar5; ulong uVar6; long *in_FS_OFFSET; int local_3c [3]; __ptr = (void *)stbi__load_main(param_1,param_2,param_3,param_4,param_5, (stbi__result_info *)local_3c,0x10); if (__ptr == (void *)0x0) { __ptr = (void *)0x0; } else { if (local_3c[0] != 0x10) { iVar3 = param_5; if (param_5 == 0) { iVar3 = *param_4; } uVar5 = *param_3 * *param_2 * iVar3; pvVar1 = malloc((long)(int)(uVar5 * 2)); if (pvVar1 == (void *)0x0) { in_FS_OFFSET[-4] = (long)"outofmem"; __ptr = pvVar1; } else { uVar2 = 0; uVar6 = (ulong)uVar5; if ((int)uVar5 < 1) { uVar6 = uVar2; } for (; uVar6 != uVar2; uVar2 = uVar2 + 1) { *(ushort *)((long)pvVar1 + uVar2 * 2) = (ushort)*(byte *)((long)__ptr + uVar2) * 0x101; } free(__ptr); __ptr = pvVar1; } } piVar4 = &stbi__vertically_flip_on_load_global; if (*(int *)((long)in_FS_OFFSET + -0x14) != 0) { piVar4 = (int *)(*in_FS_OFFSET + -0x18); } if (*piVar4 != 0) { if (param_5 == 0) { param_5 = *param_4; } stbi__vertical_flip(__ptr,*param_2,*param_3,param_5 * 2); } } return __ptr; }
38,854
get_actual_table_name_helper
eloqsql/client/mysqldump.c
static char *get_actual_table_name_helper(const char *old_table_name, my_bool case_sensitive, MEM_ROOT *root) { char *name= 0; MYSQL_RES *table_res; MYSQL_ROW row; char query[50 + 2*NAME_LEN]; char show_name_buff[FN_REFLEN]; DBUG_ENTER("get_actual_table_name_helper"); /* Check memory for quote_for_like() */ DBUG_ASSERT(2*sizeof(old_table_name) < sizeof(show_name_buff)); if (case_sensitive) { DBUG_PRINT("info", ("case sensitive search")); my_snprintf(query, sizeof(query), "SELECT table_name FROM INFORMATION_SCHEMA.TABLES " "WHERE table_schema = DATABASE() AND table_name = %s", quote_for_equal(old_table_name, show_name_buff)); } else { DBUG_PRINT("info", ("case insensitive search")); my_snprintf(query, sizeof(query), "SHOW TABLES LIKE %s", quote_for_like(old_table_name, show_name_buff)); } if (mysql_query_with_error_report(mysql, 0, query)) return NullS; if ((table_res= mysql_store_result(mysql))) { my_ulonglong num_rows= mysql_num_rows(table_res); if (num_rows > 0) { ulong *lengths; /* Return first row TODO: Return all matching rows */ row= mysql_fetch_row(table_res); lengths= mysql_fetch_lengths(table_res); name= strmake_root(root, row[0], lengths[0]); } mysql_free_result(table_res); } DBUG_PRINT("exit", ("new_table_name: %s", name)); DBUG_RETURN(name); }
O0
c
get_actual_table_name_helper: pushq %rbp movq %rsp, %rbp subq $0x4a0, %rsp # imm = 0x4A0 movb %sil, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x450(%rbp) movb %al, -0x451(%rbp) movq %rdx, -0x460(%rbp) movq $0x0, -0x468(%rbp) jmp 0x4677c cmpb $0x0, -0x451(%rbp) je 0x467c9 jmp 0x46787 jmp 0x46789 leaq -0x240(%rbp), %rax movq %rax, -0x490(%rbp) movq -0x450(%rbp), %rdi leaq -0x440(%rbp), %rsi callq 0x392a0 movq -0x490(%rbp), %rdi movq %rax, %rcx movl $0x232, %esi # imm = 0x232 leaq 0x97b98(%rip), %rdx # 0xde358 movb $0x0, %al callq 0xd4cd0 jmp 0x4680b jmp 0x467cb jmp 0x467cd leaq -0x240(%rbp), %rax movq %rax, -0x498(%rbp) movq -0x450(%rbp), %rdi leaq -0x440(%rbp), %rsi callq 0x448e0 movq -0x498(%rbp), %rdi movq %rax, %rcx movl $0x232, %esi # imm = 0x232 leaq 0x97bb9(%rip), %rdx # 0xde3bd movb $0x0, %al callq 0xd4cd0 movq 0x3bacb6(%rip), %rdi # 0x4014c8 leaq -0x240(%rbp), %rdx xorl %eax, %eax movl %eax, %esi callq 0x39350 cmpl $0x0, %eax je 0x46837 movq $0x0, -0x448(%rbp) jmp 0x468da movq 0x3bac8a(%rip), %rdi # 0x4014c8 callq 0x514c0 movq %rax, -0x470(%rbp) cmpq $0x0, %rax je 0x468c6 movq -0x470(%rbp), %rdi callq 0x535e0 movq %rax, -0x480(%rbp) cmpq $0x0, -0x480(%rbp) jbe 0x468ba movq -0x470(%rbp), %rdi callq 0x51800 movq %rax, -0x478(%rbp) movq -0x470(%rbp), %rdi callq 0x51980 movq %rax, -0x488(%rbp) movq -0x460(%rbp), %rdi movq -0x478(%rbp), %rax movq (%rax), %rsi movq -0x488(%rbp), %rax movq (%rax), %rdx callq 0x85130 movq %rax, -0x468(%rbp) movq -0x470(%rbp), %rdi callq 0x48d00 jmp 0x468c8 jmp 0x468ca jmp 0x468cc movq -0x468(%rbp), %rax movq %rax, -0x448(%rbp) movq -0x448(%rbp), %rax movq %rax, -0x4a0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4690a movq -0x4a0(%rbp), %rax addq $0x4a0, %rsp # imm = 0x4A0 popq %rbp retq callq 0x382c0 nop
get_actual_table_name_helper: push rbp mov rbp, rsp sub rsp, 4A0h mov al, sil mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_450], rdi mov [rbp+var_451], al mov [rbp+var_460], rdx mov [rbp+var_468], 0 jmp short $+2 loc_4677C: cmp [rbp+var_451], 0 jz short loc_467C9 jmp short $+2 loc_46787: jmp short $+2 loc_46789: lea rax, [rbp+var_240] mov [rbp+var_490], rax mov rdi, [rbp+var_450] lea rsi, [rbp+var_440] call quote_for_equal mov rdi, [rbp+var_490] mov rcx, rax mov esi, 232h lea rdx, aSelectTableNam; "SELECT table_name FROM INFORMATION_SCHE"... mov al, 0 call my_snprintf jmp short loc_4680B loc_467C9: jmp short $+2 loc_467CB: jmp short $+2 loc_467CD: lea rax, [rbp+var_240] mov [rbp+var_498], rax mov rdi, [rbp+var_450] lea rsi, [rbp+var_440] call quote_for_like mov rdi, [rbp+var_498] mov rcx, rax mov esi, 232h lea rdx, aShowTablesLike; "SHOW TABLES LIKE %s" mov al, 0 call my_snprintf loc_4680B: mov rdi, cs:mysql lea rdx, [rbp+var_240] xor eax, eax mov esi, eax call mysql_query_with_error_report cmp eax, 0 jz short loc_46837 mov [rbp+var_448], 0 jmp loc_468DA loc_46837: mov rdi, cs:mysql call mysql_store_result mov [rbp+var_470], rax cmp rax, 0 jz short loc_468C6 mov rdi, [rbp+var_470] call mysql_num_rows mov [rbp+var_480], rax cmp [rbp+var_480], 0 jbe short loc_468BA mov rdi, [rbp+var_470] call mysql_fetch_row mov [rbp+var_478], rax mov rdi, [rbp+var_470] call mysql_fetch_lengths mov [rbp+var_488], rax mov rdi, [rbp+var_460] mov rax, [rbp+var_478] mov rsi, [rax] mov rax, [rbp+var_488] mov rdx, [rax] call strmake_root mov [rbp+var_468], rax loc_468BA: mov rdi, [rbp+var_470] call mysql_free_result loc_468C6: jmp short $+2 loc_468C8: jmp short $+2 loc_468CA: jmp short $+2 loc_468CC: mov rax, [rbp+var_468] mov [rbp+var_448], rax loc_468DA: mov rax, [rbp+var_448] mov [rbp+var_4A0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4690A mov rax, [rbp+var_4A0] add rsp, 4A0h pop rbp retn loc_4690A: call ___stack_chk_fail
long long get_actual_table_name_helper(char *a1, char a2, long long a3) { unsigned int v3; // eax int v4; // r8d int v5; // r9d unsigned int v6; // eax int v7; // r8d int v8; // r9d _QWORD *lengths; // [rsp+18h] [rbp-488h] _QWORD *row; // [rsp+28h] [rbp-478h] long long v12; // [rsp+30h] [rbp-470h] long long v13; // [rsp+38h] [rbp-468h] _BYTE v16[512]; // [rsp+60h] [rbp-440h] BYREF _BYTE v17[568]; // [rsp+260h] [rbp-240h] BYREF unsigned long long v18; // [rsp+498h] [rbp-8h] v18 = __readfsqword(0x28u); v13 = 0LL; if ( a2 ) { v3 = (unsigned int)quote_for_equal(a1, v16); my_snprintf( (unsigned int)v17, 562, (unsigned int)"SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name = %s", v3, v4, v5); } else { v6 = (unsigned int)quote_for_like(a1, v16); my_snprintf((unsigned int)v17, 562, (unsigned int)"SHOW TABLES LIKE %s", v6, v7, v8); } if ( (unsigned int)mysql_query_with_error_report(mysql, 0LL, (long long)v17) ) return 0LL; v12 = mysql_store_result(mysql); if ( v12 ) { if ( mysql_num_rows(v12) ) { row = (_QWORD *)mysql_fetch_row(v12); lengths = (_QWORD *)mysql_fetch_lengths(v12); v13 = strmake_root(a3, *row, *lengths); } mysql_free_result(v12); } return v13; }
get_actual_table_name_helper: PUSH RBP MOV RBP,RSP SUB RSP,0x4a0 MOV AL,SIL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x450],RDI MOV byte ptr [RBP + -0x451],AL MOV qword ptr [RBP + -0x460],RDX MOV qword ptr [RBP + -0x468],0x0 JMP 0x0014677c LAB_0014677c: CMP byte ptr [RBP + -0x451],0x0 JZ 0x001467c9 JMP 0x00146787 LAB_00146787: JMP 0x00146789 LAB_00146789: LEA RAX,[RBP + -0x240] MOV qword ptr [RBP + -0x490],RAX MOV RDI,qword ptr [RBP + -0x450] LEA RSI,[RBP + -0x440] CALL 0x001392a0 MOV RDI,qword ptr [RBP + -0x490] MOV RCX,RAX MOV ESI,0x232 LEA RDX,[0x1de358] MOV AL,0x0 CALL 0x001d4cd0 JMP 0x0014680b LAB_001467c9: JMP 0x001467cb LAB_001467cb: JMP 0x001467cd LAB_001467cd: LEA RAX,[RBP + -0x240] MOV qword ptr [RBP + -0x498],RAX MOV RDI,qword ptr [RBP + -0x450] LEA RSI,[RBP + -0x440] CALL 0x001448e0 MOV RDI,qword ptr [RBP + -0x498] MOV RCX,RAX MOV ESI,0x232 LEA RDX,[0x1de3bd] MOV AL,0x0 CALL 0x001d4cd0 LAB_0014680b: MOV RDI,qword ptr [0x005014c8] LEA RDX,[RBP + -0x240] XOR EAX,EAX MOV ESI,EAX CALL 0x00139350 CMP EAX,0x0 JZ 0x00146837 MOV qword ptr [RBP + -0x448],0x0 JMP 0x001468da LAB_00146837: MOV RDI,qword ptr [0x005014c8] CALL 0x001514c0 MOV qword ptr [RBP + -0x470],RAX CMP RAX,0x0 JZ 0x001468c6 MOV RDI,qword ptr [RBP + -0x470] CALL 0x001535e0 MOV qword ptr [RBP + -0x480],RAX CMP qword ptr [RBP + -0x480],0x0 JBE 0x001468ba MOV RDI,qword ptr [RBP + -0x470] CALL 0x00151800 MOV qword ptr [RBP + -0x478],RAX MOV RDI,qword ptr [RBP + -0x470] CALL 0x00151980 MOV qword ptr [RBP + -0x488],RAX MOV RDI,qword ptr [RBP + -0x460] MOV RAX,qword ptr [RBP + -0x478] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x488] MOV RDX,qword ptr [RAX] CALL 0x00185130 MOV qword ptr [RBP + -0x468],RAX LAB_001468ba: MOV RDI,qword ptr [RBP + -0x470] CALL 0x00148d00 LAB_001468c6: JMP 0x001468c8 LAB_001468c8: JMP 0x001468ca LAB_001468ca: JMP 0x001468cc LAB_001468cc: MOV RAX,qword ptr [RBP + -0x468] MOV qword ptr [RBP + -0x448],RAX LAB_001468da: MOV RAX,qword ptr [RBP + -0x448] MOV qword ptr [RBP + -0x4a0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014690a MOV RAX,qword ptr [RBP + -0x4a0] ADD RSP,0x4a0 POP RBP RET LAB_0014690a: CALL 0x001382c0
int8 get_actual_table_name_helper(int8 param_1,char param_2,int8 param_3) { int iVar1; int8 uVar2; long lVar3; long lVar4; int8 *puVar5; int8 *puVar6; long in_FS_OFFSET; int8 local_470; int8 local_450; int1 local_448 [512]; int1 local_248 [568]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_470 = 0; if (param_2 == '\0') { uVar2 = quote_for_like(param_1,local_448); my_snprintf(local_248,0x232,"SHOW TABLES LIKE %s",uVar2); } else { uVar2 = quote_for_equal(param_1,local_448); my_snprintf(local_248,0x232, "SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = DATABASE() AND table_name = %s" ,uVar2); } iVar1 = mysql_query_with_error_report(mysql,0,local_248); if (iVar1 == 0) { lVar3 = mysql_store_result(mysql); if (lVar3 != 0) { lVar4 = mysql_num_rows(lVar3); if (lVar4 != 0) { puVar5 = (int8 *)mysql_fetch_row(lVar3); puVar6 = (int8 *)mysql_fetch_lengths(lVar3); local_470 = strmake_root(param_3,*puVar5,*puVar6); } mysql_free_result(lVar3); } local_450 = local_470; } else { local_450 = 0; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_450; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
38,855
minja::Value::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value get(const Value& key) { if (array_) { if (!key.is_number_integer()) { return Value(); } auto index = key.get<int>(); return array_->at(index < 0 ? array_->size() + index : index); } else if (object_) { if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); auto it = object_->find(key.primitive_); if (it == object_->end()) return Value(); return it->second; } return Value(); }
O2
cpp
minja::Value::get(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x10(%rsi) je 0x4d62a movb 0x40(%r15), %al addb $-0x5, %al cmpb $0x2, %al jae 0x4d65d movq %r15, %rdi callq 0x4d82c movl %eax, %ecx movq 0x10(%r14), %rdi testl %eax, %eax js 0x4d667 movl %ecx, %esi jmp 0x4d67c cmpq $0x0, 0x20(%r14) je 0x4d65d movq %r15, %rdi callq 0x3cf44 testb %al, %al je 0x4d69a movq 0x20(%r14), %rdi addq $0x40, %r15 movq %r15, %rsi callq 0x4d8e2 movq 0x20(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x4d65d addq $0x10, %rax jmp 0x4d681 movq %rbx, %rdi callq 0x40bbc jmp 0x4d68c movq 0x8(%rdi), %rax subq (%rdi), %rax pushq $0x50 popq %rsi cqto idivq %rsi movslq %ecx, %rsi addq %rax, %rsi callq 0x4d72e movq %rbx, %rdi movq %rax, %rsi callq 0x4ad38 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x3cf54 leaq 0x440c0(%rip), %rsi # 0x9177e leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x28a89 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x20aa0 xorl %ebp, %ebp movq 0x83902(%rip), %rsi # 0xd0fe8 movq 0x83873(%rip), %rdx # 0xd0f60 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x20d88 jmp 0x4d70a movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x20d88 testb %bpl, %bpl jne 0x4d71e jmp 0x4d726 movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20b90
_ZN5minja5Value3getERKS0_: push rbp push r15 push r14 push rbx sub rsp, 48h mov r15, rdx mov r14, rsi mov rbx, rdi cmp qword ptr [rsi+10h], 0 jz short loc_4D62A mov al, [r15+40h] add al, 0FBh cmp al, 2 jnb short loc_4D65D mov rdi, r15 call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) mov ecx, eax mov rdi, [r14+10h] test eax, eax js short loc_4D667 mov esi, ecx jmp short loc_4D67C loc_4D62A: cmp qword ptr [r14+20h], 0 jz short loc_4D65D mov rdi, r15; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_4D69A mov rdi, [r14+20h] add r15, 40h ; '@' mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rcx, [r14+20h] cmp rax, [rcx+8] jz short loc_4D65D add rax, 10h jmp short loc_4D681 loc_4D65D: mov rdi, rbx; this call _ZN5minja5ValueC2Ev; minja::Value::Value(void) jmp short loc_4D68C loc_4D667: mov rax, [rdi+8] sub rax, [rdi] push 50h ; 'P' pop rsi cqo idiv rsi movsxd rsi, ecx add rsi, rax loc_4D67C: call _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong) loc_4D681: mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_4D68C: mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_4D69A: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4D70A mov r14, rax mov bpl, 1 loc_4D70A: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_4D71E jmp short loc_4D726 mov r14, rax loc_4D71E: mov rdi, rbx; void * call ___cxa_free_exception loc_4D726: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::get(minja::Value *this, const minja::Value *a2, minja::Value *a3) { int v5; // ecx _QWORD *v6; // rdi long long v7; // rsi long long v8; // rax const minja::Value *v9; // rax void *exception; // rbx _BYTE v12[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v13[64]; // [rsp+28h] [rbp-40h] BYREF if ( *((_QWORD *)a2 + 2) ) { if ( (unsigned __int8)(*((_BYTE *)a3 + 64) - 5) < 2u ) { v5 = minja::Value::get<int>(a3); v6 = (_QWORD *)*((_QWORD *)a2 + 2); if ( v5 < 0 ) v7 = (v6[1] - *v6) / 80LL + v5; else v7 = (unsigned int)v5; v9 = (const minja::Value *)std::vector<minja::Value>::at(v6, v7); goto LABEL_12; } } else if ( *((_QWORD *)a2 + 4) ) { if ( !minja::Value::is_primitive(a3) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v12, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v13, (long long)"Unashable type: ", (long long)v12); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v8 = 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>>>::find( *((_QWORD *)a2 + 4), (char *)a3 + 64); if ( v8 != *(_QWORD *)(*((_QWORD *)a2 + 4) + 8LL) ) { v9 = (const minja::Value *)(v8 + 16); LABEL_12: minja::Value::Value(this, v9); return this; } } minja::Value::Value(this); return this; }
get: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R15,RDX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RSI + 0x10],0x0 JZ 0x0014d62a MOV AL,byte ptr [R15 + 0x40] ADD AL,0xfb CMP AL,0x2 JNC 0x0014d65d MOV RDI,R15 CALL 0x0014d82c MOV ECX,EAX MOV RDI,qword ptr [R14 + 0x10] TEST EAX,EAX JS 0x0014d667 MOV ESI,ECX JMP 0x0014d67c LAB_0014d62a: CMP qword ptr [R14 + 0x20],0x0 JZ 0x0014d65d MOV RDI,R15 CALL 0x0013cf44 TEST AL,AL JZ 0x0014d69a MOV RDI,qword ptr [R14 + 0x20] ADD R15,0x40 MOV RSI,R15 CALL 0x0014d8e2 MOV RCX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0014d65d ADD RAX,0x10 JMP 0x0014d681 LAB_0014d65d: MOV RDI,RBX CALL 0x00140bbc JMP 0x0014d68c LAB_0014d667: MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] PUSH 0x50 POP RSI CQO IDIV RSI MOVSXD RSI,ECX ADD RSI,RAX LAB_0014d67c: CALL 0x0014d72e LAB_0014d681: MOV RDI,RBX MOV RSI,RAX CALL 0x0014ad38 LAB_0014d68c: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0014d69a: PUSH 0x10 POP RDI CALL 0x00120390 MOV RBX,RAX LAB_0014d6a5: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0013cf54 LAB_0014d6b7: LEA RSI,[0x19177e] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00128a89 MOV BPL,0x1 LAB_0014d6d0: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00120aa0 XOR EBP,EBP MOV RSI,qword ptr [0x001d0fe8] MOV RDX,qword ptr [0x001d0f60] MOV RDI,RBX CALL 0x00120b30
/* minja::Value::get(minja::Value const&) */ Value * minja::Value::get(Value *param_1) { vector<minja::Value,std::allocator<minja::Value>> *this; char cVar1; uint uVar2; long lVar3; Value *pVVar4; runtime_error *this_00; Value *in_RDX; long in_RSI; ulong uVar5; int1 local_60 [32]; string local_40 [32]; if (*(long *)(in_RSI + 0x10) == 0) { if (*(long *)(in_RSI + 0x20) != 0) { cVar1 = is_primitive(in_RDX); if (cVar1 == '\0') { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0014d6a5 to 0014d6b6 has its CatchHandler @ 0014d71b */ dump_abi_cxx11_((int)local_60,SUB81(in_RSI,0)); /* try { // try from 0014d6b7 to 0014d6cc has its CatchHandler @ 0014d704 */ std::operator+((char *)local_40,(string *)"Unashable type: "); /* try { // try from 0014d6d0 to 0014d6f4 has its CatchHandler @ 0014d6f5 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001d0fe8,PTR__runtime_error_001d0f60); } lVar3 = 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>>> ::find(*(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>>> **)(in_RSI + 0x20),in_RDX + 0x40); if (lVar3 != *(long *)(*(long *)(in_RSI + 0x20) + 8)) { pVVar4 = (Value *)(lVar3 + 0x10); goto LAB_0014d681; } } } else if ((byte)((char)in_RDX[0x40] - 5U) < 2) { uVar2 = get<int>(in_RDX); this = *(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10); if ((int)uVar2 < 0) { uVar5 = (long)(int)uVar2 + (*(long *)(this + 8) - *(long *)this) / 0x50; } else { uVar5 = (ulong)uVar2; } pVVar4 = (Value *)std::vector<minja::Value,std::allocator<minja::Value>>::at(this,uVar5); LAB_0014d681: Value(param_1,pVVar4); return param_1; } Value(param_1); return param_1; }
38,856
JS_IsExtensible
bluesky950520[P]quickjs/quickjs.c
int JS_IsExtensible(JSContext *ctx, JSValue obj) { JSObject *p; if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)) return FALSE; p = JS_VALUE_GET_OBJ(obj); if (unlikely(p->class_id == JS_CLASS_PROXY)) return js_proxy_isExtensible(ctx, obj); else return p->extensible; }
O2
c
JS_IsExtensible: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdx, %rcx cmpl $-0x1, %ecx jne 0x1de3a movq %rsi, %rdx cmpw $0x30, 0x6(%rsi) je 0x1de3e movzbl 0x5(%rdx), %ebp andl $0x1, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %ebp, %ebp jmp 0x1de2d movq %rdi, %rbx leaq 0x8(%rsp), %rsi pushq $0x62 popq %r8 callq 0x35d01 pushq $-0x1 popq %r15 testq %rax, %rax je 0x1ded3 movq %rax, %r14 movq 0x10(%rsp), %rdx cmpl $0x3, %edx jne 0x1de78 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1de0a movl %eax, %ebp jmp 0x1de2d movq 0x8(%rsp), %rsi movq 0x10(%r14), %rcx movq 0x18(%r14), %r8 movq %r14, (%rsp) pushq $0x1 popq %r9 movq %rbx, %rdi callq 0x1cd8e cmpl $0x6, %edx je 0x1ded3 movq %rbx, %rdi movq %rax, %rsi callq 0x1cdfa movl %eax, %ebp movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1de0a testl %eax, %eax js 0x1ded3 cmpl %eax, %ebp je 0x1de2d leaq 0x68f3d(%rip), %rsi # 0x86e06 movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d movl %r15d, %ebp jmp 0x1de2d
JS_IsExtensible: push rbp push r15 push r14 push rbx sub rsp, 18h mov rcx, rdx cmp ecx, 0FFFFFFFFh jnz short loc_1DE3A mov rdx, rsi cmp word ptr [rsi+6], 30h ; '0' jz short loc_1DE3E movzx ebp, byte ptr [rdx+5] and ebp, 1 loc_1DE2D: mov eax, ebp add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn loc_1DE3A: xor ebp, ebp jmp short loc_1DE2D loc_1DE3E: mov rbx, rdi lea rsi, [rsp+38h+var_30] push 62h ; 'b' pop r8 call get_proxy_method push 0FFFFFFFFFFFFFFFFh pop r15 test rax, rax jz short loc_1DED3 mov r14, rax mov rdx, [rsp+38h+var_28] cmp edx, 3 jnz short loc_1DE78 mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call JS_IsExtensible mov ebp, eax jmp short loc_1DE2D loc_1DE78: mov rsi, [rsp+38h+var_30] mov rcx, [r14+10h] mov r8, [r14+18h] mov [rsp+38h+var_38], r14 push 1 pop r9 mov rdi, rbx call JS_CallFree cmp edx, 6 jz short loc_1DED3 mov rdi, rbx mov rsi, rax call JS_ToBoolFree mov ebp, eax mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call JS_IsExtensible test eax, eax js short loc_1DED3 cmp ebp, eax jz loc_1DE2D lea rsi, aProxyInconsist_0; "proxy: inconsistent isExtensible" mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_1DED3: mov ebp, r15d jmp loc_1DE2D
long long JS_IsExtensible( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { unsigned int v11; // ebp _QWORD *proxy_method; // rax _QWORD *v14; // r14 long long v15; // rax long long v16; // rdx int IsExtensible; // eax long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 char v24; // [rsp+0h] [rbp-38h] long long v25; // [rsp+8h] [rbp-30h] BYREF long long v26; // [rsp+10h] [rbp-28h] if ( (_DWORD)a3 == -1 ) { if ( *(_WORD *)(a2 + 6) == 48 ) { proxy_method = (_QWORD *)get_proxy_method(a1, &v25, a2, a3, 98LL); if ( proxy_method ) { v14 = proxy_method; if ( (_DWORD)v26 == 3 ) return (unsigned int)JS_IsExtensible(a1, *proxy_method, proxy_method[1]); v15 = JS_CallFree(a1, v25, v26, proxy_method[2], proxy_method[3], 1, (long long)proxy_method); if ( (_DWORD)v16 != 6 ) { v11 = JS_ToBoolFree(a1, v15, v16); IsExtensible = JS_IsExtensible(a1, *v14, v14[1]); if ( IsExtensible >= 0 ) { if ( v11 == IsExtensible ) return v11; JS_ThrowTypeError( a1, (long long)"proxy: inconsistent isExtensible", v18, v19, v20, v21, a4, a5, a6, a7, v22, v23, a10, a11, v24); } } } return (unsigned int)-1; } return *(_BYTE *)(a2 + 5) & 1; } else { return 0; } }
JS_IsExtensible: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RCX,RDX CMP ECX,-0x1 JNZ 0x0011de3a MOV RDX,RSI CMP word ptr [RSI + 0x6],0x30 JZ 0x0011de3e MOVZX EBP,byte ptr [RDX + 0x5] AND EBP,0x1 LAB_0011de2d: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET LAB_0011de3a: XOR EBP,EBP JMP 0x0011de2d LAB_0011de3e: MOV RBX,RDI LEA RSI,[RSP + 0x8] PUSH 0x62 POP R8 CALL 0x00135d01 PUSH -0x1 POP R15 TEST RAX,RAX JZ 0x0011ded3 MOV R14,RAX MOV RDX,qword ptr [RSP + 0x10] CMP EDX,0x3 JNZ 0x0011de78 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011de0a MOV EBP,EAX JMP 0x0011de2d LAB_0011de78: MOV RSI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [R14 + 0x10] MOV R8,qword ptr [R14 + 0x18] MOV qword ptr [RSP],R14 PUSH 0x1 POP R9 MOV RDI,RBX CALL 0x0011cd8e CMP EDX,0x6 JZ 0x0011ded3 MOV RDI,RBX MOV RSI,RAX CALL 0x0011cdfa MOV EBP,EAX MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011de0a TEST EAX,EAX JS 0x0011ded3 CMP EBP,EAX JZ 0x0011de2d LEA RSI,[0x186e06] MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d LAB_0011ded3: MOV EBP,R15D JMP 0x0011de2d
uint JS_IsExtensible(int8 param_1,long param_2,int8 param_3) { uint uVar1; int8 *puVar2; uint uVar3; int1 auVar4 [12]; int8 local_30; int8 local_28; if ((int)param_3 == -1) { if (*(short *)(param_2 + 6) == 0x30) { puVar2 = (int8 *)get_proxy_method(param_1,&local_30,param_2,param_3,0x62); if (puVar2 != (int8 *)0x0) { if ((int)local_28 == 3) { uVar3 = JS_IsExtensible(param_1,*puVar2,puVar2[1]); return uVar3; } auVar4 = JS_CallFree(param_1,local_30,local_28,puVar2[2],puVar2[3],1,puVar2); if (auVar4._8_4_ != 6) { uVar3 = JS_ToBoolFree(param_1,auVar4._0_8_); uVar1 = JS_IsExtensible(param_1,*puVar2,puVar2[1]); if (-1 < (int)uVar1) { if (uVar3 == uVar1) { return uVar3; } JS_ThrowTypeError(param_1,"proxy: inconsistent isExtensible"); } } } uVar3 = 0xffffffff; } else { uVar3 = *(byte *)(param_2 + 5) & 1; } } else { uVar3 = 0; } return uVar3; }
38,857
aimrt::channel::ContextRef::CheckUsed() const
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_module_cpp_interface/../aimrt_module_cpp_interface/channel/channel_context.h
bool CheckUsed() const { AIMRT_ASSERT(base_ptr_ && base_ptr_->ops, "Reference is null."); return base_ptr_->ops->check_used(base_ptr_->impl); }
O0
c
aimrt::channel::ContextRef::CheckUsed() const: subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x68(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax cmpq $0x0, (%rax) je 0xf25a3 movq 0x20(%rsp), %rax movq (%rax), %rax cmpq $0x0, (%rax) jne 0xf276e movb $0x1, 0x2b(%rsp) movl $0x28, %edi callq 0x89b90 movq %rax, 0x8(%rsp) leaq 0xbb708(%rip), %rax # 0x1adcc6 movq %rax, 0x38(%rsp) movq $0x12, 0x40(%rsp) movq 0x38(%rsp), %rcx movq 0x40(%rsp), %rax leaq 0x48(%rsp), %rdx movq %rdx, 0xb0(%rsp) movq %rcx, 0xa0(%rsp) movq %rax, 0xa8(%rsp) leaq 0xa0(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xb8(%rsp), %rax movups (%rax), %xmm0 movaps %xmm0, 0xc0(%rsp) movq 0xc0(%rsp), %rcx movq 0xc8(%rsp), %rax movq %rcx, 0x90(%rsp) movq %rax, 0x98(%rsp) callq 0xa0490 movq %rdx, 0x10(%rsp) movq %rax, 0x18(%rsp) jmp 0xf2647 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x70(%rsp) movq %rax, 0x78(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0xe0(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0xe0(%rsp), %rcx movq 0xd8(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x100(%rsp), %rax movq %rcx, 0xf8(%rsp) movq $0x0, 0xf0(%rsp) movq %rax, 0xe8(%rsp) movq 0xf8(%rsp), %rax movq 0xf0(%rsp), %rcx movq %rcx, (%rax) movq 0xe8(%rsp), %rcx movq %rcx, 0x8(%rax) movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx movq 0x80(%rsp), %rcx movq 0x88(%rsp), %r8 leaq 0x48(%rsp), %rdi callq 0xa0350 jmp 0xf26ff jmp 0xf2701 movq 0x8(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x9ac10 jmp 0xf2712 movq 0x8(%rsp), %rdi movb $0x0, 0x2b(%rsp) leaq 0x11f0d5(%rip), %rsi # 0x2117f8 leaq -0x57aca(%rip), %rdx # 0x9ac60 callq 0x92530 jmp 0xf279b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xf2759 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x48(%rsp), %rdi callq 0x94218 testb $0x1, 0x2b(%rsp) jne 0xf2762 jmp 0xf276c movq 0x8(%rsp), %rdi callq 0x8b4e0 jmp 0xf2791 jmp 0xf2770 movq 0x20(%rsp), %rcx movq (%rcx), %rax movq (%rax), %rax movq (%rax), %rax movq (%rcx), %rcx movq 0x8(%rcx), %rdi callq *%rax andb $0x1, %al addq $0x108, %rsp # imm = 0x108 retq movq 0x30(%rsp), %rdi callq 0x92a70 nopl (%rax,%rax)
_ZNK5aimrt7channel10ContextRef9CheckUsedEv: sub rsp, 108h mov [rsp+108h+var_A0], rdi mov rax, [rsp+108h+var_A0] mov [rsp+108h+var_E8], rax mov rax, [rsp+108h+var_E8] cmp qword ptr [rax], 0 jz short loc_F25A3 mov rax, [rsp+108h+var_E8] mov rax, [rax] cmp qword ptr [rax], 0 jnz loc_F276E loc_F25A3: mov [rsp+108h+var_DD], 1 mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov [rsp+108h+var_100], rax lea rax, aReferenceIsNul; "Reference is null." mov [rsp+108h+var_D0], rax mov [rsp+108h+var_C8], 12h mov rcx, [rsp+108h+var_D0] mov rax, [rsp+108h+var_C8] lea rdx, [rsp+108h+var_C0] mov [rsp+108h+var_58], rdx mov [rsp+108h+var_68], rcx mov [rsp+108h+var_60], rax lea rax, [rsp+108h+var_68] mov [rsp+108h+var_50], rax mov rax, [rsp+108h+var_50] movups xmm0, xmmword ptr [rax] movaps [rsp+108h+var_48], xmm0 mov rcx, qword ptr [rsp+108h+var_48] mov rax, qword ptr [rsp+108h+var_48+8] mov [rsp+108h+var_78], rcx mov [rsp+108h+var_70], rax call _ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRS9_ mov [rsp+108h+var_F8], rdx mov [rsp+108h+var_F0], rax jmp short $+2 loc_F2647: mov rax, [rsp+108h+var_F8] mov rcx, [rsp+108h+var_F0] mov [rsp+108h+var_98], rcx mov [rsp+108h+var_90], rax lea rax, [rsp+108h+var_88] mov [rsp+108h+var_28], rax lea rax, [rsp+108h+var_98] mov [rsp+108h+var_30], rax mov rcx, [rsp+108h+var_28] mov rax, [rsp+108h+var_30] mov [rsp+108h+var_8], rax mov rax, [rsp+108h+var_8] mov [rsp+108h+var_10], rcx mov [rsp+108h+var_18], 0 mov [rsp+108h+var_20], rax mov rax, [rsp+108h+var_10] mov rcx, [rsp+108h+var_18] mov [rax], rcx mov rcx, [rsp+108h+var_20] mov [rax+8], rcx mov rsi, [rsp+108h+var_78] mov rdx, [rsp+108h+var_70] mov rcx, [rsp+108h+var_88] mov r8, [rsp+108h+var_80] lea rdi, [rsp+108h+var_C0] call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) jmp short $+2 loc_F26FF: jmp short $+2 loc_F2701: mov rdi, [rsp+108h+var_100] lea rsi, [rsp+108h+var_C0] call _ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_ jmp short $+2 loc_F2712: mov rdi, [rsp+108h+var_100]; void * mov [rsp+108h+var_DD], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_F279B mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_F2759 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_40]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F2759: test [rsp+arg_23], 1 jnz short loc_F2762 jmp short loc_F276C loc_F2762: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_F276C: jmp short loc_F2791 loc_F276E: jmp short $+2 loc_F2770: mov rcx, [rsp+108h+var_E8] mov rax, [rcx] mov rax, [rax] mov rax, [rax] mov rcx, [rcx] mov rdi, [rcx+8] call rax and al, 1 add rsp, 108h retn loc_F2791: mov rdi, [rsp+arg_28] call __Unwind_Resume loc_F279B: nop dword ptr [rax+rax+00h]
char aimrt::channel::ContextRef::CheckUsed(aimrt::channel::ContextRef *this) { long long v1; // rdx std::exception *exception; // [rsp+8h] [rbp-100h] _BYTE v4[32]; // [rsp+48h] [rbp-C0h] BYREF aimrt::channel::ContextRef *v5; // [rsp+68h] [rbp-A0h] _QWORD v6[2]; // [rsp+70h] [rbp-98h] BYREF _QWORD v7[2]; // [rsp+80h] [rbp-88h] BYREF __int128 v8; // [rsp+90h] [rbp-78h] __int128 v9; // [rsp+A0h] [rbp-68h] BYREF _BYTE *v10; // [rsp+B0h] [rbp-58h] __int128 *v11; // [rsp+B8h] [rbp-50h] __int128 v12; // [rsp+C0h] [rbp-48h] _QWORD *v13; // [rsp+D8h] [rbp-30h] _QWORD *v14; // [rsp+E0h] [rbp-28h] _QWORD *v15; // [rsp+E8h] [rbp-20h] long long v16; // [rsp+F0h] [rbp-18h] _QWORD *v17; // [rsp+F8h] [rbp-10h] _QWORD *v18; // [rsp+100h] [rbp-8h] v5 = this; if ( !*(_QWORD *)this || !**(_QWORD **)this ) { exception = (std::exception *)__cxa_allocate_exception(0x28uLL); v10 = v4; *(_QWORD *)&v9 = "Reference is null."; *((_QWORD *)&v9 + 1) = 18LL; v11 = &v9; v12 = v9; v8 = v9; v6[0] = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>(); v6[1] = v1; v14 = v7; v13 = v6; v18 = v6; v17 = v7; v16 = 0LL; v15 = v6; v7[0] = 0LL; v7[1] = v6; fmt::v10::vformat[abi:cxx11]((long long)v4, v8, *((long long *)&v8 + 1), 0LL, (long long)v6); ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_( exception, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } return (***(long long ( ****)(_QWORD))this)(*(_QWORD *)(*(_QWORD *)this + 8LL)) & 1; }
CheckUsed: SUB RSP,0x108 MOV qword ptr [RSP + 0x68],RDI MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],0x0 JZ 0x001f25a3 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX],0x0 JNZ 0x001f276e LAB_001f25a3: MOV byte ptr [RSP + 0x2b],0x1 MOV EDI,0x28 CALL 0x00189b90 MOV qword ptr [RSP + 0x8],RAX LEA RAX,[0x2adcc6] MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],0x12 MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x40] LEA RDX,[RSP + 0x48] MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0xa8],RAX LEA RAX,[RSP + 0xa0] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + 0xc0],XMM0 MOV RCX,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RSP + 0xc8] MOV qword ptr [RSP + 0x90],RCX MOV qword ptr [RSP + 0x98],RAX LAB_001f2636: CALL 0x001a0490 MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x18],RAX JMP 0x001f2647 LAB_001f2647: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x70],RCX MOV qword ptr [RSP + 0x78],RAX LEA RAX,[RSP + 0x80] MOV qword ptr [RSP + 0xe0],RAX LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0xd8],RAX MOV RCX,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x100],RAX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0xf8],RCX MOV qword ptr [RSP + 0xf0],0x0 MOV qword ptr [RSP + 0xe8],RAX MOV RAX,qword ptr [RSP + 0xf8] MOV RCX,qword ptr [RSP + 0xf0] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0xe8] MOV qword ptr [RAX + 0x8],RCX MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0x80] MOV R8,qword ptr [RSP + 0x88] LEA RDI,[RSP + 0x48] CALL 0x001a0350 JMP 0x001f26ff LAB_001f26ff: JMP 0x001f2701 LAB_001f2701: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x48] CALL 0x0019ac10 JMP 0x001f2712 LAB_001f2712: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2b],0x0 LEA RSI,[0x3117f8] LEA RDX,[0x19ac60] CALL 0x00192530 LAB_001f276e: JMP 0x001f2770 LAB_001f2770: MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RCX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x8] CALL RAX AND AL,0x1 ADD RSP,0x108 RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ /* aimrt::channel::ContextRef::CheckUsed() const */ ulong __thiscall aimrt::channel::ContextRef::CheckUsed(ContextRef *this) { int8 uVar1; ulong uVar2; int1 local_c0 [32]; ContextRef *local_a0; int1 local_98 [16]; int1 local_88 [16]; char *local_78; int8 local_70; char *local_68; int8 uStack_60; int1 *local_58; char **local_50; char *local_48; int8 uStack_40; int1 *local_30; int1 *local_28; int1 *local_20; int8 local_18; int1 *local_10; int1 *local_8; local_a0 = this; if ((*(long *)this != 0) && (**(long **)this != 0)) { uVar2 = (**(code **)**(int8 **)this)(*(int8 *)(*(long *)this + 8)); return uVar2 & 0xffffffffffffff01; } uVar1 = __cxa_allocate_exception(0x28); local_58 = local_c0; local_68 = "Reference is null."; uStack_60 = 0x12; local_50 = &local_68; local_78 = "Reference is null."; local_70 = 0x12; local_48 = local_78; uStack_40 = local_70; /* try { // try from 001f2636 to 001f26fc has its CatchHandler @ 001f2731 */ local_98 = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>(); local_28 = local_88; local_30 = local_98; local_18 = 0; local_20 = local_30; local_10 = local_28; local_8 = local_30; fmt::v10::vformat_abi_cxx11_(local_c0,local_78,local_70,0,local_30); /* try { // try from 001f2701 to 001f272e has its CatchHandler @ 001f2741 */ _ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_ (uVar1,local_c0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); }
38,858
ft_init_boolean_search
eloqsql/storage/myisam/ft_boolean_search.c
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query, uint query_len, CHARSET_INFO *cs) { FTB *ftb; FTB_EXPR *ftbe; FTB_WORD *ftbw; if (!(ftb=(FTB *)my_malloc(mi_key_memory_FTB, sizeof(FTB), MYF(MY_WME)))) return 0; ftb->please= (struct _ft_vft *) & _ft_vft_boolean; ftb->state=UNINITIALIZED; ftb->info=info; ftb->keynr=keynr; ftb->charset=cs; DBUG_ASSERT(keynr==NO_SUCH_KEY || cs == info->s->keyinfo[keynr].seg->charset); ftb->with_scan=0; ftb->lastpos=HA_OFFSET_ERROR; bzero(& ftb->no_dupes, sizeof(TREE)); ftb->last_word= 0; init_alloc_root(mi_key_memory_FTB, &ftb->mem_root, 1024, 1024, MYF(0)); ftb->queue.max_elements= 0; if (!(ftbe=(FTB_EXPR *)alloc_root(&ftb->mem_root, sizeof(FTB_EXPR)))) goto err; ftbe->weight=1; ftbe->flags=FTB_FLAG_YES; ftbe->nos=1; ftbe->up=0; ftbe->max_docid= ftbe->ythresh= ftbe->yweaks= 0; ftbe->docid[0]=ftbe->docid[1]=HA_OFFSET_ERROR; ftbe->phrase= NULL; ftbe->document= 0; ftb->root=ftbe; if (unlikely(_ftb_parse_query(ftb, query, query_len, keynr == NO_SUCH_KEY ? &ft_default_parser : info->s->keyinfo[keynr].parser))) goto err; /* Hack: instead of init_queue, we'll use reinit queue to be able to alloc queue with alloc_root() */ if (! (ftb->queue.root= (uchar **)alloc_root(&ftb->mem_root, (ftb->queue.max_elements + 1) * sizeof(void *)))) goto err; reinit_queue(&ftb->queue, ftb->queue.max_elements, 0, 0, (int (*)(void*, uchar*, uchar*))FTB_WORD_cmp, 0, 0, 0); for (ftbw= ftb->last_word; ftbw; ftbw= ftbw->prev) queue_insert(&ftb->queue, (uchar *)ftbw); ftb->list=(FTB_WORD **)alloc_root(&ftb->mem_root, sizeof(FTB_WORD *)*ftb->queue.elements); memcpy(ftb->list, &queue_top(&ftb->queue), sizeof(FTB_WORD *)*ftb->queue.elements); my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *), (qsort2_cmp)FTB_WORD_cmp_list, (void*)ftb->charset); if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC; ftb->state=READY; return ftb; err: free_root(& ftb->mem_root, MYF(0)); my_free(ftb); return 0; }
O3
c
ft_init_boolean_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movl %ecx, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movl %esi, %r13d movq %rdi, %r15 leaq 0xb8e000(%rip), %r12 # 0xbff97c movl (%r12), %edi movl $0x350, %esi # imm = 0x350 movl $0x10, %edx callq 0x9fdb1 xorl %ecx, %ecx testq %rax, %rax je 0x71b83 movq %rax, %rbx leaq 0x309a94(%rip), %rax # 0x37b438 movq %rax, (%rbx) movl %ecx, 0x348(%rbx) movq %r15, 0x8(%rbx) movl %r13d, 0x340(%rbx) movq %r14, 0x10(%rbx) movb $0x0, 0x344(%rbx) movq $-0x1, 0x338(%rbx) leaq 0xa0(%rbx), %rdi movl $0x298, %edx # imm = 0x298 xorl %esi, %esi callq 0x292c0 movq $0x0, 0x28(%rbx) movl (%r12), %edi leaq 0x30(%rbx), %r14 movl $0x400, %edx # imm = 0x400 movl $0x400, %ecx # imm = 0x400 movq %r14, %rsi xorl %r8d, %r8d callq 0x9cb44 xorl %eax, %eax movl %eax, 0x84(%rbx) movl $0x50, %esi movq %r14, %rdi callq 0x9cc9b testq %rax, %rax je 0x71b71 movl $0x3f800000, 0x28(%rax) # imm = 0x3F800000 movl $0x2, 0x8(%rax) movl $0x1, 0x44(%rax) xorl %ecx, %ecx movq %rcx, (%rax) movq %rcx, 0x48(%rax) movq %rcx, 0x20(%rax) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x10(%rax) pxor %xmm0, %xmm0 movdqu %xmm0, 0x30(%rax) movq %rax, 0x18(%rbx) cmpl $-0x1, %r13d je 0x71a7a movq (%r15), %rax movq 0x218(%rax), %rax movl %r13d, %ecx imulq $0x70, %rcx, %rcx movq 0x38(%rax,%rcx), %r15 jmp 0x71a81 leaq 0x31387f(%rip), %r15 # 0x385300 cmpl $0x0, 0x348(%rbx) jne 0x71b0e movq 0x8(%rbx), %rdi movl 0x340(%rbx), %esi xorl %edx, %edx callq 0x73f1d testq %rax, %rax je 0x71b71 leaq -0x58(%rbp), %rcx movq %rbx, (%rcx) movl $0x0, 0x18(%rcx) movq 0x18(%rbx), %rdx movq %rdx, 0x8(%rcx) movq $0x0, 0x10(%rcx) leaq 0xc93(%rip), %rdx # 0x72760 movq %rdx, (%rax) leaq 0xd1e(%rip), %rdx # 0x727f5 movq %rdx, 0x8(%rax) movq %rcx, 0x18(%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x20(%rax) movq -0x38(%rbp), %rcx movq %rcx, 0x28(%rax) movl -0x2c(%rbp), %ecx movl %ecx, 0x30(%rax) movabsq $0x200000000, %rcx # imm = 0x200000000 movq %rcx, 0x34(%rax) movq %rax, %rdi callq *0x8(%r15) testl %eax, %eax jne 0x71b71 movl 0x84(%rbx), %esi incl %esi shlq $0x3, %rsi movq %r14, %rdi callq 0x9cc9b movq %rax, 0x70(%rbx) testq %rax, %rax je 0x71b71 movq %rbx, %r15 addq $0x70, %r15 movl 0x84(%rbx), %esi xorl %eax, %eax leaq 0xc1(%rip), %r8 # 0x71c02 movq %r15, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r9d, %r9d pushq %rax pushq %rax callq 0xa20e3 addq $0x10, %rsp movq 0x28(%rbx), %r12 testq %r12, %r12 je 0x71b87 movq %r15, %rdi movq %r12, %rsi callq 0xa2197 movq 0x38(%r12), %r12 jmp 0x71b5a movq %r14, %rdi xorl %esi, %esi callq 0x9cf13 movq %rbx, %rdi callq 0x9ffde xorl %ebx, %ebx jmp 0x71bf0 movl 0x80(%rbx), %esi shlq $0x3, %rsi movq %r14, %rdi callq 0x9cc9b movq %rax, 0x20(%rbx) movq 0x70(%rbx), %rsi addq $0x8, %rsi movl 0x80(%rbx), %edx shlq $0x3, %rdx movq %rax, %rdi callq 0x29080 movq 0x10(%rbx), %r8 movq 0x20(%rbx), %rdi movl 0x80(%rbx), %esi leaq 0x72(%rip), %rcx # 0x71c3e movl $0x8, %edx callq 0x9bf30 cmpl $0x1, 0x80(%rbx) ja 0x71be6 andb $-0x2, 0x344(%rbx) movl $0x1, 0x348(%rbx) movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ft_init_boolean_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov [rbp+var_2C], ecx mov [rbp+var_38], rdx mov r13d, esi mov r15, rdi lea r12, mi_key_memory_FTB mov edi, [r12] mov esi, 350h mov edx, 10h call my_malloc xor ecx, ecx test rax, rax jz loc_71B83 mov rbx, rax lea rax, _ft_vft_boolean mov [rbx], rax mov [rbx+348h], ecx mov [rbx+8], r15 mov [rbx+340h], r13d mov [rbx+10h], r14 mov byte ptr [rbx+344h], 0 mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh lea rdi, [rbx+0A0h] mov edx, 298h xor esi, esi call _memset mov qword ptr [rbx+28h], 0 mov edi, [r12] lea r14, [rbx+30h] mov edx, 400h mov ecx, 400h mov rsi, r14 xor r8d, r8d call init_alloc_root xor eax, eax mov [rbx+84h], eax mov esi, 50h ; 'P' mov rdi, r14 call alloc_root test rax, rax jz loc_71B71 mov dword ptr [rax+28h], 3F800000h mov dword ptr [rax+8], 2 mov dword ptr [rax+44h], 1 xor ecx, ecx mov [rax], rcx mov [rax+48h], rcx mov [rax+20h], rcx pcmpeqd xmm0, xmm0 movdqu xmmword ptr [rax+10h], xmm0 pxor xmm0, xmm0 movdqu xmmword ptr [rax+30h], xmm0 mov [rbx+18h], rax cmp r13d, 0FFFFFFFFh jz short loc_71A7A mov rax, [r15] mov rax, [rax+218h] mov ecx, r13d imul rcx, 70h ; 'p' mov r15, [rax+rcx+38h] jmp short loc_71A81 loc_71A7A: lea r15, ft_default_parser loc_71A81: cmp dword ptr [rbx+348h], 0 jnz loc_71B0E mov rdi, [rbx+8] mov esi, [rbx+340h] xor edx, edx call ftparser_call_initializer test rax, rax jz loc_71B71 lea rcx, [rbp+var_58] mov [rcx], rbx mov dword ptr [rcx+18h], 0 mov rdx, [rbx+18h] mov [rcx+8], rdx mov qword ptr [rcx+10h], 0 lea rdx, ftb_parse_query_internal mov [rax], rdx lea rdx, ftb_query_add_word mov [rax+8], rdx mov [rax+18h], rcx mov rcx, [rbx+10h] mov [rax+20h], rcx mov rcx, [rbp+var_38] mov [rax+28h], rcx mov ecx, [rbp+var_2C] mov [rax+30h], ecx mov rcx, 200000000h mov [rax+34h], rcx mov rdi, rax call qword ptr [r15+8] test eax, eax jnz short loc_71B71 loc_71B0E: mov esi, [rbx+84h] inc esi shl rsi, 3 mov rdi, r14 call alloc_root mov [rbx+70h], rax test rax, rax jz short loc_71B71 mov r15, rbx add r15, 70h ; 'p' mov esi, [rbx+84h] xor eax, eax lea r8, FTB_WORD_cmp mov rdi, r15 xor edx, edx xor ecx, ecx xor r9d, r9d push rax push rax call reinit_queue add rsp, 10h mov r12, [rbx+28h] loc_71B5A: test r12, r12 jz short loc_71B87 mov rdi, r15 mov rsi, r12 call queue_insert mov r12, [r12+38h] jmp short loc_71B5A loc_71B71: mov rdi, r14 xor esi, esi call free_root mov rdi, rbx call my_free loc_71B83: xor ebx, ebx jmp short loc_71BF0 loc_71B87: mov esi, [rbx+80h] shl rsi, 3 mov rdi, r14 call alloc_root mov [rbx+20h], rax mov rsi, [rbx+70h] add rsi, 8 mov edx, [rbx+80h] shl rdx, 3 mov rdi, rax call _memcpy mov r8, [rbx+10h] mov rdi, [rbx+20h] mov esi, [rbx+80h] lea rcx, FTB_WORD_cmp_list mov edx, 8 call my_qsort2 cmp dword ptr [rbx+80h], 1 ja short loc_71BE6 and byte ptr [rbx+344h], 0FEh loc_71BE6: mov dword ptr [rbx+348h], 1 loc_71BF0: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ft_init_boolean_search(long long a1, unsigned int a2, long long a3, int a4, long long a5) { long long v6; // rax long long v7; // rbx long long v8; // rax unsigned int ( **v9)(long long); // r15 long long v10; // rax long long v11; // rax long long i; // r12 long long v13; // rax _QWORD v15[3]; // [rsp+8h] [rbp-58h] BYREF int v16; // [rsp+20h] [rbp-40h] long long v17; // [rsp+28h] [rbp-38h] int v18; // [rsp+34h] [rbp-2Ch] v18 = a4; v17 = a3; v6 = my_malloc(mi_key_memory_FTB, 848LL, 16LL); if ( !v6 ) return 0LL; v7 = v6; *(_QWORD *)v6 = ft_vft_boolean; *(_DWORD *)(v6 + 840) = 0; *(_QWORD *)(v6 + 8) = a1; *(_DWORD *)(v6 + 832) = a2; *(_QWORD *)(v6 + 16) = a5; *(_BYTE *)(v6 + 836) = 0; *(_QWORD *)(v6 + 824) = -1LL; memset(v6 + 160, 0LL, 664LL); *(_QWORD *)(v7 + 40) = 0LL; init_alloc_root(mi_key_memory_FTB, v7 + 48, 1024LL, 1024LL, 0LL); *(_DWORD *)(v7 + 132) = 0; v8 = alloc_root(v7 + 48, 80LL); if ( !v8 ) goto LABEL_13; *(_DWORD *)(v8 + 40) = 1065353216; *(_DWORD *)(v8 + 8) = 2; *(_DWORD *)(v8 + 68) = 1; *(_QWORD *)v8 = 0LL; *(_QWORD *)(v8 + 72) = 0LL; *(_QWORD *)(v8 + 32) = 0LL; *(_OWORD *)(v8 + 16) = -1LL; *(_OWORD *)(v8 + 48) = 0LL; *(_QWORD *)(v7 + 24) = v8; v9 = a2 == -1 ? (unsigned int ( **)(long long))&ft_default_parser : *(unsigned int ( ***)(long long))(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2 + 56); if ( !*(_DWORD *)(v7 + 840) ) { v10 = ftparser_call_initializer(*(_QWORD *)(v7 + 8), *(unsigned int *)(v7 + 832), 0LL, 0.0); if ( !v10 ) goto LABEL_13; v15[0] = v7; v16 = 0; v15[1] = *(_QWORD *)(v7 + 24); v15[2] = 0LL; *(_QWORD *)v10 = ftb_parse_query_internal; *(_QWORD *)(v10 + 8) = ftb_query_add_word; *(_QWORD *)(v10 + 24) = v15; *(_QWORD *)(v10 + 32) = *(_QWORD *)(v7 + 16); *(_QWORD *)(v10 + 40) = v17; *(_DWORD *)(v10 + 48) = v18; *(_QWORD *)(v10 + 52) = 0x200000000LL; if ( v9[1](v10) ) goto LABEL_13; } v11 = alloc_root(v7 + 48, 8LL * (unsigned int)(*(_DWORD *)(v7 + 132) + 1)); *(_QWORD *)(v7 + 112) = v11; if ( !v11 ) { LABEL_13: free_root(v7 + 48, 0LL); my_free(v7); return 0LL; } reinit_queue(v7 + 112, *(_DWORD *)(v7 + 132), 0, 0, (unsigned int)FTB_WORD_cmp, 0, 0, 0); for ( i = *(_QWORD *)(v7 + 40); i; i = *(_QWORD *)(i + 56) ) queue_insert(v7 + 112, i); v13 = alloc_root(v7 + 48, 8LL * *(unsigned int *)(v7 + 128)); *(_QWORD *)(v7 + 32) = v13; memcpy(v13, *(_QWORD *)(v7 + 112) + 8LL, 8LL * *(unsigned int *)(v7 + 128)); my_qsort2(*(_QWORD *)(v7 + 32), *(unsigned int *)(v7 + 128), 8LL, FTB_WORD_cmp_list, *(_QWORD *)(v7 + 16)); if ( *(_DWORD *)(v7 + 128) <= 1u ) *(_BYTE *)(v7 + 836) &= ~1u; *(_DWORD *)(v7 + 840) = 1; return v7; }
ft_init_boolean_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV dword ptr [RBP + -0x2c],ECX MOV qword ptr [RBP + -0x38],RDX MOV R13D,ESI MOV R15,RDI LEA R12,[0xcff97c] MOV EDI,dword ptr [R12] MOV ESI,0x350 MOV EDX,0x10 CALL 0x0019fdb1 XOR ECX,ECX TEST RAX,RAX JZ 0x00171b83 MOV RBX,RAX LEA RAX,[0x47b438] MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x348],ECX MOV qword ptr [RBX + 0x8],R15 MOV dword ptr [RBX + 0x340],R13D MOV qword ptr [RBX + 0x10],R14 MOV byte ptr [RBX + 0x344],0x0 MOV qword ptr [RBX + 0x338],-0x1 LEA RDI,[RBX + 0xa0] MOV EDX,0x298 XOR ESI,ESI CALL 0x001292c0 MOV qword ptr [RBX + 0x28],0x0 MOV EDI,dword ptr [R12] LEA R14,[RBX + 0x30] MOV EDX,0x400 MOV ECX,0x400 MOV RSI,R14 XOR R8D,R8D CALL 0x0019cb44 XOR EAX,EAX MOV dword ptr [RBX + 0x84],EAX MOV ESI,0x50 MOV RDI,R14 CALL 0x0019cc9b TEST RAX,RAX JZ 0x00171b71 MOV dword ptr [RAX + 0x28],0x3f800000 MOV dword ptr [RAX + 0x8],0x2 MOV dword ptr [RAX + 0x44],0x1 XOR ECX,ECX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x48],RCX MOV qword ptr [RAX + 0x20],RCX PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x10],XMM0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x30],XMM0 MOV qword ptr [RBX + 0x18],RAX CMP R13D,-0x1 JZ 0x00171a7a MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,R13D IMUL RCX,RCX,0x70 MOV R15,qword ptr [RAX + RCX*0x1 + 0x38] JMP 0x00171a81 LAB_00171a7a: LEA R15,[0x485300] LAB_00171a81: CMP dword ptr [RBX + 0x348],0x0 JNZ 0x00171b0e MOV RDI,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RBX + 0x340] XOR EDX,EDX CALL 0x00173f1d TEST RAX,RAX JZ 0x00171b71 LEA RCX,[RBP + -0x58] MOV qword ptr [RCX],RBX MOV dword ptr [RCX + 0x18],0x0 MOV RDX,qword ptr [RBX + 0x18] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RCX + 0x10],0x0 LEA RDX,[0x172760] MOV qword ptr [RAX],RDX LEA RDX,[0x1727f5] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + 0x30],ECX MOV RCX,0x200000000 MOV qword ptr [RAX + 0x34],RCX MOV RDI,RAX CALL qword ptr [R15 + 0x8] TEST EAX,EAX JNZ 0x00171b71 LAB_00171b0e: MOV ESI,dword ptr [RBX + 0x84] INC ESI SHL RSI,0x3 MOV RDI,R14 CALL 0x0019cc9b MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x00171b71 MOV R15,RBX ADD R15,0x70 MOV ESI,dword ptr [RBX + 0x84] XOR EAX,EAX LEA R8,[0x171c02] MOV RDI,R15 XOR EDX,EDX XOR ECX,ECX XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x001a20e3 ADD RSP,0x10 MOV R12,qword ptr [RBX + 0x28] LAB_00171b5a: TEST R12,R12 JZ 0x00171b87 MOV RDI,R15 MOV RSI,R12 CALL 0x001a2197 MOV R12,qword ptr [R12 + 0x38] JMP 0x00171b5a LAB_00171b71: MOV RDI,R14 XOR ESI,ESI CALL 0x0019cf13 MOV RDI,RBX CALL 0x0019ffde LAB_00171b83: XOR EBX,EBX JMP 0x00171bf0 LAB_00171b87: MOV ESI,dword ptr [RBX + 0x80] SHL RSI,0x3 MOV RDI,R14 CALL 0x0019cc9b MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RBX + 0x70] ADD RSI,0x8 MOV EDX,dword ptr [RBX + 0x80] SHL RDX,0x3 MOV RDI,RAX CALL 0x00129080 MOV R8,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0x20] MOV ESI,dword ptr [RBX + 0x80] LEA RCX,[0x171c3e] MOV EDX,0x8 CALL 0x0019bf30 CMP dword ptr [RBX + 0x80],0x1 JA 0x00171be6 AND byte ptr [RBX + 0x344],0xfe LAB_00171be6: MOV dword ptr [RBX + 0x348],0x1 LAB_00171bf0: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * ft_init_boolean_search (long *param_1,uint param_2,int8 param_3,int4 param_4,int8 param_5) { int8 *puVar1; int iVar2; int8 *puVar3; int8 *puVar4; long lVar5; void *__dest; int1 *puVar6; int8 *local_60; int8 local_58; int8 local_50; int4 local_48; int8 local_40; int4 local_34; local_40 = param_3; local_34 = param_4; puVar3 = (int8 *)my_malloc(mi_key_memory_FTB,0x350,0x10); if (puVar3 == (int8 *)0x0) { return (int8 *)0x0; } *puVar3 = _ft_vft_boolean; *(int4 *)(puVar3 + 0x69) = 0; puVar3[1] = param_1; *(uint *)(puVar3 + 0x68) = param_2; puVar3[2] = param_5; *(int1 *)((long)puVar3 + 0x344) = 0; puVar3[0x67] = 0xffffffffffffffff; memset(puVar3 + 0x14,0,0x298); puVar3[5] = 0; puVar1 = puVar3 + 6; init_alloc_root(mi_key_memory_FTB,puVar1,0x400,0x400,0); *(int4 *)((long)puVar3 + 0x84) = 0; puVar4 = (int8 *)alloc_root(puVar1,0x50); if (puVar4 == (int8 *)0x0) goto LAB_00171b71; *(int4 *)(puVar4 + 5) = 0x3f800000; *(int4 *)(puVar4 + 1) = 2; *(int4 *)((long)puVar4 + 0x44) = 1; *puVar4 = 0; puVar4[9] = 0; puVar4[4] = 0; *(int4 *)(puVar4 + 2) = 0xffffffff; *(int4 *)((long)puVar4 + 0x14) = 0xffffffff; *(int4 *)(puVar4 + 3) = 0xffffffff; *(int4 *)((long)puVar4 + 0x1c) = 0xffffffff; *(int1 (*) [16])(puVar4 + 6) = (int1 [16])0x0; puVar3[3] = puVar4; if (param_2 == 0xffffffff) { puVar6 = ft_default_parser; } else { puVar6 = *(int1 **)(*(long *)(*param_1 + 0x218) + 0x38 + (ulong)param_2 * 0x70); } if (*(int *)(puVar3 + 0x69) == 0) { puVar4 = (int8 *)ftparser_call_initializer(puVar3[1],*(int4 *)(puVar3 + 0x68),0); if (puVar4 == (int8 *)0x0) goto LAB_00171b71; local_48 = 0; local_58 = puVar3[3]; local_50 = 0; *puVar4 = ftb_parse_query_internal; puVar4[1] = ftb_query_add_word; puVar4[3] = &local_60; puVar4[4] = puVar3[2]; puVar4[5] = local_40; *(int4 *)(puVar4 + 6) = local_34; *(int8 *)((long)puVar4 + 0x34) = 0x200000000; local_60 = puVar3; iVar2 = (**(code **)(puVar6 + 8))(puVar4); if (iVar2 != 0) goto LAB_00171b71; } lVar5 = alloc_root(puVar1,(ulong)(*(int *)((long)puVar3 + 0x84) + 1) << 3); puVar3[0xe] = lVar5; if (lVar5 != 0) { reinit_queue(puVar3 + 0xe,*(int4 *)((long)puVar3 + 0x84),0,0,FTB_WORD_cmp,0,0,0); for (lVar5 = puVar3[5]; lVar5 != 0; lVar5 = *(long *)(lVar5 + 0x38)) { queue_insert(puVar3 + 0xe,lVar5); } __dest = (void *)alloc_root(puVar1,(ulong)*(uint *)(puVar3 + 0x10) << 3); puVar3[4] = __dest; memcpy(__dest,(void *)(puVar3[0xe] + 8),(ulong)*(uint *)(puVar3 + 0x10) << 3); my_qsort2(puVar3[4],*(int4 *)(puVar3 + 0x10),8,FTB_WORD_cmp_list,puVar3[2]); if (*(uint *)(puVar3 + 0x10) < 2) { *(byte *)((long)puVar3 + 0x344) = *(byte *)((long)puVar3 + 0x344) & 0xfe; } *(int4 *)(puVar3 + 0x69) = 1; return puVar3; } LAB_00171b71: free_root(puVar1,0); my_free(puVar3); return (int8 *)0x0; }
38,859
my_message_stderr
eloqsql/mysys/my_mess.c
void my_message_stderr(uint error __attribute__((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); DBUG_PRINT("enter",("message: %s",str)); (void) fflush(stdout); if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY)) DBUG_VOID_RETURN; if (MyFlags & ME_BELL) (void) fputc('\007', stderr); if (my_progname) { (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); } (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); DBUG_VOID_RETURN; }
O3
c
my_message_stderr: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %rbx movq 0x2d1958(%rip), %rax # 0x316f98 movq (%rax), %rdi callq 0x263e0 testl $0x480, %r14d # imm = 0x480 je 0x45656 popq %rbx popq %r14 popq %rbp retq testb $0x4, %r14b je 0x45670 movq 0x2d196d(%rip), %rax # 0x316fd0 movq (%rax), %rsi movl $0x7, %edi callq 0x26450 leaq 0x38b819(%rip), %rax # 0x3d0e90 movq (%rax), %rdi testq %rdi, %rdi je 0x45684 callq 0x2b589 movq 0x2d1945(%rip), %r14 # 0x316fd0 movq (%r14), %rsi movq %rbx, %rdi callq 0x263b0 movq (%r14), %rsi movl $0xa, %edi callq 0x26450 movq (%r14), %rdi popq %rbx popq %r14 popq %rbp jmp 0x263e0 nop
my_message_stderr: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rsi mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush test r14d, 480h jz short loc_45656 pop rbx pop r14 pop rbp retn loc_45656: test r14b, 4 jz short loc_45670 mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7 call _fputc loc_45670: lea rax, my_progname mov rdi, [rax] test rdi, rdi jz short loc_45684 call my_message_stderr_cold_1 loc_45684: mov r14, cs:stderr_ptr mov rsi, [r14] mov rdi, rbx call _fputs mov rsi, [r14] mov edi, 0Ah call _fputc mov rdi, [r14] pop rbx pop r14 pop rbp jmp _fflush
long long my_message_stderr(long long a1, long long a2, __int16 a3) { long long result; // rax result = fflush(stdout); if ( (a3 & 0x480) == 0 ) { if ( (a3 & 4) != 0 ) fputc(7LL, stderr); if ( my_progname ) my_message_stderr_cold_1((long long)my_progname); fputs(a2, stderr); fputc(10LL, stderr); return fflush(stderr); } return result; }
my_message_stderr: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RSI MOV RAX,qword ptr [0x00416f98] MOV RDI,qword ptr [RAX] CALL 0x001263e0 TEST R14D,0x480 JZ 0x00145656 POP RBX POP R14 POP RBP RET LAB_00145656: TEST R14B,0x4 JZ 0x00145670 MOV RAX,qword ptr [0x00416fd0] MOV RSI,qword ptr [RAX] MOV EDI,0x7 CALL 0x00126450 LAB_00145670: LEA RAX,[0x4d0e90] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00145684 CALL 0x0012b589 LAB_00145684: MOV R14,qword ptr [0x00416fd0] MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x001263b0 MOV RSI,qword ptr [R14] MOV EDI,0xa CALL 0x00126450 MOV RDI,qword ptr [R14] POP RBX POP R14 POP RBP JMP 0x001263e0
void my_message_stderr(int8 param_1,char *param_2,ulong param_3) { int *puVar1; fflush(*(FILE **)PTR_stdout_00416f98); if ((param_3 & 0x480) != 0) { return; } if ((param_3 & 4) != 0) { fputc(7,*(FILE **)PTR_stderr_00416fd0); } if (my_progname != 0) { my_message_stderr_cold_1(); } puVar1 = PTR_stderr_00416fd0; fputs(param_2,*(FILE **)PTR_stderr_00416fd0); fputc(10,*(FILE **)puVar1); fflush(*(FILE **)puVar1); return; }
38,860
glyph_traverse_func
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c
static void glyph_traverse_func(void* closure, plutovg_path_command_t command, const plutovg_point_t* points, int npoints) { plutovg_path_t* path = (plutovg_path_t*)(closure); switch(command) { case PLUTOVG_PATH_COMMAND_MOVE_TO: plutovg_path_move_to(path, points[0].x, points[0].y); break; case PLUTOVG_PATH_COMMAND_LINE_TO: plutovg_path_line_to(path, points[0].x, points[0].y); break; case PLUTOVG_PATH_COMMAND_CUBIC_TO: plutovg_path_cubic_to(path, points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y); break; case PLUTOVG_PATH_COMMAND_CLOSE: assert(false); } }
O1
c
glyph_traverse_func: cmpl $0x3, %esi ja 0x59e3 movl %esi, %eax leaq 0x1d712(%rip), %rcx # 0x230bc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movss (%rdx), %xmm0 movss 0x4(%rdx), %xmm1 jmp 0xa35f movss (%rdx), %xmm0 movss 0x4(%rdx), %xmm1 movss 0x8(%rdx), %xmm2 movss 0xc(%rdx), %xmm3 movss 0x10(%rdx), %xmm4 movss 0x14(%rdx), %xmm5 jmp 0xa526 retq movss (%rdx), %xmm0 movss 0x4(%rdx), %xmm1 jmp 0xa41d pushq %rax leaq 0x1d8ba(%rip), %rdi # 0x232b4 leaq 0x1d8b9(%rip), %rsi # 0x232ba leaq 0x1dd4a(%rip), %rcx # 0x23752 movl $0x12c, %edx # imm = 0x12C callq 0x30b0
glyph_traverse_func: cmp esi, 3; switch 4 cases ja short def_59B1; jumptable 00000000000059B1 default case mov eax, esi lea rcx, jpt_59B1 movsxd rax, ds:(jpt_59B1 - 230BCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_59B3: movss xmm0, dword ptr [rdx]; jumptable 00000000000059B1 case 0 movss xmm1, dword ptr [rdx+4] jmp plutovg_path_move_to loc_59C1: movss xmm0, dword ptr [rdx]; jumptable 00000000000059B1 case 2 movss xmm1, dword ptr [rdx+4] movss xmm2, dword ptr [rdx+8] movss xmm3, dword ptr [rdx+0Ch] movss xmm4, dword ptr [rdx+10h] movss xmm5, dword ptr [rdx+14h] jmp plutovg_path_cubic_to def_59B1: retn; jumptable 00000000000059B1 default case loc_59E4: movss xmm0, dword ptr [rdx]; jumptable 00000000000059B1 case 1 movss xmm1, dword ptr [rdx+4] jmp plutovg_path_line_to loc_59F2: push rax; jumptable 00000000000059B1 case 3 lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidGlyphTrave; "void glyph_traverse_func(void *, plutov"... mov edx, 12Ch call ___assert_fail
long long glyph_traverse_func(long long a1, unsigned int a2) { long long result; // rax result = a2; switch ( a2 ) { case 0u: result = plutovg_path_move_to(a1); break; case 1u: result = plutovg_path_line_to(a1); break; case 2u: result = plutovg_path_cubic_to(a1); break; case 3u: __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c", 300LL, "void glyph_traverse_func(void *, plutovg_path_command_t, const plutovg_point_t *, int)"); default: return result; } return result; }
glyph_traverse_func: CMP ESI,0x3 JA 0x001059e3 MOV EAX,ESI LEA RCX,[0x1230bc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOVSS XMM0,dword ptr [RDX] MOVSS XMM1,dword ptr [RDX + 0x4] JMP 0x0010a35f caseD_2: MOVSS XMM0,dword ptr [RDX] MOVSS XMM1,dword ptr [RDX + 0x4] MOVSS XMM2,dword ptr [RDX + 0x8] MOVSS XMM3,dword ptr [RDX + 0xc] MOVSS XMM4,dword ptr [RDX + 0x10] MOVSS XMM5,dword ptr [RDX + 0x14] JMP 0x0010a526 LAB_001059e3: RET caseD_1: MOVSS XMM0,dword ptr [RDX] MOVSS XMM1,dword ptr [RDX + 0x4] JMP 0x0010a41d caseD_3: PUSH RAX LEA RDI,[0x1232b4] LEA RSI,[0x1232ba] LEA RCX,[0x123752] MOV EDX,0x12c CALL 0x001030b0
void glyph_traverse_func(int8 param_1,int4 param_2,int4 *param_3) { switch(param_2) { case 0: plutovg_path_move_to(*param_3,param_3[1]); return; case 1: plutovg_path_line_to(*param_3,param_3[1]); return; case 2: plutovg_path_cubic_to(*param_3,param_3[1],param_3[2],param_3[3],param_3[4],param_3[5]); return; case 3: /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c" ,300, "void glyph_traverse_func(void *, plutovg_path_command_t, const plutovg_point_t *, int)" ); default: return; } }
38,861
ma_setup_live_state
eloqsql/storage/maria/ma_state.c
my_bool _ma_setup_live_state(MARIA_HA *info) { TRN *trn; MARIA_SHARE *share= info->s; MARIA_USED_TABLES *tables; MARIA_STATE_HISTORY *history; DBUG_ENTER("_ma_setup_live_state"); DBUG_PRINT("enter", ("info: %p", info)); DBUG_ASSERT(share->lock_key_trees); if (maria_create_trn_hook(info)) DBUG_RETURN(1); trn= info->trn; for (tables= (MARIA_USED_TABLES*) trn->used_tables; tables; tables= tables->next) { if (tables->share == share) { /* Table is already used by transaction */ goto end; } } /* Table was not used before, create new table state entry */ if (!(tables= (MARIA_USED_TABLES*) my_malloc(PSI_INSTRUMENT_ME, sizeof(*tables), MYF(MY_WME | MY_ZEROFILL)))) DBUG_RETURN(1); tables->next= trn->used_tables; trn->used_tables= tables; tables->share= share; mysql_mutex_lock(&share->intern_lock); share->in_trans++; DBUG_PRINT("info", ("share: %p in_trans: %d", share, share->in_trans)); history= share->state_history; /* We must keep share locked to ensure that we don't access a history link that is deleted by concurrently running checkpoint. It's enough to compare trids here (instead of calling tranman_can_read_from) as history->trid is a commit_trid */ while (trn->trid <= history->trid) history= history->next; mysql_mutex_unlock(&share->intern_lock); /* The current item can't be deleted as it's the first one visible for us */ tables->state_start= tables->state_current= history->state; tables->state_current.changed= tables->state_current.no_transid= 0; DBUG_PRINT("info", ("records: %ld", (ulong) tables->state_start.records)); end: info->state_start= &tables->state_start; info->state= &tables->state_current; info->used_tables= tables; tables->use_count++; /* Mark in transaction state if we are not using transid (versioning) on rows. If not, then we will in _ma_trnman_end_trans_hook() ensure that the state is visible for all at end of transaction */ tables->state_current.no_transid|= !(info->row_flag & ROW_FLAG_TRANSID); DBUG_PRINT("exit", ("tables: %p info->state: %p", tables, info->state)); DBUG_RETURN(0); }
O3
c
ma_setup_live_state: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %r12 leaq 0x3c4d4d(%rip), %rax # 0x3fcfd8 callq *(%rax) movb $0x1, %r15b testl %eax, %eax jne 0x383be movq 0x8(%rbx), %rax leaq 0x58(%rax), %r13 movq %r13, %r14 movq (%r14), %r14 testq %r14, %r14 je 0x382b6 cmpq %r12, 0x8(%r14) jne 0x382a3 jmp 0x38390 movq %rax, -0x30(%rbp) movl $0x88, %esi movl $0x30, %edx xorl %edi, %edi callq 0x9fd89 testq %rax, %rax je 0x383be movq %rax, %r14 movq (%r13), %rax movq %rax, (%r14) movq %r14, (%r13) movq %r12, 0x8(%r14) leaq 0x8f0(%r12), %r13 cmpq $0x0, 0x930(%r12) jne 0x383d0 movq %r13, %rdi callq 0x29220 incl 0x7ac(%r12) leaq 0x450(%r12), %r15 movq -0x30(%rbp), %rax movq 0x78(%rax), %rax movq (%r15), %r15 cmpq 0x8(%r15), %rax jbe 0x3831d movq 0x930(%r12), %rdi testq %rdi, %rdi jne 0x383e9 movq %r13, %rdi callq 0x291e0 movups 0x10(%r15), %xmm0 movups 0x20(%r15), %xmm1 movups 0x30(%r15), %xmm2 movups %xmm0, 0x10(%r14) movups %xmm1, 0x20(%r14) movups %xmm2, 0x30(%r14) movq 0x40(%r15), %rax movq %rax, 0x40(%r14) movq 0x40(%r15), %rax movups 0x10(%r15), %xmm0 movups 0x20(%r15), %xmm1 movups 0x30(%r15), %xmm2 movups %xmm2, 0x68(%r14) movups %xmm0, 0x48(%r14) movq %rax, 0x78(%r14) movups %xmm1, 0x58(%r14) andb $-0x4, 0x44(%r14) leaq 0x48(%r14), %rax movq %rax, 0x60(%rbx) leaq 0x10(%r14), %rax movq %rax, 0x20(%rbx) movq %r14, 0x68(%rbx) incl 0x80(%r14) movb 0x618(%rbx), %al notb %al addb %al, %al andb $0x2, %al orb %al, 0x44(%r14) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa130e(%rip), %rsi # 0xd96e5 movq %r13, %rdi movl $0x59, %edx callq 0x2eb8f jmp 0x38305 leaq 0x34dc20(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x38337
_ma_setup_live_state: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi] lea rax, maria_create_trn_hook call qword ptr [rax] mov r15b, 1 test eax, eax jnz loc_383BE mov rax, [rbx+8] lea r13, [rax+58h] mov r14, r13 loc_382A3: mov r14, [r14] test r14, r14 jz short loc_382B6 cmp [r14+8], r12 jnz short loc_382A3 jmp loc_38390 loc_382B6: mov [rbp+var_30], rax mov esi, 88h mov edx, 30h ; '0' xor edi, edi call my_malloc test rax, rax jz loc_383BE mov r14, rax mov rax, [r13+0] mov [r14], rax mov [r13+0], r14 mov [r14+8], r12 lea r13, [r12+8F0h] cmp qword ptr [r12+930h], 0 jnz loc_383D0 mov rdi, r13 call _pthread_mutex_lock loc_38305: inc dword ptr [r12+7ACh] lea r15, [r12+450h] mov rax, [rbp+var_30] mov rax, [rax+78h] loc_3831D: mov r15, [r15] cmp rax, [r15+8] jbe short loc_3831D mov rdi, [r12+930h] test rdi, rdi jnz loc_383E9 loc_38337: mov rdi, r13 call _pthread_mutex_unlock movups xmm0, xmmword ptr [r15+10h] movups xmm1, xmmword ptr [r15+20h] movups xmm2, xmmword ptr [r15+30h] movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14+20h], xmm1 movups xmmword ptr [r14+30h], xmm2 mov rax, [r15+40h] mov [r14+40h], rax mov rax, [r15+40h] movups xmm0, xmmword ptr [r15+10h] movups xmm1, xmmword ptr [r15+20h] movups xmm2, xmmword ptr [r15+30h] movups xmmword ptr [r14+68h], xmm2 movups xmmword ptr [r14+48h], xmm0 mov [r14+78h], rax movups xmmword ptr [r14+58h], xmm1 and byte ptr [r14+44h], 0FCh loc_38390: lea rax, [r14+48h] mov [rbx+60h], rax lea rax, [r14+10h] mov [rbx+20h], rax mov [rbx+68h], r14 inc dword ptr [r14+80h] mov al, [rbx+618h] not al add al, al and al, 2 or [r14+44h], al xor r15d, r15d loc_383BE: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_383D0: lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r13 mov edx, 59h ; 'Y' call psi_mutex_lock jmp loc_38305 loc_383E9: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_38337
long long ma_setup_live_state(long long *a1) { unsigned int v1; // r15d long long v2; // r12 _QWORD *v3; // r13 _QWORD *v4; // r14 _QWORD *v5; // rax long long *v6; // r15 __int128 v7; // xmm1 __int128 v8; // xmm2 long long v9; // rax __int128 v10; // xmm0 __int128 v11; // xmm1 long long v13; // [rsp+0h] [rbp-30h] v2 = *a1; LOBYTE(v1) = 1; if ( !(unsigned int)maria_create_trn_hook(a1) ) { v3 = (_QWORD *)(a1[1] + 88); v4 = v3; while ( 1 ) { v4 = (_QWORD *)*v4; if ( !v4 ) break; if ( v4[1] == v2 ) goto LABEL_14; } v13 = a1[1]; v5 = (_QWORD *)my_malloc(0LL, 136LL, 48LL); if ( !v5 ) return v1; v4 = v5; *v5 = *v3; *v3 = v5; v5[1] = v2; if ( *(_QWORD *)(v2 + 2352) ) psi_mutex_lock(v2 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x59u); else pthread_mutex_lock(v2 + 2288); ++*(_DWORD *)(v2 + 1964); v6 = (long long *)(v2 + 1104); do v6 = (long long *)*v6; while ( *(_QWORD *)(v13 + 120) <= (unsigned long long)v6[1] ); if ( *(_QWORD *)(v2 + 2352) ) PSI_server[44](); pthread_mutex_unlock(v2 + 2288); v7 = *((_OWORD *)v6 + 2); v8 = *((_OWORD *)v6 + 3); *((_OWORD *)v4 + 1) = *((_OWORD *)v6 + 1); *((_OWORD *)v4 + 2) = v7; *((_OWORD *)v4 + 3) = v8; v4[8] = v6[8]; v9 = v6[8]; v10 = *((_OWORD *)v6 + 1); v11 = *((_OWORD *)v6 + 2); *(_OWORD *)(v4 + 13) = *((_OWORD *)v6 + 3); *(_OWORD *)(v4 + 9) = v10; v4[15] = v9; *(_OWORD *)(v4 + 11) = v11; *((_BYTE *)v4 + 68) &= 0xFCu; LABEL_14: a1[12] = (long long)(v4 + 9); a1[4] = (long long)(v4 + 2); a1[13] = (long long)v4; ++*((_DWORD *)v4 + 32); *((_BYTE *)v4 + 68) |= (2 * ~*((_BYTE *)a1 + 1560)) & 2; return 0; } return v1; }
_ma_setup_live_state: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI] LEA RAX,[0x4fcfd8] CALL qword ptr [RAX] MOV R15B,0x1 TEST EAX,EAX JNZ 0x001383be MOV RAX,qword ptr [RBX + 0x8] LEA R13,[RAX + 0x58] MOV R14,R13 LAB_001382a3: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x001382b6 CMP qword ptr [R14 + 0x8],R12 JNZ 0x001382a3 JMP 0x00138390 LAB_001382b6: MOV qword ptr [RBP + -0x30],RAX MOV ESI,0x88 MOV EDX,0x30 XOR EDI,EDI CALL 0x0019fd89 TEST RAX,RAX JZ 0x001383be MOV R14,RAX MOV RAX,qword ptr [R13] MOV qword ptr [R14],RAX MOV qword ptr [R13],R14 MOV qword ptr [R14 + 0x8],R12 LEA R13,[R12 + 0x8f0] CMP qword ptr [R12 + 0x930],0x0 JNZ 0x001383d0 MOV RDI,R13 CALL 0x00129220 LAB_00138305: INC dword ptr [R12 + 0x7ac] LEA R15,[R12 + 0x450] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x78] LAB_0013831d: MOV R15,qword ptr [R15] CMP RAX,qword ptr [R15 + 0x8] JBE 0x0013831d MOV RDI,qword ptr [R12 + 0x930] TEST RDI,RDI JNZ 0x001383e9 LAB_00138337: MOV RDI,R13 CALL 0x001291e0 MOVUPS XMM0,xmmword ptr [R15 + 0x10] MOVUPS XMM1,xmmword ptr [R15 + 0x20] MOVUPS XMM2,xmmword ptr [R15 + 0x30] MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14 + 0x20],XMM1 MOVUPS xmmword ptr [R14 + 0x30],XMM2 MOV RAX,qword ptr [R15 + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV RAX,qword ptr [R15 + 0x40] MOVUPS XMM0,xmmword ptr [R15 + 0x10] MOVUPS XMM1,xmmword ptr [R15 + 0x20] MOVUPS XMM2,xmmword ptr [R15 + 0x30] MOVUPS xmmword ptr [R14 + 0x68],XMM2 MOVUPS xmmword ptr [R14 + 0x48],XMM0 MOV qword ptr [R14 + 0x78],RAX MOVUPS xmmword ptr [R14 + 0x58],XMM1 AND byte ptr [R14 + 0x44],0xfc LAB_00138390: LEA RAX,[R14 + 0x48] MOV qword ptr [RBX + 0x60],RAX LEA RAX,[R14 + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x68],R14 INC dword ptr [R14 + 0x80] MOV AL,byte ptr [RBX + 0x618] NOT AL ADD AL,AL AND AL,0x2 OR byte ptr [R14 + 0x44],AL XOR R15D,R15D LAB_001383be: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001383d0: LEA RSI,[0x1d96e5] MOV RDI,R13 MOV EDX,0x59 CALL 0x0012eb8f JMP 0x00138305 LAB_001383e9: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00138337
ulong _ma_setup_live_state(long *param_1) { pthread_mutex_t *__mutex; long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; int iVar7; long *plVar8; int8 unaff_R15; ulong uVar9; long *plVar10; lVar1 = *param_1; iVar7 = (*maria_create_trn_hook)(); uVar9 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); if (iVar7 != 0) { LAB_001383be: return uVar9 & 0xffffffff; } lVar2 = param_1[1]; plVar10 = (long *)(lVar2 + 0x58); plVar8 = plVar10; while (plVar8 = (long *)*plVar8, plVar8 != (long *)0x0) { if (plVar8[1] == lVar1) goto LAB_00138390; } plVar8 = (long *)my_malloc(0,0x88,0x30); if (plVar8 == (long *)0x0) goto LAB_001383be; *plVar8 = *plVar10; *plVar10 = (long)plVar8; plVar8[1] = lVar1; __mutex = (pthread_mutex_t *)(lVar1 + 0x8f0); if (*(long *)(lVar1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0x59) ; } *(int *)(lVar1 + 0x7ac) = *(int *)(lVar1 + 0x7ac) + 1; plVar10 = (long *)(lVar1 + 0x450); do { plVar10 = (long *)*plVar10; } while (*(ulong *)(lVar2 + 0x78) <= (ulong)plVar10[1]); if (*(long *)(lVar1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); lVar1 = plVar10[3]; lVar2 = plVar10[4]; lVar3 = plVar10[5]; lVar4 = plVar10[6]; lVar5 = plVar10[7]; plVar8[2] = plVar10[2]; plVar8[3] = lVar1; plVar8[4] = lVar2; plVar8[5] = lVar3; plVar8[6] = lVar4; plVar8[7] = lVar5; plVar8[8] = plVar10[8]; lVar1 = plVar10[8]; lVar2 = plVar10[2]; lVar3 = plVar10[3]; lVar4 = plVar10[4]; lVar5 = plVar10[5]; lVar6 = plVar10[7]; plVar8[0xd] = plVar10[6]; plVar8[0xe] = lVar6; plVar8[9] = lVar2; plVar8[10] = lVar3; plVar8[0xf] = lVar1; plVar8[0xb] = lVar4; plVar8[0xc] = lVar5; *(byte *)((long)plVar8 + 0x44) = *(byte *)((long)plVar8 + 0x44) & 0xfc; LAB_00138390: param_1[0xc] = (long)(plVar8 + 9); param_1[4] = (long)(plVar8 + 2); param_1[0xd] = (long)plVar8; *(int *)(plVar8 + 0x10) = (int)plVar8[0x10] + 1; *(byte *)((long)plVar8 + 0x44) = *(byte *)((long)plVar8 + 0x44) | ~*(byte *)(param_1 + 0xc3) * '\x02' & 2; uVar9 = 0; goto LAB_001383be; }
38,862
JS_ReadString
bluesky950520[P]quickjs/quickjs.c
static JSString *JS_ReadString(BCReaderState *s) { uint32_t len; size_t size; BOOL is_wide_char; JSString *p; if (bc_get_leb128(s, &len)) return NULL; is_wide_char = len & 1; len >>= 1; p = js_alloc_string(s->ctx, len, is_wide_char); if (!p) { s->error_state = -1; return NULL; } size = (size_t)len << is_wide_char; if ((s->buf_end - s->ptr) < size) { bc_read_error_end(s); js_free_string(s->ctx->rt, p); return NULL; } memcpy(p->u.str8, s->ptr, size); s->ptr += size; if (is_wide_char) { if (is_be()) { uint32_t i; for (i = 0; i < len; i++) p->u.str16[i] = bswap16(p->u.str16[i]); } } else { p->u.str8[size] = '\0'; /* add the trailing zero for 8 bit strings */ } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { bc_read_trace(s, "%s", ""); // hex dump and indentation JS_DumpString(s->ctx->rt, p); printf("\n"); } #endif return p; }
O1
c
JS_ReadString: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 leaq 0xc(%rsp), %rsi callq 0x45a75 testl %eax, %eax je 0x45b2c xorl %ebx, %ebx movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl 0xc(%rsp), %r15d movl %r15d, %r12d andl $0x1, %r12d shrl %r15d movl %r15d, 0xc(%rsp) movq (%r14), %rdi movl %r15d, %esi movl %r12d, %edx callq 0x20b73 testq %rax, %rax je 0x45bdb movq %rax, %rbx movl %r12d, %ecx shlq %cl, %r15 movq 0x10(%r14), %rsi movq 0x18(%r14), %rax subq %rsi, %rax cmpq %r15, %rax jae 0x45be8 cmpl $0x0, 0x30(%r14) jne 0x45b88 movq (%r14), %rdi leaq 0x59dc0(%rip), %rsi # 0x9f941 xorl %eax, %eax callq 0x224d1 movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF movq (%r14), %rax movq 0x18(%rax), %r14 movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x45b19 movq 0x4(%rbx), %rax shrq $0x3e, %rax jne 0x45c12 decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x30(%r14), %rcx movq 0x40(%r14), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r14) movq %rbx, %rsi callq *0x10(%r14) jmp 0x45b19 movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF jmp 0x45b19 movq %rbx, %r13 addq $0x18, %r13 movq %r13, %rdi movq %r15, %rdx callq 0xe5b0 addq %r15, 0x10(%r14) testl %r12d, %r12d jne 0x45b1b movb $0x0, (%r13,%r15) jmp 0x45b1b movq %r14, %rdi movq %rbx, %rsi callq 0x3b863 jmp 0x45b19
JS_ReadString: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rdi lea rsi, [rsp+38h+var_2C] call bc_get_leb128 test eax, eax jz short loc_45B2C loc_45B19: xor ebx, ebx loc_45B1B: mov rax, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_45B2C: mov r15d, [rsp+38h+var_2C] mov r12d, r15d and r12d, 1 shr r15d, 1 mov [rsp+38h+var_2C], r15d mov rdi, [r14] mov esi, r15d mov edx, r12d call js_alloc_string test rax, rax jz loc_45BDB mov rbx, rax mov ecx, r12d shl r15, cl mov rsi, [r14+10h] mov rax, [r14+18h] sub rax, rsi cmp rax, r15 jnb short loc_45BE8 cmp dword ptr [r14+30h], 0 jnz short loc_45B88 mov rdi, [r14] lea rsi, aReadAfterTheEn; "read after the end of the buffer" xor eax, eax call JS_ThrowSyntaxError loc_45B88: mov dword ptr [r14+30h], 0FFFFFFFFh mov rax, [r14] mov r14, [rax+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg loc_45B19 mov rax, [rbx+4] shr rax, 3Eh jnz short loc_45C12 dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+30h] mov rdi, [r14+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rcx mov rsi, rbx call qword ptr [r14+10h] jmp loc_45B19 loc_45BDB: mov dword ptr [r14+30h], 0FFFFFFFFh jmp loc_45B19 loc_45BE8: mov r13, rbx add r13, 18h mov rdi, r13 mov rdx, r15 call _memcpy add [r14+10h], r15 test r12d, r12d jnz loc_45B1B mov byte ptr [r13+r15+0], 0 jmp loc_45B1B loc_45C12: mov rdi, r14 mov rsi, rbx call JS_FreeAtomStruct jmp loc_45B19
long long JS_ReadString( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, unsigned long long a13) { long long v13; // rbx unsigned int v15; // r12d long long v16; // r15 long long v17; // rax long long v18; // rdx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 unsigned long long v23; // r15 long long v24; // rsi long long v25; // r14 int v26; // eax long long v27; // rax long long v28; // rdi long long v29; // r13 char v30; // [rsp+0h] [rbp-38h] _DWORD v31[11]; // [rsp+Ch] [rbp-2Ch] BYREF if ( (unsigned int)bc_get_leb128(a1, v31, a11, a12, a13) ) return 0LL; v15 = v31[0] & 1; v16 = v31[0] >> 1; v31[0] = v16; v17 = js_alloc_string(*(_QWORD *)a1, (unsigned int)v16, v15); if ( !v17 ) { *(_DWORD *)(a1 + 48) = -1; return 0LL; } v13 = v17; v23 = v16 << v15; v24 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 24) - v24 < v23 ) { if ( !*(_DWORD *)(a1 + 48) ) JS_ThrowSyntaxError( *(_QWORD *)a1, (long long)"read after the end of the buffer", v18, v15, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9, v30); *(_DWORD *)(a1 + 48) = -1; v25 = *(_QWORD *)(*(_QWORD *)a1 + 24LL); v26 = (*(_DWORD *)v13)--; if ( v26 <= 1 ) { if ( *(_QWORD *)(v13 + 4) >> 62 ) { JS_FreeAtomStruct(v25, v13); } else { --*(_QWORD *)(v25 + 40); v27 = (*(long long ( **)(long long))(v25 + 32))(v13); v28 = *(_QWORD *)(v25 + 64); *(_QWORD *)(v25 + 48) = *(_QWORD *)(v25 + 48) - v27 - 8; (*(void ( **)(long long, long long))(v25 + 16))(v28, v13); } } return 0LL; } v29 = v17 + 24; memcpy(v17 + 24, v24, v23); *(_QWORD *)(a1 + 16) += v23; if ( !v15 ) *(_BYTE *)(v29 + v23) = 0; return v13; }
JS_ReadString: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RDI LEA RSI,[RSP + 0xc] CALL 0x00145a75 TEST EAX,EAX JZ 0x00145b2c LAB_00145b19: XOR EBX,EBX LAB_00145b1b: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00145b2c: MOV R15D,dword ptr [RSP + 0xc] MOV R12D,R15D AND R12D,0x1 SHR R15D,0x1 MOV dword ptr [RSP + 0xc],R15D MOV RDI,qword ptr [R14] MOV ESI,R15D MOV EDX,R12D CALL 0x00120b73 TEST RAX,RAX JZ 0x00145bdb MOV RBX,RAX MOV ECX,R12D SHL R15,CL MOV RSI,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R14 + 0x18] SUB RAX,RSI CMP RAX,R15 JNC 0x00145be8 CMP dword ptr [R14 + 0x30],0x0 JNZ 0x00145b88 MOV RDI,qword ptr [R14] LEA RSI,[0x19f941] XOR EAX,EAX CALL 0x001224d1 LAB_00145b88: MOV dword ptr [R14 + 0x30],0xffffffff MOV RAX,qword ptr [R14] MOV R14,qword ptr [RAX + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x00145b19 MOV RAX,qword ptr [RBX + 0x4] SHR RAX,0x3e JNZ 0x00145c12 DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [R14 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R14 + 0x30],RCX MOV RSI,RBX CALL qword ptr [R14 + 0x10] JMP 0x00145b19 LAB_00145bdb: MOV dword ptr [R14 + 0x30],0xffffffff JMP 0x00145b19 LAB_00145be8: MOV R13,RBX ADD R13,0x18 MOV RDI,R13 MOV RDX,R15 CALL 0x0010e5b0 ADD qword ptr [R14 + 0x10],R15 TEST R12D,R12D JNZ 0x00145b1b MOV byte ptr [R13 + R15*0x1],0x0 JMP 0x00145b1b LAB_00145c12: MOV RDI,R14 MOV RSI,RBX CALL 0x0013b863 JMP 0x00145b19
int * JS_ReadString(long *param_1) { long lVar1; int iVar2; int *piVar3; long lVar4; uint uVar5; ulong uVar6; uint local_2c; iVar2 = bc_get_leb128(param_1,&local_2c); if (iVar2 == 0) { uVar5 = local_2c & 1; local_2c = local_2c >> 1; uVar6 = (ulong)local_2c; piVar3 = (int *)js_alloc_string(*param_1,local_2c,uVar5); if (piVar3 == (int *)0x0) { *(int4 *)(param_1 + 6) = 0xffffffff; } else { uVar6 = uVar6 << (sbyte)uVar5; if (uVar6 <= (ulong)(param_1[3] - param_1[2])) { memcpy(piVar3 + 6,(void *)param_1[2],uVar6); param_1[2] = param_1[2] + uVar6; if (uVar5 != 0) { return piVar3; } *(int1 *)((long)(piVar3 + 6) + uVar6) = 0; return piVar3; } if ((int)param_1[6] == 0) { JS_ThrowSyntaxError(*param_1,"read after the end of the buffer"); } *(int4 *)(param_1 + 6) = 0xffffffff; lVar1 = *(long *)(*param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; if (iVar2 < 2) { if (*(ulong *)(piVar3 + 1) >> 0x3e == 0) { *(long *)(lVar1 + 0x28) = *(long *)(lVar1 + 0x28) + -1; lVar4 = (**(code **)(lVar1 + 0x20))(piVar3); *(long *)(lVar1 + 0x30) = (*(long *)(lVar1 + 0x30) - lVar4) + -8; (**(code **)(lVar1 + 0x10))(*(int8 *)(lVar1 + 0x40),piVar3); } else { JS_FreeAtomStruct(lVar1,piVar3); } } } } return (int *)0x0; }
38,863
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_mistral_nemo(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", { // Important note: the model is probably trained to take a JSON stringified arguments value. // It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object. {"name", { {"type", "string"}, {"const", function["name"]}, }}, {"arguments", function["parameters"]}, {"id", { {"type", "string"}, // Nemo's template expects a 9-character alphanumeric ID. {"pattern", "^[a-zA-Z0-9]{9}$"}, }}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); 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", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema)); }, grammar_options); data.grammar_triggers.push_back({"[TOOL_CALLS]", /* .at_start = */ true}); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO; return data; }
O3
cpp
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) xorl %r12d, %r12d movb %r12b, 0x8(%rdi) movq %r12, 0x10(%rdi) leaq 0x28(%rdi), %rax movq %rax, 0x18(%rdi) movq %r12, 0x20(%rdi) movb %r12b, 0x28(%rdi) movb %r12b, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %r12, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x1dc90(%rip), %rsi # 0xee6b5 callq 0xa46e1 movb %al, 0x38(%rbx) leaq 0x38(%rsp), %rsi movq %r12, 0x8(%rsi) movq %r14, (%rsi) leaq 0xd25e(%rip), %rax # 0xddc9e movq %rax, 0x18(%rsi) leaq 0xda2d(%rip), %rax # 0xde478 movq %rax, 0x10(%rsi) leaq 0x23b92(%rip), %rdx # 0xf45e8 leaq 0x10(%rsp), %rdi callq 0xba850 leaq 0x18(%rbx), %rdi leaq 0x10(%rsp), %r12 movq %r12, %rsi callq 0x1aab0 movq (%r12), %rdi leaq 0x20(%rsp), %r12 cmpq %r12, %rdi je 0xd0a8c movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x48(%rsp), %rax testq %rax, %rax je 0xd0aa5 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x10(%rsp), %rdi movq %r12, (%rdi) leaq 0x24c03(%rip), %rsi # 0xf56b7 leaq 0x24c08(%rip), %rdx # 0xf56c3 callq 0x214e2 leaq 0x40(%rbx), %rdi leaq 0x10(%rsp), %rsi movb $0x1, 0x20(%rsi) callq 0xe3748 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd0ae9 movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8e0 movzbl 0x10(%r14), %eax testl %eax, %eax je 0xd0b19 cmpl $0x2, %eax je 0xd0afc cmpl $0x1, %eax jne 0xd0b09 movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xd0b19 leaq 0x10(%r14), %rsi leaq 0x38(%rsp), %rdi callq 0x5ce86 jmp 0xd0b27 movb $0x0, 0x38(%rsp) movq $0x0, 0x40(%rsp) movzbl 0x68(%r14), %r8d leaq 0x58(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx callq 0xa0e00 leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x7f0e2 movb 0x8(%rbx), %al leaq 0x68(%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 0x5d352 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd0ba3 movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x58(%rsp), %rdi callq 0x5d352 leaq 0x38(%rsp), %rdi callq 0x5d352 movl $0x2, (%rbx) addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xd0c21 jmp 0xd0c52 movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd0bef movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0xd0bef movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x5d352 leaq 0x38(%rsp), %rdi callq 0x5d352 jmp 0xd0c42 movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd0c42 movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0xd0c42 movq %rax, %r14 jmp 0xd0c42 movq %rax, %r14 movq 0x48(%rsp), %rax testq %rax, %rax je 0xd0c42 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x7dca0 movq %r14, %rdi callq 0x1afa0 movq %rax, %rdi callq 0x212e3
_ZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputs: push r15 push r14 push r12 push rbx sub rsp, 78h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor r12d, r12d mov [rdi+8], r12b mov [rdi+10h], r12 lea rax, [rdi+28h] mov [rdi+18h], rax mov [rdi+20h], r12 mov [rdi+28h], r12b mov [rdi+38h], r12b 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], r12 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+98h+var_60] mov [rsi+8], r12 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(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_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(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+98h+var_88] 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+98h+var_88] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r12, [rsp+98h+var_78] cmp rdi, r12 jz short loc_D0A8C mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D0A8C: mov rax, [rsp+98h+var_50] test rax, rax jz short loc_D0AA5 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_D0AA5: lea rdi, [rsp+98h+var_88] mov [rdi], r12 lea rsi, aToolCalls_0; "[TOOL_CALLS]" lea rdx, aToolCalls_0+0Ch; "" 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+98h+var_88] mov byte ptr [rsi+20h], 1 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D0AE9 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D0AE9: movzx eax, byte ptr [r14+10h] test eax, eax jz short loc_D0B19 cmp eax, 2 jz short loc_D0AFC cmp eax, 1 jnz short loc_D0B09 loc_D0AFC: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_D0B19 loc_D0B09: lea rsi, [r14+10h] lea rdi, [rsp+98h+var_60] 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_D0B27 loc_D0B19: mov [rsp+98h+var_60], 0 mov [rsp+98h+var_58], 0 loc_D0B27: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+98h+var_40] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+98h+var_98], 1 lea rdi, [rsp+98h+var_88] lea rcx, [rsp+98h+var_60] mov rsi, r15 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+98h+var_30] lea rsi, [rsp+98h+var_88] 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+98h+var_30] 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+98h+var_88]; void * cmp rdi, r12 jz short loc_D0BA3 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D0BA3: lea rdi, [rsp+98h+var_40] 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+98h+var_60] 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], 2 add rsp, 78h pop rbx pop r12 pop r14 pop r15 retn jmp short loc_D0C21 jmp loc_D0C52 mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D0BEF mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D0BEF mov r14, rax loc_D0BEF: lea rdi, [rsp+98h+var_40] 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+98h+var_60] 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_D0C42 mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D0C42 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D0C42 loc_D0C21: mov r14, rax jmp short loc_D0C42 mov r14, rax mov rax, [rsp+98h+var_50] test rax, rax jz short loc_D0C42 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_D0C42: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume loc_D0C52: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_mistral_nemo( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v4; // rcx int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d char v9; // al long long v10; // rax long long result; // rax void *v12[2]; // [rsp+10h] [rbp-88h] BYREF _QWORD v13[2]; // [rsp+20h] [rbp-78h] BYREF char v14; // [rsp+30h] [rbp-68h] long long v15; // [rsp+38h] [rbp-60h] BYREF long long v16; // [rsp+40h] [rbp-58h] long long ( *v17)(); // [rsp+48h] [rbp-50h] long long ( *v18)(); // [rsp+50h] [rbp-48h] _BYTE v19[8]; // [rsp+58h] [rbp-40h] BYREF long long v20; // [rsp+60h] [rbp-38h] char v21[8]; // [rsp+68h] [rbp-30h] BYREF long long v22; // [rsp+70h] [rbp-28h] *(_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"); v16 = 0LL; v15 = a3; v18 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v12, (long long)&v15, grammar_options, v4, v5, v6); std::string::operator=((char *)a1 + 24, v12); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); if ( v17 ) ((void ( *)(long long *, long long *, long long))v17)(&v15, &v15, 3LL); v12[0] = v13; std::string::_M_construct<char const*>((long long)v12, "[TOOL_CALLS]", (long long)""); v14 = 1; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); v7 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v7 == 2 || v7 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v15) = 0; v16 = 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 *)&v15, (unsigned __int8 *)(a3 + 16)); } v8 = *(unsigned __int8 *)(a3 + 104); v19[0] = 0; v20 = 0LL; minja::chat_template::apply((long long)v12, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v15, v8, v19, 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_(v21); v9 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v21[0]; v21[0] = v9; v10 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v22; v22 = v10; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v12[0] != v13 ) operator delete(v12[0], v13[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(v19); 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(&v15); *(_DWORD *)a1 = 2; return result; }
common_chat_params_init_mistral_nemo: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR R12D,R12D MOV byte ptr [RDI + 0x8],R12B MOV qword ptr [RDI + 0x10],R12 LEA RAX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],R12 MOV byte ptr [RDI + 0x28],R12B MOV byte ptr [RDI + 0x38],R12B 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],R12 LEA RDI,[RDX + 0x20] LEA RSI,[0x1ee6b5] CALL 0x001a46e1 MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x38] MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R14 LEA RAX,[0x1ddc9e] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1de478] MOV qword ptr [RSI + 0x10],RAX LAB_001d0a4f: LEA RDX,[0x1f45e8] LEA RDI,[RSP + 0x10] CALL 0x001ba850 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x10] MOV RSI,R12 CALL 0x0011aab0 MOV RDI,qword ptr [R12] LEA R12,[RSP + 0x20] CMP RDI,R12 JZ 0x001d0a8c MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011a8e0 LAB_001d0a8c: MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x001d0aa5 LAB_001d0a96: LEA RDI,[RSP + 0x38] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d0aa5: LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],R12 LAB_001d0aad: LEA RSI,[0x1f56b7] LEA RDX,[0x1f56c3] CALL 0x001214e2 LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x20],0x1 LAB_001d0acd: CALL 0x001e3748 MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001d0ae9 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011a8e0 LAB_001d0ae9: MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX JZ 0x001d0b19 CMP EAX,0x2 JZ 0x001d0afc CMP EAX,0x1 JNZ 0x001d0b09 LAB_001d0afc: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001d0b19 LAB_001d0b09: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x38] CALL 0x0015ce86 JMP 0x001d0b27 LAB_001d0b19: MOV byte ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x0 LAB_001d0b27: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x58] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001d0b3d: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x10] LEA RCX,[RSP + 0x38] MOV RSI,R15 MOV RDX,R14 CALL 0x001a0e00 LAB_001d0b59: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x10] CALL 0x0017f0e2 MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0x68] 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 0x0015d352 MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001d0ba3 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011a8e0 LAB_001d0ba3: LEA RDI,[RSP + 0x58] CALL 0x0015d352 LEA RDI,[RSP + 0x38] CALL 0x0015d352 MOV dword ptr [RBX],0x2 ADD RSP,0x78 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_mistral_nemo(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; long *local_88 [2]; long local_78 [2]; int1 local_68; ulong local_60 [2]; code *local_50; code *local_48; data local_40 [8]; int8 local_38; chat_template local_30 [8]; int8 local_28; *(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_60[1] = 0; local_48 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_50 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001d0a4f to 001d0a5f has its CatchHandler @ 001d0c26 */ local_60[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_88,(common_grammar_options *)local_60); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_88); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_50 != (code *)0x0) { /* try { // try from 001d0a96 to 001d0aa4 has its CatchHandler @ 001d0bcb */ (*local_50)(local_60,local_60,3); } local_88[0] = local_78; /* try { // try from 001d0aad to 001d0abf has its CatchHandler @ 001d0c21 */ std::__cxx11::string::_M_construct<char_const*>(local_88,"[TOOL_CALLS]",""); local_68 = 1; /* try { // try from 001d0acd to 001d0ad1 has its CatchHandler @ 001d0c05 */ 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_88); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_60[0] = local_60[0] & 0xffffffffffffff00; local_60[1] = 0; } else { /* try { // try from 001d0b09 to 001d0b16 has its CatchHandler @ 001d0bc9 */ 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_60,(basic_json *)(in_RDX + 0x10)); } local_40[0] = (data)0x0; local_38 = 0; /* try { // try from 001d0b3d to 001d0b58 has its CatchHandler @ 001d0bec */ minja::chat_template::apply ((basic_json *)local_88,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_60, *(bool *)(in_RDX + 0x68)); /* try { // try from 001d0b59 to 001d0b67 has its CatchHandler @ 001d0bd0 */ _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_30,local_88); cVar3 = param_1[8]; param_1[8] = local_30[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_28; local_30[0] = cVar3; local_28 = 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_30); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[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_40); 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_60); *(int4 *)param_1 = 2; return; }
38,864
mysql_stmt_fetch_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_fetch_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_fetch, (parms->stmt), parms->stmt->mysql, int, r_int) }
O3
c
mysql_stmt_fetch_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x38(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rbx callq 0x21053 movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_stmt_fetch_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+38h] mov rax, [rax+480h] mov rbx, [rax+28h] call mysql_stmt_fetch mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_stmt_fetch_start_internal(long long *a1) { long long v1; // rdi _DWORD *v2; // rbx long long result; // rax v1 = *a1; v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL); result = mysql_stmt_fetch(v1); v2[2] = result; *v2 = 0; return result; }
mysql_stmt_fetch_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x00121053 MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_stmt_fetch_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_fetch(); puVar1[2] = uVar2; *puVar1 = 0; return; }
38,865
my_thread_global_end
eloqsql/mysys/my_thr_init.c
void my_thread_global_end(void) { struct timespec abstime; my_bool all_threads_killed= 1; set_timespec(abstime, my_thread_end_wait_time); mysql_mutex_lock(&THR_LOCK_threads); while (THR_thread_count > 0) { int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads, &abstime); if (error == ETIMEDOUT || error == ETIME) { #ifdef HAVE_PTHREAD_KILL /* We shouldn't give an error here, because if we don't have pthread_kill(), programs like mysqld can't ensure that all threads are killed when we enter here. */ if (THR_thread_count) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); #endif all_threads_killed= 0; break; } } mysql_mutex_unlock(&THR_LOCK_threads); my_thread_destroy_common_mutex(); /* Only destroy the mutex & conditions if we don't have other threads around that could use them. */ if (all_threads_killed) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done= 0; }
O3
c
my_thread_global_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp callq 0x888fc imulq $0x3e8, %rax, %rax # imm = 0x3E8 leaq 0x2e9b55(%rip), %rcx # 0x36fb68 movl (%rcx), %ecx imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00 addq %rax, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx movq %rdx, -0x38(%rbp) imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rcx, -0x30(%rbp) leaq 0x36b708(%rip), %rax # 0x3f1758 cmpq $0x0, 0x40(%rax) jne 0x86126 leaq 0x36b6f6(%rip), %rdi # 0x3f1758 callq 0x3a310 leaq 0x36b4ea(%rip), %r12 # 0x3f1558 leaq 0x36b773(%rip), %r14 # 0x3f17e8 leaq 0x36b6dc(%rip), %rbx # 0x3f1758 leaq -0x38(%rbp), %r15 movl (%r12), %r13d testl %r13d, %r13d je 0x860ec cmpq $0x0, 0x30(%r14) jne 0x860aa movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x3a990 cmpl $0x6e, %eax je 0x860c7 cmpl $0x3e, %eax jne 0x86080 jmp 0x860c7 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx leaq 0x3b14f(%rip), %rcx # 0xc1209 movl $0xd2, %r8d callq 0x3cf67 jmp 0x8609e movl (%r12), %ecx testl %ecx, %ecx je 0x860ec movq 0x2e5eea(%rip), %rax # 0x36bfc0 movq (%rax), %rdi leaq 0x3b166(%rip), %rdx # 0xc1246 movl $0x1, %esi xorl %eax, %eax callq 0x3a2f0 movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x86130 leaq 0x36b65c(%rip), %rdi # 0x3f1758 callq 0x3a2d0 callq 0x858f4 testl %r13d, %r13d jne 0x86110 callq 0x85a57 movb $0x0, 0x36b709(%rip) # 0x3f1820 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x3d021 jmp 0x86067 leaq 0x2e9eb1(%rip), %rax # 0x36ffe8 movq (%rax), %rax callq *0x160(%rax) jmp 0x860f5
my_thread_global_end: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h call my_hrtime imul rax, 3E8h lea rcx, my_thread_end_wait_time mov ecx, [rcx] imul rcx, 3B9ACA00h add rcx, rax mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh mov [rbp+var_38], rdx imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rbp+var_30], rcx lea rax, THR_LOCK_threads cmp qword ptr [rax+40h], 0 jnz loc_86126 lea rdi, THR_LOCK_threads call _pthread_mutex_lock loc_86067: lea r12, THR_thread_count lea r14, THR_COND_threads lea rbx, THR_LOCK_threads lea r15, [rbp+var_38] loc_86080: mov r13d, [r12] test r13d, r13d jz short loc_860EC cmp qword ptr [r14+30h], 0 jnz short loc_860AA mov rdi, r14 mov rsi, rbx mov rdx, r15 call _pthread_cond_timedwait loc_8609E: cmp eax, 6Eh ; 'n' jz short loc_860C7 cmp eax, 3Eh ; '>' jnz short loc_86080 jmp short loc_860C7 loc_860AA: mov rdi, r14 mov rsi, rbx mov rdx, r15 lea rcx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 0D2h call psi_cond_timedwait jmp short loc_8609E loc_860C7: mov ecx, [r12] test ecx, ecx jz short loc_860EC mov rax, cs:stderr_ptr mov rdi, [rax] lea rdx, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"... mov esi, 1 xor eax, eax call ___fprintf_chk loc_860EC: mov rdi, [rbx+40h] test rdi, rdi jnz short loc_86130 loc_860F5: lea rdi, THR_LOCK_threads call _pthread_mutex_unlock call my_thread_destroy_common_mutex test r13d, r13d jnz short loc_86110 call my_thread_destroy_internal_mutex loc_86110: mov cs:my_thread_global_init_done, 0 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_86126: call my_thread_global_end_cold_1 jmp loc_86067 loc_86130: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_860F5
long long my_thread_global_end() { long long v0; // rax int v1; // r13d int v2; // eax long long result; // rax _QWORD v4[7]; // [rsp+8h] [rbp-38h] BYREF v0 = my_hrtime(); v4[0] = (1000 * v0 + 1000000000 * (unsigned long long)my_thread_end_wait_time) / 0x3B9ACA00; v4[1] = (1000 * v0 + 1000000000 * (unsigned long long)my_thread_end_wait_time) % 0x3B9ACA00; if ( THR_LOCK_threads[8] ) my_thread_global_end_cold_1(); else pthread_mutex_lock(THR_LOCK_threads); while ( 1 ) { v1 = THR_thread_count; if ( !THR_thread_count ) break; if ( THR_COND_threads[6] ) v2 = psi_cond_timedwait( (long long)THR_COND_threads, (long long)THR_LOCK_threads, (long long)v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 0xD2u); else v2 = pthread_cond_timedwait(THR_COND_threads, THR_LOCK_threads, v4); if ( v2 == 110 || v2 == 62 ) { if ( THR_thread_count ) __fprintf_chk(stderr, 1LL, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); break; } } if ( THR_LOCK_threads[8] ) (*((void (**)(void))PSI_server + 44))(); pthread_mutex_unlock(THR_LOCK_threads); result = my_thread_destroy_common_mutex(); if ( !v1 ) result = my_thread_destroy_internal_mutex(); my_thread_global_init_done = 0; return result; }
my_thread_global_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CALL 0x001888fc IMUL RAX,RAX,0x3e8 LEA RCX,[0x46fb68] MOV ECX,dword ptr [RCX] IMUL RCX,RCX,0x3b9aca00 ADD RCX,RAX MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb MOV qword ptr [RBP + -0x38],RDX IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RBP + -0x30],RCX LEA RAX,[0x4f1758] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x00186126 LEA RDI,[0x4f1758] CALL 0x0013a310 LAB_00186067: LEA R12,[0x4f1558] LEA R14,[0x4f17e8] LEA RBX,[0x4f1758] LEA R15,[RBP + -0x38] LAB_00186080: MOV R13D,dword ptr [R12] TEST R13D,R13D JZ 0x001860ec CMP qword ptr [R14 + 0x30],0x0 JNZ 0x001860aa MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0013a990 LAB_0018609e: CMP EAX,0x6e JZ 0x001860c7 CMP EAX,0x3e JNZ 0x00186080 JMP 0x001860c7 LAB_001860aa: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 LEA RCX,[0x1c1209] MOV R8D,0xd2 CALL 0x0013cf67 JMP 0x0018609e LAB_001860c7: MOV ECX,dword ptr [R12] TEST ECX,ECX JZ 0x001860ec MOV RAX,qword ptr [0x0046bfc0] MOV RDI,qword ptr [RAX] LEA RDX,[0x1c1246] MOV ESI,0x1 XOR EAX,EAX CALL 0x0013a2f0 LAB_001860ec: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x00186130 LAB_001860f5: LEA RDI,[0x4f1758] CALL 0x0013a2d0 CALL 0x001858f4 TEST R13D,R13D JNZ 0x00186110 CALL 0x00185a57 LAB_00186110: MOV byte ptr [0x004f1820],0x0 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00186126: CALL 0x0013d021 JMP 0x00186067 LAB_00186130: LEA RAX,[0x46ffe8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001860f5
void my_thread_global_end(void) { int iVar1; int iVar2; long lVar3; timespec local_40; lVar3 = my_hrtime(); local_40.tv_nsec = (ulong)my_thread_end_wait_time * 1000000000 + lVar3 * 1000; local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000; local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000; if (THR_LOCK_threads._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads); } else { my_thread_global_end_cold_1(); } do { iVar1 = THR_thread_count; if (THR_thread_count == 0) goto LAB_001860ec; if (THR_COND_threads._48_8_ == 0) { iVar2 = pthread_cond_timedwait ((pthread_cond_t *)THR_COND_threads,(pthread_mutex_t *)THR_LOCK_threads, &local_40); } else { iVar2 = psi_cond_timedwait(THR_COND_threads,THR_LOCK_threads,&local_40, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2 ); } } while ((iVar2 != 0x6e) && (iVar2 != 0x3e)); if (THR_thread_count != 0) { __fprintf_chk(*(int8 *)PTR_stderr_0046bfc0,1, "Error in my_thread_global_end(): %d threads didn\'t exit\n"); } LAB_001860ec: if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads); my_thread_destroy_common_mutex(); if (iVar1 == 0) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done = 0; return; }
38,866
ma_read_cache
eloqsql/storage/maria/ma_cache.c
my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff, my_off_t pos, size_t length, uint flag) { size_t read_length,in_buff_length; my_off_t offset; uchar *in_buff_pos; DBUG_ENTER("_ma_read_cache"); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (unlikely(pos >= info->end_of_file) && (flag & READING_HEADER)) DBUG_RETURN(-1); if (pos < info->pos_in_file) { read_length=length; if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(uint) (info->pos_in_file-pos); info->seek_not_done=1; if (mysql_file_pread(info->file,buff,read_length,pos,MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); pos+=read_length; buff+=read_length; } if (pos >= info->pos_in_file && (offset= (my_off_t) (pos - info->pos_in_file)) < (my_off_t) (info->read_end - info->request_pos)) { in_buff_pos=info->request_pos+(uint) offset; in_buff_length= MY_MIN(length,(size_t) (info->read_end-in_buff_pos)); memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length); if (!(length-=in_buff_length)) DBUG_RETURN(0); pos+=in_buff_length; buff+=in_buff_length; } else in_buff_length=0; if (flag & READING_NEXT) { if (pos != (info->pos_in_file + (uint) (info->read_end - info->request_pos))) { info->pos_in_file=pos; /* Force start here */ info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else info->read_pos=info->read_end; /* All block used */ if (!_my_b_read(info,buff,length)) DBUG_RETURN(0); read_length=info->error; } else { info->seek_not_done=1; if ((read_length=mysql_file_pread(info->file,buff,length,pos,MYF(0))) == length) DBUG_RETURN(0); } if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { if ((flag & READING_HEADER) && read_length + in_buff_length == 0) DBUG_RETURN(-1); /* End of file */ DBUG_PRINT("error", ("Error %d reading next-multi-part block (Got %d of %d bytes)", my_errno, (int) read_length, (int) length)); if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT) { if (!handler->in_check_table) _ma_set_fatal_error(handler, HA_ERR_FILE_TOO_SHORT); if (!my_errno) my_errno= HA_ERR_WRONG_IN_RECORD; } DBUG_RETURN(1); } bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length - read_length); DBUG_RETURN(0); }
O3
c
ma_read_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, -0x2c(%rbp) movq %rcx, %r13 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, -0x50(%rbp) cmpq %rcx, 0x8(%rsi) jbe 0x72e55 movq (%rbx), %rax movq %rax, %rcx subq %r13, %rcx jbe 0x72cc2 cmpq %r8, %rcx movl %ecx, %r15d movq %r8, -0x48(%rbp) cmovaeq %r8, %r15 movl $0x1, 0xe0(%rbx) movl 0xd4(%rbx), %r14d leaq 0x3143f3(%rip), %rax # 0x387050 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax movq %r12, -0x38(%rbp) jne 0x72e64 movl $0x4, %r8d movl %r14d, %edi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx callq 0xa1b9c movq %rax, %r12 movb $0x1, %r14b testq %r12, %r12 movq -0x38(%rbp), %r12 movq -0x48(%rbp), %r8 jne 0x72de7 subq %r15, %r8 je 0x72de4 addq %r15, %r13 addq %r15, %r12 movq (%rbx), %rax movq %r13, %rcx subq %rax, %rcx jb 0x72d0e movq 0x18(%rbx), %r15 movq 0x28(%rbx), %rsi movq %r15, %rax subq %rsi, %rax cmpq %rax, %rcx jae 0x72d0e movl %ecx, %eax addq %rax, %rsi subq %rsi, %r15 cmpq %r15, %r8 cmovbq %r8, %r15 movq %r12, %rdi movq %r15, %rdx movq %r8, %r14 callq 0x29080 movq %r14, %r8 subq %r15, %r8 je 0x72de4 addq %r15, %r13 addq %r15, %r12 jmp 0x72d11 xorl %r15d, %r15d testb $0x1, -0x2c(%rbp) jne 0x72d6e movq %r8, %r14 movl $0x1, 0xe0(%rbx) movl 0xd4(%rbx), %ebx leaq 0x31431f(%rip), %rax # 0x387050 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x72ec9 movl %ebx, %edi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0xa1b9c movq %rax, %rbx cmpq %r14, %rbx jne 0x72db3 jmp 0x72de4 movq 0x18(%rbx), %rcx movq 0x28(%rbx), %rax movl %ecx, %edx subl %eax, %edx addq (%rbx), %rdx cmpq %rdx, %r13 je 0x72d96 movq %r13, (%rbx) movq %rax, 0x18(%rbx) movl $0x1, 0xe0(%rbx) movq %rax, %rcx movq %rcx, 0x10(%rbx) movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx callq 0x96d6a testl %eax, %eax je 0x72de4 movslq 0xe4(%rbx), %rbx testb $0x2, -0x2c(%rbp) je 0x72df9 movl %ebx, %eax cmpl $-0x1, %eax je 0x72df9 leaq (%rbx,%r15), %rax cmpq $0x2, %rax jbe 0x72df9 addq %rbx, %r12 movl $0x14, %edx subq %rax, %rdx xorl %r14d, %r14d movq %r12, %rdi xorl %esi, %esi callq 0x29270 jmp 0x72de7 xorl %r14d, %r14d movl %r14d, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x2, -0x2c(%rbp) je 0x72e0a negq %r15 movb $-0x1, %r14b cmpq %r15, %rbx je 0x72de7 callq 0xa319a cmpl $0x0, (%rax) je 0x72e24 callq 0xa319a movb $0x1, %r14b cmpl $0xaf, (%rax) jne 0x72de7 movq -0x50(%rbp), %rdi cmpb $0x0, 0x683(%rdi) jne 0x72e3b movl $0xaf, %esi callq 0x37328 callq 0xa319a movb $0x1, %r14b cmpl $0x0, (%rax) jne 0x72de7 callq 0xa319a movl $0x7f, (%rax) jmp 0x72de7 movb $-0x1, %r14b testb $0x2, -0x2c(%rbp) je 0x72c28 jmp 0x72de7 movq %rax, %rcx leaq 0x3141e2(%rip), %rax # 0x387050 movq (%rax), %rax leaq 0x68c42(%rip), %rdx # 0xdbaba movq %rcx, -0x40(%rbp) movq %rcx, %rdi movq %r15, %rsi movl $0x38, %ecx callq *0x210(%rax) movl $0x4, %r8d movl %r14d, %edi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx callq 0xa1b9c movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmoveq %r15, %rsi leaq 0x314199(%rip), %rax # 0x387050 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *0x218(%rax) jmp 0x72c9c movq %rax, %rcx leaq 0x31417d(%rip), %rax # 0x387050 movq (%rax), %rax leaq 0x68bdd(%rip), %rdx # 0xdbaba movq %rcx, -0x38(%rbp) movq %rcx, %rdi movq %r14, %rsi movl $0x5f, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0xa1b9c movq %rax, %rbx cmpq $-0x1, %rax movl $0x0, %esi cmovneq %rax, %rsi leaq 0x314134(%rip), %rax # 0x387050 movq (%rax), %rax movq -0x38(%rbp), %rdi callq *0x218(%rax) jmp 0x72d67 nop
_ma_read_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rbp+var_2C], r9d mov r13, rcx mov r12, rdx mov rbx, rsi mov [rbp+var_50], rdi cmp [rsi+8], rcx jbe loc_72E55 loc_72C28: mov rax, [rbx] mov rcx, rax sub rcx, r13 jbe loc_72CC2 cmp rcx, r8 mov r15d, ecx mov [rbp+var_48], r8 cmovnb r15, r8 mov dword ptr [rbx+0E0h], 1 mov r14d, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax mov [rbp+var_38], r12 jnz loc_72E64 mov r8d, 4 mov edi, r14d mov rsi, r12 mov rdx, r15 mov rcx, r13 call my_pread mov r12, rax loc_72C9C: mov r14b, 1 test r12, r12 mov r12, [rbp+var_38] mov r8, [rbp+var_48] jnz loc_72DE7 sub r8, r15 jz loc_72DE4 add r13, r15 add r12, r15 mov rax, [rbx] loc_72CC2: mov rcx, r13 sub rcx, rax jb short loc_72D0E mov r15, [rbx+18h] mov rsi, [rbx+28h] mov rax, r15 sub rax, rsi cmp rcx, rax jnb short loc_72D0E mov eax, ecx add rsi, rax sub r15, rsi cmp r8, r15 cmovb r15, r8 mov rdi, r12 mov rdx, r15 mov r14, r8 call _memcpy mov r8, r14 sub r8, r15 jz loc_72DE4 add r13, r15 add r12, r15 jmp short loc_72D11 loc_72D0E: xor r15d, r15d loc_72D11: test byte ptr [rbp+var_2C], 1 jnz short loc_72D6E mov r14, r8 mov dword ptr [rbx+0E0h], 1 mov ebx, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_72EC9 mov edi, ebx mov rsi, r12 mov rdx, r14 mov rcx, r13 xor r8d, r8d call my_pread mov rbx, rax loc_72D67: cmp rbx, r14 jnz short loc_72DB3 jmp short loc_72DE4 loc_72D6E: mov rcx, [rbx+18h] mov rax, [rbx+28h] mov edx, ecx sub edx, eax add rdx, [rbx] cmp r13, rdx jz short loc_72D96 mov [rbx], r13 mov [rbx+18h], rax mov dword ptr [rbx+0E0h], 1 mov rcx, rax loc_72D96: mov [rbx+10h], rcx mov rdi, rbx mov rsi, r12 mov rdx, r8 call _my_b_read test eax, eax jz short loc_72DE4 movsxd rbx, dword ptr [rbx+0E4h] loc_72DB3: test byte ptr [rbp+var_2C], 2 jz short loc_72DF9 mov eax, ebx cmp eax, 0FFFFFFFFh jz short loc_72DF9 lea rax, [rbx+r15] cmp rax, 2 jbe short loc_72DF9 add r12, rbx mov edx, 14h sub rdx, rax xor r14d, r14d mov rdi, r12 xor esi, esi call _memset jmp short loc_72DE7 loc_72DE4: xor r14d, r14d loc_72DE7: mov eax, r14d add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72DF9: test byte ptr [rbp+var_2C], 2 jz short loc_72E0A neg r15 mov r14b, 0FFh cmp rbx, r15 jz short loc_72DE7 loc_72E0A: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_72E24 call _my_thread_var mov r14b, 1 cmp dword ptr [rax], 0AFh jnz short loc_72DE7 loc_72E24: mov rdi, [rbp+var_50] cmp byte ptr [rdi+683h], 0 jnz short loc_72E3B mov esi, 0AFh call _ma_set_fatal_error loc_72E3B: call _my_thread_var mov r14b, 1 cmp dword ptr [rax], 0 jnz short loc_72DE7 call _my_thread_var mov dword ptr [rax], 7Fh jmp short loc_72DE7 loc_72E55: mov r14b, 0FFh test byte ptr [rbp+var_2C], 2 jz loc_72C28 jmp short loc_72DE7 loc_72E64: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_40], rcx mov rdi, rcx mov rsi, r15 mov ecx, 38h ; '8' call qword ptr [rax+210h] mov r8d, 4 mov edi, r14d mov rsi, r12 mov rdx, r15 mov rcx, r13 call my_pread mov r12, rax xor esi, esi test rax, rax cmovz rsi, r15 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_40] call qword ptr [rax+218h] jmp loc_72C9C loc_72EC9: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_38], rcx mov rdi, rcx mov rsi, r14 mov ecx, 5Fh ; '_' call qword ptr [rax+210h] mov edi, ebx mov rsi, r12 mov rdx, r14 mov rcx, r13 xor r8d, r8d call my_pread mov rbx, rax cmp rax, 0FFFFFFFFFFFFFFFFh mov esi, 0 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_38] call qword ptr [rax+218h] jmp loc_72D67
long long ma_read_cache(_DWORD *a1, long long *a2, long long a3, unsigned long long a4, unsigned long long a5, int a6) { unsigned long long v6; // r14 unsigned long long v7; // r13 unsigned long long v10; // rax unsigned long long v11; // rcx unsigned long long v12; // r15 long long v13; // rax long long v14; // r12 unsigned long long v15; // rcx long long v16; // rsi long long v17; // rsi unsigned long long v18; // r15 unsigned int v19; // ebx long long v20; // rax long long v21; // rdi long long v22; // rbx long long v23; // rcx long long v24; // rax long long v26; // rdx long long v27; // rcx long long v28; // r8 int v29; // r9d _DWORD *v30; // rdi unsigned long long v31; // rsi long long v32; // rax long long v33; // rsi _BYTE v34[72]; // [rsp+8h] [rbp-98h] BYREF _DWORD *v35; // [rsp+50h] [rbp-50h] unsigned long long v36; // [rsp+58h] [rbp-48h] long long v37; // [rsp+60h] [rbp-40h] long long v38; // [rsp+68h] [rbp-38h] int v39; // [rsp+74h] [rbp-2Ch] v39 = a6; v7 = a4; v35 = a1; if ( a2[1] <= a4 ) { LOBYTE(v6) = -1; if ( (v39 & 2) != 0 ) return (unsigned int)v6; } v10 = *a2; v11 = *a2 - a4; if ( *a2 > v7 ) { v12 = (unsigned int)v11; v36 = a5; if ( v11 >= a5 ) v12 = a5; *((_DWORD *)a2 + 56) = 1; LODWORD(v6) = *((_DWORD *)a2 + 53); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, (unsigned int)v6, 6LL); v38 = a3; if ( v13 ) { v37 = v13; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v13, v12, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 56LL); v14 = my_pread((unsigned int)v6, a3, v12, v7, 4LL); v31 = 0LL; if ( !v14 ) v31 = v12; ((void ( *)(long long, unsigned long long))PSI_server[67])(v37, v31); } else { v14 = my_pread((unsigned int)v6, a3, v12, v7, 4LL); } LOBYTE(v6) = 1; if ( v14 ) return (unsigned int)v6; a5 = v36 - v12; if ( v36 == v12 ) { LABEL_30: LODWORD(v6) = 0; return (unsigned int)v6; } v7 += v12; a3 = v12 + v38; v10 = *a2; } v15 = v7 - v10; if ( v7 < v10 || (v16 = a2[5], v15 >= a2[3] - v16) ) { v18 = 0LL; } else { v17 = (unsigned int)v15 + v16; v18 = a2[3] - v17; if ( a5 < v18 ) v18 = a5; v6 = a5; memcpy(a3, v17, v18); a5 = v6 - v18; if ( v6 == v18 ) goto LABEL_30; v7 += v18; a3 += v18; } if ( (v39 & 1) != 0 ) { v23 = a2[3]; v24 = a2[5]; if ( v7 != *a2 + (unsigned int)(v23 - v24) ) { *a2 = v7; a2[3] = v24; *((_DWORD *)a2 + 56) = 1; v23 = v24; } a2[2] = v23; v21 = (long long)a2; if ( !(unsigned int)my_b_read(a2, a3, a5) ) goto LABEL_30; v22 = *((int *)a2 + 57); } else { v6 = a5; *((_DWORD *)a2 + 56) = 1; v19 = *((_DWORD *)a2 + 53); v20 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v19, 6LL); if ( v20 ) { v38 = v20; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v20, v6, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 95LL); v32 = my_pread(v19, a3, v6, v7, 0LL); v22 = v32; v33 = 0LL; if ( v32 != -1 ) v33 = v32; v21 = v38; ((void ( *)(long long, long long))PSI_server[67])(v38, v33); } else { v21 = v19; v22 = my_pread(v19, a3, v6, v7, 0LL); } if ( v22 == v6 ) goto LABEL_30; } if ( (v39 & 2) == 0 || (_DWORD)v22 == -1 || v22 + v18 <= 2 ) { if ( (v39 & 2) == 0 || (LOBYTE(v6) = -1, v22 != -(long long)v18) ) { if ( !*(_DWORD *)my_thread_var(v21) || (LOBYTE(v6) = 1, *(_DWORD *)my_thread_var(v21) == 175) ) { v30 = v35; if ( !*((_BYTE *)v35 + 1667) ) ma_set_fatal_error(v35, 175, v26, v27, v28, v29); LOBYTE(v6) = 1; if ( !*(_DWORD *)my_thread_var(v30) ) *(_DWORD *)my_thread_var(v30) = 127; } } } else { LODWORD(v6) = 0; memset(v22 + a3, 0LL, 20 - (v22 + v18)); } return (unsigned int)v6; }
_ma_read_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV dword ptr [RBP + -0x2c],R9D MOV R13,RCX MOV R12,RDX MOV RBX,RSI MOV qword ptr [RBP + -0x50],RDI CMP qword ptr [RSI + 0x8],RCX JBE 0x00172e55 LAB_00172c28: MOV RAX,qword ptr [RBX] MOV RCX,RAX SUB RCX,R13 JBE 0x00172cc2 CMP RCX,R8 MOV R15D,ECX MOV qword ptr [RBP + -0x48],R8 CMOVNC R15,R8 MOV dword ptr [RBX + 0xe0],0x1 MOV R14D,dword ptr [RBX + 0xd4] LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x38],R12 JNZ 0x00172e64 MOV R8D,0x4 MOV EDI,R14D MOV RSI,R12 MOV RDX,R15 MOV RCX,R13 CALL 0x001a1b9c MOV R12,RAX LAB_00172c9c: MOV R14B,0x1 TEST R12,R12 MOV R12,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x48] JNZ 0x00172de7 SUB R8,R15 JZ 0x00172de4 ADD R13,R15 ADD R12,R15 MOV RAX,qword ptr [RBX] LAB_00172cc2: MOV RCX,R13 SUB RCX,RAX JC 0x00172d0e MOV R15,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x28] MOV RAX,R15 SUB RAX,RSI CMP RCX,RAX JNC 0x00172d0e MOV EAX,ECX ADD RSI,RAX SUB R15,RSI CMP R8,R15 CMOVC R15,R8 MOV RDI,R12 MOV RDX,R15 MOV R14,R8 CALL 0x00129080 MOV R8,R14 SUB R8,R15 JZ 0x00172de4 ADD R13,R15 ADD R12,R15 JMP 0x00172d11 LAB_00172d0e: XOR R15D,R15D LAB_00172d11: TEST byte ptr [RBP + -0x2c],0x1 JNZ 0x00172d6e MOV R14,R8 MOV dword ptr [RBX + 0xe0],0x1 MOV EBX,dword ptr [RBX + 0xd4] LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00172ec9 MOV EDI,EBX MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 XOR R8D,R8D CALL 0x001a1b9c MOV RBX,RAX LAB_00172d67: CMP RBX,R14 JNZ 0x00172db3 JMP 0x00172de4 LAB_00172d6e: MOV RCX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RBX + 0x28] MOV EDX,ECX SUB EDX,EAX ADD RDX,qword ptr [RBX] CMP R13,RDX JZ 0x00172d96 MOV qword ptr [RBX],R13 MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0xe0],0x1 MOV RCX,RAX LAB_00172d96: MOV qword ptr [RBX + 0x10],RCX MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 CALL 0x00196d6a TEST EAX,EAX JZ 0x00172de4 MOVSXD RBX,dword ptr [RBX + 0xe4] LAB_00172db3: TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00172df9 MOV EAX,EBX CMP EAX,-0x1 JZ 0x00172df9 LEA RAX,[RBX + R15*0x1] CMP RAX,0x2 JBE 0x00172df9 ADD R12,RBX MOV EDX,0x14 SUB RDX,RAX XOR R14D,R14D MOV RDI,R12 XOR ESI,ESI CALL 0x00129270 JMP 0x00172de7 LAB_00172de4: XOR R14D,R14D LAB_00172de7: MOV EAX,R14D ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172df9: TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00172e0a NEG R15 MOV R14B,0xff CMP RBX,R15 JZ 0x00172de7 LAB_00172e0a: CALL 0x001a319a CMP dword ptr [RAX],0x0 JZ 0x00172e24 CALL 0x001a319a MOV R14B,0x1 CMP dword ptr [RAX],0xaf JNZ 0x00172de7 LAB_00172e24: MOV RDI,qword ptr [RBP + -0x50] CMP byte ptr [RDI + 0x683],0x0 JNZ 0x00172e3b MOV ESI,0xaf CALL 0x00137328 LAB_00172e3b: CALL 0x001a319a MOV R14B,0x1 CMP dword ptr [RAX],0x0 JNZ 0x00172de7 CALL 0x001a319a MOV dword ptr [RAX],0x7f JMP 0x00172de7 LAB_00172e55: MOV R14B,0xff TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00172c28 JMP 0x00172de7 LAB_00172e64: MOV RCX,RAX LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dbaba] MOV qword ptr [RBP + -0x40],RCX MOV RDI,RCX MOV RSI,R15 MOV ECX,0x38 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,R14D MOV RSI,R12 MOV RDX,R15 MOV RCX,R13 CALL 0x001a1b9c MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R15 LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] JMP 0x00172c9c LAB_00172ec9: MOV RCX,RAX LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dbaba] MOV qword ptr [RBP + -0x38],RCX MOV RDI,RCX MOV RSI,R14 MOV ECX,0x5f CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 XOR R8D,R8D CALL 0x001a1b9c MOV RBX,RAX CMP RAX,-0x1 MOV ESI,0x0 CMOVNZ RSI,RAX LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x38] CALL qword ptr [RAX + 0x218] JMP 0x00172d67
ulong _ma_read_cache(long param_1,ulong *param_2,void *param_3,ulong param_4,ulong param_5, uint param_6) { int4 uVar1; int iVar2; long lVar3; ulong uVar4; ulong uVar5; int *piVar6; int4 *puVar7; ulong uVar8; ulong uVar9; void *pvVar10; ulong unaff_R14; int1 local_a0 [72]; long local_58; ulong local_50; long local_48; void *local_40; uint local_34; if ((param_2[1] <= param_4) && (unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),0xff), (param_6 & 2) != 0)) goto LAB_00172de7; uVar4 = *param_2; uVar8 = uVar4 - param_4; local_58 = param_1; local_34 = param_6; if (uVar4 < param_4 || uVar8 == 0) { LAB_00172cc2: if (param_4 < uVar4) { LAB_00172d0e: uVar8 = 0; uVar4 = param_5; } else { if (param_2[3] - param_2[5] <= param_4 - uVar4) goto LAB_00172d0e; pvVar10 = (void *)(param_2[5] + (param_4 - uVar4 & 0xffffffff)); uVar8 = param_2[3] - (long)pvVar10; if (param_5 < uVar8) { uVar8 = param_5; } memcpy(param_3,pvVar10,uVar8); if (param_5 - uVar8 == 0) goto LAB_00172de4; param_4 = param_4 + uVar8; param_3 = (void *)((long)param_3 + uVar8); uVar4 = param_5 - uVar8; unaff_R14 = param_5; } if ((local_34 & 1) == 0) { *(int4 *)(param_2 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_2 + 0xd4); pvVar10 = (void *)(**(code **)(PSI_server + 0x158))(local_a0,uVar1,6); if (pvVar10 == (void *)0x0) { uVar5 = my_pread(uVar1,param_3,uVar4,param_4,0); } else { local_40 = pvVar10; (**(code **)(PSI_server + 0x210)) (pvVar10,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c" ,0x5f); uVar5 = my_pread(uVar1,param_3,uVar4,param_4,0); (**(code **)(PSI_server + 0x218))(local_40); } unaff_R14 = uVar4; if (uVar5 != uVar4) { LAB_00172db3: if ((((local_34 & 2) == 0) || ((int)uVar5 == -1)) || (uVar5 + uVar8 < 3)) { if (((local_34 & 2) == 0) || (unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),0xff), uVar5 != -uVar8)) { piVar6 = (int *)_my_thread_var(); if (*piVar6 != 0) { piVar6 = (int *)_my_thread_var(); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (*piVar6 != 0xaf) goto LAB_00172de7; } if (*(char *)(local_58 + 0x683) == '\0') { _ma_set_fatal_error(local_58,0xaf); } piVar6 = (int *)_my_thread_var(); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (*piVar6 == 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x7f; } } } else { unaff_R14 = 0; memset((void *)((long)param_3 + uVar5),0,0x14 - (uVar5 + uVar8)); } goto LAB_00172de7; } } else { uVar5 = param_2[5]; uVar9 = param_2[3]; if (param_4 != (ulong)(uint)((int)param_2[3] - (int)uVar5) + *param_2) { *param_2 = param_4; param_2[3] = uVar5; *(int4 *)(param_2 + 0x1c) = 1; uVar9 = uVar5; } param_2[2] = uVar9; iVar2 = _my_b_read(param_2,param_3,uVar4); if (iVar2 != 0) { uVar5 = (ulong)*(int *)((long)param_2 + 0xe4); goto LAB_00172db3; } } } else { uVar4 = uVar8 & 0xffffffff; if (param_5 <= uVar8) { uVar4 = param_5; } *(int4 *)(param_2 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_2 + 0xd4); local_50 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_a0,uVar1,6); local_40 = param_3; if (lVar3 == 0) { lVar3 = my_pread(uVar1,param_3,uVar4,param_4,4); } else { local_48 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 0x38); lVar3 = my_pread(uVar1,param_3,uVar4,param_4,4); uVar8 = 0; if (lVar3 == 0) { uVar8 = uVar4; } (**(code **)(PSI_server + 0x218))(local_48,uVar8); } unaff_R14 = CONCAT71((uint7)(uint3)((uint)uVar1 >> 8),1); if (lVar3 != 0) goto LAB_00172de7; param_5 = local_50 - uVar4; if (param_5 != 0) { param_4 = param_4 + uVar4; param_3 = (void *)((long)local_40 + uVar4); uVar4 = *param_2; goto LAB_00172cc2; } } LAB_00172de4: unaff_R14 = 0; LAB_00172de7: return unaff_R14 & 0xffffffff; }
38,867
iq2xs_free_impl
monkey531[P]llama/ggml/src/ggml-quants.c
void iq2xs_free_impl(enum ggml_type type) { GGML_ASSERT(type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S); const int gindex = iq2_data_index(type); if (iq2_data[gindex].grid) { free(iq2_data[gindex].grid); iq2_data[gindex].grid = NULL; free(iq2_data[gindex].map); iq2_data[gindex].map = NULL; free(iq2_data[gindex].neighbours); iq2_data[gindex].neighbours = NULL; } }
O3
c
iq2xs_free_impl: pushq %r14 pushq %rbx pushq %rax leal -0x10(%rdi), %eax cmpl $0x6, %eax ja 0x33758 leaq 0x1b381(%rip), %rcx # 0x4eacc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax xorl %eax, %eax jmp 0x33779 cmpl $0x1d, %edi jne 0x337be cmpl $0x1d, %edi sete %al cmpl $0x13, %edi sete %cl orb %al, %cl movzbl %cl, %eax xorq $0x3, %rax jmp 0x33779 movl $0x1, %eax leaq (%rax,%rax,2), %rax leaq 0x77b0c(%rip), %rcx # 0xab290 movq (%rcx,%rax,8), %rdi testq %rdi, %rdi je 0x337b6 leaq (%rcx,%rax,8), %rbx callq 0x173b0 xorl %r14d, %r14d movq %r14, (%rbx) movq 0x8(%rbx), %rdi callq 0x173b0 movq %r14, 0x8(%rbx) movq 0x10(%rbx), %rdi callq 0x173b0 movq %r14, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x25c53(%rip), %rdi # 0x59418 leaq 0x16e91(%rip), %rdx # 0x4a65d leaq 0x25c96(%rip), %rcx # 0x59469 movl $0xb69, %esi # imm = 0xB69 xorl %eax, %eax callq 0x17c60
iq2xs_free_impl: push r14 push rbx push rax lea eax, [rdi-10h]; switch 7 cases cmp eax, 6 ja short def_33752; jumptable 0000000000033752 default case lea rcx, jpt_33752 movsxd rax, ds:(jpt_33752 - 4EACCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_33754: xor eax, eax; jumptable 0000000000033752 case 16 jmp short loc_33779 def_33752: cmp edi, 1Dh; jumptable 0000000000033752 default case jnz short loc_337BE; jumptable 0000000000033752 cases 18,20,21 loc_3375D: cmp edi, 1Dh; jumptable 0000000000033752 cases 19,22 setz al cmp edi, 13h setz cl or cl, al movzx eax, cl xor rax, 3 jmp short loc_33779 loc_33774: mov eax, 1; jumptable 0000000000033752 case 17 loc_33779: lea rax, [rax+rax*2] lea rcx, iq2_data mov rdi, [rcx+rax*8] test rdi, rdi jz short loc_337B6 lea rbx, [rcx+rax*8] call _free xor r14d, r14d mov [rbx], r14 mov rdi, [rbx+8] call _free mov [rbx+8], r14 mov rdi, [rbx+10h] call _free mov [rbx+10h], r14 loc_337B6: add rsp, 8 pop rbx pop r14 retn loc_337BE: lea rdi, aWorkspaceLlm4b_4; jumptable 0000000000033752 cases 18,20,21 lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTypeGgmlTypeIq; "type == GGML_TYPE_IQ2_XXS || type == GG"... mov esi, 0B69h xor eax, eax call _ggml_abort
long long iq2xs_free_impl(int a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax long long result; // rax long long v8; // rdi long long *v9; // rbx switch ( a1 ) { case 16: v6 = 0LL; goto LABEL_6; case 17: v6 = 1LL; goto LABEL_6; case 18: case 20: case 21: goto LABEL_9; case 19: case 22: goto LABEL_4; default: if ( a1 != 29 ) LABEL_9: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-quants.c", 2921, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML" "_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S", a5, a6); LABEL_4: v6 = ((a1 == 29) | (unsigned __int8)(a1 == 19)) ^ 3LL; LABEL_6: result = 3 * v6; v8 = iq2_data[result]; if ( v8 ) { v9 = &iq2_data[result]; free(v8); *v9 = 0LL; free(v9[1]); v9[1] = 0LL; result = free(v9[2]); v9[2] = 0LL; } return result; } }
iq2xs_free_impl: PUSH R14 PUSH RBX PUSH RAX LEA EAX,[RDI + -0x10] CMP EAX,0x6 JA 0x00133758 LEA RCX,[0x14eacc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_10: XOR EAX,EAX JMP 0x00133779 default: CMP EDI,0x1d JNZ 0x001337be caseD_13: CMP EDI,0x1d SETZ AL CMP EDI,0x13 SETZ CL OR CL,AL MOVZX EAX,CL XOR RAX,0x3 JMP 0x00133779 caseD_11: MOV EAX,0x1 LAB_00133779: LEA RAX,[RAX + RAX*0x2] LEA RCX,[0x1ab290] MOV RDI,qword ptr [RCX + RAX*0x8] TEST RDI,RDI JZ 0x001337b6 LEA RBX,[RCX + RAX*0x8] CALL 0x001173b0 XOR R14D,R14D MOV qword ptr [RBX],R14 MOV RDI,qword ptr [RBX + 0x8] CALL 0x001173b0 MOV qword ptr [RBX + 0x8],R14 MOV RDI,qword ptr [RBX + 0x10] CALL 0x001173b0 MOV qword ptr [RBX + 0x10],R14 LAB_001337b6: ADD RSP,0x8 POP RBX POP R14 RET caseD_12: LEA RDI,[0x159418] LEA RDX,[0x14a65d] LEA RCX,[0x159469] MOV ESI,0xb69 XOR EAX,EAX CALL 0x00117c60
void iq2xs_free_impl(int param_1) { ulong uVar1; switch(param_1) { case 0x10: uVar1 = 0; break; case 0x11: uVar1 = 1; break; case 0x12: case 0x14: case 0x15: switchD_00133752_caseD_12: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-quants.c", 0xb69,"GGML_ASSERT(%s) failed", "type == GGML_TYPE_IQ2_XXS || type == GGML_TYPE_IQ2_XS || type == GGML_TYPE_IQ1_S || type == GGML_TYPE_IQ1_M || type == GGML_TYPE_IQ2_S" ); default: if (param_1 != 0x1d) goto switchD_00133752_caseD_12; case 0x13: case 0x16: uVar1 = (ulong)(param_1 == 0x13 || param_1 == 0x1d) ^ 3; } if ((void *)(&iq2_data)[uVar1 * 3] != (void *)0x0) { free((void *)(&iq2_data)[uVar1 * 3]); (&iq2_data)[uVar1 * 3] = 0; free((void *)(&DAT_001ab298)[uVar1 * 3]); (&DAT_001ab298)[uVar1 * 3] = 0; free((void *)(&DAT_001ab2a0)[uVar1 * 3]); (&DAT_001ab2a0)[uVar1 * 3] = 0; } return; }
38,868
test_out_prod::build_graph(ggml_context*)
monkey531[P]llama/tests/test-backend-ops.cpp
ggml_tensor * build_graph(ggml_context * ctx) override { ggml_tensor * a = ggml_new_tensor_4d(ctx, type_a, m, k, bs[0], bs[1]); ggml_set_name(a, "a"); ggml_tensor * b; if (trans_b) { b = ggml_new_tensor_4d(ctx, type_b, k, n, bs[0]*nr[0], bs[1]*nr[1]); b = ggml_transpose(ctx, b); } else { b = ggml_new_tensor_4d(ctx, type_b, n, k, bs[0]*nr[0], bs[1]*nr[1]); } ggml_set_name(b, "b"); ggml_tensor * out = ggml_out_prod(ctx, a, b); ggml_set_name(out, "out"); return out; }
O3
cpp
test_out_prod::build_graph(ggml_context*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r15 movl 0x38(%rdi), %esi movq 0x40(%rdi), %rdx movq 0x50(%rdi), %rcx movq 0x58(%rdi), %r8 movq 0x60(%rdi), %r9 movq %rbx, %rdi callq 0xdc00 movq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi callq 0x1b8ae leaq 0x12823(%rip), %rsi # 0x44b87 movq %r14, %rdi callq 0xdb10 movl 0x3c(%r15), %esi movq 0x68(%r15), %r8 imulq 0x58(%r15), %r8 movq 0x70(%r15), %r9 imulq 0x60(%r15), %r9 cmpb $0x1, 0x78(%r15) jne 0x323b7 movq 0x48(%r15), %rcx movq 0x50(%r15), %rdx movq %rbx, %rdi callq 0xdc00 movq %rax, %r12 movq %r15, %rdi movq %rbx, %rsi callq 0x1b8ae movq %rbx, %rdi movq %r12, %rsi callq 0xd7c0 movq %rax, %r12 jmp 0x323d5 movq 0x48(%r15), %rdx movq 0x50(%r15), %rcx movq %rbx, %rdi callq 0xdc00 movq %rax, %r12 movq %r15, %rdi movq %rbx, %rsi callq 0x1b8ae leaq 0x12b09(%rip), %rsi # 0x44ee5 movq %r12, %rdi callq 0xdb10 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0xd590 movq %rax, %rbx leaq 0x12d32(%rip), %rsi # 0x4512e movq %rax, %rdi callq 0xdb10 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN13test_out_prod11build_graphEP12ggml_context: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r15, rdi mov esi, [rdi+38h] mov rdx, [rdi+40h] mov rcx, [rdi+50h] mov r8, [rdi+58h] mov r9, [rdi+60h] mov rdi, rbx call _ggml_new_tensor_4d mov r14, rax mov rdi, r15 mov rsi, rbx call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *) lea rsi, aViewOfA+8; "a" mov rdi, r14 call _ggml_set_name mov esi, [r15+3Ch] mov r8, [r15+68h] imul r8, [r15+58h] mov r9, [r15+70h] imul r9, [r15+60h] cmp byte ptr [r15+78h], 1 jnz short loc_323B7 mov rcx, [r15+48h] mov rdx, [r15+50h] mov rdi, rbx call _ggml_new_tensor_4d mov r12, rax mov rdi, r15 mov rsi, rbx call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *) mov rdi, rbx mov rsi, r12 call _ggml_transpose mov r12, rax jmp short loc_323D5 loc_323B7: mov rdx, [r15+48h] mov rcx, [r15+50h] mov rdi, rbx call _ggml_new_tensor_4d mov r12, rax mov rdi, r15 mov rsi, rbx call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *) loc_323D5: lea rsi, aViewOfB+8; "b" mov rdi, r12 call _ggml_set_name mov rdi, rbx mov rsi, r14 mov rdx, r12 call _ggml_out_prod mov rbx, rax lea rsi, aSumOfOut+7; "out" mov rdi, rax call _ggml_set_name mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long test_out_prod::build_graph(long long a1, long long a2) { long long v4; // r14 long long v5; // rsi long long v6; // r8 long long v7; // r9 long long v8; // r12 long long v9; // r12 long long v10; // rbx v4 = ggml_new_tensor_4d( a2, *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64), *(_QWORD *)(a1 + 80), *(_QWORD *)(a1 + 88), *(_QWORD *)(a1 + 96)); test_case::add_sentinel(a1, a2); ggml_set_name(v4, "a"); v5 = *(unsigned int *)(a1 + 60); v6 = *(_QWORD *)(a1 + 88) * *(_QWORD *)(a1 + 104); v7 = *(_QWORD *)(a1 + 96) * *(_QWORD *)(a1 + 112); if ( *(_BYTE *)(a1 + 120) == 1 ) { v8 = ggml_new_tensor_4d(a2, v5, *(_QWORD *)(a1 + 80), *(_QWORD *)(a1 + 72), v6, v7); test_case::add_sentinel(a1, a2); v9 = ggml_transpose(a2, v8); } else { v9 = ggml_new_tensor_4d(a2, v5, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), v6, v7); test_case::add_sentinel(a1, a2); } ggml_set_name(v9, "b"); v10 = ggml_out_prod(a2, v4, v9); ggml_set_name(v10, "out"); return v10; }
build_graph: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R15,RDI MOV ESI,dword ptr [RDI + 0x38] MOV RDX,qword ptr [RDI + 0x40] MOV RCX,qword ptr [RDI + 0x50] MOV R8,qword ptr [RDI + 0x58] MOV R9,qword ptr [RDI + 0x60] MOV RDI,RBX CALL 0x0010dc00 MOV R14,RAX MOV RDI,R15 MOV RSI,RBX CALL 0x0011b8ae LEA RSI,[0x144b87] MOV RDI,R14 CALL 0x0010db10 MOV ESI,dword ptr [R15 + 0x3c] MOV R8,qword ptr [R15 + 0x68] IMUL R8,qword ptr [R15 + 0x58] MOV R9,qword ptr [R15 + 0x70] IMUL R9,qword ptr [R15 + 0x60] CMP byte ptr [R15 + 0x78],0x1 JNZ 0x001323b7 MOV RCX,qword ptr [R15 + 0x48] MOV RDX,qword ptr [R15 + 0x50] MOV RDI,RBX CALL 0x0010dc00 MOV R12,RAX MOV RDI,R15 MOV RSI,RBX CALL 0x0011b8ae MOV RDI,RBX MOV RSI,R12 CALL 0x0010d7c0 MOV R12,RAX JMP 0x001323d5 LAB_001323b7: MOV RDX,qword ptr [R15 + 0x48] MOV RCX,qword ptr [R15 + 0x50] MOV RDI,RBX CALL 0x0010dc00 MOV R12,RAX MOV RDI,R15 MOV RSI,RBX CALL 0x0011b8ae LAB_001323d5: LEA RSI,[0x144ee5] MOV RDI,R12 CALL 0x0010db10 MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 CALL 0x0010d590 MOV RBX,RAX LEA RSI,[0x14512e] MOV RDI,RAX CALL 0x0010db10 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* test_out_prod::build_graph(ggml_context*) */ int8 __thiscall test_out_prod::build_graph(test_out_prod *this,ggml_context *param_1) { int8 uVar1; int8 uVar2; uVar1 = ggml_new_tensor_4d(param_1,*(int4 *)(this + 0x38),*(int8 *)(this + 0x40), *(int8 *)(this + 0x50),*(int8 *)(this + 0x58), *(int8 *)(this + 0x60)); test_case::add_sentinel((test_case *)this,param_1); ggml_set_name(uVar1,"a"); if (this[0x78] == (test_out_prod)0x1) { uVar2 = ggml_new_tensor_4d(param_1,*(int4 *)(this + 0x3c),*(int8 *)(this + 0x50), *(int8 *)(this + 0x48), *(long *)(this + 0x68) * *(long *)(this + 0x58), *(long *)(this + 0x70) * *(long *)(this + 0x60)); test_case::add_sentinel((test_case *)this,param_1); uVar2 = ggml_transpose(param_1,uVar2); } else { uVar2 = ggml_new_tensor_4d(param_1,*(int4 *)(this + 0x3c),*(int8 *)(this + 0x48), *(int8 *)(this + 0x50), *(long *)(this + 0x68) * *(long *)(this + 0x58), *(long *)(this + 0x70) * *(long *)(this + 0x60)); test_case::add_sentinel((test_case *)this,param_1); } ggml_set_name(uVar2,"b"); uVar1 = ggml_out_prod(param_1,uVar1,uVar2); ggml_set_name(uVar1,"out"); return uVar1; }
38,869
ggml_compute_forward_win_unpart
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_win_unpart( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_win_unpart_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_win_unpart: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x1918a jmp 0x1917b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x38980 jmp 0x191a4 leaq 0x5a9d1(%rip), %rdi # 0x73b62 movl $0x2d4c, %esi # imm = 0x2D4C leaq 0x5ac20(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_win_unpart: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] test eax, eax jnz short loc_1918A jmp short $+2 loc_1917B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_win_unpart_f32 jmp short loc_191A4 loc_1918A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2D4Ch lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_191A4: add rsp, 20h pop rbp retn
double ggml_compute_forward_win_unpart(long long a1, long long a2) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 11596LL, "fatal error"); ggml_compute_forward_win_unpart_f32(a1, a2); return result; }
ggml_compute_forward_win_unpart: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x0011918a JMP 0x0011917b LAB_0011917b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00138980 JMP 0x001191a4 LAB_0011918a: LEA RDI,[0x173b62] MOV ESI,0x2d4c LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_001191a4: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_win_unpart(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_win_unpart_f32(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2d4c,"fatal error"); } return; }
38,870
reset_root_defaults
eloqsql/mysys/my_alloc.c
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | (mem_root->block_size & 1)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) { USED_MEM *mem, **prev= &mem_root->free; /* Free unused blocks, so that consequent calls to reset_root_defaults won't eat away memory. */ while (*prev) { mem= *prev; if (mem->size == size) { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { /* remove block from the list and free it */ *prev= mem->next; my_free(mem); } else prev= &mem->next; } /* Allocate new prealloc block and add it to the end of free list */ if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size, MYF(MALLOC_FLAG(mem_root-> block_size))))) { mem->size= size; mem->left= pre_alloc_size; mem->next= *prev; *prev= mem_root->pre_alloc= mem; TRASH_MEM(mem); } else { mem_root->pre_alloc= 0; } } } else #endif mem_root->pre_alloc= 0; DBUG_VOID_RETURN; }
O0
c
reset_root_defaults: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x3c8f6 movq -0x10(%rbp), %rcx subq $0x28, %rcx andq $-0x2, %rcx movq -0x8(%rbp), %rax movq 0x20(%rax), %rax andq $0x1, %rax orq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) cmpq $0x0, -0x18(%rbp) je 0x3ca4f movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x3c951 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax cmpq -0x20(%rbp), %rax je 0x3ca4d movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x3c9c6 movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x3c98d movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0x3ca5f movq -0x28(%rbp), %rax movq 0x8(%rax), %rax addq $0x18, %rax movq -0x28(%rbp), %rcx cmpq 0x10(%rcx), %rax jne 0x3c9bc movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rdi callq 0x325f0 jmp 0x3c9c4 movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x3c959 movq -0x8(%rbp), %rax movl 0x38(%rax), %edi movq -0x20(%rbp), %rsi movq -0x8(%rbp), %rax movq 0x20(%rax), %rdx andq $0x1, %rdx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpq $0x0, %rdx cmovnel %ecx, %eax movl %eax, %eax movl %eax, %edx callq 0x32270 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x3ca3f movq -0x20(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax movq %rcx, (%rax) jmp 0x3ca39 jmp 0x3ca3b jmp 0x3ca3d jmp 0x3ca4b movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x3ca4d jmp 0x3ca5b movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x3ca5d jmp 0x3ca5f addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
reset_root_defaults: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_3C8F6: mov rcx, [rbp+var_10] sub rcx, 28h ; '(' and rcx, 0FFFFFFFFFFFFFFFEh mov rax, [rbp+var_8] mov rax, [rax+20h] and rax, 1 or rcx, rax mov rax, [rbp+var_8] mov [rax+20h], rcx cmp [rbp+var_18], 0 jz loc_3CA4F mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_3C951 mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+10h] cmp rax, [rbp+var_20] jz loc_3CA4D loc_3C951: mov rax, [rbp+var_8] mov [rbp+var_30], rax loc_3C959: mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_3C9C6 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax+10h] cmp rax, [rbp+var_20] jnz short loc_3C98D mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp loc_3CA5F loc_3C98D: mov rax, [rbp+var_28] mov rax, [rax+8] add rax, 18h mov rcx, [rbp+var_28] cmp rax, [rcx+10h] jnz short loc_3C9BC mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_30] mov [rax], rcx mov rdi, [rbp+var_28] call my_free jmp short loc_3C9C4 loc_3C9BC: mov rax, [rbp+var_28] mov [rbp+var_30], rax loc_3C9C4: jmp short loc_3C959 loc_3C9C6: mov rax, [rbp+var_8] mov edi, [rax+38h] mov rsi, [rbp+var_20] mov rax, [rbp+var_8] mov rdx, [rax+20h] and rdx, 1 xor eax, eax mov ecx, 10000h cmp rdx, 0 cmovnz eax, ecx mov eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp rax, 0 jz short loc_3CA3F mov rcx, [rbp+var_20] mov rax, [rbp+var_28] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rax+8], rcx mov rax, [rbp+var_30] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_30] mov [rax], rcx jmp short $+2 loc_3CA39: jmp short $+2 loc_3CA3B: jmp short $+2 loc_3CA3D: jmp short loc_3CA4B loc_3CA3F: mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_3CA4B: jmp short $+2 loc_3CA4D: jmp short loc_3CA5B loc_3CA4F: mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_3CA5B: jmp short $+2 loc_3CA5D: jmp short $+2 loc_3CA5F: add rsp, 30h pop rbp retn
long long * reset_root_defaults(long long *a1, long long a2, long long a3) { long long *result; // rax unsigned int v4; // edi int v5; // eax long long *v6; // [rsp+0h] [rbp-30h] long long *v7; // [rsp+8h] [rbp-28h] _QWORD *v8; // [rsp+8h] [rbp-28h] unsigned long long v9; // [rsp+10h] [rbp-20h] a1[4] = a1[4] & 1 | (a2 - 40) & 0xFFFFFFFFFFFFFFFELL; if ( a3 ) { v9 = a3 + 24; if ( !a1[2] || (result = *(long long **)(a1[2] + 16), result != (long long *)v9) ) { v6 = a1; while ( *v6 ) { v7 = (long long *)*v6; if ( *(_QWORD *)(*v6 + 16) == v9 ) { result = a1; a1[2] = (long long)v7; return result; } if ( v7[1] + 24 == v7[2] ) { *v6 = *v7; my_free((long long)v7); } else { v6 = (long long *)*v6; } } v4 = *((_DWORD *)a1 + 14); v5 = 0; if ( (a1[4] & 1) != 0 ) v5 = 0x10000; v8 = (_QWORD *)my_malloc(v4, v9, v5); if ( v8 ) { v8[2] = v9; v8[1] = a3; *v8 = *v6; a1[2] = (long long)v8; result = v6; *v6 = (long long)v8; } else { result = a1; a1[2] = 0LL; } } } else { result = a1; a1[2] = 0LL; } return result; }
reset_root_defaults: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0013c8f6 LAB_0013c8f6: MOV RCX,qword ptr [RBP + -0x10] SUB RCX,0x28 AND RCX,-0x2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x1 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013ca4f MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x0013c951 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0013ca4d LAB_0013c951: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX LAB_0013c959: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x0013c9c6 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0013c98d MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x0013ca5f LAB_0013c98d: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,0x18 MOV RCX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RCX + 0x10] JNZ 0x0013c9bc MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001325f0 JMP 0x0013c9c4 LAB_0013c9bc: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX LAB_0013c9c4: JMP 0x0013c959 LAB_0013c9c6: MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x20] AND RDX,0x1 XOR EAX,EAX MOV ECX,0x10000 CMP RDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV EDX,EAX CALL 0x00132270 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x0013ca3f MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX JMP 0x0013ca39 LAB_0013ca39: JMP 0x0013ca3b LAB_0013ca3b: JMP 0x0013ca3d LAB_0013ca3d: JMP 0x0013ca4b LAB_0013ca3f: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_0013ca4b: JMP 0x0013ca4d LAB_0013ca4d: JMP 0x0013ca5b LAB_0013ca4f: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_0013ca5b: JMP 0x0013ca5d LAB_0013ca5d: JMP 0x0013ca5f LAB_0013ca5f: ADD RSP,0x30 POP RBP RET
void reset_root_defaults(long *param_1,long param_2,long param_3) { int4 uVar1; long lVar2; long *plVar3; long *local_38; param_1[4] = param_2 - 0x28U & 0xfffffffffffffffe | param_1[4] & 1U; if (param_3 == 0) { param_1[2] = 0; } else { lVar2 = param_3 + 0x18; plVar3 = param_1; if ((param_1[2] == 0) || (plVar3 = param_1, *(long *)(param_1[2] + 0x10) != lVar2)) { while (local_38 = plVar3, *local_38 != 0) { plVar3 = (long *)*local_38; if (plVar3[2] == lVar2) { param_1[2] = (long)plVar3; return; } if (plVar3[1] + 0x18 == plVar3[2]) { *local_38 = *plVar3; my_free(plVar3); plVar3 = local_38; } } uVar1 = 0; if ((param_1[4] & 1U) != 0) { uVar1 = 0x10000; } plVar3 = (long *)my_malloc((int)param_1[7],lVar2,uVar1); if (plVar3 == (long *)0x0) { param_1[2] = 0; } else { plVar3[2] = lVar2; plVar3[1] = param_3; *plVar3 = *local_38; param_1[2] = (long)plVar3; *local_38 = (long)plVar3; } } } return; }
38,871
mult
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc) { Bigint *c; int k, wa, wb, wc; ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; ULong y; ULLong carry, z; if (a->wds < b->wds) { c= a; a= b; b= c; } k= a->k; wa= a->wds; wb= b->wds; wc= wa + wb; if (wc > a->maxwds) k++; c= Balloc(k, alloc); for (x= c->p.x, xa= x + wc; x < xa; x++) *x= 0; xa= a->p.x; xae= xa + wa; xb= b->p.x; xbe= xb + wb; xc0= c->p.x; for (; xb < xbe; xc0++) { if ((y= *xb++)) { x= xa; xc= xc0; carry= 0; do { z= *x++ * (ULLong)y + *xc + carry; carry= z >> 32; *xc++= (ULong) (z & FFFFFFFF); } while (x < xae); *xc= (ULong) carry; } } for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ; c->wds= wc; return c; }
O3
c
mult: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl 0x14(%rdi), %eax cmpl 0x14(%rsi), %eax movq %rsi, %r12 cmovlq %rdi, %r12 cmovlq %rsi, %r14 movslq 0x14(%r14), %rax movslq 0x14(%r12), %r13 movq %rax, -0x30(%rbp) leaq (%rax,%r13), %r15 xorl %edi, %edi cmpl 0xc(%r14), %r15d setg %dil addl 0x8(%r14), %edi movq %rdx, %rsi callq 0x2ba8b movq %rax, %rbx movq (%rax), %rdi testl %r15d, %r15d jle 0x2b7ae leaq (%rdi,%r15,4), %rax leaq 0x4(%rdi), %rcx cmpq %rcx, %rax cmovaq %rax, %rcx movq %rdi, %rdx notq %rdx addq %rcx, %rdx andq $-0x4, %rdx addq $0x4, %rdx xorl %esi, %esi callq 0x13270 movq (%rbx), %rdi testl %r13d, %r13d jle 0x2b816 movq (%r14), %rax movq -0x30(%rbp), %rcx leaq (%rax,%rcx,4), %rcx movq (%r12), %rdx leaq (%rdx,%r13,4), %rsi movl (%rdx), %r8d testq %r8, %r8 je 0x2b806 xorl %r9d, %r9d xorl %r10d, %r10d leaq (%rax,%r9), %r11 addq $0x4, %r11 movl -0x4(%r11), %r14d imulq %r8, %r14 movl (%rdi,%r9), %r12d addq %r10, %r12 addq %r14, %r12 movq %r12, %r10 shrq $0x20, %r10 movl %r12d, (%rdi,%r9) addq $0x4, %r9 cmpq %rcx, %r11 jb 0x2b7d4 movl %r10d, (%rdi,%r9) addq $0x4, %rdx addq $0x4, %rdi cmpq %rsi, %rdx jb 0x2b7c6 movq (%rbx), %rdi testl %r15d, %r15d jle 0x2b83c leaq (%rdi,%r15,4), %rax addq $-0x4, %rax cmpl $0x0, (%rax) jne 0x2b83c leal -0x1(%r15), %ecx addq $-0x4, %rax cmpl $0x1, %r15d movl %ecx, %r15d jg 0x2b823 xorl %r15d, %r15d movl %r15d, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mult: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov eax, [rdi+14h] cmp eax, [rsi+14h] mov r12, rsi cmovl r12, rdi cmovl r14, rsi movsxd rax, dword ptr [r14+14h] movsxd r13, dword ptr [r12+14h] mov [rbp+var_30], rax lea r15, [rax+r13] xor edi, edi cmp r15d, [r14+0Ch] setnle dil add edi, [r14+8] mov rsi, rdx call Balloc mov rbx, rax mov rdi, [rax] test r15d, r15d jle short loc_2B7AE lea rax, [rdi+r15*4] lea rcx, [rdi+4] cmp rax, rcx cmova rcx, rax mov rdx, rdi not rdx add rdx, rcx and rdx, 0FFFFFFFFFFFFFFFCh add rdx, 4 xor esi, esi call _memset mov rdi, [rbx] loc_2B7AE: test r13d, r13d jle short loc_2B816 mov rax, [r14] mov rcx, [rbp+var_30] lea rcx, [rax+rcx*4] mov rdx, [r12] lea rsi, [rdx+r13*4] loc_2B7C6: mov r8d, [rdx] test r8, r8 jz short loc_2B806 xor r9d, r9d xor r10d, r10d loc_2B7D4: lea r11, [rax+r9] add r11, 4 mov r14d, [r11-4] imul r14, r8 mov r12d, [rdi+r9] add r12, r10 add r12, r14 mov r10, r12 shr r10, 20h mov [rdi+r9], r12d add r9, 4 cmp r11, rcx jb short loc_2B7D4 mov [rdi+r9], r10d loc_2B806: add rdx, 4 add rdi, 4 cmp rdx, rsi jb short loc_2B7C6 mov rdi, [rbx] loc_2B816: test r15d, r15d jle short loc_2B83C lea rax, [rdi+r15*4] add rax, 0FFFFFFFFFFFFFFFCh loc_2B823: cmp dword ptr [rax], 0 jnz short loc_2B83C lea ecx, [r15-1] add rax, 0FFFFFFFFFFFFFFFCh cmp r15d, 1 mov r15d, ecx jg short loc_2B823 xor r15d, r15d loc_2B83C: mov [rbx+14h], r15d mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mult(long long *a1, long long *a2, long long a3, long long a4) { long long *v4; // r14 long long *v5; // r12 long long v6; // r13 long long v7; // r15 long long v8; // rbx long long v9; // rdi long long v10; // rcx long long v11; // rax unsigned long long v12; // rcx _DWORD *v13; // rdx unsigned long long v14; // rsi long long v15; // r8 long long v16; // r9 unsigned long long v17; // r10 unsigned long long v18; // r11 unsigned long long v19; // r12 _DWORD *v20; // rax bool v21; // cc long long v23; // [rsp+0h] [rbp-30h] v4 = a1; v5 = a2; if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) ) { v5 = a1; v4 = a2; } v6 = *((int *)v5 + 5); v23 = *((int *)v4 + 5); v7 = v23 + v6; v8 = Balloc(*((_DWORD *)v4 + 2) + (unsigned int)((int)v23 + (int)v6 > *((_DWORD *)v4 + 3)), a3, a3, a4); v9 = *(_QWORD *)v8; if ( (int)v23 + (int)v6 > 0 ) { v10 = v9 + 4; if ( v9 + 4 * v7 > (unsigned long long)(v9 + 4) ) v10 = v9 + 4 * v7; memset(v9, 0LL, ((v10 + ~v9) & 0xFFFFFFFFFFFFFFFCLL) + 4); v9 = *(_QWORD *)v8; } if ( (int)v6 > 0 ) { v11 = *v4; v12 = *v4 + 4 * v23; v13 = (_DWORD *)*v5; v14 = *v5 + 4 * v6; do { v15 = (unsigned int)*v13; if ( *v13 ) { v16 = 0LL; v17 = 0LL; do { v18 = v11 + v16 + 4; v19 = v15 * *(unsigned int *)(v11 + v16) + v17 + *(unsigned int *)(v9 + v16); v17 = HIDWORD(v19); *(_DWORD *)(v9 + v16) = v19; v16 += 4LL; } while ( v18 < v12 ); *(_DWORD *)(v9 + v16) = HIDWORD(v19); } ++v13; v9 += 4LL; } while ( (unsigned long long)v13 < v14 ); v9 = *(_QWORD *)v8; } if ( (int)v7 > 0 ) { v20 = (_DWORD *)(v9 + 4 * v7 - 4); while ( !*v20 ) { --v20; v21 = (int)v7 <= 1; LODWORD(v7) = v7 - 1; if ( v21 ) { LODWORD(v7) = 0; break; } } } *(_DWORD *)(v8 + 20) = v7; return v8; }
mult: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV EAX,dword ptr [RDI + 0x14] CMP EAX,dword ptr [RSI + 0x14] MOV R12,RSI CMOVL R12,RDI CMOVL R14,RSI MOVSXD RAX,dword ptr [R14 + 0x14] MOVSXD R13,dword ptr [R12 + 0x14] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RAX + R13*0x1] XOR EDI,EDI CMP R15D,dword ptr [R14 + 0xc] SETG DIL ADD EDI,dword ptr [R14 + 0x8] MOV RSI,RDX CALL 0x0012ba8b MOV RBX,RAX MOV RDI,qword ptr [RAX] TEST R15D,R15D JLE 0x0012b7ae LEA RAX,[RDI + R15*0x4] LEA RCX,[RDI + 0x4] CMP RAX,RCX CMOVA RCX,RAX MOV RDX,RDI NOT RDX ADD RDX,RCX AND RDX,-0x4 ADD RDX,0x4 XOR ESI,ESI CALL 0x00113270 MOV RDI,qword ptr [RBX] LAB_0012b7ae: TEST R13D,R13D JLE 0x0012b816 MOV RAX,qword ptr [R14] MOV RCX,qword ptr [RBP + -0x30] LEA RCX,[RAX + RCX*0x4] MOV RDX,qword ptr [R12] LEA RSI,[RDX + R13*0x4] LAB_0012b7c6: MOV R8D,dword ptr [RDX] TEST R8,R8 JZ 0x0012b806 XOR R9D,R9D XOR R10D,R10D LAB_0012b7d4: LEA R11,[RAX + R9*0x1] ADD R11,0x4 MOV R14D,dword ptr [R11 + -0x4] IMUL R14,R8 MOV R12D,dword ptr [RDI + R9*0x1] ADD R12,R10 ADD R12,R14 MOV R10,R12 SHR R10,0x20 MOV dword ptr [RDI + R9*0x1],R12D ADD R9,0x4 CMP R11,RCX JC 0x0012b7d4 MOV dword ptr [RDI + R9*0x1],R10D LAB_0012b806: ADD RDX,0x4 ADD RDI,0x4 CMP RDX,RSI JC 0x0012b7c6 MOV RDI,qword ptr [RBX] LAB_0012b816: TEST R15D,R15D JLE 0x0012b83c LEA RAX,[RDI + R15*0x4] ADD RAX,-0x4 LAB_0012b823: CMP dword ptr [RAX],0x0 JNZ 0x0012b83c LEA ECX,[R15 + -0x1] ADD RAX,-0x4 CMP R15D,0x1 MOV R15D,ECX JG 0x0012b823 XOR R15D,R15D LAB_0012b83c: MOV dword ptr [RBX + 0x14],R15D MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * mult(long *param_1,long *param_2) { void *pvVar1; uint *puVar2; uint *puVar3; int iVar4; int iVar5; uint uVar6; long lVar7; int8 *puVar8; int *piVar9; void *pvVar10; uint *puVar11; void *__s; long lVar12; ulong uVar13; ulong uVar14; long *plVar15; int iVar16; ulong uVar17; plVar15 = param_1; if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) { plVar15 = param_2; param_2 = param_1; } iVar4 = *(int *)((long)plVar15 + 0x14); iVar5 = *(int *)((long)param_2 + 0x14); uVar17 = (long)iVar4 + (long)iVar5; iVar16 = (int)uVar17; puVar8 = (int8 *)Balloc((uint)(*(int *)((long)plVar15 + 0xc) < iVar16) + (int)plVar15[1]); __s = (void *)*puVar8; if (0 < iVar16) { pvVar1 = (void *)((long)__s + uVar17 * 4); pvVar10 = (void *)((long)__s + 4U); if ((void *)((long)__s + 4U) < pvVar1) { pvVar10 = pvVar1; } memset(__s,0,(~(ulong)__s + (long)pvVar10 & 0xfffffffffffffffc) + 4); __s = (void *)*puVar8; } if (0 < iVar5) { lVar7 = *plVar15; puVar11 = (uint *)*param_2; puVar2 = puVar11 + iVar5; do { uVar6 = *puVar11; if ((ulong)uVar6 != 0) { lVar12 = 0; uVar13 = 0; do { puVar3 = (uint *)(lVar7 + lVar12); uVar14 = *(uint *)((long)__s + lVar12) + uVar13 + (ulong)*puVar3 * (ulong)uVar6; uVar13 = uVar14 >> 0x20; *(int *)((long)__s + lVar12) = (int)uVar14; lVar12 = lVar12 + 4; } while (puVar3 + 1 < (uint *)(lVar7 + (long)iVar4 * 4)); *(int *)((long)__s + lVar12) = (int)(uVar14 >> 0x20); } puVar11 = puVar11 + 1; __s = (void *)((long)__s + 4); } while (puVar11 < puVar2); __s = (void *)*puVar8; } if (0 < iVar16) { piVar9 = (int *)((long)__s + uVar17 * 4); do { piVar9 = piVar9 + -1; if (*piVar9 != 0) goto LAB_0012b83c; iVar4 = (int)uVar17; uVar17 = (ulong)(iVar4 - 1); } while (1 < iVar4); uVar17 = 0; } LAB_0012b83c: *(int *)((long)puVar8 + 0x14) = (int)uVar17; return puVar8; }
38,872
ggml_status_to_string
ngxson[P]ggml-easy/ggml/src/ggml.c
const char * ggml_status_to_string(enum ggml_status status) { switch (status) { case GGML_STATUS_ALLOC_FAILED: return "GGML status: error (failed to allocate memory)"; case GGML_STATUS_FAILED: return "GGML status: error (operation failed)"; case GGML_STATUS_SUCCESS: return "GGML status: success"; case GGML_STATUS_ABORTED: return "GGML status: warning (operation aborted)"; } return "GGML status: unknown"; }
O0
c
ggml_status_to_string: movl %edi, -0xc(%rsp) movl -0xc(%rsp), %eax addl $0x2, %eax movl %eax, %ecx movq %rcx, -0x18(%rsp) subl $0x3, %eax ja 0x48544 movq -0x18(%rsp), %rax leaq 0x6bb3d(%rip), %rcx # 0xb4040 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x6bffc(%rip), %rax # 0xb450f movq %rax, -0x8(%rsp) jmp 0x48550 leaq 0x6c01d(%rip), %rax # 0xb453e movq %rax, -0x8(%rsp) jmp 0x48550 leaq 0x6c035(%rip), %rax # 0xb4564 movq %rax, -0x8(%rsp) jmp 0x48550 leaq 0x6c03c(%rip), %rax # 0xb4579 movq %rax, -0x8(%rsp) jmp 0x48550 leaq 0x6c057(%rip), %rax # 0xb45a2 movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax)
ggml_status_to_string: mov [rsp+var_C], edi mov eax, [rsp+var_C] add eax, 2; switch 4 cases mov ecx, eax mov [rsp+var_18], rcx sub eax, 3 ja short def_4850A; jumptable 000000000004850A default case mov rax, [rsp+var_18] lea rcx, jpt_4850A movsxd rax, ds:(jpt_4850A - 0B4040h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4850C: lea rax, aGgmlStatusErro; jumptable 000000000004850A case -2 mov [rsp+var_8], rax jmp short loc_48550 loc_4851A: lea rax, aGgmlStatusErro_0; jumptable 000000000004850A case -1 mov [rsp+var_8], rax jmp short loc_48550 loc_48528: lea rax, aGgmlStatusSucc; jumptable 000000000004850A case 0 mov [rsp+var_8], rax jmp short loc_48550 loc_48536: lea rax, aGgmlStatusWarn; jumptable 000000000004850A case 1 mov [rsp+var_8], rax jmp short loc_48550 def_4850A: lea rax, aGgmlStatusUnkn; jumptable 000000000004850A default case mov [rsp+var_8], rax loc_48550: mov rax, [rsp+var_8] retn
const char * ggml_status_to_string(int a1) { const char *v2; // [rsp+10h] [rbp-8h] switch ( a1 ) { case -2: v2 = "GGML status: error (failed to allocate memory)"; break; case -1: v2 = "GGML status: error (operation failed)"; break; case 0: v2 = "GGML status: success"; break; case 1: v2 = "GGML status: warning (operation aborted)"; break; default: v2 = "GGML status: unknown"; break; } return v2; }
ggml_status_to_string: MOV dword ptr [RSP + -0xc],EDI MOV EAX,dword ptr [RSP + -0xc] ADD EAX,0x2 MOV ECX,EAX MOV qword ptr [RSP + -0x18],RCX SUB EAX,0x3 JA 0x00148544 MOV RAX,qword ptr [RSP + -0x18] LEA RCX,[0x1b4040] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_fffffffe: LEA RAX,[0x1b450f] MOV qword ptr [RSP + -0x8],RAX JMP 0x00148550 caseD_ffffffff: LEA RAX,[0x1b453e] MOV qword ptr [RSP + -0x8],RAX JMP 0x00148550 caseD_0: LEA RAX,[0x1b4564] MOV qword ptr [RSP + -0x8],RAX JMP 0x00148550 caseD_1: LEA RAX,[0x1b4579] MOV qword ptr [RSP + -0x8],RAX JMP 0x00148550 default: LEA RAX,[0x1b45a2] MOV qword ptr [RSP + -0x8],RAX LAB_00148550: MOV RAX,qword ptr [RSP + -0x8] RET
char * ggml_status_to_string(int4 param_1) { char *local_8; switch(param_1) { case 0: local_8 = "GGML status: success"; break; case 1: local_8 = "GGML status: warning (operation aborted)"; break; case 0xfffffffe: local_8 = "GGML status: error (failed to allocate memory)"; break; case 0xffffffff: local_8 = "GGML status: error (operation failed)"; break; default: local_8 = "GGML status: unknown"; } return local_8; }
38,873
my_readlink
eloqsql/mysys/my_symlink.c
int my_readlink(char *to, const char *filename, myf MyFlags) { #ifndef HAVE_READLINK strmov(to,filename); return 1; #else int result=0; int length; DBUG_ENTER("my_readlink"); if ((length=readlink(filename, to, FN_REFLEN-1)) < 0) { /* Don't give an error if this wasn't a symlink */ if ((my_errno=errno) == EINVAL) { result= 1; strmov(to,filename); } else { if (MyFlags & MY_WME) my_error(EE_CANT_READLINK, MYF(0), filename, errno); result= -1; } } else to[length]=0; DBUG_PRINT("exit" ,("result: %d", result)); DBUG_RETURN(result); #endif /* HAVE_READLINK */ }
O0
c
my_readlink: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x372b0 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jge 0x80b31 callq 0x379e0 movl (%rax), %eax movl %eax, -0x24(%rbp) callq 0x81640 movq %rax, %rcx movl -0x24(%rbp), %eax movl %eax, (%rcx) cmpl $0x16, %eax jne 0x80af7 movl $0x1, -0x1c(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x379c0 jmp 0x80b2f movq -0x18(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x80b28 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) callq 0x379e0 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0x18, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x7a1f0 movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF jmp 0x80b3d movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx movb $0x0, (%rax,%rcx) jmp 0x80b3f jmp 0x80b41 jmp 0x80b43 movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_readlink: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_8] mov edx, 1FFh call _readlink mov [rbp+var_20], eax cmp eax, 0 jge short loc_80B31 call ___errno_location mov eax, [rax] mov [rbp+var_24], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_24] mov [rcx], eax cmp eax, 16h jnz short loc_80AF7 mov [rbp+var_1C], 1 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _stpcpy jmp short loc_80B2F loc_80AF7: mov rax, [rbp+var_18] and rax, 10h cmp rax, 0 jz short loc_80B28 mov rax, [rbp+var_10] mov [rbp+var_30], rax call ___errno_location mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 18h xor eax, eax mov esi, eax mov al, 0 call my_error loc_80B28: mov [rbp+var_1C], 0FFFFFFFFh loc_80B2F: jmp short loc_80B3D loc_80B31: mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] mov byte ptr [rax+rcx], 0 loc_80B3D: jmp short $+2 loc_80B3F: jmp short $+2 loc_80B41: jmp short $+2 loc_80B43: mov eax, [rbp+var_1C] mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
long long my_readlink(long long a1, long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+1Ch] [rbp-24h] int v6; // [rsp+20h] [rbp-20h] unsigned int v7; // [rsp+24h] [rbp-1Ch] v7 = 0; v6 = readlink(a2, a1, 511LL); if ( v6 >= 0 ) { *(_BYTE *)(a1 + v6) = 0; } else { v5 = *(_DWORD *)__errno_location(a2); *(_DWORD *)my_thread_var() = v5; if ( v5 == 22 ) { v7 = 1; stpcpy(a1, a2); } else { if ( (a3 & 0x10) != 0 ) { v3 = (unsigned int *)__errno_location(a2); my_error(0x18u, 0LL, a2, *v3); } return (unsigned int)-1; } } return v7; }
my_readlink: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x8] MOV EDX,0x1ff CALL 0x001372b0 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JGE 0x00180b31 CALL 0x001379e0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX CALL 0x00181640 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RCX],EAX CMP EAX,0x16 JNZ 0x00180af7 MOV dword ptr [RBP + -0x1c],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001379c0 JMP 0x00180b2f LAB_00180af7: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x10 CMP RAX,0x0 JZ 0x00180b28 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x001379e0 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0x18 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x0017a1f0 LAB_00180b28: MOV dword ptr [RBP + -0x1c],0xffffffff LAB_00180b2f: JMP 0x00180b3d LAB_00180b31: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_00180b3d: JMP 0x00180b3f LAB_00180b3f: JMP 0x00180b41 LAB_00180b41: JMP 0x00180b43 LAB_00180b43: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
int4 my_readlink(char *param_1,char *param_2,ulong param_3) { int iVar1; ssize_t sVar2; int *piVar3; int4 local_24; local_24 = 0; sVar2 = readlink(param_2,param_1,0x1ff); if ((int)sVar2 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if (iVar1 == 0x16) { local_24 = 1; stpcpy(param_1,param_2); } else { if ((param_3 & 0x10) != 0) { piVar3 = __errno_location(); my_error(0x18,0,param_2,*piVar3); } local_24 = 0xffffffff; } } else { param_1[(int)sVar2] = '\0'; } return local_24; }
38,874
my_atod
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
double my_atod(const char *number, const char *end, int *error) { double val= 0.0; char buffer[MAX_DBL_STR + 1]; int len= (int)(end - number); *error= errno= 0; if (len > MAX_DBL_STR) { *error= 1; len= MAX_DBL_STR; } memcpy(buffer, number, len); buffer[len]= '\0'; val= strtod(buffer, NULL); if (errno) *error= errno; return val; }
O0
c
my_atod: pushq %rbp movq %rsp, %rbp subq $0x470, %rsp # imm = 0x470 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x448(%rbp) movq %rsi, -0x450(%rbp) movq %rdx, -0x458(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x460(%rbp) movq -0x450(%rbp), %rax movq -0x448(%rbp), %rcx subq %rcx, %rax movl %eax, -0x464(%rbp) callq 0x13050 movl $0x0, (%rax) movq -0x458(%rbp), %rax movl $0x0, (%rax) cmpl $0x435, -0x464(%rbp) # imm = 0x435 jle 0x2ebfa movq -0x458(%rbp), %rax movl $0x1, (%rax) movl $0x435, -0x464(%rbp) # imm = 0x435 leaq -0x440(%rbp), %rdi movq -0x448(%rbp), %rsi movslq -0x464(%rbp), %rdx callq 0x13360 movslq -0x464(%rbp), %rax movb $0x0, -0x440(%rbp,%rax) leaq -0x440(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x13330 movsd %xmm0, -0x460(%rbp) callq 0x13050 cmpl $0x0, (%rax) je 0x2ec55 callq 0x13050 movl (%rax), %ecx movq -0x458(%rbp), %rax movl %ecx, (%rax) movsd -0x460(%rbp), %xmm0 movsd %xmm0, -0x470(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2ec88 movsd -0x470(%rbp), %xmm0 addq $0x470, %rsp # imm = 0x470 popq %rbp retq callq 0x134b0 nopl (%rax)
my_atod: push rbp mov rbp, rsp sub rsp, 470h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_448], rdi mov [rbp+var_450], rsi mov [rbp+var_458], rdx xorps xmm0, xmm0 movsd [rbp+var_460], xmm0 mov rax, [rbp+var_450] mov rcx, [rbp+var_448] sub rax, rcx mov [rbp+var_464], eax call ___errno_location mov dword ptr [rax], 0 mov rax, [rbp+var_458] mov dword ptr [rax], 0 cmp [rbp+var_464], 435h jle short loc_2EBFA mov rax, [rbp+var_458] mov dword ptr [rax], 1 mov [rbp+var_464], 435h loc_2EBFA: lea rdi, [rbp+var_440] mov rsi, [rbp+var_448] movsxd rdx, [rbp+var_464] call _memcpy movsxd rax, [rbp+var_464] mov [rbp+rax+var_440], 0 lea rdi, [rbp+var_440] xor eax, eax mov esi, eax call _strtod movsd [rbp+var_460], xmm0 call ___errno_location cmp dword ptr [rax], 0 jz short loc_2EC55 call ___errno_location mov ecx, [rax] mov rax, [rbp+var_458] mov [rax], ecx loc_2EC55: movsd xmm0, [rbp+var_460] movsd [rbp+var_470], xmm0 mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2EC88 movsd xmm0, [rbp+var_470] add rsp, 470h pop rbp retn loc_2EC88: call ___stack_chk_fail
double my_atod(long long a1, int a2, _DWORD *a3) { int v4; // [rsp+Ch] [rbp-464h] double v5; // [rsp+10h] [rbp-460h] _BYTE v7[1080]; // [rsp+30h] [rbp-440h] BYREF unsigned long long v8; // [rsp+468h] [rbp-8h] v8 = __readfsqword(0x28u); v4 = a2 - a1; *(_DWORD *)__errno_location() = 0; *a3 = 0; if ( a2 - (int)a1 > 1077 ) { *a3 = 1; v4 = 1077; } memcpy(v7, a1, v4); v7[v4] = 0; v5 = strtod(v7, 0LL); if ( *(_DWORD *)__errno_location() ) *a3 = *(_DWORD *)__errno_location(); return v5; }
my_atod: PUSH RBP MOV RBP,RSP SUB RSP,0x470 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x448],RDI MOV qword ptr [RBP + -0x450],RSI MOV qword ptr [RBP + -0x458],RDX XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x460],XMM0 MOV RAX,qword ptr [RBP + -0x450] MOV RCX,qword ptr [RBP + -0x448] SUB RAX,RCX MOV dword ptr [RBP + -0x464],EAX CALL 0x00113050 MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x458] MOV dword ptr [RAX],0x0 CMP dword ptr [RBP + -0x464],0x435 JLE 0x0012ebfa MOV RAX,qword ptr [RBP + -0x458] MOV dword ptr [RAX],0x1 MOV dword ptr [RBP + -0x464],0x435 LAB_0012ebfa: LEA RDI,[RBP + -0x440] MOV RSI,qword ptr [RBP + -0x448] MOVSXD RDX,dword ptr [RBP + -0x464] CALL 0x00113360 MOVSXD RAX,dword ptr [RBP + -0x464] MOV byte ptr [RBP + RAX*0x1 + -0x440],0x0 LEA RDI,[RBP + -0x440] XOR EAX,EAX MOV ESI,EAX CALL 0x00113330 MOVSD qword ptr [RBP + -0x460],XMM0 CALL 0x00113050 CMP dword ptr [RAX],0x0 JZ 0x0012ec55 CALL 0x00113050 MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x458] MOV dword ptr [RAX],ECX LAB_0012ec55: MOVSD XMM0,qword ptr [RBP + -0x460] MOVSD qword ptr [RBP + -0x470],XMM0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012ec88 MOVSD XMM0,qword ptr [RBP + -0x470] ADD RSP,0x470 POP RBP RET LAB_0012ec88: CALL 0x001134b0
double my_atod(void *param_1,int param_2,int *param_3) { int *piVar1; long in_FS_OFFSET; double dVar2; int local_46c; char local_448 [1080]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_46c = param_2 - (int)param_1; piVar1 = __errno_location(); *piVar1 = 0; *param_3 = 0; if (0x435 < local_46c) { *param_3 = 1; local_46c = 0x435; } memcpy(local_448,param_1,(long)local_46c); local_448[local_46c] = '\0'; dVar2 = strtod(local_448,(char **)0x0); piVar1 = __errno_location(); if (*piVar1 != 0) { piVar1 = __errno_location(); *param_3 = *piVar1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return dVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
38,875
evmone::instr::core::calldatacopy(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result calldatacopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto& mem_index = stack.pop(); const auto& input_index = stack.pop(); const auto& size = stack.pop(); if (!check_memory(gas_left, state.memory, mem_index, size)) return {EVMC_OUT_OF_GAS, gas_left}; auto dst = static_cast<size_t>(mem_index); auto src = state.msg->input_size < input_index ? state.msg->input_size : static_cast<size_t>(input_index); auto s = static_cast<size_t>(size); auto copy_size = std::min(s, state.msg->input_size - src); if (const auto cost = copy_cost(s); (gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; if (copy_size > 0) std::memcpy(&state.memory[dst], &state.msg->input_data[src], copy_size); if (s - copy_size > 0) std::memset(&state.memory[dst + copy_size], 0, s - copy_size); return {EVMC_SUCCESS, gas_left}; }
O3
cpp
evmone::instr::core::calldatacopy(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r15 movdqu -0x40(%rdi), %xmm0 movdqu -0x30(%rdi), %xmm1 por %xmm0, %xmm1 leaq 0x8(%rdx), %r9 ptest %xmm1, %xmm1 je 0x3fdc5 movq -0x30(%r15), %rax orq -0x28(%r15), %rax movl $0x3, %ebp orq -0x38(%r15), %rax jne 0x3fe68 movq -0x40(%r15), %rax movq %rax, %rcx shrq $0x20, %rcx jne 0x3fe68 movq 0x10(%r15), %rcx orq 0x18(%r15), %rcx orq 0x8(%r15), %rcx jne 0x3fe68 movq (%r15), %rdx movq %rdx, %rcx shrq $0x20, %rcx jne 0x3fe68 addq %rax, %rdx cmpq 0x10(%r12), %rdx jbe 0x3fdbc movq %rbx, %rdi movq %r9, %rsi movq %r9, %rbx callq 0x3fbe5 movq %rbx, %r9 movq %rax, %rbx testq %rbx, %rbx js 0x3fe68 movq -0x10(%r15), %rcx movq -0x8(%r15), %rdx xorl %edi, %edi movq %rdx, %rax orq %rcx, %rax movq -0x20(%r15), %rsi cmoveq %rsi, %rcx movq 0x20(%r12), %rax cmoveq -0x18(%r15), %rdx movq 0x48(%rax), %r14 movl $0x0, %r8d cmoveq %r14, %r8 cmpq %rcx, %r8 sbbq %rdx, %rdi movq -0x40(%r15), %r12 cmovbq %r14, %rsi subq %rsi, %r14 cmpq %r12, %r14 movq %r12, %r13 cmovbq %r14, %r13 leaq 0x1f(%r12), %rcx shrq $0x5, %rcx leaq (%rcx,%rcx,2), %rcx subq %rcx, %rbx js 0x3fe63 movq (%r15), %r15 testq %r13, %r13 je 0x3fe42 movq (%r9), %rdi addq %r15, %rdi addq 0x40(%rax), %rsi movq %r13, %rdx movq %r9, %rbp callq 0x211a0 movq %rbp, %r9 xorl %ebp, %ebp cmpq %r14, %r12 jbe 0x3fe68 addq (%r9), %r15 addq %r13, %r15 subq %r13, %r12 xorl %ebp, %ebp movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x21120 jmp 0x3fe68 movl $0x3, %ebp movl %ebp, %eax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6evmone5instr4core12calldatacopyENS_8StackTopElRNS_14ExecutionStateE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov rbx, rsi mov r15, rdi movdqu xmm0, xmmword ptr [rdi-40h] movdqu xmm1, xmmword ptr [rdi-30h] por xmm1, xmm0 lea r9, [rdx+8] ptest xmm1, xmm1 jz short loc_3FDC5 mov rax, [r15-30h] or rax, [r15-28h] mov ebp, 3 or rax, [r15-38h] jnz loc_3FE68 mov rax, [r15-40h] mov rcx, rax shr rcx, 20h jnz loc_3FE68 mov rcx, [r15+10h] or rcx, [r15+18h] or rcx, [r15+8] jnz loc_3FE68 mov rdx, [r15] mov rcx, rdx shr rcx, 20h; unsigned __int64 jnz loc_3FE68 add rdx, rax; evmone::Memory * cmp rdx, [r12+10h] jbe short loc_3FDBC mov rdi, rbx; this mov rsi, r9; __int64 mov rbx, r9 call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong) mov r9, rbx mov rbx, rax loc_3FDBC: test rbx, rbx js loc_3FE68 loc_3FDC5: mov rcx, [r15-10h] mov rdx, [r15-8] xor edi, edi mov rax, rdx or rax, rcx mov rsi, [r15-20h] cmovz rcx, rsi mov rax, [r12+20h] cmovz rdx, [r15-18h] mov r14, [rax+48h] mov r8d, 0 cmovz r8, r14 cmp r8, rcx sbb rdi, rdx mov r12, [r15-40h] cmovb rsi, r14 sub r14, rsi cmp r14, r12 mov r13, r12 cmovb r13, r14 lea rcx, [r12+1Fh] shr rcx, 5 lea rcx, [rcx+rcx*2] sub rbx, rcx js short loc_3FE63 mov r15, [r15] test r13, r13 jz short loc_3FE42 mov rdi, [r9] add rdi, r15 add rsi, [rax+40h] mov rdx, r13 mov rbp, r9 call _memcpy mov r9, rbp loc_3FE42: xor ebp, ebp cmp r12, r14 jbe short loc_3FE68 add r15, [r9] add r15, r13 sub r12, r13 xor ebp, ebp mov rdi, r15 xor esi, esi mov rdx, r12 call _memset jmp short loc_3FE68 loc_3FE63: mov ebp, 3 loc_3FE68: mov eax, ebp mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long evmone::instr::core::calldatacopy(const __m128i *a1, evmone *a2, _QWORD *a3) { long long v4; // rbx __m128i v5; // xmm1 evmone::Memory *v6; // r9 unsigned int v7; // ebp evmone::Memory *v8; // rdx evmone::Memory *v9; // rbx char *v10; // rax long long v11; // rcx long long v12; // rdx long long v13; // rsi long long v14; // rax unsigned long long v15; // r8 unsigned long long v16; // r12 unsigned long long v17; // r14 long long v18; // r13 long long v19; // r15 evmone::Memory *v20; // rbp v4 = (long long)a2; v5 = _mm_or_si128(_mm_loadu_si128(a1 - 3), _mm_loadu_si128(a1 - 4)); v6 = (evmone::Memory *)(a3 + 1); if ( _mm_testz_si128(v5, v5) ) goto LABEL_9; v7 = 3; if ( !(a1[-4].m128i_i64[1] | a1[-3].m128i_i64[1] | a1[-3].m128i_i64[0]) && !HIDWORD(a1[-4].m128i_i64[0]) && !(a1->m128i_i64[1] | a1[1].m128i_i64[1] | a1[1].m128i_i64[0]) && !HIDWORD(a1->m128i_i64[0]) ) { v8 = (evmone::Memory *)(a1[-4].m128i_i64[0] + a1->m128i_i64[0]); if ( (unsigned long long)v8 > a3[2] ) { v9 = v6; v10 = evmone::grow_memory(a2, v6, v8); v6 = v9; v4 = (long long)v10; } if ( v4 >= 0 ) { LABEL_9: v11 = a1[-1].m128i_i64[0]; v12 = a1[-1].m128i_i64[1]; v13 = a1[-2].m128i_i64[0]; if ( *(_OWORD *)&a1[-1] == 0LL ) v11 = a1[-2].m128i_i64[0]; v14 = a3[4]; if ( *(_OWORD *)&a1[-1] == 0LL ) v12 = a1[-2].m128i_i64[1]; v15 = 0LL; if ( *(_OWORD *)&a1[-1] == 0LL ) v15 = *(_QWORD *)(v14 + 72); v16 = a1[-4].m128i_u64[0]; if ( v15 < __PAIR128__(v12, v11) ) v13 = *(_QWORD *)(v14 + 72); v17 = *(_QWORD *)(v14 + 72) - v13; v18 = a1[-4].m128i_i64[0]; if ( v17 < v16 ) v18 = *(_QWORD *)(v14 + 72) - v13; if ( (long long)(v4 - 3 * ((v16 + 31) >> 5)) < 0 ) { return 3; } else { v19 = a1->m128i_i64[0]; if ( v18 ) { v20 = v6; memcpy(v19 + *(_QWORD *)v6); v6 = v20; } v7 = 0; if ( v16 > v17 ) { v7 = 0; memset(v18 + *(_QWORD *)v6 + v19, 0LL, v16 - v18); } } } } return v7; }
calldatacopy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV RBX,RSI MOV R15,RDI MOVDQU XMM0,xmmword ptr [RDI + -0x40] MOVDQU XMM1,xmmword ptr [RDI + -0x30] POR XMM1,XMM0 LEA R9,[RDX + 0x8] PTEST XMM1,XMM1 JZ 0x0013fdc5 MOV RAX,qword ptr [R15 + -0x30] OR RAX,qword ptr [R15 + -0x28] MOV EBP,0x3 OR RAX,qword ptr [R15 + -0x38] JNZ 0x0013fe68 MOV RAX,qword ptr [R15 + -0x40] MOV RCX,RAX SHR RCX,0x20 JNZ 0x0013fe68 MOV RCX,qword ptr [R15 + 0x10] OR RCX,qword ptr [R15 + 0x18] OR RCX,qword ptr [R15 + 0x8] JNZ 0x0013fe68 MOV RDX,qword ptr [R15] MOV RCX,RDX SHR RCX,0x20 JNZ 0x0013fe68 ADD RDX,RAX CMP RDX,qword ptr [R12 + 0x10] JBE 0x0013fdbc MOV RDI,RBX MOV RSI,R9 MOV RBX,R9 CALL 0x0013fbe5 MOV R9,RBX MOV RBX,RAX LAB_0013fdbc: TEST RBX,RBX JS 0x0013fe68 LAB_0013fdc5: MOV RCX,qword ptr [R15 + -0x10] MOV RDX,qword ptr [R15 + -0x8] XOR EDI,EDI MOV RAX,RDX OR RAX,RCX MOV RSI,qword ptr [R15 + -0x20] CMOVZ RCX,RSI MOV RAX,qword ptr [R12 + 0x20] CMOVZ RDX,qword ptr [R15 + -0x18] MOV R14,qword ptr [RAX + 0x48] MOV R8D,0x0 CMOVZ R8,R14 CMP R8,RCX SBB RDI,RDX MOV R12,qword ptr [R15 + -0x40] CMOVC RSI,R14 SUB R14,RSI CMP R14,R12 MOV R13,R12 CMOVC R13,R14 LEA RCX,[R12 + 0x1f] SHR RCX,0x5 LEA RCX,[RCX + RCX*0x2] SUB RBX,RCX JS 0x0013fe63 MOV R15,qword ptr [R15] TEST R13,R13 JZ 0x0013fe42 MOV RDI,qword ptr [R9] ADD RDI,R15 ADD RSI,qword ptr [RAX + 0x40] MOV RDX,R13 MOV RBP,R9 CALL 0x001211a0 MOV R9,RBP LAB_0013fe42: XOR EBP,EBP CMP R12,R14 JBE 0x0013fe68 ADD R15,qword ptr [R9] ADD R15,R13 SUB R12,R13 XOR EBP,EBP MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 CALL 0x00121120 JMP 0x0013fe68 LAB_0013fe63: MOV EBP,0x3 LAB_0013fe68: MOV EAX,EBP MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* evmone::instr::core::calldatacopy(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::calldatacopy(ulong *param_1,long param_2,long param_3) { Memory *pMVar1; ulong uVar2; bool bVar3; bool bVar4; ulong uVar5; ulong uVar6; int8 uVar7; ulong uVar8; ulong uVar9; ulong uVar10; int1 auVar11 [16]; pMVar1 = (Memory *)(param_3 + 8); if (*(int1 (*) [16])(param_1 + -6) != (int1 [16])0x0 || *(int1 (*) [16])(param_1 + -8) != (int1 [16])0x0) { uVar7 = 3; if (((((param_1[-6] != 0 || param_1[-5] != 0) || param_1[-7] != 0) || (param_1[-8] >> 0x20 != 0) ) || ((param_1[2] != 0 || param_1[3] != 0) || param_1[1] != 0)) || (*param_1 >> 0x20 != 0)) goto LAB_0013fe68; uVar5 = *param_1 + param_1[-8]; if (*(ulong *)(param_3 + 0x10) < uVar5) { param_2 = grow_memory(param_2,pMVar1,uVar5); } if (param_2 < 0) goto LAB_0013fe68; } bVar3 = param_1[-1] == 0; bVar4 = param_1[-2] == 0; uVar5 = param_1[-2]; if (bVar3 && bVar4) { uVar5 = param_1[-4]; } uVar6 = param_1[-1]; if (bVar3 && bVar4) { uVar6 = param_1[-3]; } uVar10 = *(ulong *)(*(long *)(param_3 + 0x20) + 0x48); uVar9 = 0; if (bVar3 && bVar4) { uVar9 = uVar10; } uVar2 = param_1[-8]; uVar8 = param_1[-4]; if (uVar6 != 0 || -uVar6 < (ulong)(uVar9 < uVar5)) { uVar8 = uVar10; } uVar10 = uVar10 - uVar8; uVar5 = uVar2; if (uVar10 < uVar2) { uVar5 = uVar10; } param_2 = param_2 + (uVar2 + 0x1f >> 5) * -3; if (param_2 < 0) { uVar7 = 3; } else { uVar6 = *param_1; if (uVar5 != 0) { memcpy((void *)(*(long *)pMVar1 + uVar6), (void *)(uVar8 + *(long *)(*(long *)(param_3 + 0x20) + 0x40)),uVar5); } uVar7 = 0; if (uVar10 < uVar2) { uVar7 = 0; memset((void *)(uVar6 + *(long *)pMVar1 + uVar5),0,uVar2 - uVar5); } } LAB_0013fe68: auVar11._8_8_ = param_2; auVar11._0_8_ = uVar7; return auVar11; }
38,876
my_strdup
eloqsql/mysys/my_malloc.c
char *my_strdup(PSI_memory_key key, const char *from, myf my_flags) { char *ptr; size_t length= strlen(from)+1; DBUG_ENTER("my_strdup"); if ((ptr= (char*) my_malloc(key, length, my_flags))) memcpy(ptr, from, length); DBUG_RETURN(ptr); }
O3
c
my_strdup: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r15 movq %rsi, %rbx movl %edi, %r12d movq %rsi, %rdi callq 0x2a330 movq %rax, %r14 incq %r14 movl %r12d, %edi movq %r14, %rsi movq %r15, %rdx callq 0xaa1d9 testq %rax, %rax je 0xaa4e7 movq %rax, %rdi movq %rbx, %rsi movq %r14, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x2a0a0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strdup: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r15, rdx mov rbx, rsi mov r12d, edi mov rdi, rsi call _strlen mov r14, rax inc r14 mov edi, r12d mov rsi, r14 mov rdx, r15 call my_malloc test rax, rax jz short loc_AA4E7 mov rdi, rax mov rsi, rbx mov rdx, r14 pop rbx pop r12 pop r14 pop r15 pop rbp jmp _memcpy loc_AA4E7: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_strdup(unsigned int a1, long long a2, int a3) { unsigned long long v4; // r14 long long result; // rax v4 = strlen(a2) + 1; result = my_malloc(a1, v4, a3); if ( result ) return memcpy(result, a2, v4); return result; }
my_strdup: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15,RDX MOV RBX,RSI MOV R12D,EDI MOV RDI,RSI CALL 0x0012a330 MOV R14,RAX INC R14 MOV EDI,R12D MOV RSI,R14 MOV RDX,R15 CALL 0x001aa1d9 TEST RAX,RAX JZ 0x001aa4e7 MOV RDI,RAX MOV RSI,RBX MOV RDX,R14 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0012a0a0 LAB_001aa4e7: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void my_strdup(int4 param_1,char *param_2,int8 param_3) { size_t sVar1; void *__dest; sVar1 = strlen(param_2); __dest = (void *)my_malloc(param_1,sVar1 + 1,param_3); if (__dest != (void *)0x0) { memcpy(__dest,param_2,sVar1 + 1); return; } return; }
38,877
my_strxfrm_pad_desc_and_reverse
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r13d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, -0x30(%rbp) movq %rdi, %r12 movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r13b sete %dl orb %al, %dl orb %sil, %dl jne 0x3d066 movl %r8d, %ebx movl %r15d, %eax subl %r14d, %eax imull 0x98(%r12), %ebx cmpl %eax, %ebx cmovael %eax, %ebx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0x78(%rax) movl 0x10(%rbp), %ecx addq %rbx, %r14 movq -0x30(%rbp), %rbx movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x3e9be testb %r13b, %r13b jns 0x3d0a5 cmpq %r15, %r14 jae 0x3d0a5 movq %r15, %rdx subq %r14, %rdx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi callq *0x78(%rax) movq %r15, %r14 subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strxfrm_pad_desc_and_reverse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13d, r9d mov r15, rcx mov r14, rdx mov [rbp+var_30], rsi mov r12, rdi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r13b, 40h setz dl or dl, al or dl, sil jnz short loc_3D066 mov ebx, r8d mov eax, r15d sub eax, r14d imul ebx, [r12+98h] cmp ebx, eax cmovnb ebx, eax movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 mov rdx, rbx call qword ptr [rax+78h] mov ecx, [rbp+arg_0] add r14, rbx loc_3D066: mov rbx, [rbp+var_30] mov rdi, rbx mov rsi, r14 mov edx, r13d call my_strxfrm_desc_and_reverse test r13b, r13b jns short loc_3D0A5 cmp r14, r15 jnb short loc_3D0A5 mov rdx, r15 sub rdx, r14 movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 call qword ptr [rax+78h] mov r14, r15 loc_3D0A5: sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strxfrm_pad_desc_and_reverse( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned long long v9; // r14 long long v10; // rcx long long v11; // rbx v9 = a3; v10 = a7; if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 ) { v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5); if ( (unsigned int)v11 >= (int)a4 - (int)a3 ) v11 = (unsigned int)(a4 - a3); (*(void ( **)(long long, unsigned long long, long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, a3, v11, *(unsigned __int8 *)(a1 + 176)); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, v9, a4 - v9, *(unsigned __int8 *)(a1 + 176)); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13D,R9D MOV R15,RCX MOV R14,RDX MOV qword ptr [RBP + -0x30],RSI MOV R12,RDI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R13B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x0013d066 MOV EBX,R8D MOV EAX,R15D SUB EAX,R14D IMUL EBX,dword ptr [R12 + 0x98] CMP EBX,EAX CMOVNC EBX,EAX MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + 0x10] ADD R14,RBX LAB_0013d066: MOV RBX,qword ptr [RBP + -0x30] MOV RDI,RBX MOV RSI,R14 MOV EDX,R13D CALL 0x0013e9be TEST R13B,R13B JNS 0x0013d0a5 CMP R14,R15 JNC 0x0013d0a5 MOV RDX,R15 SUB RDX,R14 MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV R14,R15 LAB_0013d0a5: SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strxfrm_pad_desc_and_reverse (long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6, int4 param_7) { uint uVar1; uint uVar2; if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) { uVar1 = (int)param_4 - (int)param_3; uVar2 = param_5 * *(int *)(param_1 + 0x98); if (uVar1 <= uVar2) { uVar2 = uVar1; } (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,(ulong)uVar2,*(int1 *)(param_1 + 0xb0)); param_3 = param_3 + uVar2; } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,param_4 - param_3,*(int1 *)(param_1 + 0xb0)); param_3 = param_4; } return param_3 - param_2; }
38,878
js_function_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_function_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv, int magic) { JSFunctionKindEnum func_kind = magic; int i, n, ret; JSValue s, proto, obj = JS_UNDEFINED; StringBuffer b_s, *b = &b_s; string_buffer_init(ctx, b, 0); string_buffer_putc8(b, '('); if (func_kind == JS_FUNC_ASYNC || func_kind == JS_FUNC_ASYNC_GENERATOR) { string_buffer_puts8(b, "async "); } string_buffer_puts8(b, "function"); if (func_kind == JS_FUNC_GENERATOR || func_kind == JS_FUNC_ASYNC_GENERATOR) { string_buffer_putc8(b, '*'); } string_buffer_puts8(b, " anonymous("); n = argc - 1; for(i = 0; i < n; i++) { if (i != 0) { string_buffer_putc8(b, ','); } if (string_buffer_concat_value(b, argv[i])) goto fail; } string_buffer_puts8(b, "\n) {\n"); if (n >= 0) { if (string_buffer_concat_value(b, argv[n])) goto fail; } string_buffer_puts8(b, "\n})"); s = string_buffer_end(b); if (JS_IsException(s)) goto fail1; obj = JS_EvalObject(ctx, ctx->global_obj, s, JS_EVAL_TYPE_INDIRECT, -1); JS_FreeValue(ctx, s); if (JS_IsException(obj)) goto fail1; if (!JS_IsUndefined(new_target)) { /* set the prototype */ proto = JS_GetProperty(ctx, new_target, JS_ATOM_prototype); if (JS_IsException(proto)) goto fail1; if (!JS_IsObject(proto)) { JSContext *realm; JS_FreeValue(ctx, proto); realm = JS_GetFunctionRealm(ctx, new_target); if (!realm) goto fail1; proto = js_dup(realm->class_proto[func_kind_to_class_id[func_kind]]); } ret = JS_SetPrototypeInternal(ctx, obj, proto, TRUE); JS_FreeValue(ctx, proto); if (ret < 0) goto fail1; } return obj; fail: string_buffer_free(b); fail1: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O2
c
js_function_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, %ebp movq %r8, %r12 movl %ecx, %r13d movq %rdx, 0x48(%rsp) movq %rsi, 0x40(%rsp) movq %rdi, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rsi xorl %edx, %edx callq 0x31bf2 pushq $0x28 popq %rsi movq %r14, %rdi callq 0x44fd5 movl %ebp, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x33d48 leaq 0x567bc(%rip), %rsi # 0x8a4fa leaq 0x20(%rsp), %rdi callq 0x45852 movq %rbx, 0x10(%rsp) leaq 0x563bc(%rip), %rsi # 0x8a110 leaq 0x20(%rsp), %rdi callq 0x45852 movl %ebp, 0x1c(%rsp) andl $-0x3, %ebp cmpl $0x1, %ebp jne 0x33d77 leaq 0x20(%rsp), %rdi pushq $0x2a popq %rsi callq 0x44fd5 leaq 0x56783(%rip), %rsi # 0x8a501 leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x45852 movq %r13, 0x50(%rsp) leal -0x1(%r13), %ebx xorl %ebp, %ebp testl %ebx, %ebx movl $0x0, %r13d cmovgl %ebx, %r13d shlq $0x4, %r13 pushq $0x2c popq %r14 cmpq %rbp, %r13 je 0x33dda testq %rbp, %rbp je 0x33dbf movq %r15, %rdi movl %r14d, %esi callq 0x44fd5 movq (%r12,%rbp), %rsi movq 0x8(%r12,%rbp), %rdx movq %r15, %rdi callq 0x454fc addq $0x10, %rbp testl %eax, %eax je 0x33daa jmp 0x33e0f leaq 0x5672c(%rip), %rsi # 0x8a50d leaq 0x20(%rsp), %rdi callq 0x45852 cmpl $0x0, 0x50(%rsp) jle 0x33e4f movl %ebx, %eax shlq $0x4, %rax movq (%r12,%rax), %rsi movq 0x8(%r12,%rax), %rdx leaq 0x20(%rsp), %rdi callq 0x454fc testl %eax, %eax je 0x33e4f leaq 0x20(%rsp), %rdi callq 0x32ab1 pushq $0x3 popq %r12 xorl %r13d, %r13d movq 0x10(%rsp), %rbx movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1bbce pushq $0x6 popq %r12 xorl %r13d, %r13d movq %r13, %rax movq %r12, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x566bd(%rip), %rsi # 0x8a513 leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x45852 movq %r14, %rdi callq 0x30684 movq %rdx, %r15 cmpl $0x6, %r15d je 0x33e19 movq %rax, %r14 movq 0x10(%rsp), %rbx movq 0x1a0(%rbx), %rsi movq 0x1a8(%rbx), %rdx orl $-0x1, (%rsp) pushq $0x3 popq %r9 movq %rbx, %rdi movq %rax, %rcx movq %r15, %r8 callq 0x3b35d movq %rax, %r13 movq %rdx, %r12 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1bbce cmpl $0x6, %r12d je 0x33e25 movq 0x48(%rsp), %r14 cmpl $0x3, %r14d je 0x33e3a pushq $0x3c popq %rcx movq %rbx, %rdi movq 0x40(%rsp), %rbp movq %rbp, %rsi movq %r14, %rdx callq 0x1ebf3 movq %rdx, %r15 cmpl $-0x1, %r15d je 0x33f42 cmpl $0x6, %r15d je 0x33e25 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x1bbce movq %rbx, %rdi movq %rbp, %rsi movq %r14, %rdx callq 0x4c883 testq %rax, %rax je 0x33e25 movq 0x40(%rax), %rsi movl 0x1c(%rsp), %ecx leaq 0x54bfe(%rip), %rdx # 0x88b28 movzwl (%rdx,%rcx,2), %ecx shll $0x4, %ecx movq (%rsi,%rcx), %rax movq 0x8(%rsi,%rcx), %r15 cmpl $-0x9, %r15d jb 0x33f42 incl (%rax) pushq $0x1 popq %r9 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %rax, %rcx movq %rax, %r14 movq %r15, %r8 callq 0x203b9 movl %eax, %ebp movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1bbce testl %ebp, %ebp jns 0x33e3a jmp 0x33e25
js_function_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebp, r9d mov r12, r8 mov r13d, ecx mov [rsp+88h+var_40], rdx mov [rsp+88h+var_48], rsi mov rbx, rdi lea r14, [rsp+88h+var_68] mov rsi, r14 xor edx, edx call string_buffer_init push 28h ; '(' pop rsi mov rdi, r14 call string_buffer_putc8 mov eax, ebp and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_33D48 lea rsi, aAsync_0; "async " lea rdi, [rsp+88h+var_68] call string_buffer_puts8 loc_33D48: mov [rsp+88h+var_78], rbx lea rsi, aGetterMustBeAF+11h; "function" lea rdi, [rsp+88h+var_68] call string_buffer_puts8 mov [rsp+88h+var_6C], ebp and ebp, 0FFFFFFFDh cmp ebp, 1 jnz short loc_33D77 lea rdi, [rsp+88h+var_68] push 2Ah ; '*' pop rsi call string_buffer_putc8 loc_33D77: lea rsi, aAnonymous_0; " anonymous(" lea r15, [rsp+88h+var_68] mov rdi, r15 call string_buffer_puts8 mov [rsp+88h+var_38], r13 lea ebx, [r13-1] xor ebp, ebp test ebx, ebx mov r13d, 0 cmovg r13d, ebx shl r13, 4 push 2Ch ; ',' pop r14 loc_33DAA: cmp r13, rbp jz short loc_33DDA test rbp, rbp jz short loc_33DBF mov rdi, r15 mov esi, r14d call string_buffer_putc8 loc_33DBF: mov rsi, [r12+rbp] mov rdx, [r12+rbp+8] mov rdi, r15 call string_buffer_concat_value add rbp, 10h test eax, eax jz short loc_33DAA jmp short loc_33E0F loc_33DDA: lea rsi, asc_8A50D; "\n) {\n" lea rdi, [rsp+88h+var_68] call string_buffer_puts8 cmp dword ptr [rsp+88h+var_38], 0 jle short loc_33E4F mov eax, ebx shl rax, 4 mov rsi, [r12+rax] mov rdx, [r12+rax+8] lea rdi, [rsp+88h+var_68] call string_buffer_concat_value test eax, eax jz short loc_33E4F loc_33E0F: lea rdi, [rsp+88h+var_68] call string_buffer_free loc_33E19: push 3 pop r12 xor r13d, r13d mov rbx, [rsp+88h+var_78] loc_33E25: mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_FreeValue push 6 pop r12 xor r13d, r13d loc_33E3A: mov rax, r13 mov rdx, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_33E4F: lea rsi, asc_8A513; "\n})" lea r14, [rsp+88h+var_68] mov rdi, r14 call string_buffer_puts8 mov rdi, r14 call string_buffer_end mov r15, rdx cmp r15d, 6 jz short loc_33E19 mov r14, rax mov rbx, [rsp+88h+var_78] mov rsi, [rbx+1A0h] mov rdx, [rbx+1A8h] or [rsp+88h+var_88], 0FFFFFFFFh push 3 pop r9 mov rdi, rbx mov rcx, rax mov r8, r15 call JS_EvalObject mov r13, rax mov r12, rdx mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue cmp r12d, 6 jz loc_33E25 mov r14, [rsp+88h+var_40] cmp r14d, 3 jz loc_33E3A push 3Ch ; '<' pop rcx mov rdi, rbx mov rbp, [rsp+88h+var_48] mov rsi, rbp mov rdx, r14 call JS_GetProperty mov r15, rdx cmp r15d, 0FFFFFFFFh jz short loc_33F42 cmp r15d, 6 jz loc_33E25 mov rdi, rbx mov rsi, rax mov rdx, r15 call JS_FreeValue mov rdi, rbx mov rsi, rbp mov rdx, r14 call JS_GetFunctionRealm test rax, rax jz loc_33E25 mov rsi, [rax+40h] mov ecx, [rsp+88h+var_6C] lea rdx, func_kind_to_class_id movzx ecx, word ptr [rdx+rcx*2] shl ecx, 4 mov rax, [rsi+rcx] mov r15, [rsi+rcx+8] cmp r15d, 0FFFFFFF7h jb short loc_33F42 inc dword ptr [rax] loc_33F42: push 1 pop r9 mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, rax mov r14, rax mov r8, r15 call JS_SetPrototypeInternal mov ebp, eax mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue test ebp, ebp jns loc_33E3A jmp loc_33E25
long long js_function_constructor( long long a1, long long a2, long long a3, unsigned int a4, long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long v16; // r13 unsigned int v17; // ebx long long v18; // rbp bool v19; // zf long long v20; // r13 long long v21; // r13 int v22; // eax long long v23; // r12 long long v24; // r13 long long v25; // rbx long long v27; // rax long long v28; // rdx long long v29; // r15 long long v30; // r14 long long v31; // rdx long long v32; // r14 long long v33; // rbp _DWORD *Property; // rax long long v35; // rdx __m128 v36; // xmm4 __m128 v37; // xmm5 long long v38; // r15 long long FunctionRealm; // rax long long v40; // rsi long long v41; // rcx long long v42; // r14 int v43; // ebp int v44; // [rsp+1Ch] [rbp-6Ch] long long v45[4]; // [rsp+20h] [rbp-68h] BYREF long long v46; // [rsp+40h] [rbp-48h] long long v47; // [rsp+48h] [rbp-40h] long long v48; // [rsp+50h] [rbp-38h] v16 = a4; v47 = a3; v46 = a2; string_buffer_init(a1, (long long)v45, 0); string_buffer_putc8(v45, 40LL); if ( (a6 & 0xFFFFFFFE) == 2 ) string_buffer_puts8(v45, "async "); string_buffer_puts8(v45, "function"); v44 = a6; if ( (a6 & 0xFFFFFFFD) == 1 ) string_buffer_putc8(v45, 42LL); string_buffer_puts8(v45, " anonymous("); v48 = v16; v17 = v16 - 1; v18 = 0LL; v19 = (_DWORD)v16 == 1; v20 = 0LL; if ( (v17 & 0x80000000) == 0 && !v19 ) v20 = v17; v21 = 16 * v20; while ( v21 != v18 ) { if ( v18 ) string_buffer_putc8(v45, 44LL); v22 = string_buffer_concat_value(v45, *(_QWORD *)(a5 + v18), *(_QWORD *)(a5 + v18 + 8)); v18 += 16LL; if ( v22 ) goto LABEL_15; } string_buffer_puts8(v45, "\n) {\n"); if ( (int)v48 > 0 && (unsigned int)string_buffer_concat_value(v45, *(_QWORD *)(a5 + 16LL * v17), *(_QWORD *)(a5 + 16LL * v17 + 8)) ) { LABEL_15: string_buffer_free(v45); LABEL_16: v23 = 3LL; v24 = 0LL; v25 = a1; goto LABEL_17; } string_buffer_puts8(v45, "\n})"); v27 = string_buffer_end(v45); v29 = v28; if ( (_DWORD)v28 == 6 ) goto LABEL_16; v30 = v27; v25 = a1; v24 = JS_EvalObject(a1, *(_QWORD *)(a1 + 416), *(_QWORD *)(a1 + 424), v27, v28, 3, -1); v23 = v31; JS_FreeValue(a1, v30, v29); if ( (_DWORD)v23 == 6 ) goto LABEL_17; v32 = v47; if ( (_DWORD)v47 != 3 ) { v33 = v46; Property = (_DWORD *)JS_GetProperty(a1, v46, v47, 60); v38 = v35; if ( (_DWORD)v35 != -1 ) { if ( (_DWORD)v35 == 6 ) goto LABEL_17; JS_FreeValue(a1, (long long)Property, v35); FunctionRealm = JS_GetFunctionRealm(a1, v33, v32); if ( !FunctionRealm ) goto LABEL_17; v40 = *(_QWORD *)(FunctionRealm + 64); v41 = 16 * (unsigned int)func_kind_to_class_id[v44]; Property = *(_DWORD **)(v40 + v41); v38 = *(_QWORD *)(v40 + v41 + 8); if ( (unsigned int)v38 >= 0xFFFFFFF7 ) ++*Property; } v42 = (long long)Property; v43 = JS_SetPrototypeInternal(a1, v24, v23, Property, v38, 1LL, a7, a8, a9, a10, v36, v37, a13, a14); JS_FreeValue(a1, v42, v38); if ( v43 < 0 ) { LABEL_17: JS_FreeValue(v25, v24, v23); return 0LL; } } return v24; }
js_function_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBP,R9D MOV R12,R8 MOV R13D,ECX MOV qword ptr [RSP + 0x48],RDX MOV qword ptr [RSP + 0x40],RSI MOV RBX,RDI LEA R14,[RSP + 0x20] MOV RSI,R14 XOR EDX,EDX CALL 0x00131bf2 PUSH 0x28 POP RSI MOV RDI,R14 CALL 0x00144fd5 MOV EAX,EBP AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00133d48 LEA RSI,[0x18a4fa] LEA RDI,[RSP + 0x20] CALL 0x00145852 LAB_00133d48: MOV qword ptr [RSP + 0x10],RBX LEA RSI,[0x18a110] LEA RDI,[RSP + 0x20] CALL 0x00145852 MOV dword ptr [RSP + 0x1c],EBP AND EBP,0xfffffffd CMP EBP,0x1 JNZ 0x00133d77 LEA RDI,[RSP + 0x20] PUSH 0x2a POP RSI CALL 0x00144fd5 LAB_00133d77: LEA RSI,[0x18a501] LEA R15,[RSP + 0x20] MOV RDI,R15 CALL 0x00145852 MOV qword ptr [RSP + 0x50],R13 LEA EBX,[R13 + -0x1] XOR EBP,EBP TEST EBX,EBX MOV R13D,0x0 CMOVG R13D,EBX SHL R13,0x4 PUSH 0x2c POP R14 LAB_00133daa: CMP R13,RBP JZ 0x00133dda TEST RBP,RBP JZ 0x00133dbf MOV RDI,R15 MOV ESI,R14D CALL 0x00144fd5 LAB_00133dbf: MOV RSI,qword ptr [R12 + RBP*0x1] MOV RDX,qword ptr [R12 + RBP*0x1 + 0x8] MOV RDI,R15 CALL 0x001454fc ADD RBP,0x10 TEST EAX,EAX JZ 0x00133daa JMP 0x00133e0f LAB_00133dda: LEA RSI,[0x18a50d] LEA RDI,[RSP + 0x20] CALL 0x00145852 CMP dword ptr [RSP + 0x50],0x0 JLE 0x00133e4f MOV EAX,EBX SHL RAX,0x4 MOV RSI,qword ptr [R12 + RAX*0x1] MOV RDX,qword ptr [R12 + RAX*0x1 + 0x8] LEA RDI,[RSP + 0x20] CALL 0x001454fc TEST EAX,EAX JZ 0x00133e4f LAB_00133e0f: LEA RDI,[RSP + 0x20] CALL 0x00132ab1 LAB_00133e19: PUSH 0x3 POP R12 XOR R13D,R13D MOV RBX,qword ptr [RSP + 0x10] LAB_00133e25: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x0011bbce PUSH 0x6 POP R12 XOR R13D,R13D LAB_00133e3a: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00133e4f: LEA RSI,[0x18a513] LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x00145852 MOV RDI,R14 CALL 0x00130684 MOV R15,RDX CMP R15D,0x6 JZ 0x00133e19 MOV R14,RAX MOV RBX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RBX + 0x1a0] MOV RDX,qword ptr [RBX + 0x1a8] OR dword ptr [RSP],0xffffffff PUSH 0x3 POP R9 MOV RDI,RBX MOV RCX,RAX MOV R8,R15 CALL 0x0013b35d MOV R13,RAX MOV R12,RDX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011bbce CMP R12D,0x6 JZ 0x00133e25 MOV R14,qword ptr [RSP + 0x48] CMP R14D,0x3 JZ 0x00133e3a PUSH 0x3c POP RCX MOV RDI,RBX MOV RBP,qword ptr [RSP + 0x40] MOV RSI,RBP MOV RDX,R14 CALL 0x0011ebf3 MOV R15,RDX CMP R15D,-0x1 JZ 0x00133f42 CMP R15D,0x6 JZ 0x00133e25 MOV RDI,RBX MOV RSI,RAX MOV RDX,R15 CALL 0x0011bbce MOV RDI,RBX MOV RSI,RBP MOV RDX,R14 CALL 0x0014c883 TEST RAX,RAX JZ 0x00133e25 MOV RSI,qword ptr [RAX + 0x40] MOV ECX,dword ptr [RSP + 0x1c] LEA RDX,[0x188b28] MOVZX ECX,word ptr [RDX + RCX*0x2] SHL ECX,0x4 MOV RAX,qword ptr [RSI + RCX*0x1] MOV R15,qword ptr [RSI + RCX*0x1 + 0x8] CMP R15D,-0x9 JC 0x00133f42 INC dword ptr [RAX] LAB_00133f42: PUSH 0x1 POP R9 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,RAX MOV R14,RAX MOV R8,R15 CALL 0x001203b9 MOV EBP,EAX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011bbce TEST EBP,EBP JNS 0x00133e3a JMP 0x00133e25
int1 [16] js_function_constructor (long param_1,int8 param_2,int8 param_3,uint param_4,long param_5,uint param_6 ) { int *piVar1; int8 uVar2; int1 auVar3 [16]; int8 uVar4; int iVar5; long lVar6; uint uVar7; long lVar8; ulong uVar9; int1 auVar10 [16]; int1 auVar11 [16]; int1 local_68 [32]; int8 local_48; int8 local_40; ulong local_38; local_48 = param_2; local_40 = param_3; string_buffer_init(param_1,local_68,0); string_buffer_putc8(local_68,0x28); if ((param_6 & 0xfffffffe) == 2) { string_buffer_puts8(local_68,"async "); } string_buffer_puts8(local_68,"function"); if ((param_6 & 0xfffffffd) == 1) { string_buffer_putc8(local_68,0x2a); } string_buffer_puts8(local_68," anonymous("); uVar7 = param_4 - 1; lVar8 = 0; uVar9 = 0; if (0 < (int)uVar7) { uVar9 = (ulong)uVar7; } local_38 = (ulong)param_4; do { if (uVar9 * 0x10 == lVar8) { string_buffer_puts8(local_68,"\n) {\n"); if (((int)local_38 < 1) || (iVar5 = string_buffer_concat_value (local_68,*(int8 *)(param_5 + (ulong)uVar7 * 0x10), *(int8 *)(param_5 + 8 + (ulong)uVar7 * 0x10)), iVar5 == 0)) { string_buffer_puts8(local_68,&DAT_0018a513); auVar10 = string_buffer_end(local_68); if (auVar10._8_4_ == 6) goto LAB_00133e19; auVar11 = JS_EvalObject(param_1,*(int8 *)(param_1 + 0x1a0), *(int8 *)(param_1 + 0x1a8),auVar10._0_8_,auVar10._8_8_,3, 0xffffffff); JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_); uVar4 = local_40; uVar2 = local_48; if (auVar11._8_4_ == 6) goto LAB_00133e25; if ((int)local_40 == 3) { return auVar11; } auVar10 = JS_GetProperty(param_1,local_48,local_40,0x3c); if (auVar10._8_4_ != -1) { if (auVar10._8_4_ == 6) goto LAB_00133e25; JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_); lVar8 = JS_GetFunctionRealm(param_1,uVar2,uVar4); if (lVar8 == 0) goto LAB_00133e25; lVar6 = (ulong)*(ushort *)((long)&func_kind_to_class_id + (ulong)param_6 * 2) * 0x10; piVar1 = *(int **)(*(long *)(lVar8 + 0x40) + lVar6); uVar2 = *(int8 *)(*(long *)(lVar8 + 0x40) + 8 + lVar6); auVar3._8_8_ = uVar2; auVar3._0_8_ = piVar1; auVar10._8_8_ = uVar2; auVar10._0_8_ = piVar1; if (0xfffffff6 < (uint)uVar2) { *piVar1 = *piVar1 + 1; auVar10 = auVar3; } } iVar5 = JS_SetPrototypeInternal (param_1,auVar11._0_8_,auVar11._8_8_,auVar10._0_8_,auVar10._8_8_,1); JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_); if (-1 < iVar5) { return auVar11; } goto LAB_00133e25; } break; } if (lVar8 != 0) { string_buffer_putc8(local_68,0x2c); } iVar5 = string_buffer_concat_value (local_68,*(int8 *)(param_5 + lVar8), *(int8 *)(param_5 + 8 + lVar8)); lVar8 = lVar8 + 0x10; } while (iVar5 == 0); string_buffer_free(local_68); LAB_00133e19: auVar11 = ZEXT816(3) << 0x40; LAB_00133e25: JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_); return ZEXT816(6) << 0x40; }
38,879
js_date_toJSON
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_toJSON(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // toJSON(key) JSValue obj, tv, method, rv; double d; rv = JS_EXCEPTION; tv = JS_UNDEFINED; obj = JS_ToObject(ctx, this_val); tv = JS_ToPrimitive(ctx, obj, HINT_NUMBER); if (JS_IsException(tv)) goto exception; if (JS_IsNumber(tv)) { if (JS_ToFloat64(ctx, &d, tv) < 0) goto exception; if (!isfinite(d)) { rv = JS_NULL; goto done; } } method = JS_GetPropertyStr(ctx, obj, "toISOString"); if (JS_IsException(method)) goto exception; if (!JS_IsFunction(ctx, method)) { JS_ThrowTypeError(ctx, "object needs toISOString method"); JS_FreeValue(ctx, method); goto exception; } rv = JS_CallFree(ctx, method, obj, 0, NULL); exception: done: JS_FreeValue(ctx, obj); JS_FreeValue(ctx, tv); return rv; }
O1
c
js_date_toJSON: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx callq 0x26ddd movq %rax, %r14 movq %rdx, %r15 movq %rax, 0x10(%rsp) cmpl $-0x9, %r15d jb 0x568b4 movq 0x10(%rsp), %rax incl (%rax) movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl $0x1, %ecx callq 0x3dfd7 movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x56938 cmpl $0x7, %r13d je 0x568de testl %r13d, %r13d jne 0x5691a leaq 0x10(%rsp), %rsi movq %rbx, %rdi movq %rbp, %rdx movq %r13, %rcx callq 0x27681 testl %eax, %eax js 0x56938 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF andq 0x10(%rsp), %rax movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF cmpq %rcx, %rax jle 0x5691a movl $0x2, %eax jmp 0x5693d leaq 0x49b27(%rip), %rcx # 0xa0448 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x242ea movq %rdx, %r12 cmpl $0x6, %r12d jne 0x5697f movl $0x6, %eax movq %rax, 0x8(%rsp) xorl %r12d, %r12d xorl %ecx, %ecx orq %rcx, %r12 movq 0x18(%rbx), %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 movq %r12, %rax movq 0x8(%rsp), %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movq %rax, 0x18(%rsp) movq %rax, %rsi movq %r12, %rdx callq 0x22dbe testl %eax, %eax je 0x569d1 movq $0x0, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq %r12, %rdx movq %r14, %rcx movq %r15, %r8 xorl %r9d, %r9d callq 0x22c9d movq %rdx, 0x8(%rsp) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r12d jmp 0x56947 movl $0x6, %eax movq %rax, 0x8(%rsp) leaq 0x49d37(%rip), %rsi # 0xa0719 movq %r12, 0x20(%rsp) xorl %r12d, %r12d movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movq 0x18(%rbx), %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1d8c6 jmp 0x56945
js_date_toJSON: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi call JS_ToObject mov r14, rax mov r15, rdx mov [rsp+58h+var_48], rax cmp r15d, 0FFFFFFF7h jb short loc_568B4 mov rax, [rsp+58h+var_48] inc dword ptr [rax] loc_568B4: mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, 1 call JS_ToPrimitiveFree mov rbp, rax mov r13, rdx cmp r13d, 6 jz short loc_56938 cmp r13d, 7 jz short loc_568DE test r13d, r13d jnz short loc_5691A loc_568DE: lea rsi, [rsp+58h+var_48] mov rdi, rbx mov rdx, rbp mov rcx, r13 call JS_ToFloat64 test eax, eax js short loc_56938 mov rax, 7FFFFFFFFFFFFFFFh and rax, [rsp+58h+var_48] mov rcx, 7FEFFFFFFFFFFFFFh cmp rax, rcx jle short loc_5691A mov eax, 2 jmp short loc_5693D loc_5691A: lea rcx, aToisostring; "toISOString" mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_GetPropertyStr mov r12, rdx cmp r12d, 6 jnz short loc_5697F loc_56938: mov eax, 6 loc_5693D: mov [rsp+58h+var_50], rax xor r12d, r12d loc_56945: xor ecx, ecx loc_56947: or r12, rcx mov rdi, [rbx+18h] mov rsi, r14 mov rdx, r15 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT mov rax, r12 mov rdx, [rsp+58h+var_50] add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5697F: mov rdi, rbx mov [rsp+58h+var_40], rax mov rsi, rax mov rdx, r12 call JS_IsFunction test eax, eax jz short loc_569D1 mov [rsp+58h+var_58], 0 mov rdi, rbx mov rsi, [rsp+58h+var_40] mov rdx, r12 mov rcx, r14 mov r8, r15 xor r9d, r9d call JS_CallFree mov [rsp+58h+var_50], rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r12d, eax jmp loc_56947 loc_569D1: mov eax, 6 mov [rsp+58h+var_50], rax lea rsi, aObjectNeedsToi; "object needs toISOString method" mov [rsp+58h+var_38], r12 xor r12d, r12d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov rdi, [rbx+18h] mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] call JS_FreeValueRT jmp loc_56945
unsigned long long js_date_toJSON( 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; // rdx _DWORD *v15; // r14 double v16; // xmm4_8 double v17; // xmm5_8 long long v18; // r15 _DWORD *v19; // rax long long v20; // rdx _DWORD *v21; // rbp long long v22; // r13 _DWORD *PropertyStr; // rax long long v24; // rdx long long v25; // r12 long long v26; // r12 unsigned long long v27; // rcx unsigned long long v28; // r12 long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 long long v36; // rax char v37; // [rsp+0h] [rbp-58h] unsigned long long v38; // [rsp+10h] [rbp-48h] BYREF _DWORD *v39; // [rsp+18h] [rbp-40h] long long v40; // [rsp+20h] [rbp-38h] v15 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v14; v38 = (unsigned long long)v15; if ( (unsigned int)v14 >= 0xFFFFFFF7 ) ++*(_DWORD *)v38; v19 = (_DWORD *)JS_ToPrimitiveFree(a1, (unsigned long long)v15, v14, 1, a7, a8, a9, a10, v16, v17, a13, a14); v21 = v19; v22 = v20; if ( (_DWORD)v20 == 6 || ((_DWORD)v20 == 7 || !(_DWORD)v20) && ((int)JS_ToFloat64(a1, (double *)&v38, v19, v20) < 0 || (v38 & 0x7FFFFFFFFFFFFFFFLL) > 0x7FEFFFFFFFFFFFFFLL) || (PropertyStr = (_DWORD *)JS_GetPropertyStr(a1, (long long)v15, v18, "toISOString"), v25 = v24, (_DWORD)v24 == 6) ) { v26 = 0LL; } else { v39 = PropertyStr; if ( (unsigned int)JS_IsFunction(a1, (long long)PropertyStr, v24) ) { v36 = JS_CallFree(a1, v39, v25, (int)v15, v18, 0, 0LL); v27 = v36 & 0xFFFFFFFF00000000LL; v26 = (unsigned int)v36; goto LABEL_11; } v40 = v25; v26 = 0LL; JS_ThrowTypeError( a1, (long long)"object needs toISOString method", v30, v31, v32, v33, a7, a8, a9, a10, v34, v35, a13, a14, v37); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v40); } v27 = 0LL; LABEL_11: v28 = v27 | v26; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v15, v18); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v21, v22); return v28; }
js_date_toJSON: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI CALL 0x00126ddd MOV R14,RAX MOV R15,RDX MOV qword ptr [RSP + 0x10],RAX CMP R15D,-0x9 JC 0x001568b4 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_001568b4: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,0x1 CALL 0x0013dfd7 MOV RBP,RAX MOV R13,RDX CMP R13D,0x6 JZ 0x00156938 CMP R13D,0x7 JZ 0x001568de TEST R13D,R13D JNZ 0x0015691a LAB_001568de: LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV RDX,RBP MOV RCX,R13 CALL 0x00127681 TEST EAX,EAX JS 0x00156938 MOV RAX,0x7fffffffffffffff AND RAX,qword ptr [RSP + 0x10] MOV RCX,0x7fefffffffffffff CMP RAX,RCX JLE 0x0015691a MOV EAX,0x2 JMP 0x0015693d LAB_0015691a: LEA RCX,[0x1a0448] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x001242ea MOV R12,RDX CMP R12D,0x6 JNZ 0x0015697f LAB_00156938: MOV EAX,0x6 LAB_0015693d: MOV qword ptr [RSP + 0x8],RAX XOR R12D,R12D LAB_00156945: XOR ECX,ECX LAB_00156947: OR R12,RCX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,R15 CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RBP MOV RDX,R13 CALL 0x0011d8c6 MOV RAX,R12 MOV RDX,qword ptr [RSP + 0x8] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015697f: MOV RDI,RBX MOV qword ptr [RSP + 0x18],RAX MOV RSI,RAX MOV RDX,R12 CALL 0x00122dbe TEST EAX,EAX JZ 0x001569d1 MOV qword ptr [RSP],0x0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,R12 MOV RCX,R14 MOV R8,R15 XOR R9D,R9D CALL 0x00122c9d MOV qword ptr [RSP + 0x8],RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R12D,EAX JMP 0x00156947 LAB_001569d1: MOV EAX,0x6 MOV qword ptr [RSP + 0x8],RAX LEA RSI,[0x1a0719] MOV qword ptr [RSP + 0x20],R12 XOR R12D,R12D MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011d8c6 JMP 0x00156945
int1 [16] js_date_toJSON(long param_1) { int iVar1; int *piVar2; ulong uVar3; int8 uVar5; ulong uVar6; int1 auVar7 [16]; int1 auVar8 [16]; int8 local_50; int *local_48; int8 local_40; int8 local_38; int8 uVar4; auVar7 = JS_ToObject(); uVar4 = auVar7._8_8_; piVar2 = auVar7._0_8_; if (0xfffffff6 < auVar7._8_4_) { *piVar2 = *piVar2 + 1; } local_48 = piVar2; auVar7 = JS_ToPrimitiveFree(param_1,piVar2,uVar4,1); iVar1 = auVar7._8_4_; if (iVar1 == 6) { LAB_00156938: local_50 = 6; } else if ((iVar1 == 7) || (iVar1 == 0)) { iVar1 = JS_ToFloat64(param_1,&local_48,auVar7._0_8_,auVar7._8_8_); if (iVar1 < 0) goto LAB_00156938; if (((ulong)local_48 & 0x7fffffffffffffff) < 0x7ff0000000000000) goto LAB_0015691a; local_50 = 2; } else { LAB_0015691a: auVar8 = JS_GetPropertyStr(param_1,piVar2,uVar4,"toISOString"); uVar5 = auVar8._8_8_; if (auVar8._8_4_ == 6) goto LAB_00156938; local_40 = auVar8._0_8_; iVar1 = JS_IsFunction(param_1,auVar8._0_8_,uVar5); if (iVar1 != 0) { auVar8 = JS_CallFree(param_1,local_40,uVar5,piVar2,uVar4,0,0); local_50 = auVar8._8_8_; uVar3 = auVar8._0_8_ & 0xffffffff00000000; uVar6 = auVar8._0_8_ & 0xffffffff; goto LAB_00156947; } local_50 = 6; local_38 = uVar5; JS_ThrowTypeError(param_1,"object needs toISOString method"); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_40,local_38); } uVar6 = 0; uVar3 = 0; LAB_00156947: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar2,uVar4); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_); auVar7._8_8_ = local_50; auVar7._0_8_ = uVar6 | uVar3; return auVar7; }
38,880
js_date_toJSON
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_toJSON(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // toJSON(key) JSValue obj, tv, method, rv; double d; rv = JS_EXCEPTION; tv = JS_UNDEFINED; obj = JS_ToObject(ctx, this_val); tv = JS_ToPrimitive(ctx, obj, HINT_NUMBER); if (JS_IsException(tv)) goto exception; if (JS_IsNumber(tv)) { if (JS_ToFloat64(ctx, &d, tv) < 0) goto exception; if (!isfinite(d)) { rv = JS_NULL; goto done; } } method = JS_GetPropertyStr(ctx, obj, "toISOString"); if (JS_IsException(method)) goto exception; if (!JS_IsFunction(ctx, method)) { JS_ThrowTypeError(ctx, "object needs toISOString method"); JS_FreeValue(ctx, method); goto exception; } rv = JS_CallFree(ctx, method, obj, 0, NULL); exception: done: JS_FreeValue(ctx, obj); JS_FreeValue(ctx, tv); return rv; }
O2
c
js_date_toJSON: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx callq 0x20b92 movq %rax, %r12 movq %rdx, %r15 pushq $0x1 popq %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x21846 movq %rax, %rbp movq %rdx, %r13 pushq $0x6 popq %r14 cmpl $0x6, %r13d movq %r15, 0x18(%rsp) je 0x4a341 cmpl $0x7, %r13d je 0x4a2e9 testl %r13d, %r13d jne 0x4a327 leaq 0x20(%rsp), %rsi movq %rbx, %rdi movq %rbp, %rdx movq %r13, %rcx callq 0x2127f testl %eax, %eax js 0x4a341 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF andq 0x20(%rsp), %rax movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF cmpq %rcx, %rax jle 0x4a327 movq %r12, %r15 pushq $0x2 popq %r14 jmp 0x4a344 leaq 0x3d054(%rip), %rcx # 0x87382 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1e3fb cmpl $0x6, %edx jne 0x4a37f movq %r12, %r15 xorl %r12d, %r12d xorl %ecx, %ecx orq %rcx, %r12 movq %rbx, %rdi movq %r15, %rsi movq 0x18(%rsp), %rdx callq 0x1801e movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1801e movq %r12, %rax movq %r14, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movq %rax, 0x8(%rsp) movq %rax, %rsi movq %rdx, 0x10(%rsp) callq 0x1ce7d testl %eax, %eax je 0x4a3d5 andq $0x0, (%rsp) movq %rbx, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r12, %r15 movq %r12, %rcx movq 0x18(%rsp), %r8 xorl %r9d, %r9d callq 0x1cd8e movq %rdx, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %r12d jmp 0x4a349 movq %r12, %r15 leaq 0x3d274(%rip), %rsi # 0x87653 xorl %r12d, %r12d movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d movq %rbx, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1801e jmp 0x4a347
js_date_toJSON: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi call JS_ToObject mov r12, rax mov r15, rdx push 1 pop rcx mov rdi, rbx mov rsi, rax call JS_ToPrimitive mov rbp, rax mov r13, rdx push 6 pop r14 cmp r13d, 6 mov [rsp+58h+var_40], r15 jz short loc_4A341 cmp r13d, 7 jz short loc_4A2E9 test r13d, r13d jnz short loc_4A327 loc_4A2E9: lea rsi, [rsp+58h+var_38] mov rdi, rbx mov rdx, rbp mov rcx, r13 call JS_ToFloat64 test eax, eax js short loc_4A341 mov rax, 7FFFFFFFFFFFFFFFh and rax, [rsp+58h+var_38] mov rcx, 7FEFFFFFFFFFFFFFh cmp rax, rcx jle short loc_4A327 mov r15, r12 push 2 pop r14 jmp short loc_4A344 loc_4A327: lea rcx, aToisostring; "toISOString" mov rdi, rbx mov rsi, r12 mov rdx, r15 call JS_GetPropertyStr cmp edx, 6 jnz short loc_4A37F loc_4A341: mov r15, r12 loc_4A344: xor r12d, r12d loc_4A347: xor ecx, ecx loc_4A349: or r12, rcx mov rdi, rbx mov rsi, r15 mov rdx, [rsp+58h+var_40] call JS_FreeValue mov rdi, rbx mov rsi, rbp mov rdx, r13 call JS_FreeValue mov rax, r12 mov rdx, r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4A37F: mov rdi, rbx mov [rsp+58h+var_50], rax mov rsi, rax mov [rsp+58h+var_48], rdx call JS_IsFunction test eax, eax jz short loc_4A3D5 and [rsp+58h+var_58], 0 mov rdi, rbx mov rsi, [rsp+58h+var_50] mov rdx, [rsp+58h+var_48] mov r15, r12 mov rcx, r12 mov r8, [rsp+58h+var_40] xor r9d, r9d call JS_CallFree mov r14, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov r12d, eax jmp loc_4A349 loc_4A3D5: mov r15, r12 lea rsi, aObjectNeedsToi; "object needs toISOString method" xor r12d, r12d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov rdi, rbx mov rsi, [rsp+58h+var_50] mov rdx, [rsp+58h+var_48] call JS_FreeValue jmp loc_4A347
unsigned long long js_date_toJSON( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { _DWORD *v14; // r12 long long v15; // rdx long long v16; // r15 _DWORD *v17; // rax long long v18; // rdx long long v19; // rbp long long v20; // r13 long long v21; // r15 long long PropertyStr; // rax long long v23; // rdx long long v24; // r12 unsigned long long v25; // rcx unsigned long long v26; // r12 long long v28; // rdx long long v29; // rcx long long v30; // r8 long long v31; // r9 __m128 v32; // xmm4 __m128 v33; // xmm5 long long v34; // rax char v35; // [rsp+0h] [rbp-58h] long long v36; // [rsp+8h] [rbp-50h] long long v37; // [rsp+10h] [rbp-48h] long long v38; // [rsp+18h] [rbp-40h] long long v39[7]; // [rsp+20h] [rbp-38h] BYREF v14 = (_DWORD *)JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v16 = v15; v17 = (_DWORD *)JS_ToPrimitive(a1, v14, v15); v19 = (long long)v17; v20 = v18; v38 = v16; if ( (_DWORD)v18 == 6 ) goto LABEL_8; if ( (_DWORD)v18 == 7 || !(_DWORD)v18 ) { if ( (int)JS_ToFloat64(a1, (long long)v39, v17, v18) < 0 ) { LABEL_8: v21 = (long long)v14; goto LABEL_9; } if ( (v39[0] & 0x7FFFFFFFFFFFFFFFuLL) > 0x7FEFFFFFFFFFFFFFLL ) { v21 = (long long)v14; LABEL_9: v24 = 0LL; goto LABEL_10; } } PropertyStr = JS_GetPropertyStr(a1, (int)v14, v16, "toISOString"); if ( (_DWORD)v23 == 6 ) goto LABEL_8; v36 = PropertyStr; v37 = v23; if ( (unsigned int)JS_IsFunction(a1, PropertyStr, v23) ) { v21 = (long long)v14; v34 = JS_CallFree(a1, v36, v37, (int)v14, v38, 0, 0LL); v25 = v34 & 0xFFFFFFFF00000000LL; v24 = (unsigned int)v34; goto LABEL_11; } v21 = (long long)v14; v24 = 0LL; JS_ThrowTypeError( a1, (long long)"object needs toISOString method", v28, v29, v30, v31, a7, a8, a9, a10, v32, v33, a13, a14, v35); JS_FreeValue(a1, v36, v37); LABEL_10: v25 = 0LL; LABEL_11: v26 = v25 | v24; JS_FreeValue(a1, v21, v38); JS_FreeValue(a1, v19, v20); return v26; }
js_date_toJSON: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI CALL 0x00120b92 MOV R12,RAX MOV R15,RDX PUSH 0x1 POP RCX MOV RDI,RBX MOV RSI,RAX CALL 0x00121846 MOV RBP,RAX MOV R13,RDX PUSH 0x6 POP R14 CMP R13D,0x6 MOV qword ptr [RSP + 0x18],R15 JZ 0x0014a341 CMP R13D,0x7 JZ 0x0014a2e9 TEST R13D,R13D JNZ 0x0014a327 LAB_0014a2e9: LEA RSI,[RSP + 0x20] MOV RDI,RBX MOV RDX,RBP MOV RCX,R13 CALL 0x0012127f TEST EAX,EAX JS 0x0014a341 MOV RAX,0x7fffffffffffffff AND RAX,qword ptr [RSP + 0x20] MOV RCX,0x7fefffffffffffff CMP RAX,RCX JLE 0x0014a327 MOV R15,R12 PUSH 0x2 POP R14 JMP 0x0014a344 LAB_0014a327: LEA RCX,[0x187382] MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL 0x0011e3fb CMP EDX,0x6 JNZ 0x0014a37f LAB_0014a341: MOV R15,R12 LAB_0014a344: XOR R12D,R12D LAB_0014a347: XOR ECX,ECX LAB_0014a349: OR R12,RCX MOV RDI,RBX MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011801e MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 CALL 0x0011801e MOV RAX,R12 MOV RDX,R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014a37f: MOV RDI,RBX MOV qword ptr [RSP + 0x8],RAX MOV RSI,RAX MOV qword ptr [RSP + 0x10],RDX CALL 0x0011ce7d TEST EAX,EAX JZ 0x0014a3d5 AND qword ptr [RSP],0x0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV R15,R12 MOV RCX,R12 MOV R8,qword ptr [RSP + 0x18] XOR R9D,R9D CALL 0x0011cd8e MOV R14,RDX MOV RCX,-0x100000000 AND RCX,RAX MOV R12D,EAX JMP 0x0014a349 LAB_0014a3d5: MOV R15,R12 LEA RSI,[0x187653] XOR R12D,R12D MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e JMP 0x0014a347
int1 [16] js_date_toJSON(int8 param_1) { int iVar1; int8 uVar2; int8 uVar3; ulong uVar4; ulong uVar6; int8 uVar7; int1 auVar8 [16]; int1 auVar9 [16]; ulong local_38; int8 uVar5; auVar8 = JS_ToObject(); uVar5 = auVar8._8_8_; uVar2 = auVar8._0_8_; auVar8 = JS_ToPrimitive(param_1,uVar2,uVar5,1); uVar7 = 6; iVar1 = auVar8._8_4_; if (iVar1 != 6) { if ((iVar1 == 7) || (iVar1 == 0)) { iVar1 = JS_ToFloat64(param_1,&local_38,auVar8._0_8_,auVar8._8_8_); if (-1 < iVar1) { if ((local_38 & 0x7fffffffffffffff) < 0x7ff0000000000000) goto LAB_0014a327; uVar7 = 2; } } else { LAB_0014a327: auVar9 = JS_GetPropertyStr(param_1,uVar2,uVar5,"toISOString"); uVar3 = auVar9._0_8_; if (auVar9._8_4_ != 6) { iVar1 = JS_IsFunction(param_1,uVar3); if (iVar1 != 0) { auVar9 = JS_CallFree(param_1,uVar3,auVar9._8_8_,uVar2,uVar5,0,0); uVar7 = auVar9._8_8_; uVar4 = auVar9._0_8_ & 0xffffffff00000000; uVar6 = auVar9._0_8_ & 0xffffffff; goto LAB_0014a349; } JS_ThrowTypeError(param_1,"object needs toISOString method"); JS_FreeValue(param_1,uVar3,auVar9._8_8_); } } } uVar6 = 0; uVar4 = 0; LAB_0014a349: JS_FreeValue(param_1,uVar2,uVar5); JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_); auVar8._8_8_ = uVar7; auVar8._0_8_ = uVar6 | uVar4; return auVar8; }
38,881
my_scan_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *end, int sequence_type) { const char *str0= str; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; switch (sequence_type) { case MY_SEQ_SPACES: for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end); res > 0 && wc == ' '; str+= res, res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end)) { } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O3
c
my_scan_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpl $0x2, %ecx jne 0x48224 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx movq %r12, -0x30(%rbp) testl %eax, %eax jle 0x4821e cmpq $0x20, -0x38(%rbp) movq -0x30(%rbp), %r12 jne 0x4821e leaq -0x38(%rbp), %r13 movq -0x30(%rbp), %r12 movq %r12, %rcx movl %eax, %r12d addq %rcx, %r12 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx testl %eax, %eax jle 0x4821e cmpq $0x20, -0x38(%rbp) je 0x481fc subq -0x30(%rbp), %r12 jmp 0x48227 xorl %r12d, %r12d movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_scan_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp ecx, 2 jnz short loc_48224 mov r14, rdx mov r12, rsi mov r15, rdi mov rax, [rdi+0B8h] mov rbx, [rax+28h] lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r14 call rbx mov [rbp+var_30], r12 test eax, eax jle short loc_4821E cmp [rbp+var_38], 20h ; ' ' mov r12, [rbp+var_30] jnz short loc_4821E lea r13, [rbp+var_38] mov r12, [rbp+var_30] loc_481FC: mov rcx, r12 mov r12d, eax add r12, rcx mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, r14 call rbx test eax, eax jle short loc_4821E cmp [rbp+var_38], 20h ; ' ' jz short loc_481FC loc_4821E: sub r12, [rbp+var_30] jmp short loc_48227 loc_48224: xor r12d, r12d loc_48227: mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_scan_mb2(long long a1, long long a2, long long a3, int a4) { long long v5; // r12 long long ( *v6)(long long, long long *, long long, long long); // rbx int v7; // eax long long v10; // [rsp+8h] [rbp-38h] BYREF long long v11; // [rsp+10h] [rbp-30h] if ( a4 != 2 ) return 0LL; v5 = a2; v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v7 = v6(a1, &v10, a2, a3); v11 = a2; if ( v7 > 0 ) { v5 = v11; if ( v10 == 32 ) { v5 = v11; do { v5 += (unsigned int)v7; v7 = v6(a1, &v10, v5, a3); } while ( v7 > 0 && v10 == 32 ); } } return v5 - v11; }
my_scan_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP ECX,0x2 JNZ 0x00148224 MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R14 CALL RBX MOV qword ptr [RBP + -0x30],R12 TEST EAX,EAX JLE 0x0014821e CMP qword ptr [RBP + -0x38],0x20 MOV R12,qword ptr [RBP + -0x30] JNZ 0x0014821e LEA R13,[RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] LAB_001481fc: MOV RCX,R12 MOV R12D,EAX ADD R12,RCX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 CALL RBX TEST EAX,EAX JLE 0x0014821e CMP qword ptr [RBP + -0x38],0x20 JZ 0x001481fc LAB_0014821e: SUB R12,qword ptr [RBP + -0x30] JMP 0x00148227 LAB_00148224: XOR R12D,R12D LAB_00148227: MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4) { code *pcVar1; uint uVar2; long local_40; long local_38; if (param_4 == 2) { pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); local_38 = param_2; if ((0 < (int)uVar2) && (local_40 == 0x20)) { do { param_2 = (ulong)uVar2 + param_2; uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); if ((int)uVar2 < 1) break; } while (local_40 == 0x20); } param_2 = param_2 - local_38; } else { param_2 = 0; } return param_2; }
38,882
my_strntoll_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static longlong my_strntoll_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative=0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0] = (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]=EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]=EDOM; return 0L; } if (negative) { if (res > (ulonglong) LONGLONG_MIN) overflow = 1; } else if (res > (ulonglong) LONGLONG_MAX) overflow = 1; if (overflow) { err[0]=ERANGE; return negative ? LONGLONG_MIN : LONGLONG_MAX; } return (negative ? -((longlong)res) : (longlong)res); }
O3
c
my_strntoll_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x44(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x4d976 movl $0x0, -0x34(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0x4d946 cmpq $0x9, %rcx je 0x4d95e cmpq $0x20, %rcx je 0x4d95e jmp 0x4d9a8 cmpq $0x2b, %rcx je 0x4d95e cmpq $0x2d, %rcx jne 0x4d9a8 xorl %ecx, %ecx cmpl $0x0, -0x34(%rbp) sete %cl movl %ecx, -0x34(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0x4d92e movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0x4d982 movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movslq -0x44(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx movq %rcx, -0x60(%rbp) divq %rcx movq %rdx, %rbx movq %rax, -0x58(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x4da89 movl %ebx, %ecx movq %rcx, -0x68(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %r9d, %r9d movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0x4da05 movq %rax, -0x30(%rbp) jmp 0x4da2a leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0x4da15 addq $-0x37, %rsi jmp 0x4da23 leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0x4da9a addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x44(%rbp), %eax jge 0x4da9a movl $0x1, %esi cmpq -0x58(%rbp), %rcx jbe 0x4da3f movq %rcx, %rdi jmp 0x4da59 jne 0x4da4b movq -0x58(%rbp), %rdi cmpq -0x68(%rbp), %rax ja 0x4da59 imulq -0x60(%rbp), %rcx addq %rcx, %rax movl %r9d, %esi movq %rax, %rdi movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *%r12 movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi movq %rdi, %rcx movl %esi, %r9d testl %eax, %eax jg 0x4d9e9 jmp 0x4da90 xorl %edi, %edi movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0x4db03 movl %esi, %r9d movq %rdi, %rcx movq -0x40(%rbp), %rax testq %rax, %rax je 0x4daa6 movq %rbx, (%rax) cmpq %r15, %rbx je 0x4daf4 movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 cmpq %rsi, %rcx movl $0x1, %eax movl %r9d, %edi cmoval %eax, %edi testq %rcx, %rcx cmovsl %eax, %r9d movl -0x34(%rbp), %r8d testl %r8d, %r8d cmovnel %edi, %r9d testl %r9d, %r9d je 0x4db1e leaq -0x1(%rsi), %rax testl %r8d, %r8d movq -0x50(%rbp), %rcx movl $0x22, (%rcx) cmovneq %rsi, %rax jmp 0x4d999 movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0x4d997 movq -0x40(%rbp), %rax testq %rax, %rax je 0x4db0f movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0x4d997 movq %rcx, %rax negq %rax testl %r8d, %r8d cmoveq %rcx, %rax jmp 0x4d999
my_strntoll_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_40], r8 mov [rbp+var_44], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_4D976 mov [rbp+var_34], 0 lea rbx, [rbp+var_30] loc_4D92E: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_4D946 cmp rcx, 9 jz short loc_4D95E cmp rcx, 20h ; ' ' jz short loc_4D95E jmp short loc_4D9A8 loc_4D946: cmp rcx, 2Bh ; '+' jz short loc_4D95E cmp rcx, 2Dh ; '-' jnz short loc_4D9A8 xor ecx, ecx cmp [rbp+var_34], 0 setz cl mov [rbp+var_34], ecx loc_4D95E: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_4D92E loc_4D976: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_4D982 mov [rcx], r15 loc_4D982: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_4D997: xor eax, eax loc_4D999: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4D9A8: movsxd rcx, [rbp+var_44] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_60], rcx div rcx mov rbx, rdx mov [rbp+var_58], rax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_4DA89 mov ecx, ebx mov [rbp+var_68], rcx xor ecx, ecx mov rbx, r15 xor r9d, r9d loc_4D9E9: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_4DA05 mov [rbp+var_30], rax jmp short loc_4DA2A loc_4DA05: lea rax, [rsi-41h] cmp rax, 19h ja short loc_4DA15 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_4DA23 loc_4DA15: lea rax, [rsi-61h] cmp rax, 19h ja short loc_4DA9A add rsi, 0FFFFFFFFFFFFFFA9h loc_4DA23: mov [rbp+var_30], rsi mov rax, rsi loc_4DA2A: cmp eax, [rbp+var_44] jge short loc_4DA9A mov esi, 1 cmp rcx, [rbp+var_58] jbe short loc_4DA3F mov rdi, rcx jmp short loc_4DA59 loc_4DA3F: jnz short loc_4DA4B mov rdi, [rbp+var_58] cmp rax, [rbp+var_68] ja short loc_4DA59 loc_4DA4B: imul rcx, [rbp+var_60] add rax, rcx mov esi, r9d mov rdi, rax loc_4DA59: mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call r12 mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] mov rcx, rdi mov r9d, esi test eax, eax jg loc_4D9E9 jmp short loc_4DA90 loc_4DA89: xor edi, edi mov rbx, r15 xor esi, esi loc_4DA90: test eax, eax jz short loc_4DB03 mov r9d, esi mov rcx, rdi loc_4DA9A: mov rax, [rbp+var_40] test rax, rax jz short loc_4DAA6 mov [rax], rbx loc_4DAA6: cmp rbx, r15 jz short loc_4DAF4 mov rsi, 8000000000000000h cmp rcx, rsi mov eax, 1 mov edi, r9d cmova edi, eax test rcx, rcx cmovs r9d, eax mov r8d, [rbp+var_34] test r8d, r8d cmovnz r9d, edi test r9d, r9d jz short loc_4DB1E lea rax, [rsi-1] test r8d, r8d mov rcx, [rbp+var_50] mov dword ptr [rcx], 22h ; '"' cmovnz rax, rsi jmp loc_4D999 loc_4DAF4: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_4D997 loc_4DB03: mov rax, [rbp+var_40] test rax, rax jz short loc_4DB0F mov [rax], rbx loc_4DB0F: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_4D997 loc_4DB1E: mov rax, rcx neg rax test r8d, r8d cmovz rax, rcx jmp loc_4D999
unsigned long long my_strntoll_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx unsigned long long result; // rax int v13; // eax long long v14; // r8 long long v15; // rcx long long v16; // rbx long long v17; // r9 unsigned long long v18; // rax long long v19; // rsi unsigned int v20; // esi unsigned long long v21; // rdi int v22; // edi unsigned long long v23; // [rsp+28h] [rbp-58h] BOOL v27; // [rsp+4Ch] [rbp-34h] _QWORD v28[6]; // [rsp+50h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v28, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v27 = 0; while ( v28[0] > 42LL ) { if ( v28[0] != 43LL ) { if ( v28[0] != 45LL ) goto LABEL_17; v27 = !v27; } LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v28, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } if ( v28[0] == 9LL || v28[0] == 32LL ) goto LABEL_10; LABEL_17: v23 = 0xFFFFFFFFFFFFFFFFLL / a4; v13 = v8(a1, v28, v6, v9); if ( v13 <= 0 ) { v21 = 0LL; v16 = v6; v20 = 0; LABEL_35: if ( v13 ) { LODWORD(v17) = v20; v15 = v21; goto LABEL_37; } if ( a5 ) *a5 = v16; *a6 = 84; return 0LL; } v15 = 0LL; v16 = v6; v17 = 0LL; while ( 1 ) { v16 += (unsigned int)v13; v18 = v28[0] - 48LL; if ( (unsigned long long)(v28[0] - 48LL) > 9 ) { if ( (unsigned long long)(v28[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v28[0] - 97LL) > 0x19 ) break; v19 = v28[0] - 87LL; } else { v19 = v28[0] - 55LL; } v28[0] = v19; v18 = v19; } else { v28[0] -= 48LL; } if ( (int)v18 >= a4 ) break; v20 = 1; if ( v15 <= v23 ) { if ( v15 != v23 || (v21 = 0xFFFFFFFFFFFFFFFFLL / a4, v18 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v20 = v17; v21 = a4 * v15 + v18; } } else { v21 = v15; } v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long, long long))v8)( a1, v28, v16, v9, v14, v17); v15 = v21; v17 = v20; if ( v13 <= 0 ) goto LABEL_35; } LABEL_37: if ( a5 ) *a5 = v16; if ( v16 == v6 ) { *a6 = 33; return 0LL; } v22 = v17; if ( (unsigned long long)v15 > 0x8000000000000000LL ) v22 = 1; if ( v15 < 0 ) LODWORD(v17) = 1; if ( v27 ) LODWORD(v17) = v22; if ( (_DWORD)v17 ) { result = 0x7FFFFFFFFFFFFFFFLL; *a6 = 34; if ( v27 ) return 0x8000000000000000LL; } else { result = -v15; if ( !v27 ) return v15; } return result; }
my_strntoll_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x44],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x0014d976 MOV dword ptr [RBP + -0x34],0x0 LEA RBX,[RBP + -0x30] LAB_0014d92e: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x0014d946 CMP RCX,0x9 JZ 0x0014d95e CMP RCX,0x20 JZ 0x0014d95e JMP 0x0014d9a8 LAB_0014d946: CMP RCX,0x2b JZ 0x0014d95e CMP RCX,0x2d JNZ 0x0014d9a8 XOR ECX,ECX CMP dword ptr [RBP + -0x34],0x0 SETZ CL MOV dword ptr [RBP + -0x34],ECX LAB_0014d95e: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x0014d92e LAB_0014d976: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x0014d982 MOV qword ptr [RCX],R15 LAB_0014d982: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_0014d997: XOR EAX,EAX LAB_0014d999: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014d9a8: MOVSXD RCX,dword ptr [RBP + -0x44] MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x60],RCX DIV RCX MOV RBX,RDX MOV qword ptr [RBP + -0x58],RAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x0014da89 MOV ECX,EBX MOV qword ptr [RBP + -0x68],RCX XOR ECX,ECX MOV RBX,R15 XOR R9D,R9D LAB_0014d9e9: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x0014da05 MOV qword ptr [RBP + -0x30],RAX JMP 0x0014da2a LAB_0014da05: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x0014da15 ADD RSI,-0x37 JMP 0x0014da23 LAB_0014da15: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x0014da9a ADD RSI,-0x57 LAB_0014da23: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_0014da2a: CMP EAX,dword ptr [RBP + -0x44] JGE 0x0014da9a MOV ESI,0x1 CMP RCX,qword ptr [RBP + -0x58] JBE 0x0014da3f MOV RDI,RCX JMP 0x0014da59 LAB_0014da3f: JNZ 0x0014da4b MOV RDI,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JA 0x0014da59 LAB_0014da4b: IMUL RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV ESI,R9D MOV RDI,RAX LAB_0014da59: MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL R12 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RCX,RDI MOV R9D,ESI TEST EAX,EAX JG 0x0014d9e9 JMP 0x0014da90 LAB_0014da89: XOR EDI,EDI MOV RBX,R15 XOR ESI,ESI LAB_0014da90: TEST EAX,EAX JZ 0x0014db03 MOV R9D,ESI MOV RCX,RDI LAB_0014da9a: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x0014daa6 MOV qword ptr [RAX],RBX LAB_0014daa6: CMP RBX,R15 JZ 0x0014daf4 MOV RSI,-0x8000000000000000 CMP RCX,RSI MOV EAX,0x1 MOV EDI,R9D CMOVA EDI,EAX TEST RCX,RCX CMOVS R9D,EAX MOV R8D,dword ptr [RBP + -0x34] TEST R8D,R8D CMOVNZ R9D,EDI TEST R9D,R9D JZ 0x0014db1e LEA RAX,[RSI + -0x1] TEST R8D,R8D MOV RCX,qword ptr [RBP + -0x50] MOV dword ptr [RCX],0x22 CMOVNZ RAX,RSI JMP 0x0014d999 LAB_0014daf4: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x0014d997 LAB_0014db03: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x0014db0f MOV qword ptr [RAX],RBX LAB_0014db0f: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x0014d997 LAB_0014db1e: MOV RAX,RCX NEG RAX TEST R8D,R8D CMOVZ RAX,RCX JMP 0x0014d999
ulong my_strntoll_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; bool bVar4; bool bVar5; bool bVar6; ulong uVar7; uint uVar8; ulong uVar9; int4 uVar10; ulong uVar11; long lVar12; ulong uVar13; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar8) { bVar4 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_0014d9a8: auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; auVar3 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar9 = SUB168(auVar3 / auVar2,0); uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar12 = param_2; if ((int)uVar8 < 1) { uVar11 = 0; bVar5 = false; goto LAB_0014da90; } uVar11 = 0; bVar5 = false; goto LAB_0014d9e9; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_0014d9a8; bVar4 = !bVar4; } param_2 = param_2 + (ulong)uVar8; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar8); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar10 = 0x21; if (uVar8 == 0) { uVar10 = 0x54; } *param_6 = uVar10; return 0; while( true ) { if (param_4 <= (int)uVar13) goto LAB_0014da9a; uVar7 = uVar11; bVar6 = true; if ((uVar11 <= uVar9) && ((uVar11 != uVar9 || (uVar7 = uVar9, uVar13 <= (SUB168(auVar3 % auVar2,0) & 0xffffffff))))) { uVar7 = uVar13 + uVar11 * (long)param_4; bVar6 = bVar5; } bVar5 = bVar6; uVar11 = uVar7; local_38 = uVar13; uVar8 = (*pcVar1)(param_1,&local_38,lVar12,param_3); if ((int)uVar8 < 1) break; LAB_0014d9e9: lVar12 = (ulong)uVar8 + lVar12; uVar13 = local_38 - 0x30; if (9 < uVar13) { if (local_38 - 0x41 < 0x1a) { uVar13 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_0014da9a; uVar13 = local_38 - 0x57; } } } LAB_0014da90: if (uVar8 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar12; } *param_6 = 0x54; } else { LAB_0014da9a: if (param_5 != (long *)0x0) { *param_5 = lVar12; } if (lVar12 != param_2) { bVar6 = bVar5; if (0x8000000000000000 < uVar11) { bVar6 = true; } if ((long)uVar11 < 0) { bVar5 = true; } if (bVar4) { bVar5 = bVar6; } if (!bVar5) { if (!bVar4) { return uVar11; } return -uVar11; } *param_6 = 0x22; if (bVar4) { return 0x8000000000000000; } return 0x7fffffffffffffff; } *param_6 = 0x21; } return 0; }
38,883
JS_WriteFunctionBytecode
bluesky950520[P]quickjs/quickjs.c
static int JS_WriteFunctionBytecode(BCWriterState *s, const JSFunctionBytecode *b) { int pos, len, bc_len, op; JSAtom atom; uint8_t *bc_buf; uint32_t val; bc_len = b->byte_code_len; bc_buf = js_malloc(s->ctx, bc_len); if (!bc_buf) return -1; memcpy(bc_buf, b->byte_code_buf, bc_len); pos = 0; while (pos < bc_len) { op = bc_buf[pos]; len = short_opcode_info(op).size; switch(short_opcode_info(op).fmt) { case OP_FMT_atom: case OP_FMT_atom_u8: case OP_FMT_atom_u16: case OP_FMT_atom_label_u8: case OP_FMT_atom_label_u16: atom = get_u32(bc_buf + pos + 1); if (bc_atom_to_idx(s, &val, atom)) goto fail; put_u32(bc_buf + pos + 1, val); break; default: // IC (inline cache) opcodes should not end up in the serialized // bytecode; translate them to their non-IC counterparts here if (is_ic_op(op)) { val = get_u32(bc_buf + pos + 1); atom = get_ic_atom(b->ic, val); if (bc_atom_to_idx(s, &val, atom)) goto fail; put_u32(bc_buf + pos + 1, val); bc_buf[pos] -= (OP_get_field_ic - OP_get_field); } break; } pos += len; } if (is_be()) bc_byte_swap(bc_buf, bc_len); dbuf_put(&s->dbuf, bc_buf, bc_len); js_free(s->ctx, bc_buf); return 0; fail: js_free(s->ctx, bc_buf); return -1; }
O0
c
JS_WriteFunctionBytecode: subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x38(%rsp), %rax movl 0x28(%rax), %eax movl %eax, 0x2c(%rsp) movq 0x40(%rsp), %rax movq (%rax), %rdi movslq 0x2c(%rsp), %rsi callq 0x27fa0 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x7f926 movl $0xffffffff, 0x48(%rsp) # imm = 0xFFFFFFFF jmp 0x7fb53 movq 0x18(%rsp), %rdi movq 0x38(%rsp), %rax movq 0x20(%rax), %rsi movslq 0x2c(%rsp), %rdx callq 0xe610 movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax cmpl 0x2c(%rsp), %eax jge 0x7faee movq 0x18(%rsp), %rax movslq 0x34(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, 0x28(%rsp) cmpl $0xb3, 0x28(%rsp) jl 0x7f97d movl 0x28(%rsp), %eax addl $0x12, %eax movl %eax, 0x10(%rsp) jmp 0x7f985 movl 0x28(%rsp), %eax movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax movslq %eax, %rcx leaq 0x93abd(%rip), %rax # 0x113450 movzbl (%rax,%rcx,4), %eax movl %eax, 0x30(%rsp) cmpl $0xb3, 0x28(%rsp) jl 0x7f9b2 movl 0x28(%rsp), %eax addl $0x12, %eax movl %eax, 0xc(%rsp) jmp 0x7f9ba movl 0x28(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax movslq %eax, %rcx leaq 0x93a88(%rip), %rax # 0x113450 movzbl 0x3(%rax,%rcx,4), %eax addl $-0x18, %eax subl $0x4, %eax ja 0x7fa2d jmp 0x7f9d7 movq 0x18(%rsp), %rdi movslq 0x34(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi callq 0x654a0 movl %eax, 0x24(%rsp) movq 0x40(%rsp), %rdi movl 0x24(%rsp), %edx leaq 0x14(%rsp), %rsi callq 0x7fb60 cmpl $0x0, %eax je 0x7fa0e jmp 0x7fb39 movq 0x18(%rsp), %rdi movslq 0x34(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi movl 0x14(%rsp), %esi callq 0x6e560 jmp 0x7fadd movl 0x28(%rsp), %eax movzbl %al, %edi callq 0x7fd50 cmpl $0x0, %eax je 0x7fadb movq 0x18(%rsp), %rdi movslq 0x34(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi callq 0x654a0 movl %eax, 0x14(%rsp) movq 0x38(%rsp), %rax movq 0x60(%rax), %rcx movl 0x14(%rsp), %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movq 0x50(%rsp), %rax movq 0x18(%rax), %rax movl 0x4c(%rsp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movl 0x30(%rax), %eax movl %eax, 0x24(%rsp) movq 0x40(%rsp), %rdi movl 0x24(%rsp), %edx leaq 0x14(%rsp), %rsi callq 0x7fb60 cmpl $0x0, %eax je 0x7faaa jmp 0x7fb39 movq 0x18(%rsp), %rdi movslq 0x34(%rsp), %rax addq %rax, %rdi addq $0x1, %rdi movl 0x14(%rsp), %esi callq 0x6e560 movq 0x18(%rsp), %rax movslq 0x34(%rsp), %rcx movzbl (%rax,%rcx), %edx subl $0xb5, %edx movb %dl, (%rax,%rcx) jmp 0x7fadd movl 0x30(%rsp), %eax addl 0x34(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0x7f946 callq 0x32f50 cmpb $0x0, %al je 0x7fb05 movq 0x18(%rsp), %rdi movl 0x2c(%rsp), %esi callq 0x7fd90 movq 0x40(%rsp), %rdi addq $0x8, %rdi movq 0x18(%rsp), %rsi movslq 0x2c(%rsp), %rdx callq 0x24840 movq 0x40(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi callq 0x280a0 movl $0x0, 0x48(%rsp) jmp 0x7fb53 movq 0x40(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi callq 0x280a0 movl $0xffffffff, 0x48(%rsp) # imm = 0xFFFFFFFF movl 0x48(%rsp), %eax addq $0x58, %rsp retq nopl (%rax)
JS_WriteFunctionBytecode: sub rsp, 58h mov [rsp+58h+var_18], rdi mov [rsp+58h+var_20], rsi mov rax, [rsp+58h+var_20] mov eax, [rax+28h] mov [rsp+58h+var_2C], eax mov rax, [rsp+58h+var_18] mov rdi, [rax] movsxd rsi, [rsp+58h+var_2C] call js_malloc mov [rsp+58h+var_40], rax cmp [rsp+58h+var_40], 0 jnz short loc_7F926 mov [rsp+58h+var_10], 0FFFFFFFFh jmp loc_7FB53 loc_7F926: mov rdi, [rsp+58h+var_40] mov rax, [rsp+58h+var_20] mov rsi, [rax+20h] movsxd rdx, [rsp+58h+var_2C] call _memcpy mov [rsp+58h+var_24], 0 loc_7F946: mov eax, [rsp+58h+var_24] cmp eax, [rsp+58h+var_2C] jge loc_7FAEE mov rax, [rsp+58h+var_40] movsxd rcx, [rsp+58h+var_24] movzx eax, byte ptr [rax+rcx] mov [rsp+58h+var_30], eax cmp [rsp+58h+var_30], 0B3h jl short loc_7F97D mov eax, [rsp+58h+var_30] add eax, 12h mov [rsp+58h+var_48], eax jmp short loc_7F985 loc_7F97D: mov eax, [rsp+58h+var_30] mov [rsp+58h+var_48], eax loc_7F985: mov eax, [rsp+58h+var_48] movsxd rcx, eax lea rax, opcode_info movzx eax, byte ptr [rax+rcx*4] mov [rsp+58h+var_28], eax cmp [rsp+58h+var_30], 0B3h jl short loc_7F9B2 mov eax, [rsp+58h+var_30] add eax, 12h mov [rsp+58h+var_4C], eax jmp short loc_7F9BA loc_7F9B2: mov eax, [rsp+58h+var_30] mov [rsp+58h+var_4C], eax loc_7F9BA: mov eax, [rsp+58h+var_4C] movsxd rcx, eax lea rax, opcode_info movzx eax, byte ptr [rax+rcx*4+3] add eax, 0FFFFFFE8h sub eax, 4 ja short loc_7FA2D jmp short $+2 loc_7F9D7: mov rdi, [rsp+58h+var_40] movsxd rax, [rsp+58h+var_24] add rdi, rax add rdi, 1 call get_u32 mov [rsp+58h+var_34], eax mov rdi, [rsp+58h+var_18] mov edx, [rsp+58h+var_34] lea rsi, [rsp+58h+var_44] call bc_atom_to_idx cmp eax, 0 jz short loc_7FA0E jmp loc_7FB39 loc_7FA0E: mov rdi, [rsp+58h+var_40] movsxd rax, [rsp+58h+var_24] add rdi, rax add rdi, 1 mov esi, [rsp+58h+var_44] call put_u32 jmp loc_7FADD loc_7FA2D: mov eax, [rsp+58h+var_30] movzx edi, al call is_ic_op cmp eax, 0 jz loc_7FADB mov rdi, [rsp+58h+var_40] movsxd rax, [rsp+58h+var_24] add rdi, rax add rdi, 1 call get_u32 mov [rsp+58h+var_44], eax mov rax, [rsp+58h+var_20] mov rcx, [rax+60h] mov eax, [rsp+58h+var_44] mov [rsp+58h+var_8], rcx mov [rsp+58h+var_C], eax mov rax, [rsp+58h+var_8] mov rax, [rax+18h] mov ecx, [rsp+58h+var_C] imul rcx, 38h ; '8' add rax, rcx mov eax, [rax+30h] mov [rsp+58h+var_34], eax mov rdi, [rsp+58h+var_18] mov edx, [rsp+58h+var_34] lea rsi, [rsp+58h+var_44] call bc_atom_to_idx cmp eax, 0 jz short loc_7FAAA jmp loc_7FB39 loc_7FAAA: mov rdi, [rsp+58h+var_40] movsxd rax, [rsp+58h+var_24] add rdi, rax add rdi, 1 mov esi, [rsp+58h+var_44] call put_u32 mov rax, [rsp+58h+var_40] movsxd rcx, [rsp+58h+var_24] movzx edx, byte ptr [rax+rcx] sub edx, 0B5h mov [rax+rcx], dl loc_7FADB: jmp short $+2 loc_7FADD: mov eax, [rsp+58h+var_28] add eax, [rsp+58h+var_24] mov [rsp+58h+var_24], eax jmp loc_7F946 loc_7FAEE: call is_be_0 cmp al, 0 jz short loc_7FB05 mov rdi, [rsp+58h+var_40] mov esi, [rsp+58h+var_2C] call bc_byte_swap loc_7FB05: mov rdi, [rsp+58h+var_18] add rdi, 8 mov rsi, [rsp+58h+var_40] movsxd rdx, [rsp+58h+var_2C] call dbuf_put mov rax, [rsp+58h+var_18] mov rdi, [rax] mov rsi, [rsp+58h+var_40] call js_free mov [rsp+58h+var_10], 0 jmp short loc_7FB53 loc_7FB39: mov rax, [rsp+58h+var_18] mov rdi, [rax] mov rsi, [rsp+58h+var_40] call js_free mov [rsp+58h+var_10], 0FFFFFFFFh loc_7FB53: mov eax, [rsp+58h+var_10] add rsp, 58h retn
long long JS_WriteFunctionBytecode(long long *a1, long long a2) { int v3; // [rsp+Ch] [rbp-4Ch] int v4; // [rsp+10h] [rbp-48h] unsigned int u32; // [rsp+14h] [rbp-44h] BYREF long long v6; // [rsp+18h] [rbp-40h] unsigned int v7; // [rsp+24h] [rbp-34h] int v8; // [rsp+28h] [rbp-30h] unsigned int v9; // [rsp+2Ch] [rbp-2Ch] int v10; // [rsp+30h] [rbp-28h] int i; // [rsp+34h] [rbp-24h] long long v12; // [rsp+38h] [rbp-20h] long long *v13; // [rsp+40h] [rbp-18h] unsigned int v15; // [rsp+4Ch] [rbp-Ch] long long v16; // [rsp+50h] [rbp-8h] v13 = a1; v12 = a2; v9 = *(_DWORD *)(a2 + 40); v6 = js_malloc(*a1, (int)v9); if ( v6 ) { memcpy(v6, *(_QWORD *)(v12 + 32), (int)v9); for ( i = 0; i < (int)v9; i += v10 ) { v8 = *(unsigned __int8 *)(v6 + i); if ( v8 < 179 ) v4 = v8; else v4 = v8 + 18; v10 = opcode_info[4 * v4]; if ( v8 < 179 ) v3 = v8; else v3 = v8 + 18; if ( (unsigned int)opcode_info[4 * v3 + 3] - 24 > 4 ) { if ( (unsigned int)is_ic_op((unsigned __int8)v8) ) { u32 = get_u32((unsigned int *)(i + v6 + 1)); v16 = *(_QWORD *)(v12 + 96); v15 = u32; v7 = *(_DWORD *)(56LL * u32 + *(_QWORD *)(v16 + 24) + 48); if ( (unsigned int)bc_atom_to_idx(v13, &u32, v7) ) { LABEL_21: js_free(*v13, v6); return (unsigned int)-1; } put_u32((_DWORD *)(i + v6 + 1), u32); *(_BYTE *)(v6 + i) += 75; } } else { v7 = get_u32((unsigned int *)(i + v6 + 1)); if ( (unsigned int)bc_atom_to_idx(v13, &u32, v7) ) goto LABEL_21; put_u32((_DWORD *)(i + v6 + 1), u32); } } if ( is_be_0() ) bc_byte_swap(v6, v9); dbuf_put(v13 + 1, v6, (int)v9); js_free(*v13, v6); return 0; } else { return (unsigned int)-1; } }
JS_WriteFunctionBytecode: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX] MOVSXD RSI,dword ptr [RSP + 0x2c] CALL 0x00127fa0 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x0017f926 MOV dword ptr [RSP + 0x48],0xffffffff JMP 0x0017fb53 LAB_0017f926: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX + 0x20] MOVSXD RDX,dword ptr [RSP + 0x2c] CALL 0x0010e610 MOV dword ptr [RSP + 0x34],0x0 LAB_0017f946: MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RSP + 0x2c] JGE 0x0017faee MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x34] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0x28],EAX CMP dword ptr [RSP + 0x28],0xb3 JL 0x0017f97d MOV EAX,dword ptr [RSP + 0x28] ADD EAX,0x12 MOV dword ptr [RSP + 0x10],EAX JMP 0x0017f985 LAB_0017f97d: MOV EAX,dword ptr [RSP + 0x28] MOV dword ptr [RSP + 0x10],EAX LAB_0017f985: MOV EAX,dword ptr [RSP + 0x10] MOVSXD RCX,EAX LEA RAX,[0x213450] MOVZX EAX,byte ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x30],EAX CMP dword ptr [RSP + 0x28],0xb3 JL 0x0017f9b2 MOV EAX,dword ptr [RSP + 0x28] ADD EAX,0x12 MOV dword ptr [RSP + 0xc],EAX JMP 0x0017f9ba LAB_0017f9b2: MOV EAX,dword ptr [RSP + 0x28] MOV dword ptr [RSP + 0xc],EAX LAB_0017f9ba: MOV EAX,dword ptr [RSP + 0xc] MOVSXD RCX,EAX LEA RAX,[0x213450] MOVZX EAX,byte ptr [RAX + RCX*0x4 + 0x3] ADD EAX,-0x18 SUB EAX,0x4 JA 0x0017fa2d JMP 0x0017f9d7 LAB_0017f9d7: MOV RDI,qword ptr [RSP + 0x18] MOVSXD RAX,dword ptr [RSP + 0x34] ADD RDI,RAX ADD RDI,0x1 CALL 0x001654a0 MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x40] MOV EDX,dword ptr [RSP + 0x24] LEA RSI,[RSP + 0x14] CALL 0x0017fb60 CMP EAX,0x0 JZ 0x0017fa0e JMP 0x0017fb39 LAB_0017fa0e: MOV RDI,qword ptr [RSP + 0x18] MOVSXD RAX,dword ptr [RSP + 0x34] ADD RDI,RAX ADD RDI,0x1 MOV ESI,dword ptr [RSP + 0x14] CALL 0x0016e560 JMP 0x0017fadd LAB_0017fa2d: MOV EAX,dword ptr [RSP + 0x28] MOVZX EDI,AL CALL 0x0017fd50 CMP EAX,0x0 JZ 0x0017fadb MOV RDI,qword ptr [RSP + 0x18] MOVSXD RAX,dword ptr [RSP + 0x34] ADD RDI,RAX ADD RDI,0x1 CALL 0x001654a0 MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RSP + 0x14] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RSP + 0x4c] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x30] MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x40] MOV EDX,dword ptr [RSP + 0x24] LEA RSI,[RSP + 0x14] CALL 0x0017fb60 CMP EAX,0x0 JZ 0x0017faaa JMP 0x0017fb39 LAB_0017faaa: MOV RDI,qword ptr [RSP + 0x18] MOVSXD RAX,dword ptr [RSP + 0x34] ADD RDI,RAX ADD RDI,0x1 MOV ESI,dword ptr [RSP + 0x14] CALL 0x0016e560 MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x34] MOVZX EDX,byte ptr [RAX + RCX*0x1] SUB EDX,0xb5 MOV byte ptr [RAX + RCX*0x1],DL LAB_0017fadb: JMP 0x0017fadd LAB_0017fadd: MOV EAX,dword ptr [RSP + 0x30] ADD EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x34],EAX JMP 0x0017f946 LAB_0017faee: CALL 0x00132f50 CMP AL,0x0 JZ 0x0017fb05 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x2c] CALL 0x0017fd90 LAB_0017fb05: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RSP + 0x2c] CALL 0x00124840 MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001280a0 MOV dword ptr [RSP + 0x48],0x0 JMP 0x0017fb53 LAB_0017fb39: MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001280a0 MOV dword ptr [RSP + 0x48],0xffffffff LAB_0017fb53: MOV EAX,dword ptr [RSP + 0x48] ADD RSP,0x58 RET
int4 JS_WriteFunctionBytecode(int8 *param_1,long param_2) { char cVar1; int iVar2; uint local_4c; uint local_48; uint local_44; void *local_40; int4 local_34; uint local_30; int local_2c; uint local_28; int local_24; long local_20; int8 *local_18; int4 local_10; uint local_c; long local_8; local_2c = *(int *)(param_2 + 0x28); local_20 = param_2; local_18 = param_1; local_40 = (void *)js_malloc(*param_1,(long)local_2c); if (local_40 == (void *)0x0) { local_10 = 0xffffffff; } else { memcpy(local_40,*(void **)(local_20 + 0x20),(long)local_2c); for (local_24 = 0; local_24 < local_2c; local_24 = local_28 + local_24) { local_30 = (uint)*(byte *)((long)local_40 + (long)local_24); local_48 = local_30; if (0xb2 < local_30) { local_48 = local_30 + 0x12; } local_28 = (uint)(byte)opcode_info[(long)(int)local_48 * 4]; local_4c = local_30; if (0xb2 < local_30) { local_4c = local_30 + 0x12; } if ((byte)opcode_info[(long)(int)local_4c * 4 + 3] - 0x18 < 5) { local_34 = get_u32((long)local_40 + (long)local_24 + 1); iVar2 = bc_atom_to_idx(local_18,&local_44,local_34); if (iVar2 != 0) { LAB_0017fb39: js_free(*local_18,local_40); return 0xffffffff; } put_u32((long)local_40 + (long)local_24 + 1,local_44); } else { iVar2 = is_ic_op(local_30); if (iVar2 != 0) { local_44 = get_u32((long)local_40 + (long)local_24 + 1); local_8 = *(long *)(local_20 + 0x60); local_34 = *(int4 *)(*(long *)(local_8 + 0x18) + (ulong)local_44 * 0x38 + 0x30); local_c = local_44; iVar2 = bc_atom_to_idx(local_18,&local_44,local_34); if (iVar2 != 0) goto LAB_0017fb39; put_u32((long)local_40 + (long)local_24 + 1,local_44); *(char *)((long)local_40 + (long)local_24) = *(char *)((long)local_40 + (long)local_24) + 'K'; } } } cVar1 = is_be(); if (cVar1 != '\0') { bc_byte_swap(local_40,local_2c); } dbuf_put(local_18 + 1,local_40,(long)local_2c); js_free(*local_18,local_40); local_10 = 0; } return local_10; }
38,884
my_thread_end
eloqsql/mysys/my_thr_init.c
void my_thread_end(void) { struct st_my_thread_var *tmp; tmp= my_thread_var; #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n", tmp, pthread_self(), tmp ? (long) tmp->id : 0L); #endif /* Remove the instrumentation for this thread. This must be done before trashing st_my_thread_var, because the LF_HASH depends on it. */ PSI_CALL_delete_current_thread(); /* We need to disable DBUG early for this thread to ensure that the the mutex calls doesn't enable it again To this we have to both do DBUG_POP() and also reset THR_KEY_mysys as the key is used by DBUG. */ DBUG_POP(); set_mysys_var(NULL); if (tmp && tmp->init) { #if !defined(DBUG_OFF) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { free(tmp->dbug); tmp->dbug=0; } #endif my_thread_destory_thr_mutex(tmp); /* Decrement counter for number of running threads. We are using this in my_thread_global_end() to wait until all threads have called my_thread_end and thus freed all memory they have allocated in my_thread_init() and DBUG_xxxx */ mysql_mutex_lock(&THR_LOCK_threads); DBUG_ASSERT(THR_thread_count != 0); if (--THR_thread_count == 0) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); /* Trash variable so that we can detect false accesses to my_thread_var */ tmp->init= 2; free(tmp); } }
O0
c
my_thread_end: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp callq 0xf6090 movq %rax, -0x8(%rbp) leaq 0x1c9b30(%rip), %rax # 0x2c00b8 movq (%rax), %rax callq *0x138(%rax) jmp 0xf6593 xorl %eax, %eax movl %eax, %edi callq 0xf6540 cmpq $0x0, -0x8(%rbp) je 0xf661c movq -0x8(%rbp), %rax movsbl 0xe8(%rax), %eax cmpl $0x0, %eax je 0xf661c movq -0x8(%rbp), %rdi callq 0xf60b0 leaq 0xb8cf65(%rip), %rdi # 0xc83528 leaq 0x5e037(%rip), %rsi # 0x154601 movl $0x175, %edx # imm = 0x175 callq 0xf63f0 jmp 0xf65d6 leaq 0xb8cd4b(%rip), %rax # 0xc83328 movl (%rax), %eax addl $-0x1, %eax leaq 0xb8cd3f(%rip), %rcx # 0xc83328 movl %eax, (%rcx) cmpl $0x0, %eax jne 0xf65fc leaq 0xb8cfc1(%rip), %rdi # 0xc835b8 callq 0xf6630 leaq 0xb8cf25(%rip), %rdi # 0xc83528 callq 0xf64e0 movq -0x8(%rbp), %rax movb $0x2, 0xe8(%rax) movq -0x8(%rbp), %rdi callq 0x2a170 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_end: push rbp mov rbp, rsp sub rsp, 10h call _my_thread_var mov [rbp+var_8], rax lea rax, PSI_server mov rax, [rax] call qword ptr [rax+138h] jmp short $+2 loc_F6593: xor eax, eax mov edi, eax call set_mysys_var cmp [rbp+var_8], 0 jz short loc_F661C mov rax, [rbp+var_8] movsx eax, byte ptr [rax+0E8h] cmp eax, 0 jz short loc_F661C mov rdi, [rbp+var_8] call my_thread_destory_thr_mutex lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 175h call inline_mysql_mutex_lock_26 jmp short $+2 loc_F65D6: lea rax, THR_thread_count mov eax, [rax] add eax, 0FFFFFFFFh lea rcx, THR_thread_count mov [rcx], eax cmp eax, 0 jnz short loc_F65FC lea rdi, THR_COND_threads call inline_mysql_cond_signal_3 loc_F65FC: lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock_27 mov rax, [rbp+var_8] mov byte ptr [rax+0E8h], 2 mov rdi, [rbp+var_8] call _free loc_F661C: add rsp, 10h pop rbp retn
long long my_thread_end(long long a1, const char *a2) { long long result; // rax long long v3; // [rsp+8h] [rbp-8h] v3 = my_thread_var(a1, a2); PSI_server[39](); result = set_mysys_var(0LL); if ( v3 ) { result = (unsigned int)*(char *)(v3 + 232); if ( *(_BYTE *)(v3 + 232) ) { my_thread_destory_thr_mutex(v3); inline_mysql_mutex_lock_26( (long long)&THR_LOCK_threads, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 0x175u); if ( !--THR_thread_count ) inline_mysql_cond_signal_3(&THR_COND_threads); inline_mysql_mutex_unlock_27((long long)&THR_LOCK_threads); *(_BYTE *)(v3 + 232) = 2; return free(v3); } } return result; }
my_thread_end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 CALL 0x001f6090 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x138] JMP 0x001f6593 LAB_001f6593: XOR EAX,EAX MOV EDI,EAX CALL 0x001f6540 CMP qword ptr [RBP + -0x8],0x0 JZ 0x001f661c MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0xe8] CMP EAX,0x0 JZ 0x001f661c MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f60b0 LEA RDI,[0xd83528] LEA RSI,[0x254601] MOV EDX,0x175 CALL 0x001f63f0 JMP 0x001f65d6 LAB_001f65d6: LEA RAX,[0xd83328] MOV EAX,dword ptr [RAX] ADD EAX,-0x1 LEA RCX,[0xd83328] MOV dword ptr [RCX],EAX CMP EAX,0x0 JNZ 0x001f65fc LEA RDI,[0xd835b8] CALL 0x001f6630 LAB_001f65fc: LEA RDI,[0xd83528] CALL 0x001f64e0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xe8],0x2 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a170 LAB_001f661c: ADD RSP,0x10 POP RBP RET
void my_thread_end(void) { void *__ptr; __ptr = (void *)_my_thread_var(); (**(code **)(PSI_server + 0x138))(); set_mysys_var(0); if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) { my_thread_destory_thr_mutex(__ptr); inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0x175 ); THR_thread_count = THR_thread_count + -1; if (THR_thread_count == 0) { inline_mysql_cond_signal(THR_COND_threads); } inline_mysql_mutex_unlock(THR_LOCK_threads); *(int1 *)((long)__ptr + 0xe8) = 2; free(__ptr); } return; }
38,885
free_ic
bluesky950520[P]quickjs/quickjs.c
int free_ic(JSRuntime* rt, JSInlineCache *ic) { uint32_t i; JSInlineCacheHashSlot *ch, *ch_next; JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY]; if (ic->cache) { for (i = 0; i < ic->count; i++) { shapes = &ic->cache[i].shape; JS_FreeAtomRT(rt, ic->cache[i].atom); for (shape = *shapes; shape != endof(*shapes); shape++) js_free_shape_null(rt, *shape); } } for (i = 0; i < ic->capacity; i++) { for (ch = ic->hash[i]; ch != NULL; ch = ch_next) { ch_next = ch->next; JS_FreeAtomRT(rt, ch->atom); js_free_rt(rt, ch); } } if (ic->count > 0) js_free_rt(rt, ic->cache); js_free_rt(rt, ic->hash); js_free_rt(rt, ic); return 0; }
O0
c
free_ic: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x28(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x5f0e1 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x28(%rsp), %rcx cmpl (%rcx), %eax jae 0x5f0df movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movl 0x24(%rsp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq %rax, (%rsp) movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movl 0x24(%rsp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movl 0x30(%rax), %esi callq 0x23da0 movq (%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq (%rsp), %rcx addq $0x20, %rcx cmpq %rcx, %rax je 0x5f0cd movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq (%rax), %rsi callq 0x27eb0 movq 0x8(%rsp), %rax addq $0x8, %rax movq %rax, 0x8(%rsp) jmp 0x5f099 jmp 0x5f0cf movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x5f046 jmp 0x5f0e1 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x4(%rcx), %eax jae 0x5f15e movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movl 0x24(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0x5f14f movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rax movl (%rax), %esi callq 0x23da0 movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x21960 movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) jmp 0x5f10d jmp 0x5f151 movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x5f0e9 movq 0x28(%rsp), %rax cmpl $0x0, (%rax) jbe 0x5f17b movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x18(%rax), %rsi callq 0x21960 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rsi callq 0x21960 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x21960 xorl %eax, %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
free_ic: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_10] cmp qword ptr [rax+18h], 0 jz loc_5F0E1 mov [rsp+38h+var_14], 0 loc_5F046: mov eax, [rsp+38h+var_14] mov rcx, [rsp+38h+var_10] cmp eax, [rcx] jnb loc_5F0DF mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov ecx, [rsp+38h+var_14] imul rcx, 38h ; '8' add rax, rcx mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov ecx, [rsp+38h+var_14] imul rcx, 38h ; '8' add rax, rcx mov esi, [rax+30h] call JS_FreeAtomRT mov rax, [rsp+38h+var_38] mov [rsp+38h+var_30], rax loc_5F099: mov rax, [rsp+38h+var_30] mov rcx, [rsp+38h+var_38] add rcx, 20h ; ' ' cmp rax, rcx jz short loc_5F0CD mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_30] mov rsi, [rax] call js_free_shape_null mov rax, [rsp+38h+var_30] add rax, 8 mov [rsp+38h+var_30], rax jmp short loc_5F099 loc_5F0CD: jmp short $+2 loc_5F0CF: mov eax, [rsp+38h+var_14] add eax, 1 mov [rsp+38h+var_14], eax jmp loc_5F046 loc_5F0DF: jmp short $+2 loc_5F0E1: mov [rsp+38h+var_14], 0 loc_5F0E9: mov eax, [rsp+38h+var_14] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+4] jnb short loc_5F15E mov rax, [rsp+38h+var_10] mov rax, [rax+10h] mov ecx, [rsp+38h+var_14] mov rax, [rax+rcx*8] mov [rsp+38h+var_20], rax loc_5F10D: cmp [rsp+38h+var_20], 0 jz short loc_5F14F mov rax, [rsp+38h+var_20] mov rax, [rax+8] mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_20] mov esi, [rax] call JS_FreeAtomRT mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_20] call js_free_rt mov rax, [rsp+38h+var_28] mov [rsp+38h+var_20], rax jmp short loc_5F10D loc_5F14F: jmp short $+2 loc_5F151: mov eax, [rsp+38h+var_14] add eax, 1 mov [rsp+38h+var_14], eax jmp short loc_5F0E9 loc_5F15E: mov rax, [rsp+38h+var_10] cmp dword ptr [rax], 0 jbe short loc_5F17B mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rsi, [rax+18h] call js_free_rt loc_5F17B: mov rdi, [rsp+38h+var_8] mov rax, [rsp+38h+var_10] mov rsi, [rax+10h] call js_free_rt mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] call js_free_rt xor eax, eax add rsp, 38h retn
long long free_ic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-38h] long long *j; // [rsp+8h] [rbp-30h] long long v5; // [rsp+10h] [rbp-28h] long long m; // [rsp+18h] [rbp-20h] unsigned int i; // [rsp+24h] [rbp-14h] unsigned int k; // [rsp+24h] [rbp-14h] if ( *(_QWORD *)(a2 + 24) ) { for ( i = 0; i < *(_DWORD *)a2; ++i ) { v3 = 56LL * i + *(_QWORD *)(a2 + 24); JS_FreeAtomRT(a1, *(_DWORD *)(v3 + 48)); for ( j = (long long *)v3; j != (long long *)(v3 + 32); ++j ) js_free_shape_null(a1, *j); } } for ( k = 0; k < *(_DWORD *)(a2 + 4); ++k ) { for ( m = *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * k); m; m = v5 ) { v5 = *(_QWORD *)(m + 8); JS_FreeAtomRT(a1, *(_DWORD *)m); js_free_rt(a1, m); } } if ( *(_DWORD *)a2 ) js_free_rt(a1, *(_QWORD *)(a2 + 24)); js_free_rt(a1, *(_QWORD *)(a2 + 16)); js_free_rt(a1, a2); return 0LL; }
free_ic: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0015f0e1 MOV dword ptr [RSP + 0x24],0x0 LAB_0015f046: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX] JNC 0x0015f0df MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RSP + 0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RSP + 0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV ESI,dword ptr [RAX + 0x30] CALL 0x00123da0 MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX LAB_0015f099: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP] ADD RCX,0x20 CMP RAX,RCX JZ 0x0015f0cd MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX] CALL 0x00127eb0 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x8],RAX JMP 0x0015f099 LAB_0015f0cd: JMP 0x0015f0cf LAB_0015f0cf: MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0015f046 LAB_0015f0df: JMP 0x0015f0e1 LAB_0015f0e1: MOV dword ptr [RSP + 0x24],0x0 LAB_0015f0e9: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x4] JNC 0x0015f15e MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX LAB_0015f10d: CMP qword ptr [RSP + 0x18],0x0 JZ 0x0015f14f MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RAX] CALL 0x00123da0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00121960 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX JMP 0x0015f10d LAB_0015f14f: JMP 0x0015f151 LAB_0015f151: MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0015f0e9 LAB_0015f15e: MOV RAX,qword ptr [RSP + 0x28] CMP dword ptr [RAX],0x0 JBE 0x0015f17b MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x18] CALL 0x00121960 LAB_0015f17b: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00121960 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00121960 XOR EAX,EAX ADD RSP,0x38 RET
int8 free_ic(int8 param_1,uint *param_2) { long lVar1; int4 *puVar2; int8 *puVar3; int8 *local_30; int4 *local_20; uint local_14; if (*(long *)(param_2 + 6) != 0) { for (local_14 = 0; local_14 < *param_2; local_14 = local_14 + 1) { lVar1 = *(long *)(param_2 + 6); JS_FreeAtomRT(param_1,*(int4 *)(*(long *)(param_2 + 6) + (ulong)local_14 * 0x38 + 0x30)) ; puVar3 = (int8 *)(lVar1 + (ulong)local_14 * 0x38); for (local_30 = puVar3; local_30 != puVar3 + 4; local_30 = local_30 + 1) { js_free_shape_null(param_1,*local_30); } } } for (local_14 = 0; local_14 < param_2[1]; local_14 = local_14 + 1) { local_20 = *(int4 **)(*(long *)(param_2 + 4) + (ulong)local_14 * 8); while (local_20 != (int4 *)0x0) { puVar2 = *(int4 **)(local_20 + 2); JS_FreeAtomRT(param_1,*local_20); js_free_rt(param_1,local_20); local_20 = puVar2; } } if (*param_2 != 0) { js_free_rt(param_1,*(int8 *)(param_2 + 6)); } js_free_rt(param_1,*(int8 *)(param_2 + 4)); js_free_rt(param_1,param_2); return 0; }
38,886
free_ic
bluesky950520[P]quickjs/quickjs.c
int free_ic(JSRuntime* rt, JSInlineCache *ic) { uint32_t i; JSInlineCacheHashSlot *ch, *ch_next; JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY]; if (ic->cache) { for (i = 0; i < ic->count; i++) { shapes = &ic->cache[i].shape; JS_FreeAtomRT(rt, ic->cache[i].atom); for (shape = *shapes; shape != endof(*shapes); shape++) js_free_shape_null(rt, *shape); } } for (i = 0; i < ic->capacity; i++) { for (ch = ic->hash[i]; ch != NULL; ch = ch_next) { ch_next = ch->next; JS_FreeAtomRT(rt, ch->atom); js_free_rt(rt, ch); } } if (ic->count > 0) js_free_rt(rt, ic->cache); js_free_rt(rt, ic->hash); js_free_rt(rt, ic); return 0; }
O2
c
free_ic: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, 0x18(%rsi) je 0x356ac xorl %r15d, %r15d xorl %r12d, %r12d movl (%rbx), %eax cmpq %rax, %r12 jae 0x356ac movq 0x18(%rbx), %r13 imulq $0x38, %r12, %rax movl 0x30(%r13,%rax), %esi movq %r14, %rdi callq 0x182d0 addq %r15, %r13 xorl %ebp, %ebp cmpq $0x20, %rbp je 0x356a3 movq (%r13,%rbp), %rsi movq %r14, %rdi callq 0x1a17b addq $0x8, %rbp jmp 0x3568a incq %r12 addq $0x38, %r15 jmp 0x35669 xorl %r12d, %r12d movl 0x4(%rbx), %eax cmpq %rax, %r12 jae 0x356e8 movq 0x10(%rbx), %rax movq (%rax,%r12,8), %r15 testq %r15, %r15 je 0x356e3 movq 0x8(%r15), %r13 movl (%r15), %esi movq %r14, %rdi callq 0x182d0 movq %r14, %rdi movq %r15, %rsi callq 0x170cb movq %r13, %r15 jmp 0x356bf incq %r12 jmp 0x356af cmpl $0x0, (%rbx) je 0x356f9 movq 0x18(%rbx), %rsi movq %r14, %rdi callq 0x170cb movq 0x10(%rbx), %rsi movq %r14, %rdi callq 0x170cb movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x170cb
free_ic: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi cmp qword ptr [rsi+18h], 0 jz short loc_356AC xor r15d, r15d xor r12d, r12d loc_35669: mov eax, [rbx] cmp r12, rax jnb short loc_356AC mov r13, [rbx+18h] imul rax, r12, 38h ; '8' mov esi, [r13+rax+30h] mov rdi, r14 call JS_FreeAtomRT add r13, r15 xor ebp, ebp loc_3568A: cmp rbp, 20h ; ' ' jz short loc_356A3 mov rsi, [r13+rbp+0] mov rdi, r14 call js_free_shape_null add rbp, 8 jmp short loc_3568A loc_356A3: inc r12 add r15, 38h ; '8' jmp short loc_35669 loc_356AC: xor r12d, r12d loc_356AF: mov eax, [rbx+4] cmp r12, rax jnb short loc_356E8 mov rax, [rbx+10h] mov r15, [rax+r12*8] loc_356BF: test r15, r15 jz short loc_356E3 mov r13, [r15+8] mov esi, [r15] mov rdi, r14 call JS_FreeAtomRT mov rdi, r14 mov rsi, r15 call js_free_rt mov r15, r13 jmp short loc_356BF loc_356E3: inc r12 jmp short loc_356AF loc_356E8: cmp dword ptr [rbx], 0 jz short loc_356F9 mov rsi, [rbx+18h] mov rdi, r14 call js_free_rt loc_356F9: mov rsi, [rbx+10h] mov rdi, r14 call js_free_rt mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp js_free_rt
long long free_ic(long long a1, unsigned int *a2) { long long v2; // r15 unsigned long long i; // r12 long long v4; // r13 long long v5; // r13 long long j; // rbp unsigned long long k; // r12 long long m; // r15 long long v9; // r13 if ( *((_QWORD *)a2 + 3) ) { v2 = 0LL; for ( i = 0LL; i < *a2; ++i ) { v4 = *((_QWORD *)a2 + 3); JS_FreeAtomRT(a1, *(_DWORD *)(v4 + 56 * i + 48)); v5 = v2 + v4; for ( j = 0LL; j != 32; j += 8LL ) js_free_shape_null(a1, *(_QWORD *)(v5 + j)); v2 += 56LL; } } for ( k = 0LL; k < a2[1]; ++k ) { for ( m = *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * k); m; m = v9 ) { v9 = *(_QWORD *)(m + 8); JS_FreeAtomRT(a1, *(_DWORD *)m); js_free_rt(a1, m); } } if ( *a2 ) js_free_rt(a1, *((_QWORD *)a2 + 3)); js_free_rt(a1, *((_QWORD *)a2 + 2)); return js_free_rt(a1, (long long)a2); }
free_ic: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CMP qword ptr [RSI + 0x18],0x0 JZ 0x001356ac XOR R15D,R15D XOR R12D,R12D LAB_00135669: MOV EAX,dword ptr [RBX] CMP R12,RAX JNC 0x001356ac MOV R13,qword ptr [RBX + 0x18] IMUL RAX,R12,0x38 MOV ESI,dword ptr [R13 + RAX*0x1 + 0x30] MOV RDI,R14 CALL 0x001182d0 ADD R13,R15 XOR EBP,EBP LAB_0013568a: CMP RBP,0x20 JZ 0x001356a3 MOV RSI,qword ptr [R13 + RBP*0x1] MOV RDI,R14 CALL 0x0011a17b ADD RBP,0x8 JMP 0x0013568a LAB_001356a3: INC R12 ADD R15,0x38 JMP 0x00135669 LAB_001356ac: XOR R12D,R12D LAB_001356af: MOV EAX,dword ptr [RBX + 0x4] CMP R12,RAX JNC 0x001356e8 MOV RAX,qword ptr [RBX + 0x10] MOV R15,qword ptr [RAX + R12*0x8] LAB_001356bf: TEST R15,R15 JZ 0x001356e3 MOV R13,qword ptr [R15 + 0x8] MOV ESI,dword ptr [R15] MOV RDI,R14 CALL 0x001182d0 MOV RDI,R14 MOV RSI,R15 CALL 0x001170cb MOV R15,R13 JMP 0x001356bf LAB_001356e3: INC R12 JMP 0x001356af LAB_001356e8: CMP dword ptr [RBX],0x0 JZ 0x001356f9 MOV RSI,qword ptr [RBX + 0x18] MOV RDI,R14 CALL 0x001170cb LAB_001356f9: MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R14 CALL 0x001170cb MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001170cb
void free_ic(int8 param_1,uint *param_2) { long lVar1; int4 *puVar2; long lVar3; ulong uVar4; long lVar5; int4 *puVar6; if (*(long *)(param_2 + 6) != 0) { lVar5 = 0; for (uVar4 = 0; uVar4 < *param_2; uVar4 = uVar4 + 1) { lVar1 = *(long *)(param_2 + 6); JS_FreeAtomRT(param_1,*(int4 *)(lVar1 + 0x30 + uVar4 * 0x38)); for (lVar3 = 0; lVar3 != 0x20; lVar3 = lVar3 + 8) { js_free_shape_null(param_1,*(int8 *)(lVar1 + lVar5 + lVar3)); } lVar5 = lVar5 + 0x38; } } for (uVar4 = 0; uVar4 < param_2[1]; uVar4 = uVar4 + 1) { puVar6 = *(int4 **)(*(long *)(param_2 + 4) + uVar4 * 8); while (puVar6 != (int4 *)0x0) { puVar2 = *(int4 **)(puVar6 + 2); JS_FreeAtomRT(param_1,*puVar6); js_free_rt(param_1,puVar6); puVar6 = puVar2; } } if (*param_2 != 0) { js_free_rt(param_1,*(int8 *)(param_2 + 6)); } js_free_rt(param_1,*(int8 *)(param_2 + 4)); js_free_rt(param_1,param_2); return; }
38,887
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [13], 0>(char const (&) [13])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O0
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [13], 0>(char const (&) [13]): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xb7d30 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xb7d60 movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xb7d90 testb $0x1, %al jne 0x170af6 jmp 0x170b36 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xb8f00 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x20(%rsp), %rdx callq 0x170b50 testb $0x1, %al jne 0x170b26 jmp 0x170b28 jmp 0x170b45 jmp 0x170b2a leaq 0x30(%rsp), %rdi callq 0xb7e10 jmp 0x170ad2 movq 0x10(%rsp), %rdi callq 0xb7d60 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rdi, [rsp+38h+var_10] mov [rsp+38h+var_28], rdi call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void) mov [rsp+38h+var_8], rax loc_170AD2: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_20], rax lea rdi, [rsp+38h+var_8] lea rsi, [rsp+38h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_170AF6 jmp short loc_170B36 loc_170AF6: mov rax, [rsp+38h+var_28] add rax, 18h mov [rsp+38h+var_30], rax lea rdi, [rsp+38h+var_8] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, [rsp+38h+var_30] mov rsi, rax mov rdx, [rsp+38h+var_18] call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA13_KcEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSD_OSE_ test al, 1 jnz short loc_170B26 jmp short loc_170B28 loc_170B26: jmp short loc_170B45 loc_170B28: jmp short $+2 loc_170B2A: lea rdi, [rsp+38h+var_8] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void) jmp short loc_170AD2 loc_170B36: mov rdi, [rsp+38h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+38h+var_8], rax loc_170B45: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+18h] [rbp-20h] BYREF long long v5; // [rsp+20h] [rbp-18h] long long v6; // [rsp+28h] [rbp-10h] long long i; // [rsp+30h] [rbp-8h] BYREF v6 = a1; v5 = a2; for ( i = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(a1); ; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(&i) ) { v4 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&i, (long long)&v4) ) break; v2 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)&i); if ( (std::equal_to<void>::operator()<std::string const&,char const(&)[13]>(a1 + 24, v2, v5) & 1) != 0 ) return i; } return std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(a1); }
38,888
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [13], 0>(char const (&) [13])
monkey531[P]llama/common/json.hpp
iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
_gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [13], 0>(char const (&) [13]): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x7f69f movq %r14, %rdi movq %rbx, %rsi callq 0x3a07e testb %al, %al jne 0x7f69c addq $0x30, %r14 jmp 0x7f67e movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_7F67E: mov rax, [r15+8] cmp r14, rax jz short loc_7F69F mov rdi, r14 mov rsi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_7F69C add r14, 30h ; '0' jmp short loc_7F67E loc_7F69C: mov rax, r14 loc_7F69F: pop rbx pop r14 pop r15 retn
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( long long *a1) { long long i; // r14 long long result; // rax for ( i = *a1; ; i += 48LL ) { result = a1[1]; if ( i == result ) break; if ( std::operator==<char>(i) ) return i; } return result; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_0017f67e: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x0017f69f MOV RDI,R14 MOV RSI,RBX CALL 0x0013a07e TEST AL,AL JNZ 0x0017f69c ADD R14,0x30 JMP 0x0017f67e LAB_0017f69c: MOV RAX,R14 LAB_0017f69f: POP RBX POP R14 POP R15 RET
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (int8 *param_1,char *param_2) { bool bVar1; string *psVar2; string *psVar3; psVar3 = (string *)*param_1; while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] && (bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) { psVar3 = psVar3 + 0x30; } return psVar2; }
38,889
POINTonE2_times_minus_z
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/map_to_g2.c
static void POINTonE2_times_minus_z(POINTonE2 *out, const POINTonE2 *in) { POINTonE2_double(out, in); /* 1: 0x2 */ POINTonE2_add_n_dbl(out, in, 2); /* 2..4: 0x3..0xc */ POINTonE2_add_n_dbl(out, in, 3); /* 5..8: 0xd..0x68 */ POINTonE2_add_n_dbl(out, in, 9); /* 9..18: 0x69..0xd200 */ POINTonE2_add_n_dbl(out, in, 32); /* 19..51: ..0xd20100000000 */ POINTonE2_add_n_dbl(out, in, 16); /* 52..68: ..0xd201000000010000 */ }
O3
c
POINTonE2_times_minus_z: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 callq 0x5bc78 movl $0x2, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x65b4d movl $0x3, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x65b4d movl $0x9, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x65b4d movl $0x20, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x65b4d movl $0x10, %edx movq %r14, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %rbp jmp 0x65b4d
POINTonE2_times_minus_z: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi call POINTonE2_double mov edx, 2 mov rdi, r14 mov rsi, rbx call POINTonE2_add_n_dbl mov edx, 3 mov rdi, r14 mov rsi, rbx call POINTonE2_add_n_dbl mov edx, 9 mov rdi, r14 mov rsi, rbx call POINTonE2_add_n_dbl mov edx, 20h ; ' ' mov rdi, r14 mov rsi, rbx call POINTonE2_add_n_dbl mov edx, 10h mov rdi, r14 mov rsi, rbx pop rbx pop r14 pop rbp jmp $+5
long long POINTonE2_times_minus_z(long long a1, long long a2) { POINTonE2_double(a1, a2); POINTonE2_add_n_dbl(a1, a2, 2LL); POINTonE2_add_n_dbl(a1, a2, 3LL); POINTonE2_add_n_dbl(a1, a2, 9LL); POINTonE2_add_n_dbl(a1, a2, 32LL); return POINTonE2_add_n_dbl(a1, a2, 16LL); }
POINTonE2_times_minus_z: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI CALL 0x0015bc78 MOV EDX,0x2 MOV RDI,R14 MOV RSI,RBX CALL 0x00165b4d MOV EDX,0x3 MOV RDI,R14 MOV RSI,RBX CALL 0x00165b4d MOV EDX,0x9 MOV RDI,R14 MOV RSI,RBX CALL 0x00165b4d MOV EDX,0x20 MOV RDI,R14 MOV RSI,RBX CALL 0x00165b4d MOV EDX,0x10 MOV RDI,R14 MOV RSI,RBX POP RBX POP R14 POP RBP JMP 0x00165b4d
void POINTonE2_times_minus_z(int8 param_1,int8 param_2) { POINTonE2_double(); POINTonE2_add_n_dbl(param_1,param_2,2); POINTonE2_add_n_dbl(param_1,param_2,3); POINTonE2_add_n_dbl(param_1,param_2,9); POINTonE2_add_n_dbl(param_1,param_2,0x20); POINTonE2_add_n_dbl(param_1,param_2,0x10); return; }
38,890
lf_pinbox_get_pins
eloqsql/mysys/lf_alloc-pin.c
LF_PINS *lf_pinbox_get_pins(LF_PINBOX *pinbox) { uint32 pins, next, top_ver; LF_PINS *el; /* We have an array of max. 64k elements. The highest index currently allocated is pinbox->pins_in_array. Freed elements are in a lifo stack, pinstack_top_ver. pinstack_top_ver is 32 bits; 16 low bits are the index in the array, to the first element of the list. 16 high bits are a version (every time the 16 low bits are updated, the 16 high bits are incremented). Versioning prevents the ABA problem. */ top_ver= pinbox->pinstack_top_ver; do { if (!(pins= top_ver % LF_PINBOX_MAX_PINS)) { /* the stack of free elements is empty */ pins= my_atomic_add32((int32 volatile*) &pinbox->pins_in_array, 1)+1; if (unlikely(pins >= LF_PINBOX_MAX_PINS)) return 0; /* note that the first allocated element has index 1 (pins==1). index 0 is reserved to mean "NULL pointer" */ el= (LF_PINS *)lf_dynarray_lvalue(&pinbox->pinarray, pins); if (unlikely(!el)) return 0; break; } el= (LF_PINS *)lf_dynarray_value(&pinbox->pinarray, pins); next= el->link; } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver, (int32*) &top_ver, top_ver-pins+next+LF_PINBOX_MAX_PINS)); /* set el->link to the index of el in the dynarray (el->link has two usages: - if element is allocated, it's its own index - if element is free, it's its next element in the free stack */ el->link= pins; el->purgatory_count= 0; el->pinbox= pinbox; return el; }
O0
c
lf_pinbox_get_pins: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x3c(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF movl %eax, -0x14(%rbp) cmpl $0x0, %eax jne 0xfc289 movq -0x10(%rbp), %rcx movl $0x1, -0x2c(%rbp) movl -0x2c(%rbp), %eax lock xaddl %eax, 0x40(%rcx) movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) cmpl $0x10000, -0x14(%rbp) # imm = 0x10000 setae %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfc248 movq $0x0, -0x8(%rbp) jmp 0xfc31e movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0xfcdc0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfc287 movq $0x0, -0x8(%rbp) jmp 0xfc31e jmp 0xfc2f5 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0xfd0d0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl 0x34(%rax), %eax movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rcx movl -0x1c(%rbp), %esi movl -0x14(%rbp), %eax subl %eax, %esi movl -0x18(%rbp), %eax movl %eax, %edx movl %esi, %eax leal 0x10000(%rax,%rdx), %eax movl %eax, -0x34(%rbp) movl -0x1c(%rbp), %eax movl -0x34(%rbp), %edx lock cmpxchgl %edx, 0x3c(%rcx) movl %eax, %ecx sete %al movb %al, -0x3d(%rbp) movl %ecx, -0x3c(%rbp) testb $0x1, %al jne 0xfc2e0 movl -0x3c(%rbp), %eax movl %eax, -0x1c(%rbp) movb -0x3d(%rbp), %al andb $0x1, %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al xorb $-0x1, %al testb $0x1, %al jne 0xfc1e6 movl -0x14(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x34(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x30(%rax) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
lf_pinbox_get_pins: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+3Ch] mov [rbp+var_1C], eax loc_FC1E6: mov eax, [rbp+var_1C] and eax, 0FFFFh mov [rbp+var_14], eax cmp eax, 0 jnz loc_FC289 mov rcx, [rbp+var_10] mov [rbp+var_2C], 1 mov eax, [rbp+var_2C] lock xadd [rcx+40h], eax mov [rbp+var_30], eax mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_14], eax cmp [rbp+var_14], 10000h setnb 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_FC248 mov [rbp+var_8], 0 jmp loc_FC31E loc_FC248: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call lf_dynarray_lvalue mov [rbp+var_28], rax cmp [rbp+var_28], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FC287 mov [rbp+var_8], 0 jmp loc_FC31E loc_FC287: jmp short loc_FC2F5 loc_FC289: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call lf_dynarray_value mov [rbp+var_28], rax mov rax, [rbp+var_28] mov eax, [rax+34h] mov [rbp+var_18], eax mov rcx, [rbp+var_10] mov esi, [rbp+var_1C] mov eax, [rbp+var_14] sub esi, eax mov eax, [rbp+var_18] mov edx, eax mov eax, esi lea eax, [rax+rdx+10000h] mov [rbp+var_34], eax mov eax, [rbp+var_1C] mov edx, [rbp+var_34] lock cmpxchg [rcx+3Ch], edx mov ecx, eax setz al mov [rbp+var_3D], al mov [rbp+var_3C], ecx test al, 1 jnz short loc_FC2E0 mov eax, [rbp+var_3C] mov [rbp+var_1C], eax loc_FC2E0: mov al, [rbp+var_3D] and al, 1 mov [rbp+var_35], al mov al, [rbp+var_35] xor al, 0FFh test al, 1 jnz loc_FC1E6 loc_FC2F5: mov ecx, [rbp+var_14] mov rax, [rbp+var_28] mov [rax+34h], ecx mov rax, [rbp+var_28] mov dword ptr [rax+30h], 0 mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax+20h], rcx mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_FC31E: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long lf_pinbox_get_pins(long long a1) { signed __int32 v1; // eax signed __int32 v2; // ett bool v4; // [rsp+3h] [rbp-3Dh] long long v5; // [rsp+18h] [rbp-28h] signed __int32 v6; // [rsp+24h] [rbp-1Ch] unsigned __int32 v7; // [rsp+2Ch] [rbp-14h] v6 = *(_DWORD *)(a1 + 60); while ( 1 ) { v7 = (unsigned __int16)v6; if ( !(_WORD)v6 ) break; v5 = lf_dynarray_value(a1, (unsigned __int16)v6); v2 = v6; v1 = _InterlockedCompareExchange( (volatile signed __int32 *)(a1 + 60), v6 - (unsigned __int16)v6 + *(_DWORD *)(v5 + 52) + 0x10000, v6); v4 = v2 == v1; if ( v2 != v1 ) v6 = v1; if ( v4 ) goto LABEL_11; } v7 = _InterlockedIncrement((volatile signed __int32 *)(a1 + 64)); if ( v7 >= 0x10000 ) return 0LL; v5 = lf_dynarray_lvalue(a1, v7); if ( !v5 ) return 0LL; LABEL_11: *(_DWORD *)(v5 + 52) = v7; *(_DWORD *)(v5 + 48) = 0; *(_QWORD *)(v5 + 32) = a1; return v5; }
lf_pinbox_get_pins: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x3c] MOV dword ptr [RBP + -0x1c],EAX LAB_001fc1e6: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0xffff MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JNZ 0x001fc289 MOV RCX,qword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x2c],0x1 MOV EAX,dword ptr [RBP + -0x2c] XADD.LOCK dword ptr [RCX + 0x40],EAX MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x10000 SETNC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fc248 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001fc31e LAB_001fc248: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x001fcdc0 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fc287 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001fc31e LAB_001fc287: JMP 0x001fc2f5 LAB_001fc289: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x001fd0d0 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x34] MOV dword ptr [RBP + -0x18],EAX MOV RCX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x14] SUB ESI,EAX MOV EAX,dword ptr [RBP + -0x18] MOV EDX,EAX MOV EAX,ESI LEA EAX,[RAX + RDX*0x1 + 0x10000] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RBP + -0x34] CMPXCHG.LOCK dword ptr [RCX + 0x3c],EDX MOV ECX,EAX SETZ AL MOV byte ptr [RBP + -0x3d],AL MOV dword ptr [RBP + -0x3c],ECX TEST AL,0x1 JNZ 0x001fc2e0 MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x1c],EAX LAB_001fc2e0: MOV AL,byte ptr [RBP + -0x3d] AND AL,0x1 MOV byte ptr [RBP + -0x35],AL MOV AL,byte ptr [RBP + -0x35] XOR AL,0xff TEST AL,0x1 JNZ 0x001fc1e6 LAB_001fc2f5: MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x34],ECX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x30],0x0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_001fc31e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long lf_pinbox_get_pins(long param_1) { int *piVar1; int iVar2; uint uVar3; bool bVar4; long local_30; uint local_24; uint local_1c; local_24 = *(uint *)(param_1 + 0x3c); do { local_1c = local_24 & 0xffff; if (local_1c == 0) { LOCK(); piVar1 = (int *)(param_1 + 0x40); iVar2 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); local_1c = iVar2 + 1; if (0xffff < local_1c) { return 0; } local_30 = lf_dynarray_lvalue(param_1,local_1c); if (local_30 == 0) { return 0; } break; } local_30 = lf_dynarray_value(param_1,local_1c); LOCK(); uVar3 = *(uint *)(param_1 + 0x3c); bVar4 = local_24 == uVar3; if (bVar4) { *(uint *)(param_1 + 0x3c) = (local_24 - local_1c) + 0x10000 + *(int *)(local_30 + 0x34); uVar3 = local_24; } UNLOCK(); local_24 = uVar3; } while (!bVar4); *(uint *)(local_30 + 0x34) = local_1c; *(int4 *)(local_30 + 0x30) = 0; *(long *)(local_30 + 0x20) = param_1; return local_30; }
38,891
lf_pinbox_get_pins
eloqsql/mysys/lf_alloc-pin.c
LF_PINS *lf_pinbox_get_pins(LF_PINBOX *pinbox) { uint32 pins, next, top_ver; LF_PINS *el; /* We have an array of max. 64k elements. The highest index currently allocated is pinbox->pins_in_array. Freed elements are in a lifo stack, pinstack_top_ver. pinstack_top_ver is 32 bits; 16 low bits are the index in the array, to the first element of the list. 16 high bits are a version (every time the 16 low bits are updated, the 16 high bits are incremented). Versioning prevents the ABA problem. */ top_ver= pinbox->pinstack_top_ver; do { if (!(pins= top_ver % LF_PINBOX_MAX_PINS)) { /* the stack of free elements is empty */ pins= my_atomic_add32((int32 volatile*) &pinbox->pins_in_array, 1)+1; if (unlikely(pins >= LF_PINBOX_MAX_PINS)) return 0; /* note that the first allocated element has index 1 (pins==1). index 0 is reserved to mean "NULL pointer" */ el= (LF_PINS *)lf_dynarray_lvalue(&pinbox->pinarray, pins); if (unlikely(!el)) return 0; break; } el= (LF_PINS *)lf_dynarray_value(&pinbox->pinarray, pins); next= el->link; } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver, (int32*) &top_ver, top_ver-pins+next+LF_PINBOX_MAX_PINS)); /* set el->link to the index of el in the dynarray (el->link has two usages: - if element is allocated, it's its own index - if element is free, it's its next element in the free stack */ el->link= pins; el->purgatory_count= 0; el->pinbox= pinbox; return el; }
O3
c
lf_pinbox_get_pins: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x3c(%rdi), %r15d movl %r15d, %r14d andl $0xffff, %r14d # imm = 0xFFFF je 0x2f273 movq %rbx, %rdi movl %r14d, %esi callq 0xa5ad8 movq %rax, %rcx movl 0x34(%rax), %eax movl %r15d, %edx andl $0xffff0000, %edx # imm = 0xFFFF0000 addl %eax, %edx addl $0x10000, %edx # imm = 0x10000 movl %r15d, %eax lock cmpxchgl %edx, 0x3c(%rbx) movl %eax, %r15d jne 0x2f236 jmp 0x2f29c pushq $0x1 popq %r14 lock xaddl %r14d, 0x40(%rbx) incl %r14d cmpl $0xffff, %r14d # imm = 0xFFFF ja 0x2f2b6 movq %rbx, %rdi movl %r14d, %esi callq 0x2f2ba testq %rax, %rax je 0x2f2b6 movq %rax, %rcx movl %r14d, 0x34(%rcx) andl $0x0, 0x30(%rcx) movq %rbx, 0x20(%rcx) movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %ecx, %ecx jmp 0x2f2a8
lf_pinbox_get_pins: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r15d, [rdi+3Ch] loc_2F236: mov r14d, r15d and r14d, 0FFFFh jz short loc_2F273 mov rdi, rbx mov esi, r14d call lf_dynarray_value mov rcx, rax mov eax, [rax+34h] mov edx, r15d and edx, 0FFFF0000h add edx, eax add edx, 10000h mov eax, r15d lock cmpxchg [rbx+3Ch], edx mov r15d, eax jnz short loc_2F236 jmp short loc_2F29C loc_2F273: push 1 pop r14 lock xadd [rbx+40h], r14d inc r14d cmp r14d, 0FFFFh ja short loc_2F2B6 mov rdi, rbx mov esi, r14d call lf_dynarray_lvalue test rax, rax jz short loc_2F2B6 mov rcx, rax loc_2F29C: mov [rcx+34h], r14d and dword ptr [rcx+30h], 0 mov [rcx+20h], rbx loc_2F2A8: mov rax, rcx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_2F2B6: xor ecx, ecx jmp short loc_2F2A8
long long lf_pinbox_get_pins(long long a1) { signed __int32 v1; // r15d unsigned __int32 v2; // r14d long long v3; // rcx bool v4; // zf signed __int32 v5; // eax long long v6; // rax v1 = *(_DWORD *)(a1 + 60); while ( 1 ) { v2 = (unsigned __int16)v1; if ( !(_WORD)v1 ) break; v3 = lf_dynarray_value(a1, (unsigned __int16)v1); v5 = _InterlockedCompareExchange( (volatile signed __int32 *)(a1 + 60), *(_DWORD *)(v3 + 52) + (v1 & 0xFFFF0000) + 0x10000, v1); v4 = v1 == v5; v1 = v5; if ( v4 ) goto LABEL_8; } v2 = _InterlockedIncrement((volatile signed __int32 *)(a1 + 64)); if ( v2 <= 0xFFFF ) { v6 = lf_dynarray_lvalue(a1, v2); if ( v6 ) { v3 = v6; LABEL_8: *(_DWORD *)(v3 + 52) = v2; *(_DWORD *)(v3 + 48) = 0; *(_QWORD *)(v3 + 32) = a1; return v3; } } return 0LL; }
lf_pinbox_get_pins: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R15D,dword ptr [RDI + 0x3c] LAB_0012f236: MOV R14D,R15D AND R14D,0xffff JZ 0x0012f273 MOV RDI,RBX MOV ESI,R14D CALL 0x001a5ad8 MOV RCX,RAX MOV EAX,dword ptr [RAX + 0x34] MOV EDX,R15D AND EDX,0xffff0000 ADD EDX,EAX ADD EDX,0x10000 MOV EAX,R15D CMPXCHG.LOCK dword ptr [RBX + 0x3c],EDX MOV R15D,EAX JNZ 0x0012f236 JMP 0x0012f29c LAB_0012f273: PUSH 0x1 POP R14 XADD.LOCK dword ptr [RBX + 0x40],R14D INC R14D CMP R14D,0xffff JA 0x0012f2b6 MOV RDI,RBX MOV ESI,R14D CALL 0x0012f2ba TEST RAX,RAX JZ 0x0012f2b6 MOV RCX,RAX LAB_0012f29c: MOV dword ptr [RCX + 0x34],R14D AND dword ptr [RCX + 0x30],0x0 MOV qword ptr [RCX + 0x20],RBX LAB_0012f2a8: MOV RAX,RCX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0012f2b6: XOR ECX,ECX JMP 0x0012f2a8
long lf_pinbox_get_pins(long param_1) { int *piVar1; uint uVar2; int iVar3; long lVar4; uint uVar5; uint uVar6; bool bVar7; uVar6 = *(uint *)(param_1 + 0x3c); do { uVar5 = uVar6 & 0xffff; if (uVar5 == 0) { LOCK(); piVar1 = (int *)(param_1 + 0x40); iVar3 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); uVar5 = iVar3 + 1; if ((0xffff < uVar5) || (lVar4 = lf_dynarray_lvalue(param_1,uVar5), lVar4 == 0)) { return 0; } break; } lVar4 = lf_dynarray_value(param_1,uVar5); LOCK(); uVar2 = *(uint *)(param_1 + 0x3c); bVar7 = uVar6 == uVar2; if (bVar7) { *(uint *)(param_1 + 0x3c) = (uVar6 & 0xffff0000) + *(int *)(lVar4 + 0x34) + 0x10000; uVar2 = uVar6; } uVar6 = uVar2; UNLOCK(); } while (!bVar7); *(uint *)(lVar4 + 0x34) = uVar5; *(int4 *)(lVar4 + 0x30) = 0; *(long *)(lVar4 + 0x20) = param_1; return lVar4; }
38,892
ft_boolean_find_relevance
eloqsql/storage/myisam/ft_boolean_search.c
float ft_boolean_find_relevance(FT_INFO *ftb, uchar *record, uint length) { FTB_EXPR *ftbe; FT_SEG_ITERATOR ftsi, ftsi2; my_off_t docid=ftb->info->lastpos; MY_FTB_FIND_PARAM ftb_param; MYSQL_FTPARSER_PARAM *param; struct st_mysql_ftparser *parser= ftb->keynr == NO_SUCH_KEY ? &ft_default_parser : ftb->info->s->keyinfo[ftb->keynr].parser; if (docid == HA_OFFSET_ERROR) return -2.0; if (!ftb->queue.elements) return 0; if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 0))) return 0; if (ftb->state != INDEX_SEARCH && docid <= ftb->lastpos) { FTB_EXPR *x; uint i; for (i=0; i < ftb->queue.elements; i++) { ftb->list[i]->docid[1]=HA_OFFSET_ERROR; for (x=ftb->list[i]->up; x; x=x->up) x->docid[1]=HA_OFFSET_ERROR; } } ftb->lastpos=docid; if (ftb->keynr==NO_SUCH_KEY) _mi_ft_segiterator_dummy_init(record, length, &ftsi); else _mi_ft_segiterator_init(ftb->info, ftb->keynr, record, &ftsi); memcpy(&ftsi2, &ftsi, sizeof(ftsi)); ftb_param.ftb= ftb; ftb_param.ftsi= &ftsi2; param->mysql_parse= ftb_find_relevance_parse; param->mysql_add_word= ftb_find_relevance_add_word; param->mysql_ftparam= (void *)&ftb_param; param->flags= 0; param->cs= ftb->charset; param->mode= MYSQL_FTPARSER_SIMPLE_MODE; while (_mi_ft_segiterator(&ftsi)) { if (!ftsi.pos) continue; param->doc= (char *)ftsi.pos; param->length= ftsi.len; if (unlikely(parser->parse(param))) return 0; } ftbe=ftb->root; if (ftbe->docid[1]==docid && ftbe->cur_weight>0 && ftbe->yesses>=ftbe->ythresh && !ftbe->nos) { /* row matched ! */ return ftbe->cur_weight; } else { /* match failed ! */ return 0.0; } }
O3
c
ft_boolean_find_relevance: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %rbx movq 0x8(%rdi), %rdi movq 0x170(%rdi), %r13 movl 0x340(%rbx), %esi movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %rsi je 0x2d51f movq (%rdi), %rax movq 0x218(%rax), %rax imulq $0x70, %rsi, %rcx movq 0x38(%rax,%rcx), %r12 jmp 0x2d526 leaq 0x359dda(%rip), %r12 # 0x387300 cmpq $-0x1, %r13 je 0x2d5c9 xorps %xmm0, %xmm0 cmpl $0x0, 0x80(%rbx) je 0x2d692 movl %edx, -0x2c(%rbp) xorl %edx, %edx callq 0x751ad testq %rax, %rax je 0x2d68f movq %rax, %r14 cmpl $0x2, 0x348(%rbx) je 0x2d5a5 cmpq 0x338(%rbx), %r13 ja 0x2d5a5 cmpl $0x0, 0x80(%rbx) je 0x2d5a5 xorl %eax, %eax movq 0x20(%rbx), %rcx movq (%rcx,%rax,8), %rcx orq $-0x1, 0x18(%rcx) movq 0x20(%rbx), %rcx movq (%rcx,%rax,8), %rcx movq (%rcx), %rcx testq %rcx, %rcx je 0x2d597 orq $-0x1, 0x18(%rcx) jmp 0x2d588 incq %rax movl 0x80(%rbx), %ecx cmpq %rcx, %rax jb 0x2d573 movq %r13, 0x338(%rbx) movl 0x340(%rbx), %esi cmpl $-0x1, %esi je 0x2d5d6 movq 0x8(%rbx), %rdi leaq -0x50(%rbp), %rcx movq %r15, %rdx callq 0x75314 jmp 0x2d5e5 movss 0xaca3f(%rip), %xmm0 # 0xda010 jmp 0x2d692 leaq -0x50(%rbp), %rdx movq %r15, %rdi movl -0x2c(%rbp), %esi callq 0x75357 leaq -0x50(%rbp), %rdi movups (%rdi), %xmm0 movups 0x10(%rdi), %xmm1 leaq -0x80(%rbp), %rax movaps %xmm1, 0x10(%rax) movaps %xmm0, (%rax) leaq -0x60(%rbp), %rcx movq %rbx, (%rcx) movq %rax, 0x8(%rcx) leaq 0x461cc(%rip), %rax # 0x737d9 movq %rax, (%r14) leaq 0x8a(%rip), %rax # 0x2d6a1 movq %rax, 0x8(%r14) movq %rcx, 0x18(%r14) andl $0x0, 0x34(%r14) movq 0x10(%rbx), %rax movq %rax, 0x20(%r14) andl $0x0, 0x38(%r14) callq 0x75372 testl %eax, %eax je 0x2d66a leaq -0x50(%rbp), %r15 movq -0x38(%rbp), %rax testq %rax, %rax je 0x2d65e movq %rax, 0x28(%r14) movl -0x4c(%rbp), %eax movl %eax, 0x30(%r14) movq %r14, %rdi callq *0x8(%r12) testl %eax, %eax jne 0x2d68f movq %r15, %rdi callq 0x75372 testl %eax, %eax jne 0x2d63e movq 0x18(%rbx), %rax cmpq %r13, 0x18(%rax) jne 0x2d68f movss 0x2c(%rax), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0x2d68f movl 0x40(%rax), %ecx cmpl 0x48(%rax), %ecx jb 0x2d68f cmpl $0x0, 0x44(%rax) je 0x2d692 xorps %xmm0, %xmm0 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ft_boolean_find_relevance: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rsi mov rbx, rdi mov rdi, [rdi+8] mov r13, [rdi+170h] mov esi, [rbx+340h] mov eax, 0FFFFFFFFh cmp rsi, rax jz short loc_2D51F mov rax, [rdi] mov rax, [rax+218h] imul rcx, rsi, 70h ; 'p' mov r12, [rax+rcx+38h] jmp short loc_2D526 loc_2D51F: lea r12, ft_default_parser loc_2D526: cmp r13, 0FFFFFFFFFFFFFFFFh jz loc_2D5C9 xorps xmm0, xmm0 cmp dword ptr [rbx+80h], 0 jz loc_2D692 mov [rbp+var_2C], edx xor edx, edx call ftparser_call_initializer test rax, rax jz loc_2D68F mov r14, rax cmp dword ptr [rbx+348h], 2 jz short loc_2D5A5 cmp r13, [rbx+338h] ja short loc_2D5A5 cmp dword ptr [rbx+80h], 0 jz short loc_2D5A5 xor eax, eax loc_2D573: mov rcx, [rbx+20h] mov rcx, [rcx+rax*8] or qword ptr [rcx+18h], 0FFFFFFFFFFFFFFFFh mov rcx, [rbx+20h] mov rcx, [rcx+rax*8] loc_2D588: mov rcx, [rcx] test rcx, rcx jz short loc_2D597 or qword ptr [rcx+18h], 0FFFFFFFFFFFFFFFFh jmp short loc_2D588 loc_2D597: inc rax mov ecx, [rbx+80h] cmp rax, rcx jb short loc_2D573 loc_2D5A5: mov [rbx+338h], r13 mov esi, [rbx+340h] cmp esi, 0FFFFFFFFh jz short loc_2D5D6 mov rdi, [rbx+8] lea rcx, [rbp+var_50] mov rdx, r15 call _mi_ft_segiterator_init jmp short loc_2D5E5 loc_2D5C9: movss xmm0, cs:dword_DA010 jmp loc_2D692 loc_2D5D6: lea rdx, [rbp+var_50] mov rdi, r15 mov esi, [rbp+var_2C] call _mi_ft_segiterator_dummy_init loc_2D5E5: lea rdi, [rbp+var_50] movups xmm0, xmmword ptr [rdi] movups xmm1, xmmword ptr [rdi+10h] lea rax, [rbp+var_80] movaps xmmword ptr [rax+10h], xmm1 movaps xmmword ptr [rax], xmm0 lea rcx, [rbp+var_60] mov [rcx], rbx mov [rcx+8], rax lea rax, ftb_find_relevance_parse mov [r14], rax lea rax, ftb_find_relevance_add_word mov [r14+8], rax mov [r14+18h], rcx and dword ptr [r14+34h], 0 mov rax, [rbx+10h] mov [r14+20h], rax and dword ptr [r14+38h], 0 call _mi_ft_segiterator test eax, eax jz short loc_2D66A lea r15, [rbp+var_50] loc_2D63E: mov rax, [rbp+var_38] test rax, rax jz short loc_2D65E mov [r14+28h], rax mov eax, [rbp+var_4C] mov [r14+30h], eax mov rdi, r14 call qword ptr [r12+8] test eax, eax jnz short loc_2D68F loc_2D65E: mov rdi, r15 call _mi_ft_segiterator test eax, eax jnz short loc_2D63E loc_2D66A: mov rax, [rbx+18h] cmp [rax+18h], r13 jnz short loc_2D68F movss xmm0, dword ptr [rax+2Ch] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_2D68F mov ecx, [rax+40h] cmp ecx, [rax+48h] jb short loc_2D68F cmp dword ptr [rax+44h], 0 jz short loc_2D692 loc_2D68F: xorps xmm0, xmm0 loc_2D692: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
double ft_boolean_find_relevance(long long a1, long long a2, unsigned int a3) { _QWORD *v5; // rdi unsigned long long v6; // r13 long long v7; // rsi unsigned int ( **v8)(_QWORD); // r12 double result; // xmm0_8 long long v10; // rax long long v11; // r14 unsigned long long v12; // rax _QWORD *i; // rcx long long v14; // rsi long long v15; // rdx long long v16; // r8 long long v17; // r9 long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 long long v22; // rax _OWORD v23[2]; // [rsp+0h] [rbp-80h] BYREF _QWORD v24[2]; // [rsp+20h] [rbp-60h] BYREF __int128 v25; // [rsp+30h] [rbp-50h] BYREF __int128 v26; // [rsp+40h] [rbp-40h] unsigned int v27; // [rsp+54h] [rbp-2Ch] v5 = *(_QWORD **)(a1 + 8); v6 = v5[46]; v7 = *(unsigned int *)(a1 + 832); if ( v7 == 0xFFFFFFFFLL ) v8 = (unsigned int ( **)(_QWORD))&ft_default_parser; else v8 = *(unsigned int ( ***)(_QWORD))(*(_QWORD *)(*v5 + 536LL) + 112 * v7 + 56); if ( v6 == -1LL ) { *(_QWORD *)&result = 3221225472LL; return result; } result = 0.0; if ( !*(_DWORD *)(a1 + 128) ) return result; v27 = a3; v10 = ftparser_call_initializer(v5, v7, 0LL, 0.0); if ( !v10 ) return 0.0; v11 = v10; if ( *(_DWORD *)(a1 + 840) != 2 && v6 <= *(_QWORD *)(a1 + 824) && *(_DWORD *)(a1 + 128) ) { v12 = 0LL; do { *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v12) + 24LL) = -1LL; for ( i = *(_QWORD **)(*(_QWORD *)(a1 + 32) + 8 * v12); ; i[3] = -1LL ) { i = (_QWORD *)*i; if ( !i ) break; } ++v12; } while ( v12 < *(unsigned int *)(a1 + 128) ); } *(_QWORD *)(a1 + 824) = v6; v14 = *(unsigned int *)(a1 + 832); if ( (_DWORD)v14 == -1 ) { v14 = v27; mi_ft_segiterator_dummy_init(a2, v27, &v25); } else { mi_ft_segiterator_init(*(_QWORD *)(a1 + 8), v14, a2, &v25); } v23[1] = v26; v23[0] = v25; v24[0] = a1; v24[1] = v23; *(_QWORD *)v11 = ftb_find_relevance_parse; *(_QWORD *)(v11 + 8) = ftb_find_relevance_add_word; *(_QWORD *)(v11 + 24) = v24; *(_DWORD *)(v11 + 52) = 0; *(_QWORD *)(v11 + 32) = *(_QWORD *)(a1 + 16); *(_DWORD *)(v11 + 56) = 0; if ( (unsigned int)mi_ft_segiterator(&v25, v14, v15, v24, v16, v17) ) { do { if ( *((_QWORD *)&v26 + 1) ) { *(_QWORD *)(v11 + 40) = *((_QWORD *)&v26 + 1); *(_DWORD *)(v11 + 48) = DWORD1(v25); if ( v8[1](v11) ) return 0.0; } } while ( (unsigned int)mi_ft_segiterator(&v25, v14, v18, v19, v20, v21) ); } v22 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v22 + 24) != v6 ) return 0.0; *(_QWORD *)&result = *(unsigned int *)(v22 + 44); if ( *(float *)&result <= 0.0 || *(_DWORD *)(v22 + 64) < *(_DWORD *)(v22 + 72) || *(_DWORD *)(v22 + 68) ) return 0.0; return result; }
ft_boolean_find_relevance: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV R13,qword ptr [RDI + 0x170] MOV ESI,dword ptr [RBX + 0x340] MOV EAX,0xffffffff CMP RSI,RAX JZ 0x0012d51f MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x218] IMUL RCX,RSI,0x70 MOV R12,qword ptr [RAX + RCX*0x1 + 0x38] JMP 0x0012d526 LAB_0012d51f: LEA R12,[0x487300] LAB_0012d526: CMP R13,-0x1 JZ 0x0012d5c9 XORPS XMM0,XMM0 CMP dword ptr [RBX + 0x80],0x0 JZ 0x0012d692 MOV dword ptr [RBP + -0x2c],EDX XOR EDX,EDX CALL 0x001751ad TEST RAX,RAX JZ 0x0012d68f MOV R14,RAX CMP dword ptr [RBX + 0x348],0x2 JZ 0x0012d5a5 CMP R13,qword ptr [RBX + 0x338] JA 0x0012d5a5 CMP dword ptr [RBX + 0x80],0x0 JZ 0x0012d5a5 XOR EAX,EAX LAB_0012d573: MOV RCX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RCX + RAX*0x8] OR qword ptr [RCX + 0x18],-0x1 MOV RCX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RCX + RAX*0x8] LAB_0012d588: MOV RCX,qword ptr [RCX] TEST RCX,RCX JZ 0x0012d597 OR qword ptr [RCX + 0x18],-0x1 JMP 0x0012d588 LAB_0012d597: INC RAX MOV ECX,dword ptr [RBX + 0x80] CMP RAX,RCX JC 0x0012d573 LAB_0012d5a5: MOV qword ptr [RBX + 0x338],R13 MOV ESI,dword ptr [RBX + 0x340] CMP ESI,-0x1 JZ 0x0012d5d6 MOV RDI,qword ptr [RBX + 0x8] LEA RCX,[RBP + -0x50] MOV RDX,R15 CALL 0x00175314 JMP 0x0012d5e5 LAB_0012d5c9: MOVSS XMM0,dword ptr [0x001da010] JMP 0x0012d692 LAB_0012d5d6: LEA RDX,[RBP + -0x50] MOV RDI,R15 MOV ESI,dword ptr [RBP + -0x2c] CALL 0x00175357 LAB_0012d5e5: LEA RDI,[RBP + -0x50] MOVUPS XMM0,xmmword ptr [RDI] MOVUPS XMM1,xmmword ptr [RDI + 0x10] LEA RAX,[RBP + -0x80] MOVAPS xmmword ptr [RAX + 0x10],XMM1 MOVAPS xmmword ptr [RAX],XMM0 LEA RCX,[RBP + -0x60] MOV qword ptr [RCX],RBX MOV qword ptr [RCX + 0x8],RAX LEA RAX,[0x1737d9] MOV qword ptr [R14],RAX LEA RAX,[0x12d6a1] MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [R14 + 0x18],RCX AND dword ptr [R14 + 0x34],0x0 MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [R14 + 0x20],RAX AND dword ptr [R14 + 0x38],0x0 CALL 0x00175372 TEST EAX,EAX JZ 0x0012d66a LEA R15,[RBP + -0x50] LAB_0012d63e: MOV RAX,qword ptr [RBP + -0x38] TEST RAX,RAX JZ 0x0012d65e MOV qword ptr [R14 + 0x28],RAX MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [R14 + 0x30],EAX MOV RDI,R14 CALL qword ptr [R12 + 0x8] TEST EAX,EAX JNZ 0x0012d68f LAB_0012d65e: MOV RDI,R15 CALL 0x00175372 TEST EAX,EAX JNZ 0x0012d63e LAB_0012d66a: MOV RAX,qword ptr [RBX + 0x18] CMP qword ptr [RAX + 0x18],R13 JNZ 0x0012d68f MOVSS XMM0,dword ptr [RAX + 0x2c] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x0012d68f MOV ECX,dword ptr [RAX + 0x40] CMP ECX,dword ptr [RAX + 0x48] JC 0x0012d68f CMP dword ptr [RAX + 0x44],0x0 JZ 0x0012d692 LAB_0012d68f: XORPS XMM0,XMM0 LAB_0012d692: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
float ft_boolean_find_relevance(long param_1,int8 param_2,int4 param_3) { ulong uVar1; long lVar2; int iVar3; int8 *puVar4; ulong uVar5; long *plVar6; int1 *puVar7; float fVar8; int4 local_88; int4 uStack_84; int4 uStack_80; int4 uStack_7c; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; long local_68; int4 *local_60; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int4 local_34; plVar6 = *(long **)(param_1 + 8); uVar1 = plVar6[0x2e]; uVar5 = (ulong)*(uint *)(param_1 + 0x340); if (uVar5 == 0xffffffff) { puVar7 = ft_default_parser; } else { puVar7 = *(int1 **)(*(long *)(*plVar6 + 0x218) + 0x38 + uVar5 * 0x70); } fVar8 = DAT_001da010; if ((uVar1 != 0xffffffffffffffff) && (fVar8 = 0.0, *(int *)(param_1 + 0x80) != 0)) { local_34 = param_3; puVar4 = (int8 *)ftparser_call_initializer(0,plVar6,uVar5,0); if (puVar4 != (int8 *)0x0) { if (((*(int *)(param_1 + 0x348) != 2) && (uVar1 <= *(ulong *)(param_1 + 0x338))) && (*(int *)(param_1 + 0x80) != 0)) { uVar5 = 0; do { *(int8 *)(*(long *)(*(long *)(param_1 + 0x20) + uVar5 * 8) + 0x18) = 0xffffffffffffffff; plVar6 = *(long **)(*(long *)(param_1 + 0x20) + uVar5 * 8); while (plVar6 = (long *)*plVar6, plVar6 != (long *)0x0) { plVar6[3] = 0xffffffffffffffff; } uVar5 = uVar5 + 1; } while (uVar5 < *(uint *)(param_1 + 0x80)); } *(ulong *)(param_1 + 0x338) = uVar1; if (*(int *)(param_1 + 0x340) == -1) { _mi_ft_segiterator_dummy_init(param_2,local_34,&local_58); } else { _mi_ft_segiterator_init (*(int8 *)(param_1 + 8),*(int *)(param_1 + 0x340),param_2,&local_58); } local_60 = &local_88; local_78 = local_48; uStack_74 = uStack_44; uStack_70 = uStack_40; uStack_6c = uStack_3c; local_88 = local_58; uStack_84 = uStack_54; uStack_80 = uStack_50; uStack_7c = uStack_4c; *puVar4 = ftb_find_relevance_parse; puVar4[1] = ftb_find_relevance_add_word; puVar4[3] = &local_68; *(int4 *)((long)puVar4 + 0x34) = 0; puVar4[4] = *(int8 *)(param_1 + 0x10); *(int4 *)(puVar4 + 7) = 0; local_68 = param_1; iVar3 = _mi_ft_segiterator(); if (iVar3 != 0) { do { if (CONCAT44(uStack_3c,uStack_40) != 0) { puVar4[5] = CONCAT44(uStack_3c,uStack_40); *(int4 *)(puVar4 + 6) = uStack_54; iVar3 = (**(code **)(puVar7 + 8))(puVar4); if (iVar3 != 0) goto LAB_0012d68f; } iVar3 = _mi_ft_segiterator(&local_58); } while (iVar3 != 0); } lVar2 = *(long *)(param_1 + 0x18); if (((*(ulong *)(lVar2 + 0x18) == uVar1) && (0.0 < *(float *)(lVar2 + 0x2c))) && ((*(uint *)(lVar2 + 0x48) <= *(uint *)(lVar2 + 0x40) && (*(int *)(lVar2 + 0x44) == 0)))) { return *(float *)(lVar2 + 0x2c); } } LAB_0012d68f: fVar8 = 0.0; } return fVar8; }
38,893
js_iterator_wrap_mark
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_wrap_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorWrapData *it = p->u.iterator_wrap_data; if (it) { JS_MarkValue(rt, it->wrapped_iter, mark_func); JS_MarkValue(rt, it->wrapped_next, mark_func); } }
O1
c
js_iterator_wrap_mark: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x30(%rsi), %r15 testq %r15, %r15 je 0x3a553 movq %rcx, %rbx movq %rdi, %r14 movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE movsd (%r15), %xmm0 movl 0x8(%r15), %eax movsd %xmm0, (%rsp) andl $-0x2, %eax cmpl %r12d, %eax jne 0x3a533 movq (%rsp), %rsi movq %r14, %rdi callq *%rbx movsd 0x10(%r15), %xmm0 movl 0x18(%r15), %eax movsd %xmm0, (%rsp) andl $-0x2, %eax cmpl %r12d, %eax jne 0x3a553 movq (%rsp), %rsi movq %r14, %rdi callq *%rbx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_iterator_wrap_mark: push r15 push r14 push r12 push rbx push rax mov r15, [rsi+30h] test r15, r15 jz short loc_3A553 mov rbx, rcx mov r14, rdi mov r12d, 0FFFFFFFEh movsd xmm0, qword ptr [r15] mov eax, [r15+8] movsd [rsp+28h+var_28], xmm0 and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_3A533 mov rsi, [rsp+28h+var_28] mov rdi, r14 call rbx loc_3A533: movsd xmm0, qword ptr [r15+10h] mov eax, [r15+18h] movsd [rsp+28h+var_28], xmm0 and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_3A553 mov rsi, [rsp+28h+var_28] mov rdi, r14 call rbx loc_3A553: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_iterator_wrap_mark(long long a1, long long a2, long long a3, void ( *a4)(long long, _QWORD)) { long long v4; // r15 long long result; // rax v4 = *(_QWORD *)(a2 + 48); if ( v4 ) { if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)v4); result = *(_DWORD *)(v4 + 24) & 0xFFFFFFFE; if ( (_DWORD)result == -2 ) return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 16)); } return result; }
js_iterator_wrap_mark: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RSI + 0x30] TEST R15,R15 JZ 0x0013a553 MOV RBX,RCX MOV R14,RDI MOV R12D,0xfffffffe MOVSD XMM0,qword ptr [R15] MOV EAX,dword ptr [R15 + 0x8] MOVSD qword ptr [RSP],XMM0 AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x0013a533 MOV RSI,qword ptr [RSP] MOV RDI,R14 CALL RBX LAB_0013a533: MOVSD XMM0,qword ptr [R15 + 0x10] MOV EAX,dword ptr [R15 + 0x18] MOVSD qword ptr [RSP],XMM0 AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x0013a553 MOV RSI,qword ptr [RSP] MOV RDI,R14 CALL RBX LAB_0013a553: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void js_iterator_wrap_mark(int8 param_1,long param_2,int8 param_3,code *param_4) { int8 *puVar1; puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)0x0) { if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,*puVar1); } if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) { (*param_4)(param_1,puVar1[2]); } } return; }
38,894
js_iterator_wrap_mark
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_wrap_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorWrapData *it = p->u.iterator_wrap_data; if (it) { JS_MarkValue(rt, it->wrapped_iter, mark_func); JS_MarkValue(rt, it->wrapped_next, mark_func); } }
O3
c
js_iterator_wrap_mark: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x30(%rsi), %r14 testq %r14, %r14 je 0x3bb15 movq %rdi, %rbx movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE movl 0x8(%r14), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x3baf5 movq (%r14), %rsi movq %rbx, %rdi movq %rcx, %r12 callq *%rcx movq %r12, %rcx movl 0x18(%r14), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x3bb15 movq 0x10(%r14), %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_iterator_wrap_mark: push r15 push r14 push r12 push rbx push rax mov r14, [rsi+30h] test r14, r14 jz short loc_3BB15 mov rbx, rdi mov r15d, 0FFFFFFFEh mov eax, [r14+8] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3BAF5 mov rsi, [r14] mov rdi, rbx mov r12, rcx call rcx mov rcx, r12 loc_3BAF5: mov eax, [r14+18h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3BB15 mov rsi, [r14+10h] mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx loc_3BB15: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_iterator_wrap_mark(long long a1, long long a2, long long a3, void ( *a4)(_QWORD, _QWORD)) { long long v4; // r14 void ( *v5)(_QWORD, _QWORD); // r12 long long result; // rax v4 = *(_QWORD *)(a2 + 48); if ( v4 ) { if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE ) { v5 = a4; a4(a1, *(_QWORD *)v4); a4 = v5; } result = *(_DWORD *)(v4 + 24) & 0xFFFFFFFE; if ( (_DWORD)result == -2 ) return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 16)); } return result; }
js_iterator_wrap_mark: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 JZ 0x0013bb15 MOV RBX,RDI MOV R15D,0xfffffffe MOV EAX,dword ptr [R14 + 0x8] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x0013baf5 MOV RSI,qword ptr [R14] MOV RDI,RBX MOV R12,RCX CALL RCX MOV RCX,R12 LAB_0013baf5: MOV EAX,dword ptr [R14 + 0x18] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x0013bb15 MOV RSI,qword ptr [R14 + 0x10] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX LAB_0013bb15: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void js_iterator_wrap_mark (int8 param_1,long param_2,int8 param_3,code *UNRECOVERED_JUMPTABLE) { int8 *puVar1; int8 extraout_RDX; puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)0x0) { if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,*puVar1); param_3 = extraout_RDX; } if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) { /* WARNING: Could not recover jumptable at 0x0013bb13. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(param_1,puVar1[2],param_3,UNRECOVERED_JUMPTABLE); return; } } return; }
38,895
YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY[abi:cxx11](char const*)
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/exceptions.h
inline const std::string BAD_SUBSCRIPT_WITH_KEY(const char* key) { std::stringstream stream; stream << BAD_SUBSCRIPT << " (key: \"" << key << "\")"; return stream.str(); }
O3
c
YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY[abi:cxx11](char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x190, %rsp # imm = 0x190 movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rsp), %rdi callq 0x2cc30 leaq 0x18(%rsp), %r14 leaq 0x118437(%rip), %rsi # 0x162f2f movl $0x1b, %edx movq %r14, %rdi callq 0x2d4f0 leaq 0x11843f(%rip), %rsi # 0x162f4b movl $0x8, %edx movq %r14, %rdi callq 0x2d4f0 testq %r15, %r15 je 0x4ab36 movq %r15, %rdi callq 0x2c700 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x2d4f0 jmp 0x4ab4f movq 0x18(%rsp), %rax movq -0x18(%rax), %rax leaq (%r14,%rax), %rdi movl 0x38(%rsp,%rax), %esi orl $0x1, %esi callq 0x2e0c0 leaq 0x1183fe(%rip), %rsi # 0x162f54 movl $0x2, %edx movq %r14, %rdi callq 0x2d4f0 leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x2ccd0 movq 0x1c52e1(%rip), %rsi # 0x20fe58 leaq 0x8(%rsp), %rdi callq 0x2cce0 leaq 0x88(%rsp), %rdi callq 0x2c4d0 movq %rbx, %rax addq $0x190, %rsp # imm = 0x190 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x1c52b0(%rip), %rsi # 0x20fe58 leaq 0x8(%rsp), %rdi callq 0x2cce0 leaq 0x88(%rsp), %rdi callq 0x2c4d0 movq %rbx, %rdi callq 0x2e220
_ZN4YAML8ErrorMsg22BAD_SUBSCRIPT_WITH_KEYB5cxx11EPKc: push r15 push r14 push rbx sub rsp, 190h mov r15, rsi mov rbx, rdi lea rdi, [rsp+1A8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea r14, [rsp+1A8h+var_190] lea rsi, aOperatorCallOn; "operator[] call on a scalar" mov edx, 1Bh mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aKey; " (key: \"" mov edx, 8 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r15, r15 jz short loc_4AB36 mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_4AB4F loc_4AB36: mov rax, [rsp+1A8h+var_190] mov rax, [rax-18h] lea rdi, [r14+rax] mov esi, [rsp+rax+1A8h+var_170] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_4AB4F: lea rsi, asc_162F54; "\")" mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, [rsp+1A8h+var_188] mov rdi, rbx call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1A8h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1A8h+var_120]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 190h pop rbx pop r14 pop r15 retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_80]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY[abi:cxx11](long long a1, long long a2) { long long v2; // rax _BYTE v4[16]; // [rsp+8h] [rbp-1A0h] BYREF long long v5; // [rsp+18h] [rbp-190h] BYREF _BYTE v6[104]; // [rsp+20h] [rbp-188h] BYREF _BYTE v7[288]; // [rsp+88h] [rbp-120h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v4); std::__ostream_insert<char,std::char_traits<char>>(&v5, "operator[] call on a scalar", 27LL); std::__ostream_insert<char,std::char_traits<char>>(&v5, " (key: \"", 8LL); if ( a2 ) { v2 = strlen(a2); std::__ostream_insert<char,std::char_traits<char>>(&v5, a2, v2); } else { std::ios::clear(&v6[*(_QWORD *)(v5 - 24) - 8], *(_DWORD *)&v6[*(_QWORD *)(v5 - 24) + 24] | 1u); } std::__ostream_insert<char,std::char_traits<char>>(&v5, "\")", 2LL); std::stringbuf::str(a1, v6); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v4, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v7); return a1; }
BAD_SUBSCRIPT_WITH_KEY[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x190 MOV R15,RSI MOV RBX,RDI LEA RDI,[RSP + 0x8] CALL 0x0012cc30 LEA R14,[RSP + 0x18] LAB_0014aaf1: LEA RSI,[0x262f2f] MOV EDX,0x1b MOV RDI,R14 CALL 0x0012d4f0 LEA RSI,[0x262f4b] MOV EDX,0x8 MOV RDI,R14 CALL 0x0012d4f0 TEST R15,R15 JZ 0x0014ab36 MOV RDI,R15 CALL 0x0012c700 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x0012d4f0 JMP 0x0014ab4f LAB_0014ab36: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[R14 + RAX*0x1] MOV ESI,dword ptr [RSP + RAX*0x1 + 0x38] OR ESI,0x1 CALL 0x0012e0c0 LAB_0014ab4f: LEA RSI,[0x262f54] MOV EDX,0x2 MOV RDI,R14 CALL 0x0012d4f0 LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x0012ccd0 LAB_0014ab70: MOV RSI,qword ptr [0x0030fe58] LEA RDI,[RSP + 0x8] CALL 0x0012cce0 LEA RDI,[RSP + 0x88] CALL 0x0012c4d0 MOV RAX,RBX ADD RSP,0x190 POP RBX POP R14 POP R15 RET
/* YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY[abi:cxx11](char const*) */ ErrorMsg * __thiscall YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY_abi_cxx11_(ErrorMsg *this,char *param_1) { size_t sVar1; stringstream local_1a0 [16]; long local_190 [4]; uint auStack_170 [20]; ios_base local_120 [264]; std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 0014aaf1 to 0014ab6f has its CatchHandler @ 0014ab9e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190,"operator[] call on a scalar",0x1b); std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," (key: \"",8); if (param_1 == (char *)0x0) { std::ios::clear((ostream *)local_190 + *(long *)(local_190[0] + -0x18), *(uint *)((long)auStack_170 + *(long *)(local_190[0] + -0x18)) | 1); } else { sVar1 = strlen(param_1); std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190,param_1,sVar1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190,"\")",2); std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1a0); std::ios_base::~ios_base(local_120); return this; }
38,896
google::protobuf::internal::GenericSwap(google::protobuf::MessageLite*, google::protobuf::MessageLite*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc
void GenericSwap(MessageLite* m1, MessageLite* m2) { std::unique_ptr<MessageLite> tmp(m1->New()); tmp->CheckTypeAndMergeFrom(*m1); m1->Clear(); m1->CheckTypeAndMergeFrom(*m2); m2->Clear(); m2->CheckTypeAndMergeFrom(*tmp); }
O3
cpp
google::protobuf::internal::GenericSwap(google::protobuf::MessageLite*, google::protobuf::MessageLite*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rax xorl %esi, %esi callq *0x18(%rax) movq %rax, %rbx movq (%rax), %rax movq %rbx, %rdi movq %r15, %rsi callq *0x38(%rax) movq (%r15), %rax movq %r15, %rdi callq *0x20(%rax) movq (%r15), %rax movq %r15, %rdi movq %r14, %rsi callq *0x38(%rax) movq (%r14), %rax movq %r14, %rdi callq *0x20(%rax) movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x38(%rax) movq (%rbx), %rax movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmpq *0x8(%rax) movq %rax, %r14 movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) movq %r14, %rdi callq 0xf570
_ZN6google8protobuf8internal11GenericSwapEPNS0_11MessageLiteES3_: push r15 push r14 push rbx mov r14, rsi mov r15, rdi mov rax, [rdi] xor esi, esi call qword ptr [rax+18h] mov rbx, rax mov rax, [rax] mov rdi, rbx mov rsi, r15 call qword ptr [rax+38h] mov rax, [r15] mov rdi, r15 call qword ptr [rax+20h] mov rax, [r15] mov rdi, r15 mov rsi, r14 call qword ptr [rax+38h] mov rax, [r14] mov rdi, r14 call qword ptr [rax+20h] mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+38h] mov rax, [rbx] mov rdi, rbx pop rbx pop r14 pop r15 jmp qword ptr [rax+8] mov r14, rax mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] mov rdi, r14 call __Unwind_Resume
long long google::protobuf::internal::GenericSwap( google::protobuf::internal *this, google::protobuf::MessageLite *a2, google::protobuf::MessageLite *a3) { long long v5; // rbx v5 = (*(long long ( **)(google::protobuf::internal *, _QWORD, google::protobuf::MessageLite *))(*(_QWORD *)this + 24LL))( this, 0LL, a3); (*(void ( **)(long long, google::protobuf::internal *))(*(_QWORD *)v5 + 56LL))(v5, this); (*(void ( **)(google::protobuf::internal *))(*(_QWORD *)this + 32LL))(this); (*(void ( **)(google::protobuf::internal *, google::protobuf::MessageLite *))(*(_QWORD *)this + 56LL))( this, a2); (*(void ( **)(google::protobuf::MessageLite *))(*(_QWORD *)a2 + 32LL))(a2); (*(void ( **)(google::protobuf::MessageLite *, long long))(*(_QWORD *)a2 + 56LL))(a2, v5); return (*(long long ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); }
GenericSwap: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI] XOR ESI,ESI CALL qword ptr [RAX + 0x18] MOV RBX,RAX MOV RAX,qword ptr [RAX] LAB_0019cae5: MOV RDI,RBX MOV RSI,R15 CALL qword ptr [RAX + 0x38] MOV RAX,qword ptr [R15] MOV RDI,R15 CALL qword ptr [RAX + 0x20] MOV RAX,qword ptr [R15] MOV RDI,R15 MOV RSI,R14 CALL qword ptr [RAX + 0x38] MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x20] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x38] LAB_0019cb18: MOV RAX,qword ptr [RBX] MOV RDI,RBX POP RBX POP R14 POP R15 JMP qword ptr [RAX + 0x8]
/* google::protobuf::internal::GenericSwap(google::protobuf::MessageLite*, google::protobuf::MessageLite*) */ void google::protobuf::internal::GenericSwap(MessageLite *param_1,MessageLite *param_2) { long *plVar1; plVar1 = (long *)(**(code **)(*(long *)param_1 + 0x18))(param_1,0); /* try { // try from 0019cae5 to 0019cb17 has its CatchHandler @ 0019cb26 */ (**(code **)(*plVar1 + 0x38))(plVar1,param_1); (**(code **)(*(long *)param_1 + 0x20))(param_1); (**(code **)(*(long *)param_1 + 0x38))(param_1,param_2); (**(code **)(*(long *)param_2 + 0x20))(param_2); (**(code **)(*(long *)param_2 + 0x38))(param_2,plVar1); /* WARNING: Could not recover jumptable at 0x0019cb23. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 8))(plVar1); return; }
38,897
set_dynamic
eloqsql/mysys/array.c
my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx) { if (idx >= array->elements) { if (idx >= array->max_element && allocate_dynamic(array, idx)) return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, (size_t) array->size_of_element); return FALSE; }
O3
c
set_dynamic: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r14d movq %rsi, %rbx movq %rdi, %r15 movl 0x8(%rdi), %eax cmpl %edx, %eax ja 0x96b26 cmpl %r14d, 0xc(%r15) ja 0x96b03 movq %r15, %rdi movl %r14d, %esi callq 0x96b49 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x96b3e movl 0x8(%r15), %eax movl 0x14(%r15), %ecx movl %r14d, %edx subl %eax, %edx imull %ecx, %edx movl %ecx, %edi imull %eax, %edi addq (%r15), %rdi xorl %esi, %esi callq 0x2a290 leal 0x1(%r14), %eax movl %eax, 0x8(%r15) movl 0x14(%r15), %edx imull %edx, %r14d addq (%r15), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x2a0a0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
set_dynamic: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, edx mov rbx, rsi mov r15, rdi mov eax, [rdi+8] cmp eax, edx ja short loc_96B26 cmp [r15+0Ch], r14d ja short loc_96B03 mov rdi, r15 mov esi, r14d call allocate_dynamic mov ecx, eax mov al, 1 test cl, cl jnz short loc_96B3E mov eax, [r15+8] loc_96B03: mov ecx, [r15+14h] mov edx, r14d sub edx, eax imul edx, ecx mov edi, ecx imul edi, eax add rdi, [r15] xor esi, esi call _memset lea eax, [r14+1] mov [r15+8], eax loc_96B26: mov edx, [r15+14h] imul r14d, edx add r14, [r15] mov rdi, r14 mov rsi, rbx call _memcpy xor eax, eax loc_96B3E: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { unsigned int v4; // eax char dynamic; // cl char result; // al v4 = *(_DWORD *)(a1 + 8); if ( v4 <= a3 ) { if ( *(_DWORD *)(a1 + 12) <= a3 ) { dynamic = allocate_dynamic(a1, a3); result = 1; if ( dynamic ) return result; v4 = *(_DWORD *)(a1 + 8); } memset(*(_QWORD *)a1 + v4 * *(_DWORD *)(a1 + 20), 0LL, *(_DWORD *)(a1 + 20) * (a3 - v4)); *(_DWORD *)(a1 + 8) = a3 + 1; } memcpy(*(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, a2, *(unsigned int *)(a1 + 20)); return 0; }
set_dynamic: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,EDX MOV RBX,RSI MOV R15,RDI MOV EAX,dword ptr [RDI + 0x8] CMP EAX,EDX JA 0x00196b26 CMP dword ptr [R15 + 0xc],R14D JA 0x00196b03 MOV RDI,R15 MOV ESI,R14D CALL 0x00196b49 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00196b3e MOV EAX,dword ptr [R15 + 0x8] LAB_00196b03: MOV ECX,dword ptr [R15 + 0x14] MOV EDX,R14D SUB EDX,EAX IMUL EDX,ECX MOV EDI,ECX IMUL EDI,EAX ADD RDI,qword ptr [R15] XOR ESI,ESI CALL 0x0012a290 LEA EAX,[R14 + 0x1] MOV dword ptr [R15 + 0x8],EAX LAB_00196b26: MOV EDX,dword ptr [R15 + 0x14] IMUL R14D,EDX ADD R14,qword ptr [R15] MOV RDI,R14 MOV RSI,RBX CALL 0x0012a0a0 XOR EAX,EAX LAB_00196b3e: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; uint uVar2; uVar2 = *(uint *)(param_1 + 1); if (uVar2 <= param_3) { if (*(uint *)((long)param_1 + 0xc) <= param_3) { cVar1 = allocate_dynamic(param_1); if (cVar1 != '\0') { return 1; } uVar2 = *(uint *)(param_1 + 1); } memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar2) + *param_1),0, (ulong)((param_3 - uVar2) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
38,898
mul_trig
bluesky950520[P]quickjs/libbf.c
static no_inline void mul_trig(NTTLimb *buf, limb_t n, limb_t c_mul, limb_t m, limb_t m_inv) { limb_t i, c0, c_mul_inv; c0 = 1; c_mul_inv = init_mul_mod_fast2(c_mul, m); for(i = 0; i < n; i++) { buf[i] = mul_mod_fast(buf[i], c0, m, m_inv); c0 = mul_mod_fast2(c0, c_mul, m, c_mul_inv); } }
O3
c
mul_trig: testq %rsi, %rsi je 0x962c3 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 xorl %ebp, %ebp xorl %edi, %edi movq %rdx, %rsi movq %rcx, %rdx xorl %ecx, %ecx callq 0x9c620 movq %rax, %rcx leaq (%r14,%r14), %r9 movl $0x1, %esi movq %rsi, %rax mulq (%r13,%rbp,8) movq %rax, %r8 movq %rdx, %rdi movq %rdx, %rax shldq $0x3, %r8, %rax mulq %rbx movq %rdx, %rax mulq %r14 addq %r9, %rax adcq $0x0, %rdx subq %rax, %r8 sbbq %rdx, %rdi movq %rdi, %rax sarq %rax andq %r14, %rax addq %r8, %rax adcq $0x0, %rdi andq %r14, %rdi addq %rax, %rdi movq %rcx, %rax mulq %rsi imulq %r15, %rsi imulq %r14, %rdx subq %rdx, %rsi cmpq %r14, %rsi movl $0x0, %eax cmovaeq %r14, %rax movq %rdi, (%r13,%rbp,8) subq %rax, %rsi incq %rbp cmpq %rbp, %r12 jne 0x96246 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mul_trig: test rsi, rsi jz locret_962C3 push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rdx mov r12, rsi mov r13, rdi xor ebp, ebp xor edi, edi mov rsi, rdx mov rdx, rcx xor ecx, ecx call __udivti3 mov rcx, rax lea r9, [r14+r14] mov esi, 1 loc_96246: mov rax, rsi mul qword ptr [r13+rbp*8+0] mov r8, rax mov rdi, rdx mov rax, rdx shld rax, r8, 3 mul rbx mov rax, rdx mul r14 add rax, r9 adc rdx, 0 sub r8, rax sbb rdi, rdx mov rax, rdi sar rax, 1 and rax, r14 add rax, r8 adc rdi, 0 and rdi, r14 add rdi, rax mov rax, rcx mul rsi imul rsi, r15 imul rdx, r14 sub rsi, rdx cmp rsi, r14 mov eax, 0 cmovnb rax, r14 mov [r13+rbp*8+0], rdi sub rsi, rax inc rbp cmp r12, rbp jnz short loc_96246 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_962C3: retn
unsigned long long mul_trig(long long a1, long long a2, long long a3, unsigned long long a4, unsigned long long a5) { unsigned long long result; // rax long long v10; // rbp long long v11; // rcx long long v12; // rsi signed __int128 v13; // kr00_16 unsigned __int128 v14; // kr10_16 unsigned long long v15; // rsi if ( a2 ) { v10 = 0LL; v11 = _udivti3(0LL, a3, a4, 0LL); v12 = 1LL; do { v13 = *(unsigned long long *)(a1 + 8 * v10) * (unsigned __int128)(unsigned long long)v12; v15 = a3 * v12 - a4 * (((unsigned long long)v12 * (unsigned __int128)(unsigned long long)v11) >> 64); result = 0LL; if ( v15 >= a4 ) result = a4; v14 = v13 - (2 * a4 + a4 * ((a5 * (unsigned __int128)(unsigned long long)(v13 >> 61)) >> 64)); *(_QWORD *)(a1 + 8 * v10) = v14 + (a4 & (*((long long *)&v14 + 1) >> 1)) + (a4 & ((v14 + (a4 & (*((long long *)&v14 + 1) >> 1))) >> 64)); v12 = v15 - result; ++v10; } while ( a2 != v10 ); } return result; }
mul_trig: TEST RSI,RSI JZ 0x001962c3 PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV R13,RDI XOR EBP,EBP XOR EDI,EDI MOV RSI,RDX MOV RDX,RCX XOR ECX,ECX CALL 0x0019c620 MOV RCX,RAX LEA R9,[R14 + R14*0x1] MOV ESI,0x1 LAB_00196246: MOV RAX,RSI MUL qword ptr [R13 + RBP*0x8] MOV R8,RAX MOV RDI,RDX MOV RAX,RDX SHLD RAX,R8,0x3 MUL RBX MOV RAX,RDX MUL R14 ADD RAX,R9 ADC RDX,0x0 SUB R8,RAX SBB RDI,RDX MOV RAX,RDI SAR RAX,0x1 AND RAX,R14 ADD RAX,R8 ADC RDI,0x0 AND RDI,R14 ADD RDI,RAX MOV RAX,RCX MUL RSI IMUL RSI,R15 IMUL RDX,R14 SUB RSI,RDX CMP RSI,R14 MOV EAX,0x0 CMOVNC RAX,R14 MOV qword ptr [R13 + RBP*0x8],RDI SUB RSI,RAX INC RBP CMP R12,RBP JNZ 0x00196246 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_001962c3: RET
void mul_trig(long param_1,long param_2,long param_3,ulong param_4,ulong param_5) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; int1 auVar10 [16]; ulong uVar11; ulong uVar12; long lVar13; ulong uVar14; if (param_2 != 0) { lVar13 = 0; uVar11 = __udivti3(0,param_3,param_4,0); auVar9._8_8_ = 0; auVar9._0_8_ = param_4 * 2; uVar14 = 1; do { auVar1._8_8_ = 0; auVar1._0_8_ = uVar14; auVar5._8_8_ = 0; auVar5._0_8_ = *(ulong *)(param_1 + lVar13 * 8); auVar1 = auVar1 * auVar5; auVar2._8_8_ = 0; auVar2._0_8_ = auVar1._8_8_ << 3 | auVar1._0_8_ >> 0x3d; auVar6._8_8_ = 0; auVar6._0_8_ = param_5; auVar3._8_8_ = 0; auVar3._0_8_ = SUB168(auVar2 * auVar6,8); auVar7._8_8_ = 0; auVar7._0_8_ = param_4; auVar1 = auVar1 - (auVar3 * auVar7 + auVar9); auVar10._8_8_ = 0; auVar10._0_8_ = auVar1._8_8_ >> 1 & param_4; auVar1 = auVar1 + auVar10; auVar4._8_8_ = 0; auVar4._0_8_ = uVar11; auVar8._8_8_ = 0; auVar8._0_8_ = uVar14; uVar14 = uVar14 * param_3 - SUB168(auVar4 * auVar8,8) * param_4; uVar12 = 0; if (param_4 <= uVar14) { uVar12 = param_4; } *(ulong *)(param_1 + lVar13 * 8) = (auVar1._8_8_ & param_4) + auVar1._0_8_; uVar14 = uVar14 - uVar12; lVar13 = lVar13 + 1; } while (param_2 != lVar13); } return; }
38,899
nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*)
ng-log[P]ng-log/src/logging.cc
void LogMessage::RecordCrashReason(internal::CrashReason* reason) { reason->filename = fatal_msg_data_exclusive.fullname_; reason->line_number = fatal_msg_data_exclusive.line_; reason->message = fatal_msg_data_exclusive.message_text_ + fatal_msg_data_exclusive.num_prefix_chars_; #ifdef HAVE_STACKTRACE // Retrieve the stack trace, omitting the logging frames that got us here. reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4); #else reason->depth = 0; #endif }
O3
cpp
nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*): pushq %rbx movq %rsi, %rbx leaq 0x252a9(%rip), %rax # 0x2fd00 movq 0x2c97a(%rip), %rcx # 0x373d8 movq %rcx, (%rsi) movl 0x2c935(%rip), %ecx # 0x3739c movl %ecx, 0x8(%rsi) movq 0x2c947(%rip), %rcx # 0x373b8 leaq 0x4(%rcx,%rax), %rax movq %rax, 0x10(%rsi) leaq 0x18(%rsi), %rdi movl $0x20, %esi movl $0x4, %edx callq 0x1ff8c movl %eax, 0x118(%rbx) popq %rbx retq nop
_ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE: push rbx mov rbx, rsi lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive mov rcx, cs:qword_373D8 mov [rsi], rcx mov ecx, cs:dword_3739C mov [rsi+8], ecx mov rcx, cs:qword_373B8; int lea rax, [rcx+rax+4] mov [rsi+10h], rax lea rdi, [rsi+18h]; this mov esi, offset qword_20; void ** mov edx, 4; int call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int) mov [rbx+118h], eax pop rbx retn
long long nglog::LogMessage::RecordCrashReason(long long a1, long long a2) { int v2; // ecx long long result; // rax *(_QWORD *)a2 = qword_373D8; *(_DWORD *)(a2 + 8) = dword_3739C; v2 = qword_373B8[0]; *(_QWORD *)(a2 + 16) = (char *)&nglog::fatal_msg_data_exclusive + *(_QWORD *)qword_373B8 + 4; result = nglog::tools::GetStackTrace((nglog::tools *)(a2 + 24), (void **)&qword_20, 4, v2); *(_DWORD *)(a2 + 280) = result; return result; }
RecordCrashReason: PUSH RBX MOV RBX,RSI LEA RAX,[0x12fd00] MOV RCX,qword ptr [0x001373d8] MOV qword ptr [RSI],RCX MOV ECX,dword ptr [0x0013739c] MOV dword ptr [RSI + 0x8],ECX MOV RCX,qword ptr [0x001373b8] LEA RAX,[RCX + RAX*0x1 + 0x4] MOV qword ptr [RSI + 0x10],RAX LEA RDI,[RSI + 0x18] MOV ESI,0x20 MOV EDX,0x4 CALL 0x0011ff8c MOV dword ptr [RBX + 0x118],EAX POP RBX RET
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */ void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1) { int4 uVar1; *(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_; *(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_; *(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x12fd04; uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4); *(int4 *)(param_1 + 0x118) = uVar1; return; }