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
39,900
int OpenSubdiv::v3_6_0::Bfr::Parameterization::convertCoordToSubFace<float>(bool, float const*, float*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/parameterization.h
inline bool Parameterization::HasSubFaces() const { return (_type == QUAD_SUBFACES); }
O2
c
int OpenSubdiv::v3_6_0::Bfr::Parameterization::convertCoordToSubFace<float>(bool, float const*, float*) const: cmpb $0x2, (%rdi) jne 0x9a2d3 movzbl 0x1(%rdi), %edi movl %edx, %eax cltd idivl %edi cvtsi2ss %edx, %xmm3 movss (%rcx), %xmm1 cvtsi2ss %eax, %xmm0 testb %sil, %sil je 0x9a2bb movss 0x25e0d(%rip), %xmm2 # 0xc00b0 mulss %xmm2, %xmm1 addss %xmm3, %xmm1 movss %xmm1, (%r8) mulss 0x4(%rcx), %xmm2 addss %xmm0, %xmm2 jmp 0x9a2cc addss %xmm3, %xmm1 movss %xmm1, (%r8) addss 0x4(%rcx), %xmm0 movaps %xmm0, %xmm2 movss %xmm2, 0x4(%r8) retq pushq %rax leaq 0x2f1fd(%rip), %rdi # 0xc94d8 leaq 0x2f204(%rip), %rsi # 0xc94e6 leaq 0x2f2d5(%rip), %rcx # 0xc95be movl $0xb9, %edx callq 0x512a0 nop
_ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization21convertSubFaceToCoordIfEEvbiPKT_PS4_: cmp byte ptr [rdi], 2 jnz short loc_9A2D3 movzx edi, byte ptr [rdi+1] mov eax, edx cdq idiv edi cvtsi2ss xmm3, edx movss xmm1, dword ptr [rcx] cvtsi2ss xmm0, eax test sil, sil jz short loc_9A2BB movss xmm2, cs:dword_C00B0 mulss xmm1, xmm2 addss xmm1, xmm3 movss dword ptr [r8], xmm1 mulss xmm2, dword ptr [rcx+4] addss xmm2, xmm0 jmp short loc_9A2CC loc_9A2BB: addss xmm1, xmm3 movss dword ptr [r8], xmm1 addss xmm0, dword ptr [rcx+4] movaps xmm2, xmm0 loc_9A2CC: movss dword ptr [r8+4], xmm2 retn loc_9A2D3: push rax lea rdi, aHassubfaces; "HasSubFaces()" lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_118; "void OpenSubdiv::v3_6_0::Bfr::Parameter"... mov edx, 0B9h call ___assert_fail
long long OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord<float>( _BYTE *a1, char a2, int a3, float *a4, float *a5) { int v5; // edi long long result; // rax float v7; // xmm3_4 float v8; // xmm1_4 float v9; // xmm0_4 float v10; // xmm2_4 if ( *a1 != 2 ) __assert_fail( "HasSubFaces()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp", 185LL, "void OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord(bool, int, const REAL *, REAL *) const [REAL = float]"); v5 = (unsigned __int8)a1[1]; result = (unsigned int)(a3 / v5); v7 = (float)(a3 % v5); v8 = *a4; v9 = (float)(int)result; if ( a2 ) { *a5 = (float)(v8 * 0.5) + v7; v10 = (float)(0.5 * a4[1]) + v9; } else { *a5 = v8 + v7; v10 = v9 + a4[1]; } a5[1] = v10; return result; }
convertSubFaceToCoord<float>: CMP byte ptr [RDI],0x2 JNZ 0x0019a2d3 MOVZX EDI,byte ptr [RDI + 0x1] MOV EAX,EDX CDQ IDIV EDI CVTSI2SS XMM3,EDX MOVSS XMM1,dword ptr [RCX] CVTSI2SS XMM0,EAX TEST SIL,SIL JZ 0x0019a2bb MOVSS XMM2,dword ptr [0x001c00b0] MULSS XMM1,XMM2 ADDSS XMM1,XMM3 MOVSS dword ptr [R8],XMM1 MULSS XMM2,dword ptr [RCX + 0x4] ADDSS XMM2,XMM0 JMP 0x0019a2cc LAB_0019a2bb: ADDSS XMM1,XMM3 MOVSS dword ptr [R8],XMM1 ADDSS XMM0,dword ptr [RCX + 0x4] MOVAPS XMM2,XMM0 LAB_0019a2cc: MOVSS dword ptr [R8 + 0x4],XMM2 RET LAB_0019a2d3: PUSH RAX LEA RDI,[0x1c94d8] LEA RSI,[0x1c94e6] LEA RCX,[0x1c95be] MOV EDX,0xb9 CALL 0x001512a0
/* void OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord<float>(bool, int, float const*, float*) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord<float> (Parameterization *this,bool param_1,int param_2,float *param_3,float *param_4) { Parameterization PVar1; float fVar2; float fVar3; fVar2 = DAT_001c00b0; if (*this == (Parameterization)0x2) { PVar1 = this[1]; fVar3 = (float)(param_2 % (int)(uint)(byte)PVar1); if (param_1) { *param_4 = *param_3 * DAT_001c00b0 + fVar3; fVar2 = fVar2 * param_3[1]; } else { *param_4 = *param_3 + fVar3; fVar2 = param_3[1]; } param_4[1] = fVar2 + (float)(param_2 / (int)(uint)(byte)PVar1); return; } /* WARNING: Subroutine does not return */ __assert_fail("HasSubFaces()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp" ,0xb9, "void OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord(bool, int, const REAL *, REAL *) const [REAL = float]" ); }
39,901
int OpenSubdiv::v3_6_0::Bfr::Parameterization::convertCoordToSubFace<float>(bool, float const*, float*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/parameterization.h
inline bool Parameterization::HasSubFaces() const { return (_type == QUAD_SUBFACES); }
O3
c
int OpenSubdiv::v3_6_0::Bfr::Parameterization::convertCoordToSubFace<float>(bool, float const*, float*) const: cmpb $0x2, (%rdi) jne 0x8e3e3 movzbl 0x1(%rdi), %edi movl %edx, %eax cltd idivl %edi cvtsi2ss %edx, %xmm3 movss (%rcx), %xmm1 cvtsi2ss %eax, %xmm0 testb %sil, %sil je 0x8e3cb movss 0x2b06d(%rip), %xmm2 # 0xb9420 mulss %xmm2, %xmm1 addss %xmm3, %xmm1 movss %xmm1, (%r8) mulss 0x4(%rcx), %xmm2 addss %xmm0, %xmm2 jmp 0x8e3dc addss %xmm3, %xmm1 movss %xmm1, (%r8) addss 0x4(%rcx), %xmm0 movaps %xmm0, %xmm2 movss %xmm2, 0x4(%r8) retq pushq %rax leaq 0x3403d(%rip), %rdi # 0xc2428 leaq 0x34044(%rip), %rsi # 0xc2436 leaq 0x34115(%rip), %rcx # 0xc250e movl $0xb9, %edx callq 0x39540 nop
_ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization21convertSubFaceToCoordIfEEvbiPKT_PS4_: cmp byte ptr [rdi], 2 jnz short loc_8E3E3 movzx edi, byte ptr [rdi+1] mov eax, edx cdq idiv edi cvtsi2ss xmm3, edx movss xmm1, dword ptr [rcx] cvtsi2ss xmm0, eax test sil, sil jz short loc_8E3CB movss xmm2, cs:dword_B9420 mulss xmm1, xmm2 addss xmm1, xmm3 movss dword ptr [r8], xmm1 mulss xmm2, dword ptr [rcx+4] addss xmm2, xmm0 jmp short loc_8E3DC loc_8E3CB: addss xmm1, xmm3 movss dword ptr [r8], xmm1 addss xmm0, dword ptr [rcx+4] movaps xmm2, xmm0 loc_8E3DC: movss dword ptr [r8+4], xmm2 retn loc_8E3E3: push rax lea rdi, aHassubfaces; "HasSubFaces()" lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_116; "void OpenSubdiv::v3_6_0::Bfr::Parameter"... mov edx, 0B9h call ___assert_fail
long long OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord<float>( _BYTE *a1, char a2, int a3, float *a4, float *a5) { int v5; // edi long long result; // rax float v7; // xmm3_4 float v8; // xmm1_4 float v9; // xmm0_4 float v10; // xmm2_4 if ( *a1 != 2 ) __assert_fail( "HasSubFaces()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp", 185LL, "void OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord(bool, int, const REAL *, REAL *) const [REAL = float]"); v5 = (unsigned __int8)a1[1]; result = (unsigned int)(a3 / v5); v7 = (float)(a3 % v5); v8 = *a4; v9 = (float)(int)result; if ( a2 ) { *a5 = (float)(v8 * 0.5) + v7; v10 = (float)(0.5 * a4[1]) + v9; } else { *a5 = v8 + v7; v10 = v9 + a4[1]; } a5[1] = v10; return result; }
convertSubFaceToCoord<float>: CMP byte ptr [RDI],0x2 JNZ 0x0018e3e3 MOVZX EDI,byte ptr [RDI + 0x1] MOV EAX,EDX CDQ IDIV EDI CVTSI2SS XMM3,EDX MOVSS XMM1,dword ptr [RCX] CVTSI2SS XMM0,EAX TEST SIL,SIL JZ 0x0018e3cb MOVSS XMM2,dword ptr [0x001b9420] MULSS XMM1,XMM2 ADDSS XMM1,XMM3 MOVSS dword ptr [R8],XMM1 MULSS XMM2,dword ptr [RCX + 0x4] ADDSS XMM2,XMM0 JMP 0x0018e3dc LAB_0018e3cb: ADDSS XMM1,XMM3 MOVSS dword ptr [R8],XMM1 ADDSS XMM0,dword ptr [RCX + 0x4] MOVAPS XMM2,XMM0 LAB_0018e3dc: MOVSS dword ptr [R8 + 0x4],XMM2 RET LAB_0018e3e3: PUSH RAX LEA RDI,[0x1c2428] LEA RSI,[0x1c2436] LEA RCX,[0x1c250e] MOV EDX,0xb9 CALL 0x00139540
/* void OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord<float>(bool, int, float const*, float*) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord<float> (Parameterization *this,bool param_1,int param_2,float *param_3,float *param_4) { Parameterization PVar1; float fVar2; float fVar3; fVar2 = DAT_001b9420; if (*this == (Parameterization)0x2) { PVar1 = this[1]; fVar3 = (float)(param_2 % (int)(uint)(byte)PVar1); if (param_1) { *param_4 = *param_3 * DAT_001b9420 + fVar3; fVar2 = fVar2 * param_3[1]; } else { *param_4 = *param_3 + fVar3; fVar2 = param_3[1]; } param_4[1] = fVar2 + (float)(param_2 / (int)(uint)(byte)PVar1); return; } /* WARNING: Subroutine does not return */ __assert_fail("HasSubFaces()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/parameterization.cpp" ,0xb9, "void OpenSubdiv::v3_6_0::Bfr::Parameterization::convertSubFaceToCoord(bool, int, const REAL *, REAL *) const [REAL = float]" ); }
39,902
void fmt::v10::detail::bigint::assign<unsigned long, 0>(unsigned long)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 void assign(UInt n) { size_t num_bigits = 0; do { bigits_[num_bigits++] = static_cast<bigit>(n); n >>= bigit_bits; } while (n != 0); bigits_.resize(num_bigits); exp_ = 0; }
O0
c
void fmt::v10::detail::bigint::assign<unsigned long, 0>(unsigned long): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq 0x8(%rsp), %rdi movq 0x18(%rsp), %rax movl %eax, 0x4(%rsp) movq 0x10(%rsp), %rsi movq %rsi, %rax addq $0x1, %rax movq %rax, 0x10(%rsp) callq 0xb6210 movl 0x4(%rsp), %ecx movl %ecx, (%rax) movq 0x18(%rsp), %rax shrq $0x20, %rax movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0xb6371 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0xb6230 movq 0x8(%rsp), %rax movl $0x0, 0xa0(%rax) addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov [rsp+28h+var_18], 0 loc_B6371: mov rdi, [rsp+28h+var_20] mov rax, [rsp+28h+var_10] mov [rsp+28h+var_24], eax mov rsi, [rsp+28h+var_18] mov rax, rsi add rax, 1 mov [rsp+28h+var_18], rax call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong) mov ecx, [rsp+28h+var_24] mov [rax], ecx mov rax, [rsp+28h+var_10] shr rax, 20h mov [rsp+28h+var_10], rax cmp [rsp+28h+var_10], 0 jnz short loc_B6371 mov rdi, [rsp+28h+var_20] mov rsi, [rsp+28h+var_18] call _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEE6resizeEm; fmt::v10::basic_memory_buffer<uint,32ul,std::allocator<uint>>::resize(ulong) mov rax, [rsp+28h+var_20] mov dword ptr [rax+0A0h], 0 add rsp, 28h retn
long long ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_( long long a1, unsigned long long a2) { long long v2; // rsi long long result; // rax long long v4; // [rsp+10h] [rbp-18h] v4 = 0LL; do { v2 = v4++; *(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v2) = a2; a2 >>= 32; } while ( a2 ); fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::resize(a1, v4); result = a1; *(_DWORD *)(a1 + 160) = 0; return result; }
_ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 LAB_001b6371: MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x4],EAX MOV RSI,qword ptr [RSP + 0x10] MOV RAX,RSI ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX CALL 0x001b6210 MOV ECX,dword ptr [RSP + 0x4] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] SHR RAX,0x20 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001b6371 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001b6230 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0xa0],0x0 ADD RSP,0x28 RET
void _ZN3fmt3v106detail6bigint6assignImTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_ (buffer<unsigned_int> *param_1,ulong param_2) { ulong uVar1; uint *puVar2; ulong local_18; ulong local_10; local_18 = 0; local_10 = param_2; do { uVar1 = local_18 + 1; puVar2 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_18); *puVar2 = (uint)local_10; local_10 = local_10 >> 0x20; local_18 = uVar1; } while (local_10 != 0); fmt::v10::basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::resize ((basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *)param_1,uVar1); *(int4 *)(param_1 + 0xa0) = 0; return; }
39,903
void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>, fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0)::'lambda'(char const*, char const*)::operator()(char const*, char const*) const
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR void for_each_codepoint(string_view s, F f) { auto decode = [f](const char* buf_ptr, const char* ptr) { auto cp = uint32_t(); auto error = 0; auto end = utf8_decode(buf_ptr, &cp, &error); bool result = f(error ? invalid_code_point : cp, string_view(ptr, error ? 1 : to_unsigned(end - buf_ptr))); return result ? (error ? buf_ptr + 1 : end) : nullptr; }; auto p = s.data(); const size_t block_size = 4; // utf8_decode always reads blocks of 4 chars. if (s.size() >= block_size) { for (auto end = p + s.size() - block_size + 1; p < end;) { p = decode(p, p); if (!p) return; } } if (auto num_chars_left = s.data() + s.size() - p) { char buf[2 * block_size - 1] = {}; copy_str<char>(p, p + num_chars_left, buf); const char* buf_ptr = buf; do { auto end = decode(buf_ptr, p); if (!end) return; p += end - buf_ptr; buf_ptr = end; } while (buf_ptr - buf < num_chars_left); } }
O3
c
void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>, fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0)::'lambda'(char const*, char const*)::operator()(char const*, char const*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x8(%rsp) movq %rdi, %r14 cmpq $0x4, %rsi jb 0x4d763 leaq (%rbx,%rsi), %rax addq $-0x3, %rax movq %rax, 0x30(%rsp) movq %rbx, %r14 movq %rsi, 0x28(%rsp) cmpq 0x30(%rsp), %r14 jae 0x4d763 movq %rbx, %rbp movzbl (%r14), %r8d movl %r8d, %edi shrl $0x3, %edi leaq 0x376a4(%rip), %rax # 0x84cf2 movsbq (%rdi,%rax), %r12 leaq 0x37316(%rip), %rax # 0x84970 movl (%rax,%r12,4), %r15d movzbl 0x1(%r14), %edx movzbl 0x2(%r14), %r9d movzbl 0x3(%r14), %r10d leaq 0x3733c(%rip), %rax # 0x849b0 movl (%rax,%r12,4), %ecx leaq 0x37311(%rip), %rax # 0x84990 movl (%rax,%r12,4), %r11d leaq 0x37346(%rip), %rax # 0x849d0 movl (%rax,%r12,4), %eax movq 0x18(%rsp), %rsi movq (%rsi), %r13 testq %r13, %r13 je 0x4d6a1 leaq -0x1(%r13), %rbx jmp 0x4d6ae movq %r14, %rbx subq 0x10(%rsp), %rbx movq 0x8(%rsp), %rsi movq %rbx, (%rsi) movl %r9d, %ebx andl $0x3f, %ebx shll $0x6, %ebx movl %edx, %esi andl $0x3f, %esi shll $0xc, %esi andl %r8d, %r15d shll $0x12, %r15d orl %esi, %r15d orl %ebx, %r15d movl %r10d, %r8d andl $0x3f, %r8d orl %r15d, %r8d shrl %cl, %r8d xorl %ecx, %ecx cmpl %r11d, %r8d setb %cl shll $0x6, %ecx shrb $0x4, %r9b andb $0xc, %r9b shrb $0x2, %dl andb $0x30, %dl orb %r9b, %dl shrb $0x6, %r10b orb %dl, %r10b movzbl %r10b, %edx orl %ecx, %edx xorl %ecx, %ecx cmpl $0x110000, %r8d # imm = 0x110000 setae %cl shll $0x8, %ecx orl %edx, %ecx andl $0x7ffff800, %r8d # imm = 0x7FFFF800 xorl %edx, %edx cmpl $0xd800, %r8d # imm = 0xD800 sete %dl shll $0x7, %edx orl %ecx, %edx xorl $0x2a, %edx movl %eax, %ecx shrl %cl, %edx movl $0x80ff0000, %eax # imm = 0x80FF0000 btl %edi, %eax adcq %r14, %r12 testl %edx, %edx je 0x4d74a incq %r14 movq %r14, %r12 movq %r12, %r14 testq %r13, %r13 movq %rbp, %rbx movq 0x28(%rsp), %rsi jne 0x4d62f jmp 0x4d8b9 addq %rsi, %rbx subq %r14, %rbx je 0x4d8b9 xorl %eax, %eax leaq 0x20(%rsp), %r15 movl %eax, 0x3(%r15) movl %eax, (%r15) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x110c0 movq 0x18(%rsp), %rbp movq (%rbp), %rdx decq %rdx leaq 0x371d2(%rip), %r12 # 0x84970 cmpq $-0x1, %rdx je 0x4d8ac movzbl (%r15), %r11d movl %r11d, %esi shrl $0x3, %esi leaq 0x37539(%rip), %rax # 0x84cf2 movsbq (%rsi,%rax), %r13 leaq 0x3720b(%rip), %rax # 0x849d0 movb (%rax,%r13,4), %al leaq 0x371e0(%rip), %rcx # 0x849b0 movb (%rcx,%r13,4), %cl movzbl 0x3(%r15), %r10d movzbl 0x2(%r15), %r8d movzbl 0x1(%r15), %r9d movq %rdx, (%rbp) movl %r9d, %edi andl $0x3f, %edi shll $0xc, %edi andl (%r12,%r13,4), %r11d shll $0x12, %r11d orl %edi, %r11d movl %r8d, %edi andl $0x3f, %edi shll $0x6, %edi orl %edi, %r11d movl %r10d, %edi andl $0x3f, %edi orl %r11d, %edi shrl %cl, %edi xorl %ecx, %ecx leaq 0x37175(%rip), %r11 # 0x84990 cmpl (%r11,%r13,4), %edi setb %cl shrl $0x6, %r8d shrl $0x2, %r9d andl $-0x10, %r9d leal (%r9,%r8,4), %r8d shrl $0x6, %r10d orl %r8d, %r10d shll $0x6, %ecx orl %ecx, %r10d xorl %ecx, %ecx cmpl $0x110000, %edi # imm = 0x110000 setae %cl shll $0x8, %ecx orl %r10d, %ecx andl $0x7ffff800, %edi # imm = 0x7FFFF800 xorl %r8d, %r8d cmpl $0xd800, %edi # imm = 0xD800 sete %r8b shll $0x7, %r8d orl %ecx, %r8d xorl $0x2a, %r8d movl %eax, %ecx shrl %cl, %r8d movl $0x80ff0000, %eax # imm = 0x80FF0000 btl %esi, %eax adcq %r15, %r13 testl %r8d, %r8d je 0x4d887 leaq 0x1(%r15), %r13 movq %r13, %rax subq %r15, %rax addq %rax, %r14 movq %r13, %rax leaq 0x20(%rsp), %rcx subq %rcx, %rax decq %rdx movq %r13, %r15 cmpq %rbx, %rax jl 0x4d79e jmp 0x4d8b9 subq 0x10(%rsp), %r14 movq 0x8(%rsp), %rax movq %r14, (%rax) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN3fmt3v106detail18for_each_codepointIZNS1_16code_point_indexENS0_17basic_string_viewIcEEmEUljS4_E_EEvS4_T_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi mov rax, [rsp+68h+arg_0] mov [rsp+68h+var_58], rax mov rax, [rsp+68h+arg_8] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+arg_10] mov [rsp+68h+var_60], rax mov r14, rdi cmp rsi, 4 jb loc_4D763 lea rax, [rbx+rsi] add rax, 0FFFFFFFFFFFFFFFDh mov [rsp+68h+var_38], rax mov r14, rbx mov [rsp+68h+var_40], rsi loc_4D62F: cmp r14, [rsp+68h+var_38] jnb loc_4D763 mov rbp, rbx movzx r8d, byte ptr [r14] mov edi, r8d shr edi, 3 lea rax, byte_84CF2 movsx r12, byte ptr [rdi+rax] lea rax, dword_84970 mov r15d, [rax+r12*4] movzx edx, byte ptr [r14+1] movzx r9d, byte ptr [r14+2] movzx r10d, byte ptr [r14+3] lea rax, byte_849B0 mov ecx, [rax+r12*4] lea rax, dword_84990 mov r11d, [rax+r12*4] lea rax, byte_849D0 mov eax, [rax+r12*4] mov rsi, [rsp+68h+var_50] mov r13, [rsi] test r13, r13 jz short loc_4D6A1 lea rbx, [r13-1] jmp short loc_4D6AE loc_4D6A1: mov rbx, r14 sub rbx, [rsp+68h+var_58] mov rsi, [rsp+68h+var_60] loc_4D6AE: mov [rsi], rbx mov ebx, r9d and ebx, 3Fh shl ebx, 6 mov esi, edx and esi, 3Fh shl esi, 0Ch and r15d, r8d shl r15d, 12h or r15d, esi or r15d, ebx mov r8d, r10d and r8d, 3Fh or r8d, r15d shr r8d, cl xor ecx, ecx cmp r8d, r11d setb cl shl ecx, 6 shr r9b, 4 and r9b, 0Ch shr dl, 2 and dl, 30h or dl, r9b shr r10b, 6 or r10b, dl movzx edx, r10b or edx, ecx xor ecx, ecx cmp r8d, 110000h setnb cl shl ecx, 8 or ecx, edx and r8d, 7FFFF800h xor edx, edx cmp r8d, 0D800h setz dl shl edx, 7 or edx, ecx xor edx, 2Ah mov ecx, eax shr edx, cl mov eax, 80FF0000h bt eax, edi adc r12, r14 test edx, edx jz short loc_4D74A inc r14 mov r12, r14 loc_4D74A: mov r14, r12 test r13, r13 mov rbx, rbp mov rsi, [rsp+68h+var_40] jnz loc_4D62F jmp loc_4D8B9 loc_4D763: add rbx, rsi sub rbx, r14 jz loc_4D8B9 xor eax, eax lea r15, [rsp+68h+var_48] mov [r15+3], eax mov [r15], eax mov rdi, r15 mov rsi, r14 mov rdx, rbx call _memcpy mov rbp, [rsp+68h+var_50] mov rdx, [rbp+0] dec rdx lea r12, dword_84970 loc_4D79E: cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_4D8AC movzx r11d, byte ptr [r15] mov esi, r11d shr esi, 3 lea rax, byte_84CF2 movsx r13, byte ptr [rsi+rax] lea rax, byte_849D0 mov al, [rax+r13*4] lea rcx, byte_849B0 mov cl, [rcx+r13*4] movzx r10d, byte ptr [r15+3] movzx r8d, byte ptr [r15+2] movzx r9d, byte ptr [r15+1] mov [rbp+0], rdx mov edi, r9d and edi, 3Fh shl edi, 0Ch and r11d, [r12+r13*4] shl r11d, 12h or r11d, edi mov edi, r8d and edi, 3Fh shl edi, 6 or r11d, edi mov edi, r10d and edi, 3Fh or edi, r11d shr edi, cl xor ecx, ecx lea r11, dword_84990 cmp edi, [r11+r13*4] setb cl shr r8d, 6 shr r9d, 2 and r9d, 0FFFFFFF0h lea r8d, [r9+r8*4] shr r10d, 6 or r10d, r8d shl ecx, 6 or r10d, ecx xor ecx, ecx cmp edi, 110000h setnb cl shl ecx, 8 or ecx, r10d and edi, 7FFFF800h xor r8d, r8d cmp edi, 0D800h setz r8b shl r8d, 7 or r8d, ecx xor r8d, 2Ah mov ecx, eax shr r8d, cl mov eax, 80FF0000h bt eax, esi adc r13, r15 test r8d, r8d jz short loc_4D887 lea r13, [r15+1] loc_4D887: mov rax, r13 sub rax, r15 add r14, rax mov rax, r13 lea rcx, [rsp+68h+var_48] sub rax, rcx dec rdx mov r15, r13 cmp rax, rbx jl loc_4D79E jmp short loc_4D8B9 loc_4D8AC: sub r14, [rsp+68h+var_58] mov rax, [rsp+68h+var_60] mov [rax], r14 loc_4D8B9: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned long)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>( unsigned __int8 *a1, unsigned long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long *a8, _QWORD *a9) { unsigned __int8 *v9; // rbx long long result; // rax unsigned __int8 *v11; // r14 unsigned __int8 *v12; // rbp unsigned int v13; // r8d long long v14; // rdi long long v15; // r12 int v16; // r15d unsigned __int8 v17; // dl unsigned __int8 v18; // r9 unsigned __int8 v19; // r10 int v20; // ecx unsigned int v21; // r11d int v22; // eax _QWORD *v23; // rsi long long v24; // r13 unsigned __int8 *v25; // rbx unsigned int v26; // r8d unsigned int v27; // edx unsigned __int8 *v28; // r12 signed long long v29; // rbx unsigned __int8 *v30; // r15 long long i; // rdx unsigned int v32; // r11d long long v33; // rsi long long v34; // r13 char v35; // al char v36; // cl unsigned int v37; // r10d unsigned int v38; // r8d unsigned int v39; // r9d unsigned int v40; // edi unsigned int v41; // r8d int v42; // eax unsigned __int8 *v43; // r13 _DWORD v44[2]; // [rsp+20h] [rbp-48h] BYREF unsigned long long v45; // [rsp+28h] [rbp-40h] unsigned long long v46; // [rsp+30h] [rbp-38h] v9 = a1; result = (long long)a9; v11 = a1; if ( a2 >= 4 ) { result = (long long)&a1[a2 - 3]; v46 = result; v11 = a1; v45 = a2; while ( (unsigned long long)v11 < v46 ) { v12 = v9; v13 = *v11; v14 = v13 >> 3; v15 = byte_84CF2[v14]; v16 = dword_84970[v15]; v17 = v11[1]; v18 = v11[2]; v19 = v11[3]; v20 = *(_DWORD *)&byte_849B0[4 * v15]; v21 = dword_84990[v15]; v22 = *(_DWORD *)&byte_849D0[4 * v15]; v23 = a8; v24 = *a8; if ( *a8 ) { v25 = (unsigned __int8 *)(v24 - 1); } else { v25 = &v11[-a7]; v23 = a9; } *v23 = v25; v26 = (((v18 & 0x3F) << 6) | ((v17 & 0x3F) << 12) | ((v13 & v16) << 18) | v19 & 0x3F) >> v20; v27 = ((((v26 < v21) << 6) | (v18 >> 4) & 0xC | (v17 >> 2) & 0x30 | (v19 >> 6) | ((v26 >= 0x110000) << 8) | (((v26 & 0x7FFFF800) == 55296) << 7)) ^ 0x2Au) >> v22; result = 2164195328LL; v28 = &v11[_bittest((const int *)&result, v14) + v15]; if ( v27 ) v28 = v11 + 1; v11 = v28; v9 = v12; a2 = v45; if ( !v24 ) return result; } } v29 = &v9[a2] - v11; if ( v29 ) { v30 = (unsigned __int8 *)v44; *(_DWORD *)((char *)v44 + 3) = 0; v44[0] = 0; memcpy(v44); for ( i = *a8 - 1; i != -1; --i ) { v32 = *v30; v33 = v32 >> 3; v34 = byte_84CF2[v33]; v35 = byte_849D0[4 * v34]; v36 = byte_849B0[4 * v34]; v37 = v30[3]; v38 = v30[2]; v39 = v30[1]; *a8 = i; v40 = (((v38 & 0x3F) << 6) | ((v39 & 0x3F) << 12) | ((dword_84970[v34] & v32) << 18) | v37 & 0x3F) >> v36; v41 = ((((v40 < dword_84990[v34]) << 6) | (((v39 >> 2) & 0xFFFFFFF0) + 4 * (v38 >> 6)) | (v37 >> 6) | ((v40 >= 0x110000) << 8) | (((v40 & 0x7FFFF800) == 55296) << 7)) ^ 0x2A) >> v35; v42 = -2130771968; v43 = &v30[_bittest(&v42, v33) + v34]; if ( v41 ) v43 = v30 + 1; v11 += v43 - v30; result = v43 - (unsigned __int8 *)v44; v30 = v43; if ( v43 - (unsigned __int8 *)v44 >= v29 ) return result; } result = (long long)a9; *a9 = &v11[-a7]; } return result; }
for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned_long)::{lambda(unsigned_int,fmt::v10::basic_string_view<char>)#1}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x8],RAX MOV R14,RDI CMP RSI,0x4 JC 0x0014d763 LEA RAX,[RBX + RSI*0x1] ADD RAX,-0x3 MOV qword ptr [RSP + 0x30],RAX MOV R14,RBX MOV qword ptr [RSP + 0x28],RSI LAB_0014d62f: CMP R14,qword ptr [RSP + 0x30] JNC 0x0014d763 MOV RBP,RBX MOVZX R8D,byte ptr [R14] MOV EDI,R8D SHR EDI,0x3 LEA RAX,[0x184cf2] MOVSX R12,byte ptr [RDI + RAX*0x1] LEA RAX,[0x184970] MOV R15D,dword ptr [RAX + R12*0x4] MOVZX EDX,byte ptr [R14 + 0x1] MOVZX R9D,byte ptr [R14 + 0x2] MOVZX R10D,byte ptr [R14 + 0x3] LEA RAX,[0x1849b0] MOV ECX,dword ptr [RAX + R12*0x4] LEA RAX,[0x184990] MOV R11D,dword ptr [RAX + R12*0x4] LEA RAX,[0x1849d0] MOV EAX,dword ptr [RAX + R12*0x4] MOV RSI,qword ptr [RSP + 0x18] MOV R13,qword ptr [RSI] TEST R13,R13 JZ 0x0014d6a1 LEA RBX,[R13 + -0x1] JMP 0x0014d6ae LAB_0014d6a1: MOV RBX,R14 SUB RBX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] LAB_0014d6ae: MOV qword ptr [RSI],RBX MOV EBX,R9D AND EBX,0x3f SHL EBX,0x6 MOV ESI,EDX AND ESI,0x3f SHL ESI,0xc AND R15D,R8D SHL R15D,0x12 OR R15D,ESI OR R15D,EBX MOV R8D,R10D AND R8D,0x3f OR R8D,R15D SHR R8D,CL XOR ECX,ECX CMP R8D,R11D SETC CL SHL ECX,0x6 SHR R9B,0x4 AND R9B,0xc SHR DL,0x2 AND DL,0x30 OR DL,R9B SHR R10B,0x6 OR R10B,DL MOVZX EDX,R10B OR EDX,ECX XOR ECX,ECX CMP R8D,0x110000 SETNC CL SHL ECX,0x8 OR ECX,EDX AND R8D,0x7ffff800 XOR EDX,EDX CMP R8D,0xd800 SETZ DL SHL EDX,0x7 OR EDX,ECX XOR EDX,0x2a MOV ECX,EAX SHR EDX,CL MOV EAX,0x80ff0000 BT EAX,EDI ADC R12,R14 TEST EDX,EDX JZ 0x0014d74a INC R14 MOV R12,R14 LAB_0014d74a: MOV R14,R12 TEST R13,R13 MOV RBX,RBP MOV RSI,qword ptr [RSP + 0x28] JNZ 0x0014d62f JMP 0x0014d8b9 LAB_0014d763: ADD RBX,RSI SUB RBX,R14 JZ 0x0014d8b9 XOR EAX,EAX LEA R15,[RSP + 0x20] MOV dword ptr [R15 + 0x3],EAX MOV dword ptr [R15],EAX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x001110c0 MOV RBP,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RBP] DEC RDX LEA R12,[0x184970] LAB_0014d79e: CMP RDX,-0x1 JZ 0x0014d8ac MOVZX R11D,byte ptr [R15] MOV ESI,R11D SHR ESI,0x3 LEA RAX,[0x184cf2] MOVSX R13,byte ptr [RSI + RAX*0x1] LEA RAX,[0x1849d0] MOV AL,byte ptr [RAX + R13*0x4] LEA RCX,[0x1849b0] MOV CL,byte ptr [RCX + R13*0x4] MOVZX R10D,byte ptr [R15 + 0x3] MOVZX R8D,byte ptr [R15 + 0x2] MOVZX R9D,byte ptr [R15 + 0x1] MOV qword ptr [RBP],RDX MOV EDI,R9D AND EDI,0x3f SHL EDI,0xc AND R11D,dword ptr [R12 + R13*0x4] SHL R11D,0x12 OR R11D,EDI MOV EDI,R8D AND EDI,0x3f SHL EDI,0x6 OR R11D,EDI MOV EDI,R10D AND EDI,0x3f OR EDI,R11D SHR EDI,CL XOR ECX,ECX LEA R11,[0x184990] CMP EDI,dword ptr [R11 + R13*0x4] SETC CL SHR R8D,0x6 SHR R9D,0x2 AND R9D,0xfffffff0 LEA R8D,[R9 + R8*0x4] SHR R10D,0x6 OR R10D,R8D SHL ECX,0x6 OR R10D,ECX XOR ECX,ECX CMP EDI,0x110000 SETNC CL SHL ECX,0x8 OR ECX,R10D AND EDI,0x7ffff800 XOR R8D,R8D CMP EDI,0xd800 SETZ R8B SHL R8D,0x7 OR R8D,ECX XOR R8D,0x2a MOV ECX,EAX SHR R8D,CL MOV EAX,0x80ff0000 BT EAX,ESI ADC R13,R15 TEST R8D,R8D JZ 0x0014d887 LEA R13,[R15 + 0x1] LAB_0014d887: MOV RAX,R13 SUB RAX,R15 ADD R14,RAX MOV RAX,R13 LEA RCX,[RSP + 0x20] SUB RAX,RCX DEC RDX MOV R15,R13 CMP RAX,RBX JL 0x0014d79e JMP 0x0014d8b9 LAB_0014d8ac: SUB R14,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],R14 LAB_0014d8b9: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::{lambda(unsigned int, fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>, fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::{lambda(unsigned int, fmt::v10::basic_string_view<char>)#1}) */ void fmt::v10::detail:: for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>,unsigned_long)::_lambda(unsigned_int,fmt::v10::basic_string_view<char>)_1_> (byte *param_1,ulong param_2) { byte bVar1; byte bVar2; byte bVar3; byte bVar4; byte bVar5; byte bVar6; int4 uVar7; int4 uVar8; long lVar9; long lVar10; long *plVar11; uint uVar12; uint uVar13; uint uVar14; long lVar15; byte *pbVar16; byte *pbVar17; byte *__src; long in_stack_00000008; long *in_stack_00000010; long *in_stack_00000018; byte local_48 [8]; ulong local_40; byte *local_38; __src = param_1; if (param_2 < 4) { LAB_0014d763: param_1 = param_1 + (param_2 - (long)__src); if (param_1 != (byte *)0x0) { local_48[4] = 0; local_48[5] = 0; local_48[6] = 0; local_48[0] = 0; local_48[1] = 0; local_48[2] = 0; local_48[3] = 0; memcpy(local_48,__src,(size_t)param_1); lVar9 = *in_stack_00000010; pbVar16 = local_48; do { lVar9 = lVar9 + -1; if (lVar9 == -1) { *in_stack_00000018 = (long)__src - in_stack_00000008; return; } bVar3 = *pbVar16; uVar14 = (uint)(bVar3 >> 3); lVar15 = (long)(char)(&DAT_00184cf2)[uVar14]; bVar1 = (&DAT_001849d0)[lVar15 * 4]; bVar2 = (&DAT_001849b0)[lVar15 * 4]; bVar4 = pbVar16[3]; bVar5 = pbVar16[2]; bVar6 = pbVar16[1]; *in_stack_00000010 = lVar9; uVar13 = (bVar4 & 0x3f | ((uint)bVar3 & *(uint *)(&DAT_00184970 + lVar15 * 4)) << 0x12 | (bVar6 & 0x3f) << 0xc | (bVar5 & 0x3f) << 6) >> (bVar2 & 0x1f); pbVar17 = pbVar16 + (ulong)((0x80ff0000U >> uVar14 & 1) != 0) + lVar15; if ((((uint)((uVar13 & 0x7ffff800) == 0xd800) << 7 | (uint)(0x10ffff < uVar13) << 8 | (uint)(bVar4 >> 6) | (bVar6 >> 2 & 0xfffffff0) + (uint)(bVar5 >> 6) * 4 | (uint)(uVar13 < *(uint *)(&DAT_00184990 + lVar15 * 4)) << 6) ^ 0x2a) >> (bVar1 & 0x1f) != 0) { pbVar17 = pbVar16 + 1; } __src = __src + ((long)pbVar17 - (long)pbVar16); pbVar16 = pbVar17; } while ((long)pbVar17 - (long)local_48 < (long)param_1); } } else { local_38 = param_1 + (param_2 - 3); do { local_40 = param_2; if (local_38 <= __src) goto LAB_0014d763; bVar1 = *__src; uVar12 = (uint)(bVar1 >> 3); lVar15 = (long)(char)(&DAT_00184cf2)[uVar12]; uVar14 = *(uint *)(&DAT_00184970 + lVar15 * 4); bVar2 = __src[1]; bVar3 = __src[2]; bVar4 = __src[3]; uVar7 = *(int4 *)(&DAT_001849b0 + lVar15 * 4); uVar13 = *(uint *)(&DAT_00184990 + lVar15 * 4); uVar8 = *(int4 *)(&DAT_001849d0 + lVar15 * 4); lVar9 = *in_stack_00000010; if (lVar9 == 0) { lVar10 = (long)__src - in_stack_00000008; plVar11 = in_stack_00000018; } else { lVar10 = lVar9 + -1; plVar11 = in_stack_00000010; } *plVar11 = lVar10; uVar14 = (bVar4 & 0x3f | (uVar14 & bVar1) << 0x12 | (bVar2 & 0x3f) << 0xc | (bVar3 & 0x3f) << 6) >> ((byte)uVar7 & 0x1f); pbVar16 = __src + (ulong)((0x80ff0000U >> uVar12 & 1) != 0) + lVar15; if ((((uint)((uVar14 & 0x7ffff800) == 0xd800) << 7 | (uint)(0x10ffff < uVar14) << 8 | (uint)(byte)(bVar4 >> 6 | bVar2 >> 2 & 0x30 | bVar3 >> 4 & 0xc) | (uint)(uVar14 < uVar13) << 6) ^ 0x2a) >> ((byte)uVar8 & 0x1f) != 0) { pbVar16 = __src + 1; } __src = pbVar16; } while (lVar9 != 0); } return; }
39,904
fn_ext
eloqsql/mysys/mf_fn_ext.c
char *fn_ext(const char *name) { register const char *pos, *gpos; DBUG_ENTER("fn_ext"); DBUG_PRINT("mfunkt",("name: '%s'",name)); #if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL) { char buff[FN_REFLEN]; size_t res_length; gpos= name+ dirname_part(buff,(char*) name, &res_length); } #else if (!(gpos= strrchr(name, FN_LIBCHAR))) gpos= name; #endif pos= strchr(gpos, FN_EXTCHAR); DBUG_RETURN((char*) (pos ? pos : strend(gpos))); }
O0
c
fn_ext: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) jmp 0x2ea9e movq -0x8(%rbp), %rdi movl $0x2f, %esi callq 0x29380 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x2eabe movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi movl $0x2e, %esi callq 0x29120 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x2eae1 movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x2eaee movq -0x18(%rbp), %rdi callq 0x863c0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq
fn_ext: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi jmp short $+2 loc_2EA9E: mov rdi, [rbp+var_8] mov esi, 2Fh ; '/' call _strrchr mov [rbp+var_18], rax cmp rax, 0 jnz short loc_2EABE mov rax, [rbp+var_8] mov [rbp+var_18], rax loc_2EABE: mov rdi, [rbp+var_18] mov esi, 2Eh ; '.' call _strchr mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_2EAE1 mov rax, [rbp+var_10] mov [rbp+var_20], rax jmp short loc_2EAEE loc_2EAE1: mov rdi, [rbp+var_18] call strend mov [rbp+var_20], rax loc_2EAEE: mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long fn_ext(long long a1) { long long v3; // [rsp+18h] [rbp-18h] long long v4; // [rsp+20h] [rbp-10h] v3 = strrchr(a1, 47LL); if ( !v3 ) v3 = a1; v4 = strchr(v3, 46LL); if ( v4 ) return v4; else return strend(v3); }
fn_ext: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI JMP 0x0012ea9e LAB_0012ea9e: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x2f CALL 0x00129380 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0012eabe MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX LAB_0012eabe: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x2e CALL 0x00129120 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0012eae1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX JMP 0x0012eaee LAB_0012eae1: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001863c0 MOV qword ptr [RBP + -0x20],RAX LAB_0012eaee: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
char * fn_ext(char *param_1) { int8 local_28; int8 local_20; local_20 = strrchr(param_1,0x2f); if (local_20 == (char *)0x0) { local_20 = param_1; } local_28 = strchr(local_20,0x2e); if (local_28 == (char *)0x0) { local_28 = (char *)strend(local_20); } return local_28; }
39,905
graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static struct ggml_tensor * graph_copy_dup_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, struct ggml_context * ctx_allocated, struct ggml_context * ctx_unallocated, struct ggml_tensor * src) { GGML_ASSERT(src != NULL); GGML_ASSERT(src->data && "graph must be allocated"); size_t id = ggml_hash_insert(&hash_set, src); if (id == GGML_HASHSET_ALREADY_EXISTS) { return node_copies[ggml_hash_find(&hash_set, src)]; } struct ggml_tensor * dst = ggml_dup_tensor_layout(src->data && !src->view_src ? ctx_allocated : ctx_unallocated, src); if (src->view_src != NULL) { dst->view_src = graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, src->view_src); dst->view_offs = src->view_offs; } dst->op = src->op; memcpy(dst->op_params, src->op_params, sizeof(dst->op_params)); ggml_set_name(dst, src->name); // copy src for (int i = 0; i < GGML_MAX_SRC; i++) { struct ggml_tensor * s = src->src[i]; if (s == NULL) { continue; } dst->src[i] = graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, s); } node_copies[id] = dst; return dst; }
O0
cpp
graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x80(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x62c1b leaq 0x52016(%rip), %rdi # 0xb4c17 movl $0x687, %esi # imm = 0x687 leaq 0x4e9fc(%rip), %rdx # 0xb1609 leaq 0x525c0(%rip), %rcx # 0xb51d4 movb $0x0, %al callq 0x48a00 movq -0x28(%rbp), %rax cmpq $0x0, 0xf8(%rax) jne 0x62c4a leaq 0x51fe7(%rip), %rdi # 0xb4c17 movl $0x688, %esi # imm = 0x688 leaq 0x4e9cd(%rip), %rdx # 0xb1609 leaq 0x52c3e(%rip), %rcx # 0xb5881 movb $0x0, %al callq 0x48a00 movq -0x80(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x63f00 movq %rax, -0x30(%rbp) cmpq $-0x2, -0x30(%rbp) jne 0x62c91 movq -0x80(%rbp), %rdi movq -0x10(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x28(%rbp), %rsi callq 0x62f50 movq %rax, %rcx movq -0x88(%rbp), %rax movq (%rax,%rcx,8), %rax movq %rax, -0x8(%rbp) jmp 0x62e4f movq -0x28(%rbp), %rax cmpq $0x0, 0xf8(%rax) je 0x62cba movq -0x28(%rbp), %rax cmpq $0x0, 0xe8(%rax) jne 0x62cba movq -0x18(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x62cc5 movq -0x20(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x638d0 movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax cmpq $0x0, 0xe8(%rax) je 0x62d5f movq -0x80(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x50(%rbp) movq 0x8(%rax), %rcx movq %rcx, -0x48(%rbp) movq 0x10(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movq 0xe8(%rax), %rcx leaq -0x50(%rbp), %rax movq (%rax), %r8 movq %r8, (%rsp) movq 0x8(%rax), %r8 movq %r8, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x62bd0 movq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0xe8(%rax) movq -0x28(%rbp), %rax movq 0xf0(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0xf0(%rax) movq -0x28(%rbp), %rax movl 0x50(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x38(%rbp), %rdi addq $0x54, %rdi movq -0x28(%rbp), %rsi addq $0x54, %rsi movl $0x40, %edx callq 0x453f0 movq -0x38(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0x100, %rsi # imm = 0x100 callq 0x48ff0 movl $0x0, -0x54(%rbp) cmpl $0xa, -0x54(%rbp) jge 0x62e37 movq -0x28(%rbp), %rax movslq -0x54(%rbp), %rcx movq 0x98(%rax,%rcx,8), %rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x60(%rbp) jne 0x62dc9 jmp 0x62e29 movq -0x80(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x78(%rbp) movq 0x8(%rax), %rcx movq %rcx, -0x70(%rbp) movq 0x10(%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x60(%rbp), %rcx leaq -0x78(%rbp), %rax movq (%rax), %r8 movq %r8, (%rsp) movq 0x8(%rax), %r8 movq %r8, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x62bd0 movq %rax, %rdx movq -0x38(%rbp), %rax movslq -0x54(%rbp), %rcx movq %rdx, 0x98(%rax,%rcx,8) movl -0x54(%rbp), %eax addl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0x62da2 movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax movq -0x30(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xb0, %rsp popq %rbp retq nopl (%rax)
_ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_: push rbp mov rbp, rsp sub rsp, 0B0h lea rax, [rbp+arg_0] mov [rbp+var_80], rax mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_28], 0 jnz short loc_62C1B lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 687h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorViewSrcN+0Dh; "src != NULL" mov al, 0 call _ggml_abort loc_62C1B: mov rax, [rbp+var_28] cmp qword ptr [rax+0F8h], 0 jnz short loc_62C4A lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 688h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrcDataGraphMu; "src->data && \"graph must be allocated"... mov al, 0 call _ggml_abort loc_62C4A: mov rdi, [rbp+var_80] mov rsi, [rbp+var_28] call _ZL16ggml_hash_insertP13ggml_hash_setP11ggml_tensor; ggml_hash_insert(ggml_hash_set *,ggml_tensor *) mov [rbp+var_30], rax cmp [rbp+var_30], 0FFFFFFFFFFFFFFFEh jnz short loc_62C91 mov rdi, [rbp+var_80] mov rax, [rbp+var_10] mov [rbp+var_88], rax mov rsi, [rbp+var_28] call _ZL14ggml_hash_findPK13ggml_hash_setPK11ggml_tensor; ggml_hash_find(ggml_hash_set const*,ggml_tensor const*) mov rcx, rax mov rax, [rbp+var_88] mov rax, [rax+rcx*8] mov [rbp+var_8], rax jmp loc_62E4F loc_62C91: mov rax, [rbp+var_28] cmp qword ptr [rax+0F8h], 0 jz short loc_62CBA mov rax, [rbp+var_28] cmp qword ptr [rax+0E8h], 0 jnz short loc_62CBA mov rax, [rbp+var_18] mov [rbp+var_90], rax jmp short loc_62CC5 loc_62CBA: mov rax, [rbp+var_20] mov [rbp+var_90], rax loc_62CC5: mov rdi, [rbp+var_90] mov rsi, [rbp+var_28] call _ZL22ggml_dup_tensor_layoutP12ggml_contextPK11ggml_tensor; ggml_dup_tensor_layout(ggml_context *,ggml_tensor const*) mov [rbp+var_38], rax mov rax, [rbp+var_28] cmp qword ptr [rax+0E8h], 0 jz short loc_62D5F mov rax, [rbp+var_80] mov rcx, [rax] mov [rbp+var_50], rcx mov rcx, [rax+8] mov [rbp+var_48], rcx mov rax, [rax+10h] mov [rbp+var_40], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov rcx, [rax+0E8h] lea rax, [rbp+var_50] mov r8, [rax] mov [rsp+0B0h+var_B0], r8 mov r8, [rax+8] mov [rsp+0B0h+var_A8], r8 mov rax, [rax+10h] mov [rsp+0B0h+var_A0], rax call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) mov rcx, rax mov rax, [rbp+var_38] mov [rax+0E8h], rcx mov rax, [rbp+var_28] mov rcx, [rax+0F0h] mov rax, [rbp+var_38] mov [rax+0F0h], rcx loc_62D5F: mov rax, [rbp+var_28] mov ecx, [rax+50h] mov rax, [rbp+var_38] mov [rax+50h], ecx mov rdi, [rbp+var_38] add rdi, 54h ; 'T' mov rsi, [rbp+var_28] add rsi, 54h ; 'T' mov edx, 40h ; '@' call _memcpy mov rdi, [rbp+var_38] mov rsi, [rbp+var_28] add rsi, 100h call _ggml_set_name mov [rbp+var_54], 0 loc_62DA2: cmp [rbp+var_54], 0Ah jge loc_62E37 mov rax, [rbp+var_28] movsxd rcx, [rbp+var_54] mov rax, [rax+rcx*8+98h] mov [rbp+var_60], rax cmp [rbp+var_60], 0 jnz short loc_62DC9 jmp short loc_62E29 loc_62DC9: mov rax, [rbp+var_80] mov rcx, [rax] mov [rbp+var_78], rcx mov rcx, [rax+8] mov [rbp+var_70], rcx mov rax, [rax+10h] mov [rbp+var_68], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_60] lea rax, [rbp+var_78] mov r8, [rax] mov [rsp+0B0h+var_B0], r8 mov r8, [rax+8] mov [rsp+0B0h+var_A8], r8 mov rax, [rax+10h] mov [rsp+0B0h+var_A0], rax call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) mov rdx, rax mov rax, [rbp+var_38] movsxd rcx, [rbp+var_54] mov [rax+rcx*8+98h], rdx loc_62E29: mov eax, [rbp+var_54] add eax, 1 mov [rbp+var_54], eax jmp loc_62DA2 loc_62E37: mov rdx, [rbp+var_38] mov rax, [rbp+var_10] mov rcx, [rbp+var_30] mov [rax+rcx*8], rdx mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_62E4F: mov rax, [rbp+var_8] add rsp, 0B0h pop rbp retn
long long graph_copy_dup_tensor( long long a1, long long a2, long long a3, long long a4, _DWORD a5, _DWORD a6, long long a7, long long a8, long long a9) { long long v9; // rax int v10; // r9d int v11; // r9d long long v13; // [rsp+50h] [rbp-60h] int i; // [rsp+5Ch] [rbp-54h] long long v15; // [rsp+78h] [rbp-38h] long long v16; // [rsp+80h] [rbp-30h] if ( !a4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp", 1671, (long long)"GGML_ASSERT(%s) failed", "src != NULL"); if ( !*(_QWORD *)(a4 + 248) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp", 1672, (long long)"GGML_ASSERT(%s) failed", "src->data && \"graph must be allocated\""); v16 = ggml_hash_insert(&a7, a4); if ( v16 == -2 ) return *(_QWORD *)(a1 + 8 * ggml_hash_find(&a7, a4)); if ( !*(_QWORD *)(a4 + 248) || *(_QWORD *)(a4 + 232) ) v9 = ggml_dup_tensor_layout(a3, a4); else v9 = ggml_dup_tensor_layout(a2, a4); v15 = v9; if ( *(_QWORD *)(a4 + 232) ) { *(_QWORD *)(v9 + 232) = graph_copy_dup_tensor(a1, a2, a3, *(_QWORD *)(a4 + 232), a8, v10, a7, a8, a9); *(_QWORD *)(v15 + 240) = *(_QWORD *)(a4 + 240); } *(_DWORD *)(v15 + 80) = *(_DWORD *)(a4 + 80); memcpy(v15 + 84, a4 + 84, 64LL); ggml_set_name(v15, a4 + 256); for ( i = 0; i < 10; ++i ) { v13 = *(_QWORD *)(a4 + 8LL * i + 152); if ( v13 ) *(_QWORD *)(v15 + 8LL * i + 152) = graph_copy_dup_tensor(a1, a2, a3, v13, a8, v11, a7, a8, a9); } *(_QWORD *)(a1 + 8 * v16) = v15; return v15; }
graph_copy_dup_tensor: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x80],RAX MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x00162c1b LEA RDI,[0x1b4c17] MOV ESI,0x687 LEA RDX,[0x1b1609] LEA RCX,[0x1b51d4] MOV AL,0x0 CALL 0x00148a00 LAB_00162c1b: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xf8],0x0 JNZ 0x00162c4a LEA RDI,[0x1b4c17] MOV ESI,0x688 LEA RDX,[0x1b1609] LEA RCX,[0x1b5881] MOV AL,0x0 CALL 0x00148a00 LAB_00162c4a: MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00163f00 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],-0x2 JNZ 0x00162c91 MOV RDI,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x88],RAX MOV RSI,qword ptr [RBP + -0x28] CALL 0x00162f50 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x00162e4f LAB_00162c91: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xf8],0x0 JZ 0x00162cba MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xe8],0x0 JNZ 0x00162cba MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x90],RAX JMP 0x00162cc5 LAB_00162cba: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x90],RAX LAB_00162cc5: MOV RDI,qword ptr [RBP + -0x90] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001638d0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0xe8],0x0 JZ 0x00162d5f MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0xe8] LEA RAX,[RBP + -0x50] MOV R8,qword ptr [RAX] MOV qword ptr [RSP],R8 MOV R8,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],R8 MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00162bd0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0xe8],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0xf0] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0xf0],RCX LAB_00162d5f: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x50],ECX MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x54 MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x54 MOV EDX,0x40 CALL 0x001453f0 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x100 CALL 0x00148ff0 MOV dword ptr [RBP + -0x54],0x0 LAB_00162da2: CMP dword ptr [RBP + -0x54],0xa JGE 0x00162e37 MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x54] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x98] MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x60],0x0 JNZ 0x00162dc9 JMP 0x00162e29 LAB_00162dc9: MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x78],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x70],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x60] LEA RAX,[RBP + -0x78] MOV R8,qword ptr [RAX] MOV qword ptr [RSP],R8 MOV R8,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],R8 MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00162bd0 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,dword ptr [RBP + -0x54] MOV qword ptr [RAX + RCX*0x8 + 0x98],RDX LAB_00162e29: MOV EAX,dword ptr [RBP + -0x54] ADD EAX,0x1 MOV dword ptr [RBP + -0x54],EAX JMP 0x00162da2 LAB_00162e37: MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_00162e4f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xb0 POP RBP RET
/* graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*) */ long graph_copy_dup_tensor (long param_1,ggml_context *param_2,ggml_context *param_3,ggml_tensor *param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9) { long lVar1; int8 uVar2; ggml_context *local_98; int local_5c; long local_10; if (param_4 == (ggml_tensor *)0x0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp" ,0x687,"GGML_ASSERT(%s) failed","src != NULL"); } if (*(long *)(param_4 + 0xf8) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp" ,0x688,"GGML_ASSERT(%s) failed","src->data && \"graph must be allocated\""); } lVar1 = ggml_hash_insert((ggml_hash_set *)&param_7,param_4); if (lVar1 == -2) { lVar1 = ggml_hash_find((ggml_hash_set *)&param_7,param_4); local_10 = *(long *)(param_1 + lVar1 * 8); } else { local_98 = param_3; if ((*(long *)(param_4 + 0xf8) != 0) && (*(long *)(param_4 + 0xe8) == 0)) { local_98 = param_2; } local_10 = ggml_dup_tensor_layout(local_98,param_4); if (*(long *)(param_4 + 0xe8) != 0) { uVar2 = graph_copy_dup_tensor (param_1,param_2,param_3,*(int8 *)(param_4 + 0xe8),param_8,param_6, param_7,param_8,param_9); *(int8 *)(local_10 + 0xe8) = uVar2; *(int8 *)(local_10 + 0xf0) = *(int8 *)(param_4 + 0xf0); } *(int4 *)(local_10 + 0x50) = *(int4 *)(param_4 + 0x50); memcpy((void *)(local_10 + 0x54),param_4 + 0x54,0x40); ggml_set_name(local_10,param_4 + 0x100); for (local_5c = 0; local_5c < 10; local_5c = local_5c + 1) { if (*(long *)(param_4 + (long)local_5c * 8 + 0x98) != 0) { uVar2 = graph_copy_dup_tensor (param_1,param_2,param_3,*(long *)(param_4 + (long)local_5c * 8 + 0x98), param_8,param_6,param_7,param_8,param_9); *(int8 *)(local_10 + 0x98 + (long)local_5c * 8) = uVar2; } } *(long *)(param_1 + lVar1 * 8) = local_10; } return local_10; }
39,906
graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static struct ggml_tensor * graph_copy_dup_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, struct ggml_context * ctx_allocated, struct ggml_context * ctx_unallocated, struct ggml_tensor * src) { GGML_ASSERT(src != NULL); GGML_ASSERT(src->data && "graph must be allocated"); size_t id = ggml_hash_insert(&hash_set, src); if (id == GGML_HASHSET_ALREADY_EXISTS) { return node_copies[ggml_hash_find(&hash_set, src)]; } struct ggml_tensor * dst = ggml_dup_tensor_layout(src->data && !src->view_src ? ctx_allocated : ctx_unallocated, src); if (src->view_src != NULL) { dst->view_src = graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, src->view_src); dst->view_offs = src->view_offs; } dst->op = src->op; memcpy(dst->op_params, src->op_params, sizeof(dst->op_params)); ggml_set_name(dst, src->name); // copy src for (int i = 0; i < GGML_MAX_SRC; i++) { struct ggml_tensor * s = src->src[i]; if (s == NULL) { continue; } dst->src[i] = graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, s); } node_copies[id] = dst; return dst; }
O2
cpp
graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, 0x20(%rsp) movq %rsi, 0x18(%rsp) testq %rcx, %rcx je 0x2e514 movq %rcx, %r14 cmpq $0x0, 0xf8(%rcx) je 0x2e530 movq %rdi, %rbx leaq 0x60(%rsp), %r13 movq %r14, %rax shrq $0x4, %rax movq (%r13), %rdi movq 0x8(%r13), %rsi xorl %edx, %edx divq %rdi movq 0x10(%r13), %rax pushq $0x1 popq %r8 movq %rdx, %rbp movq %rbp, %r9 shrq $0x5, %r9 movl (%rsi,%r9,4), %r10d movl %r8d, %r11d movl %ebp, %ecx shll %cl, %r11d btl %ebp, %r10d jae 0x2e3df cmpq %r14, (%rax,%rbp,8) je 0x2e3f0 incq %rbp cmpq %rdi, %rbp movl $0x0, %ecx cmoveq %rcx, %rbp cmpq %rdx, %rbp jne 0x2e392 leaq 0x2230d(%rip), %rdi # 0x506d9 leaq 0x22186(%rip), %rdx # 0x50559 movl $0xff, %esi xorl %eax, %eax callq 0x1f9b0 orl %r10d, %r11d movl %r11d, (%rsi,%r9,4) movq %r14, (%rax,%rbp,8) cmpq $-0x2, %rbp jne 0x2e404 movq %r13, %rdi movq %r14, %rsi callq 0x2e5e5 movq (%rbx,%rax,8), %r12 jmp 0x2e502 cmpq $0x0, 0xf8(%r14) je 0x2e41d cmpq $0x0, 0xe8(%r14) movq 0x18(%rsp), %rdi je 0x2e422 movq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x2eb4e movq %rax, %r12 movq 0xe8(%r14), %rcx testq %rcx, %rcx je 0x2e474 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x2e339 movq %rax, 0xe8(%r12) movq 0xf0(%r14), %rax movq %rax, 0xf0(%r12) movl 0x50(%r14), %eax movl %eax, 0x50(%r12) movups 0x54(%r14), %xmm0 movups 0x64(%r14), %xmm1 movups 0x74(%r14), %xmm2 movups 0x84(%r14), %xmm3 movups %xmm0, 0x54(%r12) movups %xmm1, 0x64(%r12) movups %xmm2, 0x74(%r12) movups %xmm3, 0x84(%r12) leaq 0x100(%r14), %rsi movq %r12, %rdi callq 0x1fc20 pushq $0x13 popq %r15 cmpq $0x1d, %r15 je 0x2e4fe movq (%r14,%r15,8), %rcx testq %rcx, %rcx je 0x2e4f9 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x2e339 movq %rax, (%r12,%r15,8) incq %r15 jmp 0x2e4c2 movq %r12, (%rbx,%rbp,8) movq %r12, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x23269(%rip), %rdi # 0x51784 leaq 0x200b3(%rip), %rdx # 0x4e5d5 leaq 0x23818(%rip), %rcx # 0x51d41 movl $0x687, %esi # imm = 0x687 jmp 0x2e54a leaq 0x2324d(%rip), %rdi # 0x51784 leaq 0x20097(%rip), %rdx # 0x4e5d5 leaq 0x23ea9(%rip), %rcx # 0x523ee movl $0x688, %esi # imm = 0x688 xorl %eax, %eax callq 0x1f9b0
_ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rsp+58h+var_38], rdx mov [rsp+58h+var_40], rsi test rcx, rcx jz loc_2E514 mov r14, rcx cmp qword ptr [rcx+0F8h], 0 jz loc_2E530 mov rbx, rdi lea r13, [rsp+58h+arg_0] mov rax, r14 shr rax, 4 mov rdi, [r13+0] mov rsi, [r13+8] xor edx, edx div rdi mov rax, [r13+10h] push 1 pop r8 mov rbp, rdx loc_2E392: mov r9, rbp shr r9, 5 mov r10d, [rsi+r9*4] mov r11d, r8d mov ecx, ebp shl r11d, cl bt r10d, ebp jnb short loc_2E3DF cmp [rax+rbp*8], r14 jz short loc_2E3F0 inc rbp cmp rbp, rdi mov ecx, 0 cmovz rbp, rcx cmp rbp, rdx jnz short loc_2E392 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0FFh xor eax, eax call _ggml_abort loc_2E3DF: or r11d, r10d mov [rsi+r9*4], r11d mov [rax+rbp*8], r14 cmp rbp, 0FFFFFFFFFFFFFFFEh jnz short loc_2E404 loc_2E3F0: mov rdi, r13 mov rsi, r14 call _ZL14ggml_hash_findPK13ggml_hash_setPK11ggml_tensor; ggml_hash_find(ggml_hash_set const*,ggml_tensor const*) mov r12, [rbx+rax*8] jmp loc_2E502 loc_2E404: cmp qword ptr [r14+0F8h], 0 jz short loc_2E41D cmp qword ptr [r14+0E8h], 0 mov rdi, [rsp+58h+var_40] jz short loc_2E422 loc_2E41D: mov rdi, [rsp+58h+var_38] loc_2E422: mov rsi, r14 call _ZL22ggml_dup_tensor_layoutP12ggml_contextPK11ggml_tensor; ggml_dup_tensor_layout(ggml_context *,ggml_tensor const*) mov r12, rax mov rcx, [r14+0E8h] test rcx, rcx jz short loc_2E474 mov rax, [r13+10h] mov [rsp+58h+var_48], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+58h+var_58], xmm0 mov rdi, rbx mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) mov [r12+0E8h], rax mov rax, [r14+0F0h] mov [r12+0F0h], rax loc_2E474: mov eax, [r14+50h] mov [r12+50h], eax movups xmm0, xmmword ptr [r14+54h] movups xmm1, xmmword ptr [r14+64h] movups xmm2, xmmword ptr [r14+74h] movups xmm3, xmmword ptr [r14+84h] movups xmmword ptr [r12+54h], xmm0 movups xmmword ptr [r12+64h], xmm1 movups xmmword ptr [r12+74h], xmm2 movups xmmword ptr [r12+84h], xmm3 lea rsi, [r14+100h] mov rdi, r12 call _ggml_set_name push 13h pop r15 loc_2E4C2: cmp r15, 1Dh jz short loc_2E4FE mov rcx, [r14+r15*8] test rcx, rcx jz short loc_2E4F9 mov rax, [r13+10h] mov [rsp+58h+var_48], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+58h+var_58], xmm0 mov rdi, rbx mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) mov [r12+r15*8], rax loc_2E4F9: inc r15 jmp short loc_2E4C2 loc_2E4FE: mov [rbx+rbp*8], r12 loc_2E502: mov rax, r12 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2E514: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorViewSrcN+0Dh; "src != NULL" mov esi, 687h jmp short loc_2E54A loc_2E530: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrcDataGraphMu; "src->data && \"graph must be allocated"... mov esi, 688h loc_2E54A: xor eax, eax call _ggml_abort
long long graph_copy_dup_tensor( long long a1, long long a2, long long a3, unsigned long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, unsigned long long a15, long long a16, long long a17) { long long v19; // rax unsigned long long v20; // rbp long long v21; // r9 int v22; // r10d long long v23; // r12 long long v24; // rdi int v25; // r8d int v26; // r9d long long v27; // rcx __int128 v28; // xmm1 __int128 v29; // xmm2 __int128 v30; // xmm3 int v31; // r8d int v32; // r9d long long i; // r15 long long v34; // rcx char *v36; // rcx int v37; // esi char v38; // [rsp+0h] [rbp-58h] int v39; // [rsp+20h] [rbp-38h] v39 = a3; if ( !a4 ) { v36 = "src != NULL"; v37 = 1671; goto LABEL_26; } if ( !*(_QWORD *)(a4 + 248) ) { v36 = "src->data && \"graph must be allocated\""; v37 = 1672; LABEL_26: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp", v37, (long long)"GGML_ASSERT(%s) failed", (long long)v36, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v38); } v19 = a17; v20 = (a4 >> 4) % a15; while ( 1 ) { v21 = v20 >> 5; v22 = *(_DWORD *)(a16 + 4 * (v20 >> 5)); if ( !_bittest(&v22, v20) ) break; if ( *(_QWORD *)(a17 + 8 * v20) == a4 ) return *(_QWORD *)(a1 + 8 * ggml_hash_find(&a15, a4)); if ( ++v20 == a15 ) v20 = 0LL; if ( v20 == (a4 >> 4) % a15 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h", 255, (long long)"fatal error", 0LL, 1LL, v21, a7, a8, a9, a10, a11, a12, a13, a14, v38); } *(_DWORD *)(a16 + 4 * v21) = v22 | (1 << v20); *(_QWORD *)(v19 + 8 * v20) = a4; if ( v20 == -2LL ) return *(_QWORD *)(a1 + 8 * ggml_hash_find(&a15, a4)); if ( !*(_QWORD *)(a4 + 248) || (v24 = a2, *(_QWORD *)(a4 + 232)) ) v24 = a3; v23 = ggml_dup_tensor_layout(v24, a4); v27 = *(_QWORD *)(a4 + 232); if ( v27 ) { *(_QWORD *)(v23 + 232) = graph_copy_dup_tensor(a1, a2, v39, v27, v25, v26, a15, a16, a17); *(_QWORD *)(v23 + 240) = *(_QWORD *)(a4 + 240); } *(_DWORD *)(v23 + 80) = *(_DWORD *)(a4 + 80); v28 = *(_OWORD *)(a4 + 100); v29 = *(_OWORD *)(a4 + 116); v30 = *(_OWORD *)(a4 + 132); *(_OWORD *)(v23 + 84) = *(_OWORD *)(a4 + 84); *(_OWORD *)(v23 + 100) = v28; *(_OWORD *)(v23 + 116) = v29; *(_OWORD *)(v23 + 132) = v30; ggml_set_name(v23, a4 + 256); for ( i = 19LL; i != 29; ++i ) { v34 = *(_QWORD *)(a4 + 8 * i); if ( v34 ) *(_QWORD *)(v23 + 8 * i) = graph_copy_dup_tensor(a1, a2, v39, v34, v31, v32, a15, a16, a17); } *(_QWORD *)(a1 + 8 * v20) = v23; return v23; }
graph_copy_dup_tensor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RSI TEST RCX,RCX JZ 0x0012e514 MOV R14,RCX CMP qword ptr [RCX + 0xf8],0x0 JZ 0x0012e530 MOV RBX,RDI LEA R13,[RSP + 0x60] MOV RAX,R14 SHR RAX,0x4 MOV RDI,qword ptr [R13] MOV RSI,qword ptr [R13 + 0x8] XOR EDX,EDX DIV RDI MOV RAX,qword ptr [R13 + 0x10] PUSH 0x1 POP R8 MOV RBP,RDX LAB_0012e392: MOV R9,RBP SHR R9,0x5 MOV R10D,dword ptr [RSI + R9*0x4] MOV R11D,R8D MOV ECX,EBP SHL R11D,CL BT R10D,EBP JNC 0x0012e3df CMP qword ptr [RAX + RBP*0x8],R14 JZ 0x0012e3f0 INC RBP CMP RBP,RDI MOV ECX,0x0 CMOVZ RBP,RCX CMP RBP,RDX JNZ 0x0012e392 LEA RDI,[0x1506d9] LEA RDX,[0x150559] MOV ESI,0xff XOR EAX,EAX CALL 0x0011f9b0 LAB_0012e3df: OR R11D,R10D MOV dword ptr [RSI + R9*0x4],R11D MOV qword ptr [RAX + RBP*0x8],R14 CMP RBP,-0x2 JNZ 0x0012e404 LAB_0012e3f0: MOV RDI,R13 MOV RSI,R14 CALL 0x0012e5e5 MOV R12,qword ptr [RBX + RAX*0x8] JMP 0x0012e502 LAB_0012e404: CMP qword ptr [R14 + 0xf8],0x0 JZ 0x0012e41d CMP qword ptr [R14 + 0xe8],0x0 MOV RDI,qword ptr [RSP + 0x18] JZ 0x0012e422 LAB_0012e41d: MOV RDI,qword ptr [RSP + 0x20] LAB_0012e422: MOV RSI,R14 CALL 0x0012eb4e MOV R12,RAX MOV RCX,qword ptr [R14 + 0xe8] TEST RCX,RCX JZ 0x0012e474 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0012e339 MOV qword ptr [R12 + 0xe8],RAX MOV RAX,qword ptr [R14 + 0xf0] MOV qword ptr [R12 + 0xf0],RAX LAB_0012e474: MOV EAX,dword ptr [R14 + 0x50] MOV dword ptr [R12 + 0x50],EAX MOVUPS XMM0,xmmword ptr [R14 + 0x54] MOVUPS XMM1,xmmword ptr [R14 + 0x64] MOVUPS XMM2,xmmword ptr [R14 + 0x74] MOVUPS XMM3,xmmword ptr [R14 + 0x84] MOVUPS xmmword ptr [R12 + 0x54],XMM0 MOVUPS xmmword ptr [R12 + 0x64],XMM1 MOVUPS xmmword ptr [R12 + 0x74],XMM2 MOVUPS xmmword ptr [R12 + 0x84],XMM3 LEA RSI,[R14 + 0x100] MOV RDI,R12 CALL 0x0011fc20 PUSH 0x13 POP R15 LAB_0012e4c2: CMP R15,0x1d JZ 0x0012e4fe MOV RCX,qword ptr [R14 + R15*0x8] TEST RCX,RCX JZ 0x0012e4f9 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0012e339 MOV qword ptr [R12 + R15*0x8],RAX LAB_0012e4f9: INC R15 JMP 0x0012e4c2 LAB_0012e4fe: MOV qword ptr [RBX + RBP*0x8],R12 LAB_0012e502: MOV RAX,R12 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012e514: LEA RDI,[0x151784] LEA RDX,[0x14e5d5] LEA RCX,[0x151d41] MOV ESI,0x687 JMP 0x0012e54a LAB_0012e530: LEA RDI,[0x151784] LEA RDX,[0x14e5d5] LEA RCX,[0x1523ee] MOV ESI,0x688 LAB_0012e54a: XOR EAX,EAX CALL 0x0011f9b0
/* graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*) */ long graph_copy_dup_tensor (long param_1,ggml_context *param_2,ggml_context *param_3,ggml_tensor *param_4, int8 param_5,int8 param_6,ulong param_7,long param_8,long param_9) { uint uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; int4 uVar13; int4 uVar14; int4 uVar15; int4 uVar16; long lVar17; int8 uVar18; char *pcVar19; ulong uVar20; ulong uVar21; ggml_context *pgVar22; long lVar23; if (param_4 == (ggml_tensor *)0x0) { pcVar19 = "src != NULL"; uVar18 = 0x687; } else { if (*(long *)(param_4 + 0xf8) != 0) { uVar20 = ((ulong)param_4 >> 4) % param_7; uVar21 = uVar20; while( true ) { uVar1 = *(uint *)(param_8 + (uVar21 >> 5) * 4); if ((uVar1 >> ((uint)uVar21 & 0x1f) & 1) == 0) break; if (*(ggml_tensor **)(param_9 + uVar21 * 8) == param_4) goto LAB_0012e3f0; uVar21 = uVar21 + 1; if (uVar21 == param_7) { uVar21 = 0; } if (uVar21 == uVar20) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h" ,0xff,"fatal error"); } } *(uint *)(param_8 + (uVar21 >> 5) * 4) = 1 << ((byte)uVar21 & 0x1f) | uVar1; *(ggml_tensor **)(param_9 + uVar21 * 8) = param_4; if (uVar21 == 0xfffffffffffffffe) { LAB_0012e3f0: lVar17 = ggml_hash_find((ggml_hash_set *)&param_7,param_4); lVar17 = *(long *)(param_1 + lVar17 * 8); } else { if ((*(long *)(param_4 + 0xf8) == 0) || (pgVar22 = param_2, *(long *)(param_4 + 0xe8) != 0)) { pgVar22 = param_3; } lVar17 = ggml_dup_tensor_layout(pgVar22,param_4); if (*(long *)(param_4 + 0xe8) != 0) { uVar18 = graph_copy_dup_tensor(param_1,param_2,param_3); *(int8 *)(lVar17 + 0xe8) = uVar18; *(int8 *)(lVar17 + 0xf0) = *(int8 *)(param_4 + 0xf0); } *(int4 *)(lVar17 + 0x50) = *(int4 *)(param_4 + 0x50); uVar2 = *(int4 *)(param_4 + 0x58); uVar3 = *(int4 *)(param_4 + 0x5c); uVar4 = *(int4 *)(param_4 + 0x60); uVar5 = *(int4 *)(param_4 + 100); uVar6 = *(int4 *)(param_4 + 0x68); uVar7 = *(int4 *)(param_4 + 0x6c); uVar8 = *(int4 *)(param_4 + 0x70); uVar9 = *(int4 *)(param_4 + 0x74); uVar10 = *(int4 *)(param_4 + 0x78); uVar11 = *(int4 *)(param_4 + 0x7c); uVar12 = *(int4 *)(param_4 + 0x80); uVar13 = *(int4 *)(param_4 + 0x84); uVar14 = *(int4 *)(param_4 + 0x88); uVar15 = *(int4 *)(param_4 + 0x8c); uVar16 = *(int4 *)(param_4 + 0x90); *(int4 *)(lVar17 + 0x54) = *(int4 *)(param_4 + 0x54); *(int4 *)(lVar17 + 0x58) = uVar2; *(int4 *)(lVar17 + 0x5c) = uVar3; *(int4 *)(lVar17 + 0x60) = uVar4; *(int4 *)(lVar17 + 100) = uVar5; *(int4 *)(lVar17 + 0x68) = uVar6; *(int4 *)(lVar17 + 0x6c) = uVar7; *(int4 *)(lVar17 + 0x70) = uVar8; *(int4 *)(lVar17 + 0x74) = uVar9; *(int4 *)(lVar17 + 0x78) = uVar10; *(int4 *)(lVar17 + 0x7c) = uVar11; *(int4 *)(lVar17 + 0x80) = uVar12; *(int4 *)(lVar17 + 0x84) = uVar13; *(int4 *)(lVar17 + 0x88) = uVar14; *(int4 *)(lVar17 + 0x8c) = uVar15; *(int4 *)(lVar17 + 0x90) = uVar16; ggml_set_name(lVar17,param_4 + 0x100); for (lVar23 = 0x13; lVar23 != 0x1d; lVar23 = lVar23 + 1) { if (*(long *)(param_4 + lVar23 * 8) != 0) { uVar18 = graph_copy_dup_tensor(param_1,param_2,param_3); *(int8 *)(lVar17 + lVar23 * 8) = uVar18; } } *(long *)(param_1 + uVar21 * 8) = lVar17; } return lVar17; } pcVar19 = "src->data && \"graph must be allocated\""; uVar18 = 0x688; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp" ,uVar18,"GGML_ASSERT(%s) failed",pcVar19); }
39,907
graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
static struct ggml_tensor * graph_copy_dup_tensor(struct ggml_hash_set hash_set, struct ggml_tensor ** node_copies, struct ggml_context * ctx_allocated, struct ggml_context * ctx_unallocated, struct ggml_tensor * src) { GGML_ASSERT(src != NULL); GGML_ASSERT(src->data && "graph must be allocated"); size_t id = ggml_hash_insert(&hash_set, src); if (id == GGML_HASHSET_ALREADY_EXISTS) { return node_copies[ggml_hash_find(&hash_set, src)]; } struct ggml_tensor * dst = ggml_dup_tensor_layout(src->data && !src->view_src ? ctx_allocated : ctx_unallocated, src); if (src->view_src != NULL) { dst->view_src = graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, src->view_src); dst->view_offs = src->view_offs; } dst->op = src->op; memcpy(dst->op_params, src->op_params, sizeof(dst->op_params)); ggml_set_name(dst, src->name); // copy src for (int i = 0; i < GGML_MAX_SRC; i++) { struct ggml_tensor * s = src->src[i]; if (s == NULL) { continue; } dst->src[i] = graph_copy_dup_tensor(hash_set, node_copies, ctx_allocated, ctx_unallocated, s); } node_copies[id] = dst; return dst; }
O3
cpp
graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, 0x20(%rsp) movq %rsi, 0x18(%rsp) testq %rcx, %rcx je 0x28e28 movq %rcx, %r14 cmpq $0x0, 0xf8(%rcx) je 0x28e44 movq %rdi, %rbx leaq 0x60(%rsp), %r13 movq %r14, %rax shrq $0x4, %rax movq (%r13), %rdi movq 0x8(%r13), %rsi xorl %edx, %edx divq %rdi movq 0x10(%r13), %rax movq %rdx, %rbp movq %rbp, %r8 shrq $0x5, %r8 movl (%rsi,%r8,4), %r9d movl $0x1, %r10d movl %ebp, %ecx shll %cl, %r10d btl %ebp, %r9d jae 0x28cdd cmpq %r14, (%rax,%rbp,8) je 0x28cee incq %rbp cmpq %rdi, %rbp movl $0x0, %ecx cmoveq %rcx, %rbp cmpq %rdx, %rbp jne 0x28c8d leaq 0x25a9f(%rip), %rdi # 0x4e769 leaq 0x25918(%rip), %rdx # 0x4e5e9 movl $0xff, %esi xorl %eax, %eax callq 0x17cd0 orl %r9d, %r10d movl %r10d, (%rsi,%r8,4) movq %r14, (%rax,%rbp,8) cmpq $-0x2, %rbp jne 0x28d02 movq %r13, %rdi movq %r14, %rsi callq 0x28ef7 movq (%rbx,%rax,8), %r12 jmp 0x28e16 cmpq $0x0, 0xf8(%r14) je 0x28d1b cmpq $0x0, 0xe8(%r14) movq 0x18(%rsp), %rdi je 0x28d20 movq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x17040 movq %rax, %r12 movl $0x6, %eax movq (%r14,%rax,8), %rcx movq %rcx, (%r12,%rax,8) incq %rax cmpq $0xa, %rax jne 0x28d30 movq 0xe8(%r14), %rcx testq %rcx, %rcx je 0x28d88 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x28c38 movq %rax, 0xe8(%r12) movq 0xf0(%r14), %rax movq %rax, 0xf0(%r12) movl 0x50(%r14), %eax movl %eax, 0x50(%r12) movups 0x54(%r14), %xmm0 movups 0x64(%r14), %xmm1 movups 0x74(%r14), %xmm2 movups 0x84(%r14), %xmm3 movups %xmm0, 0x54(%r12) movups %xmm1, 0x64(%r12) movups %xmm2, 0x74(%r12) movups %xmm3, 0x84(%r12) leaq 0x100(%r14), %rsi movq %r12, %rdi callq 0x17ea0 movl $0x13, %r15d movq (%r14,%r15,8), %rcx testq %rcx, %rcx je 0x28e09 movq 0x10(%r13), %rax movq %rax, 0x10(%rsp) movups (%r13), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x28c38 movq %rax, (%r12,%r15,8) incq %r15 cmpq $0x1d, %r15 jne 0x28dd8 movq %r12, (%rbx,%rbp,8) movq %r12, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x269e5(%rip), %rdi # 0x4f814 leaq 0x2382f(%rip), %rdx # 0x4c665 leaq 0x26f94(%rip), %rcx # 0x4fdd1 movl $0x687, %esi # imm = 0x687 jmp 0x28e5e leaq 0x269c9(%rip), %rdi # 0x4f814 leaq 0x23813(%rip), %rdx # 0x4c665 leaq 0x27625(%rip), %rcx # 0x5047e movl $0x688, %esi # imm = 0x688 xorl %eax, %eax callq 0x17cd0
_ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rsp+58h+var_38], rdx mov [rsp+58h+var_40], rsi test rcx, rcx jz loc_28E28 mov r14, rcx cmp qword ptr [rcx+0F8h], 0 jz loc_28E44 mov rbx, rdi lea r13, [rsp+58h+arg_0] mov rax, r14 shr rax, 4 mov rdi, [r13+0] mov rsi, [r13+8] xor edx, edx div rdi mov rax, [r13+10h] mov rbp, rdx loc_28C8D: mov r8, rbp shr r8, 5 mov r9d, [rsi+r8*4] mov r10d, 1 mov ecx, ebp shl r10d, cl bt r9d, ebp jnb short loc_28CDD cmp [rax+rbp*8], r14 jz short loc_28CEE inc rbp cmp rbp, rdi mov ecx, 0 cmovz rbp, rcx cmp rbp, rdx jnz short loc_28C8D lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0FFh xor eax, eax call _ggml_abort loc_28CDD: or r10d, r9d mov [rsi+r8*4], r10d mov [rax+rbp*8], r14 cmp rbp, 0FFFFFFFFFFFFFFFEh jnz short loc_28D02 loc_28CEE: mov rdi, r13 mov rsi, r14 call _ZL14ggml_hash_findPK13ggml_hash_setPK11ggml_tensor_0; ggml_hash_find(ggml_hash_set const*,ggml_tensor const*) mov r12, [rbx+rax*8] jmp loc_28E16 loc_28D02: cmp qword ptr [r14+0F8h], 0 jz short loc_28D1B cmp qword ptr [r14+0E8h], 0 mov rdi, [rsp+58h+var_40] jz short loc_28D20 loc_28D1B: mov rdi, [rsp+58h+var_38] loc_28D20: mov rsi, r14 call _ggml_dup_tensor mov r12, rax mov eax, 6 loc_28D30: mov rcx, [r14+rax*8] mov [r12+rax*8], rcx inc rax cmp rax, 0Ah jnz short loc_28D30 mov rcx, [r14+0E8h] test rcx, rcx jz short loc_28D88 mov rax, [r13+10h] mov [rsp+58h+var_48], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+58h+var_58], xmm0 mov rdi, rbx mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) mov [r12+0E8h], rax mov rax, [r14+0F0h] mov [r12+0F0h], rax loc_28D88: mov eax, [r14+50h] mov [r12+50h], eax movups xmm0, xmmword ptr [r14+54h] movups xmm1, xmmword ptr [r14+64h] movups xmm2, xmmword ptr [r14+74h] movups xmm3, xmmword ptr [r14+84h] movups xmmword ptr [r12+54h], xmm0 movups xmmword ptr [r12+64h], xmm1 movups xmmword ptr [r12+74h], xmm2 movups xmmword ptr [r12+84h], xmm3 lea rsi, [r14+100h] mov rdi, r12 call _ggml_set_name mov r15d, 13h loc_28DD8: mov rcx, [r14+r15*8] test rcx, rcx jz short loc_28E09 mov rax, [r13+10h] mov [rsp+58h+var_48], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+58h+var_58], xmm0 mov rdi, rbx mov rsi, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] call _ZL21graph_copy_dup_tensor13ggml_hash_setPP11ggml_tensorP12ggml_contextS4_S1_; graph_copy_dup_tensor(ggml_hash_set,ggml_tensor **,ggml_context *,ggml_context *,ggml_tensor *) mov [r12+r15*8], rax loc_28E09: inc r15 cmp r15, 1Dh jnz short loc_28DD8 mov [rbx+rbp*8], r12 loc_28E16: mov rax, r12 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_28E28: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorViewSrcN+0Dh; "src != NULL" mov esi, 687h jmp short loc_28E5E loc_28E44: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrcDataGraphMu; "src->data && \"graph must be allocated"... mov esi, 688h loc_28E5E: xor eax, eax call _ggml_abort
long long graph_copy_dup_tensor( long long a1, long long a2, long long a3, unsigned long long a4, int a5, int a6, double a7, unsigned long long a8, long long a9, long long a10) { long long v12; // rax unsigned long long v13; // rbp unsigned long long v14; // r8 int v15; // r9d long long v16; // r12 long long v17; // rdi int v18; // r8d int v19; // r9d long long i; // rax long long v21; // rcx __int128 v22; // xmm1 __int128 v23; // xmm2 __int128 v24; // xmm3 int v25; // r8d int v26; // r9d long long j; // r15 long long v28; // rcx char *v30; // rcx int v31; // esi int v32; // [rsp+20h] [rbp-38h] v32 = a3; if ( !a4 ) { v30 = "src != NULL"; v31 = 1671; goto LABEL_27; } if ( !*(_QWORD *)(a4 + 248) ) { v30 = "src->data && \"graph must be allocated\""; v31 = 1672; LABEL_27: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp", v31, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v30, a5, a6); } v12 = a10; v13 = (a4 >> 4) % a8; while ( 1 ) { v14 = v13 >> 5; v15 = *(_DWORD *)(a9 + 4 * (v13 >> 5)); if ( !_bittest(&v15, v13) ) break; if ( *(_QWORD *)(a10 + 8 * v13) == a4 ) return *(_QWORD *)(a1 + 8 * ggml_hash_find(&a8, a4)); if ( ++v13 == a8 ) v13 = 0LL; if ( v13 == (a4 >> 4) % a8 ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h", 255, (unsigned int)"fatal error", 0, v14, v15); } *(_DWORD *)(a9 + 4 * v14) = v15 | (1 << v13); *(_QWORD *)(v12 + 8 * v13) = a4; if ( v13 == -2LL ) return *(_QWORD *)(a1 + 8 * ggml_hash_find(&a8, a4)); if ( !*(_QWORD *)(a4 + 248) || (v17 = a2, *(_QWORD *)(a4 + 232)) ) v17 = a3; v16 = ggml_dup_tensor(v17, a4, a7); for ( i = 6LL; i != 10; ++i ) *(_QWORD *)(v16 + 8 * i) = *(_QWORD *)(a4 + 8 * i); v21 = *(_QWORD *)(a4 + 232); if ( v21 ) { *(_QWORD *)(v16 + 232) = graph_copy_dup_tensor(a1, a2, v32, v21, v18, v19, a8, a9, a10); *(_QWORD *)(v16 + 240) = *(_QWORD *)(a4 + 240); } *(_DWORD *)(v16 + 80) = *(_DWORD *)(a4 + 80); v22 = *(_OWORD *)(a4 + 100); v23 = *(_OWORD *)(a4 + 116); v24 = *(_OWORD *)(a4 + 132); *(_OWORD *)(v16 + 84) = *(_OWORD *)(a4 + 84); *(_OWORD *)(v16 + 100) = v22; *(_OWORD *)(v16 + 116) = v23; *(_OWORD *)(v16 + 132) = v24; ggml_set_name(v16, a4 + 256); for ( j = 19LL; j != 29; ++j ) { v28 = *(_QWORD *)(a4 + 8 * j); if ( v28 ) *(_QWORD *)(v16 + 8 * j) = graph_copy_dup_tensor(a1, a2, v32, v28, v25, v26, a8, a9, a10); } *(_QWORD *)(a1 + 8 * v13) = v16; return v16; }
graph_copy_dup_tensor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RSI TEST RCX,RCX JZ 0x00128e28 MOV R14,RCX CMP qword ptr [RCX + 0xf8],0x0 JZ 0x00128e44 MOV RBX,RDI LEA R13,[RSP + 0x60] MOV RAX,R14 SHR RAX,0x4 MOV RDI,qword ptr [R13] MOV RSI,qword ptr [R13 + 0x8] XOR EDX,EDX DIV RDI MOV RAX,qword ptr [R13 + 0x10] MOV RBP,RDX LAB_00128c8d: MOV R8,RBP SHR R8,0x5 MOV R9D,dword ptr [RSI + R8*0x4] MOV R10D,0x1 MOV ECX,EBP SHL R10D,CL BT R9D,EBP JNC 0x00128cdd CMP qword ptr [RAX + RBP*0x8],R14 JZ 0x00128cee INC RBP CMP RBP,RDI MOV ECX,0x0 CMOVZ RBP,RCX CMP RBP,RDX JNZ 0x00128c8d LEA RDI,[0x14e769] LEA RDX,[0x14e5e9] MOV ESI,0xff XOR EAX,EAX CALL 0x00117cd0 LAB_00128cdd: OR R10D,R9D MOV dword ptr [RSI + R8*0x4],R10D MOV qword ptr [RAX + RBP*0x8],R14 CMP RBP,-0x2 JNZ 0x00128d02 LAB_00128cee: MOV RDI,R13 MOV RSI,R14 CALL 0x00128ef7 MOV R12,qword ptr [RBX + RAX*0x8] JMP 0x00128e16 LAB_00128d02: CMP qword ptr [R14 + 0xf8],0x0 JZ 0x00128d1b CMP qword ptr [R14 + 0xe8],0x0 MOV RDI,qword ptr [RSP + 0x18] JZ 0x00128d20 LAB_00128d1b: MOV RDI,qword ptr [RSP + 0x20] LAB_00128d20: MOV RSI,R14 CALL 0x00117040 MOV R12,RAX MOV EAX,0x6 LAB_00128d30: MOV RCX,qword ptr [R14 + RAX*0x8] MOV qword ptr [R12 + RAX*0x8],RCX INC RAX CMP RAX,0xa JNZ 0x00128d30 MOV RCX,qword ptr [R14 + 0xe8] TEST RCX,RCX JZ 0x00128d88 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00128c38 MOV qword ptr [R12 + 0xe8],RAX MOV RAX,qword ptr [R14 + 0xf0] MOV qword ptr [R12 + 0xf0],RAX LAB_00128d88: MOV EAX,dword ptr [R14 + 0x50] MOV dword ptr [R12 + 0x50],EAX MOVUPS XMM0,xmmword ptr [R14 + 0x54] MOVUPS XMM1,xmmword ptr [R14 + 0x64] MOVUPS XMM2,xmmword ptr [R14 + 0x74] MOVUPS XMM3,xmmword ptr [R14 + 0x84] MOVUPS xmmword ptr [R12 + 0x54],XMM0 MOVUPS xmmword ptr [R12 + 0x64],XMM1 MOVUPS xmmword ptr [R12 + 0x74],XMM2 MOVUPS xmmword ptr [R12 + 0x84],XMM3 LEA RSI,[R14 + 0x100] MOV RDI,R12 CALL 0x00117ea0 MOV R15D,0x13 LAB_00128dd8: MOV RCX,qword ptr [R14 + R15*0x8] TEST RCX,RCX JZ 0x00128e09 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00128c38 MOV qword ptr [R12 + R15*0x8],RAX LAB_00128e09: INC R15 CMP R15,0x1d JNZ 0x00128dd8 MOV qword ptr [RBX + RBP*0x8],R12 LAB_00128e16: MOV RAX,R12 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00128e28: LEA RDI,[0x14f814] LEA RDX,[0x14c665] LEA RCX,[0x14fdd1] MOV ESI,0x687 JMP 0x00128e5e LAB_00128e44: LEA RDI,[0x14f814] LEA RDX,[0x14c665] LEA RCX,[0x15047e] MOV ESI,0x688 LAB_00128e5e: XOR EAX,EAX CALL 0x00117cd0
/* graph_copy_dup_tensor(ggml_hash_set, ggml_tensor**, ggml_context*, ggml_context*, ggml_tensor*) */ long graph_copy_dup_tensor (long param_1,int8 param_2,int8 param_3,ggml_tensor *param_4, int8 param_5,int8 param_6,ulong param_7,long param_8,long param_9) { uint uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 uVar12; int4 uVar13; int4 uVar14; int4 uVar15; int4 uVar16; long lVar17; long lVar18; int8 uVar19; char *pcVar20; ulong uVar21; ulong uVar22; if (param_4 == (ggml_tensor *)0x0) { pcVar20 = "src != NULL"; uVar19 = 0x687; } else { if (*(long *)(param_4 + 0xf8) != 0) { uVar21 = ((ulong)param_4 >> 4) % param_7; uVar22 = uVar21; while( true ) { uVar1 = *(uint *)(param_8 + (uVar22 >> 5) * 4); if ((uVar1 >> ((uint)uVar22 & 0x1f) & 1) == 0) break; if (*(ggml_tensor **)(param_9 + uVar22 * 8) == param_4) goto LAB_00128cee; uVar22 = uVar22 + 1; if (uVar22 == param_7) { uVar22 = 0; } if (uVar22 == uVar21) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h" ,0xff,"fatal error"); } } *(uint *)(param_8 + (uVar22 >> 5) * 4) = 1 << ((byte)uVar22 & 0x1f) | uVar1; *(ggml_tensor **)(param_9 + uVar22 * 8) = param_4; if (uVar22 == 0xfffffffffffffffe) { LAB_00128cee: lVar17 = ggml_hash_find((ggml_hash_set *)&param_7,param_4); lVar17 = *(long *)(param_1 + lVar17 * 8); } else { if ((*(long *)(param_4 + 0xf8) == 0) || (uVar19 = param_2, *(long *)(param_4 + 0xe8) != 0)) { uVar19 = param_3; } lVar17 = ggml_dup_tensor(uVar19,param_4); lVar18 = 6; do { *(int8 *)(lVar17 + lVar18 * 8) = *(int8 *)(param_4 + lVar18 * 8); lVar18 = lVar18 + 1; } while (lVar18 != 10); if (*(long *)(param_4 + 0xe8) != 0) { uVar19 = graph_copy_dup_tensor(param_1,param_2,param_3); *(int8 *)(lVar17 + 0xe8) = uVar19; *(int8 *)(lVar17 + 0xf0) = *(int8 *)(param_4 + 0xf0); } *(int4 *)(lVar17 + 0x50) = *(int4 *)(param_4 + 0x50); uVar2 = *(int4 *)(param_4 + 0x58); uVar3 = *(int4 *)(param_4 + 0x5c); uVar4 = *(int4 *)(param_4 + 0x60); uVar5 = *(int4 *)(param_4 + 100); uVar6 = *(int4 *)(param_4 + 0x68); uVar7 = *(int4 *)(param_4 + 0x6c); uVar8 = *(int4 *)(param_4 + 0x70); uVar9 = *(int4 *)(param_4 + 0x74); uVar10 = *(int4 *)(param_4 + 0x78); uVar11 = *(int4 *)(param_4 + 0x7c); uVar12 = *(int4 *)(param_4 + 0x80); uVar13 = *(int4 *)(param_4 + 0x84); uVar14 = *(int4 *)(param_4 + 0x88); uVar15 = *(int4 *)(param_4 + 0x8c); uVar16 = *(int4 *)(param_4 + 0x90); *(int4 *)(lVar17 + 0x54) = *(int4 *)(param_4 + 0x54); *(int4 *)(lVar17 + 0x58) = uVar2; *(int4 *)(lVar17 + 0x5c) = uVar3; *(int4 *)(lVar17 + 0x60) = uVar4; *(int4 *)(lVar17 + 100) = uVar5; *(int4 *)(lVar17 + 0x68) = uVar6; *(int4 *)(lVar17 + 0x6c) = uVar7; *(int4 *)(lVar17 + 0x70) = uVar8; *(int4 *)(lVar17 + 0x74) = uVar9; *(int4 *)(lVar17 + 0x78) = uVar10; *(int4 *)(lVar17 + 0x7c) = uVar11; *(int4 *)(lVar17 + 0x80) = uVar12; *(int4 *)(lVar17 + 0x84) = uVar13; *(int4 *)(lVar17 + 0x88) = uVar14; *(int4 *)(lVar17 + 0x8c) = uVar15; *(int4 *)(lVar17 + 0x90) = uVar16; ggml_set_name(lVar17,param_4 + 0x100); lVar18 = 0x13; do { if (*(long *)(param_4 + lVar18 * 8) != 0) { uVar19 = graph_copy_dup_tensor(param_1,param_2,param_3); *(int8 *)(lVar17 + lVar18 * 8) = uVar19; } lVar18 = lVar18 + 1; } while (lVar18 != 0x1d); *(long *)(param_1 + uVar22 * 8) = lVar17; } return lVar17; } pcVar20 = "src->data && \"graph must be allocated\""; uVar19 = 0x688; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp" ,uVar19,"GGML_ASSERT(%s) failed",pcVar20); }
39,908
ma_check_if_right_bitmap_type
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info, enum en_page_type page_type, pgcache_page_no_t page, uint *bitmap_pattern) { if ((*bitmap_pattern= _ma_bitmap_get_page_bits(info, &info->s->bitmap, page)) > 7) return 1; /* Couldn't read page */ switch (page_type) { case HEAD_PAGE: return *bitmap_pattern < 1 || *bitmap_pattern > 4; case TAIL_PAGE: return *bitmap_pattern < 5; case BLOB_PAGE: return *bitmap_pattern != 7; default: break; } DBUG_ASSERT(0); return 1; }
O0
c
ma_check_if_right_bitmap_type: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi addq $0xa10, %rsi # imm = 0xA10 movq -0x20(%rbp), %rdx callq 0x484b0 movq -0x28(%rbp), %rcx movl %eax, (%rcx) cmpl $0x7, %eax jbe 0x49373 movb $0x1, -0x1(%rbp) jmp 0x493ee movl -0x14(%rbp), %eax movl %eax, -0x2c(%rbp) subl $0x1, %eax je 0x49394 jmp 0x49380 movl -0x2c(%rbp), %eax subl $0x2, %eax je 0x493bc jmp 0x4938a movl -0x2c(%rbp), %eax subl $0x3, %eax je 0x493d0 jmp 0x493e4 movq -0x28(%rbp), %rcx movb $0x1, %al cmpl $0x1, (%rcx) movb %al, -0x2d(%rbp) jb 0x493af movq -0x28(%rbp), %rax cmpl $0x4, (%rax) seta %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x493ee movq -0x28(%rbp), %rax cmpl $0x5, (%rax) setb %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x493ee movq -0x28(%rbp), %rax cmpl $0x7, (%rax) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x493ee jmp 0x493e6 jmp 0x493e8 jmp 0x493ea movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_check_if_right_bitmap_type: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] add rsi, 0A10h mov rdx, [rbp+var_20] call _ma_bitmap_get_page_bits mov rcx, [rbp+var_28] mov [rcx], eax cmp eax, 7 jbe short loc_49373 mov [rbp+var_1], 1 jmp short loc_493EE loc_49373: mov eax, [rbp+var_14] mov [rbp+var_2C], eax sub eax, 1 jz short loc_49394 jmp short $+2 loc_49380: mov eax, [rbp+var_2C] sub eax, 2 jz short loc_493BC jmp short $+2 loc_4938A: mov eax, [rbp+var_2C] sub eax, 3 jz short loc_493D0 jmp short loc_493E4 loc_49394: mov rcx, [rbp+var_28] mov al, 1 cmp dword ptr [rcx], 1 mov [rbp+var_2D], al jb short loc_493AF mov rax, [rbp+var_28] cmp dword ptr [rax], 4 setnbe al mov [rbp+var_2D], al loc_493AF: mov al, [rbp+var_2D] and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_493EE loc_493BC: mov rax, [rbp+var_28] cmp dword ptr [rax], 5 setb al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_493EE loc_493D0: mov rax, [rbp+var_28] cmp dword ptr [rax], 7 setnz al and al, 1 movzx eax, al mov [rbp+var_1], al jmp short loc_493EE loc_493E4: jmp short $+2 loc_493E6: jmp short $+2 loc_493E8: jmp short $+2 loc_493EA: mov [rbp+var_1], 1 loc_493EE: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_check_if_right_bitmap_type(_QWORD *a1, int a2, long long a3, unsigned int *a4) { unsigned int page_bits; // eax bool v6; // [rsp+3h] [rbp-2Dh] page_bits = ma_bitmap_get_page_bits((long long)a1, *a1 + 2576LL, a3); *a4 = page_bits; if ( page_bits > 7 ) return 1; if ( a2 == 1 ) { v6 = 1; if ( *a4 ) return *a4 > 4; return v6; } else if ( a2 == 2 ) { return *a4 < 5; } else { return a2 != 3 || *a4 != 7; } }
_ma_check_if_right_bitmap_type: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] ADD RSI,0xa10 MOV RDX,qword ptr [RBP + -0x20] CALL 0x001484b0 MOV RCX,qword ptr [RBP + -0x28] MOV dword ptr [RCX],EAX CMP EAX,0x7 JBE 0x00149373 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001493ee LAB_00149373: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x2c],EAX SUB EAX,0x1 JZ 0x00149394 JMP 0x00149380 LAB_00149380: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x2 JZ 0x001493bc JMP 0x0014938a LAB_0014938a: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x3 JZ 0x001493d0 JMP 0x001493e4 LAB_00149394: MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x1 CMP dword ptr [RCX],0x1 MOV byte ptr [RBP + -0x2d],AL JC 0x001493af MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x4 SETA AL MOV byte ptr [RBP + -0x2d],AL LAB_001493af: MOV AL,byte ptr [RBP + -0x2d] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x001493ee LAB_001493bc: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x5 SETC AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x001493ee LAB_001493d0: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],0x7 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x001493ee LAB_001493e4: JMP 0x001493e6 LAB_001493e6: JMP 0x001493e8 LAB_001493e8: JMP 0x001493ea LAB_001493ea: MOV byte ptr [RBP + -0x1],0x1 LAB_001493ee: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool _ma_check_if_right_bitmap_type(long *param_1,int param_2,int8 param_3,uint *param_4) { uint uVar1; bool local_35; bool local_9; uVar1 = _ma_bitmap_get_page_bits(param_1,*param_1 + 0xa10,param_3); *param_4 = uVar1; if (uVar1 < 8) { if (param_2 == 1) { local_35 = true; if (*param_4 != 0) { local_35 = 4 < *param_4; } local_9 = local_35; } else if (param_2 == 2) { local_9 = *param_4 < 5; } else if (param_2 == 3) { local_9 = *param_4 != 7; } else { local_9 = true; } } else { local_9 = true; } return local_9; }
39,909
testing::internal::ReportInvalidTestSuiteType(char const*, testing::internal::CodeLocation const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void ReportInvalidTestSuiteType(const char* test_suite_name, const CodeLocation& code_location) { Message errors; errors << "Attempted redefinition of test suite " << test_suite_name << ".\n" << "All tests in the same test suite must use the same test fixture\n" << "class. However, in test suite " << test_suite_name << ", you tried\n" << "to define a test using a fixture class different from the one\n" << "used earlier. This can happen if the two fixture classes are\n" << "from different namespaces and have the same name. You should\n" << "probably rename one of the classes to put the tests into different\n" << "test suites."; GTEST_LOG_(ERROR) << FormatFileLocation(code_location.file.c_str(), code_location.line) << " " << errors.GetString(); }
O1
cpp
testing::internal::ReportInvalidTestSuiteType(char const*, testing::internal::CodeLocation const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %r12 leaq 0x10(%rsp), %rbx movq %rbx, %rdi callq 0x1cd64 movq (%rbx), %rbx leaq 0x10(%rbx), %r15 leaq 0x21cd2(%rip), %rsi # 0x42f8b movl $0x25, %edx movq %r15, %rdi callq 0x85b0 testq %r12, %r12 je 0x212db movq %r12, %rdi callq 0x8200 movq %rax, %rdx movq %r12, %rsi jmp 0x212e7 movl $0x6, %edx leaq 0x1f302(%rip), %rsi # 0x405e9 movq %r15, %rdi callq 0x85b0 leaq 0x21f2e(%rip), %rsi # 0x43224 movl $0x2, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21a05(%rip), %rsi # 0x42d0f movl $0x40, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21b17(%rip), %rsi # 0x42e35 movl $0x1f, %edx movq %r15, %rdi callq 0x85b0 testq %r12, %r12 je 0x2133d movq %r12, %rdi callq 0x8200 movq %rax, %rdx jmp 0x21349 movl $0x6, %edx leaq 0x1f2a0(%rip), %r12 # 0x405e9 movq %r15, %rdi movq %r12, %rsi callq 0x85b0 leaq 0x21c56(%rip), %rsi # 0x42fb1 movl $0xc, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21c4f(%rip), %rsi # 0x42fbe movl $0x3e, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21c7a(%rip), %rsi # 0x42ffd movl $0x3d, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21ca4(%rip), %rsi # 0x4303b movl $0x3d, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21cce(%rip), %rsi # 0x43079 movl $0x43, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21b9e(%rip), %rsi # 0x42f5d movl $0xc, %edx movq %r15, %rdi callq 0x85b0 leaq 0x2133a(%rip), %rdx # 0x4270d leaq 0xc(%rsp), %rdi movl $0x2, %esi movl $0xb0b, %ecx # imm = 0xB0B callq 0x16e72 movq (%r14), %rsi movl 0x20(%r14), %edx leaq 0x38(%rsp), %rdi callq 0x169a6 movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x37bdf(%rip), %rdi # 0x58fe8 callq 0x85b0 movq %rax, %r14 leaq 0x2172d(%rip), %rsi # 0x42b45 movl $0x1, %edx movq %rax, %rdi callq 0x85b0 leaq 0x18(%rsp), %rdi movq %rbx, %rsi callq 0x1cfc7 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq %r14, %rdi callq 0x85b0 leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2145f movq 0x28(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2147a movq 0x48(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0xc(%rsp), %rdi callq 0x16fb4 testq %rbx, %rbx je 0x21492 movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x214ca movq 0x28(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x214ca jmp 0x214c7 movq %rax, %rbx jmp 0x214e5 jmp 0x214f1 movq %rax, %rbx leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x214e5 movq 0x48(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0xc(%rsp), %rdi callq 0x16fb4 jmp 0x214f4 movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x21504 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x8990
_ZN7testing8internal26ReportInvalidTestSuiteTypeEPKcRKNS0_12CodeLocationE: push r15; __int64 push r14; int push r12; void * push rbx; int sub rsp, 58h mov r14, rsi mov r12, rdi lea rbx, [rsp+78h+var_68] mov rdi, rbx; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rbx, [rbx] lea r15, [rbx+10h] lea rsi, aAttemptedRedef; "Attempted redefinition of test suite " mov edx, 25h ; '%' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jz short loc_212DB mov rdi, r12 call _strlen mov rdx, rax mov rsi, r12 jmp short loc_212E7 loc_212DB: mov edx, 6 lea rsi, aNull; "(null)" loc_212E7: mov rdi, r15 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, aNoteRandomizin+32h; ".\n" mov edx, 2 mov rdi, r15 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, aAllTestsInTheS; "All tests in the same test suite must u"... mov edx, 40h ; '@' mov rdi, r15 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, aClassHoweverIn; "class. However, in test suite " mov edx, 1Fh mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jz short loc_2133D mov rdi, r12 call _strlen mov rdx, rax jmp short loc_21349 loc_2133D: mov edx, 6 lea r12, aNull; "(null)" loc_21349: mov rdi, r15 mov rsi, r12 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, aYouTried; ", you tried\n" mov edx, 0Ch mov rdi, r15 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, aToDefineATestU; "to define a test using a fixture class "... mov edx, 3Eh ; '>' mov rdi, r15 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, aUsedEarlierThi; "used earlier. This can happen if the tw"... mov edx, 3Dh ; '=' mov rdi, r15 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, aFromDifferentN; "from different namespaces and have the "... mov edx, 3Dh ; '=' mov rdi, r15 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, aProbablyRename; "probably rename one of the classes to p"... mov edx, 43h ; 'C' mov rdi, r15 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, aOfTheClassesTo+2Fh; "test suites." mov edx, 0Ch mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+78h+var_6C] mov esi, 2 mov ecx, 0B0Bh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rsi, [r14]; int mov edx, [r14+20h]; int lea rdi, [rsp+78h+var_40]; int call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int) mov rsi, qword ptr [rsp+78h+var_40] mov rdx, [rsp+78h+var_38] mov rdi, cs:_ZSt4cerr_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, asc_42B43+2; " " mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+78h+var_60] mov rsi, rbx call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rsi, [rsp+78h+var_60] mov rdx, [rsp+78h+var_58] 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 rax, [rsp+78h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2145F mov rsi, [rsp+78h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2145F: lea rax, [rsp+78h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2147A mov rsi, [rsp+78h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2147A: lea rdi, [rsp+78h+var_6C]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() test rbx, rbx jz short loc_21492 mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] loc_21492: add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_214CA mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_214CA jmp short loc_214C7 mov rbx, rax jmp short loc_214E5 jmp short loc_214F1 loc_214C7: mov rbx, rax loc_214CA: lea rax, [rsp+arg_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_214E5 mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_214E5: lea rdi, [rsp+arg_4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_214F4 loc_214F1: mov rbx, rax loc_214F4: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_21504 mov rax, [rdi] call qword ptr [rax+8] loc_21504: mov rdi, rbx call __Unwind_Resume
void testing::internal::ReportInvalidTestSuiteType(const char *a1, long long a2) { const char *v3; // r12 long long v4; // rbx long long v5; // rdx const char *v6; // rsi long long v7; // rdx long long v8; // r14 void *v9; // rsi long long v10; // rdx long long v11; // rcx int v12; // [rsp+Ch] [rbp-6Ch] BYREF long long v13; // [rsp+10h] [rbp-68h] BYREF void *v14[2]; // [rsp+18h] [rbp-60h] BYREF long long v15; // [rsp+28h] [rbp-50h] BYREF int v16[2]; // [rsp+38h] [rbp-40h] BYREF long long v17; // [rsp+40h] [rbp-38h] long long v18; // [rsp+48h] [rbp-30h] BYREF v3 = a1; testing::Message::Message((testing::Message *)&v13); v4 = v13; std::__ostream_insert<char,std::char_traits<char>>(v13 + 16, "Attempted redefinition of test suite ", 37LL); if ( a1 ) { v5 = strlen(a1); v6 = a1; } else { v5 = 6LL; v6 = "(null)"; } std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, v6, v5); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, ".\n", 2LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "All tests in the same test suite must use the same test fixture\n", 64LL); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, "class. However, in test suite ", 31LL); if ( a1 ) { v7 = strlen(a1); } else { v7 = 6LL; v3 = "(null)"; } std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, v3, v7); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, ", you tried\n", 12LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "to define a test using a fixture class different from the one\n", 62LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "used earlier. This can happen if the two fixture classes are\n", 61LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "from different namespaces and have the same name. You should\n", 61LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "probably rename one of the classes to put the tests into different\n", 67LL); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, "test suites.", 12LL); testing::internal::GTestLog::GTestLog( &v12, 2, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc", 2827); testing::internal::FormatFileLocation[abi:cxx11]((long long)v16, *(const char **)a2, *(_DWORD *)(a2 + 32)); v8 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *(_QWORD *)v16, v17); std::__ostream_insert<char,std::char_traits<char>>(v8, " ", 1LL); testing::internal::StringStreamToString((long long)v14, v4); v9 = v14[0]; std::__ostream_insert<char,std::char_traits<char>>(v8, v14[0], v14[1]); if ( v14[0] != &v15 ) { v9 = (void *)(v15 + 1); operator delete(v14[0], v15 + 1); } if ( *(long long **)v16 != &v18 ) { v9 = (void *)(v18 + 1); operator delete(*(void **)v16, v18 + 1); } testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v12, (long long)v9, v10, v11); if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); }
ReportInvalidTestSuiteType: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV R12,RDI LEA RBX,[RSP + 0x10] MOV RDI,RBX CALL 0x0011cd64 MOV RBX,qword ptr [RBX] LEA R15,[RBX + 0x10] LAB_001212b2: LEA RSI,[0x142f8b] MOV EDX,0x25 MOV RDI,R15 CALL 0x001085b0 TEST R12,R12 JZ 0x001212db MOV RDI,R12 CALL 0x00108200 MOV RDX,RAX MOV RSI,R12 JMP 0x001212e7 LAB_001212db: MOV EDX,0x6 LEA RSI,[0x1405e9] LAB_001212e7: MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x143224] MOV EDX,0x2 MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142d0f] MOV EDX,0x40 MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142e35] MOV EDX,0x1f MOV RDI,R15 CALL 0x001085b0 TEST R12,R12 JZ 0x0012133d MOV RDI,R12 CALL 0x00108200 MOV RDX,RAX JMP 0x00121349 LAB_0012133d: MOV EDX,0x6 LEA R12,[0x1405e9] LAB_00121349: MOV RDI,R15 MOV RSI,R12 CALL 0x001085b0 LEA RSI,[0x142fb1] MOV EDX,0xc MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142fbe] MOV EDX,0x3e MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142ffd] MOV EDX,0x3d MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x14303b] MOV EDX,0x3d MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x143079] MOV EDX,0x43 MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142f5d] MOV EDX,0xc MOV RDI,R15 CALL 0x001085b0 LAB_001213cc: LEA RDX,[0x14270d] LEA RDI,[RSP + 0xc] MOV ESI,0x2 MOV ECX,0xb0b CALL 0x00116e72 MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x20] LAB_001213ee: LEA RDI,[RSP + 0x38] CALL 0x001169a6 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] LAB_00121402: MOV RDI,qword ptr [0x00158fe8] CALL 0x001085b0 MOV R14,RAX LEA RSI,[0x142b45] MOV EDX,0x1 MOV RDI,RAX CALL 0x001085b0 LAB_00121425: LEA RDI,[RSP + 0x18] MOV RSI,RBX CALL 0x0011cfc7 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_0012143c: MOV RDI,R14 CALL 0x001085b0 LAB_00121444: LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012145f MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x001084e0 LAB_0012145f: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012147a MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001084e0 LAB_0012147a: LEA RDI,[RSP + 0xc] CALL 0x00116fb4 TEST RBX,RBX JZ 0x00121492 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x8] LAB_00121492: ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET
/* testing::internal::ReportInvalidTestSuiteType(char const*, testing::internal::CodeLocation const&) */ void testing::internal::ReportInvalidTestSuiteType(char *param_1,CodeLocation *param_2) { size_t sVar1; ostream *poVar2; char *pcVar3; GTestLog local_6c [4]; long *local_68; long *local_60; long local_58; long local_50 [2]; long *local_40; long local_38; long local_30 [2]; Message::Message((Message *)&local_68); poVar2 = (ostream *)(local_68 + 2); /* try { // try from 001212b2 to 001213cb has its CatchHandler @ 001214f1 */ std::__ostream_insert<char,std::char_traits<char>> (poVar2,"Attempted redefinition of test suite ",0x25); if (param_1 == (char *)0x0) { sVar1 = 6; pcVar3 = "(null)"; } else { sVar1 = strlen(param_1); pcVar3 = param_1; } std::__ostream_insert<char,std::char_traits<char>>(poVar2,pcVar3,sVar1); std::__ostream_insert<char,std::char_traits<char>>(poVar2,".\n",2); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"All tests in the same test suite must use the same test fixture\n",0x40); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"class. However, in test suite ",0x1f); if (param_1 == (char *)0x0) { sVar1 = 6; param_1 = "(null)"; } else { sVar1 = strlen(param_1); } std::__ostream_insert<char,std::char_traits<char>>(poVar2,param_1,sVar1); std::__ostream_insert<char,std::char_traits<char>>(poVar2,", you tried\n",0xc); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"to define a test using a fixture class different from the one\n",0x3e); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"used earlier. This can happen if the two fixture classes are\n",0x3d); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"from different namespaces and have the same name. You should\n",0x3d); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"probably rename one of the classes to put the tests into different\n",0x43); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"test suites.",0xc); /* try { // try from 001213cc to 001213e6 has its CatchHandler @ 001214c5 */ GTestLog::GTestLog(local_6c,2, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc" ,0xb0b); /* try { // try from 001213ee to 001213f7 has its CatchHandler @ 001214c0 */ FormatFileLocation_abi_cxx11_((internal *)&local_40,*(char **)param_2,*(int *)(param_2 + 0x20)); /* try { // try from 00121402 to 00121424 has its CatchHandler @ 001214c7 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,(char *)local_40,local_38); std::__ostream_insert<char,std::char_traits<char>>(poVar2," ",1); /* try { // try from 00121425 to 00121431 has its CatchHandler @ 001214be */ StringStreamToString((stringstream *)&local_60); /* try { // try from 0012143c to 00121443 has its CatchHandler @ 0012149e */ std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_60,local_58); if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } GTestLog::~GTestLog(local_6c); if (local_68 != (long *)0x0) { (**(code **)(*local_68 + 8))(local_68); } return; }
39,910
get_last_value
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
static bytes_t get_last_value(ssz_ob_t proof) { bytes_t last_value = ssz_at(proof, ssz_len(proof) - 1).bytes; if (!last_value.data) return NULL_BYTES; if (rlp_decode(&last_value, 0, &last_value) != RLP_LIST) return NULL_BYTES; switch ((int) rlp_decode(&last_value, -1, &last_value)) { case 2: // must be a leaf (otherwise the verification would have failed) if (rlp_decode(&last_value, 1, &last_value) != RLP_ITEM) return NULL_BYTES; break; case 17: // branch noch with the value if (rlp_decode(&last_value, 16, &last_value) != RLP_ITEM) return NULL_BYTES; break; default: return NULL_BYTES; } return last_value; }
O0
c
get_last_value: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x1b380 movl %eax, %esi movq -0x40(%rbp), %rax subl $0x1, %esi leaq -0x38(%rbp), %rdi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x1b0d0 movq -0x38(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x13364 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x13425 leaq -0x20(%rbp), %rdx xorl %esi, %esi movq %rdx, %rdi callq 0x15f10 cmpl $0x2, %eax je 0x1338b movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x13425 movl $0xffffffff, %esi # imm = 0xFFFFFFFF leaq -0x20(%rbp), %rdx movq %rdx, %rdi callq 0x15f10 movl %eax, %ecx movl %ecx, -0x44(%rbp) subl $0x2, %eax je 0x133b2 jmp 0x133a8 movl -0x44(%rbp), %eax subl $0x11, %eax je 0x133db jmp 0x13404 leaq -0x20(%rbp), %rdx movl $0x1, %esi movq %rdx, %rdi callq 0x15f10 cmpl $0x1, %eax je 0x133d9 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x13425 jmp 0x13415 leaq -0x20(%rbp), %rdx movl $0x10, %esi movq %rdx, %rdi callq 0x15f10 cmpl $0x1, %eax je 0x13402 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x13425 jmp 0x13415 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x13425 movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_last_value: push rbp mov rbp, rsp sub rsp, 60h lea rax, [rbp+arg_0] mov [rbp+var_40], rax mov rcx, [rax] mov [rsp+60h+var_60], rcx mov rcx, [rax+8] mov [rsp+60h+var_58], rcx mov rax, [rax+10h] mov [rsp+60h+var_50], rax call ssz_len mov esi, eax mov rax, [rbp+var_40] sub esi, 1 lea rdi, [rbp+var_38] mov rcx, [rax] mov [rsp+60h+var_60], rcx mov rcx, [rax+8] mov [rsp+60h+var_58], rcx mov rax, [rax+10h] mov [rsp+60h+var_50], rax call ssz_at mov rax, [rbp+var_38] mov [rbp+var_20], rax mov rax, [rbp+var_30] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_13364 mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp loc_13425 loc_13364: lea rdx, [rbp+var_20] xor esi, esi mov rdi, rdx call rlp_decode cmp eax, 2 jz short loc_1338B mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp loc_13425 loc_1338B: mov esi, 0FFFFFFFFh lea rdx, [rbp+var_20] mov rdi, rdx call rlp_decode mov ecx, eax mov [rbp+var_44], ecx sub eax, 2 jz short loc_133B2 jmp short $+2 loc_133A8: mov eax, [rbp+var_44] sub eax, 11h jz short loc_133DB jmp short loc_13404 loc_133B2: lea rdx, [rbp+var_20] mov esi, 1 mov rdi, rdx call rlp_decode cmp eax, 1 jz short loc_133D9 mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp short loc_13425 loc_133D9: jmp short loc_13415 loc_133DB: lea rdx, [rbp+var_20] mov esi, 10h mov rdi, rdx call rlp_decode cmp eax, 1 jz short loc_13402 mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp short loc_13425 loc_13402: jmp short loc_13415 loc_13404: mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp short loc_13425 loc_13415: mov rax, [rbp+var_20] mov [rbp+var_10], rax mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_13425: mov eax, dword ptr [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 60h pop rbp retn
long long get_last_value( int a1, int a2, int a3, _DWORD a4, int a5, int a6, long long a7, long long a8, long long a9) { int v9; // eax int v10; // edx int v11; // r8d int v12; // r9d int v14; // [rsp+1Ch] [rbp-44h] long long v15; // [rsp+28h] [rbp-38h] BYREF long long v16; // [rsp+30h] [rbp-30h] long long v17; // [rsp+40h] [rbp-20h] BYREF long long v18; // [rsp+48h] [rbp-18h] long long v19; // [rsp+50h] [rbp-10h] long long v20; // [rsp+58h] [rbp-8h] v9 = ssz_len(a1, a2, a3, a8, a5, a6, a7, a8, a9); ssz_at((unsigned int)&v15, v9 - 1, v10, a8, v11, v12, a7, a8, a9); v17 = v15; v18 = v16; if ( v16 ) { if ( (unsigned int)rlp_decode(&v17, 0LL) == 2 ) { v14 = rlp_decode(&v17, 0xFFFFFFFFLL); if ( v14 == 2 ) { if ( (unsigned int)rlp_decode(&v17, 1LL) != 1 ) { LODWORD(v19) = 0; v20 = 0LL; return (unsigned int)v19; } } else { if ( v14 != 17 ) { LODWORD(v19) = 0; v20 = 0LL; return (unsigned int)v19; } if ( (unsigned int)rlp_decode(&v17, 16LL) != 1 ) { LODWORD(v19) = 0; v20 = 0LL; return (unsigned int)v19; } } v19 = v17; v20 = v18; return (unsigned int)v19; } LODWORD(v19) = 0; v20 = 0LL; } else { LODWORD(v19) = 0; v20 = 0LL; } return (unsigned int)v19; }
get_last_value: PUSH RBP MOV RBP,RSP SUB RSP,0x60 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0011b380 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x40] SUB ESI,0x1 LEA RDI,[RBP + -0x38] 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 0x0011b0d0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00113364 MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00113425 LAB_00113364: LEA RDX,[RBP + -0x20] XOR ESI,ESI MOV RDI,RDX CALL 0x00115f10 CMP EAX,0x2 JZ 0x0011338b MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00113425 LAB_0011338b: MOV ESI,0xffffffff LEA RDX,[RBP + -0x20] MOV RDI,RDX CALL 0x00115f10 MOV ECX,EAX MOV dword ptr [RBP + -0x44],ECX SUB EAX,0x2 JZ 0x001133b2 JMP 0x001133a8 LAB_001133a8: MOV EAX,dword ptr [RBP + -0x44] SUB EAX,0x11 JZ 0x001133db JMP 0x00113404 LAB_001133b2: LEA RDX,[RBP + -0x20] MOV ESI,0x1 MOV RDI,RDX CALL 0x00115f10 CMP EAX,0x1 JZ 0x001133d9 MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00113425 LAB_001133d9: JMP 0x00113415 LAB_001133db: LEA RDX,[RBP + -0x20] MOV ESI,0x10 MOV RDI,RDX CALL 0x00115f10 CMP EAX,0x1 JZ 0x00113402 MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00113425 LAB_00113402: JMP 0x00113415 LAB_00113404: MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00113425 LAB_00113415: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_00113425: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
int1 [16] get_last_value(void) { int iVar1; int1 auVar2 [16]; ulong local_40; long local_38; ulong local_28; long local_20; ulong local_18; long local_10; iVar1 = ssz_len(); ssz_at(&local_40,iVar1 + -1); local_28 = local_40; local_20 = local_38; if (local_38 == 0) { local_18 = 0; local_10 = 0; } else { iVar1 = rlp_decode(&local_28,0); if (iVar1 == 2) { iVar1 = rlp_decode(&local_28,0xffffffff); if (iVar1 == 2) { iVar1 = rlp_decode(&local_28,1); if (iVar1 != 1) { local_18 = 0; local_10 = 0; goto LAB_00113425; } } else { if (iVar1 != 0x11) { local_18 = 0; local_10 = 0; goto LAB_00113425; } iVar1 = rlp_decode(&local_28,0x10); if (iVar1 != 1) { local_18 = 0; local_10 = 0; goto LAB_00113425; } } local_18 = local_28; local_10 = local_20; } else { local_18 = 0; local_10 = 0; } } LAB_00113425: auVar2._0_8_ = local_18 & 0xffffffff; auVar2._8_8_ = local_10; return auVar2; }
39,911
get_last_value
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
static bytes_t get_last_value(ssz_ob_t proof) { bytes_t last_value = ssz_at(proof, ssz_len(proof) - 1).bytes; if (!last_value.data) return NULL_BYTES; if (rlp_decode(&last_value, 0, &last_value) != RLP_LIST) return NULL_BYTES; switch ((int) rlp_decode(&last_value, -1, &last_value)) { case 2: // must be a leaf (otherwise the verification would have failed) if (rlp_decode(&last_value, 1, &last_value) != RLP_ITEM) return NULL_BYTES; break; case 17: // branch noch with the value if (rlp_decode(&last_value, 16, &last_value) != RLP_ITEM) return NULL_BYTES; break; default: return NULL_BYTES; } return last_value; }
O1
c
get_last_value: pushq %rbx subq $0x50, %rsp movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x142c2 leal -0x1(%rax), %esi movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x38(%rsp), %rbx movq %rbx, %rdi callq 0x14147 movups (%rbx), %xmm0 movaps %xmm0, 0x20(%rsp) cmpq $0x0, 0x28(%rsp) je 0xf513 xorl %ebx, %ebx leaq 0x20(%rsp), %rdi xorl %esi, %esi movq %rdi, %rdx callq 0x10ef0 cmpl $0x2, %eax jne 0xf4ed leaq 0x20(%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rdi, %rdx callq 0x10ef0 cmpl $0x11, %eax je 0xf4f1 cmpl $0x2, %eax jne 0xf513 leaq 0x20(%rsp), %rdi movl $0x1, %esi jmp 0xf4fb xorl %edx, %edx jmp 0xf517 leaq 0x20(%rsp), %rdi movl $0x10, %esi movq %rdi, %rdx callq 0x10ef0 cmpl $0x1, %eax jne 0xf513 movl 0x20(%rsp), %ebx movq 0x28(%rsp), %rdx jmp 0xf517 xorl %edx, %edx xorl %ebx, %ebx movl %ebx, %eax addq $0x50, %rsp popq %rbx retq
get_last_value: push rbx sub rsp, 50h mov rax, [rsp+58h+arg_10] mov [rsp+58h+var_48], rax movaps xmm0, [rsp+58h+arg_0] movups [rsp+58h+var_58], xmm0 call ssz_len lea esi, [rax-1] mov rax, [rsp+58h+arg_10] mov [rsp+58h+var_48], rax movaps xmm0, [rsp+58h+arg_0] movups [rsp+58h+var_58], xmm0 lea rbx, [rsp+58h+var_20] mov rdi, rbx call ssz_at movups xmm0, xmmword ptr [rbx] movaps [rsp+58h+var_38], xmm0 cmp qword ptr [rsp+58h+var_38+8], 0 jz short loc_F513 xor ebx, ebx lea rdi, [rsp+58h+var_38] xor esi, esi mov rdx, rdi call rlp_decode cmp eax, 2 jnz short loc_F4ED lea rdi, [rsp+58h+var_38] mov esi, 0FFFFFFFFh mov rdx, rdi call rlp_decode cmp eax, 11h jz short loc_F4F1 cmp eax, 2 jnz short loc_F513 lea rdi, [rsp+58h+var_38] mov esi, 1 jmp short loc_F4FB loc_F4ED: xor edx, edx jmp short loc_F517 loc_F4F1: lea rdi, [rsp+58h+var_38] mov esi, 10h loc_F4FB: mov rdx, rdi call rlp_decode cmp eax, 1 jnz short loc_F513 mov ebx, dword ptr [rsp+58h+var_38] mov rdx, qword ptr [rsp+58h+var_38+8] jmp short loc_F517 loc_F513: xor edx, edx xor ebx, ebx loc_F517: mov eax, ebx add rsp, 50h pop rbx retn
long long get_last_value(int a1, int a2, int a3, int a4, int a5, int a6, __int128 a7, long long a8) { int v8; // eax int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d unsigned int v13; // ebx int v14; // eax long long v15; // rsi __int128 v17; // [rsp+20h] [rbp-38h] BYREF __int128 v18; // [rsp+38h] [rbp-20h] BYREF v8 = ssz_len(a1, a2, a3, a4, a5, a6, a7, DWORD2(a7), a8); ssz_at((unsigned int)&v18, v8 - 1, v9, v10, v11, v12, a7, *((long long *)&a7 + 1), a8); v17 = v18; if ( !*((_QWORD *)&v18 + 1) ) return 0; v13 = 0; if ( (unsigned int)rlp_decode(&v17, 0LL, &v17) != 2 ) return v13; v14 = rlp_decode(&v17, 0xFFFFFFFFLL, &v17); if ( v14 == 17 ) { v15 = 16LL; } else { if ( v14 != 2 ) return 0; v15 = 1LL; } if ( (unsigned int)rlp_decode(&v17, v15, &v17) != 1 ) return 0; return (unsigned int)v17; }
get_last_value: PUSH RBX SUB RSP,0x50 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001142c2 LEA ESI,[RAX + -0x1] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 LEA RBX,[RSP + 0x38] MOV RDI,RBX CALL 0x00114147 MOVUPS XMM0,xmmword ptr [RBX] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CMP qword ptr [RSP + 0x28],0x0 JZ 0x0010f513 XOR EBX,EBX LEA RDI,[RSP + 0x20] XOR ESI,ESI MOV RDX,RDI CALL 0x00110ef0 CMP EAX,0x2 JNZ 0x0010f4ed LEA RDI,[RSP + 0x20] MOV ESI,0xffffffff MOV RDX,RDI CALL 0x00110ef0 CMP EAX,0x11 JZ 0x0010f4f1 CMP EAX,0x2 JNZ 0x0010f513 LEA RDI,[RSP + 0x20] MOV ESI,0x1 JMP 0x0010f4fb LAB_0010f4ed: XOR EDX,EDX JMP 0x0010f517 LAB_0010f4f1: LEA RDI,[RSP + 0x20] MOV ESI,0x10 LAB_0010f4fb: MOV RDX,RDI CALL 0x00110ef0 CMP EAX,0x1 JNZ 0x0010f513 MOV EBX,dword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] JMP 0x0010f517 LAB_0010f513: XOR EDX,EDX XOR EBX,EBX LAB_0010f517: MOV EAX,EBX ADD RSP,0x50 POP RBX RET
int1 [16] get_last_value(void) { int iVar1; ulong uVar2; int8 uVar3; int1 auVar4 [16]; uint local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; uint local_20; int4 uStack_1c; int4 uStack_18; int4 uStack_14; iVar1 = ssz_len(); ssz_at(&local_20,iVar1 + -1); local_38 = local_20; uStack_34 = uStack_1c; uStack_30 = uStack_18; uStack_2c = uStack_14; if (CONCAT44(uStack_14,uStack_18) != 0) { uVar2 = 0; iVar1 = rlp_decode(&local_38,0,&local_38); if (iVar1 != 2) { uVar3 = 0; goto LAB_0010f517; } iVar1 = rlp_decode(&local_38,0xffffffff,&local_38); if (iVar1 == 0x11) { uVar3 = 0x10; } else { if (iVar1 != 2) goto LAB_0010f513; uVar3 = 1; } iVar1 = rlp_decode(&local_38,uVar3,&local_38); if (iVar1 == 1) { uVar2 = (ulong)local_38; uVar3 = CONCAT44(uStack_2c,uStack_30); goto LAB_0010f517; } } LAB_0010f513: uVar3 = 0; uVar2 = 0; LAB_0010f517: auVar4._8_8_ = uVar3; auVar4._0_8_ = uVar2; return auVar4; }
39,912
bool google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::AddExtension<google::protobuf::FieldDescriptorProto>(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::FieldDescriptorProto const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc
bool EncodedDescriptorDatabase::DescriptorIndex::AddExtension( StringPiece filename, const FieldProto& field) { if (!field.extendee().empty() && field.extendee()[0] == '.') { // The extension is fully-qualified. We can use it as a lookup key in // the by_symbol_ table. if (!InsertIfNotPresent( &by_extension_, ExtensionEntry{static_cast<int>(all_values_.size() - 1), EncodeString(field.extendee()), field.number()}) || std::binary_search( by_extension_flat_.begin(), by_extension_flat_.end(), std::make_pair(field.extendee().substr(1), field.number()), by_extension_.key_comp())) { GOOGLE_LOG(ERROR) << "Extension conflicts with extension already in database: " "extend " << field.extendee() << " { " << field.name() << " = " << field.number() << " } from:" << filename; return false; } } else { // Not fully-qualified. We can't really do anything here, unfortunately. // We don't consider this an error, though, because the descriptor is // valid. } return true; }
O3
cpp
bool google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::AddExtension<google::protobuf::FieldDescriptorProto>(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::FieldDescriptorProto const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rcx, %rbx movq %rsi, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x20(%rcx), %rdx andq $-0x4, %rdx movq 0x8(%rdx), %rcx movb $0x1, %al testq %rcx, %rcx je 0x5e66d movq (%rdx), %rdx cmpb $0x2e, (%rdx) jne 0x5e66d movq %rdi, %r15 leaq 0xa8(%rdi), %r14 movq 0x8(%rdi), %rax subq (%rdi), %rax shrq $0x4, %rax imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB decl %eax leaq 0x68(%rsp), %r12 movl %eax, -0x8(%r12) leaq 0x28(%rsp), %rsi movq %rdx, (%rsi) movq %rcx, 0x8(%rsi) movq %r12, %rdi callq 0x16b0e movl 0x48(%rbx), %eax movl %eax, 0x20(%r12) leaq 0x60(%rsp), %rsi movq %r14, %rdi callq 0x5ec84 movb $0x1, %bpl testb $0x1, %dl je 0x5e5a4 movq 0xd8(%r15), %r12 movq 0xe0(%r15), %rbp movq 0x20(%rbx), %rsi andq $-0x4, %rsi leaq 0x8(%rsp), %rdi movl $0x1, %edx movq $-0x1, %rcx callq 0x11d9c movl 0x48(%rbx), %eax leaq 0x38(%rsp), %rdx movq %rdx, -0x10(%rdx) leaq 0x18(%rsp), %r13 movq -0x10(%r13), %rcx cmpq %r13, %rcx je 0x5e547 movq %rdx, %r15 movq %rcx, 0x28(%rsp) movq 0x18(%rsp), %rcx movq %rcx, 0x38(%rsp) jmp 0x5e552 movups (%r13), %xmm0 movq %rdx, %r15 movups %xmm0, (%rdx) movq 0x10(%rsp), %rcx leaq 0x28(%rsp), %rdx movq %rcx, 0x8(%rdx) movq %r13, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) movl %eax, 0x20(%rdx) movq (%r14), %rcx movq %r12, %rdi movq %rbp, %rsi callq 0x5ec34 movl %eax, %ebp movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x5e595 callq 0xf330 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x5e5a4 callq 0xf330 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e5b7 callq 0xf330 movb $0x1, %al testb %bpl, %bpl je 0x5e66d leaq 0x5ab75(%rip), %rdx # 0xb913e leaq 0x60(%rsp), %r14 movq %r14, %rdi movl $0x2, %esi movl $0x2f5, %ecx # imm = 0x2F5 callq 0x169ca leaq 0x5ace5(%rip), %rsi # 0xb92cc movq %r14, %rdi callq 0x164c8 movq 0x20(%rbx), %rsi andq $-0x4, %rsi movq %rax, %rdi callq 0x164da leaq 0x5ad06(%rip), %rsi # 0xb930c movq %rax, %rdi callq 0x164c8 movq 0x18(%rbx), %rsi andq $-0x4, %rsi movq %rax, %rdi callq 0x164da leaq 0x573be(%rip), %rsi # 0xb59e3 movq %rax, %rdi callq 0x164c8 movl 0x48(%rbx), %esi movq %rax, %rdi callq 0x167f0 leaq 0x5acd1(%rip), %rsi # 0xb9310 movq %rax, %rdi callq 0x164c8 leaq 0x50(%rsp), %rsi movq %rax, %rdi callq 0x165f2 leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x165a2 leaq 0x60(%rsp), %rdi callq 0x169e8 xorl %eax, %eax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5e6be movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x5e693 callq 0xf330 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x5e6a9 callq 0xf330 jmp 0x5e6a9 jmp 0x5e6a6 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e6cb callq 0xf330 jmp 0x5e6cb movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x169e8 movq %rbx, %rdi callq 0xf570 nop
_ZN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex12AddExtensionINS0_20FieldDescriptorProtoEEEbNS0_20stringpiece_internal11StringPieceERKT_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rcx mov [rsp+0C8h+var_78], rsi mov [rsp+0C8h+var_70], rdx mov rdx, [rcx+20h] and rdx, 0FFFFFFFFFFFFFFFCh mov rcx, [rdx+8] mov al, 1 test rcx, rcx jz loc_5E66D mov rdx, [rdx] cmp byte ptr [rdx], 2Eh ; '.' jnz loc_5E66D mov r15, rdi lea r14, [rdi+0A8h] mov rax, [rdi+8] sub rax, [rdi] shr rax, 4 imul eax, 0AAAAAAABh dec eax lea r12, [rsp+0C8h+var_60] mov [r12-8], eax lea rsi, [rsp+0C8h+var_A0] mov [rsi], rdx mov [rsi+8], rcx mov rdi, r12 call _ZNK6google8protobuf20stringpiece_internal11StringPiece8ToStringB5cxx11Ev; google::protobuf::stringpiece_internal::StringPiece::ToString(void) mov eax, [rbx+48h] mov [r12+20h], eax lea rsi, [rsp+0C8h+var_68] mov rdi, r14 call _ZNSt8_Rb_treeIN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryES4_St9_IdentityIS4_ENS3_16ExtensionCompareESaIS4_EE16_M_insert_uniqueIRKS4_EESt4pairISt17_Rb_tree_iteratorIS4_EbEOT_; std::_Rb_tree<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,std::_Identity<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare,std::allocator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>::_M_insert_unique<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&>(google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&) mov bpl, 1 test dl, 1 jz loc_5E5A4 mov r12, [r15+0D8h] mov rbp, [r15+0E0h] mov rsi, [rbx+20h] and rsi, 0FFFFFFFFFFFFFFFCh lea rdi, [rsp+0C8h+var_C0] mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov eax, [rbx+48h] lea rdx, [rsp+0C8h+var_90] mov [rdx-10h], rdx lea r13, [rsp+0C8h+var_B0] mov rcx, [r13-10h] cmp rcx, r13 jz short loc_5E547 mov r15, rdx mov [rsp+0C8h+var_A0], rcx mov rcx, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_90], rcx jmp short loc_5E552 loc_5E547: movups xmm0, xmmword ptr [r13+0] mov r15, rdx movups xmmword ptr [rdx], xmm0 loc_5E552: mov rcx, [rsp+0C8h+var_B8] lea rdx, [rsp+0C8h+var_A0] mov [rdx+8], rcx mov [rsp+0C8h+var_C0], r13 mov [rsp+0C8h+var_B8], 0 mov byte ptr [rsp+0C8h+var_B0], 0 mov [rdx+20h], eax mov rcx, [r14] mov rdi, r12 mov rsi, rbp call _ZSt13binary_searchIN9__gnu_cxx17__normal_iteratorIPN6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex14ExtensionEntryESt6vectorIS6_SaIS6_EEEESt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiENS5_16ExtensionCompareEEbT_SL_RKT0_T1_; std::binary_search<__gnu_cxx::__normal_iterator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry *,std::vector<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>,std::pair<std::string,int>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare>(__gnu_cxx::__normal_iterator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry *,std::vector<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>,__gnu_cxx::__normal_iterator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry *,std::vector<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>,std::pair<std::string,int> const&,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare) mov ebp, eax mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r15 jz short loc_5E595 call __ZdlPv; operator delete(void *) loc_5E595: mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r13 jz short loc_5E5A4 call __ZdlPv; operator delete(void *) loc_5E5A4: lea rax, [rsp+0C8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E5B7 call __ZdlPv; operator delete(void *) loc_5E5B7: mov al, 1 test bpl, bpl jz loc_5E66D lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+0C8h+var_68] mov rdi, r14 mov esi, 2 mov ecx, 2F5h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aExtensionConfl; "Extension conflicts with extension alre"... mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov rsi, [rbx+20h] and rsi, 0FFFFFFFFFFFFFFFCh mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&) lea rsi, asc_B930C; " { " mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov rsi, [rbx+18h] and rsi, 0FFFFFFFFFFFFFFFCh mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&) lea rsi, aLogicProblemSz+14h; " = " mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov esi, [rbx+48h] mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int) lea rsi, aFrom; " } from:" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, [rsp+0C8h+var_78] mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsERKNS0_20stringpiece_internal11StringPieceE; google::protobuf::internal::LogMessage::operator<<(google::protobuf::stringpiece_internal::StringPiece const&) lea rdi, [rsp+0C8h+var_A0] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+0C8h+var_68]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() xor eax, eax loc_5E66D: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_5E6BE mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r15 jz short loc_5E693 call __ZdlPv; operator delete(void *) loc_5E693: mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_5E6A9 call __ZdlPv; operator delete(void *) jmp short loc_5E6A9 jmp short $+2 loc_5E6A6: mov rbx, rax loc_5E6A9: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E6CB call __ZdlPv; operator delete(void *) jmp short loc_5E6CB loc_5E6BE: mov rbx, rax lea rdi, [rsp+arg_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_5E6CB: mov rdi, rbx call __Unwind_Resume
char google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::AddExtension<google::protobuf::FieldDescriptorProto>( _QWORD *a1, long long a2, long long a3, long long a4) { unsigned long long v5; // rdx long long v6; // rcx char result; // al _BYTE *v8; // rdx char v9; // bp char v10; // dl long long v11; // r12 long long v12; // rbp int v13; // eax long long v14; // rax long long v15; // rax long long v16; // rax long long v17; // rax long long v18; // rax char *v19; // rdx long long v20; // rax long long v21; // rax google::protobuf::internal::LogMessage *v22; // rax void *v23; // [rsp+8h] [rbp-C0h] BYREF long long v24; // [rsp+10h] [rbp-B8h] __int128 v25; // [rsp+18h] [rbp-B0h] BYREF void *v26; // [rsp+28h] [rbp-A0h] BYREF long long v27; // [rsp+30h] [rbp-98h] __int128 v28; // [rsp+38h] [rbp-90h] BYREF int v29; // [rsp+48h] [rbp-80h] long long v30; // [rsp+50h] [rbp-78h] long long v31; // [rsp+58h] [rbp-70h] int v32; // [rsp+60h] [rbp-68h] BYREF char *v33; // [rsp+68h] [rbp-60h] BYREF char v34; // [rsp+78h] [rbp-50h] BYREF int v35; // [rsp+88h] [rbp-40h] v30 = a2; v31 = a3; v5 = *(_QWORD *)(a4 + 32) & 0xFFFFFFFFFFFFFFFCLL; v6 = *(_QWORD *)(v5 + 8); result = 1; if ( v6 ) { v8 = *(_BYTE **)v5; if ( *v8 == 46 ) { v32 = -1431655765 * ((a1[1] - *a1) >> 4) - 1; v26 = v8; v27 = v6; google::protobuf::stringpiece_internal::StringPiece::ToString[abi:cxx11](&v33, (long long)&v26); v35 = *(_DWORD *)(a4 + 72); std::_Rb_tree<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,std::_Identity<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare,std::allocator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>::_M_insert_unique<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&>( a1 + 21, &v32); v9 = 1; if ( (v10 & 1) != 0 ) { v11 = a1[27]; v12 = a1[28]; std::string::substr((long long)&v23, *(_QWORD *)(a4 + 32) & 0xFFFFFFFFFFFFFFFCLL, 1uLL); v13 = *(_DWORD *)(a4 + 72); v26 = &v28; if ( v23 == &v25 ) { v28 = v25; } else { v26 = v23; *(_QWORD *)&v28 = v25; } v27 = v24; v23 = &v25; v24 = 0LL; LOBYTE(v25) = 0; v29 = v13; v9 = std::binary_search<__gnu_cxx::__normal_iterator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry *,std::vector<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>,std::pair<std::string,int>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare>( v11, v12, &v26, a1[21]); if ( v26 != &v28 ) operator delete(v26); if ( v23 != &v25 ) operator delete(v23); } if ( v33 != &v34 ) operator delete(v33); result = 1; if ( v9 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)&v32, 2, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc", 757); v14 = google::protobuf::internal::LogMessage::operator<<( (long long)&v32, (long long)"Extension conflicts with extension already in database: extend "); v15 = google::protobuf::internal::LogMessage::operator<<(v14, *(_QWORD *)(a4 + 32) & 0xFFFFFFFFFFFFFFFCLL); v16 = google::protobuf::internal::LogMessage::operator<<(v15, (long long)" { "); v17 = google::protobuf::internal::LogMessage::operator<<(v16, *(_QWORD *)(a4 + 24) & 0xFFFFFFFFFFFFFFFCLL); v18 = google::protobuf::internal::LogMessage::operator<<(v17, (long long)" = "); v20 = google::protobuf::internal::LogMessage::operator<<(v18, *(_DWORD *)(a4 + 72), v19); v21 = google::protobuf::internal::LogMessage::operator<<(v20, (long long)" } from:"); v22 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v21); google::protobuf::internal::LogFinisher::operator=((long long)&v26, v22); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v32); return 0; } } } return result; }
AddExtension<google::protobuf::FieldDescriptorProto>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RCX MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x58],RDX MOV RDX,qword ptr [RCX + 0x20] AND RDX,-0x4 MOV RCX,qword ptr [RDX + 0x8] MOV AL,0x1 TEST RCX,RCX JZ 0x0015e66d MOV RDX,qword ptr [RDX] CMP byte ptr [RDX],0x2e JNZ 0x0015e66d MOV R15,RDI LEA R14,[RDI + 0xa8] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SHR RAX,0x4 IMUL EAX,EAX,-0x55555555 DEC EAX LEA R12,[RSP + 0x68] MOV dword ptr [R12 + -0x8],EAX LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RDX MOV qword ptr [RSI + 0x8],RCX MOV RDI,R12 CALL 0x00116b0e MOV EAX,dword ptr [RBX + 0x48] MOV dword ptr [R12 + 0x20],EAX LAB_0015e4d4: LEA RSI,[RSP + 0x60] MOV RDI,R14 CALL 0x0015ec84 MOV BPL,0x1 TEST DL,0x1 JZ 0x0015e5a4 MOV R12,qword ptr [R15 + 0xd8] MOV RBP,qword ptr [R15 + 0xe0] MOV RSI,qword ptr [RBX + 0x20] AND RSI,-0x4 LAB_0015e503: LEA RDI,[RSP + 0x8] MOV EDX,0x1 MOV RCX,-0x1 CALL 0x00111d9c MOV EAX,dword ptr [RBX + 0x48] LEA RDX,[RSP + 0x38] MOV qword ptr [RDX + -0x10],RDX LEA R13,[RSP + 0x18] MOV RCX,qword ptr [R13 + -0x10] CMP RCX,R13 JZ 0x0015e547 MOV R15,RDX MOV qword ptr [RSP + 0x28],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x38],RCX JMP 0x0015e552 LAB_0015e547: MOVUPS XMM0,xmmword ptr [R13] MOV R15,RDX MOVUPS xmmword ptr [RDX],XMM0 LAB_0015e552: MOV RCX,qword ptr [RSP + 0x10] LEA RDX,[RSP + 0x28] MOV qword ptr [RDX + 0x8],RCX MOV qword ptr [RSP + 0x8],R13 MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 MOV dword ptr [RDX + 0x20],EAX MOV RCX,qword ptr [R14] LAB_0015e579: MOV RDI,R12 MOV RSI,RBP CALL 0x0015ec34 LAB_0015e584: MOV EBP,EAX MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R15 JZ 0x0015e595 CALL 0x0010f330 LAB_0015e595: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0015e5a4 CALL 0x0010f330 LAB_0015e5a4: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015e5b7 CALL 0x0010f330 LAB_0015e5b7: MOV AL,0x1 TEST BPL,BPL JZ 0x0015e66d LEA RDX,[0x1b913e] LEA R14,[RSP + 0x60] MOV RDI,R14 MOV ESI,0x2 MOV ECX,0x2f5 CALL 0x001169ca LAB_0015e5e0: LEA RSI,[0x1b92cc] MOV RDI,R14 CALL 0x001164c8 MOV RSI,qword ptr [RBX + 0x20] AND RSI,-0x4 MOV RDI,RAX CALL 0x001164da LEA RSI,[0x1b930c] MOV RDI,RAX CALL 0x001164c8 MOV RSI,qword ptr [RBX + 0x18] AND RSI,-0x4 MOV RDI,RAX CALL 0x001164da LEA RSI,[0x1b59e3] MOV RDI,RAX CALL 0x001164c8 MOV ESI,dword ptr [RBX + 0x48] MOV RDI,RAX CALL 0x001167f0 LEA RSI,[0x1b9310] MOV RDI,RAX CALL 0x001164c8 LEA RSI,[RSP + 0x50] MOV RDI,RAX CALL 0x001165f2 LAB_0015e654: LEA RDI,[RSP + 0x28] MOV RSI,RAX CALL 0x001165a2 LAB_0015e661: LEA RDI,[RSP + 0x60] CALL 0x001169e8 XOR EAX,EAX LAB_0015e66d: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* bool google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::AddExtension<google::protobuf::FieldDescriptorProto>(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::FieldDescriptorProto const&) */ bool google::protobuf::EncodedDescriptorDatabase::DescriptorIndex:: AddExtension<google::protobuf::FieldDescriptorProto> (long *param_1,int8 param_2,int8 param_3,long param_4) { long lVar1; long lVar2; bool bVar3; bool bVar4; LogMessage *pLVar5; int8 *puVar6; ulong extraout_RDX; uint *local_c0; long local_b8; uint local_b0 [2]; int4 uStack_a8; int4 uStack_a4; uint *local_a0; long local_98; uint local_90 [2]; int4 uStack_88; int4 uStack_84; int4 local_80; int8 local_78; int8 local_70; int local_68 [2]; int1 *local_60; int1 local_50 [16]; int4 local_40; puVar6 = (int8 *)(*(ulong *)(param_4 + 0x20) & 0xfffffffffffffffc); local_98 = puVar6[1]; bVar3 = true; if ((local_98 != 0) && (local_a0 = (uint *)*puVar6, (char)*local_a0 == '.')) { local_68[0] = (int)((ulong)(param_1[1] - *param_1) >> 4) * -0x55555555 + -1; local_78 = param_2; local_70 = param_3; stringpiece_internal::StringPiece::ToString_abi_cxx11_(); local_40 = *(int4 *)(param_4 + 0x48); /* try { // try from 0015e4d4 to 0015e4e0 has its CatchHandler @ 0015e6a6 */ std:: _Rb_tree<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,std::_Identity<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare,std::allocator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>> :: _M_insert_unique<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry_const&> ((_Rb_tree<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,std::_Identity<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare,std::allocator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>> *)(param_1 + 0x15),(ExtensionEntry *)local_68); bVar4 = true; if ((extraout_RDX & 1) != 0) { lVar1 = param_1[0x1b]; lVar2 = param_1[0x1c]; /* try { // try from 0015e503 to 0015e518 has its CatchHandler @ 0015e6a4 */ std::__cxx11::string::substr((ulong)&local_c0,*(ulong *)(param_4 + 0x20) & 0xfffffffffffffffc) ; local_80 = *(int4 *)(param_4 + 0x48); if (local_c0 == local_b0) { uStack_88 = uStack_a8; uStack_84 = uStack_a4; local_a0 = local_90; } else { local_a0 = local_c0; } local_98 = local_b8; local_b8 = 0; local_b0[0] = local_b0[0] & 0xffffff00; local_c0 = local_b0; /* try { // try from 0015e579 to 0015e583 has its CatchHandler @ 0015e681 */ bVar4 = std:: binary_search<__gnu_cxx::__normal_iterator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry*,std::vector<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry,std::allocator<google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry>>>,std::pair<std::__cxx11::string,int>,google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare> (lVar1,lVar2,&local_a0,*(int8 *)(param_1 + 0x15)); if (local_a0 != local_90) { operator_delete(local_a0); } if (local_c0 != local_b0) { operator_delete(local_c0); } } if (local_60 != local_50) { operator_delete(local_60); } bVar3 = true; if (bVar4 != false) { internal::LogMessage::LogMessage ((LogMessage *)local_68,2, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc" ,0x2f5); /* try { // try from 0015e5e0 to 0015e653 has its CatchHandler @ 0015e6be */ pLVar5 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)local_68, "Extension conflicts with extension already in database: extend "); pLVar5 = (LogMessage *) internal::LogMessage::operator<< (pLVar5,(string *)(*(ulong *)(param_4 + 0x20) & 0xfffffffffffffffc)); pLVar5 = (LogMessage *)internal::LogMessage::operator<<(pLVar5," { "); pLVar5 = (LogMessage *) internal::LogMessage::operator<< (pLVar5,(string *)(*(ulong *)(param_4 + 0x18) & 0xfffffffffffffffc)); pLVar5 = (LogMessage *)internal::LogMessage::operator<<(pLVar5," = "); pLVar5 = (LogMessage *)internal::LogMessage::operator<<(pLVar5,*(int *)(param_4 + 0x48)); pLVar5 = (LogMessage *)internal::LogMessage::operator<<(pLVar5," } from:"); pLVar5 = (LogMessage *)internal::LogMessage::operator<<(pLVar5,(StringPiece *)&local_78); /* try { // try from 0015e654 to 0015e660 has its CatchHandler @ 0015e67f */ internal::LogFinisher::operator=((LogFinisher *)&local_a0,pLVar5); internal::LogMessage::~LogMessage((LogMessage *)local_68); bVar3 = false; } } return bVar3; }
39,913
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long)
monkey531[P]llama/common/json.hpp
reference at(size_type idx) { // at only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { JSON_TRY { return set_parent(m_data.m_value.array->at(idx)); } JSON_CATCH (std::out_of_range&) { // create better exception explanation JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), 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>::at(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r15 cmpb $0x2, (%rdi) jne 0xaf404 movq %rsi, %r12 movq 0x8(%r15), %rcx movq (%rcx), %rax movq 0x8(%rcx), %rdx subq %rax, %rdx sarq $0x4, %rdx cmpq %rsi, %rdx jbe 0xaf463 shlq $0x4, %r12 addq %r12, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b480 movq %rax, %r14 movq %r15, %rdi callq 0x63c50 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x4685e(%rip), %rsi # 0xf5c86 movq %rsp, %rdi callq 0xaf7c3 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x130, %esi # imm = 0x130 movq %r15, %rcx callq 0x639f8 xorl %ebp, %ebp leaq 0x7faf9(%rip), %rsi # 0x12ef48 leaq -0x4f5d0(%rip), %rdx # 0x5fe86 movq %r14, %rdi callq 0x1c040 jmp 0xaf4eb leaq 0x45d66(%rip), %rdi # 0xf51d0 movq %r12, %rsi xorl %eax, %eax callq 0x1bdf0 movq %rax, %rbx cmpl $0x1, %edx jne 0xaf595 movq %rbx, %rdi callq 0x1b3b0 movl $0x20, %edi callq 0x1b480 movq %rax, %r14 leaq 0x20(%rsp), %rdi movq %r12, %rsi callq 0x6223a leaq 0x467bf(%rip), %rsi # 0xf5c68 leaq 0x467c5(%rip), %rcx # 0xf5c75 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xaf71e movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x191, %esi # imm = 0x191 movq %r15, %rcx callq 0x61fe8 xorl %ebp, %ebp leaq 0x7f9ec(%rip), %rsi # 0x12eec8 leaq -0x4f65d(%rip), %rdx # 0x5fe86 movq %r14, %rdi callq 0x1c040 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaf509 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaf524 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b930 testb %bpl, %bpl jne 0xaf54e jmp 0xaf556 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaf54e movq 0x30(%rsp), %rsi incq %rsi callq 0x1b930 jmp 0xaf54e movq %rax, %rbx movq %r14, %rdi callq 0x1b6c0 callq 0x1bf60 jmp 0xaf595 movq %rax, %rdi callq 0x26123 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaf583 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b930 testb %bpl, %bpl jne 0xaf58d jmp 0xaf595 movq %rax, %rbx movq %r14, %rdi callq 0x1b6c0 movq %rbx, %rdi callq 0x1c0d0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r15, rdi cmp byte ptr [rdi], 2 jnz short loc_AF404 mov r12, rsi mov rcx, [r15+8] mov rax, [rcx] mov rdx, [rcx+8] sub rdx, rax sar rdx, 4 cmp rdx, rsi jbe short loc_AF463 shl r12, 4 add rax, r12 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_AF404: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 130h; int mov rcx, r15 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_AF4EB loc_AF463: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... mov rsi, r12 xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) mov rbx, rax cmp edx, 1 jnz loc_AF595 mov rdi, rbx; void * call ___cxa_begin_catch mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+68h+var_48]; this mov rsi, r12; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aArrayIndex; "array index " lea rcx, aIsOutOfRange; " is out of range" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>(char const(&)[13],std::string,char const(&)[17] &&) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 191h; int mov rcx, r15 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_AF4EB: mov rbx, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AF509 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AF509: lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AF524 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AF524: test bpl, bpl jnz short loc_AF54E jmp short loc_AF556 mov rbx, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AF54E mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AF54E mov rbx, rax loc_AF54E: mov rdi, r14; void * call ___cxa_free_exception loc_AF556: call ___cxa_end_catch jmp short loc_AF595 mov rdi, rax call __clang_call_terminate mov rbx, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AF583 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AF583: test bpl, bpl jnz short loc_AF58D jmp short loc_AF595 mov rbx, rax loc_AF58D: mov rdi, r14; void * call ___cxa_free_exception loc_AF595: mov rdi, rbx 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>::at( long long a1, unsigned long long a2) { _QWORD *v2; // rcx unsigned long long v3; // rdx nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14 _QWORD v6[6]; // [rsp+0h] [rbp-68h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(_QWORD **)(a1 + 8); v3 = (long long)(v2[1] - *v2) >> 4; if ( v3 <= a2 ) std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v3); return 16 * a2 + *v2; }
at: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R15,RDI CMP byte ptr [RDI],0x2 JNZ 0x001af404 MOV R12,RSI MOV RCX,qword ptr [R15 + 0x8] MOV RAX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] SUB RDX,RAX SAR RDX,0x4 CMP RDX,RSI JBE 0x001af463 SHL R12,0x4 ADD RAX,R12 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001af404: MOV EDI,0x20 CALL 0x0011b480 MOV R14,RAX MOV RDI,R15 CALL 0x00163c50 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001af421: LEA RSI,[0x1f5c86] MOV RDI,RSP CALL 0x001af7c3 MOV BPL,0x1 LAB_001af433: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x130 MOV RCX,R15 CALL 0x001639f8 XOR EBP,EBP LEA RSI,[0x22ef48] LEA RDX,[0x15fe86] MOV RDI,R14 CALL 0x0011c040 LAB_001af463: LEA RDI,[0x1f51d0] MOV RSI,R12 XOR EAX,EAX CALL 0x0011bdf0 LAB_001af474: MOV RBX,RAX CMP EDX,0x1 JNZ 0x001af595 MOV RDI,RBX CALL 0x0011b3b0 MOV EDI,0x20 CALL 0x0011b480 MOV R14,RAX LAB_001af495: LEA RDI,[RSP + 0x20] MOV RSI,R12 CALL 0x0016223a LAB_001af4a2: LEA RSI,[0x1f5c68] LEA RCX,[0x1f5c75] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001af71e MOV BPL,0x1 LAB_001af4c0: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x191 MOV RCX,R15 CALL 0x00161fe8 XOR EBP,EBP LEA RSI,[0x22eec8] LEA RDX,[0x15fe86] MOV RDI,R14 CALL 0x0011c040 LAB_001af595: MOV RDI,RBX CALL 0x0011c0d0
/* 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>::at(unsigned long) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::at(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) { long lVar1; int8 uVar2; int1 auVar3 [12]; detail adStack_68 [32]; char *local_48 [4]; 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) { uVar2 = __cxa_allocate_exception(0x20); local_48[0] = (char *)type_name(this); /* try { // try from 001af421 to 001af42f has its CatchHandler @ 001af58a */ detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 001af433 to 001af45d has its CatchHandler @ 001af565 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,adStack_68,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } lVar1 = **(long **)(this + 8); if (param_1 < (ulong)((*(long **)(this + 8))[1] - lVar1 >> 4)) { return lVar1 + param_1 * 0x10; } /* try { // try from 001af463 to 001af473 has its CatchHandler @ 001af474 */ auVar3 = std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", param_1); /* catch(type#1 @ 00233908) { ... } // from try @ 001af463 with catch @ 001af474 */ if (auVar3._8_4_ == 1) { __cxa_begin_catch(auVar3._0_8_); uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 001af495 to 001af4a1 has its CatchHandler @ 001af54b */ std::__cxx11::to_string((__cxx11 *)local_48,param_1); /* try { // try from 001af4a2 to 001af4bc has its CatchHandler @ 001af52b */ detail::concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]> (adStack_68,"array index ",(string *)local_48," is out of range"); /* try { // try from 001af4c0 to 001af4ea has its CatchHandler @ 001af4eb */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x191,adStack_68,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::out_of_range::typeinfo,detail::exception::~exception); } /* WARNING: Subroutine does not return */ _Unwind_Resume(auVar3._0_8_); }
39,914
CloseWindow
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/rcore.c
void CloseWindow(void) { #if defined(SUPPORT_GIF_RECORDING) if (gifRecording) { MsfGifResult result = msf_gif_end(&gifState); msf_gif_free(result); gifRecording = false; } #endif #if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT) UnloadFontDefault(); // WARNING: Module required: rtext #endif rlglClose(); // De-init rlgl // De-initialize platform //-------------------------------------------------------------- ClosePlatform(); //-------------------------------------------------------------- CORE.Window.ready = false; TRACELOG(LOG_INFO, "Window closed successfully"); }
O3
c
CloseWindow: pushq %rbx subq $0x20, %rsp cmpb $0x1, 0xca86f(%rip) # 0x13c6b0 jne 0x71e69 leaq 0xca86e(%rip), %rsi # 0x13c6b8 movq %rsp, %rbx movq %rbx, %rdi callq 0x6d99a movq (%rbx), %rdi testq %rdi, %rdi je 0x71e62 callq 0xa650 movb $0x0, 0xca847(%rip) # 0x13c6b0 callq 0x7f459 callq 0x63eec movq 0xca82e(%rip), %rdi # 0x13c6a8 callq 0xc07b9 callq 0xbbb94 movb $0x0, 0xc9d41(%rip) # 0x13bbcc leaq 0x6e140(%rip), %rsi # 0xdffd2 movl $0x3, %edi xorl %eax, %eax addq $0x20, %rsp popq %rbx jmp 0xb9e53
CloseWindow: push rbx sub rsp, 20h cmp cs:gifRecording, 1 jnz short loc_71E69 lea rsi, gifState mov rbx, rsp mov rdi, rbx call msf_gif_end mov rdi, [rbx] test rdi, rdi jz short loc_71E62 call _free loc_71E62: mov cs:gifRecording, 0 loc_71E69: call UnloadFontDefault call rlglClose mov rdi, cs:platform_0 call glfwDestroyWindow call glfwTerminate mov cs:byte_13BBCC, 0 lea rsi, aWindowClosedSu; "Window closed successfully" mov edi, 3 xor eax, eax add rsp, 20h pop rbx jmp TraceLog
long long CloseWindow(int a1, _QWORD *a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long v11[5]; // [rsp+0h] [rbp-28h] BYREF if ( gifRecording == 1 ) { a2 = gifState; msf_gif_end(v11, gifState); a1 = v11[0]; if ( v11[0] ) free(v11[0]); gifRecording = 0; } UnloadFontDefault(); rlglClose(a1, (int)a2, v2, v3, v4, v5); glfwDestroyWindow(platform_0); glfwTerminate(); byte_13BBCC = 0; return TraceLog(3, (unsigned int)"Window closed successfully", v6, v7, v8, v9); }
CloseWindow: PUSH RBX SUB RSP,0x20 CMP byte ptr [0x0023c6b0],0x1 JNZ 0x00171e69 LEA RSI,[0x23c6b8] MOV RBX,RSP MOV RDI,RBX CALL 0x0016d99a MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x00171e62 CALL 0x0010a650 LAB_00171e62: MOV byte ptr [0x0023c6b0],0x0 LAB_00171e69: CALL 0x0017f459 CALL 0x00163eec MOV RDI,qword ptr [0x0023c6a8] CALL 0x001c07b9 CALL 0x001bbb94 MOV byte ptr [0x0023bbcc],0x0 LEA RSI,[0x1dffd2] MOV EDI,0x3 XOR EAX,EAX ADD RSP,0x20 POP RBX JMP 0x001b9e53
void CloseWindow(void) { void *local_28 [4]; if (gifRecording == '\x01') { msf_gif_end(local_28,gifState); if (local_28[0] != (void *)0x0) { free(local_28[0]); } gifRecording = '\0'; } UnloadFontDefault(); rlglClose(); glfwDestroyWindow(platform_0); glfwTerminate(); DAT_0023bbcc = 0; TraceLog(3,"Window closed successfully"); return; }
39,915
alloc_dynamic
eloqsql/mysys/array.c
void *alloc_dynamic(DYNAMIC_ARRAY *array) { DBUG_ENTER("alloc_dynamic"); DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */ if (array->elements == array->max_element) { char *new_ptr; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this scenario, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (char *) my_malloc(array->m_psi_key, (array->max_element+ array->alloc_increment) * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); if (array->elements) memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr=(char*) my_realloc(array->m_psi_key, array->buffer, (array->max_element+ array->alloc_increment) * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(0); array->buffer= (uchar*) new_ptr; array->max_element+=array->alloc_increment; } DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element)); }
O3
c
alloc_dynamic: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movl 0x8(%rdi), %eax cmpl 0xc(%rdi), %eax jne 0x5ddc7 movq 0x20(%rbx), %rcx btl $0x8, %ecx movl 0x18(%rbx), %edi jb 0x5ddcc addl 0x10(%rbx), %eax movq (%rbx), %rsi imull 0x14(%rbx), %eax orq $0x50, %rcx movq %rax, %rdx callq 0x70280 movq %rax, %r14 testq %rax, %rax jne 0x5de09 jmp 0x5de27 movq (%rbx), %r14 jmp 0x5de15 addl 0x10(%rbx), %eax imull 0x14(%rbx), %eax orq $0x10, %rcx movq %rax, %rsi movq %rcx, %rdx callq 0x7015d testq %rax, %rax je 0x5de27 movq %rax, %r14 movl 0x8(%rbx), %edx testl %edx, %edx je 0x5de00 movq (%rbx), %rsi imull 0x14(%rbx), %edx movq %r14, %rdi callq 0x292f0 movl $0xfffffeff, %eax # imm = 0xFFFFFEFF andq %rax, 0x20(%rbx) movq %r14, (%rbx) movl 0x8(%rbx), %eax movl 0x10(%rbx), %ecx addl %ecx, 0xc(%rbx) leal 0x1(%rax), %ecx movl %ecx, 0x8(%rbx) imull 0x14(%rbx), %eax addq %r14, %rax popq %rbx popq %r14 popq %rbp retq xorl %eax, %eax jmp 0x5de22
alloc_dynamic: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov eax, [rdi+8] cmp eax, [rdi+0Ch] jnz short loc_5DDC7 mov rcx, [rbx+20h] bt ecx, 8 mov edi, [rbx+18h] jb short loc_5DDCC add eax, [rbx+10h] mov rsi, [rbx] imul eax, [rbx+14h] or rcx, 50h mov rdx, rax call my_realloc mov r14, rax test rax, rax jnz short loc_5DE09 jmp short loc_5DE27 loc_5DDC7: mov r14, [rbx] jmp short loc_5DE15 loc_5DDCC: add eax, [rbx+10h] imul eax, [rbx+14h] or rcx, 10h mov rsi, rax mov rdx, rcx call my_malloc test rax, rax jz short loc_5DE27 mov r14, rax mov edx, [rbx+8] test edx, edx jz short loc_5DE00 mov rsi, [rbx] imul edx, [rbx+14h] mov rdi, r14 call _memcpy loc_5DE00: mov eax, 0FFFFFEFFh and [rbx+20h], rax loc_5DE09: mov [rbx], r14 mov eax, [rbx+8] mov ecx, [rbx+10h] add [rbx+0Ch], ecx loc_5DE15: lea ecx, [rax+1] mov [rbx+8], ecx imul eax, [rbx+14h] add rax, r14 loc_5DE22: pop rbx pop r14 pop rbp retn loc_5DE27: xor eax, eax jmp short loc_5DE22
long long alloc_dynamic(long long *a1) { int v2; // eax long long v3; // rcx long long v4; // rdi long long v5; // r14 long long v6; // rax int v7; // edx v2 = *((_DWORD *)a1 + 2); if ( v2 != *((_DWORD *)a1 + 3) ) { v5 = *a1; LABEL_11: *((_DWORD *)a1 + 2) = v2 + 1; return v5 + (unsigned int)(*((_DWORD *)a1 + 5) * v2); } v3 = a1[4]; v4 = *((unsigned int *)a1 + 6); if ( (v3 & 0x100) == 0 ) { v5 = my_realloc(v4, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v2)), v3 | 0x50); if ( !v5 ) return 0LL; goto LABEL_10; } v6 = my_malloc(v4, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v2))); if ( v6 ) { v5 = v6; v7 = *((_DWORD *)a1 + 2); if ( v7 ) memcpy(v6, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * v7)); a1[4] &= 0xFFFFFEFFuLL; LABEL_10: *a1 = v5; v2 = *((_DWORD *)a1 + 2); *((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4); goto LABEL_11; } return 0LL; }
alloc_dynamic: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x8] CMP EAX,dword ptr [RDI + 0xc] JNZ 0x0015ddc7 MOV RCX,qword ptr [RBX + 0x20] BT ECX,0x8 MOV EDI,dword ptr [RBX + 0x18] JC 0x0015ddcc ADD EAX,dword ptr [RBX + 0x10] MOV RSI,qword ptr [RBX] IMUL EAX,dword ptr [RBX + 0x14] OR RCX,0x50 MOV RDX,RAX CALL 0x00170280 MOV R14,RAX TEST RAX,RAX JNZ 0x0015de09 JMP 0x0015de27 LAB_0015ddc7: MOV R14,qword ptr [RBX] JMP 0x0015de15 LAB_0015ddcc: ADD EAX,dword ptr [RBX + 0x10] IMUL EAX,dword ptr [RBX + 0x14] OR RCX,0x10 MOV RSI,RAX MOV RDX,RCX CALL 0x0017015d TEST RAX,RAX JZ 0x0015de27 MOV R14,RAX MOV EDX,dword ptr [RBX + 0x8] TEST EDX,EDX JZ 0x0015de00 MOV RSI,qword ptr [RBX] IMUL EDX,dword ptr [RBX + 0x14] MOV RDI,R14 CALL 0x001292f0 LAB_0015de00: MOV EAX,0xfffffeff AND qword ptr [RBX + 0x20],RAX LAB_0015de09: MOV qword ptr [RBX],R14 MOV EAX,dword ptr [RBX + 0x8] MOV ECX,dword ptr [RBX + 0x10] ADD dword ptr [RBX + 0xc],ECX LAB_0015de15: LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x8],ECX IMUL EAX,dword ptr [RBX + 0x14] ADD RAX,R14 LAB_0015de22: POP RBX POP R14 POP RBP RET LAB_0015de27: XOR EAX,EAX JMP 0x0015de22
long alloc_dynamic(long *param_1) { ulong uVar1; int iVar2; void *__dest; long lVar3; iVar2 = (int)param_1[1]; if (iVar2 == *(int *)((long)param_1 + 0xc)) { uVar1 = param_1[4]; if (((uint)uVar1 >> 8 & 1) == 0) { __dest = (void *)my_realloc((int)param_1[3],*param_1, (iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14), uVar1 | 0x50); if (__dest != (void *)0x0) { LAB_0015de09: *param_1 = (long)__dest; iVar2 = (int)param_1[1]; *(int *)((long)param_1 + 0xc) = *(int *)((long)param_1 + 0xc) + (int)param_1[2]; goto LAB_0015de15; } } else { __dest = (void *)my_malloc((int)param_1[3], (iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14), uVar1 | 0x10); if (__dest != (void *)0x0) { if ((int)param_1[1] != 0) { memcpy(__dest,(void *)*param_1, (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); } param_1[4] = param_1[4] & 0xfffffeff; goto LAB_0015de09; } } lVar3 = 0; } else { __dest = (void *)*param_1; LAB_0015de15: *(int *)(param_1 + 1) = iVar2 + 1; lVar3 = (ulong)(uint)(iVar2 * *(int *)((long)param_1 + 0x14)) + (long)__dest; } return lVar3; }
39,916
spdlog::async_logger::backend_flush_()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/async_logger-inl.h
SPDLOG_INLINE void spdlog::async_logger::backend_flush_() { for (auto &sink : sinks_) { SPDLOG_TRY { sink->flush(); } SPDLOG_LOGGER_CATCH(source_loc()) } }
O0
c
spdlog::async_logger::backend_flush_(): subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x20(%rsp) addq $0x28, %rax movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rdi callq 0x3a720 movq %rax, 0xa0(%rsp) movq 0xa8(%rsp), %rdi callq 0x3a790 movq %rax, 0x98(%rsp) leaq 0xa0(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x3a750 xorb $-0x1, %al testb $0x1, %al jne 0x7eb22 jmp 0x7ed0e leaq 0xa0(%rsp), %rdi callq 0x3a7f0 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi callq 0x3a800 movq %rax, %rdi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax jmp 0x7eb52 jmp 0x7ebf3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) movl 0x84(%rsp), %eax movl $0x2, %ecx cmpl %ecx, %eax jne 0x7ec07 movq 0x88(%rsp), %rdi callq 0x14270 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq %rax, 0x10(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x14c90 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x1a6a0 jmp 0x7ebc9 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x361c0 jmp 0x7ebda leaq 0x30(%rsp), %rdi callq 0x1aac0 leaq 0x2f(%rsp), %rdi callq 0x14750 callq 0x14bb0 jmp 0x7ebf5 leaq 0xa0(%rsp), %rdi callq 0x3a840 jmp 0x7eb02 movq 0x88(%rsp), %rdi callq 0x14270 leaq 0x5f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x14c90 movq 0x8(%rsp), %rdx leaq 0x8dc81(%rip), %rsi # 0x10c8b0 leaq 0x60(%rsp), %rdi callq 0x1a6a0 jmp 0x7ec3b movq 0x20(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x361c0 jmp 0x7ec4c leaq 0x60(%rsp), %rdi callq 0x1aac0 leaq 0x5f(%rsp), %rdi callq 0x14750 callq 0x14a80 jmp 0x7ed2b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x7ec9e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x60(%rsp), %rdi callq 0x1aac0 leaq 0x5f(%rsp), %rdi callq 0x14750 jmp 0x7ecbe movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) callq 0x14bb0 jmp 0x7ecc5 jmp 0x7ed16 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x7ecfb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x30(%rsp), %rdi callq 0x1aac0 leaq 0x2f(%rsp), %rdi callq 0x14750 callq 0x14bb0 jmp 0x7ed0c jmp 0x7ed16 addq $0xb8, %rsp retq movq 0x88(%rsp), %rdi callq 0x14c80 movq %rax, %rdi callq 0x1b6b0 nopl (%rax,%rax)
_ZN6spdlog12async_logger14backend_flush_Ev: sub rsp, 0B8h mov [rsp+0B8h+var_8], rdi mov rax, [rsp+0B8h+var_8] mov [rsp+0B8h+var_98], rax add rax, 28h ; '(' mov [rsp+0B8h+var_10], rax mov rdi, [rsp+0B8h+var_10] call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE5beginEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin(void) mov [rsp+0B8h+var_18], rax mov rdi, [rsp+0B8h+var_10] call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE3endEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::end(void) mov [rsp+0B8h+var_20], rax loc_7EB02: lea rdi, [rsp+0B8h+var_18] lea rsi, [rsp+0B8h+var_20] call _ZN9__gnu_cxxeqIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE xor al, 0FFh test al, 1 jnz short loc_7EB22 jmp loc_7ED0E loc_7EB22: lea rdi, [rsp+0B8h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*(void) mov [rsp+0B8h+var_28], rax mov rdi, [rsp+0B8h+var_28] call _ZNKSt19__shared_ptr_accessIN6spdlog5sinks4sinkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rdi] mov rax, [rax+18h] call rax jmp short $+2 loc_7EB52: jmp loc_7EBF3 mov rcx, rax mov eax, edx mov [rsp+0B8h+var_30], rcx mov [rsp+0B8h+var_34], eax mov eax, [rsp+0B8h+var_34] mov ecx, 2 cmp eax, ecx jnz loc_7EC07 mov rdi, [rsp+0B8h+var_30]; void * call ___cxa_begin_catch mov [rsp+0B8h+var_68], rax mov rdi, [rsp+0B8h+var_68] mov rax, [rdi] mov rax, [rax+10h] call rax mov [rsp+0B8h+var_A8], rax lea rdi, [rsp+0B8h+var_89] mov [rsp+0B8h+var_A0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+0B8h+var_A8] mov rdx, [rsp+0B8h+var_A0] lea rdi, [rsp+0B8h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_7EBC9: mov rdi, [rsp+0B8h+var_98] lea rsi, [rsp+0B8h+var_88] call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&) jmp short $+2 loc_7EBDA: lea rdi, [rsp+0B8h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch loc_7EBF3: jmp short $+2 loc_7EBF5: lea rdi, [rsp+0B8h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(void) jmp loc_7EB02 loc_7EC07: mov rdi, [rsp+0B8h+var_30]; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_59] mov [rsp+0B8h+var_B0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0B8h+var_B0] lea rsi, aRethrowingUnkn; "Rethrowing unknown exception in logger" lea rdi, [rsp+0B8h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_7EC3B: mov rdi, [rsp+0B8h+var_98] lea rsi, [rsp+0B8h+var_58] call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&) jmp short $+2 loc_7EC4C: lea rdi, [rsp+0B8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_59] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_rethrow jmp loc_7ED2B mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_7EC9E mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_7EC9E: lea rdi, [rsp+arg_57] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_7ECBE mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax loc_7ECBE: call ___cxa_end_catch jmp short $+2 loc_7ECC5: jmp short loc_7ED16 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_7ECFB mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_7ECFB: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short $+2 loc_7ED0C: jmp short loc_7ED16 loc_7ED0E: add rsp, 0B8h retn loc_7ED16: mov rdi, [rsp+arg_80] call __Unwind_Resume mov rdi, rax call __clang_call_terminate loc_7ED2B: nop dword ptr [rax+rax+00h]
char spdlog::async_logger::backend_flush_(spdlog::async_logger *this) { char result; // al long long v2; // rdi long long v3; // [rsp+90h] [rbp-28h] long long v4; // [rsp+98h] [rbp-20h] BYREF _QWORD v5[3]; // [rsp+A0h] [rbp-18h] BYREF v5[2] = this; v5[1] = (char *)this + 40; v5[0] = std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin((long long)this + 40); v4 = std::vector<std::shared_ptr<spdlog::sinks::sink>>::end((long long)this + 40); while ( 1 ) { result = ~__gnu_cxx::operator==<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>( (long long)v5, (long long)&v4); if ( (result & 1) == 0 ) break; v3 = __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*((long long)v5); v2 = std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v3); (*(void ( **)(long long))(*(_QWORD *)v2 + 24LL))(v2); __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(v5); } return result; }
backend_flush_: SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDI MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x20],RAX ADD RAX,0x28 MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x0013a720 MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x0013a790 MOV qword ptr [RSP + 0x98],RAX LAB_0017eb02: LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x98] CALL 0x0013a750 XOR AL,0xff TEST AL,0x1 JNZ 0x0017eb22 JMP 0x0017ed0e LAB_0017eb22: LEA RDI,[RSP + 0xa0] CALL 0x0013a7f0 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x0013a800 MOV RDI,RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] LAB_0017eb4e: CALL RAX LAB_0017eb50: JMP 0x0017eb52 LAB_0017eb52: JMP 0x0017ebf3 LAB_0017ebf3: JMP 0x0017ebf5 LAB_0017ebf5: LEA RDI,[RSP + 0xa0] CALL 0x0013a840 JMP 0x0017eb02 LAB_0017ed0e: ADD RSP,0xb8 RET
/* spdlog::async_logger::backend_flush_() */ void __thiscall spdlog::async_logger::backend_flush_(async_logger *this) { byte bVar1; __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *this_00; long *plVar2; int8 local_20; int8 local_18; vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *local_10; async_logger *local_8; local_10 = (vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *)(this + 0x28); local_8 = this; local_18 = std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::begin(local_10); local_20 = std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::end(local_10); while( true ) { bVar1 = _ZN9__gnu_cxxeqIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE (&local_18,&local_20); if (((bVar1 ^ 0xff) & 1) == 0) break; this_00 = (__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> ::operator*((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> *)&local_18); plVar2 = (long *)std:: __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(this_00); /* try { // try from 0017eb4e to 0017eb4f has its CatchHandler @ 0017eb57 */ (**(code **)(*plVar2 + 0x18))(); __gnu_cxx:: __normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> ::operator++((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> *)&local_18); } return; }
39,917
my_getcputime
eloqsql/mysys/my_getsystime.c
ulonglong my_getcputime() { #ifdef CLOCK_THREAD_CPUTIME_ID struct timespec tp; if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #elif defined(__NR_clock_gettime) struct timespec tp; if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #endif /* CLOCK_THREAD_CPUTIME_ID */ return 0; }
O3
c
my_getcputime: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq -0x10(%rbp), %rsi movl $0x3, %edi callq 0x24260 testl %eax, %eax je 0x2a714 xorl %eax, %eax jmp 0x2a73b imulq $0x989680, -0x10(%rbp), %rcx # imm = 0x989680 movq -0x8(%rbp), %rax shrq $0x2, %rax movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3 mulq %rdx movq %rdx, %rax shrq $0x2, %rax addq %rcx, %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_getcputime: push rbp mov rbp, rsp sub rsp, 10h lea rsi, [rbp+var_10] mov edi, 3 call _clock_gettime test eax, eax jz short loc_2A714 xor eax, eax jmp short loc_2A73B loc_2A714: imul rcx, [rbp+var_10], 989680h mov rax, [rbp+var_8] shr rax, 2 mov rdx, 28F5C28F5C28F5C3h mul rdx mov rax, rdx shr rax, 2 add rax, rcx loc_2A73B: add rsp, 10h pop rbp retn
unsigned long long my_getcputime() { long long v1; // [rsp+0h] [rbp-10h] BYREF unsigned long long v2; // [rsp+8h] [rbp-8h] if ( (unsigned int)clock_gettime(3LL, &v1) ) return 0LL; else return 10000000 * v1 + v2 / 0x64; }
my_getcputime: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RSI,[RBP + -0x10] MOV EDI,0x3 CALL 0x00124260 TEST EAX,EAX JZ 0x0012a714 XOR EAX,EAX JMP 0x0012a73b LAB_0012a714: IMUL RCX,qword ptr [RBP + -0x10],0x989680 MOV RAX,qword ptr [RBP + -0x8] SHR RAX,0x2 MOV RDX,0x28f5c28f5c28f5c3 MUL RDX MOV RAX,RDX SHR RAX,0x2 ADD RAX,RCX LAB_0012a73b: ADD RSP,0x10 POP RBP RET
long my_getcputime(void) { int iVar1; long lVar2; timespec local_18; iVar1 = clock_gettime(3,&local_18); if (iVar1 == 0) { lVar2 = (ulong)local_18.tv_nsec / 100 + local_18.tv_sec * 10000000; } else { lVar2 = 0; } return lVar2; }
39,918
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
llama.cpp/common/common.cpp
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) { const char * sep = strchr(data, '='); if (sep == nullptr || sep - data >= 128) { LOG_ERR("%s: malformed KV override '%s'\n", __func__, data); return false; } llama_model_kv_override kvo; std::strncpy(kvo.key, data, sep - data); kvo.key[sep - data] = 0; sep++; if (strncmp(sep, "int:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT; kvo.val_i64 = std::atol(sep); } else if (strncmp(sep, "float:", 6) == 0) { sep += 6; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT; kvo.val_f64 = std::atof(sep); } else if (strncmp(sep, "bool:", 5) == 0) { sep += 5; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL; if (std::strcmp(sep, "true") == 0) { kvo.val_bool = true; } else if (std::strcmp(sep, "false") == 0) { kvo.val_bool = false; } else { LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data); return false; } } else if (strncmp(sep, "str:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR; if (strlen(sep) > 127) { LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data); return false; } strncpy(kvo.val_str, sep, 127); kvo.val_str[127] = '\0'; } else { LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data); return false; } overrides.emplace_back(std::move(kvo)); return true; }
O3
cpp
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx movl $0x3d, %esi callq 0x15590 testq %rax, %rax je 0x1d2f8 movq %rax, %r15 movq %rax, %r12 subq %rbx, %r12 cmpq $0x80, %r12 jl 0x1d334 leaq 0x22829(%rip), %rax # 0x3fb28 cmpl $0x0, (%rax) js 0x1d4e0 callq 0x2f9b3 leaq 0x15134(%rip), %rdx # 0x32448 leaq 0x1514d(%rip), %rcx # 0x32468 xorl %ebp, %ebp movq %rax, %rdi movl $0x4, %esi movq %rbx, %r8 xorl %eax, %eax callq 0x2fa50 jmp 0x1d4e2 leaq 0xc(%rsp), %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x15130 movb $0x0, 0xc(%rsp,%r12) leaq 0x1(%r15), %r12 leaq 0x1512c(%rip), %rsi # 0x32481 movl $0x4, %edx movq %r12, %rdi callq 0x151f0 testl %eax, %eax je 0x1d3d7 leaq 0x15119(%rip), %rsi # 0x32486 movl $0x6, %edx movq %r12, %rdi callq 0x151f0 testl %eax, %eax je 0x1d3f5 leaq 0x15108(%rip), %rsi # 0x3248d movl $0x5, %edx movq %r12, %rdi callq 0x151f0 testl %eax, %eax je 0x1d450 leaq 0x15122(%rip), %rsi # 0x324c3 movl $0x4, %edx movq %r12, %rdi callq 0x151f0 testl %eax, %eax je 0x1d4a7 leaq 0x2276b(%rip), %rax # 0x3fb28 cmpl $0x0, (%rax) js 0x1d4e0 callq 0x2f9b3 leaq 0x15135(%rip), %rdx # 0x32507 jmp 0x1d314 addq $0x5, %r15 movl $0x0, 0x8(%rsp) movq %r15, %rdi callq 0x15620 movq %rax, 0x90(%rsp) jmp 0x1d412 addq $0x7, %r15 movl $0x1, 0x8(%rsp) movq %r15, %rdi callq 0x158b0 movsd %xmm0, 0x90(%rsp) movq 0x8(%r14), %rax cmpq 0x10(%r14), %rax je 0x1d438 leaq 0x8(%rsp), %rsi movl $0x108, %edx # imm = 0x108 movq %rax, %rdi callq 0x150c0 addq $0x108, 0x8(%r14) # imm = 0x108 jmp 0x1d448 leaq 0x8(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x1ab14 movb $0x1, %bpl jmp 0x1d4e2 addq $0x6, %r15 movl $0x2, 0x8(%rsp) leaq 0x14fa3(%rip), %rsi # 0x32406 movq %r15, %rdi callq 0x158c0 testl %eax, %eax je 0x1d4f4 leaq 0x14f91(%rip), %rsi # 0x3240b movq %r15, %rdi callq 0x158c0 testl %eax, %eax je 0x1d522 leaq 0x22697(%rip), %rax # 0x3fb28 cmpl $0x0, (%rax) js 0x1d4e0 callq 0x2f9b3 leaq 0x14ff1(%rip), %rdx # 0x32493 jmp 0x1d314 addq $0x5, %r15 movl $0x3, 0x8(%rsp) movq %r15, %rdi callq 0x153e0 cmpq $0x80, %rax jb 0x1d501 leaq 0x2265e(%rip), %rax # 0x3fb28 cmpl $0x0, (%rax) js 0x1d4e0 callq 0x2f9b3 leaq 0x14fed(%rip), %rdx # 0x324c8 jmp 0x1d314 xorl %ebp, %ebp movl %ebp, %eax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, 0x90(%rsp) jmp 0x1d412 leaq 0x90(%rsp), %rbx movl $0x7f, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x15130 movb $0x0, 0x7f(%rbx) jmp 0x1d412 movb $0x0, 0x90(%rsp) jmp 0x1d412
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi mov esi, 3Dh ; '=' call _strchr test rax, rax jz short loc_1D2F8 mov r15, rax mov r12, rax sub r12, rbx cmp r12, 80h jl short loc_1D334 loc_1D2F8: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_1D4E0 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n" loc_1D314: lea rcx, aStringParseKvO; "string_parse_kv_override" xor ebp, ebp mov rdi, rax mov esi, 4 mov r8, rbx xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp loc_1D4E2 loc_1D334: lea rdi, [rsp+138h+var_12C] mov rsi, rbx mov rdx, r12 call _strncpy mov [rsp+r12+138h+var_12C], 0 lea r12, [r15+1] lea rsi, aInt; "int:" mov edx, 4 mov rdi, r12 call _strncmp test eax, eax jz short loc_1D3D7 lea rsi, aFloat; "float:" mov edx, 6 mov rdi, r12 call _strncmp test eax, eax jz short loc_1D3F5 lea rsi, aBool; "bool:" mov edx, 5 mov rdi, r12 call _strncmp test eax, eax jz loc_1D450 lea rsi, aStr; "str:" mov edx, 4 mov rdi, r12 call _strncmp test eax, eax jz loc_1D4A7 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_1D4E0 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n" jmp loc_1D314 loc_1D3D7: add r15, 5 mov [rsp+138h+var_130], 0 mov rdi, r15 call _atol mov [rsp+138h+var_A8], rax jmp short loc_1D412 loc_1D3F5: add r15, 7 mov [rsp+138h+var_130], 1 mov rdi, r15 call _atof movsd [rsp+138h+var_A8], xmm0 loc_1D412: mov rax, [r14+8] cmp rax, [r14+10h] jz short loc_1D438 lea rsi, [rsp+138h+var_130] mov edx, 108h mov rdi, rax call _memcpy add qword ptr [r14+8], 108h jmp short loc_1D448 loc_1D438: lea rdx, [rsp+138h+var_130] mov rdi, r14 mov rsi, rax call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&) loc_1D448: mov bpl, 1 jmp loc_1D4E2 loc_1D450: add r15, 6 mov [rsp+138h+var_130], 2 lea rsi, aTrue; "true" mov rdi, r15 call _strcmp test eax, eax jz loc_1D4F4 lea rsi, aFalse; "false" mov rdi, r15 call _strcmp test eax, eax jz loc_1D522 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_1D4E0 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"... jmp loc_1D314 loc_1D4A7: add r15, 5 mov [rsp+138h+var_130], 3 mov rdi, r15 call _strlen cmp rax, 80h jb short loc_1D501 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_1D4E0 call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"... jmp loc_1D314 loc_1D4E0: xor ebp, ebp loc_1D4E2: mov eax, ebp add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1D4F4: mov byte ptr [rsp+138h+var_A8], 1 jmp loc_1D412 loc_1D501: lea rbx, [rsp+138h+var_A8] mov edx, 7Fh mov rdi, rbx mov rsi, r15 call _strncpy mov byte ptr [rbx+7Fh], 0 jmp loc_1D412 loc_1D522: mov byte ptr [rsp+138h+var_A8], 0 jmp loc_1D412
long long string_parse_kv_override(long long a1, long long a2) { unsigned int v2; // ebp long long v3; // rax long long v4; // r15 long long v5; // r12 int v6; // eax int v7; // r9d const char *v8; // rdx long long v9; // r15 long long v10; // r15 int v12; // [rsp+8h] [rbp-130h] BYREF _BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF char v15; // [rsp+10Fh] [rbp-29h] v3 = strchr(a1, 61LL); if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s'\n"; LABEL_5: v2 = 0; common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7); return v2; } return 0; } strncpy(v13, a1, v3 - a1); v13[v5] = 0; if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) ) { v12 = 0; v14[0] = atol(v4 + 5); } else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) ) { v12 = 1; v14[0] = atof(v4 + 7); } else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) ) { v9 = v4 + 6; v12 = 2; if ( !(unsigned int)strcmp(v9, "true") ) { LOBYTE(v14[0]) = 1; } else { if ( (unsigned int)strcmp(v9, "false") ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid boolean value for KV override '%s'\n"; goto LABEL_5; } return 0; } LOBYTE(v14[0]) = 0; } } else { if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid type for KV override '%s'\n"; goto LABEL_5; } return 0; } v10 = v4 + 5; v12 = 3; if ( (unsigned long long)strlen(v10) >= 0x80 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n"; goto LABEL_5; } return 0; } strncpy(v14, v10, 127LL); v15 = 0; } if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) ) { std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>( a2, *(_QWORD *)(a2 + 8), (long long)&v12); } else { memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL); *(_QWORD *)(a2 + 8) += 264LL; } LOBYTE(v2) = 1; return v2; }
string_parse_kv_override: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI MOV ESI,0x3d CALL 0x00115590 TEST RAX,RAX JZ 0x0011d2f8 MOV R15,RAX MOV R12,RAX SUB R12,RBX CMP R12,0x80 JL 0x0011d334 LAB_0011d2f8: LEA RAX,[0x13fb28] CMP dword ptr [RAX],0x0 JS 0x0011d4e0 CALL 0x0012f9b3 LEA RDX,[0x132448] LAB_0011d314: LEA RCX,[0x132468] XOR EBP,EBP MOV RDI,RAX MOV ESI,0x4 MOV R8,RBX XOR EAX,EAX CALL 0x0012fa50 JMP 0x0011d4e2 LAB_0011d334: LEA RDI,[RSP + 0xc] MOV RSI,RBX MOV RDX,R12 CALL 0x00115130 MOV byte ptr [RSP + R12*0x1 + 0xc],0x0 LEA R12,[R15 + 0x1] LEA RSI,[0x132481] MOV EDX,0x4 MOV RDI,R12 CALL 0x001151f0 TEST EAX,EAX JZ 0x0011d3d7 LEA RSI,[0x132486] MOV EDX,0x6 MOV RDI,R12 CALL 0x001151f0 TEST EAX,EAX JZ 0x0011d3f5 LEA RSI,[0x13248d] MOV EDX,0x5 MOV RDI,R12 CALL 0x001151f0 TEST EAX,EAX JZ 0x0011d450 LEA RSI,[0x1324c3] MOV EDX,0x4 MOV RDI,R12 CALL 0x001151f0 TEST EAX,EAX JZ 0x0011d4a7 LEA RAX,[0x13fb28] CMP dword ptr [RAX],0x0 JS 0x0011d4e0 CALL 0x0012f9b3 LEA RDX,[0x132507] JMP 0x0011d314 LAB_0011d3d7: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x0 MOV RDI,R15 CALL 0x00115620 MOV qword ptr [RSP + 0x90],RAX JMP 0x0011d412 LAB_0011d3f5: ADD R15,0x7 MOV dword ptr [RSP + 0x8],0x1 MOV RDI,R15 CALL 0x001158b0 MOVSD qword ptr [RSP + 0x90],XMM0 LAB_0011d412: MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [R14 + 0x10] JZ 0x0011d438 LEA RSI,[RSP + 0x8] MOV EDX,0x108 MOV RDI,RAX CALL 0x001150c0 ADD qword ptr [R14 + 0x8],0x108 JMP 0x0011d448 LAB_0011d438: LEA RDX,[RSP + 0x8] MOV RDI,R14 MOV RSI,RAX CALL 0x0011ab14 LAB_0011d448: MOV BPL,0x1 JMP 0x0011d4e2 LAB_0011d450: ADD R15,0x6 MOV dword ptr [RSP + 0x8],0x2 LEA RSI,[0x132406] MOV RDI,R15 CALL 0x001158c0 TEST EAX,EAX JZ 0x0011d4f4 LEA RSI,[0x13240b] MOV RDI,R15 CALL 0x001158c0 TEST EAX,EAX JZ 0x0011d522 LEA RAX,[0x13fb28] CMP dword ptr [RAX],0x0 JS 0x0011d4e0 CALL 0x0012f9b3 LEA RDX,[0x132493] JMP 0x0011d314 LAB_0011d4a7: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x3 MOV RDI,R15 CALL 0x001153e0 CMP RAX,0x80 JC 0x0011d501 LEA RAX,[0x13fb28] CMP dword ptr [RAX],0x0 JS 0x0011d4e0 CALL 0x0012f9b3 LEA RDX,[0x1324c8] JMP 0x0011d314 LAB_0011d4e0: XOR EBP,EBP LAB_0011d4e2: MOV EAX,EBP ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011d4f4: MOV byte ptr [RSP + 0x90],0x1 JMP 0x0011d412 LAB_0011d501: LEA RBX,[RSP + 0x90] MOV EDX,0x7f MOV RDI,RBX MOV RSI,R15 CALL 0x00115130 MOV byte ptr [RBX + 0x7f],0x0 JMP 0x0011d412 LAB_0011d522: MOV byte ptr [RSP + 0x90],0x0 JMP 0x0011d412
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override> >&) */ ulong string_parse_kv_override(char *param_1,vector *param_2) { char *__s1; void *__dest; int iVar1; char *pcVar2; int8 uVar3; int8 unaff_RBP; ulong uVar4; size_t sVar5; int4 local_130; char local_12c [132]; double local_a8 [15]; int1 local_29; pcVar2 = strchr(param_1,0x3d); if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) { if (common_log_verbosity_thold < 0) goto LAB_0011d4e0; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\'\n"; goto LAB_0011d314; } strncpy(local_12c,param_1,sVar5); local_12c[sVar5] = '\0'; __s1 = pcVar2 + 1; iVar1 = strncmp(__s1,"int:",4); if (iVar1 == 0) { local_130 = 0; local_a8[0] = (double)atol(pcVar2 + 5); } else { iVar1 = strncmp(__s1,"float:",6); if (iVar1 == 0) { local_130 = 1; local_a8[0] = atof(pcVar2 + 7); } else { iVar1 = strncmp(__s1,"bool:",5); if (iVar1 != 0) { iVar1 = strncmp(__s1,"str:",4); if (iVar1 == 0) { local_130 = 3; sVar5 = strlen(pcVar2 + 5); if (sVar5 < 0x80) { strncpy((char *)local_a8,pcVar2 + 5,0x7f); local_29 = 0; goto LAB_0011d412; } if (common_log_verbosity_thold < 0) goto LAB_0011d4e0; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n"; } else { if (common_log_verbosity_thold < 0) { LAB_0011d4e0: uVar4 = 0; goto LAB_0011d4e2; } uVar3 = common_log_main(); pcVar2 = "%s: invalid type for KV override \'%s\'\n"; } LAB_0011d314: uVar4 = 0; common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1); goto LAB_0011d4e2; } local_130 = 2; iVar1 = strcmp(pcVar2 + 6,"true"); if (iVar1 == 0) { local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1); } else { iVar1 = strcmp(pcVar2 + 6,"false"); if (iVar1 != 0) { if (common_log_verbosity_thold < 0) goto LAB_0011d4e0; uVar3 = common_log_main(); pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n"; goto LAB_0011d314; } local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00); } } } LAB_0011d412: __dest = *(void **)(param_2 + 8); if (__dest == *(void **)(param_2 + 0x10)) { std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>:: _M_realloc_insert<llama_model_kv_override> ((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2, __dest,&local_130); } else { memcpy(__dest,&local_130,0x108); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108; } uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); LAB_0011d4e2: return uVar4 & 0xffffffff; }
39,919
js_array_find
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_find(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int mode) { JSValue func, this_arg; JSValue args[3]; JSValue obj, val, index_val, res; int64_t len, k, end; int dir; index_val = JS_UNDEFINED; val = JS_UNDEFINED; obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; func = argv[0]; if (check_function(ctx, func)) goto exception; this_arg = JS_UNDEFINED; if (argc > 1) this_arg = argv[1]; k = 0; dir = 1; end = len; if (mode == ArrayFindLast || mode == ArrayFindLastIndex) { k = len - 1; dir = -1; end = -1; } // TODO(bnoordhuis) add fast path for fast arrays for(; k != end; k += dir) { index_val = js_int64(k); val = JS_GetPropertyValue(ctx, obj, index_val); if (JS_IsException(val)) goto exception; args[0] = val; args[1] = index_val; args[2] = this_val; res = JS_Call(ctx, func, this_arg, 3, args); if (JS_IsException(res)) goto exception; if (JS_ToBoolFree(ctx, res)) { if (mode == ArrayFindIndex || mode == ArrayFindLastIndex) { JS_FreeValue(ctx, val); JS_FreeValue(ctx, obj); return index_val; } else { JS_FreeValue(ctx, index_val); JS_FreeValue(ctx, obj); return val; } } JS_FreeValue(ctx, val); JS_FreeValue(ctx, index_val); } JS_FreeValue(ctx, obj); if (mode == ArrayFindIndex || mode == ArrayFindLastIndex) return js_int32(-1); else return JS_UNDEFINED; exception: JS_FreeValue(ctx, index_val); JS_FreeValue(ctx, val); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O2
c
js_array_find: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r9d, 0x14(%rsp) movq %r8, %rbx movl %ecx, 0x28(%rsp) movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbp callq 0x24742 movq %rdx, %r13 leaq 0x68(%rsp), %rsi movq %rbp, %rdi movq %rax, 0x20(%rsp) movq %rax, %rdx movq %r13, %rcx callq 0x207f3 pushq $0x3 popq %r15 testl %eax, %eax jne 0x6694e movq %r12, 0x58(%rsp) movq %r14, 0x60(%rsp) movq (%rbx), %r12 movq 0x8(%rbx), %r14 movq %rbp, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x3d04a testl %eax, %eax je 0x669a6 xorl %esi, %esi xorl %eax, %eax movq %r15, %r12 xorl %ebx, %ebx xorl %ecx, %ecx orq %rcx, %rbx orq %rax, %rsi movq %rbp, %rdi movq %r15, %rdx callq 0x1bbce movq %rbp, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x1bbce movq %rbp, %rdi movq 0x20(%rsp), %rsi movq %r13, %rdx callq 0x1bbce pushq $0x6 popq %rdx xorl %ebx, %ebx xorl %ecx, %ecx movl %ebx, %eax orq %rcx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x2, 0x28(%rsp) movq %r13, 0x18(%rsp) jl 0x669c6 movq 0x10(%rbx), %rax movq %rax, 0x30(%rsp) movq 0x18(%rbx), %rax movq %rax, 0x38(%rsp) jmp 0x669d7 pushq $0x3 popq %rax movq %rax, 0x38(%rsp) movq $0x0, 0x30(%rsp) movl 0x14(%rsp), %ecx movq 0x68(%rsp), %rax andl $-0x2, %ecx leaq -0x1(%rax), %rdx xorl %edi, %edi xorl %esi, %esi cmpl $0x2, %ecx setne %sil leaq -0x1(%rsi,%rsi), %rcx movq %rcx, 0x40(%rsp) pushq $-0x1 popq %rcx cmovneq %rax, %rcx movq %rcx, 0x50(%rsp) cmoveq %rdx, %rdi movq %r14, 0x48(%rsp) cmpq %rdi, 0x50(%rsp) je 0x66b25 movq %r12, %r13 movq %rdi, 0x28(%rsp) callq 0x245bb movq %rax, %rbx movq %rdx, %r14 movq %rbp, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx movq %rax, %rcx movq %r14, %r8 callq 0x3bc14 movq %rax, %rdi movq %rdx, %r12 cmpl $0x6, %r12d je 0x66afe movq %rdi, 0x70(%rsp) movq %r12, 0x78(%rsp) movq %rbx, 0x80(%rsp) movq %r14, 0x88(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x98(%rsp) leaq 0x70(%rsp), %rax movq %rax, (%rsp) movq %rdi, %r15 movq %rbp, %rdi movq %r13, %rsi movq 0x48(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r8 pushq $0x3 popq %r9 callq 0x25a66 movq %r15, %rdi cmpl $0x6, %edx je 0x66afe movq %rbp, %rdi movq %rax, %rsi callq 0x209aa testl %eax, %eax jne 0x66b51 movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1bbce movq %rbp, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1bbce movq 0x28(%rsp), %rdi addq 0x40(%rsp), %rdi movq %r13, %r12 jmp 0x66a11 movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 movq %rbx, %rax andq %rdx, %rax movq %rdi, %rcx andq %rdx, %rcx movl %ebx, %esi movl %edi, %ebx movq 0x18(%rsp), %r13 movq %r14, %r15 jmp 0x66959 movq %rbp, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x1bbce movl 0x14(%rsp), %eax orl $0x2, %eax cmpl $0x3, %eax jne 0x66b95 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF xorl %ecx, %ecx xorl %edx, %edx jmp 0x6698f movl 0x14(%rsp), %eax orl $0x2, %eax movq %rbp, %rdi cmpl $0x3, %eax jne 0x66b9c movq %r15, %rsi movq %r12, %rdx callq 0x1bbce movq %rbp, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x1bbce movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbx, %rcx andq %rax, %rcx movq %r14, %rdx jmp 0x6698f pushq $0x3 jmp 0x6698a movq %rbx, %rsi movq %r14, %rdx callq 0x1bbce movq %rbp, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x1bbce movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r15, %rcx andq %rax, %rcx movq %r15, %rbx movq %r12, %rdx jmp 0x6698f
js_array_find: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov [rsp+0D8h+var_C4], r9d mov rbx, r8 mov dword ptr [rsp+0D8h+var_B0], ecx mov r14, rdx mov r12, rsi mov rbp, rdi call JS_ToObject mov r13, rdx lea rsi, [rsp+0D8h+var_70] mov rdi, rbp mov [rsp+0D8h+var_B8], rax mov rdx, rax mov rcx, r13 call js_get_length64 push 3 pop r15 test eax, eax jnz short loc_6694E mov [rsp+0D8h+var_80], r12 mov [rsp+0D8h+var_78], r14 mov r12, [rbx] mov r14, [rbx+8] mov rdi, rbp mov rsi, r12 mov rdx, r14 call check_function test eax, eax jz short loc_669A6 loc_6694E: xor esi, esi xor eax, eax mov r12, r15 xor ebx, ebx xor ecx, ecx loc_66959: or rbx, rcx or rsi, rax mov rdi, rbp mov rdx, r15 call JS_FreeValue mov rdi, rbp mov rsi, rbx mov rdx, r12 call JS_FreeValue mov rdi, rbp mov rsi, [rsp+0D8h+var_B8] mov rdx, r13 call JS_FreeValue push 6 loc_6698A: pop rdx xor ebx, ebx xor ecx, ecx loc_6698F: mov eax, ebx or rax, rcx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_669A6: cmp dword ptr [rsp+0D8h+var_B0], 2 mov [rsp+0D8h+var_C0], r13 jl short loc_669C6 mov rax, [rbx+10h] mov [rsp+0D8h+var_A8], rax mov rax, [rbx+18h] mov [rsp+0D8h+var_A0], rax jmp short loc_669D7 loc_669C6: push 3 pop rax mov [rsp+0D8h+var_A0], rax mov [rsp+0D8h+var_A8], 0 loc_669D7: mov ecx, [rsp+0D8h+var_C4] mov rax, [rsp+0D8h+var_70] and ecx, 0FFFFFFFEh lea rdx, [rax-1] xor edi, edi xor esi, esi cmp ecx, 2 setnz sil lea rcx, [rsi+rsi-1] mov [rsp+0D8h+var_98], rcx push 0FFFFFFFFFFFFFFFFh pop rcx cmovnz rcx, rax mov [rsp+0D8h+var_88], rcx cmovz rdi, rdx mov [rsp+0D8h+var_90], r14 loc_66A11: cmp [rsp+0D8h+var_88], rdi jz loc_66B25 mov r13, r12 mov [rsp+0D8h+var_B0], rdi call js_int64 mov rbx, rax mov r14, rdx mov rdi, rbp mov rsi, [rsp+0D8h+var_B8] mov rdx, [rsp+0D8h+var_C0] mov rcx, rax mov r8, r14 call JS_GetPropertyValue mov rdi, rax mov r12, rdx cmp r12d, 6 jz loc_66AFE mov [rsp+0D8h+var_68], rdi mov [rsp+0D8h+var_60], r12 mov [rsp+0D8h+var_58], rbx mov [rsp+0D8h+var_50], r14 mov rax, [rsp+0D8h+var_80] mov [rsp+0D8h+var_48], rax mov rax, [rsp+0D8h+var_78] mov [rsp+0D8h+var_40], rax lea rax, [rsp+0D8h+var_68] mov [rsp+0D8h+var_D8], rax mov r15, rdi mov rdi, rbp mov rsi, r13 mov rdx, [rsp+0D8h+var_90] mov rcx, [rsp+0D8h+var_A8] mov r8, [rsp+0D8h+var_A0] push 3 pop r9 call JS_Call mov rdi, r15 cmp edx, 6 jz short loc_66AFE mov rdi, rbp mov rsi, rax call JS_ToBoolFree test eax, eax jnz loc_66B51 mov rdi, rbp mov rsi, r15 mov rdx, r12 call JS_FreeValue mov rdi, rbp mov rsi, rbx mov rdx, r14 call JS_FreeValue mov rdi, [rsp+0D8h+var_B0] add rdi, [rsp+0D8h+var_98] mov r12, r13 jmp loc_66A11 loc_66AFE: mov rdx, 0FFFFFFFF00000000h mov rax, rbx and rax, rdx mov rcx, rdi and rcx, rdx mov esi, ebx mov ebx, edi mov r13, [rsp+0D8h+var_C0] mov r15, r14 jmp loc_66959 loc_66B25: mov rdi, rbp mov rsi, [rsp+0D8h+var_B8] mov rdx, [rsp+0D8h+var_C0] call JS_FreeValue mov eax, [rsp+0D8h+var_C4] or eax, 2 cmp eax, 3 jnz short loc_66B95 mov ebx, 0FFFFFFFFh xor ecx, ecx xor edx, edx jmp loc_6698F loc_66B51: mov eax, [rsp+0D8h+var_C4] or eax, 2 mov rdi, rbp cmp eax, 3 jnz short loc_66B9C mov rsi, r15 mov rdx, r12 call JS_FreeValue mov rdi, rbp mov rsi, [rsp+0D8h+var_B8] mov rdx, [rsp+0D8h+var_C0] call JS_FreeValue mov rax, 0FFFFFFFF00000000h mov rcx, rbx and rcx, rax mov rdx, r14 jmp loc_6698F loc_66B95: push 3 jmp loc_6698A loc_66B9C: mov rsi, rbx mov rdx, r14 call JS_FreeValue mov rdi, rbp mov rsi, [rsp+0D8h+var_B8] mov rdx, [rsp+0D8h+var_C0] call JS_FreeValue mov rax, 0FFFFFFFF00000000h mov rcx, r15 and rcx, rax mov rbx, r15 mov rdx, r12 jmp loc_6698F
unsigned long long js_array_find( 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 v17; // rax long long v18; // rdx long long v19; // r13 double v20; // xmm4_8 double v21; // xmm5_8 long long v22; // r15 long long v23; // r12 long long v24; // r14 long long v25; // rsi unsigned long long v26; // rax long long v27; // r12 long long v28; // rbx unsigned long long v29; // rcx long long v30; // rbx long long v31; // rbx unsigned long long v32; // rcx long long v34; // rdi long long v35; // rcx long long v36; // r13 long long v37; // rdx long long v38; // r14 double v39; // xmm4_8 double v40; // xmm5_8 long long PropertyValue; // rax long long v42; // rdx long long v43; // rdi long long v44; // r15 long long v45; // rax long long v46; // rdx int v47; // [rsp+14h] [rbp-C4h] long long v48; // [rsp+18h] [rbp-C0h] long long v49; // [rsp+20h] [rbp-B8h] int v50; // [rsp+28h] [rbp-B0h] long long v51; // [rsp+28h] [rbp-B0h] long long v52; // [rsp+30h] [rbp-A8h] long long v53; // [rsp+38h] [rbp-A0h] int v54; // [rsp+48h] [rbp-90h] long long v55; // [rsp+50h] [rbp-88h] long long v56; // [rsp+60h] [rbp-78h] long long v57; // [rsp+68h] [rbp-70h] BYREF _QWORD v58[13]; // [rsp+70h] [rbp-68h] BYREF v47 = a6; v50 = a4; v17 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v19 = v18; v49 = v17; v22 = 3LL; if ( (unsigned int)js_get_length64(a1, &v57, v17, v18) || (v56 = a3, v23 = *a5, v24 = a5[1], (unsigned int)check_function(a1, *a5, v24, a7, a8, a9, a10, v20, v21, a13, a14)) ) { v25 = 0LL; v26 = 0LL; v27 = 3LL; v28 = 0LL; v29 = 0LL; LABEL_4: v30 = v29 | v28; JS_FreeValue(a1, v26 | v25, v22); JS_FreeValue(a1, v30, v27); JS_FreeValue(a1, v49, v19); LABEL_5: LODWORD(v31) = 0; v32 = 0LL; } else { v48 = v19; if ( v50 < 2 ) { LODWORD(v53) = 3; LODWORD(v52) = 0; } else { v52 = a5[2]; v53 = a5[3]; } v34 = 0LL; v35 = -1LL; if ( (v47 & 0xFFFFFFFE) != 2 ) v35 = v57; v55 = v35; if ( (v47 & 0xFFFFFFFE) == 2 ) v34 = v57 - 1; v54 = v24; while ( v55 != v34 ) { v36 = v23; v51 = v34; v31 = js_int64(v34); v38 = v37; PropertyValue = JS_GetPropertyValue(a1, v49, v48, v31, v37, a7, a8, a9, a10, v39, v40, a13, a14); v43 = PropertyValue; v27 = v42; if ( (_DWORD)v42 == 6 ) goto LABEL_20; v58[0] = PropertyValue; v58[1] = v42; v58[2] = v31; v58[3] = v38; v58[4] = a2; v58[5] = v56; v44 = PropertyValue; v45 = JS_Call(a1, v36, v54, v52, v53, 3, (long long)v58); if ( (_DWORD)v46 == 6 ) { LABEL_20: v26 = v31 & 0xFFFFFFFF00000000LL; v29 = v43 & 0xFFFFFFFF00000000LL; v25 = (unsigned int)v31; v28 = (unsigned int)v43; v19 = v48; v22 = v38; goto LABEL_4; } if ( (unsigned int)JS_ToBoolFree(a1, v45, v46) ) { if ( (v47 | 2) == 3 ) { JS_FreeValue(a1, v44, v27); JS_FreeValue(a1, v49, v48); v32 = v31 & 0xFFFFFFFF00000000LL; } else { JS_FreeValue(a1, v31, v38); JS_FreeValue(a1, v49, v48); v32 = v44 & 0xFFFFFFFF00000000LL; LODWORD(v31) = v44; } return v32 | (unsigned int)v31; } JS_FreeValue(a1, v43, v27); JS_FreeValue(a1, v31, v38); v34 = 2LL * ((v47 & 0xFFFFFFFE) != 2) - 1 + v51; v23 = v36; } JS_FreeValue(a1, v49, v48); if ( (v47 | 2) != 3 ) goto LABEL_5; LODWORD(v31) = -1; v32 = 0LL; } return v32 | (unsigned int)v31; }
js_array_find: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV dword ptr [RSP + 0x14],R9D MOV RBX,R8 MOV dword ptr [RSP + 0x28],ECX MOV R14,RDX MOV R12,RSI MOV RBP,RDI CALL 0x00124742 MOV R13,RDX LEA RSI,[RSP + 0x68] MOV RDI,RBP MOV qword ptr [RSP + 0x20],RAX MOV RDX,RAX MOV RCX,R13 CALL 0x001207f3 PUSH 0x3 POP R15 TEST EAX,EAX JNZ 0x0016694e MOV qword ptr [RSP + 0x58],R12 MOV qword ptr [RSP + 0x60],R14 MOV R12,qword ptr [RBX] MOV R14,qword ptr [RBX + 0x8] MOV RDI,RBP MOV RSI,R12 MOV RDX,R14 CALL 0x0013d04a TEST EAX,EAX JZ 0x001669a6 LAB_0016694e: XOR ESI,ESI XOR EAX,EAX MOV R12,R15 XOR EBX,EBX XOR ECX,ECX LAB_00166959: OR RBX,RCX OR RSI,RAX MOV RDI,RBP MOV RDX,R15 CALL 0x0011bbce MOV RDI,RBP MOV RSI,RBX MOV RDX,R12 CALL 0x0011bbce MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] MOV RDX,R13 CALL 0x0011bbce PUSH 0x6 LAB_0016698a: POP RDX XOR EBX,EBX XOR ECX,ECX LAB_0016698f: MOV EAX,EBX OR RAX,RCX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001669a6: CMP dword ptr [RSP + 0x28],0x2 MOV qword ptr [RSP + 0x18],R13 JL 0x001669c6 MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x38],RAX JMP 0x001669d7 LAB_001669c6: PUSH 0x3 POP RAX MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x30],0x0 LAB_001669d7: MOV ECX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RSP + 0x68] AND ECX,0xfffffffe LEA RDX,[RAX + -0x1] XOR EDI,EDI XOR ESI,ESI CMP ECX,0x2 SETNZ SIL LEA RCX,[RSI + RSI*0x1 + -0x1] MOV qword ptr [RSP + 0x40],RCX PUSH -0x1 POP RCX CMOVNZ RCX,RAX MOV qword ptr [RSP + 0x50],RCX CMOVZ RDI,RDX MOV qword ptr [RSP + 0x48],R14 LAB_00166a11: CMP qword ptr [RSP + 0x50],RDI JZ 0x00166b25 MOV R13,R12 MOV qword ptr [RSP + 0x28],RDI CALL 0x001245bb MOV RBX,RAX MOV R14,RDX MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RAX MOV R8,R14 CALL 0x0013bc14 MOV RDI,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00166afe MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x78],R12 MOV qword ptr [RSP + 0x80],RBX MOV qword ptr [RSP + 0x88],R14 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0x70] MOV qword ptr [RSP],RAX MOV R15,RDI MOV RDI,RBP MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x38] PUSH 0x3 POP R9 CALL 0x00125a66 MOV RDI,R15 CMP EDX,0x6 JZ 0x00166afe MOV RDI,RBP MOV RSI,RAX CALL 0x001209aa TEST EAX,EAX JNZ 0x00166b51 MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 CALL 0x0011bbce MOV RDI,RBP MOV RSI,RBX MOV RDX,R14 CALL 0x0011bbce MOV RDI,qword ptr [RSP + 0x28] ADD RDI,qword ptr [RSP + 0x40] MOV R12,R13 JMP 0x00166a11 LAB_00166afe: MOV RDX,-0x100000000 MOV RAX,RBX AND RAX,RDX MOV RCX,RDI AND RCX,RDX MOV ESI,EBX MOV EBX,EDI MOV R13,qword ptr [RSP + 0x18] MOV R15,R14 JMP 0x00166959 LAB_00166b25: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011bbce MOV EAX,dword ptr [RSP + 0x14] OR EAX,0x2 CMP EAX,0x3 JNZ 0x00166b95 MOV EBX,0xffffffff XOR ECX,ECX XOR EDX,EDX JMP 0x0016698f LAB_00166b51: MOV EAX,dword ptr [RSP + 0x14] OR EAX,0x2 MOV RDI,RBP CMP EAX,0x3 JNZ 0x00166b9c MOV RSI,R15 MOV RDX,R12 CALL 0x0011bbce MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011bbce MOV RAX,-0x100000000 MOV RCX,RBX AND RCX,RAX MOV RDX,R14 JMP 0x0016698f LAB_00166b95: PUSH 0x3 JMP 0x0016698a LAB_00166b9c: MOV RSI,RBX MOV RDX,R14 CALL 0x0011bbce MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011bbce MOV RAX,-0x100000000 MOV RCX,R15 AND RCX,RAX MOV RBX,R15 MOV RDX,R12 JMP 0x0016698f
int1 [16] js_array_find(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5,uint param_6) { int8 uVar1; int8 uVar2; long lVar3; int1 auVar4 [16]; int iVar5; ulong uVar7; ulong uVar8; ulong uVar9; ulong uVar11; long lVar12; int8 uVar13; int8 uVar14; bool bVar15; int1 auVar16 [16]; int1 auVar17 [16]; int1 auVar18 [16]; int1 auVar19 [12]; ulong uStackY_e0; int8 local_a8; int8 local_a0; long local_70; int1 local_68 [16]; int1 local_58 [16]; int8 local_48; int8 local_40; int8 uVar6; int8 uVar10; auVar16 = JS_ToObject(); uVar10 = auVar16._8_8_; uVar6 = auVar16._0_8_; iVar5 = js_get_length64(param_1,&local_70,uVar6,uVar10); uVar13 = 3; if (iVar5 == 0) { uVar1 = *param_5; uVar2 = param_5[1]; iVar5 = check_function(param_1,uVar1,uVar2); auVar18._8_8_ = local_58._8_8_; auVar18._0_8_ = local_58._0_8_; auVar16._8_8_ = local_68._8_8_; auVar16._0_8_ = local_68._0_8_; if (iVar5 != 0) goto LAB_0016694e; if (param_4 < 2) { local_a0 = 3; local_a8 = 0; } else { local_a8 = param_5[2]; local_a0 = param_5[3]; } lVar12 = 0; bVar15 = (param_6 & 0xfffffffe) != 2; lVar3 = local_70; if (!bVar15) { lVar12 = local_70 + -1; lVar3 = -1; local_68 = auVar16; local_58 = auVar18; } for (; lVar3 != lVar12; lVar12 = lVar12 + (ulong)bVar15 * 2 + -1) { auVar18 = js_int64(); uVar14 = auVar18._8_8_; uVar9 = auVar18._0_8_; auVar16 = JS_GetPropertyValue(param_1,uVar6,uVar10,uVar9,uVar14); uVar13 = auVar16._8_8_; uVar11 = auVar16._0_8_; if (auVar16._8_4_ == 6) { LAB_00166afe: uVar7 = uVar9 & 0xffffffff00000000; uVar8 = uVar11 & 0xffffffff00000000; uVar9 = uVar9 & 0xffffffff; uVar11 = uVar11 & 0xffffffff; goto LAB_00166959; } local_48 = param_2; local_40 = param_3; local_68 = auVar16; local_58 = auVar18; auVar19 = JS_Call(param_1,uVar1,uVar2,local_a8,local_a0,3,local_68); if (auVar19._8_4_ == 6) goto LAB_00166afe; iVar5 = JS_ToBoolFree(param_1,auVar19._0_8_); if (iVar5 != 0) { if ((param_6 | 2) == 3) { JS_FreeValue(param_1,uVar11,uVar13); JS_FreeValue(param_1,uVar6,uVar10); uVar9 = uVar9 & 0xffffffff00000000; auVar16 = auVar18; } else { JS_FreeValue(param_1,uVar9,uVar14); JS_FreeValue(param_1,uVar6,uVar10); uVar9 = uVar11 & 0xffffffff00000000; } goto LAB_0016698f; } JS_FreeValue(param_1,uVar11,uVar13); JS_FreeValue(param_1,uVar9,uVar14); } JS_FreeValue(param_1,uVar6,uVar10); if ((param_6 | 2) == 3) { uVar9 = 0; auVar16 = ZEXT816(0xffffffff); goto LAB_0016698f; } uStackY_e0 = 3; } else { LAB_0016694e: uVar9 = 0; uVar7 = 0; uVar11 = 0; uVar8 = 0; uVar14 = uVar13; LAB_00166959: JS_FreeValue(param_1,uVar9 | uVar7,uVar14); JS_FreeValue(param_1,uVar11 | uVar8,uVar13); JS_FreeValue(param_1,uVar6,uVar10); uStackY_e0 = 6; } auVar4._8_8_ = 0; auVar4._0_8_ = uStackY_e0; uVar9 = 0; auVar16 = auVar4 << 0x40; LAB_0016698f: auVar17._8_8_ = auVar16._8_8_; auVar17._0_8_ = auVar16._0_8_ & 0xffffffff | uVar9; return auVar17; }
39,920
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [12], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %rbp movq %rbp, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x20670 movq %rax, %r13 addq 0x8(%r15), %r13 movq %r14, %rdi callq 0x20670 addq %rax, %r13 movq %rbx, %rdi movq %r13, %rsi callq 0x20e10 movq %rbx, %rdi movq %r12, %rsi callq 0x20b30 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x20550 movq %rbx, %rdi movq %r14, %rsi callq 0x20b30 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq %rbp, %rdi je 0xbc2bb movq (%rbp), %rsi incq %rsi callq 0x20170 movq %r14, %rdi callq 0x20ae0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi lea rbp, [rdi+10h] mov [rdi], rbp mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r13, rax add r13, [r15+8] mov rdi, r14 call _strlen add r13, rax mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, rbp jz short loc_BC2BB mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BC2BB: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>( long long a1, long long a2, _QWORD *a3, long long a4) { long long v6; // r13 long long v7; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v6 = a3[1] + strlen(a2); v7 = strlen(a4); std::string::reserve(a1, v7 + v6); std::string::append(a1, a2); std::string::append(a1, *a3, a3[1]); std::string::append(a1, a4); return a1; }
concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LEA RBP,[RDI + 0x10] MOV qword ptr [RDI],RBP MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x00120670 MOV R13,RAX ADD R13,qword ptr [R15 + 0x8] MOV RDI,R14 CALL 0x00120670 ADD R13,RAX LAB_001bc262: MOV RDI,RBX MOV RSI,R13 CALL 0x00120e10 MOV RDI,RBX MOV RSI,R12 CALL 0x00120b30 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00120550 MOV RDI,RBX MOV RSI,R14 CALL 0x00120b30 LAB_001bc292: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [13], std::__cxx11::string, char const (&) [17]>(char const (&) [13], std::__cxx11::string&&, char const (&) [17]) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]> (detail *this,char *param_1,string *param_2,char *param_3) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(param_3); /* try { // try from 001bc262 to 001bc291 has its CatchHandler @ 001bc2a4 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this,*(ulong *)param_2); std::__cxx11::string::append((char *)this); return this; }
39,921
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()); }
O1
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 0x8f8f9(%rip), %rax # 0x12e140 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 0x59800 movb $0x0, 0x40(%r15) movq %r13, 0x48(%r15) movq %r12, %rdi movl $0x1, %esi callq 0x59800 movq (%r14), %rax movq %rax, 0x68(%rbx) movq 0x8(%r14), %rax movq %rax, 0x70(%rbx) testq %rax, %rax je 0x9e8e7 movq 0x906af(%rip), %rcx # 0x12ef88 cmpb $0x0, (%rcx) je 0x9e8e3 incl 0x8(%rax) jmp 0x9e8e7 lock incl 0x8(%rax) cmpq $0x0, 0x38(%rbx) je 0x9e8fd addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x18(%rbx), %r14 movl $0x10, %edi callq 0x1b430 movq %rax, %r15 leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x88256 leaq 0x55177(%rip), %rsi # 0xf3aa0 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x7a07b movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0x1be30 xorl %ebp, %ebp movq 0x9069f(%rip), %rsi # 0x12eff0 movq 0x90608(%rip), %rdx # 0x12ef60 movq %r15, %rdi callq 0x1bf20 movq %rax, %r12 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9e986 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9e986 movq %rax, %r12 movb $0x1, %bpl leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9e9a9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9e9a9 movq %rax, %r12 movb $0x1, %bpl testb %bpl, %bpl je 0x9e9b6 movq %r15, %rdi callq 0x1b670 movq 0x70(%rbx), %rdi addq $0x8, %rbx testq %rdi, %rdi je 0x9e9c8 callq 0x6e958 movq %r14, %rdi callq 0x87f62 movq %rbx, %rdi callq 0x9e9e0 movq %r12, %rdi callq 0x1bfb0
_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_9E8E7 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_9E8E3 inc dword ptr [rax+8] jmp short loc_9E8E7 loc_9E8E3: lock inc dword ptr [rax+8] loc_9E8E7: cmp qword ptr [rbx+38h], 0 jz short loc_9E8FD add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9E8FD: 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_9E986 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9E986 mov r12, rax mov bpl, 1 loc_9E986: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9E9A9 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9E9A9 mov r12, rax mov bpl, 1 loc_9E9A9: test bpl, bpl jz short loc_9E9B6 mov rdi, r15; void * call ___cxa_free_exception loc_9E9B6: mov rdi, [rbx+70h] add rbx, 8 test rdi, rdi jz short loc_9E9C8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9E9C8: 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,[0x22e140] 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 0x00159800 MOV byte ptr [R15 + 0x40],0x0 MOV qword ptr [R15 + 0x48],R13 MOV RDI,R12 MOV ESI,0x1 CALL 0x00159800 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 0x0019e8e7 MOV RCX,qword ptr [0x0022ef88] CMP byte ptr [RCX],0x0 JZ 0x0019e8e3 INC dword ptr [RAX + 0x8] JMP 0x0019e8e7 LAB_0019e8e3: INC.LOCK dword ptr [RAX + 0x8] LAB_0019e8e7: CMP qword ptr [RBX + 0x38],0x0 JZ 0x0019e8fd ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019e8fd: LEA R14,[RBX + 0x18] MOV EDI,0x10 CALL 0x0011b430 MOV R15,RAX LAB_0019e90e: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00188256 LAB_0019e922: LEA RSI,[0x1f3aa0] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0017a07b MOV BPL,0x1 LAB_0019e93b: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x0011be30 XOR EBP,EBP MOV RSI,qword ptr [0x0022eff0] MOV RDX,qword ptr [0x0022ef60] MOV RDI,R15 CALL 0x0011bf20
/* 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_0022e150; *(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_0022ef88 == '\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 0019e90e to 0019e921 has its CatchHandler @ 0019e9a3 */ Value::dump_abi_cxx11_((int)local_70,(bool)((char)this + '\x18')); /* try { // try from 0019e922 to 0019e937 has its CatchHandler @ 0019e980 */ std::operator+((char *)local_50,(string *)"Context values must be an object: "); /* try { // try from 0019e93b to 0019e95f has its CatchHandler @ 0019e960 */ std::runtime_error::runtime_error(this_00,local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60); }
39,922
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool)
monkey531[P]llama/common/json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, const parser_callback_t cb, const bool allow_exceptions_ = true) : root(r), callback(cb), allow_exceptions(allow_exceptions_) { keep_stack.push_back(true); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdi, %r14 movq %rsi, (%rdi) leaq 0x20(%rdi), %rbx leaq 0x80(%rdi), %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x38(%rdi) movups %xmm0, 0x48(%rdi) movups %xmm0, 0x58(%rdi) movups %xmm0, 0x68(%rdi) movb $0x0, 0x78(%rdi) movq %r15, %rdi movq %rdx, %rsi callq 0x40c9e movb %bpl, 0xa0(%r14) leaq 0xa8(%r14), %r13 pushq $0x9 popq %rsi movq %r13, %rdi callq 0x43668 pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x44216 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 movq %r13, %rdi callq 0x40bea jmp 0x42779 movq %rax, %r12 movq %r15, %rdi callq 0x4b47a jmp 0x42786 movq %rax, %r12 leaq 0x8(%r14), %r15 addq $0x48, %r14 movq %r14, %rdi callq 0x44254 movq %rbx, %rdi callq 0x44254 movq %r15, %rdi callq 0x44782 movq %r12, %rdi callq 0x25250
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov r14, rdi mov [rdi], rsi lea rbx, [rdi+20h] lea r15, [rdi+80h] xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+38h], xmm0 movups xmmword ptr [rdi+48h], xmm0 movups xmmword ptr [rdi+58h], xmm0 movups xmmword ptr [rdi+68h], xmm0 mov byte ptr [rdi+78h], 0 mov rdi, r15 mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) mov [r14+0A0h], bpl lea r13, [r14+0A8h] push 9 pop rsi mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_tE; 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::detail::value_t) push 1 pop rsi mov rdi, rbx call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r12, rax mov rdi, r13 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_42779 mov r12, rax loc_42779: mov rdi, r15; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_42786 mov r12, rax loc_42786: lea r15, [r14+8] add r14, 48h ; 'H' mov rdi, r14 call _ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base() mov rdi, rbx call _ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base() mov rdi, r15 call _ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::~_Vector_base() mov rdi, r12 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4) { *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (_OWORD *)(a1 + 128), a3); *(_BYTE *)(a1 + 160) = a4; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1 + 168, 9LL); return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV R14,RDI MOV qword ptr [RDI],RSI LEA RBX,[RDI + 0x20] LEA R15,[RDI + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOVUPS xmmword ptr [RDI + 0x68],XMM0 MOV byte ptr [RDI + 0x78],0x0 LAB_0014272b: MOV RDI,R15 MOV RSI,RDX CALL 0x00140c9e MOV byte ptr [R14 + 0xa0],BPL LEA R13,[R14 + 0xa8] LAB_00142744: PUSH 0x9 POP RSI MOV RDI,R13 CALL 0x00143668 LAB_0014274f: PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x00144216 LAB_0014275a: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 param_1,function *param_3, json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> param_4) { *(int8 *)this = param_1; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; /* try { // try from 0014272b to 00142735 has its CatchHandler @ 00142783 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),param_3); this[0xa0] = param_4; /* try { // try from 00142744 to 0014274e has its CatchHandler @ 00142776 */ 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(this + 0xa8,9); /* try { // try from 0014274f to 00142759 has its CatchHandler @ 00142769 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
39,923
LefDefParser::lefwLayerAntennaCumDiffAreaRatioPwl(int, double*, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaCumDiffAreaRatioPwl(int numPwls, double *diffusions, double *ratios) { int i; lefw54Num = LEFW_ANTENNACUMDIFFAREARATIOPWL; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING && lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER) return LEFW_BAD_ORDER; // only routing or cut calls this func if (!lefwIsRouting && !lefwIsCut) return LEFW_BAD_DATA; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " ANTENNACUMDIFFAREARATIO PWL ( "); for (i = 0; i < numPwls; i++) encPrint(lefwFile, (char*) "( %.11g %.11g ) ", *diffusions++, *ratios++); encPrint(lefwFile, (char*) ") ;\n"); } else { fprintf(lefwFile, " ANTENNACUMDIFFAREARATIO PWL ( "); for (i = 0; i < numPwls; i++) fprintf(lefwFile, "( %.11g %.11g ) ", *diffusions++, *ratios++); fprintf(lefwFile, ") ;\n"); } lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerAntennaCumDiffAreaRatioPwl(int, double*, double*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl $0x6a, 0x183ea(%rip) # 0x24d4c leaq 0x18497(%rip), %r12 # 0x24e00 movq (%r12), %rcx testq %rcx, %rcx je 0xca3a movq %rdx, %rbx leaq 0x186d0(%rip), %rax # 0x25050 movl (%rax), %edx movl $0x2, %eax cmpl $0x1f, %edx ja 0xcaad movq %rsi, %r14 movl $0x900000c0, %esi # imm = 0x900000C0 btl %edx, %esi jae 0xcaad leaq 0x1871c(%rip), %rdx # 0x250c4 leaq 0x186d5(%rip), %rax # 0x25084 movl (%rax), %esi movl $0x3, %eax orl (%rdx), %esi je 0xcaad movl $0x5, %eax movsd 0xc74d(%rip), %xmm0 # 0x19118 ucomisd 0x1836d(%rip), %xmm0 # 0x24d40 ja 0xcaad movl %edi, %ebp cmpb $0x1, 0x1870a(%rip) # 0x250ec jne 0xca41 leaq 0xe403(%rip), %rsi # 0x1adee movq %rcx, %rdi xorl %eax, %eax callq 0x18c35 testl %ebp, %ebp jle 0xca26 movl %ebp, %r13d xorl %ebp, %ebp leaq 0xe38f(%rip), %r15 # 0x1ad94 movq (%r12), %rdi movsd (%r14,%rbp,8), %xmm0 movsd (%rbx,%rbp,8), %xmm1 movq %r15, %rsi movb $0x2, %al callq 0x18c35 incq %rbp cmpl %ebp, %r13d jne 0xca05 movq (%r12), %rdi leaq 0xe374(%rip), %rsi # 0x1ada5 xorl %eax, %eax callq 0x18c35 jmp 0xcaa2 movl $0x1, %eax jmp 0xcaad leaq 0xe3a6(%rip), %rdi # 0x1adee movl $0x21, %esi movl $0x1, %edx callq 0x1110 testl %ebp, %ebp jle 0xca88 movl %ebp, %r13d xorl %ebp, %ebp leaq 0xe32d(%rip), %r15 # 0x1ad94 movq (%r12), %rdi movsd (%r14,%rbp,8), %xmm0 movsd (%rbx,%rbp,8), %xmm1 movq %r15, %rsi movb $0x2, %al callq 0x10f0 incq %rbp cmpl %ebp, %r13d jne 0xca67 movq (%r12), %rcx leaq 0xe312(%rip), %rdi # 0x1ada5 movl $0x4, %esi movl $0x1, %edx callq 0x1110 leaq 0x185a3(%rip), %rax # 0x2504c incl (%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser35lefwLayerAntennaCumDiffAreaRatioPwlEiPdS0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov cs:_ZN12LefDefParserL9lefw54NumE, 6Ah ; 'j'; LefDefParser::lefw54Num lea r12, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [r12] test rcx, rcx jz loc_CA3A mov rbx, rdx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] mov eax, 2 cmp edx, 1Fh ja loc_CAAD mov r14, rsi mov esi, 900000C0h bt esi, edx jnb loc_CAAD lea rdx, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut mov esi, [rax] mov eax, 3 or esi, [rdx] jz loc_CAAD mov eax, 5 movsd xmm0, cs:dbl_19118 ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja loc_CAAD mov ebp, edi cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_CA41 lea rsi, aAntennacumdiff_0; " ANTENNACUMDIFFAREARATIO PWL ( " mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) test ebp, ebp jle short loc_CA26 mov r13d, ebp xor ebp, ebp lea r15, a11g11g_0; "( %.11g %.11g ) " loc_CA05: mov rdi, [r12] movsd xmm0, qword ptr [r14+rbp*8] movsd xmm1, qword ptr [rbx+rbp*8] mov rsi, r15 mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) inc rbp cmp r13d, ebp jnz short loc_CA05 loc_CA26: mov rdi, [r12] lea rsi, asc_1ADA5; ") ;\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_CAA2 loc_CA3A: mov eax, 1 jmp short loc_CAAD loc_CA41: lea rdi, aAntennacumdiff_0; " ANTENNACUMDIFFAREARATIO PWL ( " mov esi, 21h ; '!' mov edx, 1 call _fwrite test ebp, ebp jle short loc_CA88 mov r13d, ebp xor ebp, ebp lea r15, a11g11g_0; "( %.11g %.11g ) " loc_CA67: mov rdi, [r12] movsd xmm0, qword ptr [r14+rbp*8] movsd xmm1, qword ptr [rbx+rbp*8] mov rsi, r15 mov al, 2 call _fprintf inc rbp cmp r13d, ebp jnz short loc_CA67 loc_CA88: mov rcx, [r12] lea rdi, asc_1ADA5; ") ;\n" mov esi, 4 mov edx, 1 call _fwrite loc_CAA2: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_CAAD: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::lefwLayerAntennaCumDiffAreaRatioPwl( LefDefParser *this, long long a2, double *a3, double *a4, int a5, int a6) { long long result; // rax int v9; // esi int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d long long v14; // rbp long long v15; // rbp LefDefParser::lefw54Num = 106; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState <= 0x1F ) { v9 = -1879048000; if ( _bittest(&v9, LefDefParser::lefwState) ) { result = 3LL; if ( LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut ) { result = 5LL; if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) { LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNACUMDIFFAREARATIO PWL ( ", (unsigned int)&LefDefParser::lefwIsRouting, LefDefParser::lefwFile, a5, a6); if ( (int)this > 0 ) { v14 = 0LL; do { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"( %.11g %.11g ) ", v10, v11, v12, v13); ++v14; } while ( (_DWORD)this != (_DWORD)v14 ); } LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)") ;\n", v10, v11, v12, v13); } else { fwrite(" ANTENNACUMDIFFAREARATIO PWL ( ", 33LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); if ( (int)this > 0 ) { v15 = 0LL; do { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "( %.11g %.11g ) ", *(double *)(a2 + 8 * v15), a3[v15]); ++v15; } while ( (_DWORD)this != (_DWORD)v15 ); } fwrite(") ;\n", 4LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); } ++LefDefParser::lefwLines; return 0LL; } } } } return result; }
lefwLayerAntennaCumDiffAreaRatioPwl: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV dword ptr [0x00124d4c],0x6a LEA R12,[0x124e00] MOV RCX,qword ptr [R12] TEST RCX,RCX JZ 0x0010ca3a MOV RBX,RDX LEA RAX,[0x125050] MOV EDX,dword ptr [RAX] MOV EAX,0x2 CMP EDX,0x1f JA 0x0010caad MOV R14,RSI MOV ESI,0x900000c0 BT ESI,EDX JNC 0x0010caad LEA RDX,[0x1250c4] LEA RAX,[0x125084] MOV ESI,dword ptr [RAX] MOV EAX,0x3 OR ESI,dword ptr [RDX] JZ 0x0010caad MOV EAX,0x5 MOVSD XMM0,qword ptr [0x00119118] UCOMISD XMM0,qword ptr [0x00124d40] JA 0x0010caad MOV EBP,EDI CMP byte ptr [0x001250ec],0x1 JNZ 0x0010ca41 LEA RSI,[0x11adee] MOV RDI,RCX XOR EAX,EAX CALL 0x00118c35 TEST EBP,EBP JLE 0x0010ca26 MOV R13D,EBP XOR EBP,EBP LEA R15,[0x11ad94] LAB_0010ca05: MOV RDI,qword ptr [R12] MOVSD XMM0,qword ptr [R14 + RBP*0x8] MOVSD XMM1,qword ptr [RBX + RBP*0x8] MOV RSI,R15 MOV AL,0x2 CALL 0x00118c35 INC RBP CMP R13D,EBP JNZ 0x0010ca05 LAB_0010ca26: MOV RDI,qword ptr [R12] LEA RSI,[0x11ada5] XOR EAX,EAX CALL 0x00118c35 JMP 0x0010caa2 LAB_0010ca3a: MOV EAX,0x1 JMP 0x0010caad LAB_0010ca41: LEA RDI,[0x11adee] MOV ESI,0x21 MOV EDX,0x1 CALL 0x00101110 TEST EBP,EBP JLE 0x0010ca88 MOV R13D,EBP XOR EBP,EBP LEA R15,[0x11ad94] LAB_0010ca67: MOV RDI,qword ptr [R12] MOVSD XMM0,qword ptr [R14 + RBP*0x8] MOVSD XMM1,qword ptr [RBX + RBP*0x8] MOV RSI,R15 MOV AL,0x2 CALL 0x001010f0 INC RBP CMP R13D,EBP JNZ 0x0010ca67 LAB_0010ca88: MOV RCX,qword ptr [R12] LEA RDI,[0x11ada5] MOV ESI,0x4 MOV EDX,0x1 CALL 0x00101110 LAB_0010caa2: LEA RAX,[0x12504c] INC dword ptr [RAX] XOR EAX,EAX LAB_0010caad: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::lefwLayerAntennaCumDiffAreaRatioPwl(int, double*, double*) */ int8 LefDefParser::lefwLayerAntennaCumDiffAreaRatioPwl(int param_1,double *param_2,double *param_3) { int8 uVar1; long lVar2; lefw54Num = 0x6a; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (((lefwState < 0x20) && ((0x900000c0U >> (lefwState & 0x1f) & 1) != 0)) && (uVar1 = 3, lefwIsCut != 0 || lefwIsRouting != 0)) { uVar1 = 5; if (DAT_00119118 <= versionNum) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," ANTENNACUMDIFFAREARATIO PWL ( "); if (0 < param_1) { lVar2 = 0; do { encPrint(lefwFile,"( %.11g %.11g ) ",param_2[lVar2],param_3[lVar2]); lVar2 = lVar2 + 1; } while (param_1 != (int)lVar2); } encPrint(lefwFile,") ;\n"); } else { fwrite(" ANTENNACUMDIFFAREARATIO PWL ( ",0x21,1,lefwFile); if (0 < param_1) { lVar2 = 0; do { fprintf(lefwFile,"( %.11g %.11g ) ",param_2[lVar2],param_3[lVar2]); lVar2 = lVar2 + 1; } while (param_1 != (int)lVar2); } fwrite(&DAT_0011ada5,4,1,lefwFile); } lefwLines = lefwLines + 1; uVar1 = 0; } } } return uVar1; }
39,924
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
static diyfp normalize(diyfp x) noexcept { JSON_ASSERT(x.f != 0); while ((x.f >> 63u) == 0) { x.f <<= 1u; x.e--; } return x; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rax testq %rdi, %rdi je 0xbd1c7 js 0xbd1c0 addq %rdi, %rdi decl %esi testq %rdi, %rdi jns 0xbd1b6 movq %rdi, %rax movl %esi, %edx popq %rcx retq leaq 0x3527b(%rip), %rdi # 0xf2449 leaq 0x2efe5(%rip), %rdx # 0xec1ba leaq 0x3a8de(%rip), %rcx # 0xf7aba movl $0x42a1, %esi # imm = 0x42A1 xorl %eax, %eax callq 0x1bf40 movq %rax, %rdi callq 0x24da5
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_: push rax test rdi, rdi jz short loc_BD1C7 js short loc_BD1C0 loc_BD1B6: add rdi, rdi dec esi test rdi, rdi jns short loc_BD1B6 loc_BD1C0: mov rax, rdi mov edx, esi pop rcx retn loc_BD1C7: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aXF0; "x.f != 0" mov esi, 42A1h xor eax, eax call _ggml_abort mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2) { void *v3; // rax if ( !a1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17057LL, "GGML_ASSERT(%s) failed", "x.f != 0"); _clang_call_terminate(v3); } for ( ; a1 >= 0; --a2 ) a1 *= 2LL; return a1; }
normalize: PUSH RAX TEST RDI,RDI JZ 0x001bd1c7 JS 0x001bd1c0 LAB_001bd1b6: ADD RDI,RDI DEC ESI TEST RDI,RDI JNS 0x001bd1b6 LAB_001bd1c0: MOV RAX,RDI MOV EDX,ESI POP RCX RET LAB_001bd1c7: LEA RDI,[0x1f2449] LEA RDX,[0x1ec1ba] LEA RCX,[0x1f7aba] MOV ESI,0x42a1 XOR EAX,EAX CALL 0x0011bf40
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2) { int1 auVar1 [16]; if (this != (diyfp *)0x0) { if (-1 < (long)this) { do { this = (diyfp *)((long)this * 2); param_2 = param_2 + -1; } while (-1 < (long)this); } auVar1._8_4_ = param_2; auVar1._0_8_ = this; auVar1._12_4_ = 0; return auVar1; } /* try { // try from 001bd1c7 to 001bd1e7 has its CatchHandler @ 001bd1e8 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1, "GGML_ASSERT(%s) failed","x.f != 0"); }
39,925
google::protobuf::ServiceOptions::Clear()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void ServiceOptions::Clear() { // @@protoc_insertion_point(message_clear_start:google.protobuf.ServiceOptions) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _impl_._extensions_.Clear(); _impl_.uninterpreted_option_.Clear(); _impl_.deprecated_ = false; _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); }
O0
cpp
google::protobuf::ServiceOptions::Clear(): subq $0x48, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x0, 0x1c(%rsp) addq $0x10, %rdi callq 0x226b10 movq 0x8(%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi callq 0x2dfd30 movq 0x8(%rsp), %rax movb $0x0, 0x48(%rax) addq $0x10, %rax addq $0x18, %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi xorl %esi, %esi movl $0x4, %edx callq 0x8db70 movq 0x8(%rsp), %rax addq $0x8, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x2c3540 movq 0x10(%rsp), %rdi callq 0x155740 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf14ServiceOptions5ClearEv: sub rsp, 48h mov [rsp+48h+var_28], rdi mov rdi, [rsp+48h+var_28] mov [rsp+48h+var_40], rdi mov [rsp+48h+var_2C], 0 add rdi, 10h; this call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void) mov rdi, [rsp+48h+var_40] add rdi, 10h add rdi, 20h ; ' ' call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void) mov rax, [rsp+48h+var_40] mov byte ptr [rax+48h], 0 add rax, 10h add rax, 18h mov [rsp+48h+var_10], rax mov rdi, [rsp+48h+var_10] xor esi, esi mov edx, 4 call _memset mov rax, [rsp+48h+var_40] add rax, 8 mov [rsp+48h+var_20], rax mov rax, [rsp+48h+var_20] mov [rsp+48h+var_38], rax mov [rsp+48h+var_18], rax mov rax, [rsp+48h+var_18] mov [rsp+48h+var_8], rax mov rax, [rsp+48h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_2C3540 mov rdi, [rsp+48h+var_38]; void * call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void) loc_2C3540: add rsp, 48h retn
long long google::protobuf::ServiceOptions::Clear(google::protobuf::ServiceOptions *this) { long long result; // rax google::protobuf::internal::ExtensionSet::Clear((google::protobuf::ServiceOptions *)((char *)this + 16)); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 48); *((_BYTE *)this + 72) = 0; memset((char *)this + 40, 0LL, 4LL); result = *((_QWORD *)this + 1) & 1LL; if ( result ) return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8); return result; }
~vector: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr [RDI] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RSP + 0x18],RAX CALL 0x002c3560 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RAX LAB_002c34d6: CALL 0x002c3530 JMP 0x002c34dd LAB_002c34dd: MOV RDI,qword ptr [RSP + 0x8] CALL 0x002c3570 ADD RSP,0x28 RET
/* std::vector<std::pair<google::protobuf::Metadata const*, google::protobuf::Metadata const*>, std::allocator<std::pair<google::protobuf::Metadata const*, google::protobuf::Metadata const*> > >::~vector() */ void __thiscall std:: vector<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>,std::allocator<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>>> ::~vector(vector<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>,std::allocator<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>>> *this) { pair *ppVar1; pair *ppVar2; allocator *paVar3; ppVar1 = *(pair **)this; ppVar2 = *(pair **)(this + 8); paVar3 = (allocator *) _Vector_base<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>,std::allocator<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>>> ::_M_get_Tp_allocator ((_Vector_base<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>,std::allocator<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>>> *)this); /* try { // try from 002c34d6 to 002c34da has its CatchHandler @ 002c34ec */ _Destroy<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>*,std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>> (ppVar1,ppVar2,paVar3); _Vector_base<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>,std::allocator<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>>> ::~_Vector_base((_Vector_base<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>,std::allocator<std::pair<google::protobuf::Metadata_const*,google::protobuf::Metadata_const*>>> *)this); return; }
39,926
ggml_gallocr_new_n
monkey531[P]llama/ggml/src/ggml-alloc.c
ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs) { ggml_gallocr_t galloc = (ggml_gallocr_t)calloc(1, sizeof(struct ggml_gallocr)); GGML_ASSERT(galloc != NULL); galloc->bufts = calloc(n_bufs, sizeof(ggml_backend_buffer_type_t)); GGML_ASSERT(galloc->bufts != NULL); galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t)); GGML_ASSERT(galloc->buffers != NULL); galloc->buf_tallocs = calloc(n_bufs, sizeof(struct ggml_dyn_tallocr *)); GGML_ASSERT(galloc->buf_tallocs != NULL); for (int i = 0; i < n_bufs; i++) { galloc->bufts[i] = bufts[i]; galloc->buffers[i] = NULL; // check if the same buffer type is used multiple times and reuse the same allocator for (int j = 0; j < i; j++) { if (bufts[i] == bufts[j]) { galloc->buf_tallocs[i] = galloc->buf_tallocs[j]; break; } } if (galloc->buf_tallocs[i] == NULL) { size_t alignment = ggml_backend_buft_get_alignment(bufts[i]); galloc->buf_tallocs[i] = ggml_dyn_tallocr_new(alignment); } } galloc->n_buffers = n_bufs; return galloc; }
O0
c
ggml_gallocr_new_n: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movl $0x1, %edi movl $0x60, %esi callq 0x42810 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x5a8ea leaq 0x5c8fa(%rip), %rdi # 0xb71ca movl $0x17e, %esi # imm = 0x17E leaq 0x59d25(%rip), %rdx # 0xb4601 leaq 0x5c956(%rip), %rcx # 0xb7239 movb $0x0, %al callq 0x46770 movslq 0x1c(%rsp), %rdi movl $0x8, %esi callq 0x42810 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) movq 0x10(%rsp), %rax cmpq $0x0, (%rax) jne 0x5a930 leaq 0x5c8b4(%rip), %rdi # 0xb71ca movl $0x181, %esi # imm = 0x181 leaq 0x59cdf(%rip), %rdx # 0xb4601 leaq 0x5c91f(%rip), %rcx # 0xb7248 movb $0x0, %al callq 0x46770 movslq 0x1c(%rsp), %rdi movl $0x8, %esi callq 0x42810 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rsp), %rax cmpq $0x0, 0x8(%rax) jne 0x5a978 leaq 0x5c86c(%rip), %rdi # 0xb71ca movl $0x184, %esi # imm = 0x184 leaq 0x59c97(%rip), %rdx # 0xb4601 leaq 0x5c8ed(%rip), %rcx # 0xb725e movb $0x0, %al callq 0x46770 movslq 0x1c(%rsp), %rdi movl $0x8, %esi callq 0x42810 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x10(%rsp), %rax cmpq $0x0, 0x10(%rax) jne 0x5a9c0 leaq 0x5c824(%rip), %rdi # 0xb71ca movl $0x187, %esi # imm = 0x187 leaq 0x59c4f(%rip), %rdx # 0xb4601 leaq 0x5c8bd(%rip), %rcx # 0xb7276 movb $0x0, %al callq 0x46770 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x1c(%rsp), %eax jge 0x5aacc movq 0x20(%rsp), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x10(%rsp), %rax movq (%rax), %rax movslq 0xc(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movslq 0xc(%rsp), %rcx movq $0x0, (%rax,%rcx,8) movl $0x0, 0x8(%rsp) movl 0x8(%rsp), %eax cmpl 0xc(%rsp), %eax jge 0x5aa70 movq 0x20(%rsp), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rax movq 0x20(%rsp), %rcx movslq 0x8(%rsp), %rdx cmpq (%rcx,%rdx,8), %rax jne 0x5aa61 movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movslq 0x8(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movslq 0xc(%rsp), %rcx movq %rdx, (%rax,%rcx,8) jmp 0x5aa70 jmp 0x5aa63 movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0x5aa13 movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movslq 0xc(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) jne 0x5aaba movq 0x20(%rsp), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x47b70 movq %rax, (%rsp) movq (%rsp), %rdi callq 0x5aaf0 movq %rax, %rdx movq 0x10(%rsp), %rax movq 0x10(%rax), %rax movslq 0xc(%rsp), %rcx movq %rdx, (%rax,%rcx,8) jmp 0x5aabc movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x5a9c8 movl 0x1c(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, 0x18(%rax) movq 0x10(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
ggml_gallocr_new_n: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi mov edi, 1 mov esi, 60h ; '`' call _calloc mov [rsp+28h+var_18], rax cmp [rsp+28h+var_18], 0 jnz short loc_5A8EA lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 17Eh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGallocNull; "galloc != NULL" mov al, 0 call _ggml_abort loc_5A8EA: movsxd rdi, [rsp+28h+var_C] mov esi, 8 call _calloc mov rcx, rax mov rax, [rsp+28h+var_18] mov [rax], rcx mov rax, [rsp+28h+var_18] cmp qword ptr [rax], 0 jnz short loc_5A930 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 181h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGallocBuftsNul; "galloc->bufts != NULL" mov al, 0 call _ggml_abort loc_5A930: movsxd rdi, [rsp+28h+var_C] mov esi, 8 call _calloc mov rcx, rax mov rax, [rsp+28h+var_18] mov [rax+8], rcx mov rax, [rsp+28h+var_18] cmp qword ptr [rax+8], 0 jnz short loc_5A978 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 184h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGallocBuffersN; "galloc->buffers != NULL" mov al, 0 call _ggml_abort loc_5A978: movsxd rdi, [rsp+28h+var_C] mov esi, 8 call _calloc mov rcx, rax mov rax, [rsp+28h+var_18] mov [rax+10h], rcx mov rax, [rsp+28h+var_18] cmp qword ptr [rax+10h], 0 jnz short loc_5A9C0 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 187h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGallocBufTallo; "galloc->buf_tallocs != NULL" mov al, 0 call _ggml_abort loc_5A9C0: mov [rsp+28h+var_1C], 0 loc_5A9C8: mov eax, [rsp+28h+var_1C] cmp eax, [rsp+28h+var_C] jge loc_5AACC mov rax, [rsp+28h+var_8] movsxd rcx, [rsp+28h+var_1C] mov rdx, [rax+rcx*8] mov rax, [rsp+28h+var_18] mov rax, [rax] movsxd rcx, [rsp+28h+var_1C] mov [rax+rcx*8], rdx mov rax, [rsp+28h+var_18] mov rax, [rax+8] movsxd rcx, [rsp+28h+var_1C] mov qword ptr [rax+rcx*8], 0 mov [rsp+28h+var_20], 0 loc_5AA13: mov eax, [rsp+28h+var_20] cmp eax, [rsp+28h+var_1C] jge short loc_5AA70 mov rax, [rsp+28h+var_8] movsxd rcx, [rsp+28h+var_1C] mov rax, [rax+rcx*8] mov rcx, [rsp+28h+var_8] movsxd rdx, [rsp+28h+var_20] cmp rax, [rcx+rdx*8] jnz short loc_5AA61 mov rax, [rsp+28h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+28h+var_20] mov rdx, [rax+rcx*8] mov rax, [rsp+28h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+28h+var_1C] mov [rax+rcx*8], rdx jmp short loc_5AA70 loc_5AA61: jmp short $+2 loc_5AA63: mov eax, [rsp+28h+var_20] add eax, 1 mov [rsp+28h+var_20], eax jmp short loc_5AA13 loc_5AA70: mov rax, [rsp+28h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+28h+var_1C] cmp qword ptr [rax+rcx*8], 0 jnz short loc_5AABA mov rax, [rsp+28h+var_8] movsxd rcx, [rsp+28h+var_1C] mov rdi, [rax+rcx*8] call _ggml_backend_buft_get_alignment mov [rsp+28h+var_28], rax mov rdi, [rsp+28h+var_28] call ggml_dyn_tallocr_new mov rdx, rax mov rax, [rsp+28h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+28h+var_1C] mov [rax+rcx*8], rdx loc_5AABA: jmp short $+2 loc_5AABC: mov eax, [rsp+28h+var_1C] add eax, 1 mov [rsp+28h+var_1C], eax jmp loc_5A9C8 loc_5AACC: mov ecx, [rsp+28h+var_C] mov rax, [rsp+28h+var_18] mov [rax+18h], ecx mov rax, [rsp+28h+var_18] add rsp, 28h retn
long long ggml_gallocr_new_n(long long a1, int a2) { long long alignment; // [rsp+0h] [rbp-28h] int j; // [rsp+8h] [rbp-20h] int i; // [rsp+Ch] [rbp-1Ch] long long v6; // [rsp+10h] [rbp-18h] v6 = calloc(1LL, 96LL); if ( !v6 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 382, (long long)"GGML_ASSERT(%s) failed", "galloc != NULL"); *(_QWORD *)v6 = calloc(a2, 8LL); if ( !*(_QWORD *)v6 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 385, (long long)"GGML_ASSERT(%s) failed", "galloc->bufts != NULL"); *(_QWORD *)(v6 + 8) = calloc(a2, 8LL); if ( !*(_QWORD *)(v6 + 8) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 388, (long long)"GGML_ASSERT(%s) failed", "galloc->buffers != NULL"); *(_QWORD *)(v6 + 16) = calloc(a2, 8LL); if ( !*(_QWORD *)(v6 + 16) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 391, (long long)"GGML_ASSERT(%s) failed", "galloc->buf_tallocs != NULL"); for ( i = 0; i < a2; ++i ) { *(_QWORD *)(*(_QWORD *)v6 + 8LL * i) = *(_QWORD *)(a1 + 8LL * i); *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * i) = 0LL; for ( j = 0; j < i; ++j ) { if ( *(_QWORD *)(a1 + 8LL * i) == *(_QWORD *)(a1 + 8LL * j) ) { *(_QWORD *)(*(_QWORD *)(v6 + 16) + 8LL * i) = *(_QWORD *)(*(_QWORD *)(v6 + 16) + 8LL * j); break; } } if ( !*(_QWORD *)(*(_QWORD *)(v6 + 16) + 8LL * i) ) { alignment = ggml_backend_buft_get_alignment(*(_QWORD *)(a1 + 8LL * i)); *(_QWORD *)(*(_QWORD *)(v6 + 16) + 8LL * i) = ggml_dyn_tallocr_new(alignment); } } *(_DWORD *)(v6 + 24) = a2; return v6; }
ggml_gallocr_new_n: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI MOV EDI,0x1 MOV ESI,0x60 CALL 0x00142810 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x0015a8ea LEA RDI,[0x1b71ca] MOV ESI,0x17e LEA RDX,[0x1b4601] LEA RCX,[0x1b7239] MOV AL,0x0 CALL 0x00146770 LAB_0015a8ea: MOVSXD RDI,dword ptr [RSP + 0x1c] MOV ESI,0x8 CALL 0x00142810 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX],0x0 JNZ 0x0015a930 LEA RDI,[0x1b71ca] MOV ESI,0x181 LEA RDX,[0x1b4601] LEA RCX,[0x1b7248] MOV AL,0x0 CALL 0x00146770 LAB_0015a930: MOVSXD RDI,dword ptr [RSP + 0x1c] MOV ESI,0x8 CALL 0x00142810 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0015a978 LEA RDI,[0x1b71ca] MOV ESI,0x184 LEA RDX,[0x1b4601] LEA RCX,[0x1b725e] MOV AL,0x0 CALL 0x00146770 LAB_0015a978: MOVSXD RDI,dword ptr [RSP + 0x1c] MOV ESI,0x8 CALL 0x00142810 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0015a9c0 LEA RDI,[0x1b71ca] MOV ESI,0x187 LEA RDX,[0x1b4601] LEA RCX,[0x1b7276] MOV AL,0x0 CALL 0x00146770 LAB_0015a9c0: MOV dword ptr [RSP + 0xc],0x0 LAB_0015a9c8: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x1c] JGE 0x0015aacc MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RSP + 0xc] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0xc] MOV qword ptr [RAX + RCX*0x8],0x0 MOV dword ptr [RSP + 0x8],0x0 LAB_0015aa13: MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RSP + 0xc] JGE 0x0015aa70 MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x8] CMP RAX,qword ptr [RCX + RDX*0x8] JNZ 0x0015aa61 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0xc] MOV qword ptr [RAX + RCX*0x8],RDX JMP 0x0015aa70 LAB_0015aa61: JMP 0x0015aa63 LAB_0015aa63: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x0015aa13 LAB_0015aa70: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0xc] CMP qword ptr [RAX + RCX*0x8],0x0 JNZ 0x0015aaba MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00147b70 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP] CALL 0x0015aaf0 MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0xc] MOV qword ptr [RAX + RCX*0x8],RDX LAB_0015aaba: JMP 0x0015aabc LAB_0015aabc: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x0015a9c8 LAB_0015aacc: MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x18],ECX MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x28 RET
long * ggml_gallocr_new_n(long param_1,int param_2) { long *plVar1; void *pvVar2; int8 uVar3; int local_20; int local_1c; plVar1 = (long *)calloc(1,0x60); if (plVar1 == (long *)0x0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0x17e,"GGML_ASSERT(%s) failed","galloc != NULL"); } pvVar2 = calloc((long)param_2,8); *plVar1 = (long)pvVar2; if (*plVar1 == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0x181,"GGML_ASSERT(%s) failed","galloc->bufts != NULL"); } pvVar2 = calloc((long)param_2,8); plVar1[1] = (long)pvVar2; if (plVar1[1] == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0x184,"GGML_ASSERT(%s) failed","galloc->buffers != NULL"); } pvVar2 = calloc((long)param_2,8); plVar1[2] = (long)pvVar2; if (plVar1[2] == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0x187,"GGML_ASSERT(%s) failed","galloc->buf_tallocs != NULL"); } local_1c = 0; do { if (param_2 <= local_1c) { *(int *)(plVar1 + 3) = param_2; return plVar1; } *(int8 *)(*plVar1 + (long)local_1c * 8) = *(int8 *)(param_1 + (long)local_1c * 8); *(int8 *)(plVar1[1] + (long)local_1c * 8) = 0; for (local_20 = 0; local_20 < local_1c; local_20 = local_20 + 1) { if (*(long *)(param_1 + (long)local_1c * 8) == *(long *)(param_1 + (long)local_20 * 8)) { *(int8 *)(plVar1[2] + (long)local_1c * 8) = *(int8 *)(plVar1[2] + (long)local_20 * 8); break; } } if (*(long *)(plVar1[2] + (long)local_1c * 8) == 0) { uVar3 = ggml_backend_buft_get_alignment(*(int8 *)(param_1 + (long)local_1c * 8)); uVar3 = ggml_dyn_tallocr_new(uVar3); *(int8 *)(plVar1[2] + (long)local_1c * 8) = uVar3; } local_1c = local_1c + 1; } while( true ); }
39,927
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O0
c
my_hash_next: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x28(%rbp), %rax cmpl $-0x1, (%rax) je 0x3fca7 movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, -0x34(%rbp) cmpl $-0x1, -0x34(%rbp) je 0x3fc9d movq -0x40(%rbp), %rax movl -0x34(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x3fb30 cmpl $0x0, %eax jne 0x3fc90 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x3fcaf jmp 0x3fc92 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0x3fc47 movq -0x28(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
my_hash_next: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_28] cmp dword ptr [rax], 0FFFFFFFFh jz loc_3FCA7 mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_28] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov eax, [rax] mov [rbp+var_34], eax loc_3FC47: cmp [rbp+var_34], 0FFFFFFFFh jz short loc_3FC9D mov rax, [rbp+var_40] mov ecx, [rbp+var_34] shl rcx, 4 add rax, rcx mov [rbp+var_30], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call hashcmp cmp eax, 0 jnz short loc_3FC90 mov ecx, [rbp+var_34] mov rax, [rbp+var_28] mov [rax], ecx mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_3FCAF loc_3FC90: jmp short $+2 loc_3FC92: mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_3FC47 loc_3FC9D: mov rax, [rbp+var_28] mov dword ptr [rax], 0FFFFFFFFh loc_3FCA7: mov [rbp+var_8], 0 loc_3FCAF: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long my_hash_next(long long a1, long long a2, long long a3, unsigned int *a4) { long long v5; // [rsp+0h] [rbp-40h] unsigned int i; // [rsp+Ch] [rbp-34h] long long v7; // [rsp+10h] [rbp-30h] if ( *a4 != -1 ) { v5 = *(_QWORD *)(a1 + 40); for ( i = *(_DWORD *)(16LL * *a4 + v5); i != -1; i = *(_DWORD *)v7 ) { v7 = 16LL * i + v5; if ( !hashcmp(a1, v7, a2, a3) ) { *a4 = i; return *(_QWORD *)(v7 + 8); } } *a4 = -1; } return 0LL; }
my_hash_next: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],-0x1 JZ 0x0013fca7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX LAB_0013fc47: CMP dword ptr [RBP + -0x34],-0x1 JZ 0x0013fc9d MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x34] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0013fb30 CMP EAX,0x0 JNZ 0x0013fc90 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013fcaf LAB_0013fc90: JMP 0x0013fc92 LAB_0013fc92: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x0013fc47 LAB_0013fc9d: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0xffffffff LAB_0013fca7: MOV qword ptr [RBP + -0x8],0x0 LAB_0013fcaf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { long lVar1; int iVar2; uint *puVar3; uint local_3c; if (*param_4 != 0xffffffff) { lVar1 = *(long *)(param_1 + 0x28); local_3c = *(uint *)(lVar1 + (ulong)*param_4 * 0x10); while (local_3c != 0xffffffff) { puVar3 = (uint *)(lVar1 + (ulong)local_3c * 0x10); iVar2 = hashcmp(param_1,puVar3,param_2,param_3); if (iVar2 == 0) { *param_4 = local_3c; return *(int8 *)(puVar3 + 2); } local_3c = *puVar3; } *param_4 = 0xffffffff; } return 0; }
39,928
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x438a5 movq %rbx, %rdi movq %rax, %rsi callq 0x23db0 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x9215e movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x241e8 movq %r14, %rdi callq 0x23fb0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA28_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3); std::string::reserve(a1, v4); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA28_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_( a1, a2, a3); return a1; }
concat<std::__cxx11::string,char_const(&)[28],char_const*>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI MOV RSI,RDX CALL 0x001438a5 LAB_00192111: MOV RDI,RBX MOV RSI,RAX CALL 0x00123db0 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0019215e LAB_0019212a: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [28], char const*>(char const (&) [28], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; concat_length<char_const*>(param_1,param_2); /* try { // try from 00192111 to 00192129 has its CatchHandler @ 00192133 */ std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA28_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ (this,param_1,param_2); return this; }
39,929
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a3f0 movq %rax, %r12 movq (%r14), %rdi callq 0x1a3f0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1ada0 movq %rbx, %rdi movq %r15, %rsi callq 0x1b100 movq (%r14), %rsi movq %rbx, %rdi callq 0x1b100 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xaaf69 movq (%r13), %rsi incq %rsi callq 0x1a8f0 movq %r14, %rdi callq 0x1afb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_AAF69 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AAF69: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[22],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011a3f0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011a3f0 ADD R12,RAX LAB_001aaf24: MOV RDI,RBX MOV RSI,R12 CALL 0x0011ada0 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b100 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011b100 LAB_001aaf45: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [22], char const*>(char const (&) [22], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001aaf24 to 001aaf44 has its CatchHandler @ 001aaf52 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
39,930
ma_zlib_compress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t source_len) { int rc; if (!ctx) return 1; if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len, ctx->compression_level)) != Z_OK) return 1; return 0; }
O3
c
ma_zlib_compress: testq %rdi, %rdi je 0x3224f pushq %rbp movq %rsp, %rbp movl 0x10(%rdi), %eax movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx movl %eax, %r8d callq 0x13250 testl %eax, %eax setne %al popq %rbp retq movb $0x1, %al retq
ma_zlib_compress: test rdi, rdi jz short loc_3224F push rbp mov rbp, rsp mov eax, [rdi+10h] mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, r8 mov r8d, eax call _compress2 test eax, eax setnz al pop rbp retn loc_3224F: mov al, 1 retn
bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5) { return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0; }
ma_zlib_compress: TEST RDI,RDI JZ 0x0013224f PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 MOV R8D,EAX CALL 0x00113250 TEST EAX,EAX SETNZ AL POP RBP RET LAB_0013224f: MOV AL,0x1 RET
bool ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; if (param_1 != 0) { iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10)); return iVar1 != 0; } return true; }
39,931
ma_update_state_lsns
eloqsql/storage/maria/ma_create.c
int _ma_update_state_lsns(MARIA_SHARE *share, LSN lsn, TrID create_trid, my_bool do_sync, my_bool update_create_rename_lsn) { int res; DBUG_ENTER("_ma_update_state_lsns"); mysql_mutex_lock(&share->intern_lock); res= _ma_update_state_lsns_sub(share, lsn, create_trid, do_sync, update_create_rename_lsn); mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(res); }
O0
c
ma_update_state_lsns: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %r8b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movb %cl, -0x19(%rbp) movb %al, -0x1a(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x110d0a(%rip), %rsi # 0x189899 movl $0x58d, %edx # imm = 0x58D callq 0x77dd0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movb -0x19(%rbp), %al movsbl %al, %ecx movsbl -0x1a(%rbp), %r8d callq 0x78360 movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x78a20 movl -0x20(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_update_state_lsns: push rbp mov rbp, rsp sub rsp, 30h mov al, r8b mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_19], cl mov [rbp+var_1A], al mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 58Dh call inline_mysql_mutex_lock_9 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov al, [rbp+var_19] movsx ecx, al movsx r8d, [rbp+var_1A] call _ma_update_state_lsns_sub mov [rbp+var_20], eax mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_10 mov eax, [rbp+var_20] mov [rbp+var_24], eax mov eax, [rbp+var_24] add rsp, 30h pop rbp retn
long long ma_update_state_lsns(long long a1, long long a2, long long a3, char a4, char a5) { unsigned int updated; // [rsp+10h] [rbp-20h] inline_mysql_mutex_lock_9( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c", 0x58Du); updated = ma_update_state_lsns_sub(a1, a2, a3, a4, a5); inline_mysql_mutex_unlock_10(a1 + 2288); return updated; }
_ma_update_state_lsns: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,R8B MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RBP + -0x19],CL MOV byte ptr [RBP + -0x1a],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x289899] MOV EDX,0x58d CALL 0x00177dd0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RBP + -0x19] MOVSX ECX,AL MOVSX R8D,byte ptr [RBP + -0x1a] CALL 0x00178360 MOV dword ptr [RBP + -0x20],EAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00178a20 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x30 POP RBP RET
int4 _ma_update_state_lsns(long param_1,int8 param_2,int8 param_3,char param_4,char param_5) { int4 uVar1; inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c", 0x58d); uVar1 = _ma_update_state_lsns_sub(param_1,param_2,param_3,(int)param_4,(int)param_5); inline_mysql_mutex_unlock(param_1 + 0x8f0); return uVar1; }
39,932
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O1
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %r14 movq %rdi, 0x30(%rsp) movq (%rsi), %rsi movq 0x8(%r14), %rax testq %rdx, %rdx je 0x89120 xorl %ecx, %ecx xorl %r12d, %r12d xorl %edi, %edi cmpb $0xa, (%rsi,%rcx) sete %dil addq %rdi, %r12 incq %rcx cmpq %rcx, %rdx jne 0x89109 jmp 0x89123 xorl %r12d, %r12d movq %rdx, 0x28(%rsp) addq %rsi, %rdx testq %rax, %rax je 0x8914c xorl %ecx, %ecx xorl %r15d, %r15d xorl %edi, %edi cmpb $0xa, (%rsi,%rcx) sete %dil addq %rdi, %r15 incq %rcx cmpq %rcx, %rax jne 0x89135 jmp 0x8914f xorl %r15d, %r15d leaq 0x50(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x40(%rsp), %rbx movq %rbx, %rdi callq 0x5ca4c movq %rbx, %rdi movl $0xa, %esi movq $-0x1, %rdx callq 0x18d00 movq %rax, %r13 movq (%rbx), %rdi cmpq %rbp, %rdi je 0x89191 movq 0x50(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x40(%rsp), %rbx movq %rbx, %rdi callq 0x18880 leaq 0x2458c(%rip), %rsi # 0xad731 movl $0x8, %edx movq %rbx, %rdi callq 0x18770 leaq 0x1(%r12), %rbx leaq 0x40(%rsp), %rdi movq %rbx, %rsi callq 0x18650 movq %rax, %rbp leaq 0x23b2c(%rip), %rsi # 0xaccfa movl $0x9, %edx movq %rax, %rdi callq 0x18770 movq 0x28(%rsp), %rsi subq %r13, %rsi movq %rbp, %rdi movq %rsi, 0x28(%rsp) callq 0x18480 leaq 0x2a8d4(%rip), %rsi # 0xb3acb movl $0x2, %edx movq %rax, %rdi callq 0x18770 testq %r12, %r12 jle 0x892ae movq (%r14), %r13 cmpq $0x1, %r12 je 0x8923f leaq -0x1(%r12), %rbp movq (%r14), %rsi addq 0x8(%r14), %rsi movb $0xa, 0x7(%rsp) movq %r13, %rdi leaq 0x7(%rsp), %rdx callq 0x5cbfe movq %rax, %r13 incq %r13 decq %rbp jne 0x8921b movq (%r14), %rsi addq 0x8(%r14), %rsi leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r13, %rdi callq 0x5cbfe leaq 0x18(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x8(%rsp), %rdi movq %r13, %rsi movq %rax, %rdx callq 0x5ca4c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x18770 leaq 0x20aba(%rip), %rsi # 0xa9d44 movl $0x1, %edx movq %rax, %rdi callq 0x18770 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x892ae movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq (%r14), %r13 movq %rbx, 0x38(%rsp) cmpq $0x2, %rbx jb 0x892e6 leaq 0x7(%rsp), %rbp movq %r12, %rbx movq (%r14), %rsi addq 0x8(%r14), %rsi movb $0xa, 0x7(%rsp) movq %r13, %rdi movq %rbp, %rdx callq 0x5cbfe movq %rax, %r13 incq %r13 decq %rbx jne 0x892c4 movq (%r14), %rsi addq 0x8(%r14), %rsi leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r13, %rdi callq 0x5cbfe leaq 0x18(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x8(%rsp), %rdi movq %r13, %rsi movq %rax, %rdx callq 0x5ca4c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x18770 movq 0x38(%rsp), %rbx leaq 0x20a0e(%rip), %rsi # 0xa9d44 movl $0x1, %edx movq %rax, %rdi callq 0x18770 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x8935a movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x28(%rsp), %rsi decq %rsi leaq 0x8(%rsp), %rdi movq %rbp, (%rdi) movl $0x20, %edx callq 0x187a0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x18770 leaq 0x243ab(%rip), %rsi # 0xad73a movl $0x2, %edx movq %rax, %rdi callq 0x18770 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x893b3 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 cmpq %r15, %r12 jge 0x89455 movq (%r14), %r15 cmpq $-0x3, %r12 ja 0x893ec leaq 0x7(%rsp), %r13 movq (%r14), %rsi addq 0x8(%r14), %rsi movb $0xa, 0x7(%rsp) movq %r15, %rdi movq %r13, %rdx callq 0x5cbfe movq %rax, %r15 incq %r15 decq %rbx jne 0x893ca movq (%r14), %rsi addq 0x8(%r14), %rsi leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r15, %rdi callq 0x5cbfe leaq 0x8(%rsp), %rdi movq %rbp, (%rdi) movq %r15, %rsi movq %rax, %rdx callq 0x5ca4c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x18770 leaq 0x20913(%rip), %rsi # 0xa9d44 movl $0x1, %edx movq %rax, %rdi callq 0x18770 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x89455 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x48(%rsp), %rsi movq 0x30(%rsp), %rdi callq 0x18a40 movq 0x54b1d(%rip), %rsi # 0xddf88 leaq 0x40(%rsp), %rdi callq 0x183a0 leaq 0xb0(%rsp), %rdi callq 0x18200 movq 0x30(%rsp), %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x894c3 jmp 0x894c3 jmp 0x894a7 jmp 0x894c3 jmp 0x894c3 jmp 0x894a7 jmp 0x894a7 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x894c6 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x894c6 movq %rax, %rbx movq 0x54abb(%rip), %rsi # 0xddf88 leaq 0x40(%rsp), %rdi callq 0x183a0 leaq 0xb0(%rsp), %rdi callq 0x18200 movq %rbx, %rdi callq 0x18ba0
_ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm_0: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov r14, rsi mov [rsp+1E8h+var_1B8], rdi mov rsi, [rsi] mov rax, [r14+8] test rdx, rdx jz short loc_89120 xor ecx, ecx xor r12d, r12d loc_89109: xor edi, edi cmp byte ptr [rsi+rcx], 0Ah setz dil add r12, rdi inc rcx cmp rdx, rcx jnz short loc_89109 jmp short loc_89123 loc_89120: xor r12d, r12d loc_89123: mov [rsp+1E8h+var_1C0], rdx add rdx, rsi test rax, rax jz short loc_8914C xor ecx, ecx xor r15d, r15d loc_89135: xor edi, edi cmp byte ptr [rsi+rcx], 0Ah setz dil add r15, rdi inc rcx cmp rax, rcx jnz short loc_89135 jmp short loc_8914F loc_8914C: xor r15d, r15d loc_8914F: lea rbp, [rsp+1E8h+var_198] mov [rbp-10h], rbp lea rbx, [rsp+1E8h+var_1A8] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rdi, rbx mov esi, 0Ah mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) mov r13, rax mov rdi, [rbx]; void * cmp rdi, rbp jz short loc_89191 mov rsi, [rsp+1E8h+var_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89191: lea rbx, [rsp+1E8h+var_1A8] mov rdi, rbx call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aAtRow; " at row " mov edx, 8 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rbx, [r12+1] lea rdi, [rsp+1E8h+var_1A8] mov rsi, rbx call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long) mov rbp, rax lea rsi, aColumn; ", column " mov edx, 9 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rsp+1E8h+var_1C0] sub rsi, r13 mov rdi, rbp mov [rsp+1E8h+var_1C0], rsi call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aJsonSchemaConv+1Dh; ":\n" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jle loc_892AE mov r13, [r14] cmp r12, 1 jz short loc_8923F lea rbp, [r12-1] loc_8921B: mov rsi, [r14] add rsi, [r14+8] mov [rsp+1E8h+var_1E1], 0Ah mov rdi, r13 lea rdx, [rsp+1E8h+var_1E1] call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r13, rax inc r13 dec rbp jnz short loc_8921B loc_8923F: mov rsi, [r14] add rsi, [r14+8] lea rdx, [rsp+1E8h+var_1E1] mov byte ptr [rdx], 0Ah mov rdi, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rbp, [rsp+1E8h+var_1D0] mov [rbp-10h], rbp lea rdi, [rsp+1E8h+var_1E0] mov rsi, r13 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aEndIndexOutOfB+18h; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_892AE mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_892AE: mov r13, [r14] mov [rsp+1E8h+var_1B0], rbx cmp rbx, 2 jb short loc_892E6 lea rbp, [rsp+1E8h+var_1E1] mov rbx, r12 loc_892C4: mov rsi, [r14] add rsi, [r14+8] mov [rsp+1E8h+var_1E1], 0Ah mov rdi, r13 mov rdx, rbp call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r13, rax inc r13 dec rbx jnz short loc_892C4 loc_892E6: mov rsi, [r14] add rsi, [r14+8] lea rdx, [rsp+1E8h+var_1E1] mov byte ptr [rdx], 0Ah mov rdi, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rbp, [rsp+1E8h+var_1D0] mov [rbp-10h], rbp lea rdi, [rsp+1E8h+var_1E0] mov rsi, r13 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+1E8h+var_1B0] lea rsi, aEndIndexOutOfB+18h; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_8935A mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8935A: mov rsi, [rsp+1E8h+var_1C0] dec rsi lea rdi, [rsp+1E8h+var_1E0] mov [rdi], rbp mov edx, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, asc_AD73A; "^\n" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_893B3 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_893B3: cmp r12, r15 jge loc_89455 mov r15, [r14] cmp r12, 0FFFFFFFFFFFFFFFDh ja short loc_893EC lea r13, [rsp+1E8h+var_1E1] loc_893CA: mov rsi, [r14] add rsi, [r14+8] mov [rsp+1E8h+var_1E1], 0Ah mov rdi, r15 mov rdx, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r15, rax inc r15 dec rbx jnz short loc_893CA loc_893EC: mov rsi, [r14] add rsi, [r14+8] lea rdx, [rsp+1E8h+var_1E1] mov byte ptr [rdx], 0Ah mov rdi, r15 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rdi, [rsp+1E8h+var_1E0] mov [rdi], rbp mov rsi, r15 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aEndIndexOutOfB+18h; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_89455 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89455: lea rsi, [rsp+1E8h+var_1A0] mov rdi, [rsp+1E8h+var_1B8] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, [rsp+1E8h+var_1B8] add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_894C3 jmp short loc_894C3 jmp short loc_894A7 jmp short loc_894C3 jmp short loc_894C3 jmp short loc_894A7 jmp short $+2 loc_894A7: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, rbp jz short loc_894C6 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_894C6 loc_894C3: mov rbx, rax loc_894C6: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_38] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long minja::error_location_suffix(long long a1, long long a2, long long a3) { _BYTE *v4; // rsi long long v5; // rax long long v6; // rcx long long v7; // r12 long long v8; // rdx long long v9; // rcx long long v10; // r15 long long v11; // r13 long long v12; // rbp long long v13; // rax _BYTE *v14; // r13 long long v15; // rbp long long v16; // rsi long long v17; // rsi _BYTE *v18; // rax long long v19; // rax _BYTE *v20; // r13 long long v21; // rbx long long v22; // rsi long long v23; // rsi _BYTE *v24; // rax long long v25; // rax long long v26; // rbx long long v27; // rax _BYTE *v28; // r15 long long v29; // rsi long long v30; // rsi _BYTE *v31; // rax long long v32; // rax char v34; // [rsp+7h] [rbp-1E1h] BYREF void *v35; // [rsp+8h] [rbp-1E0h] BYREF long long v36; // [rsp+10h] [rbp-1D8h] _QWORD v37[2]; // [rsp+18h] [rbp-1D0h] BYREF long long v38; // [rsp+28h] [rbp-1C0h] long long v39; // [rsp+30h] [rbp-1B8h] long long v40; // [rsp+38h] [rbp-1B0h] _QWORD *v41; // [rsp+40h] [rbp-1A8h] BYREF char v42[8]; // [rsp+48h] [rbp-1A0h] BYREF _QWORD v43[12]; // [rsp+50h] [rbp-198h] BYREF char v44[312]; // [rsp+B0h] [rbp-138h] BYREF v39 = a1; v4 = *(_BYTE **)a2; v5 = *(_QWORD *)(a2 + 8); if ( a3 ) { v6 = 0LL; v7 = 0LL; do v7 += v4[v6++] == 10; while ( a3 != v6 ); } else { v7 = 0LL; } v38 = a3; v8 = (long long)&v4[a3]; if ( v5 ) { v9 = 0LL; v10 = 0LL; do v10 += v4[v9++] == 10; while ( v5 != v9 ); } else { v10 = 0LL; } v41 = v43; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(&v41, v4, v8); v11 = std::string::rfind(&v41, 10LL, -1LL); if ( v41 != v43 ) operator delete(v41, v43[0] + 1LL); std::ostringstream::basic_ostringstream(&v41); std::__ostream_insert<char,std::char_traits<char>>(&v41, " at row ", 8LL); v12 = std::ostream::_M_insert<long>(&v41, v7 + 1); std::__ostream_insert<char,std::char_traits<char>>(v12, ", column ", 9LL); v38 -= v11; v13 = std::ostream::_M_insert<unsigned long>(v12, v38); std::__ostream_insert<char,std::char_traits<char>>(v13, ":\n", 2LL); if ( v7 > 0 ) { v14 = *(_BYTE **)a2; if ( v7 != 1 ) { v15 = v7 - 1; do { v16 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v34 = 10; v14 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v14, v16, &v34) + 1; --v15; } while ( v15 ); } v17 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v34 = 10; v18 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v14, v17, &v34); v35 = v37; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(&v35, v14, (long long)v18); v19 = std::__ostream_insert<char,std::char_traits<char>>(&v41, v35, v36); std::__ostream_insert<char,std::char_traits<char>>(v19, "\n", 1LL); if ( v35 != v37 ) operator delete(v35, v37[0] + 1LL); } v20 = *(_BYTE **)a2; v40 = v7 + 1; if ( (unsigned long long)(v7 + 1) >= 2 ) { v21 = v7; do { v22 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v34 = 10; v20 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v20, v22, &v34) + 1; --v21; } while ( v21 ); } v23 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v34 = 10; v24 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v20, v23, &v34); v35 = v37; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(&v35, v20, (long long)v24); v25 = std::__ostream_insert<char,std::char_traits<char>>(&v41, v35, v36); v26 = v40; std::__ostream_insert<char,std::char_traits<char>>(v25, "\n", 1LL); if ( v35 != v37 ) operator delete(v35, v37[0] + 1LL); v35 = v37; std::string::_M_construct(&v35, v38 - 1, 32LL); v27 = std::__ostream_insert<char,std::char_traits<char>>(&v41, v35, v36); std::__ostream_insert<char,std::char_traits<char>>(v27, "^\n", 2LL); if ( v35 != v37 ) operator delete(v35, v37[0] + 1LL); if ( v7 < v10 ) { v28 = *(_BYTE **)a2; if ( (unsigned long long)v7 <= 0xFFFFFFFFFFFFFFFDLL ) { do { v29 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v34 = 10; v28 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v28, v29, &v34) + 1; --v26; } while ( v26 ); } v30 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v34 = 10; v31 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v28, v30, &v34); v35 = v37; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(&v35, v28, (long long)v31); v32 = std::__ostream_insert<char,std::char_traits<char>>(&v41, v35, v36); std::__ostream_insert<char,std::char_traits<char>>(v32, "\n", 1LL); if ( v35 != v37 ) operator delete(v35, v37[0] + 1LL); } std::stringbuf::str(v39, v42); std::ostringstream::~ostringstream(&v41, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v44); return v39; }
error_location_suffix: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV R14,RSI MOV qword ptr [RSP + 0x30],RDI MOV RSI,qword ptr [RSI] MOV RAX,qword ptr [R14 + 0x8] TEST RDX,RDX JZ 0x00189120 XOR ECX,ECX XOR R12D,R12D LAB_00189109: XOR EDI,EDI CMP byte ptr [RSI + RCX*0x1],0xa SETZ DIL ADD R12,RDI INC RCX CMP RDX,RCX JNZ 0x00189109 JMP 0x00189123 LAB_00189120: XOR R12D,R12D LAB_00189123: MOV qword ptr [RSP + 0x28],RDX ADD RDX,RSI TEST RAX,RAX JZ 0x0018914c XOR ECX,ECX XOR R15D,R15D LAB_00189135: XOR EDI,EDI CMP byte ptr [RSI + RCX*0x1],0xa SETZ DIL ADD R15,RDI INC RCX CMP RAX,RCX JNZ 0x00189135 JMP 0x0018914f LAB_0018914c: XOR R15D,R15D LAB_0018914f: LEA RBP,[RSP + 0x50] MOV qword ptr [RBP + -0x10],RBP LEA RBX,[RSP + 0x40] MOV RDI,RBX CALL 0x0015ca4c MOV RDI,RBX MOV ESI,0xa MOV RDX,-0x1 CALL 0x00118d00 MOV R13,RAX MOV RDI,qword ptr [RBX] CMP RDI,RBP JZ 0x00189191 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001186a0 LAB_00189191: LEA RBX,[RSP + 0x40] MOV RDI,RBX CALL 0x00118880 LAB_0018919e: LEA RSI,[0x1ad731] MOV EDX,0x8 MOV RDI,RBX CALL 0x00118770 LEA RBX,[R12 + 0x1] LEA RDI,[RSP + 0x40] MOV RSI,RBX CALL 0x00118650 MOV RBP,RAX LEA RSI,[0x1accfa] MOV EDX,0x9 MOV RDI,RAX CALL 0x00118770 MOV RSI,qword ptr [RSP + 0x28] SUB RSI,R13 MOV RDI,RBP MOV qword ptr [RSP + 0x28],RSI CALL 0x00118480 LEA RSI,[0x1b3acb] MOV EDX,0x2 MOV RDI,RAX CALL 0x00118770 TEST R12,R12 JLE 0x001892ae MOV R13,qword ptr [R14] CMP R12,0x1 JZ 0x0018923f LEA RBP,[R12 + -0x1] LAB_0018921b: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] MOV byte ptr [RSP + 0x7],0xa MOV RDI,R13 LEA RDX,[RSP + 0x7] CALL 0x0015cbfe MOV R13,RAX INC R13 DEC RBP JNZ 0x0018921b LAB_0018923f: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R13 CALL 0x0015cbfe LEA RBP,[RSP + 0x18] MOV qword ptr [RBP + -0x10],RBP LAB_0018925f: LEA RDI,[RSP + 0x8] MOV RSI,R13 MOV RDX,RAX CALL 0x0015ca4c MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00189279: LEA RDI,[RSP + 0x40] CALL 0x00118770 LEA RSI,[0x1a9d44] MOV EDX,0x1 MOV RDI,RAX CALL 0x00118770 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001892ae MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_001892ae: MOV R13,qword ptr [R14] MOV qword ptr [RSP + 0x38],RBX CMP RBX,0x2 JC 0x001892e6 LEA RBP,[RSP + 0x7] MOV RBX,R12 LAB_001892c4: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] MOV byte ptr [RSP + 0x7],0xa MOV RDI,R13 MOV RDX,RBP CALL 0x0015cbfe MOV R13,RAX INC R13 DEC RBX JNZ 0x001892c4 LAB_001892e6: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R13 CALL 0x0015cbfe LEA RBP,[RSP + 0x18] MOV qword ptr [RBP + -0x10],RBP LAB_00189306: LEA RDI,[RSP + 0x8] MOV RSI,R13 MOV RDX,RAX CALL 0x0015ca4c MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00189320: LEA RDI,[RSP + 0x40] CALL 0x00118770 MOV RBX,qword ptr [RSP + 0x38] LEA RSI,[0x1a9d44] MOV EDX,0x1 MOV RDI,RAX CALL 0x00118770 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x0018935a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0018935a: MOV RSI,qword ptr [RSP + 0x28] DEC RSI LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBP LAB_0018936a: MOV EDX,0x20 CALL 0x001187a0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0018937e: LEA RDI,[RSP + 0x40] CALL 0x00118770 LEA RSI,[0x1ad73a] MOV EDX,0x2 MOV RDI,RAX CALL 0x00118770 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001893b3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_001893b3: CMP R12,R15 JGE 0x00189455 MOV R15,qword ptr [R14] CMP R12,-0x3 JA 0x001893ec LEA R13,[RSP + 0x7] LAB_001893ca: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] MOV byte ptr [RSP + 0x7],0xa MOV RDI,R15 MOV RDX,R13 CALL 0x0015cbfe MOV R15,RAX INC R15 DEC RBX JNZ 0x001893ca LAB_001893ec: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R15 CALL 0x0015cbfe LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBP LAB_0018940b: MOV RSI,R15 MOV RDX,RAX CALL 0x0015ca4c MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00189420: LEA RDI,[RSP + 0x40] CALL 0x00118770 LEA RSI,[0x1a9d44] MOV EDX,0x1 MOV RDI,RAX CALL 0x00118770 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x00189455 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_00189455: LEA RSI,[RSP + 0x48] LAB_0018945a: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00118a40 LAB_00189464: MOV RSI,qword ptr [0x001ddf88] LEA RDI,[RSP + 0x40] CALL 0x001183a0 LEA RDI,[RSP + 0xb0] CALL 0x00118200 MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */ minja * __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2) { long lVar1; ostream *poVar2; int8 uVar3; ulong uVar4; long lVar5; ulong uVar6; long lVar7; int1 local_1e1; long *local_1e0; long local_1d8; long local_1d0 [2]; ulong local_1c0; minja *local_1b8; ulong local_1b0; long *local_1a8 [2]; long local_198 [12]; ios_base local_138 [264]; lVar1 = *(long *)param_1; if (param_2 == 0) { uVar6 = 0; } else { uVar4 = 0; uVar6 = 0; do { uVar6 = uVar6 + (*(char *)(lVar1 + uVar4) == '\n'); uVar4 = uVar4 + 1; } while (param_2 != uVar4); } if (*(long *)(param_1 + 8) == 0) { lVar7 = 0; } else { lVar5 = 0; lVar7 = 0; do { lVar7 = lVar7 + (ulong)(*(char *)(lVar1 + lVar5) == '\n'); lVar5 = lVar5 + 1; } while (*(long *)(param_1 + 8) != lVar5); } local_1c0 = param_2; local_1b8 = this; local_1a8[0] = local_198; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (local_1a8,lVar1,param_2 + lVar1); lVar1 = std::__cxx11::string::rfind((char)local_1a8,10); if (local_1a8[0] != local_198) { operator_delete(local_1a8[0],local_198[0] + 1); } std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); /* try { // try from 0018919e to 00189203 has its CatchHandler @ 001894c3 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8," at row ",8); uVar4 = uVar6 + 1; poVar2 = std::ostream::_M_insert<long>((long)local_1a8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,", column ",9); local_1c0 = local_1c0 - lVar1; poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2); if (0 < (long)uVar6) { lVar1 = *(long *)param_1; if (uVar6 != 1) { lVar5 = uVar6 - 1; do { local_1e1 = 10; lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1); lVar1 = lVar1 + 1; lVar5 = lVar5 + -1; } while (lVar5 != 0); } local_1e1 = 10; uVar3 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,*(long *)param_1 + *(long *)(param_1 + 8)); /* try { // try from 0018925f to 0018926e has its CatchHandler @ 0018949b */ local_1e0 = local_1d0; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_1e0,lVar1,uVar3); /* try { // try from 00189279 to 00189296 has its CatchHandler @ 001894a3 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } } lVar1 = *(long *)param_1; local_1b0 = uVar4; if (1 < uVar4) { uVar4 = uVar6; do { local_1e1 = 10; lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1); lVar1 = lVar1 + 1; uVar4 = uVar4 - 1; } while (uVar4 != 0); } local_1e1 = 10; uVar3 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,*(long *)param_1 + *(long *)(param_1 + 8)); /* try { // try from 00189306 to 00189315 has its CatchHandler @ 001894a1 */ local_1e0 = local_1d0; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_1e0,lVar1,uVar3); /* try { // try from 00189320 to 00189342 has its CatchHandler @ 001894a7 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); uVar4 = local_1b0; std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } local_1e0 = local_1d0; /* try { // try from 0018936a to 00189373 has its CatchHandler @ 0018949f */ std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)local_1c0 + -1); /* try { // try from 0018937e to 0018939b has its CatchHandler @ 001894a5 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"^\n",2); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } if ((long)uVar6 < lVar7) { lVar1 = *(long *)param_1; if (uVar6 < 0xfffffffffffffffe) { do { local_1e1 = 10; lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1); lVar1 = lVar1 + 1; uVar4 = uVar4 - 1; } while (uVar4 != 0); } local_1e1 = 10; uVar3 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,*(long *)param_1 + *(long *)(param_1 + 8)); local_1e0 = local_1d0; /* try { // try from 0018940b to 00189415 has its CatchHandler @ 00189499 */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_1e0,lVar1,uVar3); /* try { // try from 00189420 to 0018943d has its CatchHandler @ 0018949d */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } } /* try { // try from 0018945a to 00189463 has its CatchHandler @ 001894c3 */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); std::ios_base::~ios_base(local_138); return local_1b8; }
39,933
mthd_my_read_query_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_read_query_result(MYSQL *mysql) { uchar *pos; ulong field_count; MYSQL_DATA *fields; ulong length; const uchar *end; uchar has_metadata; my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY); if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_REQUEST) mysql->extension->auto_local_infile= WAIT_FOR_QUERY; if ((length = ma_net_safe_read(mysql)) == packet_error) { return(1); } free_old_query(mysql); /* Free old result */ get_info: pos=(uchar*) mysql->net.read_pos; end= pos + length; if ((field_count= net_field_length(&pos)) == 0) return ma_read_ok_packet(mysql, pos, length); if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */ { int error=mysql_handle_local_infile(mysql, (char *)pos, can_local_infile); if ((length=ma_net_safe_read(mysql)) == packet_error || error) return(-1); goto get_info; /* Get info packet */ } has_metadata= 1; if (ma_supports_cache_metadata(mysql)) { assert(mysql->fields == NULL); if (pos < end) { has_metadata= *pos; pos++; } } if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT)) mysql->server_status|= SERVER_STATUS_IN_TRANS; if (has_metadata) { if (!(fields= mysql->methods->db_read_rows(mysql, (MYSQL_FIELD *) 0, ma_result_set_rows(mysql)))) return (-1); if (!(mysql->fields= unpack_fields(mysql, fields, &mysql->field_alloc, (uint) field_count, 1))) return (-1); } else { /* Read EOF, to get the status and warning count. */ if ((length= ma_net_safe_read(mysql)) == packet_error) { return -1; } pos= (uchar *) mysql->net.read_pos; if (length != 5 || pos[0] != 0xfe) { return -1; } mysql->warning_count= uint2korr(pos + 1); mysql->server_status= uint2korr(pos + 3); } mysql->status=MYSQL_STATUS_GET_RESULT; mysql->field_count=field_count; return(0); }
O3
c
mthd_my_read_query_result: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, 0x480(%rdi) je 0x49f6a movq 0x4f0(%rbx), %rax movb 0x78(%rax), %cl cmpb $0x1, %cl setne %r14b cmpb $0x2, %cl jne 0x49f6d movb $0x1, 0x78(%rax) movb $0x1, %r14b jmp 0x49f6d xorl %r14d, %r14d movq %rbx, %rdi callq 0x44303 movq %rax, %r15 movl $0x1, %r12d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r15 jne 0x49f9a movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0x4925a movzbl %r14b, %r13d movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movq 0x20(%rbx), %rsi movzbl (%rsi), %r14d cmpq $0xfa, %r14 jbe 0x4a01b cmpq $0xfb, %r14 jne 0x49ff3 incq %rsi movq %rbx, %rdi movl %r13d, %edx callq 0x5194f movl %eax, %r14d movq %rbx, %rdi callq 0x44303 movq %rax, %r15 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r15 je 0x49f88 testb %r14b, %r14b je 0x49fac jmp 0x49f88 cmpl $0xfc, %r14d je 0x4a021 cmpl $0xfd, %r14d jne 0x4a02c leaq 0x4(%rsi), %rax movzwl 0x1(%rsi), %ecx movzbl 0x3(%rsi), %r14d shll $0x10, %r14d orq %rcx, %r14 jmp 0x4a034 leaq 0x1(%rsi), %rax jmp 0x4a034 leaq 0x3(%rsi), %rax movzwl 0x1(%rsi), %r14d jmp 0x4a034 leaq 0x9(%rsi), %rax movl 0x1(%rsi), %r14d testq %r14, %r14 je 0x4a0b6 movq 0x4f0(%rbx), %rcx xorl %edx, %edx testb $0x10, 0x70(%rcx) je 0x4a056 addq %r15, %rsi cmpq %rsi, %rax jae 0x4a056 cmpb $0x0, (%rax) sete %dl movl 0x380(%rbx), %eax testb $0x2, %al jne 0x4a069 orl $0x1, %eax movl %eax, 0x380(%rbx) testb %dl, %dl je 0x4a0d2 movq %rbx, %rdi callq 0x44303 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x49f88 cmpq $0x5, %rax jne 0x49f88 movq 0x20(%rbx), %rax cmpb $-0x2, (%rax) jne 0x49f88 movzwl 0x1(%rax), %ecx movl %ecx, 0x388(%rbx) movzwl 0x3(%rax), %eax movl %eax, 0x380(%rbx) jmp 0x4a12e movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x495ea movq 0x4d0(%rbx), %rax movq 0x70(%rcx), %rcx andl $0x8, %ecx cmpq $0x1, %rcx movl $0x9, %edx sbbl $0x0, %edx movq %rbx, %rdi xorl %esi, %esi callq *0x28(%rax) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testq %rax, %rax je 0x49f88 leaq 0x300(%rbx), %rdx movq %rbx, %rdi movq %rax, %rsi movl %r14d, %ecx movl $0x1, %r8d callq 0x4682c movq %rax, 0x2f8(%rbx) testq %rax, %rax je 0x49f88 movl $0x1, 0x488(%rbx) movl %r14d, 0x37c(%rbx) xorl %r12d, %r12d jmp 0x49f88
mthd_my_read_query_result: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp qword ptr [rdi+480h], 0 jz short loc_49F6A mov rax, [rbx+4F0h] mov cl, [rax+78h] cmp cl, 1 setnz r14b cmp cl, 2 jnz short loc_49F6D mov byte ptr [rax+78h], 1 mov r14b, 1 jmp short loc_49F6D loc_49F6A: xor r14d, r14d loc_49F6D: mov rdi, rbx call ma_net_safe_read mov r15, rax mov r12d, 1 mov eax, 0FFFFFFFFh cmp r15, rax jnz short loc_49F9A loc_49F88: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_49F9A: mov rdi, rbx call free_old_query movzx r13d, r14b mov r12d, 0FFFFFFFFh loc_49FAC: mov rsi, [rbx+20h] movzx r14d, byte ptr [rsi] cmp r14, 0FAh jbe short loc_4A01B cmp r14, 0FBh jnz short loc_49FF3 inc rsi mov rdi, rbx mov edx, r13d call mysql_handle_local_infile mov r14d, eax mov rdi, rbx call ma_net_safe_read mov r15, rax mov eax, 0FFFFFFFFh cmp r15, rax jz short loc_49F88 test r14b, r14b jz short loc_49FAC jmp short loc_49F88 loc_49FF3: cmp r14d, 0FCh jz short loc_4A021 cmp r14d, 0FDh jnz short loc_4A02C lea rax, [rsi+4] movzx ecx, word ptr [rsi+1] movzx r14d, byte ptr [rsi+3] shl r14d, 10h or r14, rcx jmp short loc_4A034 loc_4A01B: lea rax, [rsi+1] jmp short loc_4A034 loc_4A021: lea rax, [rsi+3] movzx r14d, word ptr [rsi+1] jmp short loc_4A034 loc_4A02C: lea rax, [rsi+9] mov r14d, [rsi+1] loc_4A034: test r14, r14 jz short loc_4A0B6 mov rcx, [rbx+4F0h] xor edx, edx test byte ptr [rcx+70h], 10h jz short loc_4A056 add rsi, r15 cmp rax, rsi jnb short loc_4A056 cmp byte ptr [rax], 0 setz dl loc_4A056: mov eax, [rbx+380h] test al, 2 jnz short loc_4A069 or eax, 1 mov [rbx+380h], eax loc_4A069: test dl, dl jz short loc_4A0D2 mov rdi, rbx call ma_net_safe_read mov r12d, 0FFFFFFFFh mov ecx, 0FFFFFFFFh cmp rax, rcx jz loc_49F88 cmp rax, 5 jnz loc_49F88 mov rax, [rbx+20h] cmp byte ptr [rax], 0FEh jnz loc_49F88 movzx ecx, word ptr [rax+1] mov [rbx+388h], ecx movzx eax, word ptr [rax+3] mov [rbx+380h], eax jmp short loc_4A12E loc_4A0B6: mov rdi, rbx mov rsi, rax mov rdx, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ma_read_ok_packet loc_4A0D2: mov rax, [rbx+4D0h] mov rcx, [rcx+70h] and ecx, 8 cmp rcx, 1 mov edx, 9 sbb edx, 0 mov rdi, rbx xor esi, esi call qword ptr [rax+28h] mov r12d, 0FFFFFFFFh test rax, rax jz loc_49F88 lea rdx, [rbx+300h] mov rdi, rbx mov rsi, rax mov ecx, r14d mov r8d, 1 call unpack_fields mov [rbx+2F8h], rax test rax, rax jz loc_49F88 loc_4A12E: mov dword ptr [rbx+488h], 1 mov [rbx+37Ch], r14d xor r12d, r12d jmp loc_49F88
long long mthd_my_read_query_result( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { long long v6; // rax bool v7; // r14 unsigned long long v8; // r15 unsigned int v9; // r12d unsigned long long v11; // r8 int v12; // r9d BOOL v13; // r13d unsigned __int8 *v14; // rsi unsigned long long v15; // r14 long long v16; // rsi char v17; // r14 long long v18; // rdx long long v19; // rcx unsigned long long v20; // r8 int v21; // r9d unsigned __int8 *v22; // rax long long v23; // rcx long long v24; // rdx int v25; // eax long long v26; // rax _QWORD *v27; // rax long long v28; // rax if ( *(_QWORD *)(a1 + 1152) ) { v6 = *(_QWORD *)(a1 + 1264); LOBYTE(a4) = *(_BYTE *)(v6 + 120); v7 = (_BYTE)a4 != 1; if ( (_BYTE)a4 == 2 ) { *(_BYTE *)(v6 + 120) = 1; v7 = 1; } } else { v7 = 0; } v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6); v9 = 1; if ( v8 == 0xFFFFFFFF ) return v9; free_old_query(a1); v13 = v7; v9 = -1; while ( 1 ) { v14 = *(unsigned __int8 **)(a1 + 32); v15 = *v14; if ( v15 <= 0xFA ) { v22 = v14 + 1; goto LABEL_19; } if ( v15 != 251 ) break; v16 = (long long)(v14 + 1); v17 = mysql_handle_local_infile(a1, v16, v13); v8 = ma_net_safe_read(a1, v16, v18, v19, v20, v21); if ( v8 == 0xFFFFFFFF || v17 ) return v9; } if ( (_DWORD)v15 == 252 ) { v22 = v14 + 3; v15 = *(unsigned __int16 *)(v14 + 1); } else if ( (_DWORD)v15 == 253 ) { v22 = v14 + 4; v15 = *(unsigned __int16 *)(v14 + 1) | (unsigned long long)(v14[3] << 16); } else { v22 = v14 + 9; v15 = *(unsigned int *)(v14 + 1); } LABEL_19: if ( v15 ) { v23 = *(_QWORD *)(a1 + 1264); v24 = 0LL; if ( (*(_BYTE *)(v23 + 112) & 0x10) != 0 ) { v14 += v8; if ( v22 < v14 ) LOBYTE(v24) = *v22 == 0; } v25 = *(_DWORD *)(a1 + 896); if ( (v25 & 2) == 0 ) *(_DWORD *)(a1 + 896) = v25 | 1; if ( (_BYTE)v24 ) { v9 = -1; if ( ma_net_safe_read(a1, (long long)v14, v24, v23, v11, v12) != 5 ) return v9; v26 = *(_QWORD *)(a1 + 32); if ( *(_BYTE *)v26 != 0xFE ) return v9; *(_DWORD *)(a1 + 904) = *(unsigned __int16 *)(v26 + 1); *(_DWORD *)(a1 + 896) = *(unsigned __int16 *)(v26 + 3); } else { v27 = (_QWORD *)(*(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(a1 + 1232) + 40LL))( a1, 0LL, 9 - (unsigned int)((*(_QWORD *)(v23 + 112) & 8LL) == 0)); v9 = -1; if ( !v27 ) return v9; v28 = unpack_fields(a1, v27, a1 + 768, v15, 1); *(_QWORD *)(a1 + 760) = v28; if ( !v28 ) return v9; } *(_DWORD *)(a1 + 1160) = 1; *(_DWORD *)(a1 + 892) = v15; return 0; } return ma_read_ok_packet(a1, v22, v8); }
mthd_my_read_query_result: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [RDI + 0x480],0x0 JZ 0x00149f6a MOV RAX,qword ptr [RBX + 0x4f0] MOV CL,byte ptr [RAX + 0x78] CMP CL,0x1 SETNZ R14B CMP CL,0x2 JNZ 0x00149f6d MOV byte ptr [RAX + 0x78],0x1 MOV R14B,0x1 JMP 0x00149f6d LAB_00149f6a: XOR R14D,R14D LAB_00149f6d: MOV RDI,RBX CALL 0x00144303 MOV R15,RAX MOV R12D,0x1 MOV EAX,0xffffffff CMP R15,RAX JNZ 0x00149f9a LAB_00149f88: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00149f9a: MOV RDI,RBX CALL 0x0014925a MOVZX R13D,R14B MOV R12D,0xffffffff LAB_00149fac: MOV RSI,qword ptr [RBX + 0x20] MOVZX R14D,byte ptr [RSI] CMP R14,0xfa JBE 0x0014a01b CMP R14,0xfb JNZ 0x00149ff3 INC RSI MOV RDI,RBX MOV EDX,R13D CALL 0x0015194f MOV R14D,EAX MOV RDI,RBX CALL 0x00144303 MOV R15,RAX MOV EAX,0xffffffff CMP R15,RAX JZ 0x00149f88 TEST R14B,R14B JZ 0x00149fac JMP 0x00149f88 LAB_00149ff3: CMP R14D,0xfc JZ 0x0014a021 CMP R14D,0xfd JNZ 0x0014a02c LEA RAX,[RSI + 0x4] MOVZX ECX,word ptr [RSI + 0x1] MOVZX R14D,byte ptr [RSI + 0x3] SHL R14D,0x10 OR R14,RCX JMP 0x0014a034 LAB_0014a01b: LEA RAX,[RSI + 0x1] JMP 0x0014a034 LAB_0014a021: LEA RAX,[RSI + 0x3] MOVZX R14D,word ptr [RSI + 0x1] JMP 0x0014a034 LAB_0014a02c: LEA RAX,[RSI + 0x9] MOV R14D,dword ptr [RSI + 0x1] LAB_0014a034: TEST R14,R14 JZ 0x0014a0b6 MOV RCX,qword ptr [RBX + 0x4f0] XOR EDX,EDX TEST byte ptr [RCX + 0x70],0x10 JZ 0x0014a056 ADD RSI,R15 CMP RAX,RSI JNC 0x0014a056 CMP byte ptr [RAX],0x0 SETZ DL LAB_0014a056: MOV EAX,dword ptr [RBX + 0x380] TEST AL,0x2 JNZ 0x0014a069 OR EAX,0x1 MOV dword ptr [RBX + 0x380],EAX LAB_0014a069: TEST DL,DL JZ 0x0014a0d2 MOV RDI,RBX CALL 0x00144303 MOV R12D,0xffffffff MOV ECX,0xffffffff CMP RAX,RCX JZ 0x00149f88 CMP RAX,0x5 JNZ 0x00149f88 MOV RAX,qword ptr [RBX + 0x20] CMP byte ptr [RAX],0xfe JNZ 0x00149f88 MOVZX ECX,word ptr [RAX + 0x1] MOV dword ptr [RBX + 0x388],ECX MOVZX EAX,word ptr [RAX + 0x3] MOV dword ptr [RBX + 0x380],EAX JMP 0x0014a12e LAB_0014a0b6: MOV RDI,RBX MOV RSI,RAX MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001495ea LAB_0014a0d2: MOV RAX,qword ptr [RBX + 0x4d0] MOV RCX,qword ptr [RCX + 0x70] AND ECX,0x8 CMP RCX,0x1 MOV EDX,0x9 SBB EDX,0x0 MOV RDI,RBX XOR ESI,ESI CALL qword ptr [RAX + 0x28] MOV R12D,0xffffffff TEST RAX,RAX JZ 0x00149f88 LEA RDX,[RBX + 0x300] MOV RDI,RBX MOV RSI,RAX MOV ECX,R14D MOV R8D,0x1 CALL 0x0014682c MOV qword ptr [RBX + 0x2f8],RAX TEST RAX,RAX JZ 0x00149f88 LAB_0014a12e: MOV dword ptr [RBX + 0x488],0x1 MOV dword ptr [RBX + 0x37c],R14D XOR R12D,R12D JMP 0x00149f88
int8 mthd_my_read_query_result(long param_1) { byte bVar1; byte *pbVar2; char *pcVar3; char cVar4; long lVar5; byte *pbVar6; int8 uVar7; uint uVar8; bool bVar9; if (*(long *)(param_1 + 0x480) == 0) { bVar9 = false; } else { cVar4 = *(char *)(*(long *)(param_1 + 0x4f0) + 0x78); bVar9 = cVar4 != '\x01'; if (cVar4 == '\x02') { *(int1 *)(*(long *)(param_1 + 0x4f0) + 0x78) = 1; bVar9 = true; } } lVar5 = ma_net_safe_read(param_1); if (lVar5 == 0xffffffff) { return 1; } free_old_query(param_1); do { pbVar2 = *(byte **)(param_1 + 0x20); bVar1 = *pbVar2; uVar8 = (uint)bVar1; if (uVar8 < 0xfb) { pbVar6 = pbVar2 + 1; LAB_0014a034: if (uVar8 == 0) { uVar7 = ma_read_ok_packet(param_1,pbVar6,lVar5); return uVar7; } bVar9 = false; if (((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 0x10) != 0) && (pbVar6 < pbVar2 + lVar5)) { bVar9 = *pbVar6 == 0; } if ((*(uint *)(param_1 + 0x380) & 2) == 0) { *(uint *)(param_1 + 0x380) = *(uint *)(param_1 + 0x380) | 1; } if (bVar9) { lVar5 = ma_net_safe_read(param_1); if (lVar5 == 0xffffffff) { return 0xffffffff; } if (lVar5 != 5) { return 0xffffffff; } pcVar3 = *(char **)(param_1 + 0x20); if (*pcVar3 != -2) { return 0xffffffff; } *(uint *)(param_1 + 0x388) = (uint)*(ushort *)(pcVar3 + 1); *(uint *)(param_1 + 0x380) = (uint)*(ushort *)(pcVar3 + 3); } else { lVar5 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x28)) (param_1,0, 9 - (uint)((*(ulong *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) == 0)); if (lVar5 == 0) { return 0xffffffff; } lVar5 = unpack_fields(param_1,lVar5,param_1 + 0x300,uVar8,1); *(long *)(param_1 + 0x2f8) = lVar5; if (lVar5 == 0) { return 0xffffffff; } } *(int4 *)(param_1 + 0x488) = 1; *(uint *)(param_1 + 0x37c) = uVar8; return 0; } if (uVar8 != 0xfb) { if (bVar1 == 0xfc) { pbVar6 = pbVar2 + 3; uVar8 = (uint)*(ushort *)(pbVar2 + 1); } else if (bVar1 == 0xfd) { pbVar6 = pbVar2 + 4; uVar8 = (uint)*(uint3 *)(pbVar2 + 1); } else { pbVar6 = pbVar2 + 9; uVar8 = *(uint *)(pbVar2 + 1); } goto LAB_0014a034; } cVar4 = mysql_handle_local_infile(param_1,pbVar2 + 1,bVar9); lVar5 = ma_net_safe_read(param_1); if (lVar5 == 0xffffffff) { return 0xffffffff; } if (cVar4 != '\0') { return 0xffffffff; } } while( true ); }
39,934
my_sync_dir
eloqsql/mysys/my_sync.c
int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; DBUG_ENTER("my_sync_dir"); DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. EIO on the other hand is very important. Hence MY_IGNORE_BADFD. */ if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) { if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) res= 2; if (my_close(dir_fd, MYF(my_flags))) res= 3; } else res= 1; DBUG_RETURN(res); #else return 0; #endif }
O0
c
my_sync_dir: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x18(%rbp) jmp 0x2f7f9 movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x2f812 leaq 0x4d1c4(%rip), %rax # 0x7c9d0 movq %rax, -0x28(%rbp) jmp 0x2f81a movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x2ea20 movl %eax, -0x14(%rbp) cmpl $0x0, %eax jl 0x2f86f movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi orq $0x20, %rsi callq 0x2f650 cmpl $0x0, %eax je 0x2f855 movl $0x2, -0x18(%rbp) movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi callq 0x2ecb0 cmpl $0x0, %eax je 0x2f86d movl $0x3, -0x18(%rbp) jmp 0x2f876 movl $0x1, -0x18(%rbp) jmp 0x2f878 movl -0x18(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_sync_dir: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], 0 jmp short $+2 loc_2F7F9: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_2F812 lea rax, my_sync_dir_cur_dir_name mov [rbp+var_28], rax jmp short loc_2F81A loc_2F812: mov rax, [rbp+var_8] mov [rbp+var_28], rax loc_2F81A: mov rax, [rbp+var_28] mov [rbp+var_20], rax mov rdi, [rbp+var_20] mov rdx, [rbp+var_10] xor esi, esi call my_open mov [rbp+var_14], eax cmp eax, 0 jl short loc_2F86F mov edi, [rbp+var_14] mov rsi, [rbp+var_10] or rsi, 20h call my_sync cmp eax, 0 jz short loc_2F855 mov [rbp+var_18], 2 loc_2F855: mov edi, [rbp+var_14] mov rsi, [rbp+var_10] call my_close cmp eax, 0 jz short loc_2F86D mov [rbp+var_18], 3 loc_2F86D: jmp short loc_2F876 loc_2F86F: mov [rbp+var_18], 1 loc_2F876: jmp short $+2 loc_2F878: mov eax, [rbp+var_18] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] add rsp, 30h pop rbp retn
long long my_sync_dir(_BYTE *a1, long long a2) { void *v3; // [rsp+8h] [rbp-28h] unsigned int v4; // [rsp+18h] [rbp-18h] signed int v5; // [rsp+1Ch] [rbp-14h] v4 = 0; if ( *a1 ) v3 = a1; else v3 = &my_sync_dir_cur_dir_name; v5 = my_open((long long)v3, 0, a2); if ( v5 < 0 ) { return 1; } else { if ( (unsigned int)my_sync(v5, (unsigned int)a2 | 0x20) ) v4 = 2; if ( (unsigned int)my_close(v5, a2) ) return 3; } return v4; }
my_sync_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x18],0x0 JMP 0x0012f7f9 LAB_0012f7f9: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0012f812 LEA RAX,[0x17c9d0] MOV qword ptr [RBP + -0x28],RAX JMP 0x0012f81a LAB_0012f812: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX LAB_0012f81a: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x0012ea20 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JL 0x0012f86f MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] OR RSI,0x20 CALL 0x0012f650 CMP EAX,0x0 JZ 0x0012f855 MOV dword ptr [RBP + -0x18],0x2 LAB_0012f855: MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012ecb0 CMP EAX,0x0 JZ 0x0012f86d MOV dword ptr [RBP + -0x18],0x3 LAB_0012f86d: JMP 0x0012f876 LAB_0012f86f: MOV dword ptr [RBP + -0x18],0x1 LAB_0012f876: JMP 0x0012f878 LAB_0012f878: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x30 POP RBP RET
int4 my_sync_dir(char *param_1,ulong param_2) { int iVar1; int iVar2; char *local_30; int4 local_20; local_20 = 0; local_30 = param_1; if (*param_1 == '\0') { local_30 = "."; } iVar1 = my_open(local_30,0,param_2); if (iVar1 < 0) { local_20 = 1; } else { iVar2 = my_sync(iVar1,param_2 | 0x20); if (iVar2 != 0) { local_20 = 2; } iVar1 = my_close(iVar1,param_2); if (iVar1 != 0) { local_20 = 3; } } return local_20; }
39,935
my_sync_dir
eloqsql/mysys/my_sync.c
int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; DBUG_ENTER("my_sync_dir"); DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. EIO on the other hand is very important. Hence MY_IGNORE_BADFD. */ if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) { if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) res= 2; if (my_close(dir_fd, MYF(my_flags))) res= 3; } else res= 1; DBUG_RETURN(res); #else return 0; #endif }
O3
c
my_sync_dir: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpb $0x0, (%rdi) movq %rsi, %rbx leaq 0x346b8(%rip), %rax # 0x5fa30 cmoveq %rax, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x2aa04 testl %eax, %eax js 0x2b3bf movl %eax, %r14d movq %rbx, %rsi orq $0x20, %rsi movl %eax, %edi callq 0x2b230 xorl %r15d, %r15d testl %eax, %eax setne %r15b addl %r15d, %r15d movl %r14d, %edi movq %rbx, %rsi callq 0x2aba9 testl %eax, %eax movl $0x3, %eax cmovel %r15d, %eax jmp 0x2b3c4 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_sync_dir: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp byte ptr [rdi], 0 mov rbx, rsi lea rax, my_sync_dir_cur_dir_name cmovz rdi, rax xor esi, esi mov rdx, rbx call my_open test eax, eax js short loc_2B3BF mov r14d, eax mov rsi, rbx or rsi, 20h mov edi, eax call my_sync xor r15d, r15d test eax, eax setnz r15b add r15d, r15d mov edi, r14d mov rsi, rbx call my_close test eax, eax mov eax, 3 cmovz eax, r15d jmp short loc_2B3C4 loc_2B3BF: mov eax, 1 loc_2B3C4: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_sync_dir(_BYTE *a1, long long a2) { int v2; // eax unsigned int v3; // r14d unsigned int v4; // r15d bool v5; // zf long long result; // rax if ( !*a1 ) a1 = &my_sync_dir_cur_dir_name; v2 = my_open((long long)a1, 0, a2); if ( v2 < 0 ) return 1LL; v3 = v2; v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, (unsigned int)a2 | 0x20) != 0); v5 = (unsigned int)my_close(v3, a2) == 0; result = 3LL; if ( v5 ) return v4; return result; }
my_sync_dir: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP byte ptr [RDI],0x0 MOV RBX,RSI LEA RAX,[0x15fa30] CMOVZ RDI,RAX XOR ESI,ESI MOV RDX,RBX CALL 0x0012aa04 TEST EAX,EAX JS 0x0012b3bf MOV R14D,EAX MOV RSI,RBX OR RSI,0x20 MOV EDI,EAX CALL 0x0012b230 XOR R15D,R15D TEST EAX,EAX SETNZ R15B ADD R15D,R15D MOV EDI,R14D MOV RSI,RBX CALL 0x0012aba9 TEST EAX,EAX MOV EAX,0x3 CMOVZ EAX,R15D JMP 0x0012b3c4 LAB_0012b3bf: MOV EAX,0x1 LAB_0012b3c4: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
char my_sync_dir(char *param_1,ulong param_2) { char cVar1; int iVar2; int iVar3; if (*param_1 == '\0') { param_1 = "."; } iVar2 = my_open(param_1,0,param_2); if (iVar2 < 0) { cVar1 = '\x01'; } else { iVar3 = my_sync(iVar2,param_2 | 0x20); iVar2 = my_close(iVar2,param_2); cVar1 = '\x03'; if (iVar2 == 0) { cVar1 = (iVar3 != 0) * '\x02'; } } return cVar1; }
39,936
TensorStorage::chunk(unsigned long)
7CodeWizard[P]stablediffusion/model.h
std::vector<TensorStorage> chunk(size_t n) { std::vector<TensorStorage> chunks; size_t chunk_size = nbytes_to_read() / n; reverse_ne(); for (int i = 0; i < n; i++) { TensorStorage chunk_i = *this; chunk_i.ne[0] = ne[0] / n; chunk_i.offset = offset + i * chunk_size; chunk_i.reverse_ne(); chunks.push_back(chunk_i); } reverse_ne(); return chunks; }
O0
c
TensorStorage::chunk(unsigned long): subq $0xc8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x18(%rsp) movb $0x0, 0xaf(%rsp) callq 0x56170 movq 0x18(%rsp), %rdi callq 0xc46e0 movq %rax, 0x20(%rsp) jmp 0xc2ca7 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movq 0xb0(%rsp), %rcx xorl %edx, %edx divq %rcx movq %rax, 0xa0(%rsp) callq 0xc3de0 jmp 0xc2ccd movl $0x0, 0x90(%rsp) movslq 0x90(%rsp), %rax cmpq 0xb0(%rsp), %rax jae 0xc2db8 movq 0x18(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0x74a70 jmp 0xc2cff movq 0x18(%rsp), %rax movq 0x28(%rax), %rax movq 0xb0(%rsp), %rcx xorl %edx, %edx divq %rcx movq %rax, %rcx movq 0x18(%rsp), %rax movq %rcx, 0x50(%rsp) movq 0x60(%rax), %rax movslq 0x90(%rsp), %rcx movq 0xa0(%rsp), %rdx imulq %rdx, %rcx addq %rcx, %rax movq %rax, 0x88(%rsp) leaq 0x28(%rsp), %rdi callq 0xc3de0 jmp 0xc2d51 movq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xc2f30 jmp 0xc2d62 leaq 0x28(%rsp), %rdi callq 0x516b0 movl 0x90(%rsp), %eax addl $0x1, %eax movl %eax, 0x90(%rsp) jmp 0xc2cd8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) jmp 0xc2ded movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0x28(%rsp), %rdi callq 0x516b0 jmp 0xc2ded movq 0x18(%rsp), %rdi callq 0xc3de0 jmp 0xc2dc4 movb $0x1, 0xaf(%rsp) testb $0x1, 0xaf(%rsp) jne 0xc2de0 movq 0x8(%rsp), %rdi callq 0x514e0 movq 0x10(%rsp), %rax addq $0xc8, %rsp retq movq 0x8(%rsp), %rdi callq 0x514e0 movq 0x98(%rsp), %rdi callq 0xbd30 nopw %cs:(%rax,%rax) nop
_ZN13TensorStorage5chunkEm: sub rsp, 0C8h mov [rsp+0C8h+var_C0], rdi mov rax, rdi mov [rsp+0C8h+var_B8], rax mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_19], 0 call _ZNSt6vectorI13TensorStorageSaIS0_EEC2Ev; std::vector<TensorStorage>::vector(void) mov rdi, [rsp+0C8h+var_B0]; this call _ZNK13TensorStorage14nbytes_to_readEv; TensorStorage::nbytes_to_read(void) mov [rsp+0C8h+var_A8], rax jmp short $+2 loc_C2CA7: mov rdi, [rsp+0C8h+var_B0]; this mov rax, [rsp+0C8h+var_A8] mov rcx, [rsp+0C8h+var_18] xor edx, edx div rcx mov [rsp+0C8h+var_28], rax call _ZN13TensorStorage10reverse_neEv; TensorStorage::reverse_ne(void) jmp short $+2 loc_C2CCD: mov [rsp+0C8h+var_38], 0 loc_C2CD8: movsxd rax, [rsp+0C8h+var_38] cmp rax, [rsp+0C8h+var_18] jnb loc_C2DB8 mov rsi, [rsp+0C8h+var_B0]; TensorStorage * lea rdi, [rsp+0C8h+var_A0]; this call _ZN13TensorStorageC2ERKS_; TensorStorage::TensorStorage(TensorStorage const&) jmp short $+2 loc_C2CFF: mov rax, [rsp+0C8h+var_B0] mov rax, [rax+28h] mov rcx, [rsp+0C8h+var_18] xor edx, edx div rcx mov rcx, rax mov rax, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_78], rcx mov rax, [rax+60h] movsxd rcx, [rsp+0C8h+var_38] mov rdx, [rsp+0C8h+var_28] imul rcx, rdx add rax, rcx mov [rsp+0C8h+var_40], rax lea rdi, [rsp+0C8h+var_A0]; this call _ZN13TensorStorage10reverse_neEv; TensorStorage::reverse_ne(void) jmp short $+2 loc_C2D51: mov rdi, [rsp+0C8h+var_C0] lea rsi, [rsp+0C8h+var_A0] call _ZNSt6vectorI13TensorStorageSaIS0_EE9push_backERKS0_; std::vector<TensorStorage>::push_back(TensorStorage const&) jmp short $+2 loc_C2D62: lea rdi, [rsp+0C8h+var_A0]; this call _ZN13TensorStorageD2Ev; TensorStorage::~TensorStorage() mov eax, [rsp+0C8h+var_38] add eax, 1 mov [rsp+0C8h+var_38], eax jmp loc_C2CD8 mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax jmp short loc_C2DED mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax lea rdi, [rsp+arg_20]; this call _ZN13TensorStorageD2Ev; TensorStorage::~TensorStorage() jmp short loc_C2DED loc_C2DB8: mov rdi, [rsp+0C8h+var_B0]; this call _ZN13TensorStorage10reverse_neEv; TensorStorage::reverse_ne(void) jmp short $+2 loc_C2DC4: mov [rsp+0C8h+var_19], 1 test [rsp+0C8h+var_19], 1 jnz short loc_C2DE0 mov rdi, [rsp+0C8h+var_C0] call _ZNSt6vectorI13TensorStorageSaIS0_EED2Ev; std::vector<TensorStorage>::~vector() loc_C2DE0: mov rax, [rsp+0C8h+var_B8] add rsp, 0C8h retn loc_C2DED: mov rdi, [rsp+arg_0] call _ZNSt6vectorI13TensorStorageSaIS0_EED2Ev; std::vector<TensorStorage>::~vector() mov rdi, [rsp+arg_90] call __Unwind_Resume
TensorStorage * TensorStorage::chunk(TensorStorage *this, TensorStorage *a2, unsigned long long a3) { _BYTE v4[40]; // [rsp+28h] [rbp-A0h] BYREF unsigned long long v5; // [rsp+50h] [rbp-78h] unsigned long long v6; // [rsp+88h] [rbp-40h] int i; // [rsp+90h] [rbp-38h] unsigned long long v8; // [rsp+A0h] [rbp-28h] char v9; // [rsp+AFh] [rbp-19h] unsigned long long v10; // [rsp+B0h] [rbp-18h] TensorStorage *v11; // [rsp+B8h] [rbp-10h] TensorStorage *v12; // [rsp+C0h] [rbp-8h] v12 = this; v11 = a2; v10 = a3; v9 = 0; std::vector<TensorStorage>::vector((long long)this); v8 = TensorStorage::nbytes_to_read(a2) / v10; TensorStorage::reverse_ne(a2); for ( i = 0; i < v10; ++i ) { TensorStorage::TensorStorage((TensorStorage *)v4, a2); v5 = *((_QWORD *)a2 + 5) / v10; v6 = v8 * i + *((_QWORD *)a2 + 12); TensorStorage::reverse_ne((TensorStorage *)v4); std::vector<TensorStorage>::push_back(this, v4); TensorStorage::~TensorStorage((TensorStorage *)v4); } TensorStorage::reverse_ne(a2); return this; }
chunk: SUB RSP,0xc8 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x18],RAX MOV byte ptr [RSP + 0xaf],0x0 CALL 0x00156170 MOV RDI,qword ptr [RSP + 0x18] LAB_001c2c9b: CALL 0x001c46e0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001c2ca7 LAB_001c2ca7: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0xb0] XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0xa0],RAX CALL 0x001c3de0 JMP 0x001c2ccd LAB_001c2ccd: MOV dword ptr [RSP + 0x90],0x0 LAB_001c2cd8: MOVSXD RAX,dword ptr [RSP + 0x90] CMP RAX,qword ptr [RSP + 0xb0] JNC 0x001c2db8 MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x28] CALL 0x00174a70 JMP 0x001c2cff LAB_001c2cff: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RSP + 0xb0] XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x50],RCX MOV RAX,qword ptr [RAX + 0x60] MOVSXD RCX,dword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0xa0] IMUL RCX,RDX ADD RAX,RCX MOV qword ptr [RSP + 0x88],RAX LAB_001c2d45: LEA RDI,[RSP + 0x28] CALL 0x001c3de0 JMP 0x001c2d51 LAB_001c2d51: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x001c2f30 JMP 0x001c2d62 LAB_001c2d62: LEA RDI,[RSP + 0x28] CALL 0x001516b0 MOV EAX,dword ptr [RSP + 0x90] ADD EAX,0x1 MOV dword ptr [RSP + 0x90],EAX JMP 0x001c2cd8 LAB_001c2db8: MOV RDI,qword ptr [RSP + 0x18] CALL 0x001c3de0 LAB_001c2dc2: JMP 0x001c2dc4 LAB_001c2dc4: MOV byte ptr [RSP + 0xaf],0x1 TEST byte ptr [RSP + 0xaf],0x1 JNZ 0x001c2de0 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001514e0 LAB_001c2de0: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xc8 RET
/* WARNING: Removing unreachable block (ram,0x001c2dd6) */ /* TensorStorage::chunk(unsigned long) */ ulong TensorStorage::chunk(ulong param_1) { ulong in_RDX; TensorStorage *in_RSI; TensorStorage local_a0 [40]; ulong local_78; long local_40; int local_38; ulong local_28; int1 local_19; ulong local_18; ulong local_8; local_19 = 0; local_18 = in_RDX; local_8 = param_1; std::vector<TensorStorage,std::allocator<TensorStorage>>::vector ((vector<TensorStorage,std::allocator<TensorStorage>> *)param_1); /* try { // try from 001c2c9b to 001c2cfc has its CatchHandler @ 001c2d82 */ local_28 = nbytes_to_read(in_RSI); local_28 = local_28 / local_18; reverse_ne(in_RSI); for (local_38 = 0; (ulong)(long)local_38 < local_18; local_38 = local_38 + 1) { TensorStorage(local_a0,in_RSI); local_78 = *(ulong *)(in_RSI + 0x28) / local_18; local_40 = *(long *)(in_RSI + 0x60) + (long)local_38 * local_28; /* try { // try from 001c2d45 to 001c2d5f has its CatchHandler @ 001c2d98 */ reverse_ne(local_a0); std::vector<TensorStorage,std::allocator<TensorStorage>>::push_back ((vector<TensorStorage,std::allocator<TensorStorage>> *)param_1,local_a0); ~TensorStorage(local_a0); } /* try { // try from 001c2db8 to 001c2dc1 has its CatchHandler @ 001c2d82 */ reverse_ne(in_RSI); return param_1; }
39,937
TensorStorage::chunk(unsigned long)
7CodeWizard[P]stablediffusion/model.h
std::vector<TensorStorage> chunk(size_t n) { std::vector<TensorStorage> chunks; size_t chunk_size = nbytes_to_read() / n; reverse_ne(); for (int i = 0; i < n; i++) { TensorStorage chunk_i = *this; chunk_i.ne[0] = ne[0] / n; chunk_i.offset = offset + i * chunk_size; chunk_i.reverse_ne(); chunks.push_back(chunk_i); } reverse_ne(); return chunks; }
O2
c
TensorStorage::chunk(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %rbx movq %rsi, %r14 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rdi, 0x8(%rsp) andq $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x4ae0a xorl %ebp, %ebp xorl %edx, %edx divq %rbx movq %rax, %r12 movq %r14, %rdi callq 0x4aa0a leaq 0x10(%rsp), %r13 movq %rbx, %r15 subq $0x1, %r15 jb 0x4a497 movq %r13, %rdi movq %r14, %rsi callq 0x3201c movq 0x28(%r14), %rax xorl %edx, %edx divq %rbx movq %rax, 0x38(%rsp) movq %r12, %rax imulq %rbp, %rax addq 0x60(%r14), %rax movq %rax, 0x70(%rsp) movq %r13, %rdi callq 0x4aa0a movq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x4a4fa movq %r13, %rdi callq 0xac60 incq %rbp jmp 0x4a446 movq %r14, %rdi callq 0x4aa0a movq 0x8(%rsp), %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4a4b5 movq %rax, %r14 jmp 0x4a4c7 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xac60 movq 0x8(%rsp), %rdi callq 0x25d24 movq %r14, %rdi callq 0xaab0 nop
_ZN13TensorStorage5chunkEm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rdx mov r14, rsi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov [rsp+0A8h+var_A0], rdi and qword ptr [rdi+10h], 0 mov rdi, rsi; this call _ZNK13TensorStorage14nbytes_to_readEv; TensorStorage::nbytes_to_read(void) xor ebp, ebp xor edx, edx div rbx mov r12, rax mov rdi, r14; this call _ZN13TensorStorage10reverse_neEv; TensorStorage::reverse_ne(void) lea r13, [rsp+0A8h+var_98] mov r15, rbx loc_4A446: sub r15, 1 jb short loc_4A497 mov rdi, r13; this mov rsi, r14; TensorStorage * call _ZN13TensorStorageC2ERKS_; TensorStorage::TensorStorage(TensorStorage const&) mov rax, [r14+28h] xor edx, edx div rbx mov [rsp+0A8h+var_70], rax mov rax, r12 imul rax, rbp add rax, [r14+60h] mov [rsp+0A8h+var_38], rax mov rdi, r13; this call _ZN13TensorStorage10reverse_neEv; TensorStorage::reverse_ne(void) mov rdi, [rsp+0A8h+var_A0] mov rsi, r13 call _ZNSt6vectorI13TensorStorageSaIS0_EE9push_backERKS0_; std::vector<TensorStorage>::push_back(TensorStorage const&) mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc rbp jmp short loc_4A446 loc_4A497: mov rdi, r14; this call _ZN13TensorStorage10reverse_neEv; TensorStorage::reverse_ne(void) mov rax, [rsp+0A8h+var_A0] add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_4A4B5: mov r14, rax jmp short loc_4A4C7 mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4A4C7: mov rdi, [rsp+arg_0] call _ZNSt6vectorI13TensorStorageSaIS0_EED2Ev; std::vector<TensorStorage>::~vector() mov rdi, r14 call __Unwind_Resume
TensorStorage * TensorStorage::chunk(TensorStorage *this, TensorStorage *a2, unsigned long long a3) { long long v4; // rbp unsigned long long v5; // r12 unsigned long long v6; // r15 _BYTE v9[40]; // [rsp+10h] [rbp-98h] BYREF unsigned long long v10; // [rsp+38h] [rbp-70h] unsigned long long v11; // [rsp+70h] [rbp-38h] *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; v4 = 0LL; v5 = TensorStorage::nbytes_to_read(a2) / a3; TensorStorage::reverse_ne(a2); v6 = a3; while ( v6-- != 0 ) { TensorStorage::TensorStorage((TensorStorage *)v9, a2); v10 = *((_QWORD *)a2 + 5) / a3; v11 = *((_QWORD *)a2 + 12) + v4 * v5; TensorStorage::reverse_ne((TensorStorage *)v9); std::vector<TensorStorage>::push_back(this, v9); std::string::~string(v9); ++v4; } TensorStorage::reverse_ne(a2); return this; }
chunk: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RDX MOV R14,RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RSP + 0x8],RDI AND qword ptr [RDI + 0x10],0x0 LAB_0014a424: MOV RDI,RSI CALL 0x0014ae0a XOR EBP,EBP XOR EDX,EDX DIV RBX MOV R12,RAX MOV RDI,R14 CALL 0x0014aa0a LEA R13,[RSP + 0x10] MOV R15,RBX LAB_0014a446: SUB R15,0x1 JC 0x0014a497 LAB_0014a44c: MOV RDI,R13 MOV RSI,R14 CALL 0x0013201c MOV RAX,qword ptr [R14 + 0x28] XOR EDX,EDX DIV RBX MOV qword ptr [RSP + 0x38],RAX MOV RAX,R12 IMUL RAX,RBP ADD RAX,qword ptr [R14 + 0x60] MOV qword ptr [RSP + 0x70],RAX MOV RDI,R13 CALL 0x0014aa0a LAB_0014a47d: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R13 CALL 0x0014a4fa LAB_0014a48a: MOV RDI,R13 CALL 0x0010ac60 INC RBP JMP 0x0014a446 LAB_0014a497: MOV RDI,R14 CALL 0x0014aa0a MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* TensorStorage::chunk(unsigned long) */ ulong TensorStorage::chunk(ulong param_1) { ulong uVar1; ulong in_RDX; long lVar2; TensorStorage *in_RSI; ulong uVar3; bool bVar4; TensorStorage local_98 [40]; ulong local_70; long local_38; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; /* try { // try from 0014a424 to 0014a42b has its CatchHandler @ 0014a4b3 */ uVar1 = nbytes_to_read(in_RSI); lVar2 = 0; reverse_ne(in_RSI); uVar3 = in_RDX; while (bVar4 = uVar3 != 0, uVar3 = uVar3 - 1, bVar4) { /* try { // try from 0014a44c to 0014a456 has its CatchHandler @ 0014a4b5 */ TensorStorage(local_98,in_RSI); local_70 = *(ulong *)(in_RSI + 0x28) / in_RDX; local_38 = (uVar1 / in_RDX) * lVar2 + *(long *)(in_RSI + 0x60); reverse_ne(local_98); /* try { // try from 0014a47d to 0014a489 has its CatchHandler @ 0014a4ba */ std::vector<TensorStorage,std::allocator<TensorStorage>>::push_back ((vector<TensorStorage,std::allocator<TensorStorage>> *)param_1,local_98); std::__cxx11::string::~string((string *)local_98); lVar2 = lVar2 + 1; } reverse_ne(in_RSI); return param_1; }
39,938
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O0
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x75d3e jmp 0x75d40 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x39(%rbp) je 0x75d6e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x18(%rbp), %rsi callq 0x79bd0 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0x75d77 jmp 0x75dc6 movq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x79e10 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x79e80 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jg 0x75d9f jmp 0x75dc6 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x75d40 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nop
my_caseup_str_utf8mb4: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_38], rax jmp short $+2 loc_75D3E: jmp short $+2 loc_75D40: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_39], al jz short loc_75D6E mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, [rbp+var_18] call my_mb_wc_utf8mb4_no_range mov [rbp+var_1C], eax cmp eax, 0 setnle al mov [rbp+var_39], al loc_75D6E: mov al, [rbp+var_39] test al, 1 jnz short loc_75D77 jmp short loc_75DC6 loc_75D77: mov rdi, [rbp+var_38] lea rsi, [rbp+var_18] call my_toupper_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call my_wc_mb_utf8mb4_no_range mov [rbp+var_20], eax cmp eax, 0 jg short loc_75D9F jmp short loc_75DC6 loc_75D9F: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_75D40 loc_75DC6: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] sub rax, rcx add rsp, 40h pop rbp retn
_BYTE * my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { bool v3; // [rsp+7h] [rbp-39h] long long v4; // [rsp+8h] [rbp-38h] _BYTE *v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] BYREF _BYTE *v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v5 = a2; v4 = *(_QWORD *)(a1 + 120); while ( 1 ) { v3 = 0; if ( *v9 ) { v7 = my_mb_wc_utf8mb4_no_range(v10, &v8, v9); v3 = v7 > 0; } if ( !v3 ) break; my_toupper_utf8mb4(v4, &v8); v6 = my_wc_mb_utf8mb4_no_range(v10, v8, v5); if ( v6 <= 0 ) break; v9 += v7; v5 += v6; } *v5 = 0; return (_BYTE *)(v5 - a2); }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x38],RAX JMP 0x00175d3e LAB_00175d3e: JMP 0x00175d40 LAB_00175d40: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x00175d6e MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x00179bd0 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x39],AL LAB_00175d6e: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x00175d77 JMP 0x00175dc6 LAB_00175d77: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x18] CALL 0x00179e10 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00179e80 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JG 0x00175d9f JMP 0x00175dc6 LAB_00175d9f: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00175d40 LAB_00175dc6: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { int8 uVar1; bool bVar2; int iVar3; char *local_30; int local_24; int8 local_20; char *local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_2; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (*local_18 != '\0') { local_24 = my_mb_wc_utf8mb4_no_range(local_10,&local_20,local_18); bVar2 = 0 < local_24; } if (!bVar2) break; my_toupper_utf8mb4(uVar1,&local_20); iVar3 = my_wc_mb_utf8mb4_no_range(local_10,local_20,local_30); if (iVar3 < 1) break; local_18 = local_18 + local_24; local_30 = local_30 + iVar3; } *local_30 = '\0'; return (long)local_30 - (long)param_2; }
39,939
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0x55f37 movq 0x78(%rdi), %r15 movq %rbx, %r12 movq %rbx, %r14 leaq -0x30(%rbp), %rdi movq %r12, %rsi callq 0x5927b testl %eax, %eax je 0x55f37 movl %eax, %r13d movq -0x30(%rbp), %rdi cmpq (%r15), %rdi ja 0x55f18 movq 0x8(%r15), %rax movq %rdi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x55f18 movzbl %dil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %edi movq %rdi, -0x30(%rbp) movq %r14, %rsi callq 0x59397 testl %eax, %eax je 0x55f37 movl %r13d, %ecx movl %eax, %eax addq %rax, %r14 cmpb $0x0, (%r12,%rcx) leaq (%r12,%rcx), %r12 jne 0x55ed9 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz short loc_55F37 mov r15, [rdi+78h] mov r12, rbx mov r14, rbx loc_55ED9: lea rdi, [rbp+var_30] mov rsi, r12 call my_mb_wc_utf8mb4_no_range test eax, eax jz short loc_55F37 mov r13d, eax mov rdi, [rbp+var_30] cmp rdi, [r15] ja short loc_55F18 mov rax, [r15+8] mov rcx, rdi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_55F18 movzx ecx, dil lea rcx, [rcx+rcx*2] mov edi, [rax+rcx*4] mov [rbp+var_30], rdi loc_55F18: mov rsi, r14 call my_wc_mb_utf8mb4_no_range test eax, eax jz short loc_55F37 mov ecx, r13d mov eax, eax add r14, rax cmp byte ptr [r12+rcx], 0 lea r12, [r12+rcx] jnz short loc_55ED9 loc_55F37: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_str_utf8mb4(long long a1, _BYTE *a2) { long long v2; // rax _BYTE *v3; // r14 _QWORD *v4; // r15 _BYTE *v5; // r12 unsigned int v6; // eax unsigned int v7; // r13d long long v8; // rdi long long v9; // rax unsigned int v10; // eax bool v11; // zf _QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF v13[0] = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD **)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_mb_wc_utf8mb4_no_range(v13, v5); if ( !v6 ) break; v7 = v6; v8 = v13[0]; if ( v13[0] <= *v4 ) { v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8)); if ( v9 ) { v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0])); v13[0] = v8; } } v10 = my_wc_mb_utf8mb4_no_range(v8, v3); if ( !v10 ) break; v3 += v10; v11 = v5[v7] == 0; v5 += v7; } while ( !v11 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x00155f37 MOV R15,qword ptr [RDI + 0x78] MOV R12,RBX MOV R14,RBX LAB_00155ed9: LEA RDI,[RBP + -0x30] MOV RSI,R12 CALL 0x0015927b TEST EAX,EAX JZ 0x00155f37 MOV R13D,EAX MOV RDI,qword ptr [RBP + -0x30] CMP RDI,qword ptr [R15] JA 0x00155f18 MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RDI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x00155f18 MOVZX ECX,DIL LEA RCX,[RCX + RCX*0x2] MOV EDI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x30],RDI LAB_00155f18: MOV RSI,R14 CALL 0x00159397 TEST EAX,EAX JZ 0x00155f37 MOV ECX,R13D MOV EAX,EAX ADD R14,RAX CMP byte ptr [R12 + RCX*0x1],0x0 LEA R12,[R12 + RCX*0x1] JNZ 0x00155ed9 LAB_00155f37: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { char *pcVar1; ulong *puVar2; long lVar3; uint uVar4; uint uVar5; ulong in_RAX; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { puVar2 = *(ulong **)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6); if (uVar4 == 0) break; if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0)) { local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc); } uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7); if (uVar5 == 0) break; pcVar7 = pcVar7 + uVar5; pcVar1 = pcVar6 + uVar4; pcVar6 = pcVar6 + uVar4; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
39,940
testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void ReportFailureInUnknownLocation(TestPartResult::Type result_type, const std::string& message) { // This function is a friend of UnitTest and as such has access to // AddTestPartResult. UnitTest::GetInstance()->AddTestPartResult( result_type, nullptr, // No info about the source file where the exception occurred. -1, // We have no info on which line caused the exception. message, ""); // No stack trace, either. }
O1
cpp
testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movl %edi, %ebp callq 0x19012 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x22dda(%rip), %rdx # 0x432de leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rdx, %rsi callq 0x39504 leaq 0x39255(%rip), %rdi # 0x59770 movl %ebp, %esi xorl %edx, %edx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movq %rbx, %r8 movq %r14, %r9 callq 0x19082 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x20546 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2056b movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 28h mov rbx, rsi mov ebp, edi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rdx, aSFromSSMsTotal+1Ah; "" lea r14, [rsp+48h+var_40] mov rdi, r14 mov rsi, rdx 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, _ZZN7testing8UnitTest11GetInstanceEvE8instance; testing::UnitTest::GetInstance(void)::instance mov esi, ebp xor edx, edx mov ecx, 0FFFFFFFFh mov r8, rbx mov r9, r14 call _ZN7testing8UnitTest17AddTestPartResultENS_14TestPartResult4TypeEPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_; testing::UnitTest::AddTestPartResult(testing::TestPartResult::Type,char const*,int,std::string const&,std::string const&) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_20546 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20546: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r15 jz short loc_2056B mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2056B: mov rdi, rbx call __Unwind_Resume
void testing::internal::ReportFailureInUnknownLocation(testing::UnitTest *a1, _QWORD *a2) { void *v2[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v3[6]; // [rsp+18h] [rbp-30h] BYREF testing::UnitTest::GetInstance(a1); v2[0] = v3; std::string::_M_construct<char const*>(v2, "", ""); testing::UnitTest::AddTestPartResult( (long long)&testing::UnitTest::GetInstance(void)::instance, (unsigned int)a1, 0LL, 0xFFFFFFFF, a2, v2); if ( v2[0] != v3 ) operator delete(v2[0], v3[0] + 1LL); }
ReportFailureInUnknownLocation: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV EBP,EDI CALL 0x00119012 LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LEA RDX,[0x1432de] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,RDX CALL 0x00139504 LAB_00120514: LEA RDI,[0x159770] MOV ESI,EBP XOR EDX,EDX MOV ECX,0xffffffff MOV R8,RBX MOV R9,R14 CALL 0x00119082 LAB_0012052f: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00120546 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00120546: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::string const&) */ void testing::internal::ReportFailureInUnknownLocation(int4 param_1,int8 param_2) { long *local_40 [2]; long local_30 [2]; UnitTest::GetInstance(); local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*>(local_40,""); /* try { // try from 00120514 to 0012052e has its CatchHandler @ 00120551 */ UnitTest::AddTestPartResult ((UnitTest *)UnitTest::GetInstance()::instance,param_1,0,0xffffffff,param_2,local_40); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return; }
39,941
mi_search_last
eloqsql/storage/myisam/mi_search.c
int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *buff,*page; DBUG_ENTER("_mi_search_last"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } buff=info->buff; do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } page= buff+mi_getint(buff); nod_flag=mi_test_if_nod(buff); } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page, &info->lastkey_length)) DBUG_RETURN(-1); info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); info->int_keypos=info->int_maxpos=page; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); }
O0
c
mi_search_last: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0xc1b51 callq 0xf55f0 movl $0x78, (%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc1cf7 movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x30(%rbp), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbd620 cmpq $0x0, %rax jne 0xc1b9e movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc1cf7 movq -0x30(%rbp), %rax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx movq -0x30(%rbp), %rdx movzbl (%rdx), %edx movzwl %dx, %edx shll $0x8, %edx orl %edx, %ecx movzwl %cx, %ecx andl $0x7fff, %ecx # imm = 0x7FFF movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc1bf1 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x3c(%rbp) jmp 0xc1bf8 xorl %eax, %eax movl %eax, -0x3c(%rbp) jmp 0xc1bf8 movl -0x3c(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %edi movq -0x38(%rbp), %rsi callq 0xbe590 movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0xc1b60 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x108(%rax), %rcx movq -0x38(%rbp), %r8 movq -0x10(%rbp), %r9 addq $0x1d8, %r9 # imm = 0x1D8 callq 0xc0fb0 cmpq $0x0, %rax jne 0xc1c57 jmp 0xc1c4b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc1cf7 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x108(%rax), %rdx movq -0x10(%rbp), %rax movl 0x1d8(%rax), %eax addq %rax, %rdx xorl %esi, %esi callq 0xbe810 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x130(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x128(%rax) movl -0x24(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x138(%rax) movq -0x18(%rbp), %rax movl 0x1c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x13c(%rax) movq -0x10(%rbp), %rax movq 0x190(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x198(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33d(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33c(%rax) jmp 0xc1cee jmp 0xc1cf0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
_mi_search_last: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_C1B51 call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C1CF7 loc_C1B51: mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rbp+var_30], rax loc_C1B60: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov r8, [rbp+var_30] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_C1B9E mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C1CF7 loc_C1B9E: mov rax, [rbp+var_30] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] movzx ecx, cx mov rdx, [rbp+var_30] movzx edx, byte ptr [rdx] movzx edx, dx shl edx, 8 or ecx, edx movzx ecx, cx and ecx, 7FFFh mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C1BF1 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_3C], eax jmp short loc_C1BF8 loc_C1BF1: xor eax, eax mov [rbp+var_3C], eax jmp short $+2 loc_C1BF8: mov eax, [rbp+var_3C] mov [rbp+var_24], eax mov edi, [rbp+var_24] mov rsi, [rbp+var_38] call _mi_kpos mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_C1B60 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rax, [rbp+var_10] mov rcx, [rax+108h] mov r8, [rbp+var_38] mov r9, [rbp+var_10] add r9, 1D8h call _mi_get_last_key cmp rax, 0 jnz short loc_C1C57 jmp short $+2 loc_C1C4B: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C1CF7 loc_C1C57: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+108h] mov rax, [rbp+var_10] mov eax, [rax+1D8h] add rdx, rax xor esi, esi call _mi_dpos mov rcx, rax mov rax, [rbp+var_10] mov [rax+170h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+130h], rcx mov rax, [rbp+var_10] mov [rax+128h], rcx mov ecx, [rbp+var_24] mov rax, [rbp+var_10] mov [rax+138h], ecx mov rax, [rbp+var_18] mov ecx, [rax+1Ch] mov rax, [rbp+var_10] mov [rax+13Ch], ecx mov rax, [rbp+var_10] mov rcx, [rax+190h] mov rax, [rbp+var_10] mov [rax+198h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 0 mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 0 jmp short $+2 loc_C1CEE: jmp short $+2 loc_C1CF0: mov [rbp+var_4], 0 loc_C1CF7: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long mi_search_last(long long a1, long long a2, long long a3, double a4) { unsigned int v5; // [rsp+4h] [rbp-3Ch] unsigned long long v6; // [rsp+8h] [rbp-38h] unsigned __int16 *v7; // [rsp+10h] [rbp-30h] long long v8; // [rsp+20h] [rbp-20h] v8 = a3; if ( a3 == -1 ) { *(_DWORD *)my_thread_var(a4) = 120; *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; } else { v7 = *(unsigned __int16 **)(a1 + 256); do { if ( !mi_fetch_keypage((_QWORD *)a1, a2, v8, 3, (int)v7, 0, a4) ) { *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; } v6 = (unsigned long long)v7 + (_byteswap_ushort(*v7) & 0x7FFF); if ( (*(_BYTE *)v7 & 0x80) != 0 ) v5 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); else v5 = 0; v8 = mi_kpos(v5, v6); } while ( v8 != -1 ); if ( mi_get_last_key(a1, a2, v7, *(_BYTE **)(a1 + 264), v6, (_DWORD *)(a1 + 472), a4) ) { *(_QWORD *)(a1 + 368) = mi_dpos(a1, 0, *(unsigned int *)(a1 + 472) + *(_QWORD *)(a1 + 264)); *(_QWORD *)(a1 + 304) = v6; *(_QWORD *)(a1 + 296) = v6; *(_DWORD *)(a1 + 312) = v5; *(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28); *(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400); *(_BYTE *)(a1 + 829) = 0; *(_BYTE *)(a1 + 828) = 0; return 0; } else { return (unsigned int)-1; } } }
_mi_search_last: 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 CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x001c1b51 CALL 0x001f55f0 MOV dword ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c1cf7 LAB_001c1b51: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV qword ptr [RBP + -0x30],RAX LAB_001c1b60: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x30] MOV ECX,0x3 XOR R9D,R9D CALL 0x001bd620 CMP RAX,0x0 JNZ 0x001c1b9e MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c1cf7 LAB_001c1b9e: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX MOV RDX,qword ptr [RBP + -0x30] MOVZX EDX,byte ptr [RDX] MOVZX EDX,DX SHL EDX,0x8 OR ECX,EDX MOVZX ECX,CX AND ECX,0x7fff MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c1bf1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c1bf8 LAB_001c1bf1: XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c1bf8 LAB_001c1bf8: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x24],EAX MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001be590 MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x001c1b60 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x108] MOV R8,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x10] ADD R9,0x1d8 CALL 0x001c0fb0 CMP RAX,0x0 JNZ 0x001c1c57 JMP 0x001c1c4b LAB_001c1c4b: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c1cf7 LAB_001c1c57: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1d8] ADD RDX,RAX XOR ESI,ESI CALL 0x001be810 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x128],RCX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x138],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x13c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x190] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x198],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x0 JMP 0x001c1cee LAB_001c1cee: JMP 0x001c1cf0 LAB_001c1cf0: MOV dword ptr [RBP + -0x4],0x0 LAB_001c1cf7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 _mi_search_last(long *param_1,long param_2,long param_3) { byte *pbVar1; int4 *puVar2; long lVar3; byte *pbVar4; int4 local_44; long local_28; int4 local_c; if (param_3 == -1) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x78; param_1[0x2e] = -1; local_c = 0xffffffff; } else { pbVar1 = (byte *)param_1[0x20]; local_28 = param_3; do { lVar3 = _mi_fetch_keypage(param_1,param_2,local_28,3,pbVar1,0); if (lVar3 == 0) { param_1[0x2e] = -1; return 0xffffffff; } pbVar4 = pbVar1 + ((uint)pbVar1[1] | (*pbVar1 & 0x7f) << 8); if ((*pbVar1 & 0x80) == 0) { local_44 = 0; } else { local_44 = *(int4 *)(*param_1 + 0x17c); } local_28 = _mi_kpos(local_44,pbVar4); } while (local_28 != -1); lVar3 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar4,param_1 + 0x3b); if (lVar3 == 0) { local_c = 0xffffffff; } else { lVar3 = _mi_dpos(param_1,0,param_1[0x21] + (ulong)*(uint *)(param_1 + 0x3b)); param_1[0x2e] = lVar3; param_1[0x26] = (long)pbVar4; param_1[0x25] = (long)pbVar4; *(int4 *)(param_1 + 0x27) = local_44; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c); param_1[0x33] = param_1[0x32]; *(int1 *)((long)param_1 + 0x33d) = 0; *(int1 *)((long)param_1 + 0x33c) = 0; local_c = 0; } } return local_c; }
39,942
my_fill_utf8mb3_mb
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3_mb(CHARSET_INFO *cs, char *str, size_t length, int fill) { char *end= str + length; char buf[10]; char buflen= my_ci_native_to_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); for ( ; str + buflen <= end ; ) { memcpy(str, buf, buflen); str+= buflen; } for ( ; str < end; ) *str++= ' '; }
O0
c
my_fill_utf8mb3_mb: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0xd8(%rax), %rax movq -0x20(%rbp), %rdi movslq -0x34(%rbp), %rsi leaq -0x12(%rbp), %rdx leaq -0x12(%rbp), %rcx addq $0xa, %rcx callq *%rax movb %al, -0x41(%rbp) jmp 0xc50cd jmp 0xc50cf movq -0x28(%rbp), %rax movsbl -0x41(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax cmpq -0x40(%rbp), %rax ja 0xc5109 movq -0x28(%rbp), %rdi leaq -0x12(%rbp), %rsi movsbq -0x41(%rbp), %rdx callq 0x28290 movsbl -0x41(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0xc50cf jmp 0xc510b movq -0x28(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0xc5129 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x20, (%rax) jmp 0xc510b movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xc5141 addq $0x50, %rsp popq %rbp retq callq 0x28390 nopw %cs:(%rax,%rax)
my_fill_utf8mb3_mb: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rax, [rax+0D8h] mov rdi, [rbp+var_20] movsxd rsi, [rbp+var_34] lea rdx, [rbp+var_12] lea rcx, [rbp+var_12] add rcx, 0Ah call rax mov [rbp+var_41], al jmp short $+2 loc_C50CD: jmp short $+2 loc_C50CF: mov rax, [rbp+var_28] movsx ecx, [rbp+var_41] movsxd rcx, ecx add rax, rcx cmp rax, [rbp+var_40] ja short loc_C5109 mov rdi, [rbp+var_28] lea rsi, [rbp+var_12] movsx rdx, [rbp+var_41] call _memcpy movsx ecx, [rbp+var_41] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp short loc_C50CF loc_C5109: jmp short $+2 loc_C510B: mov rax, [rbp+var_28] cmp rax, [rbp+var_40] jnb short loc_C5129 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_C510B loc_C5129: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_C5141 add rsp, 50h pop rbp retn loc_C5141: call ___stack_chk_fail
unsigned long long my_fill_utf8mb3_mb(long long a1, _BYTE *a2, long long a3, int a4) { _BYTE *v4; // rax char i; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] _BYTE *v8; // [rsp+28h] [rbp-28h] _BYTE v9[10]; // [rsp+3Eh] [rbp-12h] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] BYREF v10 = __readfsqword(0x28u); v8 = a2; v7 = (unsigned long long)&a2[a3]; for ( i = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, a4, v9, &v10); (unsigned long long)&v8[i] <= v7; v8 += i ) memcpy(v8, v9, i); while ( (unsigned long long)v8 < v7 ) { v4 = v8++; *v4 = 32; } return __readfsqword(0x28u); }
my_fill_utf8mb3_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0xd8] MOV RDI,qword ptr [RBP + -0x20] MOVSXD RSI,dword ptr [RBP + -0x34] LEA RDX,[RBP + -0x12] LEA RCX,[RBP + -0x12] ADD RCX,0xa CALL RAX MOV byte ptr [RBP + -0x41],AL JMP 0x001c50cd LAB_001c50cd: JMP 0x001c50cf LAB_001c50cf: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RBP + -0x41] MOVSXD RCX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x40] JA 0x001c5109 MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x12] MOVSX RDX,byte ptr [RBP + -0x41] CALL 0x00128290 MOVSX ECX,byte ptr [RBP + -0x41] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001c50cf LAB_001c5109: JMP 0x001c510b LAB_001c510b: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001c5129 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x20 JMP 0x001c510b LAB_001c5129: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001c5141 ADD RSP,0x50 POP RBP RET LAB_001c5141: CALL 0x00128390
void my_fill_utf8mb3_mb(long param_1,int1 *param_2,long param_3,int param_4) { char cVar1; long in_FS_OFFSET; int1 *local_30; int1 local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); cVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,(long)param_4,local_1a,&local_10); for (local_30 = param_2; local_30 + (int)cVar1 <= param_2 + param_3; local_30 = local_30 + (int)cVar1) { memcpy(local_30,local_1a,(long)cVar1); } while (local_30 < param_2 + param_3) { *local_30 = 0x20; local_30 = local_30 + 1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
39,943
get_date_field
bluesky950520[P]quickjs/quickjs.c
static JSValue get_date_field(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // get_date_field(obj, n, is_local) double fields[9]; int res, n, is_local; is_local = magic & 0x0F; n = (magic >> 4) & 0x0F; res = get_date_fields(ctx, this_val, fields, is_local, 0); if (res < 0) return JS_EXCEPTION; if (!res) return JS_NAN; if (magic & 0x100) { // getYear fields[0] -= 1900; } return js_number(fields[n]); }
O2
c
get_date_field: pushq %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movl %r9d, %ebp movl %r9d, %r8d andl $0xf, %r8d movl %r9d, %r14d shrl $0x4, %r14d andl $0xf, %r14d movq %rsp, %rcx xorl %ebx, %ebx xorl %r9d, %r9d callq 0x4a439 testl %eax, %eax js 0x49f9d je 0x49fa2 btl $0x8, %ebp jae 0x49f8b movsd (%rsp), %xmm0 addsd 0x3b8e2(%rip), %xmm0 # 0x85868 movsd %xmm0, (%rsp) movl %r14d, %eax movsd (%rsp,%rax,8), %xmm0 callq 0x16f9e movq %rax, %rbx jmp 0x49faf pushq $0x6 popq %rdx jmp 0x49faf pushq $0x7 popq %rdx movabsq $0x7ff8000000000000, %rbx # imm = 0x7FF8000000000000 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq
get_date_field: push rbp push r14 push rbx sub rsp, 50h mov ebp, r9d mov r8d, r9d and r8d, 0Fh mov r14d, r9d shr r14d, 4 and r14d, 0Fh mov rcx, rsp xor ebx, ebx xor r9d, r9d call get_date_fields test eax, eax js short loc_49F9D jz short loc_49FA2 bt ebp, 8 jnb short loc_49F8B movsd xmm0, [rsp+68h+var_68] addsd xmm0, cs:qword_85868 movsd [rsp+68h+var_68], xmm0 loc_49F8B: mov eax, r14d movsd xmm0, [rsp+rax*8+68h+var_68] call js_number mov rbx, rax jmp short loc_49FAF loc_49F9D: push 6 pop rdx jmp short loc_49FAF loc_49FA2: push 7 pop rdx mov rbx, 7FF8000000000000h loc_49FAF: mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn
long long get_date_field(long long a1, long long a2, long long a3, long long a4, long long a5, __int16 a6) { int v7; // r14d long long v8; // rbx int date_fields; // eax double v11[13]; // [rsp+0h] [rbp-68h] BYREF v7 = (unsigned __int8)a6 >> 4; v8 = 0LL; date_fields = get_date_fields(a1, a2, a3, v11, a6 & 0xF, 0LL); if ( date_fields >= 0 ) { if ( date_fields ) { if ( (a6 & 0x100) != 0 ) v11[0] = v11[0] + -1900.0; return js_number(v11[v7]); } else { return 0x7FF8000000000000LL; } } return v8; }
get_date_field: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x50 MOV EBP,R9D MOV R8D,R9D AND R8D,0xf MOV R14D,R9D SHR R14D,0x4 AND R14D,0xf MOV RCX,RSP XOR EBX,EBX XOR R9D,R9D CALL 0x0014a439 TEST EAX,EAX JS 0x00149f9d JZ 0x00149fa2 BT EBP,0x8 JNC 0x00149f8b MOVSD XMM0,qword ptr [RSP] ADDSD XMM0,qword ptr [0x00185868] MOVSD qword ptr [RSP],XMM0 LAB_00149f8b: MOV EAX,R14D MOVSD XMM0,qword ptr [RSP + RAX*0x8] CALL 0x00116f9e MOV RBX,RAX JMP 0x00149faf LAB_00149f9d: PUSH 0x6 POP RDX JMP 0x00149faf LAB_00149fa2: PUSH 0x7 POP RDX MOV RBX,0x7ff8000000000000 LAB_00149faf: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 get_date_field(void) { int iVar1; int8 uVar2; uint in_R9D; double local_68 [10]; uVar2 = 0; iVar1 = get_date_fields(); if (-1 < iVar1) { if (iVar1 == 0) { uVar2 = 0x7ff8000000000000; } else { if ((in_R9D >> 8 & 1) != 0) { local_68[0] = local_68[0] + _DAT_00185868; } uVar2 = js_number(local_68[in_R9D >> 4 & 0xf]); } } return uVar2; }
39,944
int2str
eloqsql/strings/int2str.c
char * int2str(register long int val, register char *dst, register int radix, int upcase) { char buffer[65]; register char *p; long int new_val; const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower; ulong uval= (ulong) val; if (radix < 0) { if (radix < -36 || radix > -2) return NullS; if (val < 0) { *dst++ = '-'; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulong)0 - uval; } radix = -radix; } else if (radix > 36 || radix < 2) return NullS; /* The slightly contorted code which follows is due to the fact that few machines directly support unsigned long / and %. Certainly the VAX C compiler generates a subroutine call. In the interests of efficiency (hollow laugh) I let this happen for the first digit only; after that "val" will be in range so that signed integer division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY YOUR C COMPILER. The first % and / should be unsigned, the second % and / signed, but C compilers tend to be extraordinarily sensitive to minor details of style. This works on a VAX, that's all I claim for it. */ p = &buffer[sizeof(buffer)-1]; *p = '\0'; new_val= uval / (ulong) radix; *--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)]; val = new_val; #ifdef HAVE_LDIV while (val != 0) { ldiv_t res; res=ldiv(val,radix); *--p = dig_vec[res.rem]; val= res.quot; } #else while (val != 0) { new_val=val/radix; *--p = dig_vec[(uchar) (val-new_val*radix)]; val= new_val; } #endif while ((*dst++ = *p++) != 0) ; return dst-1; }
O0
c
int2str: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x60(%rbp) movq %rsi, -0x68(%rbp) movl %edx, -0x6c(%rbp) movl %ecx, -0x70(%rbp) movl -0x70(%rbp), %edx leaq 0x146be0(%rip), %rax # 0x1ceca0 leaq 0x146ba9(%rip), %rcx # 0x1cec70 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x88(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x90(%rbp) cmpl $0x0, -0x6c(%rbp) jge 0x88132 cmpl $-0x24, -0x6c(%rbp) jl 0x880f2 cmpl $-0x2, -0x6c(%rbp) jle 0x880ff movq $0x0, -0x58(%rbp) jmp 0x88259 cmpq $0x0, -0x60(%rbp) jge 0x88128 movq -0x68(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x68(%rbp) movb $0x2d, (%rax) xorl %eax, %eax subq -0x90(%rbp), %rax movq %rax, -0x90(%rbp) xorl %eax, %eax subl -0x6c(%rbp), %eax movl %eax, -0x6c(%rbp) jmp 0x8814d cmpl $0x24, -0x6c(%rbp) jg 0x8813e cmpl $0x2, -0x6c(%rbp) jge 0x8814b movq $0x0, -0x58(%rbp) jmp 0x88259 jmp 0x8814d leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb $0x0, (%rax) movq -0x90(%rbp), %rax movslq -0x6c(%rbp), %rcx xorl %edx, %edx divq %rcx movq %rax, -0x80(%rbp) movq -0x88(%rbp), %rax movq -0x90(%rbp), %rcx movq -0x80(%rbp), %rdx movslq -0x6c(%rbp), %rsi imulq %rsi, %rdx subq %rdx, %rcx movzbl %cl, %ecx movb (%rax,%rcx), %cl movq -0x78(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x78(%rbp) movb %cl, -0x1(%rax) movq -0x80(%rbp), %rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x60(%rbp) je 0x8821f movq -0x60(%rbp), %rdi movslq -0x6c(%rbp), %rsi callq 0x25160 movq %rax, -0xb0(%rbp) movq %rdx, -0xa8(%rbp) movq -0xb0(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0xa8(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x88(%rbp), %rax movq -0x98(%rbp), %rcx movb (%rax,%rcx), %cl movq -0x78(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x78(%rbp) movb %cl, -0x1(%rax) movq -0xa0(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x881b1 jmp 0x88221 movq -0x78(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x78(%rbp) movb (%rax), %al movq -0x68(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x68(%rbp) movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x8824d jmp 0x88221 movq -0x68(%rbp), %rax addq $-0x1, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0xb8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x88286 movq -0xb8(%rbp), %rax addq $0xc0, %rsp popq %rbp retq callq 0x25410 nopl (%rax,%rax)
int2str: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_60], rdi mov [rbp+var_68], rsi mov [rbp+var_6C], edx mov [rbp+var_70], ecx mov edx, [rbp+var_70] lea rax, _dig_vec_lower; "0123456789abcdefghijklmnopqrstuvwxyz" lea rcx, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" cmp edx, 0 cmovnz rax, rcx mov [rbp+var_88], rax mov rax, [rbp+var_60] mov [rbp+var_90], rax cmp [rbp+var_6C], 0 jge short loc_88132 cmp [rbp+var_6C], 0FFFFFFDCh jl short loc_880F2 cmp [rbp+var_6C], 0FFFFFFFEh jle short loc_880FF loc_880F2: mov [rbp+var_58], 0 jmp loc_88259 loc_880FF: cmp [rbp+var_60], 0 jge short loc_88128 mov rax, [rbp+var_68] mov rcx, rax add rcx, 1 mov [rbp+var_68], rcx mov byte ptr [rax], 2Dh ; '-' xor eax, eax sub rax, [rbp+var_90] mov [rbp+var_90], rax loc_88128: xor eax, eax sub eax, [rbp+var_6C] mov [rbp+var_6C], eax jmp short loc_8814D loc_88132: cmp [rbp+var_6C], 24h ; '$' jg short loc_8813E cmp [rbp+var_6C], 2 jge short loc_8814B loc_8813E: mov [rbp+var_58], 0 jmp loc_88259 loc_8814B: jmp short $+2 loc_8814D: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_78], rax mov rax, [rbp+var_78] mov byte ptr [rax], 0 mov rax, [rbp+var_90] movsxd rcx, [rbp+var_6C] xor edx, edx div rcx mov [rbp+var_80], rax mov rax, [rbp+var_88] mov rcx, [rbp+var_90] mov rdx, [rbp+var_80] movsxd rsi, [rbp+var_6C] imul rdx, rsi sub rcx, rdx movzx ecx, cl mov cl, [rax+rcx] mov rax, [rbp+var_78] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_78], rdx mov [rax-1], cl mov rax, [rbp+var_80] mov [rbp+var_60], rax loc_881B1: cmp [rbp+var_60], 0 jz short loc_8821F mov rdi, [rbp+var_60] movsxd rsi, [rbp+var_6C] call _ldiv mov [rbp+var_B0], rax mov [rbp+var_A8], rdx mov rax, [rbp+var_B0] mov [rbp+var_A0], rax mov rax, [rbp+var_A8] mov [rbp+var_98], rax mov rax, [rbp+var_88] mov rcx, [rbp+var_98] mov cl, [rax+rcx] mov rax, [rbp+var_78] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_78], rdx mov [rax-1], cl mov rax, [rbp+var_A0] mov [rbp+var_60], rax jmp short loc_881B1 loc_8821F: jmp short $+2 loc_88221: mov rax, [rbp+var_78] mov rcx, rax add rcx, 1 mov [rbp+var_78], rcx mov al, [rax] mov rcx, [rbp+var_68] mov rdx, rcx add rdx, 1 mov [rbp+var_68], rdx mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_8824D jmp short loc_88221 loc_8824D: mov rax, [rbp+var_68] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_58], rax loc_88259: mov rax, [rbp+var_58] mov [rbp+var_B8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_88286 mov rax, [rbp+var_B8] add rsp, 0C0h pop rbp retn loc_88286: call ___stack_chk_fail
_BYTE * int2str(long long a1, _BYTE *a2, int a3, int a4) { const char *v4; // rax long long v5; // rdx _BYTE *v6; // rax _BYTE *v7; // rax _BYTE *v8; // rcx long long v10; // [rsp+10h] [rbp-B0h] unsigned long long v11; // [rsp+30h] [rbp-90h] const char *v12; // [rsp+38h] [rbp-88h] _BYTE *v13; // [rsp+48h] [rbp-78h] int v14; // [rsp+54h] [rbp-6Ch] _BYTE *v15; // [rsp+58h] [rbp-68h] unsigned long long i; // [rsp+60h] [rbp-60h] _BYTE v18[9]; // [rsp+AFh] [rbp-11h] BYREF unsigned long long v19; // [rsp+B8h] [rbp-8h] v19 = __readfsqword(0x28u); v15 = a2; v14 = a3; v4 = "0123456789abcdefghijklmnopqrstuvwxyz"; if ( a4 ) v4 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; v12 = v4; v11 = a1; if ( a3 >= 0 ) { if ( a3 > 36 || a3 < 2 ) return 0LL; } else { if ( a3 < -36 || a3 > -2 ) return 0LL; if ( a1 < 0 ) { v15 = a2 + 1; *a2 = 45; v11 = -a1; } v14 = -a3; } v18[1] = 0; v13 = v18; v18[0] = v4[(unsigned __int8)(v11 % v14)]; for ( i = v11 / v14; i; i = v10 ) { v10 = ldiv(i, v14); v6 = v13--; *(v6 - 1) = v12[v5]; } do { v7 = v13++; LOBYTE(v7) = *v7; v8 = v15++; *v8 = (_BYTE)v7; } while ( (_BYTE)v7 ); return v15 - 1; }
int2str: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x60],RDI MOV qword ptr [RBP + -0x68],RSI MOV dword ptr [RBP + -0x6c],EDX MOV dword ptr [RBP + -0x70],ECX MOV EDX,dword ptr [RBP + -0x70] LEA RAX,[0x2ceca0] LEA RCX,[0x2cec70] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x90],RAX CMP dword ptr [RBP + -0x6c],0x0 JGE 0x00188132 CMP dword ptr [RBP + -0x6c],-0x24 JL 0x001880f2 CMP dword ptr [RBP + -0x6c],-0x2 JLE 0x001880ff LAB_001880f2: MOV qword ptr [RBP + -0x58],0x0 JMP 0x00188259 LAB_001880ff: CMP qword ptr [RBP + -0x60],0x0 JGE 0x00188128 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x68],RCX MOV byte ptr [RAX],0x2d XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x90],RAX LAB_00188128: XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x6c],EAX JMP 0x0018814d LAB_00188132: CMP dword ptr [RBP + -0x6c],0x24 JG 0x0018813e CMP dword ptr [RBP + -0x6c],0x2 JGE 0x0018814b LAB_0018813e: MOV qword ptr [RBP + -0x58],0x0 JMP 0x00188259 LAB_0018814b: JMP 0x0018814d LAB_0018814d: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x90] MOVSXD RCX,dword ptr [RBP + -0x6c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x80] MOVSXD RSI,dword ptr [RBP + -0x6c] IMUL RDX,RSI SUB RCX,RDX MOVZX ECX,CL MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x78] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x78],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x60],RAX LAB_001881b1: CMP qword ptr [RBP + -0x60],0x0 JZ 0x0018821f MOV RDI,qword ptr [RBP + -0x60] MOVSXD RSI,dword ptr [RBP + -0x6c] CALL 0x00125160 MOV qword ptr [RBP + -0xb0],RAX MOV qword ptr [RBP + -0xa8],RDX MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x98] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x78] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x78],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x60],RAX JMP 0x001881b1 LAB_0018821f: JMP 0x00188221 LAB_00188221: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x78],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x68],RDX MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x0018824d JMP 0x00188221 LAB_0018824d: MOV RAX,qword ptr [RBP + -0x68] ADD RAX,-0x1 MOV qword ptr [RBP + -0x58],RAX LAB_00188259: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00188286 MOV RAX,qword ptr [RBP + -0xb8] ADD RSP,0xc0 POP RBP RET LAB_00188286: CALL 0x00125410
char * int2str(ulong param_1,char *param_2,int param_3,int param_4) { char cVar1; char *pcVar2; char *pcVar3; long in_FS_OFFSET; ldiv_t lVar4; ulong local_b8; long local_b0; ulong local_98; char *local_80; int local_74; char *local_70; ulong local_68; char *local_60; char local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pcVar3 = "0123456789abcdefghijklmnopqrstuvwxyz"; if (param_4 != 0) { pcVar3 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } local_98 = param_1; local_70 = param_2; if (param_3 < 0) { if ((param_3 < -0x24) || (-2 < param_3)) { local_60 = (char *)0x0; goto LAB_00188259; } if ((long)param_1 < 0) { local_70 = param_2 + 1; *param_2 = '-'; local_98 = -param_1; } local_74 = -param_3; } else if ((0x24 < param_3) || (local_74 = param_3, param_3 < 2)) { local_60 = (char *)0x0; goto LAB_00188259; } local_19[1] = 0; local_68 = local_98 / (ulong)(long)local_74; local_19[0] = pcVar3[(byte)((char)local_98 - (char)local_68 * (char)local_74)]; local_80 = local_19; while (pcVar2 = local_70, local_68 != 0) { lVar4 = ldiv(local_68,(long)local_74); local_b8 = lVar4.quot; local_b0 = lVar4.rem; local_80[-1] = pcVar3[local_b0]; local_80 = local_80 + -1; local_68 = local_b8; } do { local_70 = pcVar2; cVar1 = *local_80; *local_70 = cVar1; local_80 = local_80 + 1; pcVar2 = local_70 + 1; } while (cVar1 != '\0'); local_60 = local_70; LAB_00188259: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_60; }
39,945
my_round_up_to_next_power
eloqsql/include/my_bit.h
static inline uint32 my_round_up_to_next_power(uint32 v) { v--; /* 01100000000000000000000000001010 */ v|= v >> 1; /* 01110000000000000000000000001111 */ v|= v >> 2; /* 01111100000000000000000000001111 */ v|= v >> 4; /* 01111111110000000000000000001111 */ v|= v >> 8; /* 01111111111111111100000000001111 */ v|= v >> 16; /* 01111111111111111111111111111111 */ return v+1; /* 10000000000000000000000000000000 */ }
O0
c
my_round_up_to_next_power: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax addl $-0x1, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x2, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x4, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x8, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax shrl $0x10, %eax orl -0x4(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addl $0x1, %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_round_up_to_next_power_1: push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] add eax, 0FFFFFFFFh mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 1 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 2 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 4 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 8 or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] shr eax, 10h or eax, [rbp+var_4] mov [rbp+var_4], eax mov eax, [rbp+var_4] add eax, 1 pop rbp retn
long long my_round_up_to_next_power_1(int a1) { unsigned int v2; // [rsp+0h] [rbp-4h] unsigned int v3; // [rsp+0h] [rbp-4h] v2 = (a1 - 1) | ((unsigned int)(a1 - 1) >> 1) | (((a1 - 1) | ((unsigned int)(a1 - 1) >> 1)) >> 2); v3 = v2 | (v2 >> 4) | ((v2 | (v2 >> 4)) >> 8); return (v3 | HIWORD(v3)) + 1; }
my_round_up_to_next_power: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,-0x1 MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x1 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x2 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x4 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x8 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] SHR EAX,0x10 OR EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x4],EAX MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x1 POP RBP RET
int my_round_up_to_next_power(int param_1) { uint uVar1; uVar1 = param_1 - 1U >> 1 | param_1 - 1U; uVar1 = uVar1 >> 2 | uVar1; uVar1 = uVar1 >> 4 | uVar1; uVar1 = uVar1 >> 8 | uVar1; return (uVar1 >> 0x10 | uVar1) + 1; }
39,946
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
ng-log[P]ng-log/src/logging.cc
void LogFileObject::FlushUnlocked( const std::chrono::system_clock::time_point& now) { if (file_ != nullptr) { fflush(file_.get()); bytes_since_flush_ = 0; } // Figure out when we are due for another flush. next_flush_time_ = now + std::chrono::duration_cast<std::chrono::system_clock::duration>( std::chrono::duration<int32>{FLAGS_logbufsecs}); }
O0
cpp
nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) addq $0x98, %rdi xorl %eax, %eax movl %eax, %esi callq 0x197a0 testb $0x1, %al jne 0x14dbe jmp 0x14de4 movq -0x30(%rbp), %rdi addq $0x98, %rdi callq 0x19320 movq %rax, %rdi callq 0x98b0 movq -0x30(%rbp), %rax movl $0x0, 0xa4(%rax) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x24(%rbp), %rdi leaq 0x5bdf1(%rip), %rsi # 0x70be8 callq 0x19650 leaq -0x24(%rbp), %rdi callq 0x19820 movq -0x38(%rbp), %rdi movq %rax, -0x20(%rbp) leaq -0x20(%rbp), %rsi callq 0x197d0 movq %rax, %rcx movq -0x30(%rbp), %rax movq %rcx, -0x18(%rbp) movq -0x18(%rbp), %rcx movq %rcx, 0xb8(%rax) addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglog12_GLOBAL__N_113LogFileObject13FlushUnlockedERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_30], rdi add rdi, 98h xor eax, eax mov esi, eax call _ZStneI8_IO_FILESt14default_deleteIS0_EEbRKSt10unique_ptrIT_T0_EDn; std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(std::unique_ptr<_IO_FILE> const&,decltype(nullptr)) test al, 1 jnz short loc_14DBE jmp short loc_14DE4 loc_14DBE: mov rdi, [rbp+var_30] add rdi, 98h call _ZNKSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EE3getEv; std::unique_ptr<_IO_FILE>::get(void) mov rdi, rax call _fflush mov rax, [rbp+var_30] mov dword ptr [rax+0A4h], 0 loc_14DE4: mov rax, [rbp+var_10] mov [rbp+var_38], rax lea rdi, [rbp+var_24] lea rsi, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs call _ZNSt6chrono8durationIiSt5ratioILl1ELl1EEEC2IivEERKT_; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(int const&) lea rdi, [rbp+var_24] call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000000000EEEEiS2_ILl1ELl1EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE mov rdi, [rbp+var_38] mov [rbp+var_20], rax lea rsi, [rbp+var_20] call _ZNSt6chronoplINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEElS5_EENS_10time_pointIT_NSt11common_typeIJT0_NS3_IT1_T2_EEEE4typeEEERKNS7_IS8_SA_EERKSD_; std::chrono::operator+<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,long,std::ratio<1l,1000000000l>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::duration<long,std::ratio<1l,1000000000l>> const&) mov rcx, rax mov rax, [rbp+var_30] mov [rbp+var_18], rcx mov rcx, [rbp+var_18] mov [rax+0B8h], rcx add rsp, 40h pop rbp retn
long long nglog::`anonymous namespace'::LogFileObject::FlushUnlocked(long long a1, long long a2) { long long v2; // rax long long v3; // rcx long long result; // rax long long v5; // [rsp+8h] [rbp-38h] _BYTE v6[4]; // [rsp+1Ch] [rbp-24h] BYREF long long v7; // [rsp+20h] [rbp-20h] BYREF long long v8; // [rsp+30h] [rbp-10h] long long v9; // [rsp+38h] [rbp-8h] v9 = a1; v8 = a2; if ( (std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(a1 + 152, 0LL) & 1) != 0 ) { v2 = std::unique_ptr<_IO_FILE>::get(a1 + 152); fflush(v2); *(_DWORD *)(a1 + 164) = 0; } v5 = v8; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(v6, &fLI::FLAGS_logbufsecs); v7 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<1l,1000000000l>>,int,std::ratio<1l,1l>>(v6); v3 = std::chrono::operator+<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,long,std::ratio<1l,1000000000l>>( v5, &v7); result = a1; *(_QWORD *)(a1 + 184) = v3; return result; }
FlushUnlocked: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RDI ADD RDI,0x98 XOR EAX,EAX MOV ESI,EAX CALL 0x001197a0 TEST AL,0x1 JNZ 0x00114dbe JMP 0x00114de4 LAB_00114dbe: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x98 CALL 0x00119320 MOV RDI,RAX CALL 0x001098b0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0xa4],0x0 LAB_00114de4: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x24] LEA RSI,[0x170be8] CALL 0x00119650 LEA RDI,[RBP + -0x24] CALL 0x00119820 MOV RDI,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX LEA RSI,[RBP + -0x20] CALL 0x001197d0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x18],RCX MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xb8],RCX ADD RSP,0x40 POP RBP RET
/* nglog::(anonymous namespace)::LogFileObject::FlushUnlocked(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::FlushUnlocked(LogFileObject *this,time_point *param_1) { time_point *ptVar1; bool bVar2; FILE *__stream; int8 uVar3; duration<int,std::ratio<1l,1l>> local_2c [4]; int8 local_28 [2]; time_point *local_18; LogFileObject *local_10; local_18 = param_1; local_10 = this; bVar2 = std::operator!=((unique_ptr *)(this + 0x98),(_func_decltype_nullptr *)0x0); if (bVar2) { __stream = (FILE *)std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::get ((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *) (this + 0x98)); fflush(__stream); *(int4 *)(this + 0xa4) = 0; } ptVar1 = local_18; std::chrono::duration<int,std::ratio<1l,1l>>::duration<int,void>(local_2c,&fLI::FLAGS_logbufsecs); local_28[0] = std::chrono:: duration_cast<std::chrono::duration<long,std::ratio<1l,1000000000l>>,int,std::ratio<1l,1l>> ((duration *)local_2c); uVar3 = std::chrono::operator+(ptVar1,(duration *)local_28); *(int8 *)(this + 0xb8) = uVar3; return; }
39,947
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O3
c
str2int: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r9 movq $0x0, (%r8) movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rcx, %rdx negq %rdx cmovnsq %rcx, %rdx leaq 0x2ba865(%rip), %r10 # 0x313760 movq 0x40(%r10), %r11 movzbl (%rdi), %r10d incq %rdi testb $0x8, 0x1(%r11,%r10) jne 0x58eff negq %rax cmpq %rax, %rdx cmovlq %rdx, %rax cmpl $0x2b, %r10d je 0x58f2c cmpl $0x2d, %r10d jne 0x58f29 xorl %r10d, %r10d jmp 0x58f2f decq %rdi movb $0x1, %r10b leaq -0x1(%rdi), %rbx movb 0x1(%rbx), %r14b incq %rbx cmpb $0x30, %r14b je 0x58f33 xorl %r11d, %r11d xorl %edx, %edx leal -0x30(%r14), %r15d cmpb $0x9, %r15b ja 0x58f55 movzbl %r15b, %r15d jmp 0x58f81 leal -0x41(%r14), %r15d cmpb $0x19, %r15b ja 0x58f69 movzbl %r14b, %r15d addl $-0x37, %r15d jmp 0x58f81 leal -0x61(%r14), %r12d movl $0x7f, %r15d cmpb $0x19, %r12b ja 0x58f81 movzbl %r14b, %r15d addl $-0x57, %r15d movl %r15d, -0xa0(%rbp,%rdx,4) cmpl %esi, %r15d jge 0x58fa3 cmpq $0x13, %rdx ja 0x58fa3 incq %rdx movb 0x1(%rbx), %r14b incq %rbx incl %r11d jmp 0x58f45 cmpq %rdi, %rbx je 0x58feb cmpq $0x2, %rdx jb 0x58ff3 movslq %esi, %r14 movq $-0x1, %rdi xorl %esi, %esi decl %r11d movslq -0xa0(%rbp,%r11,4), %r15 movq %r15, %rdx negq %rdx cmpq %rdx, %rax jg 0x5902e addq %r15, %rax cqto idivq %r14 imulq %rdi, %r15 addq %r15, %rsi imulq %r14, %rdi cmpl $0x1, %r11d jg 0x58fba jmp 0x59000 movl $0x21, %r14d jmp 0x59034 xorl %esi, %esi decl %edx jne 0x59019 movq $-0x1, %rdi movslq -0xa0(%rbp), %rdx movq %rdx, %r11 negq %r11 cmpq %r11, %rax jg 0x5902e imulq %rdx, %rdi addq %rdi, %rsi testb %r10b, %r10b je 0x59051 negq %rsi seto %al cmpq %rcx, %rsi setg %cl orb %al, %cl je 0x59056 movl $0x22, %r14d xorl %ebx, %ebx callq 0x24050 movl %r14d, (%rax) movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq %r9, %rsi jl 0x5902e movq %rsi, (%r8) xorl %r14d, %r14d jmp 0x59036 nop
str2int: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r9, rdx mov qword ptr [r8], 0 mov rax, rdx neg rax cmovs rax, rdx mov rdx, rcx neg rdx cmovns rdx, rcx lea r10, my_charset_latin1 mov r11, [r10+40h] loc_58EFF: movzx r10d, byte ptr [rdi] inc rdi test byte ptr [r11+r10+1], 8 jnz short loc_58EFF neg rax cmp rdx, rax cmovl rax, rdx cmp r10d, 2Bh ; '+' jz short loc_58F2C cmp r10d, 2Dh ; '-' jnz short loc_58F29 xor r10d, r10d jmp short loc_58F2F loc_58F29: dec rdi loc_58F2C: mov r10b, 1 loc_58F2F: lea rbx, [rdi-1] loc_58F33: mov r14b, [rbx+1] inc rbx cmp r14b, 30h ; '0' jz short loc_58F33 xor r11d, r11d xor edx, edx loc_58F45: lea r15d, [r14-30h] cmp r15b, 9 ja short loc_58F55 movzx r15d, r15b jmp short loc_58F81 loc_58F55: lea r15d, [r14-41h] cmp r15b, 19h ja short loc_58F69 movzx r15d, r14b add r15d, 0FFFFFFC9h jmp short loc_58F81 loc_58F69: lea r12d, [r14-61h] mov r15d, 7Fh cmp r12b, 19h ja short loc_58F81 movzx r15d, r14b add r15d, 0FFFFFFA9h loc_58F81: mov [rbp+rdx*4+var_A0], r15d cmp r15d, esi jge short loc_58FA3 cmp rdx, 13h ja short loc_58FA3 inc rdx mov r14b, [rbx+1] inc rbx inc r11d jmp short loc_58F45 loc_58FA3: cmp rbx, rdi jz short loc_58FEB cmp rdx, 2 jb short loc_58FF3 movsxd r14, esi mov rdi, 0FFFFFFFFFFFFFFFFh xor esi, esi loc_58FBA: dec r11d movsxd r15, [rbp+r11*4+var_A0] mov rdx, r15 neg rdx cmp rax, rdx jg short loc_5902E add rax, r15 cqo idiv r14 imul r15, rdi add rsi, r15 imul rdi, r14 cmp r11d, 1 jg short loc_58FBA jmp short loc_59000 loc_58FEB: mov r14d, 21h ; '!' jmp short loc_59034 loc_58FF3: xor esi, esi dec edx jnz short loc_59019 mov rdi, 0FFFFFFFFFFFFFFFFh loc_59000: movsxd rdx, [rbp+var_A0] mov r11, rdx neg r11 cmp rax, r11 jg short loc_5902E imul rdi, rdx add rsi, rdi loc_59019: test r10b, r10b jz short loc_59051 neg rsi seto al cmp rsi, rcx setnle cl or cl, al jz short loc_59056 loc_5902E: mov r14d, 22h ; '"' loc_59034: xor ebx, ebx loc_59036: call ___errno_location mov [rax], r14d mov rax, rbx add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_59051: cmp rsi, r9 jl short loc_5902E loc_59056: mov [r8], rsi xor r14d, r14d jmp short loc_59036
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // rdx long long v8; // r10 long long v9; // rax char v10; // r10 long long v11; // rbx unsigned __int8 v12; // r14 long long v13; // r11 unsigned long long i; // rdx int v15; // r15d long long v16; // r14 long long v17; // rsi long long v18; // r15 int v19; // r14d _DWORD v21[40]; // [rsp+0h] [rbp-A0h] *a5 = 0LL; v6 = -a3; if ( a3 > 0 ) v6 = a3; v7 = -a4; if ( a4 <= 0 ) v7 = a4; do v8 = *(unsigned __int8 *)a1++; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 ); v9 = -v6; if ( v7 < v9 ) v9 = v7; if ( (_DWORD)v8 != 43 ) { if ( (_DWORD)v8 == 45 ) { v10 = 0; goto LABEL_13; } --a1; } v10 = 1; LABEL_13: v11 = a1 - 1; do v12 = *(_BYTE *)++v11; while ( v12 == 48 ); LODWORD(v13) = 0; for ( i = 0LL; ; ++i ) { LOBYTE(v15) = v12 - 48; if ( (unsigned __int8)(v12 - 48) > 9u ) { if ( (unsigned __int8)(v12 - 65) > 0x19u ) { v15 = 127; if ( (unsigned __int8)(v12 - 97) <= 0x19u ) v15 = v12 - 87; } else { v15 = v12 - 55; } } else { v15 = (unsigned __int8)v15; } v21[i] = v15; if ( v15 >= a2 || i > 0x13 ) break; v12 = *(_BYTE *)++v11; LODWORD(v13) = v13 + 1; } if ( v11 != a1 ) { if ( i >= 2 ) { v16 = a2; a1 = -1LL; v17 = 0LL; while ( 1 ) { v13 = (unsigned int)(v13 - 1); v18 = (int)v21[v13]; if ( v9 > -v18 ) goto LABEL_38; v9 = (v18 + v9) / v16; v17 += a1 * v18; a1 *= v16; if ( (int)v13 <= 1 ) goto LABEL_34; } } v17 = 0LL; if ( (_DWORD)i == 1 ) { a1 = -1LL; LABEL_34: if ( v9 > -(long long)v21[0] ) goto LABEL_38; a1 *= v21[0]; v17 += a1; } if ( v10 ) { v17 = -v17; if ( __OFSUB__(v17, 1LL) || v17 > a4 ) { LABEL_38: v19 = 34; goto LABEL_39; } } else if ( v17 < a3 ) { goto LABEL_38; } *a5 = v17; v19 = 0; goto LABEL_40; } v19 = 33; LABEL_39: v11 = 0LL; LABEL_40: *(_DWORD *)__errno_location(a1) = v19; return v11; }
str2int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R9,RDX MOV qword ptr [R8],0x0 MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RDX,RCX NEG RDX CMOVNS RDX,RCX LEA R10,[0x413760] MOV R11,qword ptr [R10 + 0x40] LAB_00158eff: MOVZX R10D,byte ptr [RDI] INC RDI TEST byte ptr [R11 + R10*0x1 + 0x1],0x8 JNZ 0x00158eff NEG RAX CMP RDX,RAX CMOVL RAX,RDX CMP R10D,0x2b JZ 0x00158f2c CMP R10D,0x2d JNZ 0x00158f29 XOR R10D,R10D JMP 0x00158f2f LAB_00158f29: DEC RDI LAB_00158f2c: MOV R10B,0x1 LAB_00158f2f: LEA RBX,[RDI + -0x1] LAB_00158f33: MOV R14B,byte ptr [RBX + 0x1] INC RBX CMP R14B,0x30 JZ 0x00158f33 XOR R11D,R11D XOR EDX,EDX LAB_00158f45: LEA R15D,[R14 + -0x30] CMP R15B,0x9 JA 0x00158f55 MOVZX R15D,R15B JMP 0x00158f81 LAB_00158f55: LEA R15D,[R14 + -0x41] CMP R15B,0x19 JA 0x00158f69 MOVZX R15D,R14B ADD R15D,-0x37 JMP 0x00158f81 LAB_00158f69: LEA R12D,[R14 + -0x61] MOV R15D,0x7f CMP R12B,0x19 JA 0x00158f81 MOVZX R15D,R14B ADD R15D,-0x57 LAB_00158f81: MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D CMP R15D,ESI JGE 0x00158fa3 CMP RDX,0x13 JA 0x00158fa3 INC RDX MOV R14B,byte ptr [RBX + 0x1] INC RBX INC R11D JMP 0x00158f45 LAB_00158fa3: CMP RBX,RDI JZ 0x00158feb CMP RDX,0x2 JC 0x00158ff3 MOVSXD R14,ESI MOV RDI,-0x1 XOR ESI,ESI LAB_00158fba: DEC R11D MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0] MOV RDX,R15 NEG RDX CMP RAX,RDX JG 0x0015902e ADD RAX,R15 CQO IDIV R14 IMUL R15,RDI ADD RSI,R15 IMUL RDI,R14 CMP R11D,0x1 JG 0x00158fba JMP 0x00159000 LAB_00158feb: MOV R14D,0x21 JMP 0x00159034 LAB_00158ff3: XOR ESI,ESI DEC EDX JNZ 0x00159019 MOV RDI,-0x1 LAB_00159000: MOVSXD RDX,dword ptr [RBP + -0xa0] MOV R11,RDX NEG R11 CMP RAX,R11 JG 0x0015902e IMUL RDI,RDX ADD RSI,RDI LAB_00159019: TEST R10B,R10B JZ 0x00159051 NEG RSI SETO AL CMP RSI,RCX SETG CL OR CL,AL JZ 0x00159056 LAB_0015902e: MOV R14D,0x22 LAB_00159034: XOR EBX,EBX LAB_00159036: CALL 0x00124050 MOV dword ptr [RAX],R14D MOV RAX,RBX ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00159051: CMP RSI,R9 JL 0x0015902e LAB_00159056: MOV qword ptr [R8],RSI XOR R14D,R14D JMP 0x00159036
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { long lVar1; int *piVar2; ulong uVar3; byte *pbVar4; long lVar5; byte *pbVar6; long lVar7; ulong uVar8; byte bVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; uint local_a8 [32]; *param_5 = 0; lVar5 = -param_3; if (0 < param_3) { lVar5 = param_3; } lVar7 = -param_4; if (param_4 < 1) { lVar7 = param_4; } do { pbVar4 = param_1; bVar9 = *pbVar4; param_1 = pbVar4 + 1; } while ((PTR_ctype_latin1_004137a0[(ulong)bVar9 + 1] & 8) != 0); lVar1 = -lVar5; if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) { lVar1 = lVar7; } pbVar6 = param_1; if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) { bVar13 = true; } else { bVar13 = false; pbVar6 = param_1; } pbVar4 = pbVar6 + -1; do { bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; } while (bVar9 == 0x30); uVar8 = 0; uVar3 = 0; while( true ) { if ((byte)(bVar9 - 0x30) < 10) { uVar11 = (uint)(byte)(bVar9 - 0x30); } else if ((byte)(bVar9 + 0xbf) < 0x1a) { uVar11 = bVar9 - 0x37; } else { uVar11 = 0x7f; if ((byte)(bVar9 + 0x9f) < 0x1a) { uVar11 = bVar9 - 0x57; } } local_a8[uVar3] = uVar11; if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break; uVar3 = uVar3 + 1; bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; uVar8 = (ulong)((int)uVar8 + 1); } if (pbVar4 == pbVar6) { iVar10 = 0x21; } else { if (uVar3 < 2) { lVar5 = 0; if ((int)uVar3 == 1) { lVar7 = -1; goto LAB_00159000; } LAB_00159019: if (bVar13) { lVar7 = -lVar5; bVar13 = -param_4 == lVar5; lVar5 = lVar7; if (bVar13 || lVar7 < param_4) { LAB_00159056: *param_5 = lVar5; iVar10 = 0; goto LAB_00159036; } } else if (param_3 <= lVar5) goto LAB_00159056; } else { lVar7 = -1; lVar5 = 0; do { uVar11 = (int)uVar8 - 1; uVar8 = (ulong)uVar11; lVar12 = (long)(int)local_a8[uVar8]; if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_0015902e; lVar1 = (lVar1 + lVar12) / (long)param_2; lVar5 = lVar5 + lVar12 * lVar7; lVar7 = lVar7 * param_2; } while (1 < (int)uVar11); LAB_00159000: lVar12 = (long)(int)local_a8[0]; if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) { lVar5 = lVar5 + lVar7 * lVar12; goto LAB_00159019; } } LAB_0015902e: iVar10 = 0x22; } pbVar4 = (byte *)0x0; LAB_00159036: piVar2 = __errno_location(); *piVar2 = iVar10; return pbVar4; }
39,948
json_as_bytes
corpus-core[P]colibri-stateless/src/util/json.c
bytes_t json_as_bytes(json_t val, buffer_t* buffer) { if (val.type == JSON_TYPE_NUMBER) { buffer->data.len = 8; buffer_grow(buffer, 8); uint64_to_be(buffer->data.data, json_as_uint64(val)); return buffer->data; } if (val.type != JSON_TYPE_STRING) return NULL_BYTES; buffer_grow(buffer, val.len / 2); buffer->data.len = val.len; int len = hex_to_bytes(val.start + 1, val.len - 2, buffer->data); if (len == -1) return NULL_BYTES; buffer->data.len = (uint32_t) len; return buffer->data; }
O0
c
json_as_bytes: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq %rdi, -0x18(%rbp) cmpl $0x2, 0x10(%rax) jne 0x20ae4 movq -0x18(%rbp), %rax movl $0x8, (%rax) movq -0x18(%rbp), %rdi movl $0x8, %esi callq 0x18af0 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx movq %rcx, -0x30(%rbp) movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x20920 movq -0x30(%rbp), %rdi movq %rax, %rsi callq 0x188f0 movq -0x18(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x10(%rbp) movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x20b79 movq -0x28(%rbp), %rax cmpl $0x1, 0x10(%rax) je 0x20aff movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x20b79 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rdi movq 0x8(%rax), %rsi shrq %rsi callq 0x18af0 movq -0x28(%rbp), %rax movq 0x8(%rax), %rcx movl %ecx, %edx movq -0x18(%rbp), %rcx movl %edx, (%rcx) movq (%rax), %rdi addq $0x1, %rdi movq 0x8(%rax), %rax subq $0x2, %rax movl %eax, %esi movq -0x18(%rbp), %rax movl (%rax), %edx movq 0x8(%rax), %rcx callq 0x18ee0 movl %eax, -0x1c(%rbp) cmpl $-0x1, -0x1c(%rbp) jne 0x20b5d movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x20b79 movl -0x1c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x10(%rbp) movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
json_as_bytes: push rbp mov rbp, rsp sub rsp, 50h lea rax, [rbp+arg_0] mov [rbp+var_28], rax mov [rbp+var_18], rdi cmp dword ptr [rax+10h], 2 jnz short loc_20AE4 mov rax, [rbp+var_18] mov dword ptr [rax], 8 mov rdi, [rbp+var_18] mov esi, 8 call buffer_grow mov rax, [rbp+var_28] mov rcx, [rbp+var_18] mov rcx, [rcx+8] mov [rbp+var_30], rcx mov rcx, [rax] mov [rsp+50h+var_50], rcx mov rcx, [rax+8] mov [rsp+50h+var_48], rcx mov rax, [rax+10h] mov [rsp+50h+var_40], rax call json_as_uint64 mov rdi, [rbp+var_30] mov rsi, rax call uint64_to_be mov rax, [rbp+var_18] mov rcx, [rax] mov [rbp+var_10], rcx mov rax, [rax+8] mov [rbp+var_8], rax jmp loc_20B79 loc_20AE4: mov rax, [rbp+var_28] cmp dword ptr [rax+10h], 1 jz short loc_20AFF mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp short loc_20B79 loc_20AFF: mov rax, [rbp+var_28] mov rdi, [rbp+var_18] mov rsi, [rax+8] shr rsi, 1 call buffer_grow mov rax, [rbp+var_28] mov rcx, [rax+8] mov edx, ecx mov rcx, [rbp+var_18] mov [rcx], edx mov rdi, [rax] add rdi, 1 mov rax, [rax+8] sub rax, 2 mov esi, eax mov rax, [rbp+var_18] mov edx, [rax] mov rcx, [rax+8] call hex_to_bytes mov [rbp+var_1C], eax cmp [rbp+var_1C], 0FFFFFFFFh jnz short loc_20B5D mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp short loc_20B79 loc_20B5D: mov ecx, [rbp+var_1C] mov rax, [rbp+var_18] mov [rax], ecx mov rax, [rbp+var_18] mov rcx, [rax] mov [rbp+var_10], rcx mov rax, [rax+8] mov [rbp+var_8], rax loc_20B79: mov eax, dword ptr [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 50h pop rbp retn
long long json_as_bytes( unsigned long long a1, _DWORD a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, unsigned long long a8, int a9) { int v9; // edx int v10; // r8d int v11; // r9d unsigned long long v12; // rax _BYTE *v14; // [rsp+20h] [rbp-30h] int v15; // [rsp+34h] [rbp-1Ch] long long v16; // [rsp+40h] [rbp-10h] if ( a9 == 2 ) { *(_DWORD *)a1 = 8; buffer_grow(a1, 8uLL); v14 = *(_BYTE **)(a1 + 8); v12 = json_as_uint64(a1, 8, v9, a8, v10, v11, a7, a8, 2); uint64_to_be(v14, v12); return (unsigned int)*(_QWORD *)a1; } else if ( a9 == 1 ) { buffer_grow(a1, a8 >> 1); *(_DWORD *)a1 = a8; v15 = hex_to_bytes((_BYTE *)(a7 + 1), (int)a8 - 2, *(_DWORD *)a1, *(_BYTE **)(a1 + 8)); if ( v15 == -1 ) { LODWORD(v16) = 0; } else { *(_DWORD *)a1 = v15; return (unsigned int)*(_QWORD *)a1; } } else { LODWORD(v16) = 0; } return (unsigned int)v16; }
json_as_bytes: PUSH RBP MOV RBP,RSP SUB RSP,0x50 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x18],RDI CMP dword ptr [RAX + 0x10],0x2 JNZ 0x00120ae4 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x8 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x8 CALL 0x00118af0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RBP + -0x30],RCX 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 0x00120920 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,RAX CALL 0x001188f0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x00120b79 LAB_00120ae4: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x10],0x1 JZ 0x00120aff MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00120b79 LAB_00120aff: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x8] SHR RSI,0x1 CALL 0x00118af0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x8] MOV EDX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV dword ptr [RCX],EDX MOV RDI,qword ptr [RAX] ADD RDI,0x1 MOV RAX,qword ptr [RAX + 0x8] SUB RAX,0x2 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] CALL 0x00118ee0 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],-0x1 JNZ 0x00120b5d MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00120b79 LAB_00120b5d: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX LAB_00120b79: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ int1 [16] json_as_bytes(ulong *param_1) { ulong uVar1; int iVar2; int8 uVar3; int1 auVar4 [16]; long in_stack_00000008; ulong in_stack_00000010; int in_stack_00000018; ulong local_18; ulong local_10; if (in_stack_00000018 == 2) { *(int *)param_1 = 8; buffer_grow(param_1,8); uVar1 = param_1[1]; uVar3 = json_as_uint64(); uint64_to_be(uVar1,uVar3); local_18 = *param_1; local_10 = param_1[1]; } else if (in_stack_00000018 == 1) { buffer_grow(param_1,in_stack_00000010 >> 1); *(int *)param_1 = (int)in_stack_00000010; iVar2 = hex_to_bytes(in_stack_00000008 + 1,(int)in_stack_00000010 + -2,(int)*param_1,param_1[1]) ; if (iVar2 == -1) { local_18 = 0; local_10 = 0; } else { *(int *)param_1 = iVar2; local_18 = *param_1; local_10 = param_1[1]; } } else { local_18 = 0; local_10 = 0; } auVar4._0_8_ = local_18 & 0xffffffff; auVar4._8_8_ = local_10; return auVar4; }
39,949
json_as_bytes
corpus-core[P]colibri-stateless/src/util/json.c
bytes_t json_as_bytes(json_t val, buffer_t* buffer) { if (val.type == JSON_TYPE_NUMBER) { buffer->data.len = 8; buffer_grow(buffer, 8); uint64_to_be(buffer->data.data, json_as_uint64(val)); return buffer->data; } if (val.type != JSON_TYPE_STRING) return NULL_BYTES; buffer_grow(buffer, val.len / 2); buffer->data.len = val.len; int len = hex_to_bytes(val.start + 1, val.len - 2, buffer->data); if (len == -1) return NULL_BYTES; buffer->data.len = (uint32_t) len; return buffer->data; }
O1
c
json_as_bytes: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x40(%rsp), %r15 movl 0x10(%r15), %eax cmpl $0x1, %eax je 0x178bc cmpl $0x2, %eax jne 0x178fb movl $0x8, (%rbx) movl $0x8, %esi movq %rbx, %rdi callq 0x128e1 leaq 0x8(%rbx), %r12 movq 0x8(%rbx), %r14 movq 0x10(%r15), %rax movq %rax, 0x10(%rsp) movups (%r15), %xmm0 movups %xmm0, (%rsp) callq 0x17790 movq %r14, %rdi movq %rax, %rsi callq 0x128d3 movl (%rbx), %eax jmp 0x178f5 movq 0x8(%r15), %r14 movq %r14, %rsi shrq %rsi movq %rbx, %rdi callq 0x128e1 movl %r14d, (%rbx) movq (%r15), %rdi incq %rdi leal -0x2(%r14), %esi movq 0x8(%rbx), %rcx movl %r14d, %edx callq 0x12b02 cmpl $-0x1, %eax je 0x178fb movl %eax, (%rbx) addq $0x8, %rbx movq %rbx, %r12 movq (%r12), %rdx jmp 0x178ff xorl %eax, %eax xorl %edx, %edx addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
json_as_bytes: push r15 push r14 push r12 push rbx sub rsp, 18h mov rbx, rdi lea r15, [rsp+38h+arg_0] mov eax, [r15+10h] cmp eax, 1 jz short loc_178BC cmp eax, 2 jnz short loc_178FB mov dword ptr [rbx], 8 mov esi, 8 mov rdi, rbx call buffer_grow lea r12, [rbx+8] mov r14, [rbx+8] mov rax, [r15+10h] mov [rsp+38h+var_28], rax movups xmm0, xmmword ptr [r15] movups [rsp+38h+var_38], xmm0 call json_as_uint64 mov rdi, r14 mov rsi, rax call uint64_to_be mov eax, [rbx] jmp short loc_178F5 loc_178BC: mov r14, [r15+8] mov rsi, r14 shr rsi, 1 mov rdi, rbx call buffer_grow mov [rbx], r14d mov rdi, [r15] inc rdi lea esi, [r14-2] mov rcx, [rbx+8] mov edx, r14d call hex_to_bytes cmp eax, 0FFFFFFFFh jz short loc_178FB mov [rbx], eax add rbx, 8 mov r12, rbx loc_178F5: mov rdx, [r12] jmp short loc_178FF loc_178FB: xor eax, eax xor edx, edx loc_178FF: add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long json_as_bytes( char **a1, _DWORD a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, unsigned long long a8, int a9) { char *v9; // r14 int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d unsigned long long v14; // rax long long result; // rax if ( a9 != 1 ) { if ( a9 == 2 ) { *(_DWORD *)a1 = 8; buffer_grow((long long)a1, 8uLL); v9 = a1[1]; v14 = json_as_uint64((_DWORD)a1, 8, v10, v11, v12, v13, a7, a8, 2); uint64_to_be(v9, v14); return *(unsigned int *)a1; } return 0LL; } buffer_grow((long long)a1, a8 >> 1); *(_DWORD *)a1 = a8; result = hex_to_bytes((_BYTE *)(a7 + 1), (char *)(unsigned int)(a8 - 2), a8, a1[1]); if ( (_DWORD)result == -1 ) return 0LL; *(_DWORD *)a1 = result; return result; }
json_as_bytes: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R15,[RSP + 0x40] MOV EAX,dword ptr [R15 + 0x10] CMP EAX,0x1 JZ 0x001178bc CMP EAX,0x2 JNZ 0x001178fb MOV dword ptr [RBX],0x8 MOV ESI,0x8 MOV RDI,RBX CALL 0x001128e1 LEA R12,[RBX + 0x8] MOV R14,qword ptr [RBX + 0x8] MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00117790 MOV RDI,R14 MOV RSI,RAX CALL 0x001128d3 MOV EAX,dword ptr [RBX] JMP 0x001178f5 LAB_001178bc: MOV R14,qword ptr [R15 + 0x8] MOV RSI,R14 SHR RSI,0x1 MOV RDI,RBX CALL 0x001128e1 MOV dword ptr [RBX],R14D MOV RDI,qword ptr [R15] INC RDI LEA ESI,[R14 + -0x2] MOV RCX,qword ptr [RBX + 0x8] MOV EDX,R14D CALL 0x00112b02 CMP EAX,-0x1 JZ 0x001178fb MOV dword ptr [RBX],EAX ADD RBX,0x8 MOV R12,RBX LAB_001178f5: MOV RDX,qword ptr [R12] JMP 0x001178ff LAB_001178fb: XOR EAX,EAX XOR EDX,EDX LAB_001178ff: ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] json_as_bytes(uint *param_1) { int8 uVar1; ulong uVar2; int8 uVar3; int1 auVar4 [16]; long in_stack_00000008; uint uStack0000000000000010; int in_stack_00000018; if (in_stack_00000018 == 1) { buffer_grow(param_1,_uStack0000000000000010 >> 1); *param_1 = uStack0000000000000010; uVar2 = hex_to_bytes(in_stack_00000008 + 1,uStack0000000000000010 - 2,uStack0000000000000010, *(int8 *)(param_1 + 2)); if ((uint)uVar2 == 0xffffffff) goto LAB_001178fb; *param_1 = (uint)uVar2; } else { if (in_stack_00000018 != 2) { LAB_001178fb: uVar2 = 0; uVar3 = 0; goto LAB_001178ff; } *param_1 = 8; buffer_grow(param_1,8); uVar3 = *(int8 *)(param_1 + 2); uVar1 = json_as_uint64(); uint64_to_be(uVar3,uVar1); uVar2 = (ulong)*param_1; } uVar3 = *(int8 *)(param_1 + 2); LAB_001178ff: auVar4._8_8_ = uVar3; auVar4._0_8_ = uVar2; return auVar4; }
39,950
json_as_bytes
corpus-core[P]colibri-stateless/src/util/json.c
bytes_t json_as_bytes(json_t val, buffer_t* buffer) { if (val.type == JSON_TYPE_NUMBER) { buffer->data.len = 8; buffer_grow(buffer, 8); uint64_to_be(buffer->data.data, json_as_uint64(val)); return buffer->data; } if (val.type != JSON_TYPE_STRING) return NULL_BYTES; buffer_grow(buffer, val.len / 2); buffer->data.len = val.len; int len = hex_to_bytes(val.start + 1, val.len - 2, buffer->data); if (len == -1) return NULL_BYTES; buffer->data.len = (uint32_t) len; return buffer->data; }
O3
c
json_as_bytes: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x40(%rsp), %r15 movl 0x10(%r15), %eax cmpl $0x1, %eax je 0x17159 cmpl $0x2, %eax jne 0x17198 movl $0x8, (%rbx) movl $0x8, %esi movq %rbx, %rdi callq 0x125e5 leaq 0x8(%rbx), %r12 movq 0x8(%rbx), %r14 movq 0x10(%r15), %rax movq %rax, 0x10(%rsp) movups (%r15), %xmm0 movups %xmm0, (%rsp) callq 0x1702d movq %r14, %rdi movq %rax, %rsi callq 0x125d7 movl (%rbx), %eax jmp 0x17192 movq 0x8(%r15), %r14 movq %r14, %rsi shrq %rsi movq %rbx, %rdi callq 0x125e5 movl %r14d, (%rbx) movq (%r15), %rdi incq %rdi leal -0x2(%r14), %esi movq 0x8(%rbx), %rcx movl %r14d, %edx callq 0x12806 cmpl $-0x1, %eax je 0x17198 movl %eax, (%rbx) addq $0x8, %rbx movq %rbx, %r12 movq (%r12), %rdx jmp 0x1719c xorl %eax, %eax xorl %edx, %edx addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
json_as_bytes: push r15 push r14 push r12 push rbx sub rsp, 18h mov rbx, rdi lea r15, [rsp+38h+arg_0] mov eax, [r15+10h] cmp eax, 1 jz short loc_17159 cmp eax, 2 jnz short loc_17198 mov dword ptr [rbx], 8 mov esi, 8 mov rdi, rbx call buffer_grow lea r12, [rbx+8] mov r14, [rbx+8] mov rax, [r15+10h] mov [rsp+38h+var_28], rax movups xmm0, xmmword ptr [r15] movups [rsp+38h+var_38], xmm0 call json_as_uint64 mov rdi, r14 mov rsi, rax call uint64_to_be mov eax, [rbx] jmp short loc_17192 loc_17159: mov r14, [r15+8] mov rsi, r14 shr rsi, 1 mov rdi, rbx call buffer_grow mov [rbx], r14d mov rdi, [r15] inc rdi lea esi, [r14-2] mov rcx, [rbx+8] mov edx, r14d call hex_to_bytes cmp eax, 0FFFFFFFFh jz short loc_17198 mov [rbx], eax add rbx, 8 mov r12, rbx loc_17192: mov rdx, [r12] jmp short loc_1719C loc_17198: xor eax, eax xor edx, edx loc_1719C: add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long json_as_bytes( char **a1, _DWORD a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, long long a7, unsigned long long a8, int a9) { char *v9; // r14 int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d unsigned long long v14; // rax long long result; // rax if ( a9 != 1 ) { if ( a9 == 2 ) { *(_DWORD *)a1 = 8; buffer_grow((long long)a1, 8uLL); v9 = a1[1]; v14 = json_as_uint64((_DWORD)a1, 8, v10, v11, v12, v13, a7, a8, 2); uint64_to_be(v9, v14); return *(unsigned int *)a1; } return 0LL; } buffer_grow((long long)a1, a8 >> 1); *(_DWORD *)a1 = a8; result = hex_to_bytes((_BYTE *)(a7 + 1), (unsigned int)(a8 - 2), a8, a1[1]); if ( (_DWORD)result == -1 ) return 0LL; *(_DWORD *)a1 = result; return result; }
json_as_bytes: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R15,[RSP + 0x40] MOV EAX,dword ptr [R15 + 0x10] CMP EAX,0x1 JZ 0x00117159 CMP EAX,0x2 JNZ 0x00117198 MOV dword ptr [RBX],0x8 MOV ESI,0x8 MOV RDI,RBX CALL 0x001125e5 LEA R12,[RBX + 0x8] MOV R14,qword ptr [RBX + 0x8] MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x0011702d MOV RDI,R14 MOV RSI,RAX CALL 0x001125d7 MOV EAX,dword ptr [RBX] JMP 0x00117192 LAB_00117159: MOV R14,qword ptr [R15 + 0x8] MOV RSI,R14 SHR RSI,0x1 MOV RDI,RBX CALL 0x001125e5 MOV dword ptr [RBX],R14D MOV RDI,qword ptr [R15] INC RDI LEA ESI,[R14 + -0x2] MOV RCX,qword ptr [RBX + 0x8] MOV EDX,R14D CALL 0x00112806 CMP EAX,-0x1 JZ 0x00117198 MOV dword ptr [RBX],EAX ADD RBX,0x8 MOV R12,RBX LAB_00117192: MOV RDX,qword ptr [R12] JMP 0x0011719c LAB_00117198: XOR EAX,EAX XOR EDX,EDX LAB_0011719c: ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] json_as_bytes(uint *param_1) { int8 uVar1; ulong uVar2; int8 uVar3; int1 auVar4 [16]; long in_stack_00000008; uint uStack0000000000000010; int in_stack_00000018; if (in_stack_00000018 == 1) { buffer_grow(param_1,_uStack0000000000000010 >> 1); *param_1 = uStack0000000000000010; uVar2 = hex_to_bytes(in_stack_00000008 + 1,uStack0000000000000010 - 2,uStack0000000000000010, *(int8 *)(param_1 + 2)); if ((uint)uVar2 == 0xffffffff) goto LAB_00117198; *param_1 = (uint)uVar2; } else { if (in_stack_00000018 != 2) { LAB_00117198: uVar2 = 0; uVar3 = 0; goto LAB_0011719c; } *param_1 = 8; buffer_grow(param_1,8); uVar3 = *(int8 *)(param_1 + 2); uVar1 = json_as_uint64(); uint64_to_be(uVar3,uVar1); uVar2 = (ulong)*param_1; } uVar3 = *(int8 *)(param_1 + 2); LAB_0011719c: auVar4._8_8_ = uVar3; auVar4._0_8_ = uVar2; return auVar4; }
39,951
llama_data_read::read_kv_cache(llama_context*, int)
monkey531[P]llama/src/llama-context.cpp
void read_kv_cache(struct llama_context * ctx, llama_seq_id seq_id = -1) { uint32_t cell_count; read_to(&cell_count, sizeof(cell_count)); bool res = read_kv_cache_meta(ctx, cell_count, seq_id) && read_kv_cache_data(ctx, cell_count); if (!res) { if (seq_id == -1) { llama_kv_cache_clear(ctx); } else { llama_kv_cache_seq_rm(ctx, seq_id, -1, -1); } throw std::runtime_error("failed to restore kv cache"); } }
O1
cpp
llama_data_read::read_kv_cache(llama_context*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %rax leaq 0x4(%rsp), %r15 movl $0x4, %edx movq %r15, %rsi callq *0x8(%rax) movl (%r15), %edx movq %r14, %rdi movq %rbx, %rsi movl %ebp, %ecx callq 0x6bda0 testb %al, %al je 0xa3144 movl 0x4(%rsp), %edx movq %r14, %rdi movq %rbx, %rsi callq 0x67050 testb %al, %al je 0xa3144 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi cmpl $-0x1, %ebp jne 0xa3153 callq 0x6cc90 jmp 0xa3164 movl %ebp, %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x690e0 movl $0x10, %edi callq 0x66ce0 movq %rax, %rbx leaq 0x75b23(%rip), %rsi # 0x118c9b movq %rax, %rdi callq 0x66600 movq 0xbde69(%rip), %rsi # 0x160ff0 movq 0xbdb62(%rip), %rdx # 0x160cf0 movq %rbx, %rdi callq 0x6c2d0 movq %rax, %r14 movq %rbx, %rdi callq 0x67dc0 movq %r14, %rdi callq 0x6c640 nop
_ZN15llama_data_read13read_kv_cacheEP13llama_contexti: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov rbx, rsi mov r14, rdi mov rax, [rdi] lea r15, [rsp+28h+var_24] mov edx, 4 mov rsi, r15 call qword ptr [rax+8] mov edx, [r15]; unsigned int mov rdi, r14; this mov rsi, rbx; llama_context * mov ecx, ebp; int call __ZN15llama_data_read18read_kv_cache_metaEP13llama_contextji; llama_data_read::read_kv_cache_meta(llama_context *,uint,int) test al, al jz short loc_A3144 mov edx, [rsp+28h+var_24]; unsigned int mov rdi, r14; this mov rsi, rbx; llama_context * call __ZN15llama_data_read18read_kv_cache_dataEP13llama_contextj; llama_data_read::read_kv_cache_data(llama_context *,uint) test al, al jz short loc_A3144 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_A3144: mov rdi, rbx cmp ebp, 0FFFFFFFFh jnz short loc_A3153 call _llama_kv_cache_clear jmp short loc_A3164 loc_A3153: mov esi, ebp mov edx, 0FFFFFFFFh mov ecx, 0FFFFFFFFh call _llama_kv_cache_seq_rm loc_A3164: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToRestor; "failed to restore kv cache" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
long long llama_data_read::read_kv_cache(llama_data_read *this, llama_context *a2, int a3) { long long v3; // rax long long result; // rax std::runtime_error *exception; // rbx unsigned int v7[9]; // [rsp+0h] [rbp-24h] BYREF v7[0] = HIDWORD(v3); (*(void ( **)(llama_data_read *, unsigned int *, long long))(*(_QWORD *)this + 8LL))(this, v7, 4LL); if ( !(unsigned __int8)llama_data_read::read_kv_cache_meta(this, a2, v7[0], a3) || (result = llama_data_read::read_kv_cache_data(this, a2, v7[0]), !(_BYTE)result) ) { if ( a3 == -1 ) llama_kv_cache_clear((long long)a2); else llama_kv_cache_seq_rm((long long)a2); exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "failed to restore kv cache"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
read_kv_cache: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] LEA R15,[RSP + 0x4] MOV EDX,0x4 MOV RSI,R15 CALL qword ptr [RAX + 0x8] MOV EDX,dword ptr [R15] MOV RDI,R14 MOV RSI,RBX MOV ECX,EBP CALL 0x0016bda0 TEST AL,AL JZ 0x001a3144 MOV EDX,dword ptr [RSP + 0x4] MOV RDI,R14 MOV RSI,RBX CALL 0x00167050 TEST AL,AL JZ 0x001a3144 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001a3144: MOV RDI,RBX CMP EBP,-0x1 JNZ 0x001a3153 CALL 0x0016cc90 JMP 0x001a3164 LAB_001a3153: MOV ESI,EBP MOV EDX,0xffffffff MOV ECX,0xffffffff CALL 0x001690e0 LAB_001a3164: MOV EDI,0x10 CALL 0x00166ce0 MOV RBX,RAX LAB_001a3171: LEA RSI,[0x218c9b] MOV RDI,RAX CALL 0x00166600 LAB_001a3180: MOV RSI,qword ptr [0x00260ff0] MOV RDX,qword ptr [0x00260cf0] MOV RDI,RBX CALL 0x0016c2d0
/* llama_data_read::read_kv_cache(llama_context*, int) */ void __thiscall llama_data_read::read_kv_cache(llama_data_read *this,llama_context *param_1,int param_2) { char cVar1; int8 in_RAX; runtime_error *this_00; uint local_24; local_24 = (uint)((ulong)in_RAX >> 0x20); (**(code **)(*(long *)this + 8))(this,&local_24,4); cVar1 = read_kv_cache_meta(this,param_1,local_24,param_2); if (cVar1 != '\0') { cVar1 = read_kv_cache_data(this,param_1,local_24); if (cVar1 != '\0') { return; } } if (param_2 == -1) { llama_kv_cache_clear(); } else { llama_kv_cache_seq_rm(param_1,param_2,0xffffffff,0xffffffff); } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a3171 to 001a317f has its CatchHandler @ 001a3196 */ std::runtime_error::runtime_error(this_00,"failed to restore kv cache"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00260ff0,PTR__runtime_error_00260cf0); }
39,952
llama_data_read::read_kv_cache(llama_context*, int)
monkey531[P]llama/src/llama-context.cpp
void read_kv_cache(struct llama_context * ctx, llama_seq_id seq_id = -1) { uint32_t cell_count; read_to(&cell_count, sizeof(cell_count)); bool res = read_kv_cache_meta(ctx, cell_count, seq_id) && read_kv_cache_data(ctx, cell_count); if (!res) { if (seq_id == -1) { llama_kv_cache_clear(ctx); } else { llama_kv_cache_seq_rm(ctx, seq_id, -1, -1); } throw std::runtime_error("failed to restore kv cache"); } }
O3
cpp
llama_data_read::read_kv_cache(llama_context*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %rax leaq 0x4(%rsp), %r15 movl $0x4, %edx movq %r15, %rsi callq *0x8(%rax) movl (%r15), %edx movq %r14, %rdi movq %rbx, %rsi movl %ebp, %ecx callq 0x6ad30 testb %al, %al je 0xa1350 movl 0x4(%rsp), %edx movq %r14, %rdi movq %rbx, %rsi callq 0x66000 testb %al, %al je 0xa1350 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi cmpl $-0x1, %ebp jne 0xa135f callq 0x6bc10 jmp 0xa1370 movl %ebp, %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x68060 movl $0x10, %edi callq 0x65cb0 movq %rax, %rbx leaq 0x73917(%rip), %rsi # 0x114c9b movq %rax, %rdi callq 0x655d0 movq 0xbbc5d(%rip), %rsi # 0x15cff0 movq 0xbb956(%rip), %rdx # 0x15ccf0 movq %rbx, %rdi callq 0x6b270 movq %rax, %r14 movq %rbx, %rdi callq 0x66d40 movq %r14, %rdi callq 0x6b5d0 nop
_ZN15llama_data_read13read_kv_cacheEP13llama_contexti: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov rbx, rsi mov r14, rdi mov rax, [rdi] lea r15, [rsp+28h+var_24] mov edx, 4 mov rsi, r15 call qword ptr [rax+8] mov edx, [r15]; unsigned int mov rdi, r14; this mov rsi, rbx; llama_context * mov ecx, ebp; int call __ZN15llama_data_read18read_kv_cache_metaEP13llama_contextji; llama_data_read::read_kv_cache_meta(llama_context *,uint,int) test al, al jz short loc_A1350 mov edx, [rsp+28h+var_24]; unsigned int mov rdi, r14; this mov rsi, rbx; llama_context * call __ZN15llama_data_read18read_kv_cache_dataEP13llama_contextj; llama_data_read::read_kv_cache_data(llama_context *,uint) test al, al jz short loc_A1350 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_A1350: mov rdi, rbx cmp ebp, 0FFFFFFFFh jnz short loc_A135F call _llama_kv_cache_clear jmp short loc_A1370 loc_A135F: mov esi, ebp mov edx, 0FFFFFFFFh mov ecx, 0FFFFFFFFh call _llama_kv_cache_seq_rm loc_A1370: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToRestor; "failed to restore kv cache" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
long long llama_data_read::read_kv_cache(llama_data_read *this, llama_context *a2, int a3) { long long v3; // rax long long result; // rax std::runtime_error *exception; // rbx unsigned int v7[9]; // [rsp+0h] [rbp-24h] BYREF v7[0] = HIDWORD(v3); (*(void ( **)(llama_data_read *, unsigned int *, long long))(*(_QWORD *)this + 8LL))(this, v7, 4LL); if ( !(unsigned __int8)llama_data_read::read_kv_cache_meta(this, a2, v7[0], a3) || (result = llama_data_read::read_kv_cache_data(this, a2, v7[0]), !(_BYTE)result) ) { if ( a3 == -1 ) llama_kv_cache_clear((long long)a2); else llama_kv_cache_seq_rm((long long)a2); exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "failed to restore kv cache"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
read_kv_cache: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] LEA R15,[RSP + 0x4] MOV EDX,0x4 MOV RSI,R15 CALL qword ptr [RAX + 0x8] MOV EDX,dword ptr [R15] MOV RDI,R14 MOV RSI,RBX MOV ECX,EBP CALL 0x0016ad30 TEST AL,AL JZ 0x001a1350 MOV EDX,dword ptr [RSP + 0x4] MOV RDI,R14 MOV RSI,RBX CALL 0x00166000 TEST AL,AL JZ 0x001a1350 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001a1350: MOV RDI,RBX CMP EBP,-0x1 JNZ 0x001a135f CALL 0x0016bc10 JMP 0x001a1370 LAB_001a135f: MOV ESI,EBP MOV EDX,0xffffffff MOV ECX,0xffffffff CALL 0x00168060 LAB_001a1370: MOV EDI,0x10 CALL 0x00165cb0 MOV RBX,RAX LAB_001a137d: LEA RSI,[0x214c9b] MOV RDI,RAX CALL 0x001655d0 LAB_001a138c: MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,RBX CALL 0x0016b270
/* llama_data_read::read_kv_cache(llama_context*, int) */ void __thiscall llama_data_read::read_kv_cache(llama_data_read *this,llama_context *param_1,int param_2) { char cVar1; int8 in_RAX; runtime_error *this_00; uint local_24; local_24 = (uint)((ulong)in_RAX >> 0x20); (**(code **)(*(long *)this + 8))(this,&local_24,4); cVar1 = read_kv_cache_meta(this,param_1,local_24,param_2); if (cVar1 != '\0') { cVar1 = read_kv_cache_data(this,param_1,local_24); if (cVar1 != '\0') { return; } } if (param_2 == -1) { llama_kv_cache_clear(); } else { llama_kv_cache_seq_rm(param_1,param_2,0xffffffff,0xffffffff); } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a137d to 001a138b has its CatchHandler @ 001a13a2 */ std::runtime_error::runtime_error(this_00,"failed to restore kv cache"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); }
39,953
maria_indexes_are_disabled
eloqsql/storage/maria/ma_open.c
int maria_indexes_are_disabled(MARIA_HA *info) { MARIA_SHARE *share= info->s; /* No keys or all are enabled. keys is the number of keys. Left shifted gives us only one bit set. When decreased by one, gives us all all bits up to this one set and it gets unset. */ if (!share->base.keys || (maria_is_all_keys_active(share->state.key_map, share->base.keys))) return 0; /* All are disabled */ if (maria_is_any_key_active(share->state.key_map)) return 1; /* We have keys. Some enabled, some disabled. Don't check for any non-unique disabled but return directly 2 */ return 2; }
O3
c
maria_indexes_are_disabled: pushq %rbp movq %rsp, %rbp movq (%rdi), %rdx movl 0x3e8(%rdx), %ecx xorl %eax, %eax testq %rcx, %rcx je 0x6eff9 movq 0x140(%rdx), %rdx movq $-0x1, %rsi movq $-0x1, %rdi shlq %cl, %rdi cmpl $0x40, %ecx notq %rdi cmovaeq %rsi, %rdi cmpq %rdi, %rdx je 0x6eff9 xorl %eax, %eax cmpq $0x1, %rdx adcl $0x1, %eax popq %rbp retq nop
maria_indexes_are_disabled: push rbp mov rbp, rsp mov rdx, [rdi] mov ecx, [rdx+3E8h] xor eax, eax test rcx, rcx jz short loc_6EFF9 mov rdx, [rdx+140h] mov rsi, 0FFFFFFFFFFFFFFFFh mov rdi, 0FFFFFFFFFFFFFFFFh shl rdi, cl cmp ecx, 40h ; '@' not rdi cmovnb rdi, rsi cmp rdx, rdi jz short loc_6EFF9 xor eax, eax cmp rdx, 1 adc eax, 1 loc_6EFF9: pop rbp retn
long long maria_indexes_are_disabled(long long a1) { unsigned int v1; // ecx long long result; // rax long long v3; // rdx long long v4; // rdi v1 = *(_DWORD *)(*(_QWORD *)a1 + 1000LL); result = 0LL; if ( v1 ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 320LL); v4 = ~(-1LL << v1); if ( v1 >= 0x40 ) v4 = -1LL; if ( v3 != v4 ) return (unsigned int)(v3 == 0) + 1; } return result; }
maria_indexes_are_disabled: PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI] MOV ECX,dword ptr [RDX + 0x3e8] XOR EAX,EAX TEST RCX,RCX JZ 0x0016eff9 MOV RDX,qword ptr [RDX + 0x140] MOV RSI,-0x1 MOV RDI,-0x1 SHL RDI,CL CMP ECX,0x40 NOT RDI CMOVNC RDI,RSI CMP RDX,RDI JZ 0x0016eff9 XOR EAX,EAX CMP RDX,0x1 ADC EAX,0x1 LAB_0016eff9: POP RBP RET
char maria_indexes_are_disabled(long *param_1) { uint uVar1; ulong uVar2; char cVar3; ulong uVar4; uVar1 = *(uint *)(*param_1 + 1000); cVar3 = '\0'; if (uVar1 != 0) { uVar2 = *(ulong *)(*param_1 + 0x140); uVar4 = ~(-1L << ((byte)uVar1 & 0x3f)); if (0x3f < uVar1) { uVar4 = 0xffffffffffffffff; } if (uVar2 != uVar4) { cVar3 = (uVar2 == 0) + '\x01'; } } return cVar3; }
39,954
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>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
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>>>::key() const: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) cmpq $0x0, (%rax) jne 0x181b5a leaq 0x9a763(%rip), %rdi # 0x21c2a3 movl $0x1491, %esi # imm = 0x1491 leaq 0x9378b(%rip), %rdx # 0x2152d7 leaq 0x9f0aa(%rip), %rcx # 0x220bfd movb $0x0, %al callq 0x5ef40 movq 0x10(%rsp), %rax movq (%rax), %rdi callq 0x131120 movzbl %al, %ecx movq %rcx, 0x8(%rsp) subb $0x9, %al ja 0x181bdc movq 0x8(%rsp), %rax leaq 0x9c815(%rip), %rcx # 0x21e394 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x10(%rsp), %rcx movq 0x20(%rcx), %rax cmpq 0x28(%rcx), %rax je 0x181bb9 movq 0x10(%rsp), %rax movq %rax, %rdi addq $0x30, %rdi movq 0x20(%rax), %rsi callq 0x181d20 movq 0x10(%rsp), %rax movq 0x20(%rax), %rcx movq %rcx, 0x28(%rax) movq 0x10(%rsp), %rax addq $0x30, %rax movq %rax, 0x20(%rsp) jmp 0x181bea movq 0x10(%rsp), %rdi callq 0x181d60 movq %rax, 0x20(%rsp) jmp 0x181bea jmp 0x181bdc movq 0x10(%rsp), %rax addq $0x50, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: sub rsp, 28h mov qword ptr [rsp+28h+var_10], rdi; __int64 mov rax, qword ptr [rsp+28h+var_10] mov qword ptr [rsp+28h+var_18], rax; __int16 cmp qword ptr [rax], 0 jnz short loc_181B5A lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1491h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov al, 0 call _ggml_abort loc_181B5A: mov rax, qword ptr [rsp+28h+var_18] mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; 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(void) movzx ecx, al mov qword ptr [rsp+28h+var_20], rcx; int sub al, 9; switch 10 cases ja short def_181B86; jumptable 0000000000181B86 default case mov rax, qword ptr [rsp+28h+var_20] lea rcx, jpt_181B86 movsxd rax, ds:(jpt_181B86 - 21E394h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_181B88: mov rcx, qword ptr [rsp+28h+var_18]; jumptable 0000000000181B86 case 2 mov rax, [rcx+20h] cmp rax, [rcx+28h] jz short loc_181BB9 mov rax, qword ptr [rsp+28h+var_18] mov rdi, rax add rdi, 30h ; '0' mov rsi, [rax+20h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, qword ptr [rsp+28h+var_18] mov rcx, [rax+20h] mov [rax+28h], rcx loc_181BB9: mov rax, qword ptr [rsp+28h+var_18] add rax, 30h ; '0' mov [rsp+28h+var_8], rax jmp short loc_181BEA loc_181BC9: mov rdi, qword ptr [rsp+28h+var_18]; jumptable 0000000000181B86 case 1 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void) mov [rsp+28h+var_8], rax jmp short loc_181BEA loc_181BDA: jmp short $+2; jumptable 0000000000181B86 cases 0,3-9 def_181B86: mov rax, qword ptr [rsp+28h+var_18]; jumptable 0000000000181B86 default case add rax, 50h ; 'P' mov [rsp+28h+var_8], rax loc_181BEA: mov rax, [rsp+28h+var_8] add rsp, 28h retn
39,955
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>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
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>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0xb047e movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xb046c cmpl $0x2, %eax jne 0xb0475 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xb0466 leaq 0x30(%rbx), %rdi callq 0xb31b9 movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xb0479 movq %rbx, %rdi popq %rbx jmp 0x929e0 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x44877(%rip), %rdi # 0xf4cfc leaq 0x3d149(%rip), %rdx # 0xed5d5 leaq 0x48d6b(%rip), %rcx # 0xf91fe movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1bef0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_B047E mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_B046C cmp eax, 2 jnz short loc_B0475 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_B0466 lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_B0466: add rbx, 30h ; '0' jmp short loc_B0479 loc_B046C: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) loc_B0475: add rbx, 50h ; 'P' loc_B0479: mov rax, rbx pop rbx retn loc_B047E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
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>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return 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>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return 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("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001b047e MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001b046c CMP EAX,0x2 JNZ 0x001b0475 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001b0466 LEA RDI,[RBX + 0x30] CALL 0x001b31b9 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001b0466: ADD RBX,0x30 JMP 0x001b0479 LAB_001b046c: MOV RDI,RBX POP RBX JMP 0x001929e0 LAB_001b0475: ADD RBX,0x50 LAB_001b0479: MOV RAX,RBX POP RBX RET LAB_001b047e: LEA RDI,[0x1f4cfc] LEA RDX,[0x1ed5d5] LEA RCX,[0x1f91fe] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011bef0
/* 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> >::key() 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>> * __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>> ::key(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) { char cVar1; 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>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (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>> *)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> ::key((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); return piVar2; }
39,956
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>>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O3
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>>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0xafb24 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xafb12 cmpl $0x2, %eax jne 0xafb1b movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xafb0c leaq 0x30(%rbx), %rdi callq 0xb284b movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xafb1f movq %rbx, %rdi popq %rbx jmp 0x923f0 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x421d1(%rip), %rdi # 0xf1cfc leaq 0x3aaa3(%rip), %rdx # 0xea5d5 leaq 0x466b5(%rip), %rcx # 0xf61ee movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1bef0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_AFB24 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_AFB12 cmp eax, 2 jnz short loc_AFB1B mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_AFB0C lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_AFB0C: add rbx, 30h ; '0' jmp short loc_AFB1F loc_AFB12: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) loc_AFB1B: add rbx, 50h ; 'P' loc_AFB1F: mov rax, rbx pop rbx retn loc_AFB24: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
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>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return 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>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return 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("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001afb24 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001afb12 CMP EAX,0x2 JNZ 0x001afb1b MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001afb0c LEA RDI,[RBX + 0x30] CALL 0x001b284b MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001afb0c: ADD RBX,0x30 JMP 0x001afb1f LAB_001afb12: MOV RDI,RBX POP RBX JMP 0x001923f0 LAB_001afb1b: ADD RBX,0x50 LAB_001afb1f: MOV RAX,RBX POP RBX RET LAB_001afb24: LEA RDI,[0x1f1cfc] LEA RDX,[0x1ea5d5] LEA RCX,[0x1f61ee] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011bef0
/* 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> >::key() 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>> * __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>> ::key(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) { char cVar1; 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>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (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>> *)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> ::key((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); return piVar2; }
39,957
bool fmt::v10::detail::loc_writer<char>::operator()<__int128, 0>(__int128)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
auto operator()(T value) -> bool { auto arg = make_write_int_arg(value, specs.sign); write_int(out, static_cast<uint64_or_128_t<T>>(arg.abs_value), arg.prefix, specs, digit_grouping<Char>(grouping, sep)); return true; }
O0
c
bool fmt::v10::detail::loc_writer<char>::operator()<__int128, 0>(__int128): subq $0x158, %rsp # imm = 0x158 movq %rsi, 0x140(%rsp) movq %rdx, 0x148(%rsp) movq 0x140(%rsp), %rax movq 0x148(%rsp), %rcx movq %rdi, 0x138(%rsp) movq %rcx, 0x128(%rsp) movq %rax, 0x120(%rsp) movq 0x138(%rsp), %rcx movq %rcx, 0x30(%rsp) movq 0x120(%rsp), %rax movq 0x128(%rsp), %rdx movq 0x8(%rcx), %rcx movzwl 0x9(%rcx), %ecx shrl $0x4, %ecx andl $0x7, %ecx movq %rdx, 0xf8(%rsp) movq %rax, 0xf0(%rsp) movq 0xf0(%rsp), %rsi movq 0xf8(%rsp), %rdx leaq 0x100(%rsp), %rdi callq 0xb0250 movq 0x30(%rsp), %rsi movq (%rsi), %rax movq %rax, 0xe8(%rsp) movq 0x100(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x108(%rsp), %rax movq %rax, 0x18(%rsp) movl 0x110(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x8(%rsi), %rax movq %rax, 0x28(%rsp) addq $0x30, %rsi leaq 0x88(%rsp), %rdi callq 0x2f810 movq 0x30(%rsp), %rsi addq $0x10, %rsi leaq 0x68(%rsp), %rdi callq 0x2f810 jmp 0xb739b leaq 0xa8(%rsp), %rdi leaq 0x88(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0xb7ce0 jmp 0xb73b7 movq 0x28(%rsp), %r8 movl 0x24(%rsp), %ecx movq 0x18(%rsp), %rax movq 0x10(%rsp), %rdx movq 0xe8(%rsp), %rdi movq %rdx, 0x40(%rsp) movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx leaq 0xa8(%rsp), %r9 callq 0xb8000 movq %rax, 0x8(%rsp) jmp 0xb73fa movq 0x8(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0xa8(%rsp), %rdi callq 0x9bd60 leaq 0x68(%rsp), %rdi callq 0x1dfd0 leaq 0x88(%rsp), %rdi callq 0x1dfd0 movb $0x1, %al andb $0x1, %al addq $0x158, %rsp # imm = 0x158 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xb7479 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xb746f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0xa8(%rsp), %rdi callq 0x9bd60 leaq 0x68(%rsp), %rdi callq 0x1dfd0 leaq 0x88(%rsp), %rdi callq 0x1dfd0 movq 0x60(%rsp), %rdi callq 0x16cf0
_ZN3fmt3v106detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_: sub rsp, 158h mov [rsp+158h+var_18], rsi mov [rsp+158h+var_10], rdx mov rax, [rsp+158h+var_18] mov rcx, [rsp+158h+var_10] mov [rsp+158h+var_20], rdi mov [rsp+158h+var_30], rcx mov [rsp+158h+var_38], rax mov rcx, [rsp+158h+var_20] mov [rsp+158h+var_128], rcx mov rax, [rsp+158h+var_38] mov rdx, [rsp+158h+var_30] mov rcx, [rcx+8] movzx ecx, word ptr [rcx+9] shr ecx, 4 and ecx, 7 mov [rsp+158h+var_60], rdx mov [rsp+158h+var_68], rax mov rsi, [rsp+158h+var_68] mov rdx, [rsp+158h+var_60] lea rdi, [rsp+158h+var_58] call _ZN3fmt3v106detail18make_write_int_argInEENS1_13write_int_argINSt11conditionalIXaalecl8num_bitsIT_EELi32EntLi0EEjNS4_IXlecl8num_bitsIS5_EELi64EEmoE4typeEE4typeEEES5_NS0_4sign4typeE; fmt::v10::detail::make_write_int_arg<__int128>(__int128,fmt::v10::sign::type) mov rsi, [rsp+158h+var_128] mov rax, [rsi] mov [rsp+158h+var_70], rax mov rax, [rsp+158h+var_58] mov [rsp+158h+var_148], rax mov rax, [rsp+158h+var_50] mov [rsp+158h+var_140], rax mov eax, [rsp+158h+var_48] mov [rsp+158h+var_134], eax mov rax, [rsi+8] mov [rsp+158h+var_130], rax add rsi, 30h ; '0' lea rdi, [rsp+158h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rsi, [rsp+158h+var_128] add rsi, 10h lea rdi, [rsp+158h+var_F0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_B739B: lea rdi, [rsp+158h+var_B0] lea rsi, [rsp+158h+var_D0] lea rdx, [rsp+158h+var_F0] call _ZN3fmt3v106detail14digit_groupingIcEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; fmt::v10::detail::digit_grouping<char>::digit_grouping(std::string,std::string) jmp short $+2 loc_B73B7: mov r8, [rsp+158h+var_130] mov ecx, [rsp+158h+var_134] mov rax, [rsp+158h+var_140] mov rdx, [rsp+158h+var_148] mov rdi, [rsp+158h+var_70] mov [rsp+158h+var_118], rdx mov [rsp+158h+var_110], rax mov rsi, [rsp+158h+var_118] mov rdx, [rsp+158h+var_110] lea r9, [rsp+158h+var_B0] call _ZN3fmt3v106detail9write_intINS0_8appenderEocEET_S4_T0_jRKNS0_12format_specsIT1_EERKNS1_14digit_groupingIS7_EE; fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(fmt::v10::appender,unsigned __int128,uint,fmt::v10::format_specs<char> const&,fmt::v10::detail::digit_grouping<char> const&) mov [rsp+158h+var_150], rax jmp short $+2 loc_B73FA: mov rax, [rsp+158h+var_150] mov [rsp+158h+var_120], rax lea rdi, [rsp+158h+var_B0] call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping() lea rdi, [rsp+158h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov al, 1 and al, 1 add rsp, 158h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_B7479 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_B746F mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_A0] call _ZN3fmt3v106detail14digit_groupingIcED2Ev; fmt::v10::detail::digit_grouping<char>::~digit_grouping() loc_B746F: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B7479: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_58] call __Unwind_Resume
char ZN3fmt3v106detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_( _QWORD *a1, long long a2, long long a3) { int v3; // ecx long long v5; // [rsp+10h] [rbp-148h] long long v6; // [rsp+18h] [rbp-140h] unsigned int v7; // [rsp+24h] [rbp-134h] long long v8; // [rsp+28h] [rbp-130h] _QWORD v9[4]; // [rsp+68h] [rbp-F0h] BYREF _QWORD v10[4]; // [rsp+88h] [rbp-D0h] BYREF _BYTE v11[64]; // [rsp+A8h] [rbp-B0h] BYREF long long v12; // [rsp+E8h] [rbp-70h] long long v13; // [rsp+F0h] [rbp-68h] long long v14; // [rsp+F8h] [rbp-60h] _QWORD v15[2]; // [rsp+100h] [rbp-58h] BYREF unsigned int v16; // [rsp+110h] [rbp-48h] long long v17; // [rsp+120h] [rbp-38h] long long v18; // [rsp+128h] [rbp-30h] _QWORD *v19; // [rsp+138h] [rbp-20h] long long v20; // [rsp+140h] [rbp-18h] long long v21; // [rsp+148h] [rbp-10h] v20 = a2; v21 = a3; v19 = a1; v18 = a3; v17 = a2; v3 = (*(unsigned __int16 *)(a1[1] + 9LL) >> 4) & 7; v14 = a3; v13 = a2; fmt::v10::detail::make_write_int_arg<__int128>((long long)v15, a2, a3, v3); v12 = *a1; v5 = v15[0]; v6 = v15[1]; v7 = v16; v8 = a1[1]; std::string::basic_string(v10, (long long)(a1 + 6)); std::string::basic_string(v9, (long long)(a1 + 2)); fmt::v10::detail::digit_grouping<char>::digit_grouping(v11, v10, v9); fmt::v10::detail::write_int<fmt::v10::appender,unsigned __int128,char>(v12, v5, v6, v7, v8, v11); fmt::v10::detail::digit_grouping<char>::~digit_grouping((long long)v11); std::string::~string(v9); std::string::~string(v10); return 1; }
_ZN3fmt3v106detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_: SUB RSP,0x158 MOV qword ptr [RSP + 0x140],RSI MOV qword ptr [RSP + 0x148],RDX MOV RAX,qword ptr [RSP + 0x140] MOV RCX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x138],RDI MOV qword ptr [RSP + 0x128],RCX MOV qword ptr [RSP + 0x120],RAX MOV RCX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x30],RCX MOV RAX,qword ptr [RSP + 0x120] MOV RDX,qword ptr [RSP + 0x128] MOV RCX,qword ptr [RCX + 0x8] MOVZX ECX,word ptr [RCX + 0x9] SHR ECX,0x4 AND ECX,0x7 MOV qword ptr [RSP + 0xf8],RDX MOV qword ptr [RSP + 0xf0],RAX MOV RSI,qword ptr [RSP + 0xf0] MOV RDX,qword ptr [RSP + 0xf8] LEA RDI,[RSP + 0x100] CALL 0x001b0250 MOV RSI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSI] MOV qword ptr [RSP + 0xe8],RAX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x110] MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RSP + 0x28],RAX ADD RSI,0x30 LEA RDI,[RSP + 0x88] CALL 0x0012f810 MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x10 LAB_001b738f: LEA RDI,[RSP + 0x68] CALL 0x0012f810 JMP 0x001b739b LAB_001b739b: LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0x88] LEA RDX,[RSP + 0x68] CALL 0x001b7ce0 JMP 0x001b73b7 LAB_001b73b7: MOV R8,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RAX MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_001b73e6: LEA R9,[RSP + 0xa8] CALL 0x001b8000 LAB_001b73f3: MOV qword ptr [RSP + 0x8],RAX JMP 0x001b73fa LAB_001b73fa: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0xa8] CALL 0x0019bd60 LEA RDI,[RSP + 0x68] CALL 0x0011dfd0 LEA RDI,[RSP + 0x88] CALL 0x0011dfd0 MOV AL,0x1 AND AL,0x1 ADD RSP,0x158 RET
int8 _ZN3fmt3v106detail10loc_writerIcEclInTnNSt9enable_ifIXsr10is_integerIT_EE5valueEiE4typeELi0EEEbS6_ (int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; string local_f0 [32]; string local_d0 [32]; digit_grouping<char> local_b0 [64]; detail *local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int4 local_48; int8 local_38; int8 local_30; int8 *local_20; int8 local_18; int8 local_10; local_68 = param_2; local_60 = param_3; local_38 = param_2; local_30 = param_3; local_20 = param_1; local_18 = param_2; local_10 = param_3; fmt::v10::detail::write_int_arg<std:: conditional<(((num_bits<__int128>)())<=(32))&&(!(0)),unsigned_int,std:: conditional<((num_bits<__int128>)())<=(64),unsigned_long,unsigned__int128>::type>::type>fmt::v10:: detail::make_write_int_arg<__int128> (&local_58,param_2,param_3,*(ushort *)(param_1[1] + 9) >> 4 & 7); local_70 = (detail *)*param_1; uVar1 = param_1[1]; std::__cxx11::string::string(local_d0,(string *)(param_1 + 6)); /* try { // try from 001b738f to 001b7398 has its CatchHandler @ 001b7434 */ std::__cxx11::string::string(local_f0,(string *)(param_1 + 2)); /* try { // try from 001b739b to 001b73b4 has its CatchHandler @ 001b7444 */ fmt::v10::detail::digit_grouping<char>::digit_grouping(local_b0,local_d0,local_f0); /* try { // try from 001b73e6 to 001b73f2 has its CatchHandler @ 001b7454 */ fmt::v10::detail::write_int<fmt::v10::appender,unsigned__int128,char> (local_70,local_58,local_50,local_48,uVar1,local_b0); fmt::v10::detail::digit_grouping<char>::~digit_grouping(local_b0); std::__cxx11::string::~string(local_f0); std::__cxx11::string::~string(local_d0); return 1; }
39,958
my_uni_utf32
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (s + 4 > e) return MY_CS_TOOSMALL4; if (wc > 0x10FFFF) return MY_CS_ILUNI; s[0]= (uchar) (wc >> 24); s[1]= (uchar) (wc >> 16) & 0xFF; s[2]= (uchar) (wc >> 8) & 0xFF; s[3]= (uchar) wc & 0xFF; return 4; }
O0
c
my_uni_utf32: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x6b8fb movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x6b96c cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF jbe 0x6b90e movl $0x0, -0x4(%rbp) jmp 0x6b96c movq -0x18(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x10, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x3(%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_uni_utf32: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_6B8FB mov [rbp+var_4], 0FFFFFF98h jmp short loc_6B96C loc_6B8FB: cmp [rbp+var_18], offset unk_10FFFF jbe short loc_6B90E mov [rbp+var_4], 0 jmp short loc_6B96C loc_6B90E: mov rax, [rbp+var_18] shr rax, 18h mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov rax, [rbp+var_18] shr rax, 10h movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov rax, [rbp+var_18] shr rax, 8 movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+3], cl mov [rbp+var_4], 4 loc_6B96C: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf32(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( (unsigned long long)(a3 + 4) <= a4 ) { if ( a2 <= (unsigned long long)&unk_10FFFF ) { *a3 = BYTE3(a2); a3[1] = BYTE2(a2); a3[2] = BYTE1(a2); a3[3] = a2; return 4; } else { return 0; } } else { return (unsigned int)-104; } }
my_uni_utf32: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0016b8fb MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0016b96c LAB_0016b8fb: CMP qword ptr [RBP + -0x18],0x10ffff JBE 0x0016b90e MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016b96c LAB_0016b90e: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x10 MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3],CL MOV dword ptr [RBP + -0x4],0x4 LAB_0016b96c: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf32(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int4 local_c; if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else if (param_2 < 0x110000) { *param_3 = (char)(param_2 >> 0x18); param_3[1] = (char)(param_2 >> 0x10); param_3[2] = (char)(param_2 >> 8); param_3[3] = (char)param_2; local_c = 4; } else { local_c = 0; } return local_c; }
39,959
prepare_resize_simple_key_cache
eloqsql/mysys/mf_keycache.c
static int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, my_bool release_lock) { int res= 0; DBUG_ENTER("prepare_resize_simple_key_cache"); keycache_pthread_mutex_lock(&keycache->cache_lock); /* We may need to wait for another thread which is doing a resize already. This cannot happen in the MySQL server though. It allows one resizer only. In set_var.cc keycache->in_init is used to block multiple attempts. */ while (keycache->in_resize) { /* purecov: begin inspected */ wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); /* purecov: end */ } /* Mark the operation in progress. This blocks other threads from doing a resize in parallel. It prohibits new blocks to enter the cache. Read/write requests can bypass the cache during the flush phase. */ keycache->in_resize= 1; /* Need to flush only if keycache is enabled. */ if (keycache->can_be_used && keycache->disk_blocks != -1) { /* Start the flush phase. */ keycache->resize_in_flush= 1; if (flush_all_key_blocks(keycache)) { /* TODO: if this happens, we should write a warning in the log file ! */ keycache->resize_in_flush= 0; keycache->can_be_used= 0; res= 1; goto finish; } DBUG_SLOW_ASSERT(cache_empty(keycache)); /* End the flush phase. */ keycache->resize_in_flush= 0; } /* Some direct read/write operations (bypassing the cache) may still be unfinished. Wait until they are done. If the key cache can be used, direct I/O is done in increments of key_cache_block_size. That is, every block is checked if it is in the cache. We need to wait for pending I/O before re-initializing the cache, because we may change the block size. Otherwise they could check for blocks at file positions where the new block division has none. We do also want to wait for I/O done when (if) the cache was disabled. It must not run in parallel with normal cache operation. */ while (keycache->cnt_for_resize_op) wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock); end_simple_key_cache(keycache, 0); finish: if (release_lock) keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_RETURN(res); }
O0
c
prepare_resize_simple_key_cache: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movl $0x0, -0x10(%rbp) movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x7187f(%rip), %rsi # 0x15a5ea movl $0x2a9, %edx # imm = 0x2A9 callq 0xe5590 movq -0x8(%rbp), %rax cmpb $0x0, 0x1(%rax) je 0xe8d9c movq -0x8(%rbp), %rdi addq $0x108, %rdi # imm = 0x108 movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe5600 jmp 0xe8d75 movq -0x8(%rbp), %rax movb $0x1, 0x1(%rax) movq -0x8(%rbp), %rax movsbl 0x3(%rax), %eax cmpl $0x0, %eax je 0xe8df6 movq -0x8(%rbp), %rax cmpl $-0x1, 0x48(%rax) je 0xe8df6 movq -0x8(%rbp), %rax movb $0x1, 0x2(%rax) movq -0x8(%rbp), %rdi callq 0xe8ea0 cmpl $0x0, %eax je 0xe8dea movq -0x8(%rbp), %rax movb $0x0, 0x2(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x3(%rax) movl $0x1, -0x10(%rbp) jmp 0xe8e2b jmp 0xe8dec jmp 0xe8dee movq -0x8(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0xe8df8 movq -0x8(%rbp), %rax cmpq $0x0, 0x70(%rax) je 0xe8e20 movq -0x8(%rbp), %rdi addq $0x110, %rdi # imm = 0x110 movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe5600 jmp 0xe8df8 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xe8a90 cmpb $0x0, -0x9(%rbp) je 0xe8e41 movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe5fb0 jmp 0xe8e43 movl -0x10(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
prepare_resize_simple_key_cache: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov [rbp+var_10], 0 mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 2A9h call inline_mysql_mutex_lock_24 loc_E8D75: mov rax, [rbp+var_8] cmp byte ptr [rax+1], 0 jz short loc_E8D9C mov rdi, [rbp+var_8] add rdi, 108h mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short loc_E8D75 loc_E8D9C: mov rax, [rbp+var_8] mov byte ptr [rax+1], 1 mov rax, [rbp+var_8] movsx eax, byte ptr [rax+3] cmp eax, 0 jz short loc_E8DF6 mov rax, [rbp+var_8] cmp dword ptr [rax+48h], 0FFFFFFFFh jz short loc_E8DF6 mov rax, [rbp+var_8] mov byte ptr [rax+2], 1 mov rdi, [rbp+var_8] call flush_all_key_blocks cmp eax, 0 jz short loc_E8DEA mov rax, [rbp+var_8] mov byte ptr [rax+2], 0 mov rax, [rbp+var_8] mov byte ptr [rax+3], 0 mov [rbp+var_10], 1 jmp short loc_E8E2B loc_E8DEA: jmp short $+2 loc_E8DEC: jmp short $+2 loc_E8DEE: mov rax, [rbp+var_8] mov byte ptr [rax+2], 0 loc_E8DF6: jmp short $+2 loc_E8DF8: mov rax, [rbp+var_8] cmp qword ptr [rax+70h], 0 jz short loc_E8E20 mov rdi, [rbp+var_8] add rdi, 110h mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short loc_E8DF8 loc_E8E20: mov rdi, [rbp+var_8] xor esi, esi call end_simple_key_cache loc_E8E2B: cmp [rbp+var_9], 0 jz short loc_E8E41 mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 loc_E8E41: jmp short $+2 loc_E8E43: mov eax, [rbp+var_10] mov [rbp+var_14], eax mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long prepare_resize_simple_key_cache(long long a1, char a2) { unsigned int v3; // [rsp+10h] [rbp-10h] v3 = 0; inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x2A9u); while ( *(_BYTE *)(a1 + 1) ) wait_on_queue((long long *)(a1 + 264), (const char *)(a1 + 192)); *(_BYTE *)(a1 + 1) = 1; if ( !*(_BYTE *)(a1 + 3) || *(_DWORD *)(a1 + 72) == -1 ) { LABEL_9: while ( *(_QWORD *)(a1 + 112) ) wait_on_queue((long long *)(a1 + 272), (const char *)(a1 + 192)); end_simple_key_cache(a1, 0); goto LABEL_12; } *(_BYTE *)(a1 + 2) = 1; if ( !(unsigned int)flush_all_key_blocks(a1) ) { *(_BYTE *)(a1 + 2) = 0; goto LABEL_9; } *(_BYTE *)(a1 + 2) = 0; *(_BYTE *)(a1 + 3) = 0; v3 = 1; LABEL_12: if ( a2 ) inline_mysql_mutex_unlock_25(a1 + 192); return v3; }
prepare_resize_simple_key_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV dword ptr [RBP + -0x10],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25a5ea] MOV EDX,0x2a9 CALL 0x001e5590 LAB_001e8d75: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1],0x0 JZ 0x001e8d9c MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x108 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e5600 JMP 0x001e8d75 LAB_001e8d9c: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x1],0x1 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x3] CMP EAX,0x0 JZ 0x001e8df6 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x48],-0x1 JZ 0x001e8df6 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],0x1 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e8ea0 CMP EAX,0x0 JZ 0x001e8dea MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x3],0x0 MOV dword ptr [RBP + -0x10],0x1 JMP 0x001e8e2b LAB_001e8dea: JMP 0x001e8dec LAB_001e8dec: JMP 0x001e8dee LAB_001e8dee: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x2],0x0 LAB_001e8df6: JMP 0x001e8df8 LAB_001e8df8: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x70],0x0 JZ 0x001e8e20 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x110 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e5600 JMP 0x001e8df8 LAB_001e8e20: MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001e8a90 LAB_001e8e2b: CMP byte ptr [RBP + -0x9],0x0 JZ 0x001e8e41 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e5fb0 LAB_001e8e41: JMP 0x001e8e43 LAB_001e8e43: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x20 POP RBP RET
int4 prepare_resize_simple_key_cache(long param_1,char param_2) { int iVar1; int4 local_18; local_18 = 0; inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x2a9); while (*(char *)(param_1 + 1) != '\0') { wait_on_queue(param_1 + 0x108); } *(int1 *)(param_1 + 1) = 1; if ((*(char *)(param_1 + 3) != '\0') && (*(int *)(param_1 + 0x48) != -1)) { *(int1 *)(param_1 + 2) = 1; iVar1 = flush_all_key_blocks(param_1); if (iVar1 != 0) { *(int1 *)(param_1 + 2) = 0; *(int1 *)(param_1 + 3) = 0; local_18 = 1; goto LAB_001e8e2b; } *(int1 *)(param_1 + 2) = 0; } while (*(long *)(param_1 + 0x70) != 0) { wait_on_queue(param_1 + 0x110); } end_simple_key_cache(param_1,0); LAB_001e8e2b: if (param_2 != '\0') { inline_mysql_mutex_unlock(param_1 + 0xc0); } return local_18; }
39,960
write_hook_for_clr_end
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_clr_end(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn __attribute__ ((unused)), void *hook_arg) { MARIA_SHARE *share= tbl_info->s; struct st_msg_to_write_hook_for_clr_end *msg= (struct st_msg_to_write_hook_for_clr_end *)hook_arg; my_bool error= FALSE; DBUG_ENTER("write_hook_for_clr_end"); DBUG_ASSERT(trn->trid != 0); trn->undo_lsn= msg->previous_undo_lsn; switch (msg->undone_record_type) { case LOGREC_UNDO_ROW_DELETE: share->state.state.records++; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_INSERT: share->state.state.records--; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_UPDATE: share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_KEY_INSERT_WITH_ROOT: case LOGREC_UNDO_KEY_DELETE_WITH_ROOT: { /* Update key root */ struct st_msg_to_write_hook_for_undo_key *extra_msg= (struct st_msg_to_write_hook_for_undo_key *) msg->extra_msg; *extra_msg->root= extra_msg->value; break; } case LOGREC_UNDO_KEY_INSERT: case LOGREC_UNDO_KEY_DELETE: break; case LOGREC_UNDO_BULK_INSERT: mysql_mutex_assert_owner(&share->intern_lock); error= (maria_enable_indexes(tbl_info) || /* we enabled indices, need '2' below */ _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_FULL_INFO)); /* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */ break; default: DBUG_ASSERT(0); } if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */ trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn); DBUG_RETURN(error); }
O3
c
write_hook_for_clr_end: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq (%rdx), %r14 movq (%r8), %rcx movq %rcx, 0x98(%rsi) movl 0x8(%r8), %esi xorl %eax, %eax leal -0x12(%rsi), %edi cmpl $0x6, %edi ja 0x3b04e leaq 0xa6d03(%rip), %rdx # 0xe1d38 movslq (%rdx,%rdi,4), %rsi addq %rdx, %rsi jmpq *%rsi movq 0x10(%r8), %rax movq (%rax), %rcx movq 0x8(%rax), %rax movq %rax, (%rcx) jmp 0x3b089 cmpl $0x27, %esi jne 0x3b092 movq %rdx, %rdi callq 0x35ccf movl %eax, %ecx movb $0x1, %al testl %ecx, %ecx jne 0x3b08b movq %r14, %rdi movl $0x3, %esi callq 0x34e5e testl %eax, %eax setne %al jmp 0x3b08b incq 0x18(%r14) jmp 0x3b081 decq 0x18(%r14) movl 0xc(%r8), %eax addl %eax, 0x48(%r14) xorl %eax, %eax movq 0x98(%rbx), %rcx testq %rcx, %rcx jne 0x3b0a9 movzbl 0xa7(%rbx), %ecx shlq $0x38, %rcx movq %rcx, 0xa0(%rbx) popq %rbx popq %r14 popq %rbp retq
write_hook_for_clr_end: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, [rdx] mov rcx, [r8] mov [rsi+98h], rcx mov esi, [r8+8] xor eax, eax lea edi, [rsi-12h]; switch 7 cases cmp edi, 6 ja short def_3B03C; jumptable 000000000003B03C default case lea rdx, jpt_3B03C movsxd rsi, ds:(jpt_3B03C - 0E1D38h)[rdx+rdi*4] add rsi, rdx jmp rsi; switch jump loc_3B03E: mov rax, [r8+10h]; jumptable 000000000003B03C cases 22,24 mov rcx, [rax] mov rax, [rax+8] mov [rcx], rax jmp short loc_3B089 def_3B03C: cmp esi, 27h ; '''; jumptable 000000000003B03C default case jnz short loc_3B092; jumptable 000000000003B03C cases 21,23 mov rdi, rdx call maria_enable_indexes mov ecx, eax mov al, 1 test ecx, ecx jnz short loc_3B08B mov rdi, r14 mov esi, 3 call _ma_state_info_write test eax, eax setnz al jmp short loc_3B08B loc_3B077: inc qword ptr [r14+18h]; jumptable 000000000003B03C case 19 jmp short loc_3B081; jumptable 000000000003B03C case 20 loc_3B07D: dec qword ptr [r14+18h]; jumptable 000000000003B03C case 18 loc_3B081: mov eax, [r8+0Ch]; jumptable 000000000003B03C case 20 add [r14+48h], eax loc_3B089: xor eax, eax loc_3B08B: mov rcx, [rbx+98h] loc_3B092: test rcx, rcx; jumptable 000000000003B03C cases 21,23 jnz short loc_3B0A9 movzx ecx, byte ptr [rbx+0A7h] shl rcx, 38h mov [rbx+0A0h], rcx loc_3B0A9: pop rbx pop r14 pop rbp retn
bool write_hook_for_clr_end(long long a1, long long a2, long long *a3, long long a4, long long *a5) { long long v6; // r14 long long v7; // rcx int v8; // esi bool result; // al int v10; // ecx v6 = *a3; v7 = *a5; *(_QWORD *)(a2 + 152) = *a5; v8 = *((_DWORD *)a5 + 2); result = 0; switch ( v8 ) { case 18: --*(_QWORD *)(v6 + 24); goto LABEL_8; case 19: ++*(_QWORD *)(v6 + 24); goto LABEL_8; case 20: LABEL_8: *(_DWORD *)(v6 + 72) += *((_DWORD *)a5 + 3); goto LABEL_9; case 21: case 23: goto LABEL_11; case 22: case 24: **(_QWORD **)a5[2] = *(_QWORD *)(a5[2] + 8); LABEL_9: result = 0; goto LABEL_10; default: if ( v8 != 39 ) goto LABEL_11; v10 = maria_enable_indexes(a3); result = 1; if ( !v10 ) result = (unsigned int)ma_state_info_write(v6, 3u) != 0; LABEL_10: v7 = *(_QWORD *)(a2 + 152); LABEL_11: if ( !v7 ) *(_QWORD *)(a2 + 160) = (unsigned long long)*(unsigned __int8 *)(a2 + 167) << 56; return result; } }
write_hook_for_clr_end: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,qword ptr [RDX] MOV RCX,qword ptr [R8] MOV qword ptr [RSI + 0x98],RCX MOV ESI,dword ptr [R8 + 0x8] XOR EAX,EAX LEA EDI,[RSI + -0x12] CMP EDI,0x6 JA 0x0013b04e LEA RDX,[0x1e1d38] MOVSXD RSI,dword ptr [RDX + RDI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_16: MOV RAX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RCX],RAX JMP 0x0013b089 default: CMP ESI,0x27 JNZ 0x0013b092 MOV RDI,RDX CALL 0x00135ccf MOV ECX,EAX MOV AL,0x1 TEST ECX,ECX JNZ 0x0013b08b MOV RDI,R14 MOV ESI,0x3 CALL 0x00134e5e TEST EAX,EAX SETNZ AL JMP 0x0013b08b caseD_13: INC qword ptr [R14 + 0x18] JMP 0x0013b081 caseD_12: DEC qword ptr [R14 + 0x18] caseD_14: MOV EAX,dword ptr [R8 + 0xc] ADD dword ptr [R14 + 0x48],EAX LAB_0013b089: XOR EAX,EAX LAB_0013b08b: MOV RCX,qword ptr [RBX + 0x98] caseD_15: TEST RCX,RCX JNZ 0x0013b0a9 MOVZX ECX,byte ptr [RBX + 0xa7] SHL RCX,0x38 MOV qword ptr [RBX + 0xa0],RCX LAB_0013b0a9: POP RBX POP R14 POP RBP RET
bool write_hook_for_clr_end (int8 param_1,long param_2,long *param_3,int8 param_4,long *param_5) { long lVar1; int iVar2; long lVar3; bool bVar4; lVar1 = *param_3; lVar3 = *param_5; *(long *)(param_2 + 0x98) = lVar3; bVar4 = false; switch((int)param_5[1]) { case 0x12: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + -1; break; case 0x13: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + 1; break; case 0x14: break; case 0x15: case 0x17: goto switchD_0013b03c_caseD_15; case 0x16: case 0x18: **(int8 **)param_5[2] = ((int8 *)param_5[2])[1]; goto LAB_0013b089; default: if ((int)param_5[1] != 0x27) goto switchD_0013b03c_caseD_15; iVar2 = maria_enable_indexes(param_3); bVar4 = true; if (iVar2 == 0) { iVar2 = _ma_state_info_write(lVar1,3); bVar4 = iVar2 != 0; } goto LAB_0013b08b; } *(int *)(lVar1 + 0x48) = *(int *)(lVar1 + 0x48) + *(int *)((long)param_5 + 0xc); LAB_0013b089: bVar4 = false; LAB_0013b08b: lVar3 = *(long *)(param_2 + 0x98); switchD_0013b03c_caseD_15: if (lVar3 == 0) { *(ulong *)(param_2 + 0xa0) = (ulong)*(byte *)(param_2 + 0xa7) << 0x38; } return bVar4; }
39,961
JS_RunGC
bluesky950520[P]quickjs/quickjs.c
void JS_RunGC(JSRuntime *rt) { /* decrement the reference of the children of each object. mark = 1 after this pass. */ gc_decref(rt); /* keep the GC objects with a non zero refcount and their childs */ gc_scan(rt); /* free the GC objects in a cycle */ gc_free_cycles(rt); }
O0
c
JS_RunGC: pushq %rax movq %rdi, (%rsp) movq (%rsp), %rdi callq 0x2ac30 movq (%rsp), %rdi callq 0x2ad10 movq (%rsp), %rdi callq 0x2ade0 popq %rax retq nopw %cs:(%rax,%rax)
JS_RunGC: push rax mov [rsp+8+var_8], rdi mov rdi, [rsp+8+var_8] call gc_decref mov rdi, [rsp+8+var_8] call gc_scan mov rdi, [rsp+8+var_8] call gc_free_cycles pop rax retn
long long JS_RunGC(long long a1) { gc_decref(a1); gc_scan(a1); gc_free_cycles(a1); return a1; }
JS_RunGC: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x0012ac30 MOV RDI,qword ptr [RSP] CALL 0x0012ad10 MOV RDI,qword ptr [RSP] CALL 0x0012ade0 POP RAX RET
int8 JS_RunGC(int8 param_1) { gc_decref(param_1); gc_scan(param_1); gc_free_cycles(param_1); return param_1; }
39,962
JS_RunGC
bluesky950520[P]quickjs/quickjs.c
void JS_RunGC(JSRuntime *rt) { /* decrement the reference of the children of each object. mark = 1 after this pass. */ gc_decref(rt); /* keep the GC objects with a non zero refcount and their childs */ gc_scan(rt); /* free the GC objects in a cycle */ gc_free_cycles(rt); }
O1
c
JS_RunGC: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xb8(%rdi), %r15 movq %r15, 0xb8(%rdi) movq %r15, 0xc0(%rdi) leaq 0x98(%rdi), %r12 movq 0xa0(%rdi), %r13 cmpq %r12, %r13 je 0x1d980 leaq 0x1f8e6(%rip), %r14 # 0x3d20f movq 0x8(%r13), %rbp leaq -0x8(%r13), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x3cb79 movb -0x4(%r13), %al andb $0xf, %al orb $0x10, %al movb %al, -0x4(%r13) cmpl $0x0, -0x8(%r13) jne 0x1d978 movq (%r13), %rax movq 0x8(%r13), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%r13) movq (%r15), %rax movq %r13, 0x8(%rax) movq %rax, (%r13) movq %r15, 0x8(%r13) movq %r13, (%r15) movq %rbp, %r13 cmpq %r12, %rbp jne 0x1d929 movq 0xa0(%rbx), %r13 cmpq %r12, %r13 je 0x1d9b0 leaq 0x1f8c6(%rip), %r14 # 0x3d259 leaq -0x8(%r13), %rsi andb $0xf, -0x4(%r13) movq %rbx, %rdi movq %r14, %rdx callq 0x3cb79 movq 0x8(%r13), %r13 cmpq %r12, %r13 jne 0x1d993 movq 0xc0(%rbx), %r12 cmpq %r15, %r12 je 0x1d9dd leaq 0x1f8e2(%rip), %r14 # 0x3d2a5 leaq -0x8(%r12), %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x3cb79 movq 0x8(%r12), %r12 cmpq %r15, %r12 jne 0x1d9c3 movb $0x2, 0xc8(%rbx) movq 0xc0(%rbx), %rsi cmpq %r15, %rsi je 0x1da3c leaq 0xa8(%rbx), %r14 testb $0xe, -0x4(%rsi) je 0x1da24 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movq (%r14), %rax movq %rsi, 0x8(%rax) movq %rax, (%rsi) movq %r14, 0x8(%rsi) movq %rsi, (%r14) jmp 0x1da30 addq $-0x8, %rsi movq %rbx, %rdi callq 0x3c548 movq 0xc0(%rbx), %rsi cmpq %r15, %rsi jne 0x1d9f7 movb $0x0, 0xc8(%rbx) leaq 0xa8(%rbx), %r15 movq 0xb0(%rbx), %r14 cmpq %r15, %r14 je 0x1da89 movq 0x8(%r14), %r12 addq $-0x8, %r14 decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x30(%rbx), %rcx movq 0x40(%rbx), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%rbx) movq %r14, %rsi callq *0x10(%rbx) movq %r12, %r14 cmpq %r15, %r12 jne 0x1da56 movq %r15, 0xa8(%rbx) movq %r15, 0xb0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_RunGC: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r15, [rdi+0B8h] mov [rdi+0B8h], r15 mov [rdi+0C0h], r15 lea r12, [rdi+98h] mov r13, [rdi+0A0h] cmp r13, r12 jz short loc_1D980 lea r14, gc_decref_child loc_1D929: mov rbp, [r13+8] lea rsi, [r13-8] mov rdi, rbx mov rdx, r14 call mark_children mov al, [r13-4] and al, 0Fh or al, 10h mov [r13-4], al cmp dword ptr [r13-8], 0 jnz short loc_1D978 mov rax, [r13+0] mov rcx, [r13+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [r13+0], xmm0 mov rax, [r15] mov [rax+8], r13 mov [r13+0], rax mov [r13+8], r15 mov [r15], r13 loc_1D978: mov r13, rbp cmp rbp, r12 jnz short loc_1D929 loc_1D980: mov r13, [rbx+0A0h] cmp r13, r12 jz short loc_1D9B0 lea r14, gc_scan_incref_child loc_1D993: lea rsi, [r13-8] and byte ptr [r13-4], 0Fh mov rdi, rbx mov rdx, r14 call mark_children mov r13, [r13+8] cmp r13, r12 jnz short loc_1D993 loc_1D9B0: mov r12, [rbx+0C0h] cmp r12, r15 jz short loc_1D9DD lea r14, gc_scan_incref_child2 loc_1D9C3: lea rsi, [r12-8] mov rdi, rbx mov rdx, r14 call mark_children mov r12, [r12+8] cmp r12, r15 jnz short loc_1D9C3 loc_1D9DD: mov byte ptr [rbx+0C8h], 2 mov rsi, [rbx+0C0h] cmp rsi, r15 jz short loc_1DA3C lea r14, [rbx+0A8h] loc_1D9F7: test byte ptr [rsi-4], 0Eh jz short loc_1DA24 mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov rax, [r14] mov [rax+8], rsi mov [rsi], rax mov [rsi+8], r14 mov [r14], rsi jmp short loc_1DA30 loc_1DA24: add rsi, 0FFFFFFFFFFFFFFF8h mov rdi, rbx call free_gc_object loc_1DA30: mov rsi, [rbx+0C0h] cmp rsi, r15 jnz short loc_1D9F7 loc_1DA3C: mov byte ptr [rbx+0C8h], 0 lea r15, [rbx+0A8h] mov r14, [rbx+0B0h] cmp r14, r15 jz short loc_1DA89 loc_1DA56: mov r12, [r14+8] add r14, 0FFFFFFFFFFFFFFF8h dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+30h] mov rdi, [rbx+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rcx mov rsi, r14 call qword ptr [rbx+10h] mov r14, r12 cmp r12, r15 jnz short loc_1DA56 loc_1DA89: mov [rbx+0A8h], r15 mov [rbx+0B0h], r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char JS_RunGC(long long a1) { long long *v2; // r15 _QWORD *v3; // r12 _QWORD *v4; // r13 _QWORD *v5; // rbp long long v6; // rax long long v7; // rax _QWORD *v8; // rcx _QWORD *i; // r13 long long *j; // r12 long long *v11; // rsi long long *v12; // r14 long long v13; // rax _QWORD *v14; // rcx long long v15; // r15 long long v16; // r14 long long v17; // r12 long long v18; // r14 long long v19; // rax long long v20; // rdi v2 = (long long *)(a1 + 184); *(_QWORD *)(a1 + 184) = a1 + 184; *(_QWORD *)(a1 + 192) = a1 + 184; v3 = (_QWORD *)(a1 + 152); v4 = *(_QWORD **)(a1 + 160); if ( v4 != (_QWORD *)(a1 + 152) ) { do { v5 = (_QWORD *)v4[1]; mark_children(a1, v4 - 1, gc_decref_child); LOBYTE(v6) = *((_BYTE *)v4 - 4) & 0xF | 0x10; *((_BYTE *)v4 - 4) = v6; if ( !*((_DWORD *)v4 - 2) ) { v7 = *v4; v8 = (_QWORD *)v4[1]; *(_QWORD *)(v7 + 8) = v8; *v8 = v7; *(_OWORD *)v4 = 0LL; v6 = *v2; *(_QWORD *)(v6 + 8) = v4; *v4 = v6; v4[1] = v2; *v2 = (long long)v4; } v4 = v5; } while ( v5 != v3 ); } for ( i = *(_QWORD **)(a1 + 160); i != v3; i = (_QWORD *)i[1] ) { *((_BYTE *)i - 4) &= 0xFu; LOBYTE(v6) = mark_children(a1, i - 1, gc_scan_incref_child); } for ( j = *(long long **)(a1 + 192); j != v2; j = (long long *)j[1] ) LOBYTE(v6) = mark_children(a1, j - 1, gc_scan_incref_child2); *(_BYTE *)(a1 + 200) = 2; v11 = *(long long **)(a1 + 192); if ( v11 != v2 ) { v12 = (long long *)(a1 + 168); do { if ( (*((_BYTE *)v11 - 4) & 0xE) != 0 ) { v13 = *v11; v14 = (_QWORD *)v11[1]; *(_QWORD *)(v13 + 8) = v14; *v14 = v13; *(_OWORD *)v11 = 0LL; v6 = *v12; *(_QWORD *)(v6 + 8) = v11; *v11 = v6; v11[1] = (long long)v12; *v12 = (long long)v11; } else { LOBYTE(v6) = free_gc_object(a1, v11 - 1); } v11 = *(long long **)(a1 + 192); } while ( v11 != v2 ); } *(_BYTE *)(a1 + 200) = 0; v15 = a1 + 168; v16 = *(_QWORD *)(a1 + 176); if ( v16 != a1 + 168 ) { do { v17 = *(_QWORD *)(v16 + 8); v18 = v16 - 8; --*(_QWORD *)(a1 + 40); v19 = (*(long long ( **)(long long))(a1 + 32))(v18); v20 = *(_QWORD *)(a1 + 64); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v19 - 8; LOBYTE(v6) = (*(long long ( **)(long long, long long))(a1 + 16))(v20, v18); v16 = v17; } while ( v17 != v15 ); } *(_QWORD *)(a1 + 168) = v15; *(_QWORD *)(a1 + 176) = v15; return v6; }
JS_RunGC: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R15,[RDI + 0xb8] MOV qword ptr [RDI + 0xb8],R15 MOV qword ptr [RDI + 0xc0],R15 LEA R12,[RDI + 0x98] MOV R13,qword ptr [RDI + 0xa0] CMP R13,R12 JZ 0x0011d980 LEA R14,[0x13d20f] LAB_0011d929: MOV RBP,qword ptr [R13 + 0x8] LEA RSI,[R13 + -0x8] MOV RDI,RBX MOV RDX,R14 CALL 0x0013cb79 MOV AL,byte ptr [R13 + -0x4] AND AL,0xf OR AL,0x10 MOV byte ptr [R13 + -0x4],AL CMP dword ptr [R13 + -0x8],0x0 JNZ 0x0011d978 MOV RAX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13],XMM0 MOV RAX,qword ptr [R15] MOV qword ptr [RAX + 0x8],R13 MOV qword ptr [R13],RAX MOV qword ptr [R13 + 0x8],R15 MOV qword ptr [R15],R13 LAB_0011d978: MOV R13,RBP CMP RBP,R12 JNZ 0x0011d929 LAB_0011d980: MOV R13,qword ptr [RBX + 0xa0] CMP R13,R12 JZ 0x0011d9b0 LEA R14,[0x13d259] LAB_0011d993: LEA RSI,[R13 + -0x8] AND byte ptr [R13 + -0x4],0xf MOV RDI,RBX MOV RDX,R14 CALL 0x0013cb79 MOV R13,qword ptr [R13 + 0x8] CMP R13,R12 JNZ 0x0011d993 LAB_0011d9b0: MOV R12,qword ptr [RBX + 0xc0] CMP R12,R15 JZ 0x0011d9dd LEA R14,[0x13d2a5] LAB_0011d9c3: LEA RSI,[R12 + -0x8] MOV RDI,RBX MOV RDX,R14 CALL 0x0013cb79 MOV R12,qword ptr [R12 + 0x8] CMP R12,R15 JNZ 0x0011d9c3 LAB_0011d9dd: MOV byte ptr [RBX + 0xc8],0x2 MOV RSI,qword ptr [RBX + 0xc0] CMP RSI,R15 JZ 0x0011da3c LEA R14,[RBX + 0xa8] LAB_0011d9f7: TEST byte ptr [RSI + -0x4],0xe JZ 0x0011da24 MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV RAX,qword ptr [R14] MOV qword ptr [RAX + 0x8],RSI MOV qword ptr [RSI],RAX MOV qword ptr [RSI + 0x8],R14 MOV qword ptr [R14],RSI JMP 0x0011da30 LAB_0011da24: ADD RSI,-0x8 MOV RDI,RBX CALL 0x0013c548 LAB_0011da30: MOV RSI,qword ptr [RBX + 0xc0] CMP RSI,R15 JNZ 0x0011d9f7 LAB_0011da3c: MOV byte ptr [RBX + 0xc8],0x0 LEA R15,[RBX + 0xa8] MOV R14,qword ptr [RBX + 0xb0] CMP R14,R15 JZ 0x0011da89 LAB_0011da56: MOV R12,qword ptr [R14 + 0x8] ADD R14,-0x8 DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x30] MOV RDI,qword ptr [RBX + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [RBX + 0x30],RCX MOV RSI,R14 CALL qword ptr [RBX + 0x10] MOV R14,R12 CMP R12,R15 JNZ 0x0011da56 LAB_0011da89: MOV qword ptr [RBX + 0xa8],R15 MOV qword ptr [RBX + 0xb0],R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void JS_RunGC(long param_1) { long *plVar1; long *plVar2; long lVar3; long *plVar4; long lVar5; long lVar6; long lVar7; long *plVar8; plVar1 = (long *)(param_1 + 0xb8); *(long **)(param_1 + 0xb8) = plVar1; *(long **)(param_1 + 0xc0) = plVar1; plVar8 = *(long **)(param_1 + 0xa0); while (plVar2 = plVar8, plVar2 != (long *)(param_1 + 0x98)) { plVar8 = (long *)plVar2[1]; mark_children(param_1,plVar2 + -1,gc_decref_child); *(byte *)((long)plVar2 + -4) = *(byte *)((long)plVar2 + -4) & 0xf | 0x10; if ((int)plVar2[-1] == 0) { lVar3 = *plVar2; plVar4 = (long *)plVar2[1]; *(long **)(lVar3 + 8) = plVar4; *plVar4 = lVar3; *plVar2 = 0; plVar2[1] = 0; lVar3 = *plVar1; *(long **)(lVar3 + 8) = plVar2; *plVar2 = lVar3; plVar2[1] = (long)plVar1; *plVar1 = (long)plVar2; } } for (plVar8 = *(long **)(param_1 + 0xa0); plVar8 != (long *)(param_1 + 0x98); plVar8 = (long *)plVar8[1]) { *(byte *)((long)plVar8 + -4) = *(byte *)((long)plVar8 + -4) & 0xf; mark_children(param_1,plVar8 + -1,gc_scan_incref_child); } for (plVar8 = *(long **)(param_1 + 0xc0); plVar8 != plVar1; plVar8 = (long *)plVar8[1]) { mark_children(param_1,plVar8 + -1,gc_scan_incref_child2); } *(int1 *)(param_1 + 200) = 2; plVar8 = *(long **)(param_1 + 0xc0); if (plVar8 != plVar1) { plVar2 = (long *)(param_1 + 0xa8); do { if ((*plVar8 & 0xe00000000) == 0) { free_gc_object(param_1,plVar8 + -1); } else { lVar3 = *plVar8; plVar4 = (long *)plVar8[1]; *(long **)(lVar3 + 8) = plVar4; *plVar4 = lVar3; *plVar8 = 0; plVar8[1] = 0; lVar3 = *plVar2; *(long **)(lVar3 + 8) = plVar8; *plVar8 = lVar3; plVar8[1] = (long)plVar2; *plVar2 = (long)plVar8; } plVar8 = *(long **)(param_1 + 0xc0); } while (plVar8 != plVar1); } *(int1 *)(param_1 + 200) = 0; lVar3 = param_1 + 0xa8; lVar6 = *(long *)(param_1 + 0xb0); while (lVar6 != lVar3) { lVar5 = *(long *)(lVar6 + 8); *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar7 = (**(code **)(param_1 + 0x20))(lVar6 + -8); *(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar7) + -8; (**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar6 + -8); lVar6 = lVar5; } *(long *)(param_1 + 0xa8) = lVar3; *(long *)(param_1 + 0xb0) = lVar3; return; }
39,963
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool)
monkey531[P]llama/common/./json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, const parser_callback_t cb, const bool allow_exceptions_ = true) : root(r), callback(cb), allow_exceptions(allow_exceptions_) { keep_stack.push_back(true); }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool): subq $0x88, %rsp movq %rdx, 0x48(%rsp) movb %cl, %al movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) andb $0x1, %al movb %al, 0x6f(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x78(%rsp), %rcx movq %rcx, (%rax) movq %rax, %rdi addq $0x8, %rdi movq %rdi, 0x10(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movups %xmm0, 0x8(%rax) movq $0x0, 0x18(%rax) callq 0xb6020 movaps 0x20(%rsp), %xmm0 movq 0x40(%rsp), %rax movq %rax, %rdi addq $0x20, %rdi movq %rdi, 0x18(%rsp) movups %xmm0, 0x30(%rax) movups %xmm0, 0x20(%rax) movq $0x0, 0x40(%rax) callq 0xb6030 movaps 0x20(%rsp), %xmm0 movq 0x40(%rsp), %rax movq %rax, %rdi addq $0x48, %rdi movq %rdi, 0x38(%rsp) movups %xmm0, 0x58(%rax) movups %xmm0, 0x48(%rax) movq $0x0, 0x68(%rax) callq 0xb6030 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq $0x0, 0x70(%rdi) movb $0x0, 0x78(%rdi) subq $-0x80, %rdi movq %rdi, 0x50(%rsp) callq 0xae710 jmp 0xb150c movq 0x40(%rsp), %rdi movb 0x6f(%rsp), %al andb $0x1, %al movb %al, 0xa0(%rdi) addq $0xa8, %rdi movq %rdi, 0x8(%rsp) movl $0x9, %esi callq 0xb3dd0 jmp 0xb1535 movq 0x40(%rsp), %rdi addq $0x20, %rdi movl $0x1, %esi callq 0xb6040 jmp 0xb154a addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xb1594 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) jmp 0xb158a movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) callq 0x6e0f0 movq 0x50(%rsp), %rdi callq 0xae4b0 movq 0x38(%rsp), %rdi callq 0xb6120 movq 0x18(%rsp), %rdi callq 0xb6120 movq 0x10(%rsp), %rdi callq 0xb6130 movq 0x60(%rsp), %rdi callq 0x50940 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb: sub rsp, 88h mov [rsp+88h+var_40], rdx mov al, cl mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx and al, 1 mov [rsp+88h+var_19], al mov rax, [rsp+88h+var_8] mov [rsp+88h+var_48], rax mov rcx, [rsp+88h+var_10] mov [rax], rcx mov rdi, rax add rdi, 8 mov [rsp+88h+var_78], rdi xorps xmm0, xmm0 movaps [rsp+88h+var_68], xmm0 movups xmmword ptr [rax+8], xmm0 mov qword ptr [rax+18h], 0 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EEC2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::vector(void) movaps xmm0, [rsp+88h+var_68] mov rax, [rsp+88h+var_48] mov rdi, rax add rdi, 20h ; ' ' mov [rsp+88h+var_70], rdi movups xmmword ptr [rax+30h], xmm0 movups xmmword ptr [rax+20h], xmm0 mov qword ptr [rax+40h], 0 call _ZNSt6vectorIbSaIbEEC2Ev; std::vector<bool>::vector(void) movaps xmm0, [rsp+88h+var_68] mov rax, [rsp+88h+var_48] mov rdi, rax add rdi, 48h ; 'H' mov [rsp+88h+var_50], rdi movups xmmword ptr [rax+58h], xmm0 movups xmmword ptr [rax+48h], xmm0 mov qword ptr [rax+68h], 0 call _ZNSt6vectorIbSaIbEEC2Ev; std::vector<bool>::vector(void) mov rdi, [rsp+88h+var_48] mov rsi, [rsp+88h+var_40] mov qword ptr [rdi+70h], 0 mov byte ptr [rdi+78h], 0 sub rdi, 0FFFFFFFFFFFFFF80h mov [rsp+88h+var_38], rdi call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) jmp short $+2 loc_B150C: mov rdi, [rsp+88h+var_48] mov al, [rsp+88h+var_19] and al, 1 mov [rdi+0A0h], al add rdi, 0A8h mov [rsp+88h+var_80], rdi mov esi, 9 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_tE; 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::detail::value_t) jmp short $+2 loc_B1535: mov rdi, [rsp+88h+var_48] add rdi, 20h ; ' ' mov esi, 1 call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) jmp short $+2 loc_B154A: add rsp, 88h retn mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_B1594 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax jmp short loc_B158A mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax 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_B158A: mov rdi, [rsp+arg_48] call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function() loc_B1594: mov rdi, [rsp+arg_30] call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector() mov rdi, [rsp+arg_10] call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector() mov rdi, [rsp+arg_8] call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::~vector() mov rdi, [rsp+arg_58] call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4) { char v6; // [rsp+6Fh] [rbp-19h] v6 = a4 & 1; *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0LL; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::vector(); *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_QWORD *)(a1 + 64) = 0LL; std::vector<bool>::vector(); *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_QWORD *)(a1 + 104) = 0LL; std::vector<bool>::vector(); *(_QWORD *)(a1 + 112) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (std::_Function_base *)(a1 + 128), a3); *(_BYTE *)(a1 + 160) = v6 & 1; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1 + 168, 9LL); return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: SUB RSP,0x88 MOV qword ptr [RSP + 0x48],RDX MOV AL,CL MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX AND AL,0x1 MOV byte ptr [RSP + 0x6f],AL MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x40],RAX MOV RCX,qword ptr [RSP + 0x78] MOV qword ptr [RAX],RCX MOV RDI,RAX ADD RDI,0x8 MOV qword ptr [RSP + 0x10],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV qword ptr [RAX + 0x18],0x0 CALL 0x001b6020 MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x40] MOV RDI,RAX ADD RDI,0x20 MOV qword ptr [RSP + 0x18],RDI MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOV qword ptr [RAX + 0x40],0x0 CALL 0x001b6030 MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x40] MOV RDI,RAX ADD RDI,0x48 MOV qword ptr [RSP + 0x38],RDI MOVUPS xmmword ptr [RAX + 0x58],XMM0 MOVUPS xmmword ptr [RAX + 0x48],XMM0 MOV qword ptr [RAX + 0x68],0x0 CALL 0x001b6030 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV qword ptr [RDI + 0x70],0x0 MOV byte ptr [RDI + 0x78],0x0 SUB RDI,-0x80 MOV qword ptr [RSP + 0x50],RDI LAB_001b1505: CALL 0x001ae710 JMP 0x001b150c LAB_001b150c: MOV RDI,qword ptr [RSP + 0x40] MOV AL,byte ptr [RSP + 0x6f] AND AL,0x1 MOV byte ptr [RDI + 0xa0],AL ADD RDI,0xa8 MOV qword ptr [RSP + 0x8],RDI LAB_001b1529: MOV ESI,0x9 CALL 0x001b3dd0 JMP 0x001b1535 LAB_001b1535: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x20 LAB_001b153e: MOV ESI,0x1 CALL 0x001b6040 LAB_001b1548: JMP 0x001b154a LAB_001b154a: ADD RSP,0x88 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 param_1,function *param_3,byte param_4) { *(int8 *)this = param_1; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x40) = 0; std::vector<bool,std::allocator<bool>>::vector((vector<bool,std::allocator<bool>> *)(this + 0x20)) ; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x68) = 0; std::vector<bool,std::allocator<bool>>::vector((vector<bool,std::allocator<bool>> *)(this + 0x48)) ; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; /* try { // try from 001b1505 to 001b1509 has its CatchHandler @ 001b1552 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),param_3); this[0xa0] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )(param_4 & 1); /* try { // try from 001b1529 to 001b1532 has its CatchHandler @ 001b1562 */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(this + 0xa8),9); /* try { // try from 001b153e to 001b1547 has its CatchHandler @ 001b1572 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
39,964
uf_space_endspace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } else decode_bytes(rec,bit_buff,to,end); } }
O0
c
uf_space_endspace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbe2e7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbe30b jmp 0xbe329 movq -0x10(%rbp), %rdi callq 0xbd720 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbe329 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2c0 jmp 0xbe467 movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbe35b movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbe383 jmp 0xbe450 movq -0x10(%rbp), %rdi callq 0xbd720 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbe450 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbe3c6 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x202322(%rip), %rcx # 0x2c06e0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbe3d9 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbbed0 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xbe3fb movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbe467 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbe42e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0xbde30 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2c0 jmp 0xbe465 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbde30 jmp 0xbe467 addq $0x30, %rsp popq %rbp retq nopl (%rax)
uf_space_endspace_selected_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BE2E7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BE30B jmp short loc_BE329 loc_BE2E7: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BE329 loc_BE30B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_BE467 loc_BE329: mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BE35B mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BE383 jmp loc_BE450 loc_BE35B: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_BE450 loc_BE383: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BE3C6 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BE3D9 loc_BE3C6: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BE3D9: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_BE3FB mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BE467 loc_BE3FB: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BE42E mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes_0 loc_BE42E: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset jmp short loc_BE465 loc_BE450: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 loc_BE465: jmp short $+2 loc_BE467: add rsp, 30h pop rbp retn
long long uf_space_endspace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax int v7; // eax int v8; // ecx unsigned int v9; // eax int v10; // ecx unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( !a2[1] ) { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) != 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( a2[1] ) { v7 = *a2; v8 = a2[1] - 1; a2[1] = v8; if ( ((1 << v8) & v7) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v9 = *a2; v10 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v10; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10); } if ( &a3[bits_0] <= a4 ) { if ( &a3[bits_0] != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-bits_0]); return memset(&a4[-bits_0], 32LL, bits_0); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_endspace_selected: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001be2e7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001be30b JMP 0x001be329 LAB_001be2e7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bd720 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001be329 LAB_001be30b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2c0 JMP 0x001be467 LAB_001be329: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001be35b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001be383 JMP 0x001be450 LAB_001be35b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bd720 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001be450 LAB_001be383: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001be3c6 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3c06e0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001be3d9 LAB_001be3c6: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bbed0 MOV dword ptr [RBP + -0x28],EAX LAB_001be3d9: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001be3fb MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001be467 LAB_001be3fb: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001be42e MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x001bde30 LAB_001be42e: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2c0 JMP 0x001be465 LAB_001be450: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bde30 LAB_001be465: JMP 0x001be467 LAB_001be467: ADD RSP,0x30 POP RBP RET
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
39,965
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)::Impl::~Impl()
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/renderer.cpp
Component Renderer(std::function<Element()> render) { class Impl : public ComponentBase { public: explicit Impl(std::function<Element()> render) : render_(std::move(render)) {} Element Render() override { return render_(); } std::function<Element()> render_; }; return Make<Impl>(std::move(render)); }
O0
cpp
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)::Impl::~Impl(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x5f850 movq -0x10(%rbp), %rdi movl $0x48, %esi callq 0xd5b0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEEEN4ImplD0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_10], rdi call _ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEEEN4ImplD2Ev; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl() mov rdi, [rbp+var_10]; void * mov esi, 48h ; 'H'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl(void *a1) { ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl((long long)a1); operator delete(a1, 0x48uLL); }
~Impl: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x0015f850 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x48 CALL 0x0010d5b0 ADD RSP,0x10 POP RBP RET
/* ~Impl() */ void __thiscall ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node>()>)::Impl::~Impl(Impl *this) { ~Impl(this); operator_delete(this,0x48); return; }
39,966
char* fmt::v10::detail::write_significand<char, unsigned int, 0>(char*, unsigned int, int, int, char)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
inline auto write_significand(Char* out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> Char* { if (!decimal_point) return format_decimal(out, significand, significand_size).end; out += significand_size + 1; Char* end = out; int floating_size = significand_size - integral_size; for (int i = floating_size / 2; i > 0; --i) { out -= 2; copy2(out, digits2(static_cast<std::size_t>(significand % 100))); significand /= 100; } if (floating_size % 2 != 0) { *--out = static_cast<Char>('0' + significand % 10); significand /= 10; } *--out = decimal_point; format_decimal(out - integral_size, significand, integral_size); return end; }
O0
c
char* fmt::v10::detail::write_significand<char, unsigned int, 0>(char*, unsigned int, int, int, char): subq $0x68, %rsp movb %r8b, %al movq %rdi, 0x48(%rsp) movl %esi, 0x44(%rsp) movl %edx, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movb %al, 0x3b(%rsp) cmpb $0x0, 0x3b(%rsp) jne 0xad58e movq 0x48(%rsp), %rdi movl 0x44(%rsp), %esi movl 0x40(%rsp), %edx callq 0xa0100 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x50(%rsp) jmp 0xad6ce movl 0x40(%rsp), %ecx addl $0x1, %ecx movq 0x48(%rsp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) movl 0x40(%rsp), %eax subl 0x3c(%rsp), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, 0x18(%rsp) cmpl $0x0, 0x18(%rsp) jle 0xad63b movq 0x48(%rsp), %rax addq $-0x2, %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, (%rsp) movl 0x44(%rsp), %eax movl $0x64, %ecx xorl %edx, %edx divl %ecx movl %edx, %eax movl %eax, %edi callq 0xa0480 movq (%rsp), %rcx movq %rcx, 0x60(%rsp) movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rax movq 0x58(%rsp), %rcx movw (%rcx), %cx movw %cx, (%rax) movl 0x44(%rsp), %eax movl $0x64, %ecx xorl %edx, %edx divl %ecx movl %eax, 0x44(%rsp) movl 0x18(%rsp), %eax addl $-0x1, %eax movl %eax, 0x18(%rsp) jmp 0xad5cb movl 0x1c(%rsp), %eax movl $0x2, %ecx cltd idivl %ecx cmpl $0x0, %edx je 0xad683 movl 0x44(%rsp), %eax movl $0xa, %ecx xorl %edx, %edx divl %ecx addl $0x30, %edx movb %dl, %cl movq 0x48(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x48(%rsp) movb %cl, -0x1(%rax) movl 0x44(%rsp), %eax movl $0xa, %ecx xorl %edx, %edx divl %ecx movl %eax, 0x44(%rsp) movb 0x3b(%rsp), %cl movq 0x48(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x48(%rsp) movb %cl, -0x1(%rax) movq 0x48(%rsp), %rdi movslq 0x3c(%rsp), %rcx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl 0x44(%rsp), %esi movl 0x3c(%rsp), %edx callq 0xa0100 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax addq $0x68, %rsp retq nopl (%rax,%rax)
_ZN3fmt3v106detail17write_significandIcjTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_: sub rsp, 68h mov al, r8b mov [rsp+68h+var_24+4], rdi mov dword ptr [rsp+68h+var_24], esi mov [rsp+68h+var_28], edx mov [rsp+68h+var_2C], ecx mov [rsp+68h+var_2D], al cmp [rsp+68h+var_2D], 0 jnz short loc_AD58E mov rdi, [rsp+68h+var_24+4] mov esi, dword ptr [rsp+68h+var_24]; unsigned __int64 mov edx, [rsp+68h+var_28] call _ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,uint>(char *,uint,int) mov [rsp+68h+var_40], rax mov [rsp+68h+var_38], rdx mov rax, [rsp+68h+var_38] mov [rsp+68h+var_18], rax jmp loc_AD6CE loc_AD58E: mov ecx, [rsp+68h+var_28] add ecx, 1 mov rax, [rsp+68h+var_24+4] movsxd rcx, ecx add rax, rcx mov [rsp+68h+var_24+4], rax mov rax, [rsp+68h+var_24+4] mov [rsp+68h+var_48], rax mov eax, [rsp+68h+var_28] sub eax, [rsp+68h+var_2C] mov [rsp+68h+var_4C], eax mov eax, [rsp+68h+var_4C] mov ecx, 2 cdq idiv ecx mov [rsp+68h+var_50], eax loc_AD5CB: cmp [rsp+68h+var_50], 0 jle short loc_AD63B mov rax, [rsp+68h+var_24+4] add rax, 0FFFFFFFFFFFFFFFEh mov [rsp+68h+var_24+4], rax mov rax, [rsp+68h+var_24+4] mov [rsp+68h+var_68], rax mov eax, dword ptr [rsp+68h+var_24] mov ecx, 64h ; 'd' xor edx, edx div ecx mov eax, edx mov edi, eax; this call _ZN3fmt3v106detail7digits2Em; fmt::v10::detail::digits2(ulong) mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_8], rcx mov [rsp+68h+var_10], rax mov rax, [rsp+68h+var_8] mov rcx, [rsp+68h+var_10] mov cx, [rcx] mov [rax], cx mov eax, dword ptr [rsp+68h+var_24] mov ecx, 64h ; 'd' xor edx, edx div ecx mov dword ptr [rsp+68h+var_24], eax mov eax, [rsp+68h+var_50] add eax, 0FFFFFFFFh mov [rsp+68h+var_50], eax jmp short loc_AD5CB loc_AD63B: mov eax, [rsp+68h+var_4C] mov ecx, 2 cdq idiv ecx cmp edx, 0 jz short loc_AD683 mov eax, dword ptr [rsp+68h+var_24] mov ecx, 0Ah xor edx, edx div ecx add edx, 30h ; '0' mov cl, dl mov rax, [rsp+68h+var_24+4] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+68h+var_24+4], rdx mov [rax-1], cl mov eax, dword ptr [rsp+68h+var_24] mov ecx, 0Ah xor edx, edx div ecx mov dword ptr [rsp+68h+var_24], eax loc_AD683: mov cl, [rsp+68h+var_2D] mov rax, [rsp+68h+var_24+4] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+68h+var_24+4], rdx mov [rax-1], cl mov rdi, [rsp+68h+var_24+4] movsxd rcx, [rsp+68h+var_2C] xor eax, eax sub rax, rcx add rdi, rax mov esi, dword ptr [rsp+68h+var_24] mov edx, [rsp+68h+var_2C] call _ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,uint>(char *,uint,int) mov [rsp+68h+var_60], rax mov [rsp+68h+var_58], rdx mov rax, [rsp+68h+var_48] mov [rsp+68h+var_18], rax loc_AD6CE: mov rax, [rsp+68h+var_18] add rsp, 68h retn
_WORD * ZN3fmt3v106detail17write_significandIcjTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_( long long a1, unsigned int a2, int a3, int a4, char a5) { long long v5; // rdx _WORD *v6; // rax int i; // [rsp+18h] [rbp-50h] int v9; // [rsp+1Ch] [rbp-4Ch] _WORD *v10; // [rsp+20h] [rbp-48h] unsigned int v13; // [rsp+44h] [rbp-24h] _WORD *v14; // [rsp+48h] [rbp-20h] v13 = a2; if ( a5 ) { v14 = (_WORD *)(a3 + 1 + a1); v10 = v14; v9 = a3 - a4; for ( i = (a3 - a4) / 2; i > 0; --i ) { *--v14 = *(_WORD *)fmt::v10::detail::digits2((fmt::v10::detail *)(v13 % 0x64)); v13 /= 0x64u; } if ( v9 % 2 ) { v6 = v14; v14 = (_WORD *)((char *)v14 - 1); *((_BYTE *)v6 - 1) = v13 % 0xA + 48; v13 /= 0xAu; } *((_BYTE *)v14 - 1) = a5; fmt::v10::detail::format_decimal<char,unsigned int>((long long)v14 - a4 - 1, v13, a4); return v10; } else { fmt::v10::detail::format_decimal<char,unsigned int>(a1, a2, a3); return (_WORD *)v5; } }
_ZN3fmt3v106detail17write_significandIcjTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_: SUB RSP,0x68 MOV AL,R8B MOV qword ptr [RSP + 0x48],RDI MOV dword ptr [RSP + 0x44],ESI MOV dword ptr [RSP + 0x40],EDX MOV dword ptr [RSP + 0x3c],ECX MOV byte ptr [RSP + 0x3b],AL CMP byte ptr [RSP + 0x3b],0x0 JNZ 0x001ad58e MOV RDI,qword ptr [RSP + 0x48] MOV ESI,dword ptr [RSP + 0x44] MOV EDX,dword ptr [RSP + 0x40] CALL 0x001a0100 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],RAX JMP 0x001ad6ce LAB_001ad58e: MOV ECX,dword ptr [RSP + 0x40] ADD ECX,0x1 MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX MOV EAX,dword ptr [RSP + 0x40] SUB EAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x1c] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RSP + 0x18],EAX LAB_001ad5cb: CMP dword ptr [RSP + 0x18],0x0 JLE 0x001ad63b MOV RAX,qword ptr [RSP + 0x48] ADD RAX,-0x2 MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP],RAX MOV EAX,dword ptr [RSP + 0x44] MOV ECX,0x64 XOR EDX,EDX DIV ECX MOV EAX,EDX MOV EDI,EAX CALL 0x001a0480 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x60],RCX MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x58] MOV CX,word ptr [RCX] MOV word ptr [RAX],CX MOV EAX,dword ptr [RSP + 0x44] MOV ECX,0x64 XOR EDX,EDX DIV ECX MOV dword ptr [RSP + 0x44],EAX MOV EAX,dword ptr [RSP + 0x18] ADD EAX,-0x1 MOV dword ptr [RSP + 0x18],EAX JMP 0x001ad5cb LAB_001ad63b: MOV EAX,dword ptr [RSP + 0x1c] MOV ECX,0x2 CDQ IDIV ECX CMP EDX,0x0 JZ 0x001ad683 MOV EAX,dword ptr [RSP + 0x44] MOV ECX,0xa XOR EDX,EDX DIV ECX ADD EDX,0x30 MOV CL,DL MOV RAX,qword ptr [RSP + 0x48] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + 0x48],RDX MOV byte ptr [RAX + -0x1],CL MOV EAX,dword ptr [RSP + 0x44] MOV ECX,0xa XOR EDX,EDX DIV ECX MOV dword ptr [RSP + 0x44],EAX LAB_001ad683: MOV CL,byte ptr [RSP + 0x3b] MOV RAX,qword ptr [RSP + 0x48] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + 0x48],RDX MOV byte ptr [RAX + -0x1],CL MOV RDI,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x3c] XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV ESI,dword ptr [RSP + 0x44] MOV EDX,dword ptr [RSP + 0x3c] CALL 0x001a0100 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x50],RAX LAB_001ad6ce: MOV RAX,qword ptr [RSP + 0x50] ADD RSP,0x68 RET
char * _ZN3fmt3v106detail17write_significandIcjTnNSt9enable_ifIXsr3std11is_integralIT0_EE5valueEiE4typeELi0EEEPT_S8_S4_iiS7_ (char *param_1,uint param_2,int param_3,int param_4,char param_5) { int2 *puVar1; char *extraout_RDX; int local_50; uint local_24; char *local_20; char *local_18; if (param_5 == '\0') { fmt::v10::detail::format_decimal<char,unsigned_int>(param_1,param_2,param_3); local_18 = extraout_RDX; } else { local_18 = param_1 + (param_3 + 1); local_24 = param_2; local_20 = local_18; for (local_50 = (param_3 - param_4) / 2; 0 < local_50; local_50 = local_50 + -1) { local_20 = local_20 + -2; puVar1 = (int2 *)fmt::v10::detail::digits2((ulong)local_24 % 100); *(int2 *)local_20 = *puVar1; local_24 = local_24 / 100; } if ((param_3 - param_4) % 2 != 0) { local_20[-1] = (char)((ulong)local_24 % 10) + '0'; local_24 = local_24 / 10; local_20 = local_20 + -1; } local_20[-1] = param_5; fmt::v10::detail::format_decimal<char,unsigned_int> (local_20 + (-1 - (long)param_4),local_24,param_4); } return local_18; }
39,967
mi_uniquedef_write
eloqsql/storage/myisam/mi_open.c
uint mi_uniquedef_write(File file, MI_UNIQUEDEF *def) { uchar buff[MI_UNIQUEDEF_SIZE]; uchar *ptr=buff; mi_int2store(ptr,def->keysegs); ptr+=2; *ptr++= (uchar) def->key; *ptr++ = (uchar) def->null_are_equal; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O0
c
mi_uniquedef_write: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq -0xc(%rbp), %rcx movq %rcx, -0x20(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x24(%rbp) movb -0x24(%rbp), %dl movq -0x20(%rbp), %rax movb %dl, 0x1(%rax) movb -0x23(%rbp), %dl movq -0x20(%rbp), %rax movb %dl, (%rax) movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movb 0x2(%rax), %dl movq -0x20(%rbp), %rax movq %rax, %rsi incq %rsi movq %rsi, -0x20(%rbp) movb %dl, (%rax) movq -0x18(%rbp), %rax movb 0x3(%rax), %dl movq -0x20(%rbp), %rax movq %rax, %rsi incq %rsi movq %rsi, -0x20(%rbp) movb %dl, (%rax) movl -0x10(%rbp), %edx movq -0x20(%rbp), %r8 subq %rcx, %r8 leaq 0xa179a(%rip), %rdi # 0x15d256 movl $0x4cb, %esi # imm = 0x4CB movl $0x4, %r9d callq 0xba8e0 testq %rax, %rax setne %al movzbl %al, %eax movl %eax, -0x28(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbbaf3 movl -0x28(%rbp), %eax addq $0x30, %rsp popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
mi_uniquedef_write: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_10], edi mov [rbp+var_18], rsi lea rcx, [rbp+var_C] mov [rbp+var_20], rcx mov rax, [rbp+var_18] movzx eax, word ptr [rax] mov [rbp+var_24], eax mov dl, byte ptr [rbp+var_24] mov rax, [rbp+var_20] mov [rax+1], dl mov dl, byte ptr [rbp+var_24+1] mov rax, [rbp+var_20] mov [rax], dl mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_18] mov dl, [rax+2] mov rax, [rbp+var_20] mov rsi, rax inc rsi mov [rbp+var_20], rsi mov [rax], dl mov rax, [rbp+var_18] mov dl, [rax+3] mov rax, [rbp+var_20] mov rsi, rax inc rsi mov [rbp+var_20], rsi mov [rax], dl mov edx, [rbp+var_10] mov r8, [rbp+var_20] sub r8, rcx lea rdi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4CBh mov r9d, 4 call inline_mysql_file_write_2 test rax, rax setnz al movzx eax, al mov [rbp+var_28], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BBAF3 mov eax, [rbp+var_28] add rsp, 30h pop rbp retn loc_BBAF3: call ___stack_chk_fail
_BOOL8 mi_uniquedef_write(unsigned int a1, unsigned __int16 *a2) { unsigned __int16 v2; // kr00_2 _BYTE v4[4]; // [rsp+24h] [rbp-Ch] BYREF unsigned long long v5; // [rsp+28h] [rbp-8h] BYREF v5 = __readfsqword(0x28u); v2 = *a2; v4[0] = HIBYTE(*a2); v4[1] = v2; v4[2] = *((_BYTE *)a2 + 2); v4[3] = *((_BYTE *)a2 + 3); return inline_mysql_file_write_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x4CBu, a1, (long long)v4, (char *)&v5 - v4, 4LL) != 0; }
mi_uniquedef_write: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x10],EDI MOV qword ptr [RBP + -0x18],RSI LEA RCX,[RBP + -0xc] MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV DL,byte ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x23] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV DL,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,RAX INC RSI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x18] MOV DL,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,RAX INC RSI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RAX],DL MOV EDX,dword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] SUB R8,RCX LEA RDI,[0x25d256] MOV ESI,0x4cb MOV R9D,0x4 CALL 0x001ba8e0 TEST RAX,RAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001bbaf3 MOV EAX,dword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET LAB_001bbaf3: CALL 0x0012a270
bool mi_uniquedef_write(int4 param_1,int2 *param_2) { long lVar1; long in_FS_OFFSET; int1 local_2c; int1 uStack_2b; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2c = (int1)*param_2; local_13 = local_2c; uStack_2b = (int1)((ushort)*param_2 >> 8); local_14 = uStack_2b; local_12 = *(int1 *)(param_2 + 1); local_11 = *(int1 *)((long)param_2 + 3); lVar1 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x4cb, param_1,&local_14,(long)&local_10 - (long)&local_14,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return lVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,968
ac_bytecode_emit_rule
alca/libalca/bytecode.c
ac_error ac_bytecode_emit_rule(ac_builder *builder, ac_statement *rule) { ac_module_load_callback callback; if (rule->u.rule.event) { if (!ac_context_get_module(builder->ctx, rule->u.rule.event->value, &callback)) return ERROR_MODULE; builder->module_name = rule->u.rule.event->value; } if (rule->u.rule.external) return ERROR_SUCCESS; // external rules have no code to emit ac_error err = bytecode_emit_expr(builder, rule->u.rule.condition); if (err != ERROR_SUCCESS) return err; ac_arena_add_code(builder->code, OP_HLT); // indicates end of rule. vm exits loop when it sees halt return ERROR_SUCCESS; }
O0
c
ac_bytecode_emit_rule: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x14749 movq -0x10(%rbp), %rax movq 0x20(%rax), %rdi movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq 0x8(%rax), %rsi leaq -0x20(%rbp), %rdx callq 0x79a0 cmpl $0x0, %eax jne 0x14736 movl $0xe, -0x4(%rbp) jmp 0x14797 movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax cmpl $0x0, 0x8(%rax) je 0x1475c movl $0x0, -0x4(%rbp) jmp 0x14797 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi callq 0x7480 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1477e movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x14797 movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi movl $0xfffffffe, %esi # imm = 0xFFFFFFFE callq 0x7150 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
ac_bytecode_emit_rule: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+18h], 0 jz short loc_14749 mov rax, [rbp+var_10] mov rdi, [rax+20h] mov rax, [rbp+var_18] mov rax, [rax+18h] mov rsi, [rax+8] lea rdx, [rbp+var_20] call _ac_context_get_module cmp eax, 0 jnz short loc_14736 mov [rbp+var_4], 0Eh jmp short loc_14797 loc_14736: mov rax, [rbp+var_18] mov rax, [rax+18h] mov rcx, [rax+8] mov rax, [rbp+var_10] mov [rax], rcx loc_14749: mov rax, [rbp+var_18] cmp dword ptr [rax+8], 0 jz short loc_1475C mov [rbp+var_4], 0 jmp short loc_14797 loc_1475C: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+20h] call _bytecode_emit_expr mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1477E mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_14797 loc_1477E: mov rax, [rbp+var_10] mov rdi, [rax+10h] mov esi, 0FFFFFFFEh call _ac_arena_add_code mov [rbp+var_4], 0 loc_14797: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ac_bytecode_emit_rule(_QWORD *a1, long long a2) { unsigned int v3; // [rsp+Ch] [rbp-24h] long long v4; // [rsp+10h] [rbp-20h] BYREF long long v5; // [rsp+18h] [rbp-18h] _QWORD *v6; // [rsp+20h] [rbp-10h] v6 = a1; v5 = a2; if ( *(_QWORD *)(a2 + 24) ) { if ( !(unsigned int)ac_context_get_module(v6[4], *(_QWORD *)(*(_QWORD *)(v5 + 24) + 8LL), &v4) ) return 14; *v6 = *(_QWORD *)(*(_QWORD *)(v5 + 24) + 8LL); } if ( *(_DWORD *)(v5 + 8) ) { return 0; } else { v3 = bytecode_emit_expr(v6, *(_QWORD *)(v5 + 32)); if ( v3 ) { return v3; } else { ac_arena_add_code(v6[2], -2); return 0; } } }
ac_bytecode_emit_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x18],0x0 JZ 0x00114749 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RAX + 0x8] LEA RDX,[RBP + -0x20] CALL 0x001079a0 CMP EAX,0x0 JNZ 0x00114736 MOV dword ptr [RBP + -0x4],0xe JMP 0x00114797 LAB_00114736: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_00114749: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0x0 JZ 0x0011475c MOV dword ptr [RBP + -0x4],0x0 JMP 0x00114797 LAB_0011475c: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] CALL 0x00107480 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011477e MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x00114797 LAB_0011477e: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] MOV ESI,0xfffffffe CALL 0x00107150 MOV dword ptr [RBP + -0x4],0x0 LAB_00114797: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int ac_bytecode_emit_rule(int8 *param_1,long param_2) { int iVar1; int1 local_28 [8]; long local_20; int8 *local_18; int local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x18) != 0) { iVar1 = ac_context_get_module (param_1[4],*(int8 *)(*(long *)(param_2 + 0x18) + 8),local_28); if (iVar1 == 0) { return 0xe; } *local_18 = *(int8 *)(*(long *)(local_20 + 0x18) + 8); } if (*(int *)(local_20 + 8) == 0) { local_c = bytecode_emit_expr(local_18,*(int8 *)(local_20 + 0x20)); if (local_c == 0) { ac_arena_add_code(local_18[2],0xfffffffe); local_c = 0; } } else { local_c = 0; } return local_c; }
39,969
my_hash_free_elements
eloqsql/mysys/hash.c
static inline void my_hash_free_elements(HASH *hash) { uint records= hash->records; if (records == 0) return; /* Set records to 0 early to guard against anyone looking at the structure during the free process */ hash->records= 0; if (hash->free) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); HASH_LINK *end= data + records; do { (*hash->free)((data++)->data); } while (data < end); } }
O0
c
my_hash_free_elements: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x2e73f jmp 0x2e79d movq -0x8(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x2e79d movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x60(%rax), %rax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x10, %rdx movq %rdx, -0x18(%rbp) movq 0x8(%rcx), %rdi callq *%rax movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x2e774 jmp 0x2e79d addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_free_elements: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_C], eax cmp [rbp+var_C], 0 jnz short loc_2E73F jmp short loc_2E79D loc_2E73F: mov rax, [rbp+var_8] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_2E79D mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_C] shl rcx, 4 add rax, rcx mov [rbp+var_20], rax loc_2E774: mov rax, [rbp+var_8] mov rax, [rax+60h] mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 10h mov [rbp+var_18], rdx mov rdi, [rcx+8] call rax mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_2E774 jmp short $+2 loc_2E79D: add rsp, 20h pop rbp retn
unsigned long long my_hash_free_elements(unsigned long long a1) { unsigned long long result; // rax unsigned long long v2; // rcx unsigned long long v3; // [rsp+0h] [rbp-20h] unsigned long long v4; // [rsp+8h] [rbp-18h] unsigned int v5; // [rsp+14h] [rbp-Ch] result = *(_QWORD *)(a1 + 24); v5 = result; if ( (_DWORD)result ) { *(_QWORD *)(a1 + 24) = 0LL; result = a1; if ( *(_QWORD *)(a1 + 96) ) { v4 = *(_QWORD *)(a1 + 40); v3 = 16LL * v5 + v4; do { v2 = v4; v4 += 16LL; (*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8)); result = v4; } while ( v4 < v3 ); } } return result; }
my_hash_free_elements: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x0012e73f JMP 0x0012e79d LAB_0012e73f: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x0012e79d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_0012e774: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,RCX ADD RDX,0x10 MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RCX + 0x8] CALL RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x0012e774 JMP 0x0012e79d LAB_0012e79d: ADD RSP,0x20 POP RBP RET
void my_hash_free_elements(long param_1) { ulong uVar1; ulong uVar2; ulong uVar3; ulong local_20; uVar1 = *(ulong *)(param_1 + 0x18); if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar2 = *(ulong *)(param_1 + 0x28); local_20 = uVar2; do { uVar3 = local_20 + 0x10; (**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8)); local_20 = uVar3; } while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10); } return; }
39,970
safe_hash_free
eloqsql/mysys/my_safehash.c
void safe_hash_free(SAFE_HASH *hash) { /* Test if safe_hash_init succeeded. This will also guard us against multiple free calls. */ if (hash->default_value) { my_hash_free(&hash->hash); mysql_rwlock_destroy(&hash->mutex); hash->default_value=0; } }
O0
c
safe_hash_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x108(%rax) je 0xfe232 movq -0x8(%rbp), %rdi addq $0x98, %rdi callq 0xdd930 movq -0x8(%rbp), %rdi callq 0xfe240 movq -0x8(%rbp), %rax movq $0x0, 0x108(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
safe_hash_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+108h], 0 jz short loc_FE232 mov rdi, [rbp+var_8] add rdi, 98h call my_hash_free mov rdi, [rbp+var_8] call inline_mysql_rwlock_destroy_1 mov rax, [rbp+var_8] mov qword ptr [rax+108h], 0 loc_FE232: add rsp, 10h pop rbp retn
long long safe_hash_free(long long a1) { long long result; // rax result = a1; if ( *(_QWORD *)(a1 + 264) ) { my_hash_free(a1 + 152); inline_mysql_rwlock_destroy_1(a1); result = a1; *(_QWORD *)(a1 + 264) = 0LL; } return result; }
safe_hash_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x108],0x0 JZ 0x001fe232 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x98 CALL 0x001dd930 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fe240 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x108],0x0 LAB_001fe232: ADD RSP,0x10 POP RBP RET
void safe_hash_free(long param_1) { if (*(long *)(param_1 + 0x108) != 0) { my_hash_free(param_1 + 0x98); inline_mysql_rwlock_destroy(param_1); *(int8 *)(param_1 + 0x108) = 0; } return; }
39,971
minja::Value::at(unsigned long)
monkey531[P]llama/common/minja.hpp
Value& at(size_t index) { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_array()) return array_->at(index); if (is_object()) return object_->at(index); throw std::runtime_error("Value is not an array or object: " + dump()); }
O2
cpp
minja::Value::at(unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsi, 0x8(%rsp) callq 0x6390a testb %al, %al jne 0x6b217 movq 0x10(%r14), %rdi testq %rdi, %rdi je 0x6b1fb movq %rbx, %rsi addq $0x50, %rsp popq %rbx popq %r14 popq %rbp jmp 0x6b41c movq 0x20(%r14), %rdi testq %rdi, %rdi je 0x6b247 leaq 0x8(%rsp), %rsi callq 0x6b43a addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x4a8d1(%rip), %rsi # 0xb5afa movq %rax, %rdi callq 0x24320 movq 0x94db8(%rip), %rsi # 0xffff0 movq 0x94d11(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x10(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x4afdf(%rip), %rsi # 0xb624a leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x58a46 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 xorl %ebp, %ebp movq 0x94d5d(%rip), %rsi # 0xffff0 movq 0x94cb6(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x251b8 jmp 0x6b2b7 movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x6b2cd jmp 0x6b2d5 jmp 0x6b2ca movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60 nop
_ZN5minja5Value2atEm: push rbp push r14 push rbx sub rsp, 50h mov rbx, rsi mov r14, rdi mov [rsp+68h+var_60], rsi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz short loc_6B217 mov rdi, [r14+10h] test rdi, rdi jz short loc_6B1FB mov rsi, rbx add rsp, 50h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong) loc_6B1FB: mov rdi, [r14+20h] test rdi, rdi jz short loc_6B247 lea rsi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_ add rsp, 50h pop rbx pop r14 pop rbp retn loc_6B217: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6B247: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_58] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: " lea rdi, [rsp+68h+var_38] lea rdx, [rsp+68h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6B2B7 mov r14, rax mov bpl, 1 loc_6B2B7: lea rdi, [rsp+68h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6B2CD jmp short loc_6B2D5 jmp short $+2 loc_6B2CA: mov r14, rax loc_6B2CD: mov rdi, rbx; void * call ___cxa_free_exception loc_6B2D5: mov rdi, r14 call __Unwind_Resume
long long minja::Value::at(minja::Value *this, long long a2) { long long v3; // rdi long long v5; // rdi std::runtime_error *exception; // rbx void *v7; // rbx long long v8; // [rsp+8h] [rbp-60h] BYREF _BYTE v9[32]; // [rsp+10h] [rbp-58h] BYREF _BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF v8 = a2; if ( minja::Value::is_null(this) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = *((_QWORD *)this + 2); if ( v3 ) return std::vector<minja::Value>::at(v3, a2); v5 = *((_QWORD *)this + 4); if ( !v5 ) { v7 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9); std::runtime_error::runtime_error(v7, v10); __cxa_throw( v7, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_( v5, &v8); }
at: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R14,RDI MOV qword ptr [RSP + 0x8],RSI CALL 0x0016390a TEST AL,AL JNZ 0x0016b217 MOV RDI,qword ptr [R14 + 0x10] TEST RDI,RDI JZ 0x0016b1fb MOV RSI,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP JMP 0x0016b41c LAB_0016b1fb: MOV RDI,qword ptr [R14 + 0x20] TEST RDI,RDI JZ 0x0016b247 LEA RSI,[RSP + 0x8] CALL 0x0016b43a ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0016b217: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016b222: LEA RSI,[0x1b5afa] MOV RDI,RAX CALL 0x00124320 LAB_0016b231: MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0 LAB_0016b247: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016b252: LEA RDI,[RSP + 0x10] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163320 LAB_0016b264: LEA RSI,[0x1b624a] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x10] CALL 0x00158a46 MOV BPL,0x1 LAB_0016b27d: LEA RSI,[RSP + 0x30] MOV RDI,RBX CALL 0x00124e10 XOR EBP,EBP MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0
/* minja::Value::at(unsigned long) */ void __thiscall minja::Value::at(Value *this,ulong param_1) { char cVar1; runtime_error *prVar2; ulong local_60; int1 local_58 [32]; string local_38 [32]; local_60 = param_1; cVar1 = is_null(this); if (cVar1 != '\0') { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016b222 to 0016b230 has its CatchHandler @ 0016b2ca */ std::runtime_error::runtime_error(prVar2,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) { std::vector<minja::Value,std::allocator<minja::Value>>::at (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1); return; } if (*(long *)(this + 0x20) != 0) { _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_ (*(long *)(this + 0x20),&local_60); return; } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016b252 to 0016b263 has its CatchHandler @ 0016b2c8 */ dump_abi_cxx11_((int)local_58,SUB81(this,0)); /* try { // try from 0016b264 to 0016b279 has its CatchHandler @ 0016b2b1 */ std::operator+((char *)local_38,(string *)"Value is not an array or object: "); /* try { // try from 0016b27d to 0016b2a1 has its CatchHandler @ 0016b2a2 */ std::runtime_error::runtime_error(prVar2,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); }
39,972
WStrToUtf8(std::basic_string_view<wchar_t, std::char_traits<wchar_t>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
SylCore-WoTLK/src/common/Utilities/Util.cpp
bool WStrToUtf8(std::wstring_view wstr, std::string& utf8str) { try { std::string utf8str2; utf8str2.resize(wstr.size() * 4); // allocate for most long case if (!wstr.empty()) { char* oend = utf8::utf16to8(wstr.begin(), wstr.end(), &utf8str2[0]); utf8str2.resize(oend - (&utf8str2[0])); // remove unused tail } utf8str = utf8str2; } catch (std::exception const&) { utf8str.clear(); return false; } return true; }
O3
cpp
WStrToUtf8(std::basic_string_view<wchar_t, std::char_traits<wchar_t>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq $0x0, -0x8(%r12) movb $0x0, (%r12) leaq (,%rdi,4), %rsi leaq 0x8(%rsp), %rdi xorl %edx, %edx callq 0x47778 testq %r15, %r15 je 0xc5888 leaq (%r14,%r15,4), %rsi movq 0x8(%rsp), %rdx movq %r14, %rdi callq 0xc6455 leaq 0x8(%rsp), %rdi subq (%rdi), %rax movq %rax, %rsi xorl %edx, %edx callq 0x47778 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3eb0e movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xc58ac movq 0x18(%rsp), %rsi incq %rsi callq 0xd32e8 movb $0x1, %al addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xc58bc movq %rdx, %r15 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xc58d9 movq 0x18(%rsp), %rsi incq %rsi callq 0xd32e8 movq %r14, %rdi cmpl $0x1, %r15d jne 0xc58fe callq 0x1b0d0 movq $0x0, 0x8(%rbx) movq (%rbx), %rax movb $0x0, (%rax) callq 0x1be70 xorl %eax, %eax jmp 0xc58ae callq 0x1bba0
_Z10WStrToUtf8St17basic_string_viewIwSt11char_traitsIwEERNSt7__cxx1112basic_stringIcS0_IcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rdx mov r14, rsi mov r15, rdi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 mov qword ptr [r12-8], 0 mov byte ptr [r12], 0 lea rsi, ds:0[rdi*4] lea rdi, [rsp+48h+var_40] xor edx, edx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) test r15, r15 jz short loc_C5888 lea rsi, [r14+r15*4] mov rdx, [rsp+48h+var_40] mov rdi, r14 call _ZN4utf88utf16to8IPKwPcEET0_T_S5_S4_; utf8::utf16to8<wchar_t const*,char *>(wchar_t const*,wchar_t const*,char *) lea rdi, [rsp+48h+var_40] sub rax, [rdi] mov rsi, rax xor edx, edx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) loc_C5888: lea rsi, [rsp+48h+var_40] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_C58AC mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_C58AC: mov al, 1 loc_C58AE: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_C58BC: mov r15, rdx mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_C58D9 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_C58D9: mov rdi, r14; void * cmp r15d, 1 jnz short loc_C58FE call ___cxa_begin_catch mov qword ptr [rbx+8], 0 mov rax, [rbx] mov byte ptr [rax], 0 call ___cxa_end_catch xor eax, eax jmp short loc_C58AE loc_C58FE: call __Unwind_Resume
char WStrToUtf8(long long a1, long long a2, _QWORD *a3) { long long v4; // rax void *v6[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v7[6]; // [rsp+18h] [rbp-30h] BYREF v6[0] = v7; v6[1] = 0LL; LOBYTE(v7[0]) = 0; std::string::resize(v6, 4 * a1, 0); if ( a1 ) { v4 = utf8::utf16to8<wchar_t const*,char *>(a2, a2 + 4 * a1, v6[0]); std::string::resize(v6, v4 - (unsigned long long)v6[0], 0); } std::string::_M_assign(a3, v6); if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); return 1; }
WStrToUtf8: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],0x0 MOV byte ptr [R12],0x0 LEA RSI,[RDI*0x4] LAB_001c5854: LEA RDI,[RSP + 0x8] XOR EDX,EDX CALL 0x00147778 TEST R15,R15 JZ 0x001c5888 LEA RSI,[R14 + R15*0x4] MOV RDX,qword ptr [RSP + 0x8] LAB_001c586e: MOV RDI,R14 CALL 0x001c6455 LEA RDI,[RSP + 0x8] SUB RAX,qword ptr [RDI] MOV RSI,RAX XOR EDX,EDX CALL 0x00147778 LAB_001c5888: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0013eb0e LAB_001c5895: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001c58ac MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001d32e8 LAB_001c58ac: MOV AL,0x1 LAB_001c58ae: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* WStrToUtf8(std::basic_string_view<wchar_t, std::char_traits<wchar_t> >, std::__cxx11::string&) */ int8 WStrToUtf8(long param_1,wchar_t *param_2,string *param_3) { char *pcVar1; char *local_40; int8 local_38; char local_30; int7 uStack_2f; local_38 = 0; local_30 = '\0'; /* try { // try from 001c5854 to 001c585f has its CatchHandler @ 001c58bc */ local_40 = &local_30; std::__cxx11::string::resize((string *)&local_40,param_1 * 4,'\0'); if (param_1 != 0) { /* try { // try from 001c586e to 001c5887 has its CatchHandler @ 001c58ba */ pcVar1 = utf8::utf16to8<wchar_t_const*,char*>(param_2,param_2 + param_1,local_40); std::__cxx11::string::resize((string *)&local_40,(long)pcVar1 - (long)local_40,'\0'); } /* try { // try from 001c5888 to 001c5894 has its CatchHandler @ 001c58bc */ std::__cxx11::string::_M_assign(param_3,(string *)&local_40); if (local_40 != &local_30) { operator_delete(local_40,CONCAT71(uStack_2f,local_30) + 1); } return 1; }
39,973
mi_search_last
eloqsql/storage/myisam/mi_search.c
int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *buff,*page; DBUG_ENTER("_mi_search_last"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } buff=info->buff; do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } page= buff+mi_getint(buff); nod_flag=mi_test_if_nod(buff); } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page, &info->lastkey_length)) DBUG_RETURN(-1); info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); info->int_keypos=info->int_maxpos=page; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); }
O3
c
mi_search_last: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpq $-0x1, %rdx je 0x88fb5 movq %rdx, %rax movq %rsi, %r14 movq 0x100(%rbx), %r12 movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx movl $0x3, %ecx movq %r12, %r8 xorl %r9d, %r9d callq 0x86a1c testq %rax, %rax je 0x88fc0 movzbl (%r12), %r15d xorl %r13d, %r13d testb %r15b, %r15b jns 0x88f13 movq (%rbx), %rax movl 0x17c(%rax), %r13d movzbl 0x1(%r12), %eax andl $0x7f, %r15d shll $0x8, %r15d orq %rax, %r15 addq %r12, %r15 movl %r13d, %edi movq %r15, %rsi callq 0x87396 cmpq $-0x1, %rax jne 0x88eda movq 0x108(%rbx), %rcx leaq 0x1d8(%rbx), %r9 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movq %r15, %r8 callq 0x88886 testq %rax, %rax je 0x88fcb movl 0x1d8(%rbx), %edx addq 0x108(%rbx), %rdx xorl %r12d, %r12d movq %rbx, %rdi xorl %esi, %esi callq 0x87475 movq %rax, 0x170(%rbx) movq %r15, 0x130(%rbx) movq %r15, 0x128(%rbx) movl %r13d, 0x138(%rbx) movl 0x1c(%r14), %eax movl %eax, 0x13c(%rbx) movq 0x190(%rbx), %rax movq %rax, 0x198(%rbx) movw $0x0, 0x33c(%rbx) jmp 0x88fd1 callq 0xa813e movl $0x78, (%rax) movq $-0x1, 0x170(%rbx) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_search_last: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_88FB5 mov rax, rdx mov r14, rsi mov r12, [rbx+100h] loc_88EDA: mov rdi, rbx mov rsi, r14 mov rdx, rax mov ecx, 3 mov r8, r12 xor r9d, r9d call _mi_fetch_keypage test rax, rax jz loc_88FC0 movzx r15d, byte ptr [r12] xor r13d, r13d test r15b, r15b jns short loc_88F13 mov rax, [rbx] mov r13d, [rax+17Ch] loc_88F13: movzx eax, byte ptr [r12+1] and r15d, 7Fh shl r15d, 8 or r15, rax add r15, r12 mov edi, r13d mov rsi, r15 call _mi_kpos cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_88EDA mov rcx, [rbx+108h] lea r9, [rbx+1D8h] mov rdi, rbx mov rsi, r14 mov rdx, r12 mov r8, r15 call _mi_get_last_key test rax, rax jz short loc_88FCB mov edx, [rbx+1D8h] add rdx, [rbx+108h] xor r12d, r12d mov rdi, rbx xor esi, esi call _mi_dpos mov [rbx+170h], rax mov [rbx+130h], r15 mov [rbx+128h], r15 mov [rbx+138h], r13d mov eax, [r14+1Ch] mov [rbx+13Ch], eax mov rax, [rbx+190h] mov [rbx+198h], rax mov word ptr [rbx+33Ch], 0 jmp short loc_88FD1 loc_88FB5: call _my_thread_var mov dword ptr [rax], 78h ; 'x' loc_88FC0: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh loc_88FCB: mov r12d, 0FFFFFFFFh loc_88FD1: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_search_last(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rax long long v4; // r12 unsigned int v5; // r13d unsigned long long v6; // r15 unsigned int v7; // r12d if ( a3 == -1LL ) { *(_DWORD *)my_thread_var(a1) = 120; } else { v3 = a3; v4 = *(_QWORD *)(a1 + 256); while ( mi_fetch_keypage((_QWORD *)a1, a2, v3) ) { v5 = 0; if ( *(char *)v4 < 0 ) v5 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); v6 = v4 + (*(unsigned __int8 *)(v4 + 1) | (unsigned long long)((unsigned __int8)(*(_BYTE *)v4 & 0x7F) << 8)); v3 = mi_kpos(v5, v6); if ( v3 == -1LL ) { if ( !mi_get_last_key(a1, a2, (char *)v4, *(_BYTE **)(a1 + 264), v6, (_DWORD *)(a1 + 472)) ) return (unsigned int)-1; v7 = 0; *(_QWORD *)(a1 + 368) = mi_dpos((long long *)a1, 0, *(_QWORD *)(a1 + 264) + *(unsigned int *)(a1 + 472)); *(_QWORD *)(a1 + 304) = v6; *(_QWORD *)(a1 + 296) = v6; *(_DWORD *)(a1 + 312) = v5; *(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28); *(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400); *(_WORD *)(a1 + 828) = 0; return v7; } } } *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; }
_mi_search_last: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP RDX,-0x1 JZ 0x00188fb5 MOV RAX,RDX MOV R14,RSI MOV R12,qword ptr [RBX + 0x100] LAB_00188eda: MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX MOV ECX,0x3 MOV R8,R12 XOR R9D,R9D CALL 0x00186a1c TEST RAX,RAX JZ 0x00188fc0 MOVZX R15D,byte ptr [R12] XOR R13D,R13D TEST R15B,R15B JNS 0x00188f13 MOV RAX,qword ptr [RBX] MOV R13D,dword ptr [RAX + 0x17c] LAB_00188f13: MOVZX EAX,byte ptr [R12 + 0x1] AND R15D,0x7f SHL R15D,0x8 OR R15,RAX ADD R15,R12 MOV EDI,R13D MOV RSI,R15 CALL 0x00187396 CMP RAX,-0x1 JNZ 0x00188eda MOV RCX,qword ptr [RBX + 0x108] LEA R9,[RBX + 0x1d8] MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 MOV R8,R15 CALL 0x00188886 TEST RAX,RAX JZ 0x00188fcb MOV EDX,dword ptr [RBX + 0x1d8] ADD RDX,qword ptr [RBX + 0x108] XOR R12D,R12D MOV RDI,RBX XOR ESI,ESI CALL 0x00187475 MOV qword ptr [RBX + 0x170],RAX MOV qword ptr [RBX + 0x130],R15 MOV qword ptr [RBX + 0x128],R15 MOV dword ptr [RBX + 0x138],R13D MOV EAX,dword ptr [R14 + 0x1c] MOV dword ptr [RBX + 0x13c],EAX MOV RAX,qword ptr [RBX + 0x190] MOV qword ptr [RBX + 0x198],RAX MOV word ptr [RBX + 0x33c],0x0 JMP 0x00188fd1 LAB_00188fb5: CALL 0x001a813e MOV dword ptr [RAX],0x78 LAB_00188fc0: MOV qword ptr [RBX + 0x170],-0x1 LAB_00188fcb: MOV R12D,0xffffffff LAB_00188fd1: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _mi_search_last(long *param_1,long param_2,long param_3) { byte *pbVar1; long lVar2; int4 *puVar3; int4 uVar4; byte *pbVar5; if (param_3 == -1) { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x78; LAB_00188fc0: param_1[0x2e] = -1; } else { pbVar1 = (byte *)param_1[0x20]; do { lVar2 = _mi_fetch_keypage(param_1,param_2,param_3,3,pbVar1,0); if (lVar2 == 0) goto LAB_00188fc0; uVar4 = 0; if ((char)*pbVar1 < '\0') { uVar4 = *(int4 *)(*param_1 + 0x17c); } pbVar5 = pbVar1 + ((ulong)((*pbVar1 & 0x7f) << 8) | (ulong)pbVar1[1]); param_3 = _mi_kpos(uVar4,pbVar5); } while (param_3 != -1); lVar2 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar5,param_1 + 0x3b); if (lVar2 != 0) { lVar2 = _mi_dpos(param_1,0,(ulong)*(uint *)(param_1 + 0x3b) + param_1[0x21]); param_1[0x2e] = lVar2; param_1[0x26] = (long)pbVar5; param_1[0x25] = (long)pbVar5; *(int4 *)(param_1 + 0x27) = uVar4; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c); param_1[0x33] = param_1[0x32]; *(int2 *)((long)param_1 + 0x33c) = 0; return 0; } } return 0xffffffff; }
39,974
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b400 movq %rax, %r12 movq (%r14), %rdi callq 0x1b400 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1be00 movq %rbx, %rdi movq %r15, %rsi callq 0x1c190 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c190 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xb0f5a movq (%r13), %rsi incq %rsi callq 0x1b940 movq %r14, %rdi callq 0x1c040
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_B0F5A mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0F5A: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[51],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b400 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011b400 ADD R12,RAX LAB_001b0f15: MOV RDI,RBX MOV RSI,R12 CALL 0x0011be00 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c190 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011c190 LAB_001b0f36: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [51], char const*>(char const (&) [51], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001b0f15 to 001b0f35 has its CatchHandler @ 001b0f43 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
39,975
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x7e02f movq %rbx, %rdi movq %rax, %rsi callq 0x23db0 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x7e056 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x24208 movq %r14, %rdi callq 0x23fd0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_: push r15 push r14 push r12 push rbx push rax mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx mov rdx, rcx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA12_cEEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [12]>(char const*,std::string,char [12] const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA6_KcJS8_RA12_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( long long a1, long long a2, long long a3, long long a4) { long long v6; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v6 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [12]>(a2, a3, a4); std::string::reserve(a1, v6); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA6_KcJS8_RA12_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_( a1, a2, a3, a4); return a1; }
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_0017dfe3: MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX CALL 0x0017e02f MOV RDI,RBX MOV RSI,RAX CALL 0x00123db0 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x0017e056 LAB_0017e00d: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [6], std::__cxx11::string, char const (&) [12]>(char const (&) [6], std::__cxx11::string&&, char const (&) [12]) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (detail *this,char *param_1,string *param_2,char *param_3) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; /* try { // try from 0017dfe3 to 0017e00c has its CatchHandler @ 0017e01c */ concat_length<std::__cxx11::string,char[12]>(param_1,param_2,param_3); std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA6_KcJS8_RA12_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ (this,param_1,param_2,param_3); return this; }
39,976
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a400 movq %rax, %rbp addq 0x8(%r12), %rbp movq %r15, %rdi callq 0x1a400 addq %rax, %rbp addq 0x8(%r14), %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x1ada0 movq %rbx, %rdi movq %r13, %rsi callq 0x1b120 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x1a270 movq %rbx, %rdi movq %r15, %rsi callq 0x1b120 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1a270 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x60c80 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x1a8f0 movq %r14, %rdi callq 0x1afd0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+38h+var_38], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov rbp, rax add rbp, [r12+8] mov rdi, r15 call _strlen add rbp, rax add rbp, [r14+8] mov rdi, rbx mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_60C80 mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_60C80: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( long long a1, long long a2, _QWORD *a3, long long a4, _QWORD *a5) { long long v8; // rbp long long v9; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v8 = a3[1] + strlen(a2); v9 = strlen(a4); std::string::reserve(a1, a5[1] + v9 + v8); std::string::append(a1, a2); std::string::_M_append(a1, *a3, a3[1]); std::string::append(a1, a4); std::string::_M_append(a1, *a5, a5[1]); return a1; }
39,977
ma_state_info_read_dsk
eloqsql/storage/maria/ma_open.c
uint _ma_state_info_read_dsk(File file __attribute__((unused)), MARIA_STATE_INFO *state __attribute__((unused))) { #ifdef MARIA_EXTERNAL_LOCKING uchar buff[MARIA_STATE_INFO_SIZE + MARIA_STATE_EXTRA_SIZE]; /* trick to detect transactional tables */ DBUG_ASSERT(state->create_rename_lsn == LSN_IMPOSSIBLE); if (!maria_single_user) { if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP))) return 1; _ma_state_info_read(buff, state); } #endif return 0; }
O0
c
ma_state_info_read_dsk: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) xorl %eax, %eax popq %rbp retq nop
_ma_state_info_read_dsk: push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_10], rsi xor eax, eax pop rbp retn
long long ma_state_info_read_dsk() { return 0LL; }
_ma_state_info_read_dsk: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI XOR EAX,EAX POP RBP RET
int8 _ma_state_info_read_dsk(void) { return 0; }
39,978
mi_cmp_static_unique
eloqsql/storage/myisam/mi_statrec.c
int _mi_cmp_static_unique(MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos) { DBUG_ENTER("_mi_cmp_static_unique"); info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, info->rec_buff, info->s->base.reclength, pos, MYF(MY_NABP))) DBUG_RETURN(-1); DBUG_RETURN(mi_unique_comp(def, record, info->rec_buff, def->null_are_equal)); }
O0
c
mi_cmp_static_unique: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x2e0(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x120(%rcx), %rsi movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq 0x140(%rcx), %rdx movq -0x28(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0xc79fe jmp 0xc79f5 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc7a23 jmp 0xc7a00 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x120(%rax), %rdx movq -0x18(%rbp), %rax movsbl 0x3(%rax), %ecx callq 0xc8570 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_mi_cmp_static_unique: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov dword ptr [rax+300h], 1 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+2E0h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+120h] mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rcx+140h] mov rcx, [rbp+var_28] mov r8d, 4 call rax cmp rax, 0 jz short loc_C79FE jmp short $+2 loc_C79F5: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_C7A23 loc_C79FE: jmp short $+2 loc_C7A00: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov rdx, [rax+120h] mov rax, [rbp+var_18] movsx ecx, byte ptr [rax+3] call mi_unique_comp mov [rbp+var_4], eax loc_C7A23: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_cmp_static_unique(long long a1, long long a2, long long a3, long long a4) { *(_DWORD *)(a1 + 768) = 1; if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 736LL))( a1, *(_QWORD *)(a1 + 288), *(_QWORD *)(*(_QWORD *)a1 + 320LL), a4, 4LL) ) { return (unsigned int)-1; } else { return (unsigned int)mi_unique_comp(a2, a3, *(_QWORD *)(a1 + 288), (unsigned int)*(char *)(a2 + 3)); } }
_mi_cmp_static_unique: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x300],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x2e0] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x120] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x140] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x001c79fe JMP 0x001c79f5 LAB_001c79f5: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c7a23 LAB_001c79fe: JMP 0x001c7a00 LAB_001c7a00: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x120] MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX + 0x3] CALL 0x001c8570 MOV dword ptr [RBP + -0x4],EAX LAB_001c7a23: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _mi_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4) { long lVar1; int4 local_c; *(int4 *)(param_1 + 0x60) = 1; lVar1 = (**(code **)(*param_1 + 0x2e0)) (param_1,param_1[0x24],*(int8 *)(*param_1 + 0x140),param_4,4); if (lVar1 == 0) { local_c = mi_unique_comp(param_2,param_3,param_1[0x24],(int)*(char *)(param_2 + 3)); } else { local_c = 0xffffffff; } return local_c; }
39,979
mysql_stmt_close_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_close_start(my_bool *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_close, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_close(stmt); return 0; }) }
O0
c
mysql_stmt_close_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0xa2088 movq -0x18(%rbp), %rdi callq 0x8e120 movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) jmp 0xa2196 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xe2(%rip), %rsi # 0xa21a0 leaq -0x30(%rbp), %rdx callq 0xa3d80 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0xa20f6 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0xa2196 cmpl $0x0, -0x1c(%rbp) jge 0xa2182 jmp 0xa2102 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x25f256(%rip), %rax # 0x301380 movq (%rax), %rsi movl $0x5, %edx callq 0x60180 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x25f234(%rip), %rax # 0x301390 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x60180 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movb $0x1, (%rax) jmp 0xa218f movq -0x28(%rbp), %rax movb 0x8(%rax), %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
mysql_stmt_close_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_A2088 mov rdi, [rbp+var_18] call mysql_stmt_close mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov [rbp+var_4], 0 jmp loc_A2196 loc_A2088: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_close_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_A20F6 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_A2196 loc_A20F6: cmp [rbp+var_1C], 0 jge loc_A2182 jmp short $+2 loc_A2102: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 1 jmp short loc_A218F loc_A2182: mov rax, [rbp+var_28] mov cl, [rax+8] mov rax, [rbp+var_10] mov [rax], cl loc_A218F: mov [rbp+var_4], 0 loc_A2196: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_close_start(char *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF _BYTE *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] char *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(_BYTE **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; v4[20] = 1; v5 = my_context_spawn(v4 + 56, mysql_stmt_close_start_internal, &v3); v4[21] = 0; v4[20] = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[8]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { v4[21] = 1; return *(unsigned int *)v4; } } else { *v7 = mysql_stmt_close(v6); return 0; } }
mysql_stmt_close_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x001a2088 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0018e120 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a2196 LAB_001a2088: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x1a21a0] LEA RDX,[RBP + -0x30] CALL 0x001a3d80 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x001a20f6 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x001a2196 LAB_001a20f6: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x001a2182 JMP 0x001a2102 LAB_001a2102: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x401380] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00160180 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x401390] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00160180 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x1 JMP 0x001a218f LAB_001a2182: MOV RAX,qword ptr [RBP + -0x28] MOV CL,byte ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL LAB_001a218f: MOV dword ptr [RBP + -0x4],0x0 LAB_001a2196: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_close_start(int1 *param_1,long param_2) { int1 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int1 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_close(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_close_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_004013d0, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = *(int1 *)(local_30 + 2); } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
39,980
my_strntoull10rnd_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t length, int unsign_fl, char **endptr, int *err) { char buf[256], *b= buf; ulonglong res; const uchar *end, *s= (const uchar*) nptr; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; /* Cut too long strings */ if (length >= sizeof(buf)) length= sizeof(buf)-1; end= s + length; while ((cnv= mb_wc(cs, &wc, s, end)) > 0) { s+= cnv; if (wc > (int) (uchar) 'e' || !wc) break; /* Can't be a number part */ *b++= (char) wc; } res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err); *endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O0
c
my_strntoull10rnd_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0x190, %rsp # imm = 0x190 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x118(%rbp) movq %rsi, -0x120(%rbp) movq %rdx, -0x128(%rbp) movl %ecx, -0x12c(%rbp) movq %r8, -0x138(%rbp) movq %r9, -0x140(%rbp) leaq -0x110(%rbp), %rax movq %rax, -0x148(%rbp) movq -0x120(%rbp), %rax movq %rax, -0x160(%rbp) movq -0x118(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x170(%rbp) cmpq $0x100, -0x128(%rbp) # imm = 0x100 jb 0x60e6e movq $0xff, -0x128(%rbp) movq -0x160(%rbp), %rax addq -0x128(%rbp), %rax movq %rax, -0x158(%rbp) movq -0x170(%rbp), %rax movq -0x118(%rbp), %rdi movq -0x160(%rbp), %rdx movq -0x158(%rbp), %rcx leaq -0x168(%rbp), %rsi callq *%rax movl %eax, -0x174(%rbp) cmpl $0x0, %eax jle 0x60f08 movl -0x174(%rbp), %ecx movq -0x160(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x160(%rbp) cmpq $0x65, -0x168(%rbp) ja 0x60ee1 cmpq $0x0, -0x168(%rbp) jne 0x60ee3 jmp 0x60f08 movq -0x168(%rbp), %rax movb %al, %cl movq -0x148(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x148(%rbp) movb %cl, (%rax) jmp 0x60e83 movq -0x118(%rbp), %rdi movq -0x148(%rbp), %rdx leaq -0x110(%rbp), %rsi movq %rsi, -0x188(%rbp) subq %rsi, %rdx movl -0x12c(%rbp), %ecx movq -0x138(%rbp), %r8 movq -0x140(%rbp), %r9 callq 0x4b780 movq -0x188(%rbp), %rdi movq %rax, -0x150(%rbp) movq -0x120(%rbp), %rcx movq -0x118(%rbp), %rax movl 0x98(%rax), %eax movl %eax, %edx movq -0x138(%rbp), %rax movq (%rax), %rsi subq %rdi, %rsi imulq %rsi, %rdx addq %rdx, %rcx movq %rcx, (%rax) movq -0x150(%rbp), %rax movq %rax, -0x180(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x60fab movq -0x180(%rbp), %rax addq $0x190, %rsp # imm = 0x190 popq %rbp retq callq 0x24330
my_strntoull10rnd_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 190h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_118], rdi mov [rbp+var_120], rsi mov [rbp+var_128], rdx mov [rbp+var_12C], ecx mov [rbp+var_138], r8 mov [rbp+var_140], r9 lea rax, [rbp+var_110] mov [rbp+var_148], rax mov rax, [rbp+var_120] mov [rbp+var_160], rax mov rax, [rbp+var_118] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_170], rax cmp [rbp+var_128], 100h jb short loc_60E6E mov [rbp+var_128], 0FFh loc_60E6E: mov rax, [rbp+var_160] add rax, [rbp+var_128] mov [rbp+var_158], rax loc_60E83: mov rax, [rbp+var_170] mov rdi, [rbp+var_118] mov rdx, [rbp+var_160] mov rcx, [rbp+var_158] lea rsi, [rbp+var_168] call rax mov [rbp+var_174], eax cmp eax, 0 jle short loc_60F08 mov ecx, [rbp+var_174] mov rax, [rbp+var_160] movsxd rcx, ecx add rax, rcx mov [rbp+var_160], rax cmp [rbp+var_168], 65h ; 'e' ja short loc_60EE1 cmp [rbp+var_168], 0 jnz short loc_60EE3 loc_60EE1: jmp short loc_60F08 loc_60EE3: mov rax, [rbp+var_168] mov cl, al mov rax, [rbp+var_148] mov rdx, rax add rdx, 1 mov [rbp+var_148], rdx mov [rax], cl jmp loc_60E83 loc_60F08: mov rdi, [rbp+var_118] mov rdx, [rbp+var_148] lea rsi, [rbp+var_110] mov [rbp+var_188], rsi sub rdx, rsi mov ecx, [rbp+var_12C] mov r8, [rbp+var_138] mov r9, [rbp+var_140] call my_strntoull10rnd_8bit mov rdi, [rbp+var_188] mov [rbp+var_150], rax mov rcx, [rbp+var_120] mov rax, [rbp+var_118] mov eax, [rax+98h] mov edx, eax mov rax, [rbp+var_138] mov rsi, [rax] sub rsi, rdi imul rdx, rsi add rcx, rdx mov [rax], rcx mov rax, [rbp+var_150] mov [rbp+var_180], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_60FAB mov rax, [rbp+var_180] add rsp, 190h pop rbp retn loc_60FAB: call ___stack_chk_fail
long long my_strntoull10rnd_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, int a4, _QWORD *a5, int *a6) { _BYTE *v6; // rax int v8; // [rsp+1Ch] [rbp-174h] long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h] unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF long long v11; // [rsp+30h] [rbp-160h] long long v12; // [rsp+38h] [rbp-158h] long long v13; // [rsp+40h] [rbp-150h] _BYTE *v14; // [rsp+48h] [rbp-148h] int *v15; // [rsp+50h] [rbp-140h] _QWORD *v16; // [rsp+58h] [rbp-138h] int v17; // [rsp+64h] [rbp-12Ch] long long v18; // [rsp+68h] [rbp-128h] long long v19; // [rsp+70h] [rbp-120h] long long v20; // [rsp+78h] [rbp-118h] _BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF unsigned long long v22; // [rsp+188h] [rbp-8h] v22 = __readfsqword(0x28u); v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = a6; v14 = v21; v11 = a2; v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( a3 >= 0x100 ) v18 = 255LL; v12 = v18 + v11; while ( 1 ) { v8 = v9(v20, &v10, v11, v12); if ( v8 <= 0 ) break; v11 += v8; if ( v10 > 0x65 || !v10 ) break; v6 = v14++; *v6 = v10; } v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15); *v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19; return v13; }
my_strntoull10rnd_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x190 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x118],RDI MOV qword ptr [RBP + -0x120],RSI MOV qword ptr [RBP + -0x128],RDX MOV dword ptr [RBP + -0x12c],ECX MOV qword ptr [RBP + -0x138],R8 MOV qword ptr [RBP + -0x140],R9 LEA RAX,[RBP + -0x110] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x120] MOV qword ptr [RBP + -0x160],RAX MOV RAX,qword ptr [RBP + -0x118] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x170],RAX CMP qword ptr [RBP + -0x128],0x100 JC 0x00160e6e MOV qword ptr [RBP + -0x128],0xff LAB_00160e6e: MOV RAX,qword ptr [RBP + -0x160] ADD RAX,qword ptr [RBP + -0x128] MOV qword ptr [RBP + -0x158],RAX LAB_00160e83: MOV RAX,qword ptr [RBP + -0x170] MOV RDI,qword ptr [RBP + -0x118] MOV RDX,qword ptr [RBP + -0x160] MOV RCX,qword ptr [RBP + -0x158] LEA RSI,[RBP + -0x168] CALL RAX MOV dword ptr [RBP + -0x174],EAX CMP EAX,0x0 JLE 0x00160f08 MOV ECX,dword ptr [RBP + -0x174] MOV RAX,qword ptr [RBP + -0x160] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x160],RAX CMP qword ptr [RBP + -0x168],0x65 JA 0x00160ee1 CMP qword ptr [RBP + -0x168],0x0 JNZ 0x00160ee3 LAB_00160ee1: JMP 0x00160f08 LAB_00160ee3: MOV RAX,qword ptr [RBP + -0x168] MOV CL,AL MOV RAX,qword ptr [RBP + -0x148] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x148],RDX MOV byte ptr [RAX],CL JMP 0x00160e83 LAB_00160f08: MOV RDI,qword ptr [RBP + -0x118] MOV RDX,qword ptr [RBP + -0x148] LEA RSI,[RBP + -0x110] MOV qword ptr [RBP + -0x188],RSI SUB RDX,RSI MOV ECX,dword ptr [RBP + -0x12c] MOV R8,qword ptr [RBP + -0x138] MOV R9,qword ptr [RBP + -0x140] CALL 0x0014b780 MOV RDI,qword ptr [RBP + -0x188] MOV qword ptr [RBP + -0x150],RAX MOV RCX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RBP + -0x118] MOV EAX,dword ptr [RAX + 0x98] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RAX] SUB RSI,RDI IMUL RDX,RSI ADD RCX,RDX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x150] MOV qword ptr [RBP + -0x180],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00160fab MOV RAX,qword ptr [RBP + -0x180] ADD RSP,0x190 POP RBP RET LAB_00160fab: CALL 0x00124330
int8 my_strntoull10rnd_mb2_or_mb4 (long param_1,long param_2,ulong param_3,int4 param_4,long *param_5, int8 param_6) { code *pcVar1; int iVar2; long in_FS_OFFSET; ulong local_170; long local_168; long local_160; int8 local_158; int1 *local_150; int8 local_148; long *local_140; int4 local_134; ulong local_130; long local_128; long local_120; int1 local_118 [264]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); local_130 = param_3; if (0xff < param_3) { local_130 = 0xff; } local_160 = param_2 + local_130; local_168 = param_2; local_150 = local_118; local_148 = param_6; local_140 = param_5; local_134 = param_4; local_128 = param_2; local_120 = param_1; while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 && (local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) { *local_150 = (char)local_170; local_150 = local_150 + 1; } local_158 = my_strntoull10rnd_8bit (local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140, local_148); *local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_158; }
39,981
my_strntoull10rnd_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t length, int unsign_fl, char **endptr, int *err) { char buf[256], *b= buf; ulonglong res; const uchar *end, *s= (const uchar*) nptr; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; /* Cut too long strings */ if (length >= sizeof(buf)) length= sizeof(buf)-1; end= s + length; while ((cnv= mb_wc(cs, &wc, s, end)) > 0) { s+= cnv; if (wc > (int) (uchar) 'e' || !wc) break; /* Can't be a number part */ *b++= (char) wc; } res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err); *endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O3
c
my_strntoull10rnd_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %r9, -0x150(%rbp) movq %r8, -0x158(%rbp) movl %ecx, -0x134(%rbp) movq %rsi, %rcx movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx movl $0xff, %r13d cmpq %r13, %rdx cmovbq %rdx, %r13 addq %rsi, %r13 leaq -0x148(%rbp), %rsi movq %rcx, -0x140(%rbp) movq %rcx, %rdx movq %r13, %rcx callq *%rbx leaq -0x130(%rbp), %r15 testl %eax, %eax jle 0x4b22f movq -0x140(%rbp), %r14 movq -0x148(%rbp), %rcx leaq -0x1(%rcx), %rdx cmpq $0x64, %rdx ja 0x4b22f movl %eax, %eax addq %rax, %r14 movb %cl, (%r15) incq %r15 movq %r12, %rdi leaq -0x148(%rbp), %rsi movq %r14, %rdx movq %r13, %rcx callq *%rbx testl %eax, %eax jg 0x4b1fd leaq -0x130(%rbp), %r14 subq %r14, %r15 movq %r12, %rdi movq %r14, %rsi movq %r15, %rdx movl -0x134(%rbp), %ecx movq -0x158(%rbp), %rbx movq %rbx, %r8 movq -0x150(%rbp), %r9 callq 0x3ce78 movl 0x98(%r12), %ecx movq (%rbx), %rdx subq %r14, %rdx imulq %rcx, %rdx movq -0x140(%rbp), %rcx addq %rdx, %rcx movq %rcx, (%rbx) movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x4b29e addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24370
my_strntoull10rnd_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 138h mov [rbp+var_150], r9 mov [rbp+var_158], r8 mov [rbp+var_134], ecx mov rcx, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] mov rbx, [rax+28h] mov r13d, 0FFh cmp rdx, r13 cmovb r13, rdx add r13, rsi lea rsi, [rbp+var_148] mov [rbp+var_140], rcx mov rdx, rcx mov rcx, r13 call rbx lea r15, [rbp+var_130] test eax, eax jle short loc_4B22F mov r14, [rbp+var_140] loc_4B1FD: mov rcx, [rbp+var_148] lea rdx, [rcx-1] cmp rdx, 64h ; 'd' ja short loc_4B22F mov eax, eax add r14, rax mov [r15], cl inc r15 mov rdi, r12 lea rsi, [rbp+var_148] mov rdx, r14 mov rcx, r13 call rbx test eax, eax jg short loc_4B1FD loc_4B22F: lea r14, [rbp+var_130] sub r15, r14 mov rdi, r12 mov rsi, r14 mov rdx, r15 mov ecx, [rbp+var_134] mov rbx, [rbp+var_158] mov r8, rbx mov r9, [rbp+var_150] call my_strntoull10rnd_8bit mov ecx, [r12+98h] mov rdx, [rbx] sub rdx, r14 imul rdx, rcx mov rcx, [rbp+var_140] add rcx, rdx mov [rbx], rcx mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_4B29E add rsp, 138h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4B29E: call ___stack_chk_fail
long long my_strntoull10rnd_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, int a4, unsigned __int8 **a5, int *a6) { long long ( *v6)(long long, long long *, long long, long long); // rbx long long v7; // r13 long long v8; // r13 int v9; // eax unsigned __int8 *v10; // r15 long long v11; // r14 long long result; // rax long long v15; // [rsp+18h] [rbp-148h] BYREF long long v16; // [rsp+20h] [rbp-140h] int v17; // [rsp+2Ch] [rbp-134h] unsigned __int8 v18[256]; // [rsp+30h] [rbp-130h] BYREF unsigned long long v19; // [rsp+130h] [rbp-30h] v17 = a4; v19 = __readfsqword(0x28u); v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v7 = 255LL; if ( a3 < 0xFF ) v7 = a3; v8 = a2 + v7; v16 = a2; v9 = v6(a1, &v15, a2, v8); v10 = v18; if ( v9 > 0 ) { v11 = v16; do { if ( (unsigned long long)(v15 - 1) > 0x64 ) break; v11 += (unsigned int)v9; *v10++ = v15; v9 = v6(a1, &v15, v11, v8); } while ( v9 > 0 ); } result = my_strntoull10rnd_8bit(a1, v18, v10 - v18, v17, a5, a6); *a5 = (unsigned __int8 *)(*(unsigned int *)(a1 + 152) * (*a5 - v18) + v16); return result; }
my_strntoull10rnd_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x138 MOV qword ptr [RBP + -0x150],R9 MOV qword ptr [RBP + -0x158],R8 MOV dword ptr [RBP + -0x134],ECX MOV RCX,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] MOV R13D,0xff CMP RDX,R13 CMOVC R13,RDX ADD R13,RSI LEA RSI,[RBP + -0x148] MOV qword ptr [RBP + -0x140],RCX MOV RDX,RCX MOV RCX,R13 CALL RBX LEA R15,[RBP + -0x130] TEST EAX,EAX JLE 0x0014b22f MOV R14,qword ptr [RBP + -0x140] LAB_0014b1fd: MOV RCX,qword ptr [RBP + -0x148] LEA RDX,[RCX + -0x1] CMP RDX,0x64 JA 0x0014b22f MOV EAX,EAX ADD R14,RAX MOV byte ptr [R15],CL INC R15 MOV RDI,R12 LEA RSI,[RBP + -0x148] MOV RDX,R14 MOV RCX,R13 CALL RBX TEST EAX,EAX JG 0x0014b1fd LAB_0014b22f: LEA R14,[RBP + -0x130] SUB R15,R14 MOV RDI,R12 MOV RSI,R14 MOV RDX,R15 MOV ECX,dword ptr [RBP + -0x134] MOV RBX,qword ptr [RBP + -0x158] MOV R8,RBX MOV R9,qword ptr [RBP + -0x150] CALL 0x0013ce78 MOV ECX,dword ptr [R12 + 0x98] MOV RDX,qword ptr [RBX] SUB RDX,R14 IMUL RDX,RCX MOV RCX,qword ptr [RBP + -0x140] ADD RCX,RDX MOV qword ptr [RBX],RCX MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0014b29e ADD RSP,0x138 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014b29e: CALL 0x00124370
void my_strntoull10rnd_mb2_or_mb4 (long param_1,long param_2,ulong param_3,int4 param_4,long *param_5, int8 param_6) { code *pcVar1; uint uVar2; ulong uVar3; long lVar4; int1 *puVar5; long in_FS_OFFSET; long local_150; long local_148; int4 local_13c; int1 local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar3 = 0xff; if (param_3 < 0xff) { uVar3 = param_3; } local_148 = param_2; local_13c = param_4; uVar2 = (*pcVar1)(param_1,&local_150,param_2,uVar3 + param_2); puVar5 = local_138; lVar4 = local_148; while ((0 < (int)uVar2 && (local_150 - 1U < 0x65))) { lVar4 = lVar4 + (ulong)uVar2; *puVar5 = (char)local_150; puVar5 = puVar5 + 1; uVar2 = (*pcVar1)(param_1,&local_150,lVar4,uVar3 + param_2); } my_strntoull10rnd_8bit(param_1,local_138,(long)puVar5 - (long)local_138,local_13c,param_5,param_6) ; *param_5 = local_148 + (*param_5 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,982
js_std_await
bluesky950520[P]quickjs/quickjs-libc.c
JSValue js_std_await(JSContext *ctx, JSValue obj) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue ret; int state; for(;;) { state = JS_PromiseState(ctx, obj); if (state == JS_PROMISE_FULFILLED) { ret = JS_PromiseResult(ctx, obj); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_REJECTED) { ret = JS_Throw(ctx, JS_PromiseResult(ctx, obj)); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_PENDING) { JSContext *ctx1; int err; err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); if (err < 0) { js_std_dump_error(ctx1); } if (ts->can_js_os_poll) js_os_poll(ctx); } else { /* not a promise */ ret = obj; break; } } return ret; }
O0
c
js_std_await: subq $0x88, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rdi callq 0x26c40 movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x10310 movq %rax, 0x50(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x523f0 movl %eax, 0x4c(%rsp) cmpl $0x1, 0x4c(%rsp) jne 0x11061 movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x52440 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x229d0 jmp 0x11145 cmpl $0x2, 0x4c(%rsp) jne 0x110d9 movq 0x60(%rsp), %rax movq %rax, (%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x52440 movq (%rsp), %rdi movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x2bc40 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x229d0 jmp 0x11145 cmpl $0x0, 0x4c(%rsp) jne 0x11123 movq 0x60(%rsp), %rdi callq 0x26c40 movq %rax, %rdi leaq 0x10(%rsp), %rsi callq 0x22810 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jge 0x1110c movq 0x10(%rsp), %rdi callq 0x10690 movq 0x50(%rsp), %rax cmpl $0x0, 0x60(%rax) je 0x11121 movq 0x60(%rsp), %rdi callq 0x10840 jmp 0x1113c movq 0x68(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0x11145 jmp 0x1113e jmp 0x11140 jmp 0x10ff4 movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nopw (%rax,%rax)
js_std_await: sub rsp, 88h mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_28], rdi mov rdi, [rsp+88h+var_28] call JS_GetRuntime mov [rsp+88h+var_30], rax mov rdi, [rsp+88h+var_30] call js_get_thread_state mov [rsp+88h+var_38], rax loc_10FF4: mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_PromiseState mov [rsp+88h+var_3C], eax cmp [rsp+88h+var_3C], 1 jnz short loc_11061 mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_PromiseResult mov [rsp+88h+var_50], rax mov [rsp+88h+var_48], rdx mov rax, [rsp+88h+var_50] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_48] mov [rsp+88h+var_8], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_FreeValue jmp loc_11145 loc_11061: cmp [rsp+88h+var_3C], 2 jnz short loc_110D9 mov rax, [rsp+88h+var_28] mov [rsp+88h+var_88], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_PromiseResult mov rdi, [rsp+88h+var_88] mov [rsp+88h+var_70], rax mov [rsp+88h+var_68], rdx mov rsi, [rsp+88h+var_70] mov rdx, [rsp+88h+var_68] call JS_Throw mov [rsp+88h+var_60], rax mov [rsp+88h+var_58], rdx mov rax, [rsp+88h+var_60] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_58] mov [rsp+88h+var_8], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] call JS_FreeValue jmp short loc_11145 loc_110D9: cmp [rsp+88h+var_3C], 0 jnz short loc_11123 mov rdi, [rsp+88h+var_28] call JS_GetRuntime mov rdi, rax lea rsi, [rsp+88h+var_78] call JS_ExecutePendingJob mov [rsp+88h+var_7C], eax cmp [rsp+88h+var_7C], 0 jge short loc_1110C mov rdi, [rsp+88h+var_78] call js_std_dump_error loc_1110C: mov rax, [rsp+88h+var_38] cmp dword ptr [rax+60h], 0 jz short loc_11121 mov rdi, [rsp+88h+var_28] call js_os_poll loc_11121: jmp short loc_1113C loc_11123: mov rax, [rsp+88h+var_20] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_18] mov [rsp+88h+var_8], rax jmp short loc_11145 loc_1113C: jmp short $+2 loc_1113E: jmp short $+2 loc_11140: jmp loc_10FF4 loc_11145: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
long long js_std_await(long long a1, long long a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // rdx long long v8; // rdx long long v9; // rdx long long v10; // rax long long v12; // [rsp+0h] [rbp-88h] long long v13; // [rsp+10h] [rbp-78h] BYREF long long v14; // [rsp+18h] [rbp-70h] long long v15; // [rsp+20h] [rbp-68h] long long v16; // [rsp+28h] [rbp-60h] long long v17; // [rsp+30h] [rbp-58h] long long v18; // [rsp+38h] [rbp-50h] long long v19; // [rsp+40h] [rbp-48h] int v20; // [rsp+4Ch] [rbp-3Ch] long long thread_state; // [rsp+50h] [rbp-38h] long long Runtime; // [rsp+58h] [rbp-30h] long long v23; // [rsp+60h] [rbp-28h] long long v24; // [rsp+68h] [rbp-20h] long long v25; // [rsp+70h] [rbp-18h] long long v26; // [rsp+78h] [rbp-10h] long long v27; // [rsp+80h] [rbp-8h] v24 = a2; v25 = a3; v23 = a1; Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v3, v4, v5, v6); while ( 1 ) { v20 = JS_PromiseState(v23, v24, v25); if ( v20 == 1 ) { v18 = JS_PromiseResult(v23, v24, v25); v19 = v7; v26 = v18; v27 = v7; JS_FreeValue(v23, v24, v25); return v26; } if ( v20 == 2 ) { v12 = v23; v14 = JS_PromiseResult(v23, v24, v25); v15 = v8; v16 = JS_Throw(v12, v14, v8); v17 = v9; v26 = v16; v27 = v9; JS_FreeValue(v23, v24, v25); return v26; } if ( v20 ) break; v10 = JS_GetRuntime(v23); if ( (int)JS_ExecutePendingJob(v10, &v13) < 0 ) js_std_dump_error(v13); if ( *(_DWORD *)(thread_state + 96) ) js_os_poll(v23, (long long)&v13); } v26 = v24; v27 = v25; return v26; }
js_std_await: SUB RSP,0x88 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV RDI,qword ptr [RSP + 0x60] CALL 0x00126c40 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x00110310 MOV qword ptr [RSP + 0x50],RAX LAB_00110ff4: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x001523f0 MOV dword ptr [RSP + 0x4c],EAX CMP dword ptr [RSP + 0x4c],0x1 JNZ 0x00111061 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00152440 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x001229d0 JMP 0x00111145 LAB_00111061: CMP dword ptr [RSP + 0x4c],0x2 JNZ 0x001110d9 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00152440 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0012bc40 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x001229d0 JMP 0x00111145 LAB_001110d9: CMP dword ptr [RSP + 0x4c],0x0 JNZ 0x00111123 MOV RDI,qword ptr [RSP + 0x60] CALL 0x00126c40 MOV RDI,RAX LEA RSI,[RSP + 0x10] CALL 0x00122810 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JGE 0x0011110c MOV RDI,qword ptr [RSP + 0x10] CALL 0x00110690 LAB_0011110c: MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX + 0x60],0x0 JZ 0x00111121 MOV RDI,qword ptr [RSP + 0x60] CALL 0x00110840 LAB_00111121: JMP 0x0011113c LAB_00111123: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x80],RAX JMP 0x00111145 LAB_0011113c: JMP 0x0011113e LAB_0011113e: JMP 0x00111140 LAB_00111140: JMP 0x00110ff4 LAB_00111145: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] js_std_await(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int iVar2; int8 uVar3; int8 local_78; int1 local_70 [16]; int1 local_60 [16]; int1 local_50 [16]; int local_3c; long local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int1 local_10 [16]; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_30 = JS_GetRuntime(param_1); local_38 = js_get_thread_state(local_30); while( true ) { local_3c = JS_PromiseState(local_28,local_20,local_18); uVar3 = local_28; if (local_3c == 1) { local_50 = JS_PromiseResult(local_28,local_20,local_18); local_10 = local_50; JS_FreeValue(local_28,local_20,local_18); return local_10; } if (local_3c == 2) break; if (local_3c != 0) { auVar1._8_8_ = local_18; auVar1._0_8_ = local_20; return auVar1; } uVar3 = JS_GetRuntime(local_28); iVar2 = JS_ExecutePendingJob(uVar3,&local_78); if (iVar2 < 0) { js_std_dump_error(local_78); } if (*(int *)(local_38 + 0x60) != 0) { js_os_poll(local_28); } } local_70 = JS_PromiseResult(local_28,local_20,local_18); local_60 = JS_Throw(uVar3,local_70._0_8_,local_70._8_8_); local_10 = local_60; JS_FreeValue(local_28,local_20,local_18); return local_10; }
39,983
js_std_await
bluesky950520[P]quickjs/quickjs-libc.c
JSValue js_std_await(JSContext *ctx, JSValue obj) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue ret; int state; for(;;) { state = JS_PromiseState(ctx, obj); if (state == JS_PROMISE_FULFILLED) { ret = JS_PromiseResult(ctx, obj); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_REJECTED) { ret = JS_Throw(ctx, JS_PromiseResult(ctx, obj)); JS_FreeValue(ctx, obj); break; } else if (state == JS_PROMISE_PENDING) { JSContext *ctx1; int err; err = JS_ExecutePendingJob(JS_GetRuntime(ctx), &ctx1); if (err < 0) { js_std_dump_error(ctx1); } if (ts->can_js_os_poll) js_os_poll(ctx); } else { /* not a promise */ ret = obj; break; } } return ret; }
O1
c
js_std_await: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 callq 0x1f16a xorl %edi, %edi movq %rax, %rsi xorl %eax, %eax callq 0x399df movq %rax, %r12 leaq 0x8(%rsp), %r13 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x35622 testl %eax, %eax jne 0x14fd2 movq %r15, %rdi callq 0x1f16a movq %rax, %rdi movq %r13, %rsi callq 0x1cbd2 testl %eax, %eax jns 0x14fc0 movq 0x8(%rsp), %rdi callq 0x14905 cmpl $0x0, 0x60(%r12) je 0x14f8d movq %r15, %rdi callq 0x149d2 jmp 0x14f8d cmpl $0x2, %eax je 0x14fec cmpl $0x1, %eax jne 0x1501f movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x3564e jmp 0x15005 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x3564e movq %r15, %rdi movq %rax, %rsi callq 0x21717 movq %rax, %r12 movq %rdx, %r13 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1cc9f movq %r12, %r14 movq %r13, %rbx movq %r14, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_std_await: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi call JS_GetRuntime xor edi, edi mov rsi, rax xor eax, eax call js_std_cmd mov r12, rax lea r13, [rsp+38h+var_30] loc_14F8D: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_PromiseState test eax, eax jnz short loc_14FD2 mov rdi, r15 call JS_GetRuntime mov rdi, rax mov rsi, r13 call JS_ExecutePendingJob test eax, eax jns short loc_14FC0 mov rdi, [rsp+38h+var_30] call js_std_dump_error loc_14FC0: cmp dword ptr [r12+60h], 0 jz short loc_14F8D mov rdi, r15 call js_os_poll jmp short loc_14F8D loc_14FD2: cmp eax, 2 jz short loc_14FEC cmp eax, 1 jnz short loc_1501F mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_PromiseResult jmp short loc_15005 loc_14FEC: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_PromiseResult mov rdi, r15 mov rsi, rax call JS_Throw loc_15005: mov r12, rax mov r13, rdx mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue mov r14, r12 mov rbx, r13 loc_1501F: mov rax, r14 mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_std_await(long long a1, long long a2, long long a3) { long long v4; // r14 int Runtime; // eax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long v10; // r12 int v11; // eax long long v12; // rax long long v13; // rax long long v14; // rax long long v15; // r12 long long v17[6]; // [rsp+8h] [rbp-30h] BYREF v4 = a2; Runtime = JS_GetRuntime(a1); v10 = js_std_cmd(0, Runtime, v6, v7, v8, v9); while ( 1 ) { v11 = JS_PromiseState(a1, a2, a3); if ( v11 ) break; v12 = JS_GetRuntime(a1); if ( (int)JS_ExecutePendingJob(v12, v17) < 0 ) js_std_dump_error(v17[0]); if ( *(_DWORD *)(v10 + 96) ) js_os_poll(a1); } if ( v11 == 2 ) { v14 = JS_PromiseResult(a1, a2, a3); v13 = JS_Throw(a1, v14); goto LABEL_11; } if ( v11 == 1 ) { v13 = JS_PromiseResult(a1, a2, a3); LABEL_11: v15 = v13; JS_FreeValue(a1, a2, a3); return v15; } return v4; }
js_std_await: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CALL 0x0011f16a XOR EDI,EDI MOV RSI,RAX XOR EAX,EAX CALL 0x001399df MOV R12,RAX LEA R13,[RSP + 0x8] LAB_00114f8d: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00135622 TEST EAX,EAX JNZ 0x00114fd2 MOV RDI,R15 CALL 0x0011f16a MOV RDI,RAX MOV RSI,R13 CALL 0x0011cbd2 TEST EAX,EAX JNS 0x00114fc0 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00114905 LAB_00114fc0: CMP dword ptr [R12 + 0x60],0x0 JZ 0x00114f8d MOV RDI,R15 CALL 0x001149d2 JMP 0x00114f8d LAB_00114fd2: CMP EAX,0x2 JZ 0x00114fec CMP EAX,0x1 JNZ 0x0011501f MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0013564e JMP 0x00115005 LAB_00114fec: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0013564e MOV RDI,R15 MOV RSI,RAX CALL 0x00121717 LAB_00115005: MOV R12,RAX MOV R13,RDX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011cc9f MOV R14,R12 MOV RBX,R13 LAB_0011501f: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_std_await(int8 param_1,int8 param_2,int8 param_3) { int iVar1; int8 uVar2; long lVar3; int1 auVar4 [16]; int8 local_30; auVar4._8_8_ = param_3; auVar4._0_8_ = param_2; uVar2 = JS_GetRuntime(); lVar3 = js_std_cmd(0,uVar2); while (iVar1 = JS_PromiseState(param_1,param_2,param_3), iVar1 == 0) { uVar2 = JS_GetRuntime(param_1); iVar1 = JS_ExecutePendingJob(uVar2,&local_30); if (iVar1 < 0) { js_std_dump_error(local_30); } if (*(int *)(lVar3 + 0x60) != 0) { js_os_poll(param_1); } } if (iVar1 == 2) { uVar2 = JS_PromiseResult(param_1,param_2,param_3); auVar4 = JS_Throw(param_1,uVar2); } else { if (iVar1 != 1) { return auVar4; } auVar4 = JS_PromiseResult(param_1,param_2,param_3); } JS_FreeValue(param_1,param_2,param_3); return auVar4; }
39,984
mi_ft_segiterator_dummy_init
eloqsql/storage/myisam/ft_update.c
void _mi_ft_segiterator_dummy_init(const uchar *record, uint len, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_mi_ft_segiterator_dummy_init"); ftsi->num=1; ftsi->seg=0; ftsi->pos=record; ftsi->len=len; DBUG_VOID_RETURN; }
O3
c
mi_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movl $0x1, (%rdx) movq $0x0, 0x8(%rdx) movq %rdi, 0x18(%rdx) movl %esi, 0x4(%rdx) popq %rbp retq
_mi_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov dword ptr [rdx], 1 mov qword ptr [rdx+8], 0 mov [rdx+18h], rdi mov [rdx+4], esi pop rbp retn
void mi_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; *(_DWORD *)(a3 + 4) = a2; }
_mi_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV dword ptr [RDX],0x1 MOV qword ptr [RDX + 0x8],0x0 MOV qword ptr [RDX + 0x18],RDI MOV dword ptr [RDX + 0x4],ESI POP RBP RET
void _mi_ft_segiterator_dummy_init(int8 param_1,int4 param_2,int4 *param_3) { *param_3 = 1; *(int8 *)(param_3 + 2) = 0; *(int8 *)(param_3 + 6) = param_1; param_3[1] = param_2; return; }
39,985
ggml_concat
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_concat( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int dim) { GGML_ASSERT(dim >= 0 && dim < GGML_MAX_DIMS); int64_t ne[GGML_MAX_DIMS]; for (int d = 0; d < GGML_MAX_DIMS; ++d) { if (d == dim) { ne[d] = a->ne[d] + b->ne[d]; continue; } GGML_ASSERT(a->ne[d] == b->ne[d]); ne[d] = a->ne[d]; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, ne); ggml_set_op_params_i32(result, 0, dim); result->op = GGML_OP_CONCAT; result->src[0] = a; result->src[1] = b; return result; }
O0
c
ggml_concat: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) jl 0x4de73 cmpl $0x4, -0x1c(%rbp) jl 0x4de94 leaq 0x6373d(%rip), %rdi # 0xb15b7 movl $0x916, %esi # imm = 0x916 leaq 0x63783(%rip), %rdx # 0xb1609 leaq 0x639b1(%rip), %rcx # 0xb183e movb $0x0, %al callq 0x48a00 movl $0x0, -0x44(%rbp) cmpl $0x4, -0x44(%rbp) jge 0x4df33 movl -0x44(%rbp), %eax cmpl -0x1c(%rbp), %eax jne 0x4ded2 movq -0x10(%rbp), %rax movslq -0x44(%rbp), %rcx movq 0x10(%rax,%rcx,8), %rcx movq -0x18(%rbp), %rax movslq -0x44(%rbp), %rdx addq 0x10(%rax,%rdx,8), %rcx movslq -0x44(%rbp), %rax movq %rcx, -0x40(%rbp,%rax,8) jmp 0x4df25 movq -0x10(%rbp), %rax movslq -0x44(%rbp), %rcx movq 0x10(%rax,%rcx,8), %rax movq -0x18(%rbp), %rcx movslq -0x44(%rbp), %rdx cmpq 0x10(%rcx,%rdx,8), %rax je 0x4df0f leaq 0x636c2(%rip), %rdi # 0xb15b7 movl $0x91e, %esi # imm = 0x91E leaq 0x63708(%rip), %rdx # 0xb1609 leaq 0x63956(%rip), %rcx # 0xb185e movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rax movslq -0x44(%rbp), %rcx movq 0x10(%rax,%rcx,8), %rcx movslq -0x44(%rbp), %rax movq %rcx, -0x40(%rbp,%rax,8) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0x4de9b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movl (%rax), %esi leaq -0x40(%rbp), %rcx movl $0x4, %edx callq 0x42510 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rdi movl -0x1c(%rbp), %edx xorl %esi, %esi callq 0x4df90 movq -0x50(%rbp), %rax movl $0x14, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x18(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x50(%rbp), %rax addq $0x50, %rsp popq %rbp retq
ggml_concat: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx cmp [rbp+var_1C], 0 jl short loc_4DE73 cmp [rbp+var_1C], 4 jl short loc_4DE94 loc_4DE73: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 916h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDim0DimGgmlMax; "dim >= 0 && dim < GGML_MAX_DIMS" mov al, 0 call _ggml_abort loc_4DE94: mov [rbp+var_44], 0 loc_4DE9B: cmp [rbp+var_44], 4 jge loc_4DF33 mov eax, [rbp+var_44] cmp eax, [rbp+var_1C] jnz short loc_4DED2 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_44] mov rcx, [rax+rcx*8+10h] mov rax, [rbp+var_18] movsxd rdx, [rbp+var_44] add rcx, [rax+rdx*8+10h] movsxd rax, [rbp+var_44] mov [rbp+rax*8+var_40], rcx jmp short loc_4DF25 loc_4DED2: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_44] mov rax, [rax+rcx*8+10h] mov rcx, [rbp+var_18] movsxd rdx, [rbp+var_44] cmp rax, [rcx+rdx*8+10h] jz short loc_4DF0F lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 91Eh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANeDBNeD; "a->ne[d] == b->ne[d]" mov al, 0 call _ggml_abort loc_4DF0F: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_44] mov rcx, [rax+rcx*8+10h] movsxd rax, [rbp+var_44] mov [rbp+rax*8+var_40], rcx loc_4DF25: mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp loc_4DE9B loc_4DF33: mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov esi, [rax] lea rcx, [rbp+var_40] mov edx, 4 call _ggml_new_tensor mov [rbp+var_50], rax mov rdi, [rbp+var_50] mov edx, [rbp+var_1C] xor esi, esi call ggml_set_op_params_i32 mov rax, [rbp+var_50] mov dword ptr [rax+50h], 14h mov rcx, [rbp+var_10] mov rax, [rbp+var_50] mov [rax+98h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_50] mov [rax+0A0h], rcx mov rax, [rbp+var_50] add rsp, 50h pop rbp retn
long long ggml_concat(long long a1, unsigned int *a2, long long a3, int a4) { long long v5; // [rsp+0h] [rbp-50h] int i; // [rsp+Ch] [rbp-44h] _QWORD v7[4]; // [rsp+10h] [rbp-40h] BYREF int v8; // [rsp+34h] [rbp-1Ch] long long v9; // [rsp+38h] [rbp-18h] unsigned int *v10; // [rsp+40h] [rbp-10h] long long v11; // [rsp+48h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; if ( a4 < 0 || v8 >= 4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2326, (long long)"GGML_ASSERT(%s) failed", "dim >= 0 && dim < GGML_MAX_DIMS"); for ( i = 0; i < 4; ++i ) { if ( i == v8 ) { v7[i] = *(_QWORD *)(v9 + 8LL * i + 16) + *(_QWORD *)&v10[2 * i + 4]; } else { if ( *(_QWORD *)&v10[2 * i + 4] != *(_QWORD *)(v9 + 8LL * i + 16) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2334, (long long)"GGML_ASSERT(%s) failed", "a->ne[d] == b->ne[d]"); v7[i] = *(_QWORD *)&v10[2 * i + 4]; } } v5 = ggml_new_tensor(v11, *v10, 4u, (long long)v7); ggml_set_op_params_i32(v5, 0LL, (unsigned int)v8); *(_DWORD *)(v5 + 80) = 20; *(_QWORD *)(v5 + 152) = v10; *(_QWORD *)(v5 + 160) = v9; return v5; }
ggml_concat: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX CMP dword ptr [RBP + -0x1c],0x0 JL 0x0014de73 CMP dword ptr [RBP + -0x1c],0x4 JL 0x0014de94 LAB_0014de73: LEA RDI,[0x1b15b7] MOV ESI,0x916 LEA RDX,[0x1b1609] LEA RCX,[0x1b183e] MOV AL,0x0 CALL 0x00148a00 LAB_0014de94: MOV dword ptr [RBP + -0x44],0x0 LAB_0014de9b: CMP dword ptr [RBP + -0x44],0x4 JGE 0x0014df33 MOV EAX,dword ptr [RBP + -0x44] CMP EAX,dword ptr [RBP + -0x1c] JNZ 0x0014ded2 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x44] MOV RCX,qword ptr [RAX + RCX*0x8 + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0x44] ADD RCX,qword ptr [RAX + RDX*0x8 + 0x10] MOVSXD RAX,dword ptr [RBP + -0x44] MOV qword ptr [RBP + RAX*0x8 + -0x40],RCX JMP 0x0014df25 LAB_0014ded2: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RCX + RDX*0x8 + 0x10] JZ 0x0014df0f LEA RDI,[0x1b15b7] MOV ESI,0x91e LEA RDX,[0x1b1609] LEA RCX,[0x1b185e] MOV AL,0x0 CALL 0x00148a00 LAB_0014df0f: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x44] MOV RCX,qword ptr [RAX + RCX*0x8 + 0x10] MOVSXD RAX,dword ptr [RBP + -0x44] MOV qword ptr [RBP + RAX*0x8 + -0x40],RCX LAB_0014df25: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x0014de9b LAB_0014df33: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX] LEA RCX,[RBP + -0x40] MOV EDX,0x4 CALL 0x00142510 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x50] MOV EDX,dword ptr [RBP + -0x1c] XOR ESI,ESI CALL 0x0014df90 MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x50],0x14 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x50] ADD RSP,0x50 POP RBP RET
long ggml_concat(int8 param_1,int4 *param_2,long param_3,int param_4) { long lVar1; int local_4c; long local_48 [4]; int local_24; long local_20; int4 *local_18; int8 local_10; local_24 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; if ((param_4 < 0) || (3 < param_4)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x916,"GGML_ASSERT(%s) failed","dim >= 0 && dim < GGML_MAX_DIMS"); } for (local_4c = 0; local_4c < 4; local_4c = local_4c + 1) { if (local_4c == local_24) { local_48[local_4c] = *(long *)(local_18 + (long)local_4c * 2 + 4) + *(long *)(local_20 + 0x10 + (long)local_4c * 8); } else { if (*(long *)(local_18 + (long)local_4c * 2 + 4) != *(long *)(local_20 + 0x10 + (long)local_4c * 8)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c" ,0x91e,"GGML_ASSERT(%s) failed","a->ne[d] == b->ne[d]"); } local_48[local_4c] = *(long *)(local_18 + (long)local_4c * 2 + 4); } } lVar1 = ggml_new_tensor(local_10,*local_18,4,local_48); ggml_set_op_params_i32(lVar1,0,local_24); *(int4 *)(lVar1 + 0x50) = 0x14; *(int4 **)(lVar1 + 0x98) = local_18; *(long *)(lVar1 + 0xa0) = local_20; return lVar1; }
39,986
ggml_concat
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_concat( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int dim) { GGML_ASSERT(dim >= 0 && dim < GGML_MAX_DIMS); int64_t ne[GGML_MAX_DIMS]; for (int d = 0; d < GGML_MAX_DIMS; ++d) { if (d == dim) { ne[d] = a->ne[d] + b->ne[d]; continue; } GGML_ASSERT(a->ne[d] == b->ne[d]); ne[d] = a->ne[d]; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, ne); ggml_set_op_params_i32(result, 0, dim); result->op = GGML_OP_CONCAT; result->src[0] = a; result->src[1] = b; return result; }
O2
c
ggml_concat: pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp cmpl $0x4, %ecx jae 0x2213a movl %ecx, %ebp movq %rdx, %rbx movq %rsi, %r14 movl %ecx, %eax leaq (,%rax,8), %rcx xorl %edx, %edx cmpq $0x20, %rdx je 0x220ea cmpq %rdx, %rcx jne 0x220d4 movq 0x10(%rbx,%rax,8), %rsi addq 0x10(%r14,%rax,8), %rsi movq %rsi, (%rsp,%rax,8) jmp 0x220e4 movq 0x10(%r14,%rdx), %rsi cmpq 0x10(%rbx,%rdx), %rsi jne 0x22119 movq %rsi, (%rsp,%rdx) addq $0x8, %rdx jmp 0x220b9 movl (%r14), %esi pushq $0x4 popq %rdx movq %rsp, %rcx callq 0x1d260 movl %ebp, 0x54(%rax) movl $0x14, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x2c463(%rip), %rdi # 0x4e583 leaq 0x2c4ae(%rip), %rdx # 0x4e5d5 leaq 0x2c6fc(%rip), %rcx # 0x4e82a movl $0x91e, %esi # imm = 0x91E xorl %eax, %eax callq 0x1f9b0 leaq 0x2c442(%rip), %rdi # 0x4e583 leaq 0x2c48d(%rip), %rdx # 0x4e5d5 leaq 0x2c6bb(%rip), %rcx # 0x4e80a movl $0x916, %esi # imm = 0x916 jmp 0x22133
ggml_concat: push rbp push r14 push rbx sub rsp, 20h cmp ecx, 4 jnb loc_2213A mov ebp, ecx mov rbx, rdx mov r14, rsi mov eax, ecx lea rcx, ds:0[rax*8] xor edx, edx loc_220B9: cmp rdx, 20h ; ' ' jz short loc_220EA cmp rcx, rdx jnz short loc_220D4 mov rsi, [rbx+rax*8+10h] add rsi, [r14+rax*8+10h] mov [rsp+rax*8+38h+var_38], rsi jmp short loc_220E4 loc_220D4: mov rsi, [r14+rdx+10h] cmp rsi, [rbx+rdx+10h] jnz short loc_22119 mov [rsp+rdx+38h+var_38], rsi loc_220E4: add rdx, 8 jmp short loc_220B9 loc_220EA: mov esi, [r14] push 4 pop rdx mov rcx, rsp call _ggml_new_tensor mov [rax+54h], ebp mov dword ptr [rax+50h], 14h mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 20h pop rbx pop r14 pop rbp retn loc_22119: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANeDBNeD; "a->ne[d] == b->ne[d]" mov esi, 91Eh loc_22133: xor eax, eax call _ggml_abort loc_2213A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDim0DimGgmlMax; "dim >= 0 && dim < GGML_MAX_DIMS" mov esi, 916h jmp short loc_22133
long long ggml_concat( long long a1, unsigned int *a2, long long a3, unsigned int a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v17; // rax long long v18; // rcx unsigned long long i; // rdx long long v20; // rsi long long result; // rax const char *v22; // rcx int v23; // esi _QWORD v24[7]; // [rsp+0h] [rbp-38h] BYREF if ( a4 >= 4 ) { v22 = "dim >= 0 && dim < GGML_MAX_DIMS"; v23 = 2326; LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v23, (long long)"GGML_ASSERT(%s) failed", (long long)v22, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v24[0]); } v17 = a4; v18 = 8LL * a4; for ( i = 0LL; i != 32; i += 8LL ) { if ( v18 == i ) { v24[v17] = *(_QWORD *)&a2[2 * v17 + 4] + *(_QWORD *)(a3 + 8 * v17 + 16); } else { v20 = *(_QWORD *)&a2[i / 4 + 4]; if ( v20 != *(_QWORD *)(a3 + i + 16) ) { v22 = "a->ne[d] == b->ne[d]"; v23 = 2334; goto LABEL_11; } v24[i / 8] = v20; } } result = ggml_new_tensor(a1, *a2, 4LL, (long long)v24); *(_DWORD *)(result + 84) = a4; *(_DWORD *)(result + 80) = 20; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_concat: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 CMP ECX,0x4 JNC 0x0012213a MOV EBP,ECX MOV RBX,RDX MOV R14,RSI MOV EAX,ECX LEA RCX,[RAX*0x8] XOR EDX,EDX LAB_001220b9: CMP RDX,0x20 JZ 0x001220ea CMP RCX,RDX JNZ 0x001220d4 MOV RSI,qword ptr [RBX + RAX*0x8 + 0x10] ADD RSI,qword ptr [R14 + RAX*0x8 + 0x10] MOV qword ptr [RSP + RAX*0x8],RSI JMP 0x001220e4 LAB_001220d4: MOV RSI,qword ptr [R14 + RDX*0x1 + 0x10] CMP RSI,qword ptr [RBX + RDX*0x1 + 0x10] JNZ 0x00122119 MOV qword ptr [RSP + RDX*0x1],RSI LAB_001220e4: ADD RDX,0x8 JMP 0x001220b9 LAB_001220ea: MOV ESI,dword ptr [R14] PUSH 0x4 POP RDX MOV RCX,RSP CALL 0x0011d260 MOV dword ptr [RAX + 0x54],EBP MOV dword ptr [RAX + 0x50],0x14 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_00122119: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14e82a] MOV ESI,0x91e LAB_00122133: XOR EAX,EAX CALL 0x0011f9b0 LAB_0012213a: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14e80a] MOV ESI,0x916 JMP 0x00122133
void ggml_concat(int8 param_1,int4 *param_2,long param_3,uint param_4) { long lVar1; ulong uVar2; char *pcVar3; long lVar4; int8 uVar5; long local_38 [4]; if (3 < param_4) { pcVar3 = "dim >= 0 && dim < GGML_MAX_DIMS"; uVar5 = 0x916; LAB_00122133: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar5,"GGML_ASSERT(%s) failed",pcVar3); } uVar2 = (ulong)param_4; lVar4 = 0; do { if (lVar4 == 0x20) { lVar4 = ggml_new_tensor(param_1,*param_2,4,local_38); *(uint *)(lVar4 + 0x54) = param_4; *(int4 *)(lVar4 + 0x50) = 0x14; *(int4 **)(lVar4 + 0x98) = param_2; *(long *)(lVar4 + 0xa0) = param_3; return; } if (uVar2 * 8 - lVar4 == 0) { local_38[uVar2] = *(long *)(param_3 + 0x10 + uVar2 * 8) + *(long *)(param_2 + uVar2 * 2 + 4); } else { lVar1 = *(long *)((long)param_2 + lVar4 + 0x10); if (lVar1 != *(long *)(param_3 + 0x10 + lVar4)) { pcVar3 = "a->ne[d] == b->ne[d]"; uVar5 = 0x91e; goto LAB_00122133; } *(long *)((long)local_38 + lVar4) = lVar1; } lVar4 = lVar4 + 8; } while( true ); }
39,987
JS_DefinePropertyDesc
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_DefinePropertyDesc(JSContext *ctx, JSValue obj, JSAtom prop, JSValue desc, int flags) { JSPropertyDescriptor d; int ret; if (js_obj_to_desc(ctx, &d, desc) < 0) return -1; ret = JS_DefineProperty(ctx, obj, prop, d.value, d.getter, d.setter, d.flags | flags); js_free_desc(ctx, &d); return ret; }
O1
c
JS_DefinePropertyDesc: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x28(%rsp), %rsi movq %r8, %rdx movq %r9, %rcx callq 0x4f47c testl %eax, %eax js 0x712ee movl 0x90(%rsp), %eax leaq 0x28(%rsp), %r12 orl (%r12), %eax movq 0x8(%r12), %r8 movq 0x10(%r12), %r9 movups 0x18(%r12), %xmm0 movups 0x28(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl %ebp, %ecx callq 0x254b9 movl %eax, %ebp movq %rbx, %rdi movq %r12, %rsi callq 0x3d8c3 movl %ebp, %eax jmp 0x712f3 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
JS_DefinePropertyDesc: push rbp push r15 push r14 push r12 push rbx sub rsp, 60h mov ebp, ecx mov r14, rdx mov r15, rsi mov rbx, rdi lea rsi, [rsp+88h+var_60] mov rdx, r8 mov rcx, r9 call js_obj_to_desc test eax, eax js short loc_712EE mov eax, [rsp+88h+arg_0] lea r12, [rsp+88h+var_60] or eax, [r12] mov r8, [r12+8] mov r9, [r12+10h] movups xmm0, xmmword ptr [r12+18h] movups xmm1, xmmword ptr [r12+28h] movups [rsp+88h+var_78], xmm1 movups [rsp+88h+var_88], xmm0 mov [rsp+88h+var_68], eax mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, ebp call JS_DefineProperty mov ebp, eax mov rdi, rbx mov rsi, r12 call js_free_desc mov eax, ebp jmp short loc_712F3 loc_712EE: mov eax, 0FFFFFFFFh loc_712F3: add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long JS_DefinePropertyDesc( long long a1, unsigned long long a2, long long a3, unsigned int a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, unsigned int a15) { __m128 v17; // xmm4 __m128 v18; // xmm5 unsigned int v19; // ebp int v21; // [rsp+28h] [rbp-60h] BYREF long long v22; // [rsp+30h] [rbp-58h] long long v23; // [rsp+38h] [rbp-50h] __m128 v24; // [rsp+40h] [rbp-48h] __m128 v25; // [rsp+50h] [rbp-38h] if ( (int)js_obj_to_desc(a1, (long long)&v21, a5, a6, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) < 0 ) return 0xFFFFFFFFLL; v19 = JS_DefineProperty( a1, a2, a3, a4, v22, v23, v24, v25, a9, a10, v17, v18, a13, a14, v24.m128_u64[0], v24.m128_i64[1], v25.m128_u64[0], v25.m128_i64[1], v21 | a15); js_free_desc(a1, (long long)&v21); return v19; }
JS_DefinePropertyDesc: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV EBP,ECX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RSI,[RSP + 0x28] MOV RDX,R8 MOV RCX,R9 CALL 0x0014f47c TEST EAX,EAX JS 0x001712ee MOV EAX,dword ptr [RSP + 0x90] LEA R12,[RSP + 0x28] OR EAX,dword ptr [R12] MOV R8,qword ptr [R12 + 0x8] MOV R9,qword ptr [R12 + 0x10] MOVUPS XMM0,xmmword ptr [R12 + 0x18] MOVUPS XMM1,xmmword ptr [R12 + 0x28] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,EBP CALL 0x001254b9 MOV EBP,EAX MOV RDI,RBX MOV RSI,R12 CALL 0x0013d8c3 MOV EAX,EBP JMP 0x001712f3 LAB_001712ee: MOV EAX,0xffffffff LAB_001712f3: ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 JS_DefinePropertyDesc (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,int8 param_6,uint param_7) { int iVar1; int4 uVar2; uint local_60 [2]; int8 local_58; int8 local_50; int4 local_48; int4 uStack_40; int4 local_38; int4 uStack_30; iVar1 = js_obj_to_desc(param_1,local_60,param_5,param_6); if (iVar1 < 0) { uVar2 = 0xffffffff; } else { uVar2 = JS_DefineProperty(param_1,param_2,param_3,param_4,local_58,local_50,local_48,uStack_40, local_38,uStack_30,param_7 | local_60[0]); js_free_desc(param_1,local_60); } return uVar2; }
39,988
GetNumBlock
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int GetNumBlock(size_t size) { // Safety against overflow if (size > INT_MAX - BLOCK_SIZE) { HEAP_LOG("Size too large for block conversion: %zu bytes\n", size); return INT_MAX / BLOCK_SIZE; } // Round up to nearest block int blocks = (size + BLOCK_SIZE - 1) / BLOCK_SIZE; HEAP_LOG("Size %zu bytes converted to %d blocks\n", size, blocks); return blocks; }
O3
c
GetNumBlock: leaq 0xfff(%rdi), %rcx shrq $0xc, %rcx cmpq $0x7ffff000, %rdi # imm = 0x7FFFF000 movl $0x7ffff, %eax # imm = 0x7FFFF cmovbl %ecx, %eax retq
GetNumBlock: lea rcx, [rdi+0FFFh] shr rcx, 0Ch cmp rdi, 7FFFF000h mov eax, offset unk_7FFFF cmovb eax, ecx retn
void * GetNumBlock(unsigned long long a1) { void *result; // rax result = &unk_7FFFF; if ( a1 < 0x7FFFF000 ) return (void *)(unsigned int)((a1 + 4095) >> 12); return result; }
GetNumBlock: LEA RCX,[RDI + 0xfff] SHR RCX,0xc CMP RDI,0x7ffff000 MOV EAX,0x7ffff CMOVC EAX,ECX RET
ulong GetNumBlock(ulong param_1) { ulong uVar1; uVar1 = 0x7ffff; if (param_1 < 0x7ffff000) { uVar1 = param_1 + 0xfff >> 0xc & 0xffffffff; } return uVar1; }
39,989
my_dir
eloqsql/mysys/my_lib.c
MY_DIR *my_dir(const char *path, myf MyFlags) { MY_DIR_HANDLE *dirh; FILEINFO finfo; DIR *dirp; struct dirent *dp; char tmp_path[FN_REFLEN + 2], *tmp_file; char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1]; DBUG_ENTER("my_dir"); DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags)); tmp_file= directory_file_name(tmp_path, path); if (!(dirp= opendir(tmp_path))) { my_errno= errno; goto err_open; } if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh), MYF(MyFlags | MY_ZEROFILL)))) goto err_alloc; if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO), ENTRIES_START_SIZE, ENTRIES_INCREMENT, MYF(MyFlags))) goto error; init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE, NAMES_START_SIZE, MYF(MyFlags)); dp= (struct dirent*) dirent_tmp; while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp))) { MY_STAT statbuf, *mystat= 0; if (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) continue; /* . or .. */ if (MyFlags & MY_WANT_STAT) { mystat= &statbuf; bzero(mystat, sizeof(*mystat)); (void) strmov(tmp_file, dp->d_name); (void) my_stat(tmp_path, mystat, MyFlags); if (!(mystat->st_mode & MY_S_IREAD)) continue; } if (!(finfo.name= strdup_root(&dirh->root, dp->d_name))) goto error; if (mystat && !((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat))))) goto error; finfo.mystat= mystat; if (push_dynamic(&dirh->array, (uchar*)&finfo)) goto error; } (void) closedir(dirp); if (MyFlags & MY_WANT_SORT) sort_dynamic(&dirh->array, (qsort_cmp) comp_names); dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *); dirh->dir.number_of_files= dirh->array.elements; DBUG_RETURN(&dirh->dir); error: my_dirend(&dirh->dir); err_alloc: (void) closedir(dirp); err_open: if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_DIR, MYF(ME_BELL), path, my_errno); DBUG_RETURN(NULL); }
O3
c
my_dir: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2e8, %rsp # imm = 0x2E8 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpb $0x0, (%rdi) movq %rsi, %r15 leaq 0x3645b(%rip), %rsi # 0x96e01 cmovneq %rdi, %rsi leaq -0x240(%rbp), %rdi movl $0x201, %edx # imm = 0x201 callq 0x90ee4 movq %rax, %r12 cmpb $0x2f, -0x1(%rax) je 0x609ce movw $0x2f, (%r12) incq %r12 leaq -0x240(%rbp), %rdi callq 0x36560 testq %rax, %rax je 0x60a5e movq %rax, %r13 leaq 0x35b7fb(%rip), %rbx # 0x3bc1e4 movl (%rbx), %edi movq %r15, -0x248(%rbp) orq $0x20, %r15 movl $0x78, %esi movq %r15, %rdx callq 0x60d25 testq %rax, %rax je 0x60a4d movq %rax, %r15 movq %r12, -0x268(%rbp) movq %rbx, %r12 movl (%rbx), %edi leaq 0x10(%rax), %rbx movq -0x248(%rbp), %rax movq %rax, (%rsp) movq %rbx, %rsi movl $0x10, %edx xorl %ecx, %ecx movl $0x200, %r8d # imm = 0x200 movl $0x1000, %r9d # imm = 0x1000 callq 0x58964 testb %al, %al je 0x60a9d movq %r15, %rdi callq 0x60944 movq %r13, %rdi callq 0x36530 movq -0x248(%rbp), %r15 jmp 0x60a6c callq 0x369d0 movl (%rax), %ebx callq 0x62176 movl %ebx, (%rax) testb $0x18, %r15b je 0x60a95 callq 0x62176 movl (%rax), %ecx xorl %r15d, %r15d movl $0x4, %esi movl $0xc, %edi movq %r14, %rdx xorl %eax, %eax callq 0x5d5bf jmp 0x60c0e xorl %r15d, %r15d jmp 0x60c0e movq %rbx, -0x260(%rbp) movq %r14, -0x258(%rbp) movl (%r12), %edi movq %r15, %rsi addq $0x38, %rsi movl $0x8000, %edx # imm = 0x8000 movl $0x8000, %ecx # imm = 0x8000 movq %rsi, -0x250(%rbp) movq -0x248(%rbp), %r8 callq 0x5cfac movq %r13, %rdi callq 0x36570 testq %rax, %rax je 0x60bd5 movq %rax, %rbx movq -0x248(%rbp), %r14 cmpb $0x2e, 0x13(%rbx) jne 0x60b0f movzbl 0x14(%rbx), %eax testl %eax, %eax je 0x60bc1 cmpl $0x2e, %eax jne 0x60b0f cmpb $0x0, 0x15(%rbx) je 0x60bc1 addq $0x13, %rbx btl $0xe, %r14d jb 0x60b1f xorl %r12d, %r12d jmp 0x60b5f movl $0x90, %edx leaq -0x308(%rbp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x362e0 movq -0x268(%rbp), %rdi movq %rbx, %rsi callq 0x363f0 leaq -0x240(%rbp), %rdi movq %r12, %rsi movq %r14, %rdx callq 0x60c43 testb $0x1, -0x2ef(%rbp) je 0x60bc1 movq -0x250(%rbp), %rdi movq %rbx, %rsi callq 0x5d49e movq %rax, -0x278(%rbp) testq %rax, %rax je 0x60c32 testq %r12, %r12 je 0x60ba1 movl $0x90, %edx movq -0x250(%rbp), %rdi movq %r12, %rsi callq 0x5d50c testq %rax, %rax jne 0x60ba3 jmp 0x60c32 xorl %eax, %eax movq %rax, -0x270(%rbp) movq -0x260(%rbp), %rdi leaq -0x278(%rbp), %rsi callq 0x58a02 testb %al, %al jne 0x60c32 movq %r13, %rdi callq 0x36570 movq %rax, %rbx testq %rax, %rax jne 0x60aee movq %r13, %rdi callq 0x36530 btl $0xd, -0x248(%rbp) jae 0x60bff movq 0x10(%r15), %rdi movl 0x18(%r15), %esi movl 0x24(%r15), %edx leaq 0xed(%rip), %rcx # 0x60ce7 callq 0x64010 movq 0x10(%r15), %rax movq %rax, (%r15) movl 0x18(%r15), %eax movl %eax, 0x8(%r15) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x60c3e movq %r15, %rax addq $0x2e8, %rsp # imm = 0x2E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x258(%rbp), %r14 jmp 0x60a45 callq 0x36290
my_dir: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2E8h mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp byte ptr [rdi], 0 mov r15, rsi lea rsi, aInvalidOrMissi+21h; "." cmovnz rsi, rdi lea rdi, [rbp+var_240] mov edx, 201h call strnmov mov r12, rax cmp byte ptr [rax-1], 2Fh ; '/' jz short loc_609CE mov word ptr [r12], 2Fh ; '/' inc r12 loc_609CE: lea rdi, [rbp+var_240] call _opendir test rax, rax jz short loc_60A5E mov r13, rax lea rbx, key_memory_MY_DIR mov edi, [rbx] mov [rbp+var_248], r15 or r15, 20h mov esi, 78h ; 'x' mov rdx, r15 call my_malloc test rax, rax jz short loc_60A4D mov r15, rax mov [rbp+var_268], r12 mov r12, rbx mov edi, [rbx] lea rbx, [rax+10h] mov rax, [rbp+var_248] mov [rsp+310h+var_310], rax mov rsi, rbx mov edx, 10h xor ecx, ecx mov r8d, 200h mov r9d, 1000h call init_dynamic_array2 test al, al jz short loc_60A9D loc_60A45: mov rdi, r15 call my_dirend loc_60A4D: mov rdi, r13 call _closedir mov r15, [rbp+var_248] jmp short loc_60A6C loc_60A5E: call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx loc_60A6C: test r15b, 18h jz short loc_60A95 call _my_thread_var mov ecx, [rax] xor r15d, r15d mov esi, 4 mov edi, 0Ch mov rdx, r14 xor eax, eax call my_error jmp loc_60C0E loc_60A95: xor r15d, r15d jmp loc_60C0E loc_60A9D: mov [rbp+var_260], rbx mov [rbp+var_258], r14 mov edi, [r12] mov rsi, r15 add rsi, 38h ; '8' mov edx, 8000h mov ecx, 8000h mov [rbp+var_250], rsi mov r8, [rbp+var_248] call init_alloc_root mov rdi, r13 call _readdir64 test rax, rax jz loc_60BD5 mov rbx, rax mov r14, [rbp+var_248] loc_60AEE: cmp byte ptr [rbx+13h], 2Eh ; '.' jnz short loc_60B0F movzx eax, byte ptr [rbx+14h] test eax, eax jz loc_60BC1 cmp eax, 2Eh ; '.' jnz short loc_60B0F cmp byte ptr [rbx+15h], 0 jz loc_60BC1 loc_60B0F: add rbx, 13h bt r14d, 0Eh jb short loc_60B1F xor r12d, r12d jmp short loc_60B5F loc_60B1F: mov edx, 90h lea r12, [rbp+var_308] mov rdi, r12 xor esi, esi call _memset mov rdi, [rbp+var_268] mov rsi, rbx call _strcpy lea rdi, [rbp+var_240] mov rsi, r12 mov rdx, r14 call my_stat test [rbp+var_2EF], 1 jz short loc_60BC1 loc_60B5F: mov rdi, [rbp+var_250] mov rsi, rbx call strdup_root mov [rbp+var_278], rax test rax, rax jz loc_60C32 test r12, r12 jz short loc_60BA1 mov edx, 90h mov rdi, [rbp+var_250] mov rsi, r12 call memdup_root test rax, rax jnz short loc_60BA3 jmp loc_60C32 loc_60BA1: xor eax, eax loc_60BA3: mov [rbp+var_270], rax mov rdi, [rbp+var_260] lea rsi, [rbp+var_278] call insert_dynamic test al, al jnz short loc_60C32 loc_60BC1: mov rdi, r13 call _readdir64 mov rbx, rax test rax, rax jnz loc_60AEE loc_60BD5: mov rdi, r13 call _closedir bt dword ptr [rbp+var_248], 0Dh jnb short loc_60BFF mov rdi, [r15+10h] mov esi, [r15+18h] mov edx, [r15+24h] lea rcx, comp_names call my_qsort loc_60BFF: mov rax, [r15+10h] mov [r15], rax mov eax, [r15+18h] mov [r15+8], eax loc_60C0E: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_60C3E mov rax, r15 add rsp, 2E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_60C32: mov r14, [rbp+var_258] jmp loc_60A45 loc_60C3E: call ___stack_chk_fail
long long my_dir(char *a1, long long a2) { char *v2; // r14 char *v4; // rsi char *v5; // rax char *v6; // r12 _BYTE *v7; // rdi long long v8; // rax _BYTE *v9; // r13 long long v10; // rax long long v11; // r15 long long v12; // rbx int v13; // ebx unsigned int *v14; // rax long long v15; // rax _BYTE *v16; // rbx long long v17; // r14 long long v18; // rbx _BYTE *v19; // r12 char *v20; // rax _BYTE v22[144]; // [rsp+8h] [rbp-308h] BYREF _QWORD v23[2]; // [rsp+98h] [rbp-278h] BYREF char *v24; // [rsp+A8h] [rbp-268h] long long v25; // [rsp+B0h] [rbp-260h] char *v26; // [rsp+B8h] [rbp-258h] long long v27; // [rsp+C0h] [rbp-250h] long long v28; // [rsp+C8h] [rbp-248h] BYREF _BYTE v29[528]; // [rsp+D0h] [rbp-240h] BYREF unsigned long long v30; // [rsp+2E0h] [rbp-30h] v2 = a1; v30 = __readfsqword(0x28u); v4 = "."; if ( *a1 ) v4 = a1; v5 = (char *)strnmov(v29, v4, 513LL); v6 = v5; if ( *(v5 - 1) != 47 ) { *(_WORD *)v5 = 47; v6 = v5 + 1; } v7 = v29; v8 = opendir(v29); if ( !v8 ) { v13 = *(_DWORD *)__errno_location(v29); *(_DWORD *)my_thread_var(v29) = v13; goto LABEL_11; } v9 = (_BYTE *)v8; v28 = a2; v10 = my_malloc(key_memory_MY_DIR, 120LL); if ( !v10 ) goto LABEL_9; v11 = v10; v24 = v6; v12 = v10 + 16; if ( (unsigned __int8)init_dynamic_array2(key_memory_MY_DIR, v10 + 16, 0x10u, 0LL, 0x200u, 0x1000u, v28) ) goto LABEL_8; v25 = v12; v26 = v2; v27 = v11 + 56; init_alloc_root(key_memory_MY_DIR, (long long *)(v11 + 56), 0x8000LL, 0x8000LL, v28); v15 = readdir64(v9); if ( !v15 ) { LABEL_30: closedir(v9); if ( _bittest((const signed __int32 *)&v28, 0xDu) ) my_qsort(*(_QWORD *)(v11 + 16), *(unsigned int *)(v11 + 24), *(unsigned int *)(v11 + 36), comp_names); *(_QWORD *)v11 = *(_QWORD *)(v11 + 16); *(_DWORD *)(v11 + 8) = *(_DWORD *)(v11 + 24); return v11; } v16 = (_BYTE *)v15; v17 = v28; while ( 1 ) { if ( v16[19] == 46 && (!v16[20] || v16[20] == 46 && !v16[21]) ) goto LABEL_29; v18 = (long long)(v16 + 19); if ( (v17 & 0x4000) != 0 ) { v19 = v22; memset(v22, 0LL, sizeof(v22)); strcpy(v24, v18); my_stat(v29, v22, v17); if ( (v22[25] & 1) == 0 ) goto LABEL_29; } else { v19 = 0LL; } v23[0] = strdup_root(v27, v18); if ( !v23[0] ) break; if ( v19 ) { v20 = memdup_root(v27, (long long)v19, 144LL); if ( !v20 ) break; } else { v20 = 0LL; } v23[1] = v20; if ( (unsigned __int8)insert_dynamic(v25, (long long)v23) ) break; LABEL_29: v16 = (_BYTE *)readdir64(v9); if ( !v16 ) goto LABEL_30; } v2 = v26; LABEL_8: my_dirend(v11); LABEL_9: v7 = v9; closedir(v9); LOBYTE(a2) = v28; LABEL_11: if ( (a2 & 0x18) == 0 ) return 0LL; v14 = (unsigned int *)my_thread_var(v7); v11 = 0LL; my_error(0xCu, 4LL, v2, *v14); return v11; }
my_dir: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2e8 MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP byte ptr [RDI],0x0 MOV R15,RSI LEA RSI,[0x196e01] CMOVNZ RSI,RDI LEA RDI,[RBP + -0x240] MOV EDX,0x201 CALL 0x00190ee4 MOV R12,RAX CMP byte ptr [RAX + -0x1],0x2f JZ 0x001609ce MOV word ptr [R12],0x2f INC R12 LAB_001609ce: LEA RDI,[RBP + -0x240] CALL 0x00136560 TEST RAX,RAX JZ 0x00160a5e MOV R13,RAX LEA RBX,[0x4bc1e4] MOV EDI,dword ptr [RBX] MOV qword ptr [RBP + -0x248],R15 OR R15,0x20 MOV ESI,0x78 MOV RDX,R15 CALL 0x00160d25 TEST RAX,RAX JZ 0x00160a4d MOV R15,RAX MOV qword ptr [RBP + -0x268],R12 MOV R12,RBX MOV EDI,dword ptr [RBX] LEA RBX,[RAX + 0x10] MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RSP],RAX MOV RSI,RBX MOV EDX,0x10 XOR ECX,ECX MOV R8D,0x200 MOV R9D,0x1000 CALL 0x00158964 TEST AL,AL JZ 0x00160a9d LAB_00160a45: MOV RDI,R15 CALL 0x00160944 LAB_00160a4d: MOV RDI,R13 CALL 0x00136530 MOV R15,qword ptr [RBP + -0x248] JMP 0x00160a6c LAB_00160a5e: CALL 0x001369d0 MOV EBX,dword ptr [RAX] CALL 0x00162176 MOV dword ptr [RAX],EBX LAB_00160a6c: TEST R15B,0x18 JZ 0x00160a95 CALL 0x00162176 MOV ECX,dword ptr [RAX] XOR R15D,R15D MOV ESI,0x4 MOV EDI,0xc MOV RDX,R14 XOR EAX,EAX CALL 0x0015d5bf JMP 0x00160c0e LAB_00160a95: XOR R15D,R15D JMP 0x00160c0e LAB_00160a9d: MOV qword ptr [RBP + -0x260],RBX MOV qword ptr [RBP + -0x258],R14 MOV EDI,dword ptr [R12] MOV RSI,R15 ADD RSI,0x38 MOV EDX,0x8000 MOV ECX,0x8000 MOV qword ptr [RBP + -0x250],RSI MOV R8,qword ptr [RBP + -0x248] CALL 0x0015cfac MOV RDI,R13 CALL 0x00136570 TEST RAX,RAX JZ 0x00160bd5 MOV RBX,RAX MOV R14,qword ptr [RBP + -0x248] LAB_00160aee: CMP byte ptr [RBX + 0x13],0x2e JNZ 0x00160b0f MOVZX EAX,byte ptr [RBX + 0x14] TEST EAX,EAX JZ 0x00160bc1 CMP EAX,0x2e JNZ 0x00160b0f CMP byte ptr [RBX + 0x15],0x0 JZ 0x00160bc1 LAB_00160b0f: ADD RBX,0x13 BT R14D,0xe JC 0x00160b1f XOR R12D,R12D JMP 0x00160b5f LAB_00160b1f: MOV EDX,0x90 LEA R12,[RBP + -0x308] MOV RDI,R12 XOR ESI,ESI CALL 0x001362e0 MOV RDI,qword ptr [RBP + -0x268] MOV RSI,RBX CALL 0x001363f0 LEA RDI,[RBP + -0x240] MOV RSI,R12 MOV RDX,R14 CALL 0x00160c43 TEST byte ptr [RBP + -0x2ef],0x1 JZ 0x00160bc1 LAB_00160b5f: MOV RDI,qword ptr [RBP + -0x250] MOV RSI,RBX CALL 0x0015d49e MOV qword ptr [RBP + -0x278],RAX TEST RAX,RAX JZ 0x00160c32 TEST R12,R12 JZ 0x00160ba1 MOV EDX,0x90 MOV RDI,qword ptr [RBP + -0x250] MOV RSI,R12 CALL 0x0015d50c TEST RAX,RAX JNZ 0x00160ba3 JMP 0x00160c32 LAB_00160ba1: XOR EAX,EAX LAB_00160ba3: MOV qword ptr [RBP + -0x270],RAX MOV RDI,qword ptr [RBP + -0x260] LEA RSI,[RBP + -0x278] CALL 0x00158a02 TEST AL,AL JNZ 0x00160c32 LAB_00160bc1: MOV RDI,R13 CALL 0x00136570 MOV RBX,RAX TEST RAX,RAX JNZ 0x00160aee LAB_00160bd5: MOV RDI,R13 CALL 0x00136530 BT dword ptr [RBP + -0x248],0xd JNC 0x00160bff MOV RDI,qword ptr [R15 + 0x10] MOV ESI,dword ptr [R15 + 0x18] MOV EDX,dword ptr [R15 + 0x24] LEA RCX,[0x160ce7] CALL 0x00164010 LAB_00160bff: MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [R15],RAX MOV EAX,dword ptr [R15 + 0x18] MOV dword ptr [R15 + 0x8],EAX LAB_00160c0e: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00160c3e MOV RAX,R15 ADD RSP,0x2e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00160c32: MOV R14,qword ptr [RBP + -0x258] JMP 0x00160a45 LAB_00160c3e: CALL 0x00136290
int8 * my_dir(char *param_1,ulong param_2) { int iVar1; ulong uVar2; char cVar3; char *pcVar4; DIR *__dirp; int8 *puVar5; int *piVar6; int4 *puVar7; dirent64 *pdVar8; long lVar9; int1 *__s; long in_FS_OFFSET; int1 local_310 [25]; byte local_2f7; long local_280; long local_278; char *local_270; int8 *local_268; char *local_260; int8 *local_258; ulong local_250; char local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar4 = "."; if (*param_1 != '\0') { pcVar4 = param_1; } pcVar4 = (char *)strnmov(local_248,pcVar4,0x201); if (pcVar4[-1] != '/') { pcVar4[0] = '/'; pcVar4[1] = '\0'; pcVar4 = pcVar4 + 1; } __dirp = opendir(local_248); if (__dirp == (DIR *)0x0) { piVar6 = __errno_location(); iVar1 = *piVar6; piVar6 = (int *)_my_thread_var(); *piVar6 = iVar1; } else { local_250 = param_2; puVar5 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,param_2 | 0x20); if (puVar5 != (int8 *)0x0) { local_270 = pcVar4; cVar3 = init_dynamic_array2(key_memory_MY_DIR,puVar5 + 2,0x10,0,0x200,0x1000,local_250); if (cVar3 == '\0') { local_258 = puVar5 + 7; local_268 = puVar5 + 2; local_260 = param_1; init_alloc_root(key_memory_MY_DIR,local_258,0x8000,0x8000,local_250); pdVar8 = readdir64(__dirp); uVar2 = local_250; while (pdVar8 != (dirent64 *)0x0) { if ((pdVar8->d_name[0] != '.') || ((pdVar8->d_name[1] != '\0' && ((pdVar8->d_name[1] != '.' || (pdVar8->d_name[2] != '\0')))))) { if (((uint)uVar2 >> 0xe & 1) == 0) { __s = (int1 *)0x0; } else { __s = local_310; memset(__s,0,0x90); strcpy(local_270,pdVar8->d_name); my_stat(local_248,__s,uVar2); if ((local_2f7 & 1) == 0) goto LAB_00160bc1; } local_280 = strdup_root(local_258,pdVar8->d_name); param_1 = local_260; if (local_280 == 0) goto LAB_00160a45; if (__s == (int1 *)0x0) { lVar9 = 0; } else { lVar9 = memdup_root(local_258,__s,0x90); param_1 = local_260; if (lVar9 == 0) goto LAB_00160a45; } local_278 = lVar9; cVar3 = insert_dynamic(local_268); param_1 = local_260; if (cVar3 != '\0') goto LAB_00160a45; } LAB_00160bc1: pdVar8 = readdir64(__dirp); } closedir(__dirp); if (((uint)local_250 >> 0xd & 1) != 0) { my_qsort(puVar5[2],*(int4 *)(puVar5 + 3),*(int4 *)((long)puVar5 + 0x24), comp_names); } *puVar5 = puVar5[2]; *(int4 *)(puVar5 + 1) = *(int4 *)(puVar5 + 3); goto LAB_00160c0e; } LAB_00160a45: my_dirend(puVar5); } closedir(__dirp); param_2 = local_250; } if ((param_2 & 0x18) == 0) { puVar5 = (int8 *)0x0; } else { puVar7 = (int4 *)_my_thread_var(); puVar5 = (int8 *)0x0; my_error(0xc,4,param_1,*puVar7); } LAB_00160c0e: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return puVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,990
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
Value get_named(const std::string & name) { for (const auto & [key, value] : kwargs) { if (key == name) return value; } return Value(); }
O3
cpp
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x18(%rsi), %r14 movq 0x20(%rsi), %r13 cmpq %r13, %r14 je 0xb2dd4 movq (%rdx), %r15 movq 0x8(%rdx), %r12 cmpq %r12, 0x8(%r14) jne 0xb2dcb testq %r12, %r12 je 0xb2e12 movq (%r14), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1b950 testl %eax, %eax je 0xb2e12 addq $0x70, %r14 cmpq %r13, %r14 jne 0xb2dae leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x5d774 movq %r14, %rdi movl $0x1, %esi callq 0x5d774 jmp 0xb2e21 addq $0x20, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x9263e movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi mov r14, [rsi+18h] mov r13, [rsi+20h] cmp r14, r13 jz short loc_B2DD4 mov r15, [rdx] mov r12, [rdx+8] loc_B2DAE: cmp [r14+8], r12 jnz short loc_B2DCB test r12, r12 jz short loc_B2E12 mov rdi, [r14] mov rsi, r15 mov rdx, r12 call _bcmp test eax, eax jz short loc_B2E12 loc_B2DCB: add r14, 70h ; 'p' cmp r14, r13 jnz short loc_B2DAE loc_B2DD4: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_B2E21 loc_B2E12: add r14, 20h ; ' ' mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_B2E21: mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, long long *a3) { _QWORD *v3; // r14 _QWORD *v4; // r13 long long v5; // r15 long long v6; // r12 v3 = *(_QWORD **)(a2 + 24); v4 = *(_QWORD **)(a2 + 32); if ( v3 == v4 ) { LABEL_7: *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); } else { v5 = *a3; v6 = a3[1]; while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) ) { v3 += 14; if ( v3 == v4 ) goto LABEL_7; } minja::Value::Value(this, (const minja::Value *)(v3 + 4)); } return this; }
get_named: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] CMP R14,R13 JZ 0x001b2dd4 MOV R15,qword ptr [RDX] MOV R12,qword ptr [RDX + 0x8] LAB_001b2dae: CMP qword ptr [R14 + 0x8],R12 JNZ 0x001b2dcb TEST R12,R12 JZ 0x001b2e12 MOV RDI,qword ptr [R14] MOV RSI,R15 MOV RDX,R12 CALL 0x0011b950 TEST EAX,EAX JZ 0x001b2e12 LAB_001b2dcb: ADD R14,0x70 CMP R14,R13 JNZ 0x001b2dae LAB_001b2dd4: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015d774 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015d774 JMP 0x001b2e21 LAB_001b2e12: ADD R14,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x0019263e LAB_001b2e21: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */ string * minja::ArgumentsValue::get_named(string *param_1) { int8 *puVar1; void *__s2; size_t __n; int iVar2; int8 *in_RDX; long in_RSI; bool bVar3; int8 *puVar4; puVar4 = *(int8 **)(in_RSI + 0x18); puVar1 = *(int8 **)(in_RSI + 0x20); if (puVar4 != puVar1) { __s2 = (void *)*in_RDX; __n = in_RDX[1]; do { if ((puVar4[1] == __n) && ((__n == 0 || (iVar2 = bcmp((void *)*puVar4,__s2,__n), iVar2 == 0))) ) { Value::Value((Value *)param_1,(Value *)(puVar4 + 4)); return param_1; } puVar4 = puVar4 + 0xe; } while (puVar4 != puVar1); } bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (string)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); return param_1; }
39,991
ma_check_env_str
eloqsql/libmariadb/include/ma_string.h
static inline my_bool ma_check_env_str(const char *env) { unsigned int i; if (!env) return 1; for (i=0; i < MAX_ENV_SIZE; i++) { if (env[i] == 0) break; } if (i >= MAX_ENV_SIZE) return 1; return 0; }
O0
c
ma_check_env_str: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x50b95 movb $0x1, -0x1(%rbp) jmp 0x50bd7 movl $0x0, -0x14(%rbp) cmpl $0x400, -0x14(%rbp) # imm = 0x400 jae 0x50bc4 movq -0x10(%rbp), %rax movl -0x14(%rbp), %ecx movsbl (%rax,%rcx), %eax cmpl $0x0, %eax jne 0x50bb7 jmp 0x50bc4 jmp 0x50bb9 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x50b9c cmpl $0x400, -0x14(%rbp) # imm = 0x400 jb 0x50bd3 movb $0x1, -0x1(%rbp) jmp 0x50bd7 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax)
ma_check_env_str: push rbp mov rbp, rsp mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_50B95 mov [rbp+var_1], 1 jmp short loc_50BD7 loc_50B95: mov [rbp+var_14], 0 loc_50B9C: cmp [rbp+var_14], 400h jnb short loc_50BC4 mov rax, [rbp+var_10] mov ecx, [rbp+var_14] movsx eax, byte ptr [rax+rcx] cmp eax, 0 jnz short loc_50BB7 jmp short loc_50BC4 loc_50BB7: jmp short $+2 loc_50BB9: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_50B9C loc_50BC4: cmp [rbp+var_14], 400h jb short loc_50BD3 mov [rbp+var_1], 1 jmp short loc_50BD7 loc_50BD3: mov [rbp+var_1], 0 loc_50BD7: mov al, [rbp+var_1] pop rbp retn
bool ma_check_env_str(long long a1) { unsigned int i; // [rsp+0h] [rbp-14h] if ( !a1 ) return 1; for ( i = 0; i < 0x400 && *(_BYTE *)(a1 + i); ++i ) ; return i >= 0x400; }
ma_check_env_str: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00150b95 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00150bd7 LAB_00150b95: MOV dword ptr [RBP + -0x14],0x0 LAB_00150b9c: CMP dword ptr [RBP + -0x14],0x400 JNC 0x00150bc4 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 JNZ 0x00150bb7 JMP 0x00150bc4 LAB_00150bb7: JMP 0x00150bb9 LAB_00150bb9: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x00150b9c LAB_00150bc4: CMP dword ptr [RBP + -0x14],0x400 JC 0x00150bd3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00150bd7 LAB_00150bd3: MOV byte ptr [RBP + -0x1],0x0 LAB_00150bd7: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 ma_check_env_str(long param_1) { uint local_1c; int1 local_9; if (param_1 == 0) { local_9 = 1; } else { for (local_1c = 0; (local_1c < 0x400 && (*(char *)(param_1 + (ulong)local_1c) != '\0')); local_1c = local_1c + 1) { } if (local_1c < 0x400) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
39,992
translog_is_LSN_chunk
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_is_LSN_chunk(uchar type) { DBUG_ENTER("translog_is_LSN_chunk"); DBUG_PRINT("info", ("byte: %x chunk type: %u record type: %u", type, type >> 6, type & TRANSLOG_REC_TYPE)); DBUG_RETURN(((type & TRANSLOG_CHUNK_TYPE) == TRANSLOG_CHUNK_FIXED) || (((type & TRANSLOG_CHUNK_TYPE) == TRANSLOG_CHUNK_LSN) && ((type & TRANSLOG_REC_TYPE)) != TRANSLOG_CHUNK_0_CONT)); }
O0
c
translog_is_LSN_chunk: pushq %rbp movq %rsp, %rbp movb %dil, %al movb %al, -0x1(%rbp) jmp 0x8fa2c jmp 0x8fa2e movzbl -0x1(%rbp), %ecx andl $0xc0, %ecx movb $0x1, %al cmpl $0x40, %ecx movb %al, -0x2(%rbp) je 0x8fa6c movzbl -0x1(%rbp), %ecx andl $0xc0, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x3(%rbp) jne 0x8fa66 movzbl -0x1(%rbp), %eax andl $0x3f, %eax cmpl $0x3f, %eax setne %al movb %al, -0x3(%rbp) movb -0x3(%rbp), %al movb %al, -0x2(%rbp) movb -0x2(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x4(%rbp) movb -0x4(%rbp), %al popq %rbp retq nopl (%rax)
translog_is_LSN_chunk: push rbp mov rbp, rsp mov al, dil mov [rbp+var_1], al jmp short $+2 loc_8FA2C: jmp short $+2 loc_8FA2E: movzx ecx, [rbp+var_1] and ecx, 0C0h mov al, 1 cmp ecx, 40h ; '@' mov [rbp+var_2], al jz short loc_8FA6C movzx ecx, [rbp+var_1] and ecx, 0C0h xor eax, eax cmp ecx, 0 mov [rbp+var_3], al jnz short loc_8FA66 movzx eax, [rbp+var_1] and eax, 3Fh cmp eax, 3Fh ; '?' setnz al mov [rbp+var_3], al loc_8FA66: mov al, [rbp+var_3] mov [rbp+var_2], al loc_8FA6C: mov al, [rbp+var_2] and al, 1 movzx eax, al mov [rbp+var_4], al mov al, [rbp+var_4] pop rbp retn
long long translog_is_LSN_chunk(char a1) { bool v2; // [rsp+1h] [rbp-3h] char v3; // [rsp+2h] [rbp-2h] v3 = 1; if ( (a1 & 0xC0) != 0x40 ) { v2 = 0; if ( (a1 & 0xC0) == 0 ) v2 = (a1 & 0x3F) != 63; v3 = v2; } return v3 & 1; }
translog_is_LSN_chunk: PUSH RBP MOV RBP,RSP MOV AL,DIL MOV byte ptr [RBP + -0x1],AL JMP 0x0018fa2c LAB_0018fa2c: JMP 0x0018fa2e LAB_0018fa2e: MOVZX ECX,byte ptr [RBP + -0x1] AND ECX,0xc0 MOV AL,0x1 CMP ECX,0x40 MOV byte ptr [RBP + -0x2],AL JZ 0x0018fa6c MOVZX ECX,byte ptr [RBP + -0x1] AND ECX,0xc0 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x3],AL JNZ 0x0018fa66 MOVZX EAX,byte ptr [RBP + -0x1] AND EAX,0x3f CMP EAX,0x3f SETNZ AL MOV byte ptr [RBP + -0x3],AL LAB_0018fa66: MOV AL,byte ptr [RBP + -0x3] MOV byte ptr [RBP + -0x2],AL LAB_0018fa6c: MOV AL,byte ptr [RBP + -0x2] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x4],AL MOV AL,byte ptr [RBP + -0x4] POP RBP RET
bool translog_is_LSN_chunk(byte param_1) { bool local_b; bool local_a; local_a = true; if ((param_1 & 0xc0) != 0x40) { local_b = (param_1 & 0xc0) == 0 && (param_1 & 0x3f) != 0x3f; local_a = local_b; } return local_a; }
39,993
ma_keylength_part
eloqsql/storage/maria/ma_search.c
uint _ma_keylength_part(MARIA_KEYDEF *keyinfo, register const uchar *key, HA_KEYSEG *end) { reg1 HA_KEYSEG *keyseg; const uchar *start= key; for (keyseg=keyinfo->seg ; keyseg != end ; keyseg++) { if (keyseg->flag & HA_NULL_PART) if (!*key++) continue; if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART)) { uint length; get_key_length(length,key); key+=length; } else key+= keyseg->length; } return (uint) (key-start); }
O3
c
ma_keylength_part: movq 0xc0(%rdi), %rcx movq %rsi, %rax cmpq %rdx, %rcx je 0x57778 pushq %rbp movq %rsp, %rbp movq %rsi, %rax movzwl 0x12(%rcx), %edi testb $0x10, %dil je 0x57737 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax je 0x5776e testb $0x29, %dil je 0x57751 movzbl (%rax), %edi cmpq $0xff, %rdi je 0x57757 movl $0x1, %r8d jmp 0x57768 movzwl 0x14(%rcx), %edi jmp 0x5776b movzwl 0x1(%rax), %edi rolw $0x8, %di movzwl %di, %edi movl $0x3, %r8d addq %r8, %rax addq %rdi, %rax addq $0x20, %rcx cmpq %rdx, %rcx jne 0x57724 popq %rbp subl %esi, %eax retq
_ma_keylength_part: mov rcx, [rdi+0C0h] mov rax, rsi cmp rcx, rdx jz short loc_57778 push rbp mov rbp, rsp mov rax, rsi loc_57724: movzx edi, word ptr [rcx+12h] test dil, 10h jz short loc_57737 cmp byte ptr [rax], 0 lea rax, [rax+1] jz short loc_5776E loc_57737: test dil, 29h jz short loc_57751 movzx edi, byte ptr [rax] cmp rdi, 0FFh jz short loc_57757 mov r8d, 1 jmp short loc_57768 loc_57751: movzx edi, word ptr [rcx+14h] jmp short loc_5776B loc_57757: movzx edi, word ptr [rax+1] rol di, 8 movzx edi, di mov r8d, 3 loc_57768: add rax, r8 loc_5776B: add rax, rdi loc_5776E: add rcx, 20h ; ' ' cmp rcx, rdx jnz short loc_57724 pop rbp loc_57778: sub eax, esi retn
long long ma_keylength_part(long long a1, unsigned __int8 *a2, long long a3) { long long v3; // rcx unsigned __int8 *v4; // rax __int16 v5; // di bool v6; // zf long long v7; // rdi long long v8; // r8 v3 = *(_QWORD *)(a1 + 192); LODWORD(v4) = (_DWORD)a2; if ( v3 != a3 ) { v4 = a2; do { v5 = *(_WORD *)(v3 + 18); if ( (v5 & 0x10) == 0 || (v6 = *v4 == 0, ++v4, !v6) ) { if ( (v5 & 0x29) != 0 ) { v7 = *v4; if ( v7 == 255 ) { v7 = (unsigned __int16)__ROL2__(*(_WORD *)(v4 + 1), 8); v8 = 3LL; } else { v8 = 1LL; } v4 += v8; } else { v7 = *(unsigned __int16 *)(v3 + 20); } v4 += v7; } v3 += 32LL; } while ( v3 != a3 ); } return (unsigned int)((_DWORD)v4 - (_DWORD)a2); }
_ma_keylength_part: MOV RCX,qword ptr [RDI + 0xc0] MOV RAX,RSI CMP RCX,RDX JZ 0x00157778 PUSH RBP MOV RBP,RSP MOV RAX,RSI LAB_00157724: MOVZX EDI,word ptr [RCX + 0x12] TEST DIL,0x10 JZ 0x00157737 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JZ 0x0015776e LAB_00157737: TEST DIL,0x29 JZ 0x00157751 MOVZX EDI,byte ptr [RAX] CMP RDI,0xff JZ 0x00157757 MOV R8D,0x1 JMP 0x00157768 LAB_00157751: MOVZX EDI,word ptr [RCX + 0x14] JMP 0x0015776b LAB_00157757: MOVZX EDI,word ptr [RAX + 0x1] ROL DI,0x8 MOVZX EDI,DI MOV R8D,0x3 LAB_00157768: ADD RAX,R8 LAB_0015776b: ADD RAX,RDI LAB_0015776e: ADD RCX,0x20 CMP RCX,RDX JNZ 0x00157724 POP RBP LAB_00157778: SUB EAX,ESI RET
int _ma_keylength_part(long param_1,byte *param_2,long param_3) { byte bVar1; long lVar2; int iVar3; ulong uVar4; long lVar5; iVar3 = (int)param_2; for (lVar2 = *(long *)(param_1 + 0xc0); lVar2 != param_3; lVar2 = lVar2 + 0x20) { if (((*(ushort *)(lVar2 + 0x12) & 0x10) == 0) || (bVar1 = *param_2, param_2 = param_2 + 1, bVar1 != 0)) { if ((*(ushort *)(lVar2 + 0x12) & 0x29) == 0) { uVar4 = (ulong)*(ushort *)(lVar2 + 0x14); } else { uVar4 = (ulong)*param_2; if (uVar4 == 0xff) { uVar4 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); lVar5 = 3; } else { lVar5 = 1; } param_2 = param_2 + lVar5; } param_2 = param_2 + uVar4; } } return (int)param_2 - iVar3; }
39,994
pvio_socket_close
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_close(MARIADB_PVIO *pvio) { struct st_pvio_socket *csock= NULL; int r= 0; if (!pvio) return 1; if (pvio->data) { csock= (struct st_pvio_socket *)pvio->data; if (csock && csock->socket != INVALID_SOCKET) { r= closesocket(csock->socket); csock->socket= INVALID_SOCKET; } free((gptr)pvio->data); pvio->data= NULL; } return r; }
O3
c
pvio_socket_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x31e83 movq %rdi, %rbx movq (%rdi), %r15 testq %r15, %r15 je 0x31e88 movl (%r15), %edi cmpl $-0x1, %edi je 0x31e8d callq 0x13850 movl %eax, %r14d movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF movq (%rbx), %r15 jmp 0x31e90 movb $0x1, %r14b jmp 0x31e9f xorl %r14d, %r14d jmp 0x31e9f xorl %r14d, %r14d movq %r15, %rdi callq 0x13570 movq $0x0, (%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
pvio_socket_close: push rbp mov rbp, rsp push r15 push r14 push rbx push rax test rdi, rdi jz short loc_31E83 mov rbx, rdi mov r15, [rdi] test r15, r15 jz short loc_31E88 mov edi, [r15] cmp edi, 0FFFFFFFFh jz short loc_31E8D call _close mov r14d, eax mov dword ptr [r15], 0FFFFFFFFh mov r15, [rbx] jmp short loc_31E90 loc_31E83: mov r14b, 1 jmp short loc_31E9F loc_31E88: xor r14d, r14d jmp short loc_31E9F loc_31E8D: xor r14d, r14d loc_31E90: mov rdi, r15 call _free mov qword ptr [rbx], 0 loc_31E9F: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long pvio_socket_close(_DWORD **a1) { unsigned int v1; // r14d _DWORD *v3; // r15 long long v4; // rdi if ( a1 ) { v3 = *a1; if ( *a1 ) { v4 = (unsigned int)*v3; if ( (_DWORD)v4 == -1 ) { v1 = 0; } else { v1 = close(v4); *v3 = -1; v3 = *a1; } free(v3); *a1 = 0LL; } else { return 0; } } else { LOBYTE(v1) = 1; } return v1; }
pvio_socket_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00131e83 MOV RBX,RDI MOV R15,qword ptr [RDI] TEST R15,R15 JZ 0x00131e88 MOV EDI,dword ptr [R15] CMP EDI,-0x1 JZ 0x00131e8d CALL 0x00113850 MOV R14D,EAX MOV dword ptr [R15],0xffffffff MOV R15,qword ptr [RBX] JMP 0x00131e90 LAB_00131e83: MOV R14B,0x1 JMP 0x00131e9f LAB_00131e88: XOR R14D,R14D JMP 0x00131e9f LAB_00131e8d: XOR R14D,R14D LAB_00131e90: MOV RDI,R15 CALL 0x00113570 MOV qword ptr [RBX],0x0 LAB_00131e9f: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
ulong pvio_socket_close(int8 *param_1) { uint uVar1; int8 unaff_R14; ulong uVar2; int *__ptr; if (param_1 == (int8 *)0x0) { uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); } else { __ptr = (int *)*param_1; if (__ptr == (int *)0x0) { uVar2 = 0; } else { if (*__ptr == -1) { uVar2 = 0; } else { uVar1 = close(*__ptr); uVar2 = (ulong)uVar1; *__ptr = -1; __ptr = (int *)*param_1; } free(__ptr); *param_1 = 0; } } return uVar2 & 0xffffffff; }
39,995
queue_insert_safe
eloqsql/mysys/queues.c
int queue_insert_safe(QUEUE *queue, uchar *element) { if (queue->elements == queue->max_elements) { if (!queue->auto_extent) return 2; if (resize_queue(queue, queue->max_elements + queue->auto_extent)) return 1; } queue_insert(queue, element); return 0; }
O3
c
queue_insert_safe: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x10(%rdi), %edx cmpl 0x14(%rdi), %edx jne 0x7295f movl 0x20(%r14), %esi testl %esi, %esi je 0x72974 addl %edx, %esi movq %r14, %rdi callq 0x727f5 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0x72979 movl 0x10(%r14), %edx incl %edx movl %edx, 0x10(%r14) movq %r14, %rdi movq %rbx, %rsi callq 0x72882 xorl %eax, %eax jmp 0x72979 movl $0x2, %eax popq %rbx popq %r14 popq %rbp retq
queue_insert_safe: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi mov edx, [rdi+10h] cmp edx, [rdi+14h] jnz short loc_7295F mov esi, [r14+20h] test esi, esi jz short loc_72974 add esi, edx mov rdi, r14 call resize_queue mov ecx, eax mov eax, 1 test ecx, ecx jnz short loc_72979 mov edx, [r14+10h] loc_7295F: inc edx mov [r14+10h], edx mov rdi, r14 mov rsi, rbx call insert_at xor eax, eax jmp short loc_72979 loc_72974: mov eax, 2 loc_72979: pop rbx pop r14 pop rbp retn
long long queue_insert_safe(long long a1, long long a2) { int v3; // edx int v4; // esi int v5; // ecx long long result; // rax unsigned int v7; // edx v3 = *(_DWORD *)(a1 + 16); if ( v3 != *(_DWORD *)(a1 + 20) ) { LABEL_5: v7 = v3 + 1; *(_DWORD *)(a1 + 16) = v7; insert_at((long long *)a1, a2, v7); return 0LL; } v4 = *(_DWORD *)(a1 + 32); if ( v4 ) { v5 = resize_queue(a1, v3 + v4); result = 1LL; if ( v5 ) return result; v3 = *(_DWORD *)(a1 + 16); goto LABEL_5; } return 2LL; }
queue_insert_safe: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV EDX,dword ptr [RDI + 0x10] CMP EDX,dword ptr [RDI + 0x14] JNZ 0x0017295f MOV ESI,dword ptr [R14 + 0x20] TEST ESI,ESI JZ 0x00172974 ADD ESI,EDX MOV RDI,R14 CALL 0x001727f5 MOV ECX,EAX MOV EAX,0x1 TEST ECX,ECX JNZ 0x00172979 MOV EDX,dword ptr [R14 + 0x10] LAB_0017295f: INC EDX MOV dword ptr [R14 + 0x10],EDX MOV RDI,R14 MOV RSI,RBX CALL 0x00172882 XOR EAX,EAX JMP 0x00172979 LAB_00172974: MOV EAX,0x2 LAB_00172979: POP RBX POP R14 POP RBP RET
int8 queue_insert_safe(long param_1,int8 param_2) { int iVar1; iVar1 = *(int *)(param_1 + 0x10); if (iVar1 == *(int *)(param_1 + 0x14)) { if (*(int *)(param_1 + 0x20) == 0) { return 2; } iVar1 = resize_queue(param_1,*(int *)(param_1 + 0x20) + iVar1); if (iVar1 != 0) { return 1; } iVar1 = *(int *)(param_1 + 0x10); } *(int *)(param_1 + 0x10) = iVar1 + 1; insert_at(param_1,param_2); return 0; }
39,996
my_strnxfrm_czech
eloqsql/strings/ctype-czech.c
static size_t my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p, * store; int pass = 0; size_t totlen = 0; p = src; store = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; do { int add= (1 << pass) & flags; /* If this level is needed */ NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen); if (add) ADD_TO_RESULT(dest, len, totlen, value); } while (value); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, ' ', len - totlen); totlen= len; } return totlen; }
O0
c
my_strnxfrm_czech: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movl $0x0, -0x4c(%rbp) movq $0x0, -0x58(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movl 0x10(%rbp), %eax andl $0xf, %eax cmpl $0x0, %eax jne 0x40d38 movl 0x10(%rbp), %eax orl $0xf, %eax movl %eax, 0x10(%rbp) jmp 0x40d3a movl -0x4c(%rbp), %ecx movl $0x1, %eax shll %cl, %eax andl 0x10(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jl 0x40dad movl $0x0, -0x34(%rbp) cmpl $0x3, -0x4c(%rbp) je 0x40da8 movl -0x4c(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0x4c(%rbp) cmpl $0x0, %eax jne 0x40d8b movq -0x48(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x40d96 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x40(%rbp) movl $0x1, -0x34(%rbp) jmp 0x41007 movslq -0x4c(%rbp), %rcx leaq 0x18f8c8(%rip), %rax # 0x1d0680 movq (%rax,%rcx,8), %rax movq -0x40(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) jne 0x40de1 movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x40d4a cmpl $0x2, -0x34(%rbp) jne 0x40eed movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rcx movq -0x28(%rbp), %rax subq %rax, %rcx movq -0x30(%rbp), %rax movslq %eax, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x99(%rbp) jge 0x40e40 movslq -0x4c(%rbp), %rcx leaq 0x18f85b(%rip), %rax # 0x1d0680 movq (%rax,%rcx,8), %rax movq -0x70(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax cmpl $0x2, %eax sete %al movb %al, -0x99(%rbp) movb -0x99(%rbp), %al testb $0x1, %al jne 0x40e4c jmp 0x40e5a movq -0x70(%rbp), %rax addq $0x1, %rax movq %rax, -0x70(%rbp) jmp 0x40dfb movq -0x70(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jl 0x40e79 movq -0x70(%rbp), %rax movq %rax, -0x40(%rbp) cmpl $0x2, -0x4c(%rbp) jg 0x40e9e movq -0x70(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jge 0x40e9e movq -0x70(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jl 0x40eba jmp 0x40d4a cmpl $0x1, -0x4c(%rbp) jle 0x40ec5 jmp 0x41007 movq -0x40(%rbp), %rax movq %rax, -0x68(%rbp) movl $0x1, %eax subl -0x4c(%rbp), %eax movl %eax, -0x4c(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x41007 cmpl $0xff, -0x34(%rbp) jne 0x40ffb movl $0x0, -0x74(%rbp) cmpl $0x50, -0x74(%rbp) jge 0x40ff9 movslq -0x74(%rbp), %rcx leaq 0x18f78a(%rip), %rax # 0x1d06a0 shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x80(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x88(%rbp) movl $0x0, -0x8c(%rbp) movq -0x80(%rbp), %rax movslq -0x8c(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x40fa6 movq -0x88(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq -0x30(%rbp), %rcx movslq %ecx, %rcx cmpq %rcx, %rax jge 0x40f81 movq -0x88(%rbp), %rax movsbl (%rax), %eax movq -0x80(%rbp), %rcx movslq -0x8c(%rbp), %rdx movsbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x40f83 jmp 0x40fa6 movl -0x8c(%rbp), %eax addl $0x1, %eax movl %eax, -0x8c(%rbp) movq -0x88(%rbp), %rax addq $0x1, %rax movq %rax, -0x88(%rbp) jmp 0x40f39 movq -0x80(%rbp), %rax movslq -0x8c(%rbp), %rcx cmpb $0x0, (%rax,%rcx) jne 0x40fe9 movslq -0x74(%rbp), %rcx leaq 0x18f6de(%rip), %rax # 0x1d06a0 shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movslq -0x4c(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x34(%rbp) movq -0x88(%rbp), %rax addq $-0x1, %rax movq %rax, -0x40(%rbp) jmp 0x40ff9 jmp 0x40feb movl -0x74(%rbp), %eax addl $0x1, %eax movl %eax, -0x74(%rbp) jmp 0x40f01 jmp 0x40ffb movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) cmpl $0x0, -0x5c(%rbp) je 0x41034 movq -0x58(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x41032 movl -0x34(%rbp), %eax movb %al, %dl movq -0x10(%rbp), %rax movq -0x58(%rbp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, -0x58(%rbp) movb %dl, (%rax,%rcx) jmp 0x41034 jmp 0x41036 cmpl $0x0, -0x34(%rbp) jne 0x40d3a movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x41079 movq -0x18(%rbp), %rax cmpq -0x58(%rbp), %rax jbe 0x41079 movq -0x10(%rbp), %rdi addq -0x58(%rbp), %rdi movq -0x18(%rbp), %rdx subq -0x58(%rbp), %rdx movl $0x20, %esi callq 0x24180 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strnxfrm_czech: push rbp mov rbp, rsp sub rsp, 0A0h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov [rbp+var_4C], 0 mov [rbp+var_58], 0 mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov eax, [rbp+arg_0] and eax, 0Fh cmp eax, 0 jnz short loc_40D38 mov eax, [rbp+arg_0] or eax, 0Fh mov [rbp+arg_0], eax loc_40D38: jmp short $+2 loc_40D3A: mov ecx, [rbp+var_4C] mov eax, 1 shl eax, cl and eax, [rbp+arg_0] mov [rbp+var_5C], eax loc_40D4A: mov rax, [rbp+var_40] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jl short loc_40DAD mov [rbp+var_34], 0 cmp [rbp+var_4C], 3 jz short loc_40DA8 mov eax, [rbp+var_4C] mov ecx, eax add ecx, 1 mov [rbp+var_4C], ecx cmp eax, 0 jnz short loc_40D8B mov rax, [rbp+var_48] mov [rbp+var_98], rax jmp short loc_40D96 loc_40D8B: mov rax, [rbp+var_28] mov [rbp+var_98], rax loc_40D96: mov rax, [rbp+var_98] mov [rbp+var_40], rax mov [rbp+var_34], 1 loc_40DA8: jmp loc_41007 loc_40DAD: movsxd rcx, [rbp+var_4C] lea rax, CZ_SORT_TABLE mov rax, [rax+rcx*8] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov [rbp+var_34], eax cmp [rbp+var_34], 0 jnz short loc_40DE1 mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp loc_40D4A loc_40DE1: cmp [rbp+var_34], 2 jnz loc_40EED mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax mov [rbp+var_70], rax loc_40DFB: mov rcx, [rbp+var_70] mov rax, [rbp+var_28] sub rcx, rax mov rax, [rbp+var_30] movsxd rdx, eax xor eax, eax cmp rcx, rdx mov [rbp+var_99], al jge short loc_40E40 movsxd rcx, [rbp+var_4C] lea rax, CZ_SORT_TABLE mov rax, [rax+rcx*8] mov rcx, [rbp+var_70] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] cmp eax, 2 setz al mov [rbp+var_99], al loc_40E40: mov al, [rbp+var_99] test al, 1 jnz short loc_40E4C jmp short loc_40E5A loc_40E4C: mov rax, [rbp+var_70] add rax, 1 mov [rbp+var_70], rax jmp short loc_40DFB loc_40E5A: mov rax, [rbp+var_70] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jl short loc_40E79 mov rax, [rbp+var_70] mov [rbp+var_40], rax loc_40E79: cmp [rbp+var_4C], 2 jg short loc_40E9E mov rax, [rbp+var_70] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jge short loc_40E9E mov rax, [rbp+var_70] mov [rbp+var_40], rax loc_40E9E: mov rax, [rbp+var_40] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jl short loc_40EBA jmp loc_40D4A loc_40EBA: cmp [rbp+var_4C], 1 jle short loc_40EC5 jmp loc_41007 loc_40EC5: mov rax, [rbp+var_40] mov [rbp+var_68], rax mov eax, 1 sub eax, [rbp+var_4C] mov [rbp+var_4C], eax mov rax, [rbp+var_48] mov [rbp+var_40], rax mov rax, [rbp+var_68] mov [rbp+var_48], rax jmp loc_41007 loc_40EED: cmp [rbp+var_34], 0FFh jnz loc_40FFB mov [rbp+var_74], 0 loc_40F01: cmp [rbp+var_74], 50h ; 'P' jge loc_40FF9 movsxd rcx, [rbp+var_74] lea rax, doubles shl rcx, 4 add rax, rcx mov rax, [rax] mov [rbp+var_80], rax mov rax, [rbp+var_40] mov [rbp+var_88], rax mov [rbp+var_8C], 0 loc_40F39: mov rax, [rbp+var_80] movsxd rcx, [rbp+var_8C] cmp byte ptr [rax+rcx], 0 jz short loc_40FA6 mov rax, [rbp+var_88] mov rcx, [rbp+var_28] sub rax, rcx mov rcx, [rbp+var_30] movsxd rcx, ecx cmp rax, rcx jge short loc_40F81 mov rax, [rbp+var_88] movsx eax, byte ptr [rax] mov rcx, [rbp+var_80] movsxd rdx, [rbp+var_8C] movsx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_40F83 loc_40F81: jmp short loc_40FA6 loc_40F83: mov eax, [rbp+var_8C] add eax, 1 mov [rbp+var_8C], eax mov rax, [rbp+var_88] add rax, 1 mov [rbp+var_88], rax jmp short loc_40F39 loc_40FA6: mov rax, [rbp+var_80] movsxd rcx, [rbp+var_8C] cmp byte ptr [rax+rcx], 0 jnz short loc_40FE9 movsxd rcx, [rbp+var_74] lea rax, doubles shl rcx, 4 add rax, rcx mov rax, [rax+8] movsxd rcx, [rbp+var_4C] movzx eax, byte ptr [rax+rcx] mov [rbp+var_34], eax mov rax, [rbp+var_88] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rax jmp short loc_40FF9 loc_40FE9: jmp short $+2 loc_40FEB: mov eax, [rbp+var_74] add eax, 1 mov [rbp+var_74], eax jmp loc_40F01 loc_40FF9: jmp short $+2 loc_40FFB: mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax loc_41007: cmp [rbp+var_5C], 0 jz short loc_41034 mov rax, [rbp+var_58] cmp rax, [rbp+var_18] jnb short loc_41032 mov eax, [rbp+var_34] mov dl, al mov rax, [rbp+var_10] mov rcx, [rbp+var_58] mov rsi, rcx add rsi, 1 mov [rbp+var_58], rsi mov [rax+rcx], dl loc_41032: jmp short $+2 loc_41034: jmp short $+2 loc_41036: cmp [rbp+var_34], 0 jnz loc_40D3A mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_41079 mov rax, [rbp+var_18] cmp rax, [rbp+var_58] jbe short loc_41079 mov rdi, [rbp+var_10] add rdi, [rbp+var_58] mov rdx, [rbp+var_18] sub rdx, [rbp+var_58] mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov [rbp+var_58], rax loc_41079: mov rax, [rbp+var_58] add rsp, 0A0h pop rbp retn
unsigned long long my_strnxfrm_czech( long long a1, long long a2, unsigned long long a3, long long a4, char *a5, int a6, int a7) { long long v8; // rcx long long v9; // rcx bool v11; // [rsp+7h] [rbp-99h] char *v12; // [rsp+8h] [rbp-98h] int k; // [rsp+14h] [rbp-8Ch] char *v14; // [rsp+18h] [rbp-88h] long long v15; // [rsp+20h] [rbp-80h] int j; // [rsp+2Ch] [rbp-74h] unsigned __int8 *i; // [rsp+30h] [rbp-70h] char *v18; // [rsp+38h] [rbp-68h] int v19; // [rsp+44h] [rbp-5Ch] unsigned long long v20; // [rsp+48h] [rbp-58h] int v21; // [rsp+54h] [rbp-4Ch] char *v22; // [rsp+58h] [rbp-48h] char *v23; // [rsp+60h] [rbp-40h] int v24; // [rsp+6Ch] [rbp-34h] v21 = 0; v20 = 0LL; v23 = a5; v22 = a5; if ( (a7 & 0xF) == 0 ) a7 |= 0xFu; do { v19 = a7 & (1 << v21); while ( 1 ) { while ( 1 ) { if ( v23 - a5 >= a6 ) { v24 = 0; if ( v21 != 3 ) { if ( v21++ ) v12 = a5; else v12 = v22; v23 = v12; v24 = 1; } goto LABEL_40; } v8 = (unsigned __int8)*v23; v24 = *((unsigned __int8 *)*(&CZ_SORT_TABLE + v21) + v8); if ( *((_BYTE *)*(&CZ_SORT_TABLE + v21) + v8) ) break; ++v23; } if ( v24 != 2 ) break; for ( i = (unsigned __int8 *)++v23; ; ++i ) { v11 = 0; if ( i - (unsigned __int8 *)a5 < a6 ) v11 = *((_BYTE *)*(&CZ_SORT_TABLE + v21) + *i) == 2; if ( !v11 ) break; } if ( i - (unsigned __int8 *)a5 >= a6 ) v23 = (char *)i; if ( v21 <= 2 && i - (unsigned __int8 *)a5 < a6 ) v23 = (char *)i; if ( v23 - a5 < a6 ) { if ( v21 <= 1 ) { v18 = v23; v21 = 1 - v21; v23 = v22; v22 = v18; } goto LABEL_40; } } if ( v24 == 255 ) { for ( j = 0; j < 80; ++j ) { v15 = (long long)*(&doubles + 2 * j); v14 = v23; for ( k = 0; *(_BYTE *)(v15 + k) && v14 - a5 < a6 && *v14 == *(char *)(v15 + k); ++k ) ++v14; if ( !*(_BYTE *)(v15 + k) ) { v24 = *((unsigned __int8 *)*(&doubles + 2 * j + 1) + v21); v23 = v14 - 1; break; } } } ++v23; LABEL_40: if ( v19 && v20 < a3 ) { v9 = v20++; *(_BYTE *)(a2 + v9) = v24; } } while ( v24 ); if ( (a7 & 0x80) != 0 && a3 > v20 ) { memset(v20 + a2, 32LL, a3 - v20); return a3; } return v20; }
my_strnxfrm_czech: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV dword ptr [RBP + -0x4c],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0xf CMP EAX,0x0 JNZ 0x00140d38 MOV EAX,dword ptr [RBP + 0x10] OR EAX,0xf MOV dword ptr [RBP + 0x10],EAX LAB_00140d38: JMP 0x00140d3a LAB_00140d3a: MOV ECX,dword ptr [RBP + -0x4c] MOV EAX,0x1 SHL EAX,CL AND EAX,dword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x5c],EAX LAB_00140d4a: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX CMP RAX,RCX JL 0x00140dad MOV dword ptr [RBP + -0x34],0x0 CMP dword ptr [RBP + -0x4c],0x3 JZ 0x00140da8 MOV EAX,dword ptr [RBP + -0x4c] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0x4c],ECX CMP EAX,0x0 JNZ 0x00140d8b MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x98],RAX JMP 0x00140d96 LAB_00140d8b: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX LAB_00140d96: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x34],0x1 LAB_00140da8: JMP 0x00141007 LAB_00140dad: MOVSXD RCX,dword ptr [RBP + -0x4c] LEA RAX,[0x2d0680] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JNZ 0x00140de1 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x00140d4a LAB_00140de1: CMP dword ptr [RBP + -0x34],0x2 JNZ 0x00140eed MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x70],RAX LAB_00140dfb: MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x28] SUB RCX,RAX MOV RAX,qword ptr [RBP + -0x30] MOVSXD RDX,EAX XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x99],AL JGE 0x00140e40 MOVSXD RCX,dword ptr [RBP + -0x4c] LEA RAX,[0x2d0680] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x70] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2 SETZ AL MOV byte ptr [RBP + -0x99],AL LAB_00140e40: MOV AL,byte ptr [RBP + -0x99] TEST AL,0x1 JNZ 0x00140e4c JMP 0x00140e5a LAB_00140e4c: MOV RAX,qword ptr [RBP + -0x70] ADD RAX,0x1 MOV qword ptr [RBP + -0x70],RAX JMP 0x00140dfb LAB_00140e5a: MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX CMP RAX,RCX JL 0x00140e79 MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x40],RAX LAB_00140e79: CMP dword ptr [RBP + -0x4c],0x2 JG 0x00140e9e MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX CMP RAX,RCX JGE 0x00140e9e MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x40],RAX LAB_00140e9e: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX CMP RAX,RCX JL 0x00140eba JMP 0x00140d4a LAB_00140eba: CMP dword ptr [RBP + -0x4c],0x1 JLE 0x00140ec5 JMP 0x00141007 LAB_00140ec5: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x68],RAX MOV EAX,0x1 SUB EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x48],RAX JMP 0x00141007 LAB_00140eed: CMP dword ptr [RBP + -0x34],0xff JNZ 0x00140ffb MOV dword ptr [RBP + -0x74],0x0 LAB_00140f01: CMP dword ptr [RBP + -0x74],0x50 JGE 0x00140ff9 MOVSXD RCX,dword ptr [RBP + -0x74] LEA RAX,[0x2d06a0] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x88],RAX MOV dword ptr [RBP + -0x8c],0x0 LAB_00140f39: MOV RAX,qword ptr [RBP + -0x80] MOVSXD RCX,dword ptr [RBP + -0x8c] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x00140fa6 MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX CMP RAX,RCX JGE 0x00140f81 MOV RAX,qword ptr [RBP + -0x88] MOVSX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x80] MOVSXD RDX,dword ptr [RBP + -0x8c] MOVSX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x00140f83 LAB_00140f81: JMP 0x00140fa6 LAB_00140f83: MOV EAX,dword ptr [RBP + -0x8c] ADD EAX,0x1 MOV dword ptr [RBP + -0x8c],EAX MOV RAX,qword ptr [RBP + -0x88] ADD RAX,0x1 MOV qword ptr [RBP + -0x88],RAX JMP 0x00140f39 LAB_00140fa6: MOV RAX,qword ptr [RBP + -0x80] MOVSXD RCX,dword ptr [RBP + -0x8c] CMP byte ptr [RAX + RCX*0x1],0x0 JNZ 0x00140fe9 MOVSXD RCX,dword ptr [RBP + -0x74] LEA RAX,[0x2d06a0] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x4c] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x88] ADD RAX,-0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x00140ff9 LAB_00140fe9: JMP 0x00140feb LAB_00140feb: MOV EAX,dword ptr [RBP + -0x74] ADD EAX,0x1 MOV dword ptr [RBP + -0x74],EAX JMP 0x00140f01 LAB_00140ff9: JMP 0x00140ffb LAB_00140ffb: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX LAB_00141007: CMP dword ptr [RBP + -0x5c],0x0 JZ 0x00141034 MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x18] JNC 0x00141032 MOV EAX,dword ptr [RBP + -0x34] MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x58] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RBP + -0x58],RSI MOV byte ptr [RAX + RCX*0x1],DL LAB_00141032: JMP 0x00141034 LAB_00141034: JMP 0x00141036 LAB_00141036: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x00140d3a MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x00141079 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x58] JBE 0x00141079 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,qword ptr [RBP + -0x58] MOV ESI,0x20 CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX LAB_00141079: MOV RAX,qword ptr [RBP + -0x58] ADD RSP,0xa0 POP RBP RET
ulong my_strnxfrm_czech(int8 param_1,long param_2,ulong param_3,int8 param_4, byte *param_5,int param_6,uint param_7) { char cVar1; long lVar2; byte *pbVar3; byte bVar4; bool bVar5; byte *local_a0; int local_94; byte *local_90; int local_7c; byte *local_78; ulong local_60; int local_54; byte *local_50; byte *local_48; local_54 = 0; local_60 = 0; local_50 = param_5; local_48 = param_5; if ((param_7 & 0xf) == 0) { param_7 = param_7 | 0xf; } LAB_00140d3a: bVar4 = (byte)local_54; do { while( true ) { if ((long)param_6 <= (long)local_48 - (long)param_5) { cVar1 = '\0'; if (local_54 != 3) { local_a0 = param_5; if (local_54 == 0) { local_a0 = local_50; } local_48 = local_a0; cVar1 = '\x01'; local_54 = local_54 + 1; } goto LAB_00141007; } cVar1 = (&CZ_SORT_TABLE)[local_54][*local_48]; if (cVar1 != '\0') break; local_48 = local_48 + 1; } if (cVar1 != '\x02') { if (cVar1 != -1) goto LAB_00140ffb; local_7c = 0; goto LAB_00140f01; } local_48 = local_48 + 1; local_78 = local_48; while( true ) { bVar5 = false; if ((long)local_78 - (long)param_5 < (long)param_6) { bVar5 = (&CZ_SORT_TABLE)[local_54][*local_78] == '\x02'; } if (!bVar5) break; local_78 = local_78 + 1; } if ((long)param_6 <= (long)local_78 - (long)param_5) { local_48 = local_78; } if ((local_54 < 3) && ((long)local_78 - (long)param_5 < (long)param_6)) { local_48 = local_78; } pbVar3 = local_48; } while ((long)param_6 <= (long)local_48 - (long)param_5); if (local_54 < 2) { local_48 = local_50; local_50 = pbVar3; local_54 = 1 - local_54; } goto LAB_00141007; LAB_00140f01: if (0x4f < local_7c) goto LAB_00140ffb; lVar2 = *(long *)(doubles + (long)local_7c * 0x10); local_94 = 0; for (local_90 = local_48; ((*(char *)(lVar2 + local_94) != '\0' && ((long)local_90 - (long)param_5 < (long)param_6)) && (*local_90 == *(byte *)(lVar2 + local_94))); local_90 = local_90 + 1) { local_94 = local_94 + 1; } if (*(char *)(lVar2 + local_94) == '\0') { cVar1 = *(char *)(*(long *)(doubles + (long)local_7c * 0x10 + 8) + (long)local_54); local_48 = local_90 + -1; goto LAB_00140ffb; } local_7c = local_7c + 1; goto LAB_00140f01; LAB_00140ffb: local_48 = local_48 + 1; LAB_00141007: if (((1 << (bVar4 & 0x1f) & param_7) != 0) && (local_60 < param_3)) { *(char *)(param_2 + local_60) = cVar1; local_60 = local_60 + 1; } if (cVar1 == '\0') { if (((param_7 & 0x80) != 0) && (local_60 < param_3)) { memset((void *)(param_2 + local_60),0x20,param_3 - local_60); local_60 = param_3; } return local_60; } goto LAB_00140d3a; }
39,997
my_strnxfrm_czech
eloqsql/strings/ctype-czech.c
static size_t my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p, * store; int pass = 0; size_t totlen = 0; p = src; store = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; do { int add= (1 << pass) & flags; /* If this level is needed */ NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen); if (add) ADD_TO_RESULT(dest, len, totlen, value); } while (value); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, ' ', len - totlen); totlen= len; } return totlen; }
O3
c
my_strnxfrm_czech: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r15 movq %rdx, %rbx movq %rsi, -0x48(%rbp) movl 0x10(%rbp), %eax movl %eax, %r11d orl $0xf, %r11d testb $0xf, %al cmovnel %eax, %r11d movslq %r9d, %rdx movl $0x1, %eax subq %r8, %rax movq %rax, -0x50(%rbp) xorl %ecx, %ecx leaq 0x2b88ac(%rip), %r13 # 0x2ee5e0 movq %r8, %r14 xorl %r12d, %r12d movq %rbx, -0x38(%rbp) movl %r11d, -0x2c(%rbp) movl $0x1, %esi shll %cl, %esi movq %r8, %rax subq %r15, %rax cmpq %rdx, %rax jge 0x35dd3 movslq %ecx, %rax movq %rax, -0x58(%rbp) movq (%r13,%rax,8), %r9 movzbl (%r8), %eax movzbl (%r9,%rax), %eax testl %eax, %eax je 0x35da2 cmpl $0x2, %eax jne 0x35e07 incq %r8 movq %r8, %rax subq %r15, %rax movq %r8, %r10 cmpq %rdx, %rax jge 0x35db0 movzbl (%r10), %edi cmpb $0x2, (%r9,%rdi) jne 0x35db0 incq %r10 incq %rax movq %r10, %rdi cmpq %rdx, %rax jl 0x35d87 jmp 0x35db3 incq %r8 movq %r8, %rax subq %r15, %rax movq %r8, %r10 jmp 0x35dcc movq %r8, %rdi cmpl $0x3, %ecx cmovgeq %rdi, %r10 movq %r10, %rax subq %r15, %rax cmpq %rdx, %rax jl 0x35e88 movq %r10, %r8 cmpq %rdx, %rax jl 0x35d60 jmp 0x35dd6 movq %r8, %r10 cmpl $0x3, %ecx jne 0x35dee xorl %r9d, %r9d movl $0x3, %ecx movq %r14, %rax movq %r10, %r8 jmp 0x35ee0 testl %ecx, %ecx movq %r15, %r8 cmoveq %r14, %r8 incl %ecx movl $0x1, %r9d movq %r14, %rax jmp 0x35ee0 cmpl $0xff, %eax jne 0x35ed6 movq %r12, -0x40(%rbp) movq %r8, %r9 subq %r15, %r9 movq -0x50(%rbp), %rax addq %r8, %rax movq %rax, -0x60(%rbp) xorl %ebx, %ebx movq %rbx, %r11 shlq $0x4, %r11 leaq 0x2b87c9(%rip), %rax # 0x2ee600 movq (%r11,%rax), %r13 movb (%r13), %al testb %al, %al je 0x35e74 cmpq %rdx, %r9 jge 0x35e74 incq %r13 movq -0x60(%rbp), %r10 movq %r8, %r12 cmpb %al, (%r12) jne 0x35e7b incq %r12 movb (%r13), %al testb %al, %al je 0x35e77 incq %r13 leaq 0x1(%r10), %rdi cmpq %rdx, %r10 movq %rdi, %r10 jl 0x35e52 jmp 0x35e77 movq %r8, %r12 testb %al, %al je 0x35ea8 incq %rbx cmpq $0x50, %rbx jne 0x35e29 movb $-0x1, %al jmp 0x35ec3 movl $0x2, %r9d cmpl $0x1, %ecx jg 0x35de3 movl $0x1, %edi subl %ecx, %edi movq %r10, %rax movl %edi, %ecx movq %r14, %r8 jmp 0x35ee0 leaq 0x2b8751(%rip), %rax # 0x2ee600 addq %rax, %r11 movq 0x8(%r11), %rax movq -0x58(%rbp), %rdi movb (%rax,%rdi), %al decq %r12 movq %r12, %r8 movq -0x38(%rbp), %rbx movl -0x2c(%rbp), %r11d movq -0x40(%rbp), %r12 leaq 0x2b870a(%rip), %r13 # 0x2ee5e0 movzbl %al, %r9d incq %r8 movq %r14, %rax testl %r11d, %esi setne %r10b cmpq %rbx, %r12 setb %dil andb %r10b, %dil cmpb $0x1, %dil jne 0x35f02 movq -0x48(%rbp), %rsi movb %r9b, (%rsi,%r12) incq %r12 movq %rax, %r14 testl %r9d, %r9d jne 0x35d42 testb %r11b, %r11b sets %al movq %rbx, %rdx subq %r12, %rdx seta %cl andb %al, %cl cmpb $0x1, %cl jne 0x35f37 movq -0x48(%rbp), %rdi addq %r12, %rdi movl $0x20, %esi callq 0x24190 jmp 0x35f3a movq %r12, %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_czech: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, r8 mov rbx, rdx mov [rbp+var_48], rsi mov eax, [rbp+arg_0] mov r11d, eax or r11d, 0Fh test al, 0Fh cmovnz r11d, eax movsxd rdx, r9d mov eax, 1 sub rax, r8 mov [rbp+var_50], rax xor ecx, ecx lea r13, CZ_SORT_TABLE mov r14, r8 xor r12d, r12d mov [rbp+var_38], rbx mov [rbp+var_2C], r11d loc_35D42: mov esi, 1 shl esi, cl mov rax, r8 sub rax, r15 cmp rax, rdx jge short loc_35DD3 movsxd rax, ecx mov [rbp+var_58], rax mov r9, [r13+rax*8+0] loc_35D60: movzx eax, byte ptr [r8] movzx eax, byte ptr [r9+rax] test eax, eax jz short loc_35DA2 cmp eax, 2 jnz loc_35E07 inc r8 mov rax, r8 sub rax, r15 mov r10, r8 cmp rax, rdx jge short loc_35DB0 loc_35D87: movzx edi, byte ptr [r10] cmp byte ptr [r9+rdi], 2 jnz short loc_35DB0 inc r10 inc rax mov rdi, r10 cmp rax, rdx jl short loc_35D87 jmp short loc_35DB3 loc_35DA2: inc r8 mov rax, r8 sub rax, r15 mov r10, r8 jmp short loc_35DCC loc_35DB0: mov rdi, r8 loc_35DB3: cmp ecx, 3 cmovge r10, rdi mov rax, r10 sub rax, r15 cmp rax, rdx jl loc_35E88 mov r8, r10 loc_35DCC: cmp rax, rdx jl short loc_35D60 jmp short loc_35DD6 loc_35DD3: mov r10, r8 loc_35DD6: cmp ecx, 3 jnz short loc_35DEE xor r9d, r9d mov ecx, 3 loc_35DE3: mov rax, r14 mov r8, r10 jmp loc_35EE0 loc_35DEE: test ecx, ecx mov r8, r15 cmovz r8, r14 inc ecx mov r9d, 1 mov rax, r14 jmp loc_35EE0 loc_35E07: cmp eax, 0FFh jnz loc_35ED6 mov [rbp+var_40], r12 mov r9, r8 sub r9, r15 mov rax, [rbp+var_50] add rax, r8 mov [rbp+var_60], rax xor ebx, ebx loc_35E29: mov r11, rbx shl r11, 4 lea rax, doubles mov r13, [r11+rax] mov al, [r13+0] test al, al jz short loc_35E74 cmp r9, rdx jge short loc_35E74 inc r13 mov r10, [rbp+var_60] mov r12, r8 loc_35E52: cmp [r12], al jnz short loc_35E7B inc r12 mov al, [r13+0] test al, al jz short loc_35E77 inc r13 lea rdi, [r10+1] cmp r10, rdx mov r10, rdi jl short loc_35E52 jmp short loc_35E77 loc_35E74: mov r12, r8 loc_35E77: test al, al jz short loc_35EA8 loc_35E7B: inc rbx cmp rbx, 50h ; 'P' jnz short loc_35E29 mov al, 0FFh jmp short loc_35EC3 loc_35E88: mov r9d, 2 cmp ecx, 1 jg loc_35DE3 mov edi, 1 sub edi, ecx mov rax, r10 mov ecx, edi mov r8, r14 jmp short loc_35EE0 loc_35EA8: lea rax, doubles add r11, rax mov rax, [r11+8] mov rdi, [rbp+var_58] mov al, [rax+rdi] dec r12 mov r8, r12 loc_35EC3: mov rbx, [rbp+var_38] mov r11d, [rbp+var_2C] mov r12, [rbp+var_40] lea r13, CZ_SORT_TABLE loc_35ED6: movzx r9d, al inc r8 mov rax, r14 loc_35EE0: test esi, r11d setnz r10b cmp r12, rbx setb dil and dil, r10b cmp dil, 1 jnz short loc_35F02 mov rsi, [rbp+var_48] mov [rsi+r12], r9b inc r12 loc_35F02: mov r14, rax test r9d, r9d jnz loc_35D42 test r11b, r11b sets al mov rdx, rbx sub rdx, r12 setnbe cl and cl, al cmp cl, 1 jnz short loc_35F37 mov rdi, [rbp+var_48] add rdi, r12 mov esi, 20h ; ' ' call _memset jmp short loc_35F3A loc_35F37: mov rbx, r12 loc_35F3A: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_czech( long long a1, long long a2, unsigned long long a3, long long a4, unsigned __int8 *a5, int a6, int a7) { unsigned __int8 *v7; // r15 int v9; // r11d long long v10; // rdx int v11; // ecx unsigned __int8 *v12; // r14 unsigned long long v13; // r12 int v14; // esi long long v15; // r9 int v16; // eax unsigned __int8 *v17; // r8 long long v18; // rax unsigned __int8 *v19; // r10 unsigned __int8 *v20; // rdi unsigned __int8 *v21; // rax int v22; // r9d unsigned __int8 *v23; // rax long long v24; // rbx char *v25; // r13 char v26; // al char *v27; // r13 unsigned __int8 *v28; // r10 _BYTE *v29; // r12 long long v32; // [rsp+10h] [rbp-50h] unsigned long long v34; // [rsp+20h] [rbp-40h] unsigned long long v35; // [rsp+28h] [rbp-38h] int v36; // [rsp+34h] [rbp-2Ch] v7 = a5; v9 = a7 | 0xF; if ( (a7 & 0xF) != 0 ) v9 = a7; v10 = a6; v32 = 1LL - (_QWORD)a5; v11 = 0; v12 = a5; v13 = 0LL; v35 = a3; v36 = v9; do { v14 = 1 << v11; if ( a5 - v7 >= v10 ) { v19 = a5; LABEL_21: if ( v11 != 3 ) { a5 = v7; if ( !v11 ) a5 = v12; ++v11; v22 = 1; v23 = v12; goto LABEL_45; } v22 = 0; v11 = 3; LABEL_23: v23 = v12; a5 = v19; goto LABEL_45; } v15 = (long long)*(&CZ_SORT_TABLE + v11); while ( 1 ) { v16 = *(unsigned __int8 *)(v15 + *a5); if ( !*(_BYTE *)(v15 + *a5) ) { v21 = (unsigned __int8 *)(++a5 - v7); v19 = a5; goto LABEL_18; } if ( v16 != 2 ) break; v17 = a5 + 1; v18 = v17 - v7; v19 = v17; if ( v17 - v7 < v10 ) { while ( *(_BYTE *)(v15 + *v19) == 2 ) { ++v19; ++v18; v20 = v19; if ( v18 >= v10 ) goto LABEL_14; } } v20 = v17; LABEL_14: if ( v11 >= 3 ) v19 = v20; v21 = (unsigned __int8 *)(v19 - v7); if ( v19 - v7 < v10 ) { v22 = 2; if ( v11 <= 1 ) { v23 = v19; v11 = 1 - v11; a5 = v12; goto LABEL_45; } goto LABEL_23; } a5 = v19; LABEL_18: if ( (long long)v21 >= v10 ) goto LABEL_21; } if ( v16 != 255 ) goto LABEL_44; v34 = v13; v24 = 0LL; while ( 2 ) { v25 = (char *)*(&doubles + 2 * v24); v26 = *v25; if ( *v25 && a5 - v7 < v10 ) { v27 = v25 + 1; v28 = &a5[v32]; v29 = a5; while ( *v29 == v26 ) { ++v29; v26 = *v27; if ( *v27 ) { ++v27; if ( (long long)v28++ < v10 ) continue; } goto LABEL_37; } goto LABEL_38; } v29 = a5; LABEL_37: if ( v26 ) { LABEL_38: if ( ++v24 == 80 ) { LOBYTE(v16) = -1; goto LABEL_43; } continue; } break; } LOBYTE(v16) = *((_BYTE *)*(&doubles + 2 * v24 + 1) + v11); a5 = v29 - 1; LABEL_43: a3 = v35; v9 = v36; v13 = v34; LABEL_44: v22 = (unsigned __int8)v16; ++a5; v23 = v12; LABEL_45: if ( (v9 & v14) != 0 && v13 < a3 ) *(_BYTE *)(a2 + v13++) = v22; v12 = v23; } while ( v22 ); if ( (v9 & 0x80u) == 0 || a3 <= v13 ) return v13; memset(v13 + a2, 32LL, a3 - v13); return a3; }
my_strnxfrm_czech: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,R8 MOV RBX,RDX MOV qword ptr [RBP + -0x48],RSI MOV EAX,dword ptr [RBP + 0x10] MOV R11D,EAX OR R11D,0xf TEST AL,0xf CMOVNZ R11D,EAX MOVSXD RDX,R9D MOV EAX,0x1 SUB RAX,R8 MOV qword ptr [RBP + -0x50],RAX XOR ECX,ECX LEA R13,[0x3ee5e0] MOV R14,R8 XOR R12D,R12D MOV qword ptr [RBP + -0x38],RBX MOV dword ptr [RBP + -0x2c],R11D LAB_00135d42: MOV ESI,0x1 SHL ESI,CL MOV RAX,R8 SUB RAX,R15 CMP RAX,RDX JGE 0x00135dd3 MOVSXD RAX,ECX MOV qword ptr [RBP + -0x58],RAX MOV R9,qword ptr [R13 + RAX*0x8] LAB_00135d60: MOVZX EAX,byte ptr [R8] MOVZX EAX,byte ptr [R9 + RAX*0x1] TEST EAX,EAX JZ 0x00135da2 CMP EAX,0x2 JNZ 0x00135e07 INC R8 MOV RAX,R8 SUB RAX,R15 MOV R10,R8 CMP RAX,RDX JGE 0x00135db0 LAB_00135d87: MOVZX EDI,byte ptr [R10] CMP byte ptr [R9 + RDI*0x1],0x2 JNZ 0x00135db0 INC R10 INC RAX MOV RDI,R10 CMP RAX,RDX JL 0x00135d87 JMP 0x00135db3 LAB_00135da2: INC R8 MOV RAX,R8 SUB RAX,R15 MOV R10,R8 JMP 0x00135dcc LAB_00135db0: MOV RDI,R8 LAB_00135db3: CMP ECX,0x3 CMOVGE R10,RDI MOV RAX,R10 SUB RAX,R15 CMP RAX,RDX JL 0x00135e88 MOV R8,R10 LAB_00135dcc: CMP RAX,RDX JL 0x00135d60 JMP 0x00135dd6 LAB_00135dd3: MOV R10,R8 LAB_00135dd6: CMP ECX,0x3 JNZ 0x00135dee XOR R9D,R9D MOV ECX,0x3 LAB_00135de3: MOV RAX,R14 MOV R8,R10 JMP 0x00135ee0 LAB_00135dee: TEST ECX,ECX MOV R8,R15 CMOVZ R8,R14 INC ECX MOV R9D,0x1 MOV RAX,R14 JMP 0x00135ee0 LAB_00135e07: CMP EAX,0xff JNZ 0x00135ed6 MOV qword ptr [RBP + -0x40],R12 MOV R9,R8 SUB R9,R15 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,R8 MOV qword ptr [RBP + -0x60],RAX XOR EBX,EBX LAB_00135e29: MOV R11,RBX SHL R11,0x4 LEA RAX,[0x3ee600] MOV R13,qword ptr [R11 + RAX*0x1] MOV AL,byte ptr [R13] TEST AL,AL JZ 0x00135e74 CMP R9,RDX JGE 0x00135e74 INC R13 MOV R10,qword ptr [RBP + -0x60] MOV R12,R8 LAB_00135e52: CMP byte ptr [R12],AL JNZ 0x00135e7b INC R12 MOV AL,byte ptr [R13] TEST AL,AL JZ 0x00135e77 INC R13 LEA RDI,[R10 + 0x1] CMP R10,RDX MOV R10,RDI JL 0x00135e52 JMP 0x00135e77 LAB_00135e74: MOV R12,R8 LAB_00135e77: TEST AL,AL JZ 0x00135ea8 LAB_00135e7b: INC RBX CMP RBX,0x50 JNZ 0x00135e29 MOV AL,0xff JMP 0x00135ec3 LAB_00135e88: MOV R9D,0x2 CMP ECX,0x1 JG 0x00135de3 MOV EDI,0x1 SUB EDI,ECX MOV RAX,R10 MOV ECX,EDI MOV R8,R14 JMP 0x00135ee0 LAB_00135ea8: LEA RAX,[0x3ee600] ADD R11,RAX MOV RAX,qword ptr [R11 + 0x8] MOV RDI,qword ptr [RBP + -0x58] MOV AL,byte ptr [RAX + RDI*0x1] DEC R12 MOV R8,R12 LAB_00135ec3: MOV RBX,qword ptr [RBP + -0x38] MOV R11D,dword ptr [RBP + -0x2c] MOV R12,qword ptr [RBP + -0x40] LEA R13,[0x3ee5e0] LAB_00135ed6: MOVZX R9D,AL INC R8 MOV RAX,R14 LAB_00135ee0: TEST ESI,R11D SETNZ R10B CMP R12,RBX SETC DIL AND DIL,R10B CMP DIL,0x1 JNZ 0x00135f02 MOV RSI,qword ptr [RBP + -0x48] MOV byte ptr [RSI + R12*0x1],R9B INC R12 LAB_00135f02: MOV R14,RAX TEST R9D,R9D JNZ 0x00135d42 TEST R11B,R11B SETS AL MOV RDX,RBX SUB RDX,R12 SETA CL AND CL,AL CMP CL,0x1 JNZ 0x00135f37 MOV RDI,qword ptr [RBP + -0x48] ADD RDI,R12 MOV ESI,0x20 CALL 0x00124190 JMP 0x00135f3a LAB_00135f37: MOV RBX,R12 LAB_00135f3a: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_czech(int8 param_1,long param_2,ulong param_3,int8 param_4, byte *param_5,int param_6,uint param_7) { uint uVar1; byte *pbVar2; byte *pbVar3; byte bVar4; char cVar5; long lVar6; byte *pbVar7; byte bVar8; int iVar9; long lVar10; byte *pbVar11; byte *pbVar12; byte *pbVar13; ulong uVar14; byte *pbVar15; uVar1 = param_7 | 0xf; if ((param_7 & 0xf) != 0) { uVar1 = param_7; } lVar10 = (long)param_6; iVar9 = 0; uVar14 = 0; pbVar13 = param_5; pbVar15 = param_5; LAB_00135d42: bVar8 = (byte)iVar9; pbVar7 = pbVar15; if ((long)pbVar13 - (long)param_5 < lVar10) { do { cVar5 = (&CZ_SORT_TABLE)[iVar9][*pbVar13]; if (cVar5 == '\0') { pbVar13 = pbVar13 + 1; lVar6 = (long)pbVar13 - (long)param_5; } else { if (cVar5 != '\x02') { if (cVar5 != -1) goto LAB_00135ed6; lVar6 = 0; goto LAB_00135e29; } pbVar12 = pbVar13 + 1; lVar6 = (long)pbVar12 - (long)param_5; pbVar13 = pbVar12; while ((pbVar11 = pbVar13, lVar6 < lVar10 && (pbVar11 = pbVar12, (&CZ_SORT_TABLE)[iVar9][*pbVar13] == '\x02'))) { pbVar13 = pbVar13 + 1; lVar6 = lVar6 + 1; } if (2 < iVar9) { pbVar13 = pbVar11; } lVar6 = (long)pbVar13 - (long)param_5; if (lVar6 < lVar10) { cVar5 = '\x02'; if (iVar9 < 2) { iVar9 = 1 - iVar9; pbVar7 = pbVar13; pbVar13 = pbVar15; } goto LAB_00135ee0; } } } while (lVar6 < lVar10); } if (iVar9 == 3) { cVar5 = '\0'; iVar9 = 3; } else { pbVar13 = param_5; if (iVar9 == 0) { pbVar13 = pbVar15; } iVar9 = iVar9 + 1; cVar5 = '\x01'; } goto LAB_00135ee0; LAB_00135e29: do { pbVar15 = (&doubles)[lVar6 * 2]; bVar4 = *pbVar15; pbVar12 = pbVar13; pbVar3 = pbVar13 + (1 - (long)param_5); pbVar11 = pbVar13 + -(long)param_5; if (bVar4 != 0) { while (pbVar2 = pbVar3, (long)pbVar11 < lVar10) { pbVar15 = pbVar15 + 1; if (*pbVar12 != bVar4) goto LAB_00135e7b; pbVar12 = pbVar12 + 1; bVar4 = *pbVar15; if (bVar4 == 0) break; pbVar3 = pbVar2 + 1; pbVar11 = pbVar2; } } if (bVar4 == 0) { cVar5 = (&PTR_DAT_003ee608)[lVar6 * 2][iVar9]; pbVar13 = pbVar12 + -1; goto LAB_00135ed6; } LAB_00135e7b: lVar6 = lVar6 + 1; } while (lVar6 != 0x50); cVar5 = -1; LAB_00135ed6: pbVar13 = pbVar13 + 1; LAB_00135ee0: if (uVar14 < param_3 && (1 << (bVar8 & 0x1f) & uVar1) != 0) { *(char *)(param_2 + uVar14) = cVar5; uVar14 = uVar14 + 1; } pbVar15 = pbVar7; if (cVar5 == '\0') { if ((uVar14 <= param_3 && param_3 - uVar14 != 0) && (char)uVar1 < '\0') { memset((void *)(param_2 + uVar14),0x20,param_3 - uVar14); uVar14 = param_3; } return uVar14; } goto LAB_00135d42; }
39,998
testing::internal::UnitTestImpl::RegisterParameterizedTests()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void UnitTestImpl::RegisterParameterizedTests() { if (!parameterized_tests_registered_) { parameterized_test_registry_.RegisterTests(); type_parameterized_test_registry_.CheckForInstantiations(); parameterized_tests_registered_ = true; } }
O1
cpp
testing::internal::UnitTestImpl::RegisterParameterizedTests(): cmpb $0x0, 0x1d0(%rdi) jne 0x21557 pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x120(%rdi), %r14 movq 0x128(%rdi), %r15 cmpq %r15, %r14 je 0x2153f movq (%r14), %rdi movq (%rdi), %rax callq *0x20(%rax) addq $0x8, %r14 jmp 0x2152b leaq 0x170(%rbx), %rdi callq 0x1a206 movb $0x1, 0x1d0(%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN7testing8internal12UnitTestImpl26RegisterParameterizedTestsEv: cmp byte ptr [rdi+1D0h], 0 jnz short locret_21557 push r15 push r14 push rbx mov rbx, rdi mov r14, [rdi+120h] mov r15, [rdi+128h] loc_2152B: cmp r14, r15 jz short loc_2153F mov rdi, [r14] mov rax, [rdi] call qword ptr [rax+20h] add r14, 8 jmp short loc_2152B loc_2153F: lea rdi, [rbx+170h]; this call _ZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEv; testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void) mov byte ptr [rbx+1D0h], 1 pop rbx pop r14 pop r15 locret_21557: retn
char * testing::internal::UnitTestImpl::RegisterParameterizedTests(testing::internal::UnitTestImpl *this) { _QWORD *v1; // r14 _QWORD *v2; // r15 char *result; // rax if ( !*((_BYTE *)this + 464) ) { v1 = (_QWORD *)*((_QWORD *)this + 36); v2 = (_QWORD *)*((_QWORD *)this + 37); while ( v1 != v2 ) { (*(void ( **)(_QWORD))(*(_QWORD *)*v1 + 32LL))(*v1); ++v1; } result = testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations((testing::internal::UnitTestImpl *)((char *)this + 368)); *((_BYTE *)this + 464) = 1; } return result; }
RegisterParameterizedTests: CMP byte ptr [RDI + 0x1d0],0x0 JNZ 0x00121557 PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x120] MOV R15,qword ptr [RDI + 0x128] LAB_0012152b: CMP R14,R15 JZ 0x0012153f MOV RDI,qword ptr [R14] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] ADD R14,0x8 JMP 0x0012152b LAB_0012153f: LEA RDI,[RBX + 0x170] CALL 0x0011a206 MOV byte ptr [RBX + 0x1d0],0x1 POP RBX POP R14 POP R15 LAB_00121557: RET
/* testing::internal::UnitTestImpl::RegisterParameterizedTests() */ void __thiscall testing::internal::UnitTestImpl::RegisterParameterizedTests(UnitTestImpl *this) { int8 *puVar1; int8 *puVar2; if (this[0x1d0] == (UnitTestImpl)0x0) { puVar1 = *(int8 **)(this + 0x128); for (puVar2 = *(int8 **)(this + 0x120); puVar2 != puVar1; puVar2 = puVar2 + 1) { (**(code **)(*(long *)*puVar2 + 0x20))(); } TypeParameterizedTestSuiteRegistry::CheckForInstantiations ((TypeParameterizedTestSuiteRegistry *)(this + 0x170)); this[0x1d0] = (UnitTestImpl)0x1; } return; }
39,999
my_strnxfrm_unicode_full_bin_internal
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs, uchar *dst, uchar *de, uint *nweights, const uchar *src, const uchar *se) { my_wc_t UNINIT_VAR(wc); uchar *dst0= dst; DBUG_ASSERT(src || !se); DBUG_ASSERT(cs->state & MY_CS_BINSORT); for (; dst < de && *nweights; (*nweights)--) { int res; if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0) break; src+= res; *dst++= (uchar) (wc >> 16); if (dst < de) { *dst++= (uchar) ((wc >> 8) & 0xFF); if (dst < de) *dst++= (uchar) (wc & 0xFF); } } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_bin_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, -0x40(%rbp) movq %rsi, %rax movq %rsi, -0x38(%rbp) cmpq %rdx, %rsi jae 0xcc669 movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx movl (%rcx), %ecx movq -0x38(%rbp), %r14 testl %ecx, %ecx je 0xcc666 movq 0xb8(%rbx), %rax movq %rbx, %rdi leaq -0x30(%rbp), %rsi movq %r15, %rdx movq -0x40(%rbp), %rcx callq *0x28(%rax) testl %eax, %eax jle 0xcc666 movl %eax, %ecx movb -0x2e(%rbp), %dl leaq 0x1(%r14), %rax movb %dl, (%r14) cmpq %r13, %rax jae 0xcc64d movb -0x2f(%rbp), %dl leaq 0x2(%r14), %rax movb %dl, 0x1(%r14) cmpq %r13, %rax jae 0xcc64d movb -0x30(%rbp), %al movb %al, 0x2(%r14) addq $0x3, %r14 movq %r14, %rax movl %ecx, %ecx addq %rcx, %r15 movl (%r12), %ecx decl %ecx movl %ecx, (%r12) movq %rax, %r14 cmpq %r13, %rax jb 0xcc5fe jmp 0xcc669 movq %r14, %rax subq -0x38(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_bin_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r9 mov rax, rsi mov [rbp+var_38], rsi cmp rsi, rdx jnb short loc_CC669 mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi mov ecx, [rcx] mov r14, [rbp+var_38] loc_CC5FE: test ecx, ecx jz short loc_CC666 mov rax, [rbx+0B8h] mov rdi, rbx lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, [rbp+var_40] call qword ptr [rax+28h] test eax, eax jle short loc_CC666 mov ecx, eax mov dl, [rbp+var_2E] lea rax, [r14+1] mov [r14], dl cmp rax, r13 jnb short loc_CC64D mov dl, [rbp+var_2F] lea rax, [r14+2] mov [r14+1], dl cmp rax, r13 jnb short loc_CC64D mov al, [rbp+var_30] mov [r14+2], al add r14, 3 mov rax, r14 loc_CC64D: mov ecx, ecx add r15, rcx mov ecx, [r12] dec ecx mov [r12], ecx mov r14, rax cmp rax, r13 jb short loc_CC5FE jmp short loc_CC669 loc_CC666: mov rax, r14 loc_CC669: sub rax, [rbp+var_38] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_bin_internal( long long a1, _BYTE *a2, unsigned long long a3, int *a4, long long a5, long long a6) { _BYTE *v6; // rax int v10; // ecx _BYTE *v11; // r14 int v12; // eax unsigned int v13; // ecx _BYTE v16[48]; // [rsp+10h] [rbp-30h] BYREF v6 = a2; if ( (unsigned long long)a2 < a3 ) { v10 = *a4; v11 = a2; while ( v10 ) { v12 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL))( a1, v16, a5, a6); if ( v12 <= 0 ) break; v13 = v12; v6 = v11 + 1; *v11 = v16[2]; if ( (unsigned long long)(v11 + 1) < a3 ) { v6 = v11 + 2; v11[1] = v16[1]; if ( (unsigned long long)(v11 + 2) < a3 ) { v11[2] = v16[0]; v6 = v11 + 3; } } a5 += v13; v10 = *a4 - 1; *a4 = v10; v11 = v6; if ( (unsigned long long)v6 >= a3 ) return v6 - a2; } v6 = v11; } return v6 - a2; }
my_strnxfrm_unicode_full_bin_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R9 MOV RAX,RSI MOV qword ptr [RBP + -0x38],RSI CMP RSI,RDX JNC 0x001cc669 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI MOV ECX,dword ptr [RCX] MOV R14,qword ptr [RBP + -0x38] LAB_001cc5fe: TEST ECX,ECX JZ 0x001cc666 MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x28] TEST EAX,EAX JLE 0x001cc666 MOV ECX,EAX MOV DL,byte ptr [RBP + -0x2e] LEA RAX,[R14 + 0x1] MOV byte ptr [R14],DL CMP RAX,R13 JNC 0x001cc64d MOV DL,byte ptr [RBP + -0x2f] LEA RAX,[R14 + 0x2] MOV byte ptr [R14 + 0x1],DL CMP RAX,R13 JNC 0x001cc64d MOV AL,byte ptr [RBP + -0x30] MOV byte ptr [R14 + 0x2],AL ADD R14,0x3 MOV RAX,R14 LAB_001cc64d: MOV ECX,ECX ADD R15,RCX MOV ECX,dword ptr [R12] DEC ECX MOV dword ptr [R12],ECX MOV R14,RAX CMP RAX,R13 JC 0x001cc5fe JMP 0x001cc669 LAB_001cc666: MOV RAX,R14 LAB_001cc669: SUB RAX,qword ptr [RBP + -0x38] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_bin_internal (long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5, int8 param_6) { uint uVar1; int iVar2; int1 *puVar3; int1 *puVar4; int1 local_38; int1 local_37; int1 local_36; puVar4 = param_2; if (param_2 < param_3) { iVar2 = *param_4; puVar3 = param_2; do { puVar4 = puVar3; if ((iVar2 == 0) || (uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_38,param_5,param_6) , (int)uVar1 < 1)) break; puVar4 = puVar3 + 1; *puVar3 = local_36; if (puVar4 < param_3) { puVar4 = puVar3 + 2; puVar3[1] = local_37; if (puVar4 < param_3) { puVar3[2] = local_38; puVar4 = puVar3 + 3; } } param_5 = param_5 + (ulong)uVar1; iVar2 = *param_4 + -1; *param_4 = iVar2; puVar3 = puVar4; } while (puVar4 < param_3); } return (long)puVar4 - (long)param_2; }