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
2,000
OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceSurface.cpp
void FaceSurface::reviseSdcOptionsInEffect() { // // "Override" (ignore, set to default) any options not affecting // the shape of the limit surface. The boundary and face-varying // interpolation options are fixed/ignored for all cases. Whether // other options have an effect depends on the topology present. // // This is done, in part, to make accurate comparisons between // the topologies of two surfaces. For example, the presence of // differing creasing methods should not lead to two topologically // identical surfaces with no creasing being considered different. // // This is to be used on construction on irregular surfaces AFTER // the combined tags have been determined. // assert(!_isRegular); MultiVertexTag const & tags = _combinedTag; Sdc::Options & options = _optionsInEffect; // Boundary and face-varying interpolation fixed/ignored for all: options.SetVtxBoundaryInterpolation(Sdc::Options::VTX_BOUNDARY_EDGE_ONLY); options.SetFVarLinearInterpolation( Sdc::Options::FVAR_LINEAR_ALL); // Crease-method ignored when no semi-sharp creasing: if (options.GetCreasingMethod() != Sdc::Options::CREASE_UNIFORM) { if (!tags.HasSemiSharpEdges() && !tags.HasSemiSharpVertices()) { options.SetCreasingMethod(Sdc::Options::CREASE_UNIFORM); } } // Catmark triangle smoothing ignored if not Catmark with triangles: if (options.GetTriangleSubdivision() != Sdc::Options::TRI_SUB_CATMARK) { // This is slightly stronger than necessary -- will keep the // tri-smooth setting if Catmark and any non-quads: if ((GetSdcScheme() != Sdc::SCHEME_CATMARK) || !tags.HasIrregularFaceSizes()) { options.SetTriangleSubdivision(Sdc::Options::TRI_SUB_CATMARK); } } // Non-default values of any future options will warrant attention }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect(): testb $0x4, 0x8e(%rdi) jne 0x85e0d movw $0x501, 0x8a(%rdi) # imm = 0x501 cmpb $0x0, 0x8c(%rdi) je 0x85deb testb $0x30, 0x88(%rdi) jne 0x85deb movb $0x0, 0x8c(%rdi) cmpb $0x0, 0x8d(%rdi) je 0x85e0c movq (%rdi), %rax cmpl $0x1, (%rax) jne 0x85e05 testb $-0x80, 0x88(%rdi) jne 0x85e0c movb $0x0, 0x8d(%rdi) retq pushq %rax leaq 0x37d97(%rip), %rdi # 0xbdbac leaq 0x37d9c(%rip), %rsi # 0xbdbb8 leaq 0x37df2(%rip), %rcx # 0xbdc15 movl $0xdd, %edx callq 0x39560 nop
_ZN10OpenSubdiv6v3_6_03Bfr11FaceSurface24reviseSdcOptionsInEffectEv: test byte ptr [rdi+8Eh], 4 jnz short loc_85E0D mov word ptr [rdi+8Ah], 501h cmp byte ptr [rdi+8Ch], 0 jz short loc_85DEB test byte ptr [rdi+88h], 30h jnz short loc_85DEB mov byte ptr [rdi+8Ch], 0 loc_85DEB: cmp byte ptr [rdi+8Dh], 0 jz short locret_85E0C mov rax, [rdi] cmp dword ptr [rax], 1 jnz short loc_85E05 test byte ptr [rdi+88h], 80h jnz short locret_85E0C loc_85E05: mov byte ptr [rdi+8Dh], 0 locret_85E0C: retn loc_85E0D: push rax lea rdi, aIsregular; "!_isRegular" lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_108; "void OpenSubdiv::v3_6_0::Bfr::FaceSurfa"... mov edx, 0DDh call ___assert_fail
long long OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect( OpenSubdiv::v3_6_0::Bfr::FaceSurface *this) { long long result; // rax if ( (*((_BYTE *)this + 142) & 4) != 0 ) __assert_fail( "!_isRegular", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceSurface.cpp", 221LL, "void OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect()"); *((_WORD *)this + 69) = 1281; if ( *((_BYTE *)this + 140) && (*((_BYTE *)this + 136) & 0x30) == 0 ) *((_BYTE *)this + 140) = 0; if ( *((_BYTE *)this + 141) ) { result = *(_QWORD *)this; if ( **(_DWORD **)this != 1 || *((char *)this + 136) >= 0 ) *((_BYTE *)this + 141) = 0; } return result; }
reviseSdcOptionsInEffect: TEST byte ptr [RDI + 0x8e],0x4 JNZ 0x00185e0d MOV word ptr [RDI + 0x8a],0x501 CMP byte ptr [RDI + 0x8c],0x0 JZ 0x00185deb TEST byte ptr [RDI + 0x88],0x30 JNZ 0x00185deb MOV byte ptr [RDI + 0x8c],0x0 LAB_00185deb: CMP byte ptr [RDI + 0x8d],0x0 JZ 0x00185e0c MOV RAX,qword ptr [RDI] CMP dword ptr [RAX],0x1 JNZ 0x00185e05 TEST byte ptr [RDI + 0x88],0x80 JNZ 0x00185e0c LAB_00185e05: MOV byte ptr [RDI + 0x8d],0x0 LAB_00185e0c: RET LAB_00185e0d: PUSH RAX LEA RDI,[0x1bdbac] LEA RSI,[0x1bdbb8] LEA RCX,[0x1bdc15] MOV EDX,0xdd CALL 0x00139560
/* OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect() */ void __thiscall OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect(FaceSurface *this) { if (((byte)this[0x8e] & 4) == 0) { *(int2 *)(this + 0x8a) = 0x501; if ((this[0x8c] != (FaceSurface)0x0) && (((byte)this[0x88] & 0x30) == 0)) { this[0x8c] = (FaceSurface)0x0; } if ((this[0x8d] != (FaceSurface)0x0) && ((**(int **)this != 1 || (((byte)this[0x88] & 0x80) == 0)))) { this[0x8d] = (FaceSurface)0x0; } return; } /* WARNING: Subroutine does not return */ __assert_fail("!_isRegular", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceSurface.cpp" ,0xdd,"void OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect()"); }
2,001
OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceSurface.cpp
void FaceSurface::reviseSdcOptionsInEffect() { // // "Override" (ignore, set to default) any options not affecting // the shape of the limit surface. The boundary and face-varying // interpolation options are fixed/ignored for all cases. Whether // other options have an effect depends on the topology present. // // This is done, in part, to make accurate comparisons between // the topologies of two surfaces. For example, the presence of // differing creasing methods should not lead to two topologically // identical surfaces with no creasing being considered different. // // This is to be used on construction on irregular surfaces AFTER // the combined tags have been determined. // assert(!_isRegular); MultiVertexTag const & tags = _combinedTag; Sdc::Options & options = _optionsInEffect; // Boundary and face-varying interpolation fixed/ignored for all: options.SetVtxBoundaryInterpolation(Sdc::Options::VTX_BOUNDARY_EDGE_ONLY); options.SetFVarLinearInterpolation( Sdc::Options::FVAR_LINEAR_ALL); // Crease-method ignored when no semi-sharp creasing: if (options.GetCreasingMethod() != Sdc::Options::CREASE_UNIFORM) { if (!tags.HasSemiSharpEdges() && !tags.HasSemiSharpVertices()) { options.SetCreasingMethod(Sdc::Options::CREASE_UNIFORM); } } // Catmark triangle smoothing ignored if not Catmark with triangles: if (options.GetTriangleSubdivision() != Sdc::Options::TRI_SUB_CATMARK) { // This is slightly stronger than necessary -- will keep the // tri-smooth setting if Catmark and any non-quads: if ((GetSdcScheme() != Sdc::SCHEME_CATMARK) || !tags.HasIrregularFaceSizes()) { options.SetTriangleSubdivision(Sdc::Options::TRI_SUB_CATMARK); } } // Non-default values of any future options will warrant attention }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect(): testb $0x4, 0x8e(%rdi) jne 0x8863f movw $0x501, 0x8a(%rdi) # imm = 0x501 cmpb $0x0, 0x8c(%rdi) je 0x8861d testb $0x30, 0x88(%rdi) jne 0x8861d movb $0x0, 0x8c(%rdi) cmpb $0x0, 0x8d(%rdi) je 0x8863e movq (%rdi), %rax cmpl $0x1, (%rax) jne 0x88637 testb $-0x80, 0x88(%rdi) jne 0x8863e movb $0x0, 0x8d(%rdi) retq pushq %rax leaq 0x38d45(%rip), %rdi # 0xc138c leaq 0x38d4a(%rip), %rsi # 0xc1398 leaq 0x38da0(%rip), %rcx # 0xc13f5 movl $0xdd, %edx callq 0x39540 nop
_ZN10OpenSubdiv6v3_6_03Bfr11FaceSurface24reviseSdcOptionsInEffectEv: test byte ptr [rdi+8Eh], 4 jnz short loc_8863F mov word ptr [rdi+8Ah], 501h cmp byte ptr [rdi+8Ch], 0 jz short loc_8861D test byte ptr [rdi+88h], 30h jnz short loc_8861D mov byte ptr [rdi+8Ch], 0 loc_8861D: cmp byte ptr [rdi+8Dh], 0 jz short locret_8863E mov rax, [rdi] cmp dword ptr [rax], 1 jnz short loc_88637 test byte ptr [rdi+88h], 80h jnz short locret_8863E loc_88637: mov byte ptr [rdi+8Dh], 0 locret_8863E: retn loc_8863F: push rax lea rdi, aIsregular; "!_isRegular" lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_108; "void OpenSubdiv::v3_6_0::Bfr::FaceSurfa"... mov edx, 0DDh call ___assert_fail
long long OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect( OpenSubdiv::v3_6_0::Bfr::FaceSurface *this) { long long result; // rax if ( (*((_BYTE *)this + 142) & 4) != 0 ) __assert_fail( "!_isRegular", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceSurface.cpp", 221LL, "void OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect()"); *((_WORD *)this + 69) = 1281; if ( *((_BYTE *)this + 140) && (*((_BYTE *)this + 136) & 0x30) == 0 ) *((_BYTE *)this + 140) = 0; if ( *((_BYTE *)this + 141) ) { result = *(_QWORD *)this; if ( **(_DWORD **)this != 1 || *((char *)this + 136) >= 0 ) *((_BYTE *)this + 141) = 0; } return result; }
reviseSdcOptionsInEffect: TEST byte ptr [RDI + 0x8e],0x4 JNZ 0x0018863f MOV word ptr [RDI + 0x8a],0x501 CMP byte ptr [RDI + 0x8c],0x0 JZ 0x0018861d TEST byte ptr [RDI + 0x88],0x30 JNZ 0x0018861d MOV byte ptr [RDI + 0x8c],0x0 LAB_0018861d: CMP byte ptr [RDI + 0x8d],0x0 JZ 0x0018863e MOV RAX,qword ptr [RDI] CMP dword ptr [RAX],0x1 JNZ 0x00188637 TEST byte ptr [RDI + 0x88],0x80 JNZ 0x0018863e LAB_00188637: MOV byte ptr [RDI + 0x8d],0x0 LAB_0018863e: RET LAB_0018863f: PUSH RAX LEA RDI,[0x1c138c] LEA RSI,[0x1c1398] LEA RCX,[0x1c13f5] MOV EDX,0xdd CALL 0x00139540
/* OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect() */ void __thiscall OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect(FaceSurface *this) { if (((byte)this[0x8e] & 4) == 0) { *(int2 *)(this + 0x8a) = 0x501; if ((this[0x8c] != (FaceSurface)0x0) && (((byte)this[0x88] & 0x30) == 0)) { this[0x8c] = (FaceSurface)0x0; } if ((this[0x8d] != (FaceSurface)0x0) && ((**(int **)this != 1 || (((byte)this[0x88] & 0x80) == 0)))) { this[0x8d] = (FaceSurface)0x0; } return; } /* WARNING: Subroutine does not return */ __assert_fail("!_isRegular", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceSurface.cpp" ,0xdd,"void OpenSubdiv::v3_6_0::Bfr::FaceSurface::reviseSdcOptionsInEffect()"); }
2,002
my_uca_context_weight_find
eloqsql/strings/ctype-uca.c
static inline const MY_CONTRACTION * my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc, size_t max_char_length) { const MY_CONTRACTION *cnt; DBUG_ASSERT(scanner->level->contractions.nitems); /* If we have scanned a character which can have previous context, and there were some more characters already before, then reconstruct codepoint of the previous character from "page" and "code" into w[1], and verify that {wc[1], wc[0]} together form a real previous context pair. Note, we support only 2-character long sequences with previous context at the moment. CLDR does not have longer sequences. */ if (my_uca_can_be_previous_context_tail(&scanner->level->contractions, wc[0]) && scanner->wbeg != nochar && /* if not the very first character */ my_uca_can_be_previous_context_head(&scanner->level->contractions, (wc[1]= ((scanner->page << 8) + scanner->code))) && (cnt= my_uca_previous_context_find(scanner, wc[1], wc[0]))) { scanner->page= scanner->code= 0; /* Clear for the next character */ return cnt; } else if (my_uca_can_be_contraction_head(&scanner->level->contractions, wc[0])) { /* Check if w[0] starts a contraction */ if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length))) return cnt; } return NULL; }
O3
c
my_uca_context_weight_find: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, -0x30(%rbp) movq %rsi, %r14 movq 0x18(%rdi), %rcx movq (%rsi), %rdx movq 0x28(%rcx), %rsi movl %edx, %eax andl $0xfff, %eax # imm = 0xFFF cmpb $0x0, (%rsi,%rax) js 0x40fd0 movq 0x28(%rcx), %rcx testb $0x1, (%rcx,%rax) je 0x4111c movq %rdi, -0x40(%rbp) xorps %xmm0, %xmm0 movaps %xmm0, -0x60(%rbp) movaps %xmm0, -0x70(%rbp) movaps %xmm0, -0x80(%rbp) cmpq $0x2, -0x30(%rbp) jb 0x4111c movq -0x40(%rbp), %r13 movq 0x8(%r13), %r12 movb $0x4, %r15b movl $0x1, %edx movl $0x8, %ebx movq %rdx, -0x38(%rbp) movq 0x10(%r13), %rcx movq 0x30(%r13), %rdi movq 0xb8(%rdi), %rax leaq (%r14,%rbx), %rsi movq %r12, %rdx callq *0x28(%rax) testl %eax, %eax jle 0x41050 movl %eax, %eax addq %rax, %r12 movq -0x38(%rbp), %rdx movq %r12, -0x80(%rbp,%rdx,8) movq 0x18(%r13), %rcx movq (%r14,%rdx,8), %rax movq 0x28(%rcx), %rsi andl $0xfff, %eax # imm = 0xFFF testb %r15b, (%rsi,%rax) je 0x4106c incq %rdx addb %r15b, %r15b addq $0x8, %rbx cmpq %rdx, -0x30(%rbp) jne 0x40f69 movq -0x30(%rbp), %rdx jmp 0x41054 leaq 0x2126d9(%rip), %rsi # 0x2536b0 cmpq %rsi, (%rdi) je 0x40f28 movl 0x24(%rdi), %esi shll $0x8, %esi movslq 0x28(%rdi), %r8 movslq %esi, %rsi addq %r8, %rsi movq %rsi, 0x8(%r14) movq 0x28(%rcx), %rcx movl %esi, %r8d andl $0xfff, %r8d # imm = 0xFFF testb $0x40, (%rcx,%r8) movq 0x18(%rdi), %rcx je 0x40f28 movq 0x18(%rcx), %r8 testq %r8, %r8 jle 0x40f28 movq 0x20(%rcx), %r12 imulq $0x58, %r8, %r8 addq %r12, %r8 cmpb $0x0, 0x52(%r12) je 0x41042 cmpq %rsi, (%r12) jne 0x41042 cmpq %rdx, 0x8(%r12) je 0x41148 addq $0x58, %r12 cmpq %r8, %r12 jb 0x41029 jmp 0x40f28 movq -0x38(%rbp), %rdx cmpq $0x2, %rdx jb 0x4111c movq -0x40(%rbp), %rax movq 0x18(%rax), %rcx movq 0x28(%rcx), %rsi jmp 0x4106f incq %rdx leaq (,%rdx,8), %rdi movq %rsi, -0x48(%rbp) movq %rdx, %r8 decq %rdx movq -0x8(%r14,%r8,8), %rax andl $0xfff, %eax # imm = 0xFFF testb $0x2, (%rsi,%rax) je 0x4110a movq 0x18(%rcx), %rax testq %rax, %rax jle 0x4110a movq 0x20(%rcx), %r12 imulq $0x58, %rax, %rax addq %r12, %rax leaq (,%r8,8), %rsi movq %rsi, -0x50(%rbp) movq %rdi, -0x38(%rbp) movq %rax, -0x30(%rbp) cmpq $0x5, %r8 ja 0x410c6 cmpq $0x0, (%r12,%rdi) jne 0x41101 cmpb $0x0, 0x52(%r12) jne 0x41101 movq %r12, %rdi movq %r14, %rsi movq %rdx, %r15 movq -0x50(%rbp), %rdx movq %r14, %r13 movq %rcx, %rbx movq %r8, %r14 callq 0x242d0 movq %r14, %r8 movq -0x38(%rbp), %rdi movq %rbx, %rcx movq %r15, %rdx movq %r13, %r14 testl %eax, %eax movq -0x30(%rbp), %rax je 0x41131 addq $0x58, %r12 cmpq %rax, %r12 jb 0x410b9 addq $-0x8, %rdi cmpq $0x1, %rdx movq -0x48(%rbp), %rsi ja 0x4107b xorl %r12d, %r12d movq %r12, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x32(%r12), %rax movq -0x40(%rbp), %rcx movq %rax, (%rcx) movq -0x80(%rbp,%rdx,8), %rax movq %rax, 0x8(%rcx) jmp 0x4111f leaq 0x32(%r12), %rax movq %rax, (%rdi) movq $0x0, 0x24(%rdi) jmp 0x4111f
my_uca_context_weight_find: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], rdx mov r14, rsi mov rcx, [rdi+18h] mov rdx, [rsi] mov rsi, [rcx+28h] mov eax, edx and eax, 0FFFh cmp byte ptr [rsi+rax], 0 js loc_40FD0 loc_40F28: mov rcx, [rcx+28h] test byte ptr [rcx+rax], 1 jz loc_4111C mov [rbp+var_40], rdi xorps xmm0, xmm0 movaps [rbp+var_60], xmm0 movaps [rbp+var_70], xmm0 movaps [rbp+var_80], xmm0 cmp [rbp+var_30], 2 jb loc_4111C mov r13, [rbp+var_40] mov r12, [r13+8] mov r15b, 4 mov edx, 1 mov ebx, 8 loc_40F69: mov [rbp+var_38], rdx mov rcx, [r13+10h] mov rdi, [r13+30h] mov rax, [rdi+0B8h] lea rsi, [r14+rbx] mov rdx, r12 call qword ptr [rax+28h] test eax, eax jle loc_41050 mov eax, eax add r12, rax mov rdx, [rbp+var_38] mov qword ptr [rbp+rdx*8+var_80], r12 mov rcx, [r13+18h] mov rax, [r14+rdx*8] mov rsi, [rcx+28h] and eax, 0FFFh test [rsi+rax], r15b jz loc_4106C inc rdx add r15b, r15b add rbx, 8 cmp [rbp+var_30], rdx jnz short loc_40F69 mov rdx, [rbp+var_30] jmp loc_41054 loc_40FD0: lea rsi, nochar cmp [rdi], rsi jz loc_40F28 mov esi, [rdi+24h] shl esi, 8 movsxd r8, dword ptr [rdi+28h] movsxd rsi, esi add rsi, r8 mov [r14+8], rsi mov rcx, [rcx+28h] mov r8d, esi and r8d, 0FFFh test byte ptr [rcx+r8], 40h mov rcx, [rdi+18h] jz loc_40F28 mov r8, [rcx+18h] test r8, r8 jle loc_40F28 mov r12, [rcx+20h] imul r8, 58h ; 'X' add r8, r12 loc_41029: cmp byte ptr [r12+52h], 0 jz short loc_41042 cmp [r12], rsi jnz short loc_41042 cmp [r12+8], rdx jz loc_41148 loc_41042: add r12, 58h ; 'X' cmp r12, r8 jb short loc_41029 jmp loc_40F28 loc_41050: mov rdx, [rbp+var_38] loc_41054: cmp rdx, 2 jb loc_4111C mov rax, [rbp+var_40] mov rcx, [rax+18h] mov rsi, [rcx+28h] jmp short loc_4106F loc_4106C: inc rdx loc_4106F: lea rdi, ds:0[rdx*8] mov [rbp+var_48], rsi loc_4107B: mov r8, rdx dec rdx mov rax, [r14+r8*8-8] and eax, 0FFFh test byte ptr [rsi+rax], 2 jz short loc_4110A mov rax, [rcx+18h] test rax, rax jle short loc_4110A mov r12, [rcx+20h] imul rax, 58h ; 'X' add rax, r12 lea rsi, ds:0[r8*8] mov [rbp+var_50], rsi mov [rbp+var_38], rdi mov [rbp+var_30], rax loc_410B9: cmp r8, 5 ja short loc_410C6 cmp qword ptr [r12+rdi], 0 jnz short loc_41101 loc_410C6: cmp byte ptr [r12+52h], 0 jnz short loc_41101 mov rdi, r12 mov rsi, r14 mov r15, rdx mov rdx, [rbp+var_50] mov r13, r14 mov rbx, rcx mov r14, r8 call _bcmp mov r8, r14 mov rdi, [rbp+var_38] mov rcx, rbx mov rdx, r15 mov r14, r13 test eax, eax mov rax, [rbp+var_30] jz short loc_41131 loc_41101: add r12, 58h ; 'X' cmp r12, rax jb short loc_410B9 loc_4110A: add rdi, 0FFFFFFFFFFFFFFF8h cmp rdx, 1 mov rsi, [rbp+var_48] ja loc_4107B loc_4111C: xor r12d, r12d loc_4111F: mov rax, r12 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_41131: lea rax, [r12+32h] mov rcx, [rbp+var_40] mov [rcx], rax mov rax, qword ptr [rbp+rdx*8+var_80] mov [rcx+8], rax jmp short loc_4111F loc_41148: lea rax, [r12+32h] mov [rdi], rax mov qword ptr [rdi+24h], 0 jmp short loc_4111F
unsigned long long my_uca_context_weight_find( long long a1, _QWORD *a2, unsigned long long a3, long long a4, long long a5, long long a6) { _QWORD *v6; // r14 _QWORD *v7; // rcx long long v8; // rdx long long v9; // rax _QWORD *v10; // r13 long long v11; // r12 char v12; // r15 long long v13; // rdx long long v14; // rbx int v15; // eax long long v16; // rdx _QWORD *v17; // rcx long long v18; // rsi unsigned long long v19; // rdx long long v20; // rsi bool v21; // zf unsigned long long v22; // r12 long long v23; // rdi unsigned long long v24; // r8 long long v25; // rax unsigned long long v26; // rax _QWORD *v27; // rsi unsigned long long v28; // r15 _QWORD *v29; // r13 _QWORD *v30; // rbx unsigned long long v31; // r14 int v32; // eax _QWORD *v34; // rcx __int128 v35; // [rsp+0h] [rbp-80h] __int128 v36; // [rsp+10h] [rbp-70h] __int128 v37; // [rsp+20h] [rbp-60h] long long v38; // [rsp+30h] [rbp-50h] long long v39; // [rsp+38h] [rbp-48h] _QWORD *v40; // [rsp+40h] [rbp-40h] long long v41; // [rsp+48h] [rbp-38h] unsigned long long v42; // [rsp+50h] [rbp-30h] v42 = a3; v6 = a2; v7 = *(_QWORD **)(a1 + 24); v8 = *a2; v9 = *a2 & 0xFFFLL; if ( *(char *)(v7[5] + v9) >= 0 || *(_UNKNOWN **)a1 == &nochar || (v20 = *(int *)(a1 + 40) + (long long)(int)(*(_DWORD *)(a1 + 36) << 8), v6[1] = v20, a5 = v20 & 0xFFF, v21 = (*(_BYTE *)(v7[5] + a5) & 0x40) == 0, v7 = *(_QWORD **)(a1 + 24), v21) || (a5 = v7[3], a5 <= 0) ) { LABEL_2: if ( (*(_BYTE *)(v7[5] + v9) & 1) != 0 && (v40 = (_QWORD *)a1, v37 = 0LL, v36 = 0LL, v35 = 0LL, v42 >= 2) ) { v10 = v40; v11 = v40[1]; v12 = 4; v13 = 1LL; v14 = 1LL; while ( 1 ) { v41 = v13; v15 = (*(long long ( **)(_QWORD, _QWORD *, long long, _QWORD, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v10[6] + 184LL) + 40LL))( v10[6], &v6[v14], v11, v10[2], a5, a6, v35, *((_QWORD *)&v35 + 1), v36, *((_QWORD *)&v36 + 1), v37, *((_QWORD *)&v37 + 1)); if ( v15 <= 0 ) break; v11 += (unsigned int)v15; v16 = v41; *((_QWORD *)&v35 + v41) = v11; v17 = (_QWORD *)v10[3]; v18 = v17[5]; if ( ((unsigned __int8)v12 & *(_BYTE *)(v18 + (v6[v16] & 0xFFFLL))) == 0 ) { v19 = v16 + 1; goto LABEL_22; } v13 = v16 + 1; v12 *= 2; ++v14; if ( v42 == v13 ) { v19 = v42; goto LABEL_19; } } v19 = v41; LABEL_19: if ( v19 < 2 ) return 0LL; v17 = (_QWORD *)v40[3]; v18 = v17[5]; LABEL_22: v23 = 8 * v19; v39 = v18; while ( 1 ) { v24 = v19--; if ( (*(_BYTE *)(v18 + (v6[v24 - 1] & 0xFFFLL)) & 2) != 0 ) { v25 = v17[3]; if ( v25 > 0 ) break; } LABEL_31: v23 -= 8LL; v18 = v39; if ( v19 <= 1 ) return 0LL; } v22 = v17[4]; v26 = v22 + 88 * v25; v38 = 8 * v24; v41 = v23; v42 = v26; while ( 1 ) { if ( (v24 > 5 || !*(_QWORD *)(v22 + v23)) && !*(_BYTE *)(v22 + 82) ) { v27 = v6; v28 = v19; v29 = v6; v30 = v17; v31 = v24; v32 = bcmp(v22, v27, v38); v24 = v31; v23 = v41; v17 = v30; v19 = v28; v6 = v29; v21 = v32 == 0; v26 = v42; if ( v21 ) break; } v22 += 88LL; if ( v22 >= v26 ) goto LABEL_31; } v34 = v40; *v40 = v22 + 50; v34[1] = *((_QWORD *)&v35 + v28); } else { return 0LL; } } else { v22 = v7[4]; a5 = v22 + 88 * a5; while ( !*(_BYTE *)(v22 + 82) || *(_QWORD *)v22 != v20 || *(_QWORD *)(v22 + 8) != v8 ) { v22 += 88LL; if ( v22 >= a5 ) goto LABEL_2; } *(_QWORD *)a1 = v22 + 50; *(_QWORD *)(a1 + 36) = 0LL; } return v22; }
my_uca_context_weight_find: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],RDX MOV R14,RSI MOV RCX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RSI] MOV RSI,qword ptr [RCX + 0x28] MOV EAX,EDX AND EAX,0xfff CMP byte ptr [RSI + RAX*0x1],0x0 JS 0x00140fd0 LAB_00140f28: MOV RCX,qword ptr [RCX + 0x28] TEST byte ptr [RCX + RAX*0x1],0x1 JZ 0x0014111c MOV qword ptr [RBP + -0x40],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x60],XMM0 MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOVAPS xmmword ptr [RBP + -0x80],XMM0 CMP qword ptr [RBP + -0x30],0x2 JC 0x0014111c MOV R13,qword ptr [RBP + -0x40] MOV R12,qword ptr [R13 + 0x8] MOV R15B,0x4 MOV EDX,0x1 MOV EBX,0x8 LAB_00140f69: MOV qword ptr [RBP + -0x38],RDX MOV RCX,qword ptr [R13 + 0x10] MOV RDI,qword ptr [R13 + 0x30] MOV RAX,qword ptr [RDI + 0xb8] LEA RSI,[R14 + RBX*0x1] MOV RDX,R12 CALL qword ptr [RAX + 0x28] TEST EAX,EAX JLE 0x00141050 MOV EAX,EAX ADD R12,RAX MOV RDX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + RDX*0x8 + -0x80],R12 MOV RCX,qword ptr [R13 + 0x18] MOV RAX,qword ptr [R14 + RDX*0x8] MOV RSI,qword ptr [RCX + 0x28] AND EAX,0xfff TEST byte ptr [RSI + RAX*0x1],R15B JZ 0x0014106c INC RDX ADD R15B,R15B ADD RBX,0x8 CMP qword ptr [RBP + -0x30],RDX JNZ 0x00140f69 MOV RDX,qword ptr [RBP + -0x30] JMP 0x00141054 LAB_00140fd0: LEA RSI,[0x3536b0] CMP qword ptr [RDI],RSI JZ 0x00140f28 MOV ESI,dword ptr [RDI + 0x24] SHL ESI,0x8 MOVSXD R8,dword ptr [RDI + 0x28] MOVSXD RSI,ESI ADD RSI,R8 MOV qword ptr [R14 + 0x8],RSI MOV RCX,qword ptr [RCX + 0x28] MOV R8D,ESI AND R8D,0xfff TEST byte ptr [RCX + R8*0x1],0x40 MOV RCX,qword ptr [RDI + 0x18] JZ 0x00140f28 MOV R8,qword ptr [RCX + 0x18] TEST R8,R8 JLE 0x00140f28 MOV R12,qword ptr [RCX + 0x20] IMUL R8,R8,0x58 ADD R8,R12 LAB_00141029: CMP byte ptr [R12 + 0x52],0x0 JZ 0x00141042 CMP qword ptr [R12],RSI JNZ 0x00141042 CMP qword ptr [R12 + 0x8],RDX JZ 0x00141148 LAB_00141042: ADD R12,0x58 CMP R12,R8 JC 0x00141029 JMP 0x00140f28 LAB_00141050: MOV RDX,qword ptr [RBP + -0x38] LAB_00141054: CMP RDX,0x2 JC 0x0014111c MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RCX + 0x28] JMP 0x0014106f LAB_0014106c: INC RDX LAB_0014106f: LEA RDI,[RDX*0x8] MOV qword ptr [RBP + -0x48],RSI LAB_0014107b: MOV R8,RDX DEC RDX MOV RAX,qword ptr [R14 + R8*0x8 + -0x8] AND EAX,0xfff TEST byte ptr [RSI + RAX*0x1],0x2 JZ 0x0014110a MOV RAX,qword ptr [RCX + 0x18] TEST RAX,RAX JLE 0x0014110a MOV R12,qword ptr [RCX + 0x20] IMUL RAX,RAX,0x58 ADD RAX,R12 LEA RSI,[R8*0x8] MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RAX LAB_001410b9: CMP R8,0x5 JA 0x001410c6 CMP qword ptr [R12 + RDI*0x1],0x0 JNZ 0x00141101 LAB_001410c6: CMP byte ptr [R12 + 0x52],0x0 JNZ 0x00141101 MOV RDI,R12 MOV RSI,R14 MOV R15,RDX MOV RDX,qword ptr [RBP + -0x50] MOV R13,R14 MOV RBX,RCX MOV R14,R8 CALL 0x001242d0 MOV R8,R14 MOV RDI,qword ptr [RBP + -0x38] MOV RCX,RBX MOV RDX,R15 MOV R14,R13 TEST EAX,EAX MOV RAX,qword ptr [RBP + -0x30] JZ 0x00141131 LAB_00141101: ADD R12,0x58 CMP R12,RAX JC 0x001410b9 LAB_0014110a: ADD RDI,-0x8 CMP RDX,0x1 MOV RSI,qword ptr [RBP + -0x48] JA 0x0014107b LAB_0014111c: XOR R12D,R12D LAB_0014111f: MOV RAX,R12 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00141131: LEA RAX,[R12 + 0x32] MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBP + RDX*0x8 + -0x80] MOV qword ptr [RCX + 0x8],RAX JMP 0x0014111f LAB_00141148: LEA RAX,[R12 + 0x32] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x24],0x0 JMP 0x0014111f
long * my_uca_context_weight_find(long *param_1,long *param_2,ulong param_3) { uint uVar1; int iVar2; long *plVar3; long lVar4; ulong uVar5; ulong uVar6; ulong uVar7; long lVar8; long lVar9; long *plVar10; byte bVar11; long local_88 [7]; long local_50; long *local_48; ulong local_40; long *local_38; lVar9 = param_1[3]; uVar5 = (ulong)((uint)*param_2 & 0xfff); if ((*(char *)(*(long *)(lVar9 + 0x28) + uVar5) < '\0') && ((int4 *)*param_1 != &nochar)) { lVar8 = (long)(*(int *)((long)param_1 + 0x24) << 8) + (long)(int)param_1[5]; param_2[1] = lVar8; plVar10 = (long *)(lVar9 + 0x28); lVar9 = param_1[3]; if (((*(byte *)(*plVar10 + (ulong)((uint)lVar8 & 0xfff)) & 0x40) != 0) && (0 < *(long *)(lVar9 + 0x18))) { plVar10 = *(long **)(lVar9 + 0x20); plVar3 = plVar10 + *(long *)(lVar9 + 0x18) * 0xb; do { if (((*(char *)((long)plVar10 + 0x52) != '\0') && (*plVar10 == lVar8)) && (plVar10[1] == *param_2)) { *param_1 = (long)plVar10 + 0x32; *(int8 *)((long)param_1 + 0x24) = 0; return plVar10; } plVar10 = plVar10 + 0xb; } while (plVar10 < plVar3); } } if ((*(byte *)(*(long *)(lVar9 + 0x28) + uVar5) & 1) != 0) { local_88[4] = 0; local_88[5] = 0; local_88[2] = 0; local_88[3] = 0; local_88[0] = 0; local_88[1] = 0; if (1 < param_3) { lVar9 = param_1[1]; bVar11 = 4; uVar5 = 1; lVar8 = 8; local_48 = param_1; local_38 = (long *)param_3; do { local_40 = uVar5; uVar1 = (**(code **)(*(long *)(param_1[6] + 0xb8) + 0x28)) (param_1[6],(long)param_2 + lVar8,lVar9,param_1[2]); if ((int)uVar1 < 1) break; lVar9 = lVar9 + (ulong)uVar1; local_88[local_40] = lVar9; lVar4 = param_1[3]; local_50 = *(long *)(lVar4 + 0x28); if ((*(byte *)(local_50 + (ulong)((uint)param_2[local_40] & 0xfff)) & bVar11) == 0) { local_40 = local_40 + 1; goto LAB_0014106f; } uVar5 = local_40 + 1; bVar11 = bVar11 * '\x02'; lVar8 = lVar8 + 8; local_40 = (ulong)local_38; } while (local_38 != (long *)uVar5); if (1 < local_40) { lVar4 = local_48[3]; local_50 = *(long *)(lVar4 + 0x28); LAB_0014106f: uVar5 = local_40 * 8; uVar6 = local_40; do { uVar7 = uVar6 - 1; if (((*(byte *)(local_50 + (ulong)((uint)param_2[uVar6 - 1] & 0xfff)) & 2) != 0) && (0 < *(long *)(lVar4 + 0x18))) { plVar10 = *(long **)(lVar4 + 0x20); plVar3 = plVar10 + *(long *)(lVar4 + 0x18) * 0xb; local_88[6] = uVar6 * 8; local_40 = uVar5; local_38 = plVar3; do { if (((5 < uVar6) || (*(long *)((long)plVar10 + uVar5) == 0)) && ((*(char *)((long)plVar10 + 0x52) == '\0' && (iVar2 = bcmp(plVar10,param_2,local_88[6]), plVar3 = local_38, uVar5 = local_40, iVar2 == 0)))) { *local_48 = (long)plVar10 + 0x32; local_48[1] = local_88[uVar7]; return plVar10; } plVar10 = plVar10 + 0xb; } while (plVar10 < plVar3); } uVar5 = uVar5 + -8; uVar6 = uVar7; } while (1 < uVar7); } } } return (long *)0x0; }
2,003
set_max_sort_char
eloqsql/strings/ctype-simple.c
static void set_max_sort_char(struct charset_info_st *cs) { uchar max_char; uint i; if (!cs->sort_order) return; max_char=cs->sort_order[(uchar) cs->max_sort_char]; for (i= 0; i < 256; i++) { if ((uchar) cs->sort_order[i] > max_char) { max_char=(uchar) cs->sort_order[i]; cs->max_sort_char= i; } } }
O0
c
set_max_sort_char: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x58(%rax) jne 0x45205 jmp 0x45276 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq -0x8(%rbp), %rcx movq 0xa8(%rcx), %rcx movzbl %cl, %ecx movb (%rax,%rcx), %al movb %al, -0x9(%rbp) movl $0x0, -0x10(%rbp) cmpl $0x100, -0x10(%rbp) # imm = 0x100 jae 0x45276 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl -0x10(%rbp), %ecx movzbl (%rax,%rcx), %eax movzbl -0x9(%rbp), %ecx cmpl %ecx, %eax jle 0x45269 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl -0x10(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x9(%rbp) movl -0x10(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0x4526b movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x45228 popq %rbp retq nopl (%rax,%rax)
set_max_sort_char: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+58h], 0 jnz short loc_45205 jmp short loc_45276 loc_45205: mov rax, [rbp+var_8] mov rax, [rax+58h] mov rcx, [rbp+var_8] mov rcx, [rcx+0A8h] movzx ecx, cl mov al, [rax+rcx] mov [rbp+var_9], al mov [rbp+var_10], 0 loc_45228: cmp [rbp+var_10], 100h jnb short loc_45276 mov rax, [rbp+var_8] mov rax, [rax+58h] mov ecx, [rbp+var_10] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_9] cmp eax, ecx jle short loc_45269 mov rax, [rbp+var_8] mov rax, [rax+58h] mov ecx, [rbp+var_10] mov al, [rax+rcx] mov [rbp+var_9], al mov eax, [rbp+var_10] mov ecx, eax mov rax, [rbp+var_8] mov [rax+0A8h], rcx loc_45269: jmp short $+2 loc_4526B: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp short loc_45228 loc_45276: pop rbp retn
unsigned __int8 set_max_sort_char(long long a1) { unsigned __int8 result; // al unsigned int i; // [rsp+0h] [rbp-10h] unsigned __int8 v3; // [rsp+7h] [rbp-9h] result = a1; if ( *(_QWORD *)(a1 + 88) ) { result = *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*(_QWORD *)(a1 + 168)); v3 = result; for ( i = 0; i < 0x100; ++i ) { if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + i) > (int)v3 ) { v3 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + i); *(_QWORD *)(a1 + 168) = i; } result = i + 1; } } return result; }
set_max_sort_char: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x58],0x0 JNZ 0x00145205 JMP 0x00145276 LAB_00145205: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0xa8] MOVZX ECX,CL MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x9],AL MOV dword ptr [RBP + -0x10],0x0 LAB_00145228: CMP dword ptr [RBP + -0x10],0x100 JNC 0x00145276 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x9] CMP EAX,ECX JLE 0x00145269 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x10] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x9],AL MOV EAX,dword ptr [RBP + -0x10] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX LAB_00145269: JMP 0x0014526b LAB_0014526b: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x00145228 LAB_00145276: POP RBP RET
void set_max_sort_char(long param_1) { int4 local_18; int1 local_11; if (*(long *)(param_1 + 0x58) != 0) { local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (*(ulong *)(param_1 + 0xa8) & 0xff)); for (local_18 = 0; local_18 < 0x100; local_18 = local_18 + 1) { if (local_11 < *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18)) { local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18); *(ulong *)(param_1 + 0xa8) = (ulong)local_18; } } } return; }
2,004
my_mmssff_to_str(st_mysql_time const*, char*, unsigned int)
eloqsql/client/../sql-common/my_time.c
static int my_mmssff_to_str(const MYSQL_TIME *ltime, char *to, uint fsp) { char *pos= to; if (fsp == AUTO_SEC_PART_DIGITS) fsp= ltime->second_part ? TIME_SECOND_PART_DIGITS : 0; DBUG_ASSERT(fsp <= TIME_SECOND_PART_DIGITS); pos= fmt_number2((uint8) ltime->minute, pos); *pos++= ':'; pos= fmt_number2((uint8) ltime->second, pos); if (fsp) { *pos++= '.'; pos= fmt_usec((uint)sec_part_shift(ltime->second_part, fsp), pos, fsp); } return (int) (pos - to); }
O0
c
my_mmssff_to_str(st_mysql_time const*, char*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) cmpl $0x27, -0x14(%rbp) jne 0x4945a movq -0x8(%rbp), %rax movq 0x18(%rax), %rdx xorl %eax, %eax movl $0x6, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax movl %eax, -0x14(%rbp) jmp 0x4945c jmp 0x4945e movq -0x8(%rbp), %rax movl 0x10(%rax), %eax movq -0x20(%rbp), %rsi movzbl %al, %edi callq 0x493e0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb $0x3a, (%rax) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movq -0x20(%rbp), %rsi movzbl %al, %edi callq 0x493e0 movq %rax, -0x20(%rbp) cmpl $0x0, -0x14(%rbp) je 0x494d8 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb $0x2e, (%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi movl -0x14(%rbp), %esi callq 0x49a60 movl %eax, %edi movq -0x20(%rbp), %rsi movl -0x14(%rbp), %edx callq 0x49900 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZL16my_mmssff_to_strPK13st_mysql_timePcj: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_10] mov [rbp+var_20], rax cmp [rbp+var_14], 27h ; ''' jnz short loc_4945A mov rax, [rbp+var_8] mov rdx, [rax+18h] xor eax, eax mov ecx, 6 cmp rdx, 0 cmovnz eax, ecx mov [rbp+var_14], eax loc_4945A: jmp short $+2 loc_4945C: jmp short $+2 loc_4945E: mov rax, [rbp+var_8] mov eax, [rax+10h] mov rsi, [rbp+var_20]; char * movzx edi, al; unsigned __int8 call _ZL11fmt_number2hPc; fmt_number2(uchar,char *) mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov byte ptr [rax], 3Ah ; ':' mov rax, [rbp+var_8] mov eax, [rax+14h] mov rsi, [rbp+var_20]; char * movzx edi, al; unsigned __int8 call _ZL11fmt_number2hPc; fmt_number2(uchar,char *) mov [rbp+var_20], rax cmp [rbp+var_14], 0 jz short loc_494D8 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov byte ptr [rax], 2Eh ; '.' mov rax, [rbp+var_8] mov rdi, [rax+18h]; __int64 mov esi, [rbp+var_14]; unsigned int call _ZL14sec_part_shiftxj; sec_part_shift(long long,uint) mov edi, eax; unsigned int mov rsi, [rbp+var_20]; char * mov edx, [rbp+var_14]; unsigned int call _ZL8fmt_usecjPcj; fmt_usec(uint,char *,uint) mov [rbp+var_20], rax loc_494D8: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx add rsp, 20h pop rbp retn
signed long long my_mmssff_to_str(long long a1, char *a2, unsigned int a3) { int v3; // eax char *v4; // rax unsigned int v5; // eax char *v7; // [rsp+0h] [rbp-20h] unsigned int v8; // [rsp+Ch] [rbp-14h] v8 = a3; if ( a3 == 39 ) { v3 = 0; if ( *(_QWORD *)(a1 + 24) ) v3 = 6; v8 = v3; } v4 = fmt_number2(*(_DWORD *)(a1 + 16), a2); *v4 = 58; v7 = fmt_number2(*(_DWORD *)(a1 + 20), v4 + 1); if ( v8 ) { *v7 = 46; v5 = sec_part_shift(*(_QWORD *)(a1 + 24), v8); v7 = (char *)fmt_usec(v5, v7 + 1, v8); } return v7 - a2; }
my_mmssff_to_str: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x14],0x27 JNZ 0x0014945a MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x18] XOR EAX,EAX MOV ECX,0x6 CMP RDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x14],EAX LAB_0014945a: JMP 0x0014945c LAB_0014945c: JMP 0x0014945e LAB_0014945e: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x20] MOVZX EDI,AL CALL 0x001493e0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV byte ptr [RAX],0x3a MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV RSI,qword ptr [RBP + -0x20] MOVZX EDI,AL CALL 0x001493e0 MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001494d8 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV byte ptr [RAX],0x2e MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] MOV ESI,dword ptr [RBP + -0x14] CALL 0x00149a60 MOV EDI,EAX MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x14] CALL 0x00149900 MOV qword ptr [RBP + -0x20],RAX LAB_001494d8: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX ADD RSP,0x20 POP RBP RET
/* my_mmssff_to_str(st_mysql_time const*, char*, unsigned int) */ long my_mmssff_to_str(st_mysql_time *param_1,char *param_2,uint param_3) { uint uVar1; int1 *puVar2; int1 *local_28; uint local_1c; local_1c = param_3; if ((param_3 == 0x27) && (local_1c = 0, *(long *)(param_1 + 0x18) != 0)) { local_1c = 6; } puVar2 = (int1 *)fmt_number2((uchar)*(int4 *)(param_1 + 0x10),param_2); *puVar2 = 0x3a; local_28 = (int1 *)fmt_number2((uchar)*(int4 *)(param_1 + 0x14),puVar2 + 1); if (local_1c != 0) { *local_28 = 0x2e; uVar1 = sec_part_shift(*(longlong *)(param_1 + 0x18),local_1c); local_28 = (int1 *)fmt_usec(uVar1,local_28 + 1,local_1c); } return (long)local_28 - (long)param_2; }
2,005
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
llama.cpp/common/chat.cpp
bool common_chat_verify_template(const std::string & tmpl, bool use_jinja) { if (use_jinja) { try { common_chat_msg msg; msg.role = "user"; msg.content = "test"; auto tmpls = common_chat_templates_init(/* model= */ nullptr, tmpl); common_chat_templates_inputs inputs; inputs.messages = {msg}; common_chat_templates_apply(tmpls.get(), inputs); return true; } catch (const std::exception & e) { LOG_ERR("%s: failed to apply template: %s\n", __func__, e.what()); return false; } } llama_chat_message chat[] = {{"user", "test"}}; const int res = llama_chat_apply_template(tmpl.c_str(), chat, 1, true, nullptr, 0); return res >= 0; }
O3
cpp
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %rdi, %rbx testl %esi, %esi je 0x96a94 leaq 0x170(%rsp), %rax movq %rax, -0x10(%rax) xorl %ecx, %ecx movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x190(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x1e0(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x40(%rax) movups %xmm0, -0x30(%rax) movups %xmm0, -0x20(%rax) movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x200(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x220(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x8b8eb(%rip), %rcx # 0x122147 leaq 0x160(%rsp), %rdi movl $0x4, %r8d xorl %esi, %esi xorl %edx, %edx callq 0x21940 leaq 0x180(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x856fe(%rip), %rcx # 0x11bf84 movl $0x4, %r8d xorl %esi, %esi callq 0x21940 leaq 0xa0(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x8c1fb(%rip), %rdx # 0x122aa1 leaq 0x90(%rsp), %rdi movq %rdx, %rsi callq 0x2c720 leaq 0x20(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x8c1da(%rip), %rdx # 0x122aa1 leaq 0x10(%rsp), %rdi movq %rdx, %rsi callq 0x2c720 leaq 0x8(%rsp), %rdi leaq 0x90(%rsp), %rcx leaq 0x10(%rsp), %r8 xorl %esi, %esi movq %rbx, %rdx callq 0x96bde movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x96907 movq 0x20(%rsp), %rsi incq %rsi callq 0x211a0 movq 0x90(%rsp), %rdi cmpq %r15, %rdi je 0x96924 movq 0xa0(%rsp), %rsi incq %rsi callq 0x211a0 xorl %eax, %eax leaq 0x38(%rsp), %r14 movq %rax, -0x18(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x28(%r14) movq %r14, -0x10(%r14) movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movw $0x101, 0x10(%r12) # imm = 0x101 movaps %xmm0, 0x18(%r12) movups %xmm0, 0x25(%r12) movb $0x1, 0x35(%r12) leaq 0x90(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0xb4df8 leaq 0x160(%rsp), %rdx leaq 0x10(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xd5a1a leaq 0x90(%rsp), %rdi callq 0xb453e movq 0x8(%rsp), %r15 leaq 0x230(%rsp), %rdi leaq 0x10(%rsp), %rdx movq %r15, %rsi callq 0x9720f leaq 0x2b0(%rsp), %rdi callq 0x2a4f6 leaq 0x298(%rsp), %rdi callq 0x2a4f6 leaq 0x280(%rsp), %rbx movq %rbx, %rdi callq 0x2aa90 movq -0x28(%rbx), %rdi leaq 0x268(%rsp), %rax cmpq %rax, %rdi je 0x96a10 movq 0x268(%rsp), %rsi incq %rsi callq 0x211a0 leaq 0x70(%rsp), %rbx leaq 0x248(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x96a36 movq 0x248(%rsp), %rsi incq %rsi callq 0x211a0 movq %rbx, %rdi callq 0xb4dc8 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x96a55 movq 0x58(%rsp), %rsi incq %rsi callq 0x211a0 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x96a6c movq 0x38(%rsp), %rsi incq %rsi callq 0x211a0 leaq 0x10(%rsp), %rdi callq 0xb469a testq %r15, %r15 je 0x96a83 movq %r15, %rdi callq 0x99d5b leaq 0x160(%rsp), %rdi callq 0xb453e movb $0x1, %al jmp 0x96ac3 movaps 0xcd785(%rip), %xmm0 # 0x164220 leaq 0x160(%rsp), %rsi movaps %xmm0, (%rsi) movq (%rbx), %rdi movl $0x1, %edx movl $0x1, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x218a0 testl %eax, %eax setns %al addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rdx, %r14 movq %rax, %rbx jmp 0x96afa movq %rdx, %r14 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0xb453e jmp 0x96af5 movq %rdx, %r14 movq %rax, %rbx movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rdi callq 0xb4ff0 testq %r15, %r15 je 0x96b5f movq %r15, %rdi callq 0x99d5b jmp 0x96b5f movq %rdx, %r14 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x96b38 movq 0x20(%rsp), %rsi incq %rsi callq 0x211a0 jmp 0x96b38 movq %rdx, %r14 movq %rax, %rbx movq 0x90(%rsp), %rdi cmpq %r15, %rdi je 0x96b5f movq 0xa0(%rsp), %rsi incq %rsi callq 0x211a0 jmp 0x96b5f jmp 0x96b59 movq %rdx, %r14 movq %rax, %rbx leaq 0x160(%rsp), %rdi callq 0xb453e cmpl $0x1, %r14d jne 0x96bce movq %rbx, %rdi callq 0x210c0 movq %rax, %rbx leaq 0xd0f14(%rip), %rax # 0x167a98 cmpl $0x0, (%rax) js 0x96bba callq 0x11083f movq %rax, %r14 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x8b5ab(%rip), %rdx # 0x12214c leaq 0x8b5c6(%rip), %rcx # 0x12216e movq %r14, %rdi movl $0x4, %esi movq %rax, %r8 xorl %eax, %eax callq 0x1108dc callq 0x21ed0 xorl %eax, %eax jmp 0x96ac3 movq %rax, %rbx callq 0x21ed0 movq %rbx, %rdi callq 0x21c10 movq %rax, %rdi callq 0x2a927
_Z27common_chat_verify_templateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push r15 push r14 push r12 push rbx sub rsp, 2C8h mov rbx, rdi test esi, esi jz loc_96A94 lea rax, [rsp+2E8h+var_178] mov [rax-10h], rax xor ecx, ecx mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_158] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_108] xorps xmm0, xmm0 movups xmmword ptr [rax-40h], xmm0 movups xmmword ptr [rax-30h], xmm0 movups xmmword ptr [rax-20h], xmm0 mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_E8] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_C8] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rcx, aUser; "user" lea rdi, [rsp+2E8h+var_188] mov r8d, 4 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea rdi, [rsp+2E8h+var_168] mov rdx, [rdi+8] lea rcx, aLatest+2; "test" mov r8d, 4 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea r15, [rsp+2E8h+var_248] mov [r15-10h], r15 lea rdx, aExampleToolCal+1Dh; "" lea rdi, [rsp+2E8h+var_258] 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 r12, [rsp+2E8h+var_2C8] mov [r12-10h], r12 lea rdx, aExampleToolCal+1Dh; "" lea rdi, [rsp+2E8h+var_2D8] 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, [rsp+2E8h+var_2E0] lea rcx, [rsp+2E8h+var_258] lea r8, [rsp+2E8h+var_2D8] xor esi, esi mov rdx, rbx call _Z26common_chat_templates_initPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_; common_chat_templates_init(llama_model const*,std::string const&,std::string const&,std::string const&) mov rdi, [rsp+2E8h+var_2D8]; void * cmp rdi, r12 jz short loc_96907 mov rsi, [rsp+2E8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96907: mov rdi, [rsp+2E8h+var_258]; void * cmp rdi, r15 jz short loc_96924 mov rsi, [rsp+2E8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96924: xor eax, eax lea r14, [rsp+2E8h+var_2B0] mov [r14-18h], rax xorps xmm0, xmm0 movaps xmmword ptr [r14-28h], xmm0 mov [r14-10h], r14 mov [r14-8], rax mov [r14], al lea r12, [rsp+2E8h+var_290] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov word ptr [r12+10h], 101h movaps xmmword ptr [r12+18h], xmm0 movups xmmword ptr [r12+25h], xmm0 mov byte ptr [r12+35h], 1 lea rdi, [rsp+2E8h+var_258]; this lea rsi, [rsp+2E8h+var_188]; common_chat_msg * call _ZN15common_chat_msgC2ERKS_; common_chat_msg::common_chat_msg(common_chat_msg const&) lea rdx, [rsp+2E8h+var_188] lea rdi, [rsp+2E8h+var_2D8] lea rsi, [rsp+2E8h+var_258] call _ZNSt6vectorI15common_chat_msgSaIS0_EE13_M_assign_auxIPKS0_EEvT_S6_St20forward_iterator_tag; std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(common_chat_msg const*,common_chat_msg const*,std::forward_iterator_tag) lea rdi, [rsp+2E8h+var_258]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov r15, [rsp+2E8h+var_2E0] lea rdi, [rsp+2E8h+var_B8] lea rdx, [rsp+2E8h+var_2D8] mov rsi, r15 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea rdi, [rsp+2E8h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+2E8h+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rbx, [rsp+2E8h+var_68] mov rdi, rbx call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [rbx-28h]; void * lea rax, [rsp+2E8h+var_80] cmp rdi, rax jz short loc_96A10 mov rsi, [rsp+2E8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96A10: lea rbx, [rsp+2E8h+var_278] lea rax, [rsp+2E8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_96A36 mov rsi, [rsp+2E8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96A36: mov rdi, rbx call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector() mov rdi, [rsp+2E8h+var_2A0]; void * cmp rdi, r12 jz short loc_96A55 mov rsi, [rsp+2E8h+var_290] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96A55: mov rdi, [rsp+2E8h+var_2C0]; void * cmp rdi, r14 jz short loc_96A6C mov rsi, [rsp+2E8h+var_2B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_96A6C: lea rdi, [rsp+2E8h+var_2D8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() test r15, r15 jz short loc_96A83 mov rdi, r15; void * call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *) loc_96A83: lea rdi, [rsp+2E8h+var_188]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov al, 1 jmp short loc_96AC3 loc_96A94: movaps xmm0, xmmword ptr cs:off_164220; "user" lea rsi, [rsp+2E8h+var_188] movaps xmmword ptr [rsi], xmm0 mov rdi, [rbx] mov edx, 1 mov ecx, 1 xor r8d, r8d xor r9d, r9d call _llama_chat_apply_template test eax, eax setns al loc_96AC3: add rsp, 2C8h pop rbx pop r12 pop r14 pop r15 retn mov r14, rdx mov rbx, rax jmp short loc_96AFA mov r14, rdx mov rbx, rax lea rdi, [rsp+2E8h+var_258]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() jmp short loc_96AF5 mov r14, rdx mov rbx, rax loc_96AF5: mov r15, [rsp+2E8h+var_2E0] loc_96AFA: lea rdi, [rsp+2E8h+var_2D8]; this call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs() test r15, r15 jz short loc_96B5F mov rdi, r15; void * call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *) jmp short loc_96B5F mov r14, rdx mov rbx, rax mov rdi, [rsp+2E8h+var_2D8]; void * cmp rdi, r12 jz short loc_96B38 mov rsi, [rsp+2E8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_96B38 mov r14, rdx mov rbx, rax loc_96B38: mov rdi, [rsp+2E8h+var_258]; void * cmp rdi, r15 jz short loc_96B5F mov rsi, [rsp+2E8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_96B5F jmp short $+2 loc_96B59: mov r14, rdx mov rbx, rax loc_96B5F: lea rdi, [rsp+2E8h+var_188]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14d, 1 jnz short loc_96BCE mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_96BBA call _Z15common_log_mainv; common_log_main(void) mov r14, rax mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdx, aSFailedToApply; "%s: failed to apply template: %s\n" lea rcx, aCommonChatVeri; "common_chat_verify_template" mov rdi, r14 mov esi, 4 mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_96BBA: call ___cxa_end_catch xor eax, eax jmp loc_96AC3 mov rbx, rax call ___cxa_end_catch loc_96BCE: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
bool common_chat_verify_template(_QWORD *a1, int a2) { void *v2; // r15 void *v4; // [rsp+8h] [rbp-2E0h] BYREF __int128 v5; // [rsp+10h] [rbp-2D8h] BYREF long long v6; // [rsp+20h] [rbp-2C8h] BYREF void *v7; // [rsp+28h] [rbp-2C0h] long long v8; // [rsp+30h] [rbp-2B8h] _QWORD v9[2]; // [rsp+38h] [rbp-2B0h] BYREF void *v10; // [rsp+48h] [rbp-2A0h] long long v11; // [rsp+50h] [rbp-298h] _QWORD v12[2]; // [rsp+58h] [rbp-290h] BYREF __int16 v13; // [rsp+68h] [rbp-280h] _BYTE v14[32]; // [rsp+70h] [rbp-278h] BYREF void *v15[2]; // [rsp+90h] [rbp-258h] BYREF _QWORD v16[24]; // [rsp+A0h] [rbp-248h] BYREF __int128 v17; // [rsp+160h] [rbp-188h] BYREF char v18; // [rsp+170h] [rbp-178h] BYREF char *v19; // [rsp+180h] [rbp-168h] BYREF long long v20; // [rsp+188h] [rbp-160h] char v21; // [rsp+190h] [rbp-158h] BYREF __int128 v22; // [rsp+1A0h] [rbp-148h] __int128 v23; // [rsp+1B0h] [rbp-138h] __int128 v24; // [rsp+1C0h] [rbp-128h] char *v25; // [rsp+1D0h] [rbp-118h] long long v26; // [rsp+1D8h] [rbp-110h] char v27; // [rsp+1E0h] [rbp-108h] BYREF char *v28; // [rsp+1F0h] [rbp-F8h] long long v29; // [rsp+1F8h] [rbp-F0h] char v30; // [rsp+200h] [rbp-E8h] BYREF char *v31; // [rsp+210h] [rbp-D8h] long long v32; // [rsp+218h] [rbp-D0h] char v33; // [rsp+220h] [rbp-C8h] BYREF _BYTE v34[8]; // [rsp+230h] [rbp-B8h] BYREF long long *v35; // [rsp+238h] [rbp-B0h] long long v36; // [rsp+248h] [rbp-A0h] BYREF long long *v37; // [rsp+258h] [rbp-90h] long long v38; // [rsp+268h] [rbp-80h] BYREF _BYTE v39[24]; // [rsp+280h] [rbp-68h] BYREF _BYTE v40[24]; // [rsp+298h] [rbp-50h] BYREF _BYTE v41[56]; // [rsp+2B0h] [rbp-38h] BYREF if ( a2 ) { *(_QWORD *)&v17 = &v18; *((_QWORD *)&v17 + 1) = 0LL; v18 = 0; v19 = &v21; v20 = 0LL; v21 = 0; v22 = 0LL; v23 = 0LL; v24 = 0LL; v25 = &v27; v26 = 0LL; v27 = 0; v28 = &v30; v29 = 0LL; v30 = 0; v31 = &v33; v32 = 0LL; v33 = 0; std::string::_M_replace(&v17, 0LL, 0LL, "user", 4LL); std::string::_M_replace(&v19, 0LL, v20, "test", 4LL); v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "", (long long)""); *(_QWORD *)&v5 = &v6; std::string::_M_construct<char const*>((long long)&v5, "", (long long)""); common_chat_templates_init(&v4, 0LL, a1, v15, &v5); if ( (long long *)v5 != &v6 ) operator delete((void *)v5, v6 + 1); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); v6 = 0LL; v5 = 0LL; v7 = v9; v8 = 0LL; LOBYTE(v9[0]) = 0; v10 = v12; v11 = 0LL; LOBYTE(v12[0]) = 0; v13 = 257; memset(v14, 0, 29); v14[29] = 1; common_chat_msg::common_chat_msg((common_chat_msg *)v15, (const common_chat_msg *)&v17); std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(&v5, v15, &v17); common_chat_msg::~common_chat_msg((common_chat_msg *)v15); v2 = v4; common_chat_templates_apply(v34, v4, &v5); std::vector<std::string>::~vector((long long)v41); std::vector<std::string>::~vector((long long)v40); std::vector<common_grammar_trigger>::~vector((long long)v39); if ( v37 != &v38 ) operator delete(v37, v38 + 1); if ( v35 != &v36 ) operator delete(v35, v36 + 1); std::vector<common_chat_tool>::~vector(v14); if ( v10 != v12 ) operator delete(v10, v12[0] + 1LL); if ( v7 != v9 ) operator delete(v7, v9[0] + 1LL); std::vector<common_chat_msg>::~vector(&v5); if ( v2 ) common_chat_templates_free(v2); common_chat_msg::~common_chat_msg((common_chat_msg *)&v17); return 1; } else { v17 = *(_OWORD *)&off_164220; return (int)llama_chat_apply_template(*a1, &v17, 1LL, 1LL, 0LL, 0LL) >= 0; } }
common_chat_verify_template: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RBX,RDI TEST ESI,ESI JZ 0x00196a94 LEA RAX,[RSP + 0x170] MOV qword ptr [RAX + -0x10],RAX XOR ECX,ECX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x190] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x1e0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x40],XMM0 MOVUPS xmmword ptr [RAX + -0x30],XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x200] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x220] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LAB_00196855: LEA RCX,[0x222147] LEA RDI,[RSP + 0x160] MOV R8D,0x4 XOR ESI,ESI XOR EDX,EDX CALL 0x00121940 LEA RDI,[RSP + 0x180] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x21bf84] MOV R8D,0x4 XOR ESI,ESI CALL 0x00121940 LEA R15,[RSP + 0xa0] MOV qword ptr [R15 + -0x10],R15 LAB_0019689f: LEA RDX,[0x222aa1] LEA RDI,[RSP + 0x90] MOV RSI,RDX CALL 0x0012c720 LEA R12,[RSP + 0x20] MOV qword ptr [R12 + -0x10],R12 LAB_001968c0: LEA RDX,[0x222aa1] LEA RDI,[RSP + 0x10] MOV RSI,RDX CALL 0x0012c720 LAB_001968d4: LEA RDI,[RSP + 0x8] LEA RCX,[RSP + 0x90] LEA R8,[RSP + 0x10] XOR ESI,ESI MOV RDX,RBX CALL 0x00196bde MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x00196907 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001211a0 LAB_00196907: MOV RDI,qword ptr [RSP + 0x90] CMP RDI,R15 JZ 0x00196924 MOV RSI,qword ptr [RSP + 0xa0] INC RSI CALL 0x001211a0 LAB_00196924: XOR EAX,EAX LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x18],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x28],XMM0 MOV qword ptr [R14 + -0x10],R14 MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV word ptr [R12 + 0x10],0x101 MOVAPS xmmword ptr [R12 + 0x18],XMM0 MOVUPS xmmword ptr [R12 + 0x25],XMM0 MOV byte ptr [R12 + 0x35],0x1 LAB_0019696f: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x160] CALL 0x001b4df8 LEA RDX,[RSP + 0x160] LAB_0019698c: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x90] CALL 0x001d5a1a LEA RDI,[RSP + 0x90] CALL 0x001b453e MOV R15,qword ptr [RSP + 0x8] LAB_001969b0: LEA RDI,[RSP + 0x230] LEA RDX,[RSP + 0x10] MOV RSI,R15 CALL 0x0019720f LAB_001969c5: LEA RDI,[RSP + 0x2b0] CALL 0x0012a4f6 LEA RDI,[RSP + 0x298] CALL 0x0012a4f6 LEA RBX,[RSP + 0x280] MOV RDI,RBX CALL 0x0012aa90 MOV RDI,qword ptr [RBX + -0x28] LEA RAX,[RSP + 0x268] CMP RDI,RAX JZ 0x00196a10 MOV RSI,qword ptr [RSP + 0x268] INC RSI CALL 0x001211a0 LAB_00196a10: LEA RBX,[RSP + 0x70] LEA RAX,[RSP + 0x248] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00196a36 MOV RSI,qword ptr [RSP + 0x248] INC RSI CALL 0x001211a0 LAB_00196a36: MOV RDI,RBX CALL 0x001b4dc8 MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x00196a55 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001211a0 LAB_00196a55: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x00196a6c MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001211a0 LAB_00196a6c: LEA RDI,[RSP + 0x10] CALL 0x001b469a TEST R15,R15 JZ 0x00196a83 MOV RDI,R15 CALL 0x00199d5b LAB_00196a83: LEA RDI,[RSP + 0x160] CALL 0x001b453e MOV AL,0x1 JMP 0x00196ac3 LAB_00196a94: MOVAPS XMM0,xmmword ptr [0x00264220] LEA RSI,[RSP + 0x160] MOVAPS xmmword ptr [RSI],XMM0 MOV RDI,qword ptr [RBX] MOV EDX,0x1 MOV ECX,0x1 XOR R8D,R8D XOR R9D,R9D CALL 0x001218a0 TEST EAX,EAX SETNS AL LAB_00196ac3: ADD RSP,0x2c8 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_verify_template(std::__cxx11::string const&, bool) */ bool common_chat_verify_template(string *param_1,bool param_2) { int iVar1; int7 in_register_00000031; bool bVar2; common_chat_templates_inputs *local_2e0; long *local_2d8; int8 uStack_2d0; long local_2c8; int1 *local_2c0; int8 local_2b8; int1 local_2b0; int7 uStack_2af; int1 *local_2a0; int8 local_298; int1 local_290; int7 uStack_28f; int2 local_280; int8 local_278; int5 uStack_270; int3 uStack_26b; int5 uStack_268; int8 uStack_263; int1 local_25b; long *local_258 [2]; long local_248 [24]; int8 local_188; int8 uStack_180; int1 local_178 [16]; int1 *local_168; char *local_160; int1 local_158 [16]; int8 local_148; int8 uStack_140; int8 local_138; int8 uStack_130; int8 local_128; int8 uStack_120; int1 *local_118; int8 local_110; int1 local_108 [16]; int1 *local_f8; int8 local_f0; int1 local_e8 [16]; int1 *local_d8; int8 local_d0; int1 local_c8 [16]; common_chat_templates local_b8 [8]; long *local_b0; long local_a0 [2]; long *local_90; long local_80 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_68 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_50 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_38 [24]; if ((int)CONCAT71(in_register_00000031,param_2) == 0) { local_188 = (int1 *)CONCAT44(PTR_DAT_00264220._4_4_,PTR_DAT_00264220._0_4_); uStack_180 = CONCAT44(PTR_s_test_00264228._4_4_,PTR_s_test_00264228._0_4_); iVar1 = llama_chat_apply_template(*(int8 *)param_1,&local_188,1,1,0,0); bVar2 = -1 < iVar1; } else { local_188 = local_178; uStack_180 = 0; local_178[0] = 0; local_168 = local_158; local_160 = (char *)0x0; local_158[0] = 0; local_118 = local_108; local_148 = 0; uStack_140 = 0; local_138 = 0; uStack_130 = 0; local_128 = 0; uStack_120 = 0; local_110 = 0; local_108[0] = 0; local_f8 = local_e8; local_f0 = 0; local_e8[0] = 0; local_d8 = local_c8; local_d0 = 0; local_c8[0] = 0; /* try { // try from 00196855 to 00196892 has its CatchHandler @ 00196b59 */ std::__cxx11::string::_M_replace((ulong)&local_188,0,(char *)0x0,0x222147); std::__cxx11::string::_M_replace((ulong)&local_168,0,local_160,0x21bf84); /* try { // try from 0019689f to 001968b5 has its CatchHandler @ 00196b57 */ local_258[0] = local_248; std::__cxx11::string::_M_construct<char_const*>(local_258,""); /* try { // try from 001968c0 to 001968d3 has its CatchHandler @ 00196b32 */ local_2d8 = &local_2c8; std::__cxx11::string::_M_construct<char_const*>(&local_2d8); /* try { // try from 001968d4 to 001968ef has its CatchHandler @ 00196b13 */ common_chat_templates_init((llama_model *)&local_2e0,(string *)0x0,param_1,(string *)local_258); if (local_2d8 != &local_2c8) { operator_delete(local_2d8,local_2c8 + 1); } if (local_258[0] != local_248) { operator_delete(local_258[0],local_248[0] + 1); } local_2c8 = 0; local_2d8 = (long *)0x0; uStack_2d0 = 0; local_2b8 = 0; local_2b0 = 0; local_298 = 0; local_290 = 0; local_280 = 0x101; local_278 = 0; uStack_270 = 0; uStack_26b = 0; uStack_268 = 0; uStack_263 = 0; local_25b = 1; /* try { // try from 0019696f to 00196983 has its CatchHandler @ 00196aef */ local_2c0 = &local_2b0; local_2a0 = &local_290; common_chat_msg::common_chat_msg((common_chat_msg *)local_258,(common_chat_msg *)&local_188); /* try { // try from 0019698c to 0019699d has its CatchHandler @ 00196ada */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>:: _M_assign_aux<common_chat_msg_const*>(&local_2d8,local_258,&local_188); common_chat_msg::~common_chat_msg((common_chat_msg *)local_258); /* try { // try from 001969b0 to 001969c4 has its CatchHandler @ 00196ad2 */ common_chat_templates_apply(local_b8,local_2e0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_38); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_50); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_68); if (local_90 != local_80) { operator_delete(local_90,local_80[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector ((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_278); if (local_2a0 != &local_290) { operator_delete(local_2a0,CONCAT71(uStack_28f,local_290) + 1); } if (local_2c0 != &local_2b0) { operator_delete(local_2c0,CONCAT71(uStack_2af,local_2b0) + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_2d8); if (local_2e0 != (common_chat_templates_inputs *)0x0) { common_chat_templates_free((common_chat_templates *)local_2e0); } common_chat_msg::~common_chat_msg((common_chat_msg *)&local_188); bVar2 = true; } return bVar2; }
2,006
std::hash<minja::Value>::operator()(minja::Value const&) const
llama.cpp/common/minja/minja.hpp
size_t operator()(const minja::Value & v) const { if (!v.is_hashable()) throw std::runtime_error("Unsupported type for hashing: " + v.dump()); return std::hash<json>()(v.get<json>()); }
O3
cpp
std::hash<minja::Value>::operator()(minja::Value const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 cmpq $0x0, 0x10(%rsi) jne 0xc7fc6 cmpq $0x0, 0x20(%r14) jne 0xc7fc6 cmpq $0x0, 0x30(%r14) jne 0xc7fc6 movq %rsp, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0xc80ae movq %rbx, %rdi callq 0xc85d5 movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x84b96 movq %r14, %rdi callq 0x892b0 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x20650 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb5b3c leaq 0x57d74(%rip), %rsi # 0x11fd62 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xaf3dc movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x20470 xorl %ebp, %ebp movq 0x99fae(%rip), %rsi # 0x161fc0 movq 0x99f67(%rip), %rdx # 0x161f80 movq %rbx, %rdi callq 0x20a50 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc803f movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc805a movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xc8084 jmp 0xc80a6 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc8084 movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xc8084 movq %rax, %r14 movq %rbx, %rdi callq 0x20f10 jmp 0xc80a6 movq %rax, %r14 movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x84b96 movq %rbx, %rdi callq 0x892b0 movq %r14, %rdi callq 0x20af0
_ZNKSt4hashIN5minja5ValueEEclERKS1_: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi cmp qword ptr [rsi+10h], 0 jnz short loc_C7FC6 cmp qword ptr [r14+20h], 0 jnz short loc_C7FC6 cmp qword ptr [r14+30h], 0 jnz short loc_C7FC6 mov rbx, rsp mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_C7FC6: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnsupportedTyp; "Unsupported type for hashing: " mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C803F mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C803F: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C805A mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C805A: test bpl, bpl jnz short loc_C8084 jmp short loc_C80A6 mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C8084 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C8084 mov r14, rax loc_C8084: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_C80A6 mov r14, rax mov rbx, rsp mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_C80A6: mov rdi, r14 call __Unwind_Resume
long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2) { long long v2; // rbx void *exception; // rbx _QWORD v5[2]; // [rsp+0h] [rbp-58h] BYREF _BYTE v6[16]; // [rsp+20h] [rbp-38h] BYREF if ( a2[2] || a2[4] || a2[6] ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>(v5, (long long)"Unsupported type for hashing: ", (long long)v6); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::get<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>>( v5, a2); v2 = nlohmann::json_abi_v3_11_3::detail::hash<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>>(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5); return v2; }
operator(): PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001c7fc6 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x001c7fc6 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x001c7fc6 MOV RBX,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x001c80ae LAB_001c7f9a: MOV RDI,RBX CALL 0x001c85d5 LAB_001c7fa2: MOV RBX,RAX MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x00184b96 MOV RDI,R14 CALL 0x001892b0 MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001c7fc6: MOV EDI,0x10 CALL 0x00120650 MOV RBX,RAX LAB_001c7fd3: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b5b3c LAB_001c7fe7: LEA RSI,[0x21fd62] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001af3dc MOV BPL,0x1 LAB_001c7ffe: MOV RSI,RSP MOV RDI,RBX CALL 0x00120470 XOR EBP,EBP MOV RSI,qword ptr [0x00261fc0] MOV RDX,qword ptr [0x00261f80] MOV RDI,RBX CALL 0x00120a50
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1) { ulong uVar1; runtime_error *this_00; basic_json abStack_58 [32]; int1 local_38 [32]; if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { minja::Value:: get<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>> (); /* try { // try from 001c7f9a to 001c7fa1 has its CatchHandler @ 001c808e */ uVar1 = nlohmann::json_abi_v3_11_3::detail:: hash<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>> (abStack_58); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(abStack_58,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)abStack_58); return uVar1; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c7fd3 to 001c7fe6 has its CatchHandler @ 001c8081 */ minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0)); /* try { // try from 001c7fe7 to 001c7ffa has its CatchHandler @ 001c8061 */ operator+((char *)abStack_58,(string *)"Unsupported type for hashing: "); /* try { // try from 001c7ffe to 001c8020 has its CatchHandler @ 001c8021 */ std::runtime_error::runtime_error(this_00,(string *)abStack_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80); }
2,007
google::protobuf::OneofOptions::ByteSizeLong() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
size_t OneofOptions::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofOptions) size_t total_size = 0; total_size += _impl_._extensions_.ByteSize(); uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; total_size += 2UL * this->_internal_uninterpreted_option_size(); for (const auto& msg : this->_impl_.uninterpreted_option_) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); }
O0
cpp
google::protobuf::OneofOptions::ByteSizeLong() const: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x8(%rsp) movq $0x0, 0x38(%rsp) addq $0x10, %rdi callq 0x1a13c0 movq 0x8(%rsp), %rdi addq 0x38(%rsp), %rax movq %rax, 0x38(%rsp) movl $0x0, 0x34(%rsp) callq 0x9fc60 movl %eax, %ecx movq 0x8(%rsp), %rax movslq %ecx, %rcx shlq %rcx addq 0x38(%rsp), %rcx movq %rcx, 0x38(%rsp) addq $0x10, %rax addq $0x18, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0xd6d40 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0xd6d80 movq %rax, 0x18(%rsp) leaq 0x20(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xd6de0 testb $0x1, %al jne 0xc4008 jmp 0xc4037 leaq 0x20(%rsp), %rdi callq 0xd6e00 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi callq 0xd6e20 addq 0x38(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x20(%rsp), %rdi callq 0xd6e40 jmp 0xc3ff3 movq 0x8(%rsp), %rdi movq 0x38(%rsp), %rsi movq %rdi, %rdx addq $0x10, %rdx addq $0x30, %rdx callq 0x13aa50 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZNK6google8protobuf12OneofOptions12ByteSizeLongEv: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rdi, [rsp+48h+var_8] mov [rsp+48h+var_40], rdi mov [rsp+48h+var_10], 0 add rdi, 10h; this call _ZNK6google8protobuf8internal12ExtensionSet8ByteSizeEv; google::protobuf::internal::ExtensionSet::ByteSize(void) mov rdi, [rsp+48h+var_40]; this add rax, [rsp+48h+var_10] mov [rsp+48h+var_10], rax mov [rsp+48h+var_14], 0 call _ZNK6google8protobuf12OneofOptions35_internal_uninterpreted_option_sizeEv; google::protobuf::OneofOptions::_internal_uninterpreted_option_size(void) mov ecx, eax mov rax, [rsp+48h+var_40] movsxd rcx, ecx shl rcx, 1 add rcx, [rsp+48h+var_10] mov [rsp+48h+var_10], rcx add rax, 10h add rax, 18h mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_20] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::begin(void) mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_20] call _ZNK6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::end(void) mov [rsp+48h+var_30], rax loc_C3FF3: lea rdi, [rsp+48h+var_28] lea rsi, [rsp+48h+var_30] call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const> const&) test al, 1 jnz short loc_C4008 jmp short loc_C4037 loc_C4008: lea rdi, [rsp+48h+var_28] call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator*(void) mov [rsp+48h+var_38], rax mov rdi, [rsp+48h+var_38] call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_19UninterpretedOptionEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption>(google::protobuf::UninterpretedOption const&) add rax, [rsp+48h+var_10] mov [rsp+48h+var_10], rax lea rdi, [rsp+48h+var_28] call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19UninterpretedOptionEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator++(void) jmp short loc_C3FF3 loc_C4037: mov rdi, [rsp+48h+var_40]; this mov rsi, [rsp+48h+var_10]; unsigned __int64 mov rdx, rdi add rdx, 10h add rdx, 30h ; '0'; google::protobuf::internal::CachedSize * call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *) add rsp, 48h retn
long long google::protobuf::OneofOptions::ByteSizeLong(google::protobuf::OneofOptions *this) { long long v1; // rax long long v3; // [rsp+10h] [rbp-38h] long long v4; // [rsp+18h] [rbp-30h] BYREF _QWORD v5[2]; // [rsp+20h] [rbp-28h] BYREF int v6; // [rsp+34h] [rbp-14h] unsigned long long v7; // [rsp+38h] [rbp-10h] google::protobuf::OneofOptions *v8; // [rsp+40h] [rbp-8h] v8 = this; v7 = google::protobuf::internal::ExtensionSet::ByteSize((google::protobuf::OneofOptions *)((char *)this + 16)); v6 = 0; v7 += 2LL * (int)google::protobuf::OneofOptions::_internal_uninterpreted_option_size(this); v5[1] = (char *)this + 40; v5[0] = google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::begin((char *)this + 40); v4 = google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::end((char *)this + 40); while ( (google::protobuf::internal::operator!=(v5, &v4) & 1) != 0 ) { v3 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator*(v5); v1 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption>(v3); v7 += v1; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption const>::operator++(v5); } return google::protobuf::Message::MaybeComputeUnknownFieldsSize( this, v7, (google::protobuf::OneofOptions *)((char *)this + 64)); }
ByteSizeLong: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x38],0x0 ADD RDI,0x10 CALL 0x002a13c0 MOV RDI,qword ptr [RSP + 0x8] ADD RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x34],0x0 CALL 0x0019fc60 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,ECX SHL RCX,0x1 ADD RCX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RCX ADD RAX,0x10 ADD RAX,0x18 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001d6d40 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001d6d80 MOV qword ptr [RSP + 0x18],RAX LAB_001c3ff3: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x18] CALL 0x001d6de0 TEST AL,0x1 JNZ 0x001c4008 JMP 0x001c4037 LAB_001c4008: LEA RDI,[RSP + 0x20] CALL 0x001d6e00 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] CALL 0x001d6e20 ADD RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x20] CALL 0x001d6e40 JMP 0x001c3ff3 LAB_001c4037: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,RDI ADD RDX,0x10 ADD RDX,0x30 CALL 0x0023aa50 ADD RSP,0x48 RET
/* google::protobuf::OneofOptions::ByteSizeLong() const */ void __thiscall google::protobuf::OneofOptions::ByteSizeLong(OneofOptions *this) { int iVar1; long lVar2; ulong uVar3; UninterpretedOption *pUVar4; int8 local_30; int8 local_28; RepeatedPtrField<google::protobuf::UninterpretedOption> *local_20; int4 local_14; ulong local_10; OneofOptions *local_8; local_10 = 0; local_8 = this; lVar2 = internal::ExtensionSet::ByteSize((ExtensionSet *)(this + 0x10)); local_10 = lVar2 + local_10; local_14 = 0; iVar1 = _internal_uninterpreted_option_size(this); local_10 = (long)iVar1 * 2 + local_10; local_20 = (RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x28); local_28 = RepeatedPtrField<google::protobuf::UninterpretedOption>::begin(local_20); local_30 = RepeatedPtrField<google::protobuf::UninterpretedOption>::end(local_20); while( true ) { uVar3 = internal::operator!=((RepeatedPtrIterator *)&local_28,(RepeatedPtrIterator *)&local_30); if ((uVar3 & 1) == 0) break; pUVar4 = (UninterpretedOption *) internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_const>::operator* ((RepeatedPtrIterator<google::protobuf::UninterpretedOption_const> *) &local_28); uVar3 = internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption>(pUVar4); local_10 = uVar3 + local_10; internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_const>::operator++ ((RepeatedPtrIterator<google::protobuf::UninterpretedOption_const> *)&local_28); } Message::MaybeComputeUnknownFieldsSize((Message *)this,local_10,(CachedSize *)(this + 0x40)); return; }
2,008
js_map_set
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_set(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSMapRecord *mr; JSValue key, value; int is_set; if (!s) return JS_EXCEPTION; is_set = (magic & MAGIC_SET); key = map_normalize_key(ctx, argv[0]); if (s->is_weak && !is_valid_weakref_target(key)) return JS_ThrowTypeError(ctx, "invalid value used as %s key", is_set ? "WeakSet" : "WeakMap"); if (is_set) value = JS_UNDEFINED; else value = argv[1]; mr = map_find_record(ctx, s, key); if (mr) { JS_FreeValue(ctx, mr->value); } else { mr = map_add_record(ctx, s, key); if (!mr) return JS_EXCEPTION; } mr->value = js_dup(value); return js_dup(this_val); }
O0
c
js_map_set: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movl %r9d, 0x7c(%rsp) movq 0x90(%rsp), %rdi movl 0x7c(%rsp), %ecx addl $0x23, %ecx movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x383b0 movq %rax, 0x70(%rsp) cmpq $0x0, 0x70(%rsp) jne 0x7d9b0 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x7db8a movl 0x7c(%rsp), %eax andl $0x1, %eax movl %eax, 0x44(%rsp) movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x7dbb0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x70(%rsp), %rax cmpl $0x0, (%rax) je 0x7da57 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x7dc20 cmpl $0x0, %eax jne 0x7da57 movq 0x90(%rsp), %rdi movl 0x44(%rsp), %ecx leaq 0x910b1(%rip), %rdx # 0x10ead7 leaq 0x910a2(%rip), %rax # 0x10eacf cmpl $0x0, %ecx cmovneq %rax, %rdx leaq 0x91077(%rip), %rsi # 0x10eab2 movb $0x0, %al callq 0x2d300 movq %rax, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) jmp 0x7db8a cmpl $0x0, 0x44(%rsp) je 0x7da85 movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x50(%rsp) jmp 0x7da9f movq 0x80(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x48(%rsp) movq 0x18(%rax), %rax movq %rax, 0x50(%rsp) movq 0x90(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x60(%rsp), %rcx callq 0x7dc80 movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) je 0x7dae4 movq 0x90(%rsp), %rdi movq 0x68(%rsp), %rax movq 0x40(%rax), %rsi movq 0x48(%rax), %rdx callq 0x23c90 jmp 0x7db28 movq 0x90(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x60(%rsp), %rcx callq 0x7dd60 movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) jne 0x7db26 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x7db8a jmp 0x7db28 movq 0x68(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x216d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, 0x40(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x48(%rax) movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rsi callq 0x216d0 movq %rax, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_map_set: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov [rsp+0B8h+var_3C], r9d mov rdi, [rsp+0B8h+var_28] mov ecx, [rsp+0B8h+var_3C] add ecx, 23h ; '#' mov rsi, [rsp+0B8h+var_20] mov rdx, [rsp+0B8h+var_18] call JS_GetOpaque2 mov [rsp+0B8h+var_48], rax cmp [rsp+0B8h+var_48], 0 jnz short loc_7D9B0 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_7DB8A loc_7D9B0: mov eax, [rsp+0B8h+var_3C] and eax, 1 mov [rsp+0B8h+var_74], eax mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] mov rsi, [rax] mov rdx, [rax+8] call map_normalize_key mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_80], rdx mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_60], rax mov rax, [rsp+0B8h+var_80] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_48] cmp dword ptr [rax], 0 jz short loc_7DA57 mov rdi, [rsp+0B8h+var_60] mov rsi, [rsp+0B8h+var_58] call is_valid_weakref_target cmp eax, 0 jnz short loc_7DA57 mov rdi, [rsp+0B8h+var_28] mov ecx, [rsp+0B8h+var_74] lea rdx, aWeakmap; "WeakMap" lea rax, aWeakset; "WeakSet" cmp ecx, 0 cmovnz rdx, rax lea rsi, aInvalidValueUs; "invalid value used as %s key" mov al, 0 call JS_ThrowTypeError mov [rsp+0B8h+var_10], rax mov [rsp+0B8h+var_8], rdx jmp loc_7DB8A loc_7DA57: cmp [rsp+0B8h+var_74], 0 jz short loc_7DA85 mov dword ptr [rsp+0B8h+var_98], 0 mov [rsp+0B8h+var_90], 3 mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_70], rax mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_68], rax jmp short loc_7DA9F loc_7DA85: mov rax, [rsp+0B8h+var_38] mov rcx, [rax+10h] mov [rsp+0B8h+var_70], rcx mov rax, [rax+18h] mov [rsp+0B8h+var_68], rax loc_7DA9F: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_60] mov rcx, [rsp+0B8h+var_58] call map_find_record mov [rsp+0B8h+var_50], rax cmp [rsp+0B8h+var_50], 0 jz short loc_7DAE4 mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_50] mov rsi, [rax+40h] mov rdx, [rax+48h] call JS_FreeValue jmp short loc_7DB28 loc_7DAE4: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_60] mov rcx, [rsp+0B8h+var_58] call map_add_record mov [rsp+0B8h+var_50], rax cmp [rsp+0B8h+var_50], 0 jnz short loc_7DB26 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp short loc_7DB8A loc_7DB26: jmp short $+2 loc_7DB28: mov rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_B0], rax mov rdi, [rsp+0B8h+var_70] mov rsi, [rsp+0B8h+var_68] call js_dup mov rcx, rax mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_A8], rcx mov [rsp+0B8h+var_A0], rdx mov rcx, [rsp+0B8h+var_A8] mov [rax+40h], rcx mov rcx, [rsp+0B8h+var_A0] mov [rax+48h], rcx mov rdi, [rsp+0B8h+var_20] mov rsi, [rsp+0B8h+var_18] call js_dup mov [rsp+0B8h+var_10], rax mov [rsp+0B8h+var_8], rdx loc_7DB8A: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
_DWORD * js_map_set( long long a1, _DWORD *a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, _QWORD *a13, int a14) { long long v14; // rdx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 const char *v19; // rdx long long v20; // rdx char v22; // [rsp+0h] [rbp-B8h] _DWORD *v23; // [rsp+20h] [rbp-98h] long long v24; // [rsp+30h] [rbp-88h] _DWORD *v25; // [rsp+48h] [rbp-70h] long long v26; // [rsp+50h] [rbp-68h] long long v27; // [rsp+60h] [rbp-58h] long long record; // [rsp+68h] [rbp-50h] _DWORD *Opaque2; // [rsp+70h] [rbp-48h] char v30; // [rsp+7Ch] [rbp-3Ch] long long v33; // [rsp+A8h] [rbp-10h] v30 = a14; Opaque2 = (_DWORD *)JS_GetOpaque2(a1, (long long)a2, a3, a14 + 35); if ( Opaque2 ) { v24 = map_normalize_key(a1, *a13, a13[1]); v27 = v14; if ( !*Opaque2 || (unsigned int)is_valid_weakref_target(v24, v14) ) { if ( (v30 & 1) != 0 ) { LODWORD(v23) = 0; v25 = v23; LODWORD(v26) = 3; } else { v25 = (_DWORD *)a13[2]; v26 = a13[3]; } record = map_find_record(a1, Opaque2, v24, v27); if ( record ) { JS_FreeValue(a1, *(_QWORD *)(record + 64), *(_QWORD *)(record + 72)); } else { record = map_add_record(a1, Opaque2, v24, v27); if ( !record ) { LODWORD(v33) = 0; return (_DWORD *)v33; } } *(_QWORD *)(record + 64) = js_dup(v25, v26); *(_QWORD *)(record + 72) = v20; return js_dup(a2, a3); } v19 = "WeakMap"; if ( (v30 & 1) != 0 ) v19 = "WeakSet"; return (_DWORD *)JS_ThrowTypeError( a1, (long long)"invalid value used as %s key", (long long)v19, v30 & 1, v15, v16, a4, a5, a6, a7, v17, v18, a10, a11, v22); } else { LODWORD(v33) = 0; } return (_DWORD *)v33; }
js_map_set: SUB RSP,0xb8 MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x90],RDI MOV dword ptr [RSP + 0x8c],ECX MOV qword ptr [RSP + 0x80],R8 MOV dword ptr [RSP + 0x7c],R9D MOV RDI,qword ptr [RSP + 0x90] MOV ECX,dword ptr [RSP + 0x7c] ADD ECX,0x23 MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x001383b0 MOV qword ptr [RSP + 0x70],RAX CMP qword ptr [RSP + 0x70],0x0 JNZ 0x0017d9b0 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x0017db8a LAB_0017d9b0: MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0x1 MOV dword ptr [RSP + 0x44],EAX MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0017dbb0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x70] CMP dword ptr [RAX],0x0 JZ 0x0017da57 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x0017dc20 CMP EAX,0x0 JNZ 0x0017da57 MOV RDI,qword ptr [RSP + 0x90] MOV ECX,dword ptr [RSP + 0x44] LEA RDX,[0x20ead7] LEA RAX,[0x20eacf] CMP ECX,0x0 CMOVNZ RDX,RAX LEA RSI,[0x20eab2] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP + 0xa8],RAX MOV qword ptr [RSP + 0xb0],RDX JMP 0x0017db8a LAB_0017da57: CMP dword ptr [RSP + 0x44],0x0 JZ 0x0017da85 MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x50],RAX JMP 0x0017da9f LAB_0017da85: MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x48],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x50],RAX LAB_0017da9f: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x60] CALL 0x0017dc80 MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0x68],0x0 JZ 0x0017dae4 MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RAX + 0x40] MOV RDX,qword ptr [RAX + 0x48] CALL 0x00123c90 JMP 0x0017db28 LAB_0017dae4: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x60] CALL 0x0017dd60 MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0x68],0x0 JNZ 0x0017db26 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x0017db8a LAB_0017db26: JMP 0x0017db28 LAB_0017db28: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x001216d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RDX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x48],RCX MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] CALL 0x001216d0 MOV qword ptr [RSP + 0xa8],RAX MOV qword ptr [RSP + 0xb0],RDX LAB_0017db8a: MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] js_map_set(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,uint param_6) { int iVar1; int *piVar2; char *pcVar5; int1 auVar6 [16]; uint uStack_94; long local_70; int8 local_68; long local_50; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar3; int8 uVar4; piVar2 = (int *)JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23); if (piVar2 == (int *)0x0) { local_10 = 0; local_8 = 6; } else { auVar6 = map_normalize_key(param_1,*param_5,param_5[1]); uVar4 = auVar6._8_8_; uVar3 = auVar6._0_8_; if ((*piVar2 == 0) || (iVar1 = is_valid_weakref_target(uVar3,uVar4), iVar1 != 0)) { if ((param_6 & 1) == 0) { local_70 = param_5[2]; local_68 = param_5[3]; } else { local_70 = (ulong)uStack_94 << 0x20; local_68 = 3; } local_50 = map_find_record(param_1,piVar2,uVar3,uVar4); if (local_50 == 0) { local_50 = map_add_record(param_1,piVar2,uVar3,uVar4); if (local_50 == 0) { local_10 = 0; local_8 = 6; goto LAB_0017db8a; } } else { JS_FreeValue(param_1,*(int8 *)(local_50 + 0x40),*(int8 *)(local_50 + 0x48)); } auVar6 = js_dup(local_70,local_68); *(int1 (*) [16])(local_50 + 0x40) = auVar6; auVar6 = js_dup(param_2,param_3); local_8 = auVar6._8_8_; local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; } else { pcVar5 = "WeakMap"; if ((param_6 & 1) != 0) { pcVar5 = "WeakSet"; } auVar6 = JS_ThrowTypeError(param_1,"invalid value used as %s key",pcVar5); local_8 = auVar6._8_8_; local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; } } LAB_0017db8a: auVar6._4_4_ = uStack_c; auVar6._0_4_ = local_10; auVar6._8_8_ = local_8; return auVar6; }
2,009
js_map_set
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_set(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSMapRecord *mr; JSValue key, value; int is_set; if (!s) return JS_EXCEPTION; is_set = (magic & MAGIC_SET); key = map_normalize_key(ctx, argv[0]); if (s->is_weak && !is_valid_weakref_target(key)) return JS_ThrowTypeError(ctx, "invalid value used as %s key", is_set ? "WeakSet" : "WeakMap"); if (is_set) value = JS_UNDEFINED; else value = argv[1]; mr = map_find_record(ctx, s, key); if (mr) { JS_FreeValue(ctx, mr->value); } else { mr = map_add_record(ctx, s, key); if (!mr) return JS_EXCEPTION; } mr->value = js_dup(value); return js_dup(this_val); }
O1
c
js_map_set: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %r14d movq %r8, %rbx movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbp leal 0x23(%r14), %ecx callq 0x275b5 movl $0x6, %edx testq %rax, %rax je 0x473b4 movq %rax, %r13 movq %rbp, %rdi movq %r12, 0x18(%rsp) movq %r15, 0x20(%rsp) movq (%rbx), %rbp movq 0x8(%rbx), %r15 movl %r15d, %eax xorq $0x7, %rax movq %rbp, %rcx btrq $0x3f, %rcx xorl %edx, %edx orq %rax, %rcx cmoveq %rdx, %rbp cmoveq %rdx, %r15 cmpl $0x0, (%r13) je 0x4738a movq %rbp, (%rsp) cmpl $-0x1, %r15d je 0x4738a cmpl $-0x8, %r15d jne 0x4735d movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq (%rsp), %rcx movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000 andq 0x4(%rcx), %rdx incq %rax cmpq %rax, %rdx jne 0x4738a testb $0x1, %r14b leaq 0x5870b(%rip), %rax # 0x9fa73 leaq 0x586fc(%rip), %rdx # 0x9fa6b cmoveq %rax, %rdx leaq 0x586d4(%rip), %rsi # 0x9fa4e xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 movl $0x6, %edx jmp 0x473b6 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 testb $0x1, %r14b jne 0x473bd movq 0x10(%rbx), %r14 movq 0x18(%rbx), %rcx movq %rcx, 0x10(%rsp) movl %r14d, %ecx movq %rcx, 0x8(%rsp) andq %rax, %r14 jmp 0x473d3 xorl %ebx, %ebx xorl %eax, %eax jmp 0x4744a movl $0x3, %eax movq %rax, 0x10(%rsp) movq $0x0, 0x8(%rsp) xorl %r14d, %r14d movq %rdi, %r12 movq %r13, %rsi movq %rbp, %rdx movq %r15, %rcx callq 0x4748d testq %rax, %rax je 0x4745f movq %rax, %rbx movq 0x40(%rax), %rsi movq 0x48(%rax), %rdx movq 0x18(%r12), %rdi callq 0x1d8c6 movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdx orq 0x8(%rsp), %r14 movq %r14, (%rsp) movq 0x10(%rsp), %rsi cmpl $-0x9, %esi jb 0x47421 movq (%rsp), %rax incl (%rax) movq %r14, 0x40(%rbx) movq %rsi, 0x48(%rbx) movq %rdx, (%rsp) cmpl $-0x9, %ecx jb 0x47438 movq (%rsp), %rax incl (%rax) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq %rdx, %rax movl %edx, %ebx movq %rcx, %rdx orq %rax, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, %rdi movq %r13, %rsi movq %rbp, %rdx movq %r15, %rcx callq 0x115cc movq %rax, %rbx testq %rax, %rax movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdx jne 0x47408 xorl %ebx, %ebx xorl %eax, %eax movl $0x6, %edx jmp 0x4744a
js_map_set: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14d, r9d mov rbx, r8 mov r15, rdx mov r12, rsi mov rbp, rdi lea ecx, [r14+23h] call JS_GetOpaque2 mov edx, 6 test rax, rax jz loc_473B4 mov r13, rax mov rdi, rbp mov [rsp+58h+var_40], r12 mov [rsp+58h+var_38], r15 mov rbp, [rbx] mov r15, [rbx+8] mov eax, r15d xor rax, 7 mov rcx, rbp btr rcx, 3Fh ; '?' xor edx, edx or rcx, rax cmovz rbp, rdx cmovz r15, rdx cmp dword ptr [r13+0], 0 jz short loc_4738A mov [rsp+58h+var_58], rbp cmp r15d, 0FFFFFFFFh jz short loc_4738A cmp r15d, 0FFFFFFF8h jnz short loc_4735D mov rax, 7FFFFFFFFFFFFFFFh mov rcx, [rsp+58h+var_58] mov rdx, 0C000000000000000h and rdx, [rcx+4] inc rax cmp rdx, rax jnz short loc_4738A loc_4735D: test r14b, 1 lea rax, aWeakmap; "WeakMap" lea rdx, aWeakset; "WeakSet" cmovz rdx, rax lea rsi, aInvalidValueUs; "invalid value used as %s key" xor ebx, ebx xor eax, eax call JS_ThrowTypeError mov edx, 6 jmp short loc_473B6 loc_4738A: mov rax, 0FFFFFFFF00000000h test r14b, 1 jnz short loc_473BD mov r14, [rbx+10h] mov rcx, [rbx+18h] mov [rsp+58h+var_48], rcx mov ecx, r14d mov [rsp+58h+var_50], rcx and r14, rax jmp short loc_473D3 loc_473B4: xor ebx, ebx loc_473B6: xor eax, eax jmp loc_4744A loc_473BD: mov eax, 3 mov [rsp+58h+var_48], rax mov [rsp+58h+var_50], 0 xor r14d, r14d loc_473D3: mov r12, rdi mov rsi, r13 mov rdx, rbp mov rcx, r15 call map_find_record test rax, rax jz short loc_4745F mov rbx, rax mov rsi, [rax+40h] mov rdx, [rax+48h] mov rdi, [r12+18h] call JS_FreeValueRT mov rcx, [rsp+58h+var_38] mov rdx, [rsp+58h+var_40] loc_47408: or r14, [rsp+58h+var_50] mov [rsp+58h+var_58], r14 mov rsi, [rsp+58h+var_48] cmp esi, 0FFFFFFF7h jb short loc_47421 mov rax, [rsp+58h+var_58] inc dword ptr [rax] loc_47421: mov [rbx+40h], r14 mov [rbx+48h], rsi mov [rsp+58h+var_58], rdx cmp ecx, 0FFFFFFF7h jb short loc_47438 mov rax, [rsp+58h+var_58] inc dword ptr [rax] loc_47438: mov rax, 0FFFFFFFF00000000h and rax, rdx mov ebx, edx mov rdx, rcx loc_4744A: or rbx, rax mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4745F: mov rdi, r12 mov rsi, r13 mov rdx, rbp mov rcx, r15 call map_add_record mov rbx, rax test rax, rax mov rcx, [rsp+58h+var_38] mov rdx, [rsp+58h+var_40] jnz short loc_47408 xor ebx, ebx xor eax, eax mov edx, 6 jmp short loc_4744A
unsigned long long js_map_set( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long *a13, int a14) { char v14; // r14 _DWORD *Opaque2; // rax long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // r13 long long v23; // rbp long long v24; // r15 long long v25; // rcx const char *v26; // rdx long long v27; // rbx long long v28; // r14 unsigned long long v29; // r14 unsigned long long v30; // rax long long record; // rax _QWORD *v32; // rbx unsigned int v33; // ecx long long v34; // rdx _DWORD *v35; // r14 long long v37; // [rsp+8h] [rbp-50h] long long v38; // [rsp+10h] [rbp-48h] unsigned int v39; // [rsp+20h] [rbp-38h] v14 = a14; Opaque2 = (_DWORD *)JS_GetOpaque2(a1, a2, a3, a14 + 35); if ( !Opaque2 ) { v27 = 0LL; LABEL_14: v30 = 0LL; return v30 | v27; } v22 = (long long)Opaque2; v39 = a3; v23 = *a13; v24 = a13[1]; v25 = (unsigned int)v24 ^ 7LL | *a13 & 0x7FFFFFFFFFFFFFFFLL; if ( !v25 ) { v23 = 0LL; v24 = 0LL; } if ( *Opaque2 ) { if ( (_DWORD)v24 != -1 ) { if ( (_DWORD)v24 != -8 || (v25 = v23, (*(_QWORD *)(v23 + 4) & 0xC000000000000000LL) == 0x8000000000000000LL) ) { v26 = "WeakSet"; if ( (v14 & 1) == 0 ) v26 = "WeakMap"; v27 = 0LL; JS_ThrowTypeError( a1, (long long)"invalid value used as %s key", (long long)v26, v25, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11, v23); goto LABEL_14; } } } if ( (v14 & 1) != 0 ) { v38 = 3LL; v37 = 0LL; v29 = 0LL; } else { v28 = a13[2]; v38 = a13[3]; v37 = (unsigned int)v28; v29 = v28 & 0xFFFFFFFF00000000LL; } record = map_find_record(a1, Opaque2, v23, v24); if ( record ) { v32 = (_QWORD *)record; JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)(record + 64), *(_QWORD *)(record + 72)); v33 = v39; v34 = a2; } else { v32 = map_add_record(a1, v22, (_DWORD *)v23, v24); v33 = v39; v34 = a2; if ( !v32 ) { v27 = 0LL; v30 = 0LL; return v30 | v27; } } v35 = (_DWORD *)(v37 | v29); if ( (unsigned int)v38 >= 0xFFFFFFF7 ) ++*v35; v32[8] = v35; v32[9] = v38; if ( v33 >= 0xFFFFFFF7 ) ++*(_DWORD *)v34; v30 = v34 & 0xFFFFFFFF00000000LL; v27 = (unsigned int)v34; return v30 | v27; }
js_map_set: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14D,R9D MOV RBX,R8 MOV R15,RDX MOV R12,RSI MOV RBP,RDI LEA ECX,[R14 + 0x23] CALL 0x001275b5 MOV EDX,0x6 TEST RAX,RAX JZ 0x001473b4 MOV R13,RAX MOV RDI,RBP MOV qword ptr [RSP + 0x18],R12 MOV qword ptr [RSP + 0x20],R15 MOV RBP,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x8] MOV EAX,R15D XOR RAX,0x7 MOV RCX,RBP BTR RCX,0x3f XOR EDX,EDX OR RCX,RAX CMOVZ RBP,RDX CMOVZ R15,RDX CMP dword ptr [R13],0x0 JZ 0x0014738a MOV qword ptr [RSP],RBP CMP R15D,-0x1 JZ 0x0014738a CMP R15D,-0x8 JNZ 0x0014735d MOV RAX,0x7fffffffffffffff MOV RCX,qword ptr [RSP] MOV RDX,-0x4000000000000000 AND RDX,qword ptr [RCX + 0x4] INC RAX CMP RDX,RAX JNZ 0x0014738a LAB_0014735d: TEST R14B,0x1 LEA RAX,[0x19fa73] LEA RDX,[0x19fa6b] CMOVZ RDX,RAX LEA RSI,[0x19fa4e] XOR EBX,EBX XOR EAX,EAX CALL 0x00122567 MOV EDX,0x6 JMP 0x001473b6 LAB_0014738a: MOV RAX,-0x100000000 TEST R14B,0x1 JNZ 0x001473bd MOV R14,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x10],RCX MOV ECX,R14D MOV qword ptr [RSP + 0x8],RCX AND R14,RAX JMP 0x001473d3 LAB_001473b4: XOR EBX,EBX LAB_001473b6: XOR EAX,EAX JMP 0x0014744a LAB_001473bd: MOV EAX,0x3 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x8],0x0 XOR R14D,R14D LAB_001473d3: MOV R12,RDI MOV RSI,R13 MOV RDX,RBP MOV RCX,R15 CALL 0x0014748d TEST RAX,RAX JZ 0x0014745f MOV RBX,RAX MOV RSI,qword ptr [RAX + 0x40] MOV RDX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [R12 + 0x18] CALL 0x0011d8c6 MOV RCX,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] LAB_00147408: OR R14,qword ptr [RSP + 0x8] MOV qword ptr [RSP],R14 MOV RSI,qword ptr [RSP + 0x10] CMP ESI,-0x9 JC 0x00147421 MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_00147421: MOV qword ptr [RBX + 0x40],R14 MOV qword ptr [RBX + 0x48],RSI MOV qword ptr [RSP],RDX CMP ECX,-0x9 JC 0x00147438 MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_00147438: MOV RAX,-0x100000000 AND RAX,RDX MOV EBX,EDX MOV RDX,RCX LAB_0014744a: OR RBX,RAX MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014745f: MOV RDI,R12 MOV RSI,R13 MOV RDX,RBP MOV RCX,R15 CALL 0x001115cc MOV RBX,RAX TEST RAX,RAX MOV RCX,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] JNZ 0x00147408 XOR EBX,EBX XOR EAX,EAX MOV EDX,0x6 JMP 0x0014744a
int1 [16] js_map_set(long param_1,int *param_2,int8 param_3,int8 param_4,ulong *param_5, uint param_6) { int *piVar1; long lVar2; ulong uVar3; char *pcVar4; ulong uVar5; ulong uVar6; int1 auVar7 [16]; ulong local_50; ulong local_48; piVar1 = (int *)JS_GetOpaque2(); if (piVar1 != (int *)0x0) { uVar5 = param_5[1]; uVar3 = *param_5; if ((*param_5 & 0x7fffffffffffffff) == 0 && (param_5[1] & 0xffffffff) == 7) { uVar5 = 0; uVar3 = 0; } if (((*piVar1 == 0) || ((int)uVar5 == -1)) || (((int)uVar5 == -8 && ((*(ulong *)(uVar3 + 4) & 0xc000000000000000) != 0x8000000000000000)))) { if ((param_6 & 1) == 0) { local_48 = param_5[3]; local_50 = param_5[2] & 0xffffffff; uVar6 = param_5[2] & 0xffffffff00000000; } else { local_48 = 3; local_50 = 0; uVar6 = 0; } lVar2 = map_find_record(param_1,piVar1,uVar3,uVar5); if (lVar2 == 0) { lVar2 = map_add_record(param_1,piVar1,uVar3,uVar5); if (lVar2 == 0) { uVar5 = 0; uVar3 = 0; param_3 = 6; goto LAB_0014744a; } } else { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*(int8 *)(lVar2 + 0x40), *(int8 *)(lVar2 + 0x48)); } piVar1 = (int *)(uVar6 | local_50); if (0xfffffff6 < (uint)local_48) { *piVar1 = *piVar1 + 1; } *(int **)(lVar2 + 0x40) = piVar1; *(ulong *)(lVar2 + 0x48) = local_48; if (0xfffffff6 < (uint)param_3) { *param_2 = *param_2 + 1; } uVar3 = (ulong)param_2 & 0xffffffff00000000; uVar5 = (ulong)param_2 & 0xffffffff; goto LAB_0014744a; } pcVar4 = "WeakSet"; if ((param_6 & 1) == 0) { pcVar4 = "WeakMap"; } JS_ThrowTypeError(param_1,"invalid value used as %s key",pcVar4); } uVar5 = 0; param_3 = 6; uVar3 = 0; LAB_0014744a: auVar7._8_8_ = param_3; auVar7._0_8_ = uVar5 | uVar3; return auVar7; }
2,010
mysql_autocommit_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_autocommit_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_autocommit, (parms->mysql, parms->auto_mode), parms->mysql, my_bool, r_my_bool) }
O3
c
mysql_autocommit_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movsbl 0x8(%rdi), %esi movq %rax, %rdi callq 0x605e5 movb %al, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_autocommit_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rcx, [rax+480h] mov rbx, [rcx+28h] movsx esi, byte ptr [rdi+8] mov rdi, rax call mysql_autocommit mov [rbx+8], al mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_autocommit_start_internal(long long a1) { long long v1; // rbx long long result; // rax v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); result = mysql_autocommit(*(_QWORD *)a1, *(_BYTE *)(a1 + 8)); *(_BYTE *)(v1 + 8) = result; *(_DWORD *)v1 = 0; return result; }
mysql_autocommit_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOVSX ESI,byte ptr [RDI + 0x8] MOV RDI,RAX CALL 0x001605e5 MOV byte ptr [RBX + 0x8],AL MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_autocommit_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_autocommit(*param_1,(int)(char)param_1[1]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
2,011
minja::Parser::parseExpression(bool)
llama.cpp/common/minja/minja.hpp
std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) { auto left = parseLogicalOr(); if (it == end) return left; if (!allow_if_expr) return left; static std::regex if_tok(R"(if\b)"); if (consumeToken(if_tok).empty()) { return left; } auto location = get_location(); auto [condition, else_expr] = parseIfExpression(); return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr)); }
O3
cpp
minja::Parser::parseExpression(bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0xdffec movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0xdec34 testb %bpl, %bpl je 0xdec34 leaq 0x84882(%rip), %rax # 0x163448 movb (%rax), %al testb %al, %al je 0xded0e leaq 0x84851(%rip), %rdx # 0x163428 leaq 0x10(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0xdedb2 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %r15 cmpq %rax, %rdi je 0xdec08 movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 testq %r15, %r15 je 0xdec34 movq (%r14), %rax movq %rax, 0x30(%rsp) movq 0x8(%r14), %rax movq %rax, 0x38(%rsp) testq %rax, %rax je 0xdec66 movq 0x8336e(%rip), %rcx # 0x161f98 cmpb $0x0, (%rcx) je 0xdec62 incl 0x8(%rax) jmp 0xdec66 movaps (%rsp), %xmm0 xorl %eax, %eax movq %rax, 0x8(%rsp) movups %xmm0, (%rbx) movq %rax, (%rsp) leaq 0x8(%rsp), %rdi callq 0x70a5a movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq lock incl 0x8(%rax) leaq 0x38(%rsp), %r15 movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x8(%r15) leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0xe027c movl $0x60, %edi callq 0x20210 movq %rax, %r14 leaq 0x50(%rsp), %r12 leaq 0x20(%rsp), %r8 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x82300(%rip), %rax # 0x160fb0 addq $0x10, %rax movq %rax, (%r14) movq %r14, %r13 addq $0x10, %r13 leaq 0x30(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rsp, %rcx movq %r13, %rdi callq 0xedeae movq %r13, (%rbx) xorl %eax, %eax movq %rax, (%r12) movq %r14, 0x8(%rbx) movq %rax, -0x8(%r12) movq %r12, %rdi callq 0x70a5a leaq 0x28(%rsp), %rdi callq 0x70a5a leaq 0x18(%rsp), %rdi callq 0x70a5a movq %r15, %rdi callq 0x70a5a jmp 0xdec46 leaq 0x84733(%rip), %rdi # 0x163448 callq 0x205a0 testl %eax, %eax je 0xdebd0 leaq 0x846ff(%rip), %rdi # 0x163428 leaq 0x41f95(%rip), %rsi # 0x120cc5 movl $0x10, %edx callq 0x66374 leaq -0x78921(%rip), %rdi # 0x66420 leaq 0x846e0(%rip), %rsi # 0x163428 leaq 0x83d29(%rip), %rdx # 0x162a78 callq 0x20ed0 leaq 0x846ed(%rip), %rdi # 0x163448 callq 0x20960 jmp 0xdebd0 movq %rax, %rbx leaq 0x846d9(%rip), %rdi # 0x163448 callq 0x206d0 jmp 0xded9f movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x70a5a leaq 0x18(%rsp), %rdi callq 0x70a5a jmp 0xded92 movq %rax, %rbx movq %r15, %rdi callq 0x70a5a jmp 0xded9f movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x70a5a movq %rbx, %rdi callq 0x20af0 nop
_ZN5minja6Parser15parseExpressionEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebp, edx mov r14, rsi mov rbx, rdi mov rdi, rsp; this call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void) mov rax, [r14+20h] cmp rax, [r14+18h] jz short loc_DEC34 test bpl, bpl jz short loc_DEC34 lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok mov al, [rax] test al, al jz loc_DED0E loc_DEBD0: lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; int lea rdi, [rsp+88h+var_78]; int mov rsi, r14; int mov ecx, 1; int call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rax, [rsp+88h+var_68] mov rdi, [rax-10h]; void * mov r15, [rax-8] cmp rdi, rax jz short loc_DEC08 mov rsi, [rsp+88h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DEC08: test r15, r15 jz short loc_DEC34 mov rax, [r14] mov [rsp+88h+var_58], rax mov rax, [r14+8] mov [rsp+88h+var_50], rax test rax, rax jz short loc_DEC66 mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz short loc_DEC62 inc dword ptr [rax+8] jmp short loc_DEC66 loc_DEC34: movaps xmm0, [rsp+88h+var_88] xor eax, eax mov qword ptr [rsp+88h+var_88+8], rax movups xmmword ptr [rbx], xmm0 mov qword ptr [rsp+88h+var_88], rax loc_DEC46: lea rdi, [rsp+88h+var_88+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_DEC62: lock inc dword ptr [rax+8] loc_DEC66: lea r15, [rsp+88h+var_50] mov rax, [r14+20h] sub rax, [r14+10h] mov [r15+8], rax lea rdi, [rsp+88h+var_78]; this mov rsi, r14 call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void) mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea r12, [rsp+88h+var_38] lea r8, [rsp+88h+var_68] mov rax, 100000001h mov [r14+8], rax lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja6IfExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> add rax, 10h mov [r14], rax mov r13, r14 add r13, 10h lea rsi, [rsp+88h+var_58] lea rdx, [rsp+88h+var_78] mov rcx, rsp mov rdi, r13 call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &) mov [rbx], r13 xor eax, eax mov [r12], rax mov [rbx+8], r14 mov [r12-8], rax mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_60] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_DEC46 loc_DED0E: lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_DEBD0 lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok lea rsi, aIfB; "if\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_DEBD0 mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_DED9F mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_DED92 mov rbx, rax loc_DED92: mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_DED9F mov rbx, rax loc_DED9F: lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3) { int v4; // r8d int v5; // r9d volatile signed __int32 *v6; // r15 volatile signed __int32 *v7; // rax __int128 v8; // xmm0 _QWORD *v10; // r14 __int128 v11; // [rsp+0h] [rbp-88h] BYREF long long *v12; // [rsp+10h] [rbp-78h] BYREF volatile signed __int32 *v13; // [rsp+18h] [rbp-70h] BYREF long long v14; // [rsp+20h] [rbp-68h] BYREF volatile signed __int32 *v15; // [rsp+28h] [rbp-60h] BYREF long long v16; // [rsp+30h] [rbp-58h] BYREF volatile signed __int32 *v17[3]; // [rsp+38h] [rbp-50h] BYREF volatile signed __int32 *v18; // [rsp+50h] [rbp-38h] BYREF minja::Parser::parseLogicalOr((minja::Parser *)&v11); if ( a2[4] == a2[3] || !a3 ) goto LABEL_10; if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], (long long)"if\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]); } minja::Parser::consumeToken( (int)&v12, (int)a2, (int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11], 1, v4, v5, v11, *((void **)&v11 + 1), (int)v12, (long long)v13); v6 = v13; if ( v12 != &v14 ) operator delete(v12, v14 + 1); if ( v6 ) { v16 = *a2; v7 = (volatile signed __int32 *)a2[1]; v17[0] = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v7 + 2); else _InterlockedIncrement(v7 + 2); } v17[1] = (volatile signed __int32 *)(a2[4] - a2[2]); minja::Parser::parseIfExpression((minja::Parser *)&v12); v10 = (_QWORD *)operator new(0x60uLL); v10[1] = 0x100000001LL; *v10 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> + 2; minja::IfExpr::IfExpr(v10 + 2, &v16, &v12, &v11, &v14); *(_QWORD *)this = v10 + 2; v18 = 0LL; *((_QWORD *)this + 1) = v10; v17[2] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v17); } else { LABEL_10: v8 = v11; *((_QWORD *)&v11 + 1) = 0LL; *(_OWORD *)this = v8; *(_QWORD *)&v11 = 0LL; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v11 + 1); return this; }
parseExpression: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x001dffec MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x001dec34 TEST BPL,BPL JZ 0x001dec34 LEA RAX,[0x263448] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x001ded0e LAB_001debd0: LEA RDX,[0x263428] LEA RDI,[RSP + 0x10] MOV RSI,R14 MOV ECX,0x1 CALL 0x001dedb2 LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] MOV R15,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x001dec08 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00120180 LAB_001dec08: TEST R15,R15 JZ 0x001dec34 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x38],RAX TEST RAX,RAX JZ 0x001dec66 MOV RCX,qword ptr [0x00261f98] CMP byte ptr [RCX],0x0 JZ 0x001dec62 INC dword ptr [RAX + 0x8] JMP 0x001dec66 LAB_001dec34: MOVAPS XMM0,xmmword ptr [RSP] XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RSP],RAX LAB_001dec46: LEA RDI,[RSP + 0x8] CALL 0x00170a5a MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001dec62: INC.LOCK dword ptr [RAX + 0x8] LAB_001dec66: LEA R15,[RSP + 0x38] MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [R15 + 0x8],RAX LAB_001dec77: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x001e027c LAB_001dec84: MOV EDI,0x60 CALL 0x00120210 MOV R14,RAX LEA R12,[RSP + 0x50] LEA R8,[RSP + 0x20] MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x260fb0] ADD RAX,0x10 MOV qword ptr [R14],RAX MOV R13,R14 ADD R13,0x10 LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x10] MOV RCX,RSP MOV RDI,R13 CALL 0x001edeae MOV qword ptr [RBX],R13 XOR EAX,EAX MOV qword ptr [R12],RAX MOV qword ptr [RBX + 0x8],R14 MOV qword ptr [R12 + -0x8],RAX MOV RDI,R12 CALL 0x00170a5a LEA RDI,[RSP + 0x28] CALL 0x00170a5a LEA RDI,[RSP + 0x18] CALL 0x00170a5a MOV RDI,R15 CALL 0x00170a5a JMP 0x001dec46 LAB_001ded0e: LEA RDI,[0x263448] CALL 0x001205a0 TEST EAX,EAX JZ 0x001debd0 LAB_001ded22: LEA RDI,[0x263428] LEA RSI,[0x220cc5] MOV EDX,0x10 CALL 0x00166374 LAB_001ded3a: LEA RDI,[0x166420] LEA RSI,[0x263428] LEA RDX,[0x262a78] CALL 0x00120ed0 LEA RDI,[0x263448] CALL 0x00120960 JMP 0x001debd0
/* minja::Parser::parseExpression(bool) */ int8 * minja::Parser::parseExpression(bool param_1) { int8 uVar1; int iVar2; int8 *puVar3; char in_DL; int8 *in_RSI; int7 in_register_00000039; int8 *puVar4; int8 local_88; int8 uStack_80; long *local_78; long local_70; long local_68; __shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [8]; int8 local_58; long local_50; long local_48; int8 local_40; int8 local_38; puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1); parseLogicalOr(); if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) { if (parseExpression(bool)::if_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 001ded22 to 001ded39 has its CatchHandler @ 001ded65 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseExpression(bool)::if_tok_abi_cxx11_,&DAT_00220cc5,0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_); } } /* try { // try from 001debd0 to 001debe8 has its CatchHandler @ 001ded9c */ consumeToken(&local_78); if (local_78 != &local_68) { operator_delete(local_78,local_68 + 1); } if (local_70 != 0) { local_58 = *in_RSI; local_50 = in_RSI[1]; if (local_50 != 0) { if (*PTR___libc_single_threaded_00261f98 == '\0') { LOCK(); *(int *)(local_50 + 8) = *(int *)(local_50 + 8) + 1; UNLOCK(); } else { *(int *)(local_50 + 8) = *(int *)(local_50 + 8) + 1; } } local_48 = in_RSI[4] - in_RSI[2]; /* try { // try from 001dec77 to 001dec83 has its CatchHandler @ 001ded8f */ parseIfExpression(); /* try { // try from 001dec84 to 001dec8d has its CatchHandler @ 001ded76 */ puVar3 = (int8 *)operator_new(0x60); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_base_00260fc0; IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_58,(shared_ptr *)&local_78, (shared_ptr *)&local_88,(shared_ptr *)&local_68); *puVar4 = (IfExpr *)(puVar3 + 2); local_38 = 0; puVar4[1] = puVar3; local_40 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_50); goto LAB_001dec46; } } uVar1 = uStack_80; uStack_80 = 0; *puVar4 = local_88; puVar4[1] = uVar1; local_88 = 0; LAB_001dec46: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_80); return puVar4; }
2,012
pcmp
eloqsql/strings/ctype-simple.c
static int pcmp(const void * f, const void * s) { const uni_idx *F= (const uni_idx*) f; const uni_idx *S= (const uni_idx*) s; int res; if (!(res=((S->nchars)-(F->nchars)))) res=((F->uidx.from)-(S->uidx.to)); return res; }
O3
c
pcmp: pushq %rbp movq %rsp, %rbp movl (%rsi), %eax subl (%rdi), %eax jne 0x42995 movzwl 0x8(%rdi), %eax movzwl 0xa(%rsi), %ecx subl %ecx, %eax popq %rbp retq nop
pcmp: push rbp mov rbp, rsp mov eax, [rsi] sub eax, [rdi] jnz short loc_42995 movzx eax, word ptr [rdi+8] movzx ecx, word ptr [rsi+0Ah] sub eax, ecx loc_42995: pop rbp retn
long long pcmp(long long a1, long long a2) { long long result; // rax result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1); if ( *(_DWORD *)a2 == *(_DWORD *)a1 ) return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10); return result; }
pcmp: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RSI] SUB EAX,dword ptr [RDI] JNZ 0x00142995 MOVZX EAX,word ptr [RDI + 0x8] MOVZX ECX,word ptr [RSI + 0xa] SUB EAX,ECX LAB_00142995: POP RBP RET
int pcmp(int *param_1,int *param_2) { int iVar1; iVar1 = *param_2 - *param_1; if (iVar1 == 0) { iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10); } return iVar1; }
2,013
translog_buffer_lock
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_lock(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_lock"); DBUG_PRINT("enter", ("Lock buffer #%u: %p", buffer->buffer_no, buffer)); mysql_mutex_lock(&buffer->mutex); DBUG_VOID_RETURN; }
O0
c
translog_buffer_lock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x3000e movq -0x8(%rbp), %rdi addq $0x100090, %rdi # imm = 0x100090 leaq 0x12af3f(%rip), %rsi # 0x15af5f movl $0x6cb, %edx # imm = 0x6CB callq 0x2fbb0 jmp 0x3002c addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_buffer_lock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_3000E: mov rdi, [rbp+var_8] add rdi, 100090h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 6CBh call inline_mysql_mutex_lock jmp short $+2 loc_3002C: add rsp, 10h pop rbp retn
long long translog_buffer_lock(long long a1) { return inline_mysql_mutex_lock( a1 + 1048720, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6CBu); }
translog_buffer_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0013000e LAB_0013000e: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100090 LEA RSI,[0x25af5f] MOV EDX,0x6cb CALL 0x0012fbb0 JMP 0x0013002c LAB_0013002c: ADD RSP,0x10 POP RBP RET
void translog_buffer_lock(long param_1) { inline_mysql_mutex_lock (param_1 + 0x100090, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x6cb); return; }
2,014
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>>::end_object()
monkey531[P]llama/common/json.hpp
bool end_object() { if (ref_stack.back()) { if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) { // discard object *ref_stack.back() = discarded; } else { ref_stack.back()->set_parents(); } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) { // remove discarded value for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) { if (it->is_discarded()) { ref_stack.back()->erase(it); break; } } } return true; }
O3
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>>::end_object(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq -0x8(%rax), %rcx testq %rcx, %rcx je 0x5c3b8 subq 0x8(%rbx), %rax shrq $0x3, %rax decl %eax movl %eax, 0x28(%rsp) movb $0x1, 0x8(%rsp) cmpq $0x0, 0x90(%rbx) je 0x5c563 leaq 0x80(%rbx), %rdi leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx callq *0x98(%rbx) testb %al, %al jne 0x5c3b8 leaq 0xa8(%rbx), %rsi leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x5d6e2 movq 0x10(%rbx), %rax movq -0x8(%rax), %rdi movq %r14, %rsi callq 0x5ae62 movq %r14, %rdi xorl %esi, %esi callq 0x586c0 movq %r14, %rdi callq 0x5dbae movq 0x8(%rbx), %rcx movq 0x10(%rbx), %rax cmpq %rax, %rcx je 0x5c526 movq 0x30(%rbx), %rdx movl 0x38(%rbx), %esi cmpq %rdx, 0x20(%rbx) sete %dil testl %esi, %esi sete %r8b andb %dil, %r8b cmpb $0x1, %r8b je 0x5c542 leaq -0x8(%rax), %rdi movq %rdi, 0x10(%rbx) subl $0x1, %esi movl %esi, 0x38(%rbx) jae 0x5c40a movl $0x3f, 0x38(%rbx) addq $-0x8, %rdx movq %rdx, 0x30(%rbx) cmpq %rdi, %rcx je 0x5c515 movq -0x10(%rax), %rax testq %rax, %rax je 0x5c515 movb (%rax), %cl decb %cl cmpb $0x1, %cl ja 0x5c515 movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000 leaq 0x28(%rsp), %r14 movq %rax, (%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r14) movq %r12, 0x18(%r14) movq %r14, %rdi callq 0x5e596 movq 0x10(%rbx), %rax movq -0x8(%rax), %rax leaq 0x8(%rsp), %r15 movq %rax, (%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r15) movq %r12, 0x18(%r15) movq %r15, %rdi callq 0x5e912 movq %r14, %rdi movq %r15, %rsi callq 0x5e608 testb %al, %al jne 0x5c515 leaq 0x30(%rsp), %r13 leaq 0x10(%rsp), %rbp leaq 0x28(%rsp), %r14 leaq 0x8(%rsp), %r15 movq %r14, %rdi callq 0x5d786 cmpb $0x9, (%rax) je 0x5c4e5 movq %r14, %rdi callq 0x5db60 movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq %rax, 0x8(%rsp) xorps %xmm0, %xmm0 movups %xmm0, (%rbp) movq %r12, 0x20(%rsp) movq %r15, %rdi callq 0x5e912 movq %r14, %rdi movq %r15, %rsi callq 0x5e608 testb %al, %al je 0x5c49e jmp 0x5c515 movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq 0x28(%rsp), %rax leaq 0x58(%rsp), %rdx movq %rax, (%rdx) movups (%r13), %xmm0 movups %xmm0, 0x8(%rdx) movq 0x10(%r13), %rax movq %rax, 0x18(%rdx) leaq 0x8(%rsp), %rdi callq 0x5d8d2 movb $0x1, %al addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8f8a0(%rip), %rdi # 0xebdcd leaq 0x8f8e3(%rip), %rdx # 0xebe17 leaq 0x90894(%rip), %rcx # 0xecdcf movl $0x1bbd, %esi # imm = 0x1BBD jmp 0x5c55c leaq 0x8f884(%rip), %rdi # 0xebdcd leaq 0x8f8c7(%rip), %rdx # 0xebe17 leaq 0x907f2(%rip), %rcx # 0xecd49 movl $0x1bbe, %esi # imm = 0x1BBE xorl %eax, %eax callq 0x1aed0 callq 0x1a320
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rdi mov rax, [rdi+10h] mov rcx, [rax-8] test rcx, rcx jz short loc_5C3B8 sub rax, [rbx+8] shr rax, 3 dec eax mov dword ptr [rsp+0A8h+var_80], eax mov byte ptr [rsp+0A8h+var_A0], 1 cmp qword ptr [rbx+90h], 0 jz loc_5C563 lea rdi, [rbx+80h] lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A0] call qword ptr [rbx+98h] test al, al jnz short loc_5C3B8 lea rsi, [rbx+0A8h] lea r14, [rsp+0A8h+var_60] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [rbx+10h] mov rdi, [rax-8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_5C3B8: mov rcx, [rbx+8] mov rax, [rbx+10h] cmp rcx, rax jz loc_5C526 mov rdx, [rbx+30h] mov esi, [rbx+38h] cmp [rbx+20h], rdx setz dil test esi, esi setz r8b and r8b, dil cmp r8b, 1 jz loc_5C542 lea rdi, [rax-8] mov [rbx+10h], rdi sub esi, 1 mov [rbx+38h], esi jnb short loc_5C40A mov dword ptr [rbx+38h], 3Fh ; '?' add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx loc_5C40A: cmp rcx, rdi jz loc_5C515 mov rax, [rax-10h] test rax, rax jz loc_5C515 mov cl, [rax] dec cl cmp cl, 1 ja loc_5C515 mov r12, 8000000000000000h lea r14, [rsp+0A8h+var_80] mov [r14], rax xorps xmm0, xmm0 movups xmmword ptr [r14+8], xmm0 mov [r14+18h], r12 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; 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>>::set_begin(void) mov rax, [rbx+10h] mov rax, [rax-8] lea r15, [rsp+0A8h+var_A0] mov [r15], rax xorps xmm0, xmm0 movups xmmword ptr [r15+8], xmm0 mov [r15+18h], r12 mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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>>::set_end(void) mov rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jnz loc_5C515 lea r13, [rsp+0A8h+var_78] lea rbp, [rsp+0A8h+var_98] lea r14, [rsp+0A8h+var_80] lea r15, [rsp+0A8h+var_A0] loc_5C49E: mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; 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>>::operator->(void) cmp byte ptr [rax], 9 jz short loc_5C4E5 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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>>::operator++(void) mov rax, [rbx+10h] mov rax, [rax-8] mov [rsp+0A8h+var_A0], rax xorps xmm0, xmm0 movups xmmword ptr [rbp+0], xmm0 mov [rsp+0A8h+var_88], r12 mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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>>::set_end(void) mov rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jz short loc_5C49E jmp short loc_5C515 loc_5C4E5: mov rax, [rbx+10h] mov rsi, [rax-8] mov rax, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_50] mov [rdx], rax movups xmm0, xmmword ptr [r13+0] movups xmmword ptr [rdx+8], xmm0 mov rax, [r13+10h] mov [rdx+18h], rax lea rdi, [rsp+0A8h+var_A0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ loc_5C515: mov al, 1 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5C526: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1BBDh jmp short loc_5C55C loc_5C542: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1BBEh loc_5C55C: xor eax, eax call _ggml_abort loc_5C563: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
char 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>>::end_object( long long a1) { long long v1; // rax long long v2; // rcx long long v3; // rax long long v4; // rdx int v5; // esi _BYTE *v6; // rax long long v7; // rsi long long v9; // [rsp+8h] [rbp-A0h] BYREF __int128 v10; // [rsp+10h] [rbp-98h] unsigned long long v11; // [rsp+20h] [rbp-88h] _BYTE *v12; // [rsp+28h] [rbp-80h] BYREF __int128 v13; // [rsp+30h] [rbp-78h] unsigned long long v14; // [rsp+40h] [rbp-68h] char v15[16]; // [rsp+48h] [rbp-60h] BYREF _BYTE *v16; // [rsp+58h] [rbp-50h] __int128 v17; // [rsp+60h] [rbp-48h] unsigned long long v18; // [rsp+70h] [rbp-38h] v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(v1 - 8) ) { LODWORD(v12) = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1; LOBYTE(v9) = 1; if ( !*(_QWORD *)(a1 + 144) ) goto LABEL_20; if ( !(*(unsigned __int8 ( **)(long long, _BYTE **, long long *))(a1 + 152))(a1 + 128, &v12, &v9) ) { 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( v15, a1 + 168); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL), (long long)v15); 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(v15); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15); } } v2 = *(_QWORD *)(a1 + 8); v3 = *(_QWORD *)(a1 + 16); if ( v2 == v3 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7101LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); goto LABEL_20; } v4 = *(_QWORD *)(a1 + 48); v5 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v4 && v5 == 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7102LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); LABEL_20: std::__throw_bad_function_call(); } *(_QWORD *)(a1 + 16) = v3 - 8; *(_DWORD *)(a1 + 56) = v5 - 1; if ( !v5 ) { *(_DWORD *)(a1 + 56) = 63; *(_QWORD *)(a1 + 48) = v4 - 8; } if ( v2 != v3 - 8 ) { v6 = *(_BYTE **)(v3 - 16); if ( v6 ) { if ( (unsigned __int8)(*v6 - 1) <= 1u ) { v12 = v6; v13 = 0LL; v14 = 0x8000000000000000LL; 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>>::set_begin(&v12); v9 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL); v10 = 0LL; v11 = 0x8000000000000000LL; 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>>::set_end(&v9); if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v12, &v9) ) { while ( *(_BYTE *)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>>::operator->(&v12) != 9 ) { 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>>::operator++(&v12); v9 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL); v10 = 0LL; v11 = 0x8000000000000000LL; 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>>::set_end(&v9); if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v12, &v9) ) return 1; } v7 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL); v16 = v12; v17 = v13; v18 = v14; ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( &v9, v7); } } } } return 1; }
end_object: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RAX + -0x8] TEST RCX,RCX JZ 0x0015c3b8 SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 DEC EAX MOV dword ptr [RSP + 0x28],EAX MOV byte ptr [RSP + 0x8],0x1 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0015c563 LEA RDI,[RBX + 0x80] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL qword ptr [RBX + 0x98] TEST AL,AL JNZ 0x0015c3b8 LEA RSI,[RBX + 0xa8] LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x0015d6e2 MOV RAX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,R14 CALL 0x0015ae62 MOV RDI,R14 XOR ESI,ESI CALL 0x001586c0 MOV RDI,R14 CALL 0x0015dbae LAB_0015c3b8: MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x10] CMP RCX,RAX JZ 0x0015c526 MOV RDX,qword ptr [RBX + 0x30] MOV ESI,dword ptr [RBX + 0x38] CMP qword ptr [RBX + 0x20],RDX SETZ DIL TEST ESI,ESI SETZ R8B AND R8B,DIL CMP R8B,0x1 JZ 0x0015c542 LEA RDI,[RAX + -0x8] MOV qword ptr [RBX + 0x10],RDI SUB ESI,0x1 MOV dword ptr [RBX + 0x38],ESI JNC 0x0015c40a MOV dword ptr [RBX + 0x38],0x3f ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX LAB_0015c40a: CMP RCX,RDI JZ 0x0015c515 MOV RAX,qword ptr [RAX + -0x10] TEST RAX,RAX JZ 0x0015c515 MOV CL,byte ptr [RAX] DEC CL CMP CL,0x1 JA 0x0015c515 MOV R12,-0x8000000000000000 LEA R14,[RSP + 0x28] MOV qword ptr [R14],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x8],XMM0 MOV qword ptr [R14 + 0x18],R12 MOV RDI,R14 CALL 0x0015e596 MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] LEA R15,[RSP + 0x8] MOV qword ptr [R15],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x8],XMM0 MOV qword ptr [R15 + 0x18],R12 MOV RDI,R15 CALL 0x0015e912 MOV RDI,R14 MOV RSI,R15 CALL 0x0015e608 TEST AL,AL JNZ 0x0015c515 LEA R13,[RSP + 0x30] LEA RBP,[RSP + 0x10] LEA R14,[RSP + 0x28] LEA R15,[RSP + 0x8] LAB_0015c49e: MOV RDI,R14 CALL 0x0015d786 CMP byte ptr [RAX],0x9 JZ 0x0015c4e5 MOV RDI,R14 CALL 0x0015db60 MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV qword ptr [RSP + 0x8],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP],XMM0 MOV qword ptr [RSP + 0x20],R12 MOV RDI,R15 CALL 0x0015e912 MOV RDI,R14 MOV RSI,R15 CALL 0x0015e608 TEST AL,AL JZ 0x0015c49e JMP 0x0015c515 LAB_0015c4e5: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RSP + 0x28] LEA RDX,[RSP + 0x58] MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RDX + 0x8],XMM0 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RDX + 0x18],RAX LEA RDI,[RSP + 0x8] CALL 0x0015d8d2 LAB_0015c515: MOV AL,0x1 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015c526: LEA RDI,[0x1ebdcd] LEA RDX,[0x1ebe17] LEA RCX,[0x1ecdcf] MOV ESI,0x1bbd JMP 0x0015c55c LAB_0015c542: LEA RDI,[0x1ebdcd] LEA RDX,[0x1ebe17] LEA RCX,[0x1ecd49] MOV ESI,0x1bbe LAB_0015c55c: XOR EAX,EAX CALL 0x0011aed0 LAB_0015c563: CALL 0x0011a320
/* 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> >::end_object() */ int8 __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>> ::end_object(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) { int iVar1; long lVar2; char cVar3; char *pcVar4; int8 uVar5; int8 local_a0; int8 local_98; int8 uStack_90; int8 local_88; char *local_80; int8 local_78; int8 uStack_70; int8 local_68; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_60 [16]; char *local_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; if (*(long *)(*(long *)(this + 0x10) + -8) != 0) { local_80 = (char *)CONCAT44(local_80._4_4_, (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1); local_a0 = CONCAT71(local_a0._1_7_,1); if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } cVar3 = (**(code **)(this + 0x98))(this + 0x80,&local_80,&local_a0); if (cVar3 == '\0') { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_60,(basic_json *)(this + 0xa8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(*(long *)(this + 0x10) + -8),local_60); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_60,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_60); } } lVar2 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar2) { pcVar4 = "!ref_stack.empty()"; uVar5 = 0x1bbd; } else { iVar1 = *(int *)(this + 0x38); if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) { *(long *)(this + 0x10) = lVar2 + -8; *(int *)(this + 0x38) = iVar1 + -1; if (iVar1 == 0) { *(int4 *)(this + 0x38) = 0x3f; *(long *)(this + 0x30) = *(long *)(this + 0x30) + -8; } if (((*(long *)(this + 8) != lVar2 + -8) && (local_80 = *(char **)(lVar2 + -0x10), local_80 != (char *)0x0)) && ((byte)(*local_80 - 1U) < 2)) { local_78 = 0; uStack_70 = 0; local_68 = 0x8000000000000000; 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>> ::set_begin((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>> *)&local_80); local_a0 = *(int8 *)(*(long *)(this + 0x10) + -8); local_98 = 0; uStack_90 = 0; local_88 = 0x8000000000000000; 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>> ::set_end((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>> *)&local_a0); cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ ((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>> *)&local_80, (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>> *)&local_a0); if (cVar3 == '\0') { do { pcVar4 = (char *)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>> ::operator->((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>> *)&local_80); if (*pcVar4 == '\t') { local_50 = local_80; local_48 = (int4)local_78; uStack_44 = local_78._4_4_; uStack_40 = (int4)uStack_70; uStack_3c = uStack_70._4_4_; local_38 = local_68; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (&local_a0,*(int8 *)(*(long *)(this + 0x10) + -8)); return 1; } 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>> ::operator++((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>> *)&local_80); local_a0 = *(int8 *)(*(long *)(this + 0x10) + -8); local_98 = 0; uStack_90 = 0; local_88 = 0x8000000000000000; 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>> ::set_end((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>> *)&local_a0); cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ ((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>> *)&local_80, (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>> *)&local_a0); } while (cVar3 == '\0'); } } return 1; } pcVar4 = "!keep_stack.empty()"; uVar5 = 0x1bbe; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5, "GGML_ASSERT(%s) failed",pcVar4); }
2,015
testing::TestSuite::Run()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void TestSuite::Run() { if (!should_run_) return; UnitTest::GetInstance()->set_current_test_suite(this); TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); // Ensure our tests are in a deterministic order. // // We do this by sorting lexicographically on (file, line number), providing // an order matching what the user can see in the source code. // // In the common case the line number comparison shouldn't be necessary, // because the registrations made by the TEST macro are executed in order // within a translation unit. But this is not true of the manual registration // API, and in more exotic scenarios a single file may be part of multiple // translation units. std::stable_sort(test_info_list_.begin(), test_info_list_.end(), [](const TestInfo* const a, const TestInfo* const b) { if (const int result = std::strcmp(a->file(), b->file())) { return result < 0; } return a->line() < b->line(); }); // Call both legacy and the new API repeater->OnTestSuiteStart(*this); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ repeater->OnTestCaseStart(*this); #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ UnitTest::GetInstance()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()"); const bool skip_all = ad_hoc_test_result().Failed() || ad_hoc_test_result().Skipped(); start_timestamp_ = internal::GetTimeInMillis(); internal::Timer timer; for (int i = 0; i < total_test_count(); i++) { if (skip_all) { GetMutableTestInfo(i)->Skip(); } else { GetMutableTestInfo(i)->Run(); } if (GTEST_FLAG_GET(fail_fast) && GetMutableTestInfo(i)->result()->Failed()) { for (int j = i + 1; j < total_test_count(); j++) { GetMutableTestInfo(j)->Skip(); } break; } } elapsed_time_ = timer.Elapsed(); UnitTest::GetInstance()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &TestSuite::RunTearDownTestSuite, "TearDownTestSuite()"); // Call both legacy and the new API repeater->OnTestSuiteEnd(*this); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ repeater->OnTestCaseEnd(*this); #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ UnitTest::GetInstance()->set_current_test_suite(nullptr); }
O1
cpp
testing::TestSuite::Run(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpb $0x1, 0x70(%rdi) jne 0x21c01 movq %rdi, %rbx callq 0x19012 leaq 0x37bda(%rip), %rdi # 0x59770 movq %rbx, %rsi callq 0x21e8a callq 0x19012 movq 0x37c06(%rip), %rax # 0x597b0 movq 0x268(%rax), %r14 movq 0x30(%rbx), %rbp movq 0x38(%rbx), %r13 cmpq %r13, %rbp je 0x21c2a movq %r13, %rax subq %rbp, %rax sarq $0x3, %rax leaq 0x1(%rax), %rcx shrq $0x3f, %rcx leaq (%rax,%rcx), %rdi incq %rdi sarq %rdi callq 0x3ba6d movq %rax, %r12 movq %rdx, %r15 testq %rax, %rax cmoveq %rax, %r15 je 0x21c10 movq %rbp, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx callq 0x30ee3 jmp 0x21c1b addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, %rdi movq %r13, %rsi callq 0x30e6c shlq $0x3, %r15 movq %r12, %rdi movq %r15, %rsi callq 0x84e0 movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x30(%rax) movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x38(%rax) callq 0x19012 leaq 0x37b22(%rip), %rdi # 0x59770 callq 0x21706 leaq 0x12e92(%rip), %rsi # 0x34aec leaq 0x21499(%rip), %rcx # 0x430fa movq %rbx, %rdi xorl %edx, %edx callq 0x34967 leaq 0x88(%rbx), %r15 movq %r15, %rdi callq 0x2031a movb $0x1, %bpl testb %al, %al jne 0x21c8b movq %r15, %rdi callq 0x202de movl %eax, %ebp callq 0x8090 movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x12, %rdx addq %rax, %rdx movq %rdx, 0x78(%rbx) callq 0x8740 movq %rax, (%rsp) movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x21de4 movl $0x1, %r13d movl $0x90, %r12d leaq -0x1(%r13), %r15 testb %bpl, %bpl je 0x21d12 movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r15 jge 0x21d05 movl -0x4(%rcx,%r13,4), %edx movl %edx, %ecx movq (%rax,%rcx,8), %rdi callq 0x2173e jmp 0x21d3e movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r15 jge 0x21d33 movl -0x4(%rcx,%r13,4), %edx movl %edx, %ecx movq (%rax,%rcx,8), %rdi callq 0x21558 cmpb $0x1, 0x3793d(%rip) # 0x59682 jne 0x21d7e movq 0x48(%rbx), %rax movq 0x50(%rbx), %rcx subq %rax, %rcx shrq $0x2, %rcx movslq %ecx, %rdx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rdx, %r15 jge 0x21d68 movl -0x4(%rax,%r13,4), %ecx movl %ecx, %eax movq 0x30(%rbx), %rcx movq (%rcx,%rax,8), %rdi addq %r12, %rdi callq 0x2031a testb %al, %al jne 0x21dd0 movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx leaq 0x1(%r13), %rdx cmpq %rcx, %r13 movq %rdx, %r13 jl 0x21cdb jmp 0x21de4 movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r13 jge 0x21dc2 movl (%rcx,%r13,4), %edx movl %edx, %ecx movq (%rax,%rcx,8), %rdi callq 0x2173e incq %r13 movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx cmpl %ecx, %r13d jl 0x21da2 callq 0x8740 subq (%rsp), %rax movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x12, %rdx addq %rax, %rdx movq %rdx, 0x80(%rbx) callq 0x19012 leaq 0x37955(%rip), %r15 # 0x59770 movq %r15, %rdi callq 0x21706 leaq 0x12cce(%rip), %rsi # 0x34af8 leaq 0x212da(%rip), %rcx # 0x4310b movq %rbx, %rdi xorl %edx, %edx callq 0x34967 movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x60(%rax) movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x68(%rax) callq 0x19012 movq %r15, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x21e8a movq %rax, %rbx shlq $0x3, %r15 movq %r12, %rdi movq %r15, %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZN7testing9TestSuite3RunEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax cmp byte ptr [rdi+70h], 1 jnz short loc_21C01 mov rbx, rdi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) lea rdi, _ZZN7testing8UnitTest11GetInstanceEvE8instance; this mov rsi, rbx; testing::TestSuite * call _ZN7testing8UnitTest22set_current_test_suiteEPNS_9TestSuiteE; testing::UnitTest::set_current_test_suite(testing::TestSuite *) call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rax, cs:qword_597B0 mov r14, [rax+268h] mov rbp, [rbx+30h] mov r13, [rbx+38h] cmp rbp, r13 jz short loc_21C2A mov rax, r13 sub rax, rbp sar rax, 3 lea rcx, [rax+1] shr rcx, 3Fh lea rdi, [rax+rcx] inc rdi sar rdi, 1 call _ZSt20get_temporary_bufferIPN7testing8TestInfoEESt4pairIPT_lEl; std::get_temporary_buffer<testing::TestInfo *>(long) mov r12, rax mov r15, rdx test rax, rax cmovz r15, rax jz short loc_21C10 mov rdi, rbp mov rsi, r13 mov rdx, r12 mov rcx, r15 call _ZSt22__stable_sort_adaptiveIN9__gnu_cxx17__normal_iteratorIPPN7testing8TestInfoESt6vectorIS4_SaIS4_EEEES5_lNS0_5__ops15_Iter_comp_iterIZNS2_9TestSuite3RunEvE3$_0EEEvT_SF_T0_T1_T2_; std::__stable_sort_adaptive<__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,testing::TestInfo **,long,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run(void)::$_0>>(__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,testing::TestInfo **,long,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run(void)::$_0>) jmp short loc_21C1B loc_21C01: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_21C10: mov rdi, rbp mov rsi, r13 call _ZSt21__inplace_stable_sortIN9__gnu_cxx17__normal_iteratorIPPN7testing8TestInfoESt6vectorIS4_SaIS4_EEEENS0_5__ops15_Iter_comp_iterIZNS2_9TestSuite3RunEvE3$_0EEEvT_SF_T0_; std::__inplace_stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run(void)::$_0>>(__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run(void)::$_0>) loc_21C1B: shl r15, 3 mov rdi, r12; void * mov rsi, r15; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_21C2A: mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+30h] mov rax, [r14] mov rdi, r14; this mov rsi, rbx call qword ptr [rax+38h] call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) lea rdi, _ZZN7testing8UnitTest11GetInstanceEvE8instance; this call _ZN7testing8UnitTest16UponLeavingGTestEv; testing::UnitTest::UponLeavingGTest(void) lea rsi, _ZN7testing9TestSuite17RunSetUpTestSuiteEv; testing::TestSuite::RunSetUpTestSuite(void) lea rcx, aSetuptestsuite; "SetUpTestSuite()" mov rdi, rbx xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>(testing::TestSuite *,void (testing::TestSuite::*)(void),char const*) lea r15, [rbx+88h] mov rdi, r15; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) mov bpl, 1 test al, al jnz short loc_21C8B mov rdi, r15; this call _ZNK7testing10TestResult7SkippedEv; testing::TestResult::Skipped(void) mov ebp, eax loc_21C8B: call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 431BDE82D7B634DBh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 12h add rdx, rax mov [rbx+78h], rdx call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void) mov [rsp+38h+var_38], rax mov rax, [rbx+30h] mov rcx, [rbx+38h] sub rcx, rax shr rcx, 3 test ecx, ecx jle loc_21DE4 mov r13d, 1 mov r12d, 90h loc_21CDB: lea r15, [r13-1] test bpl, bpl jz short loc_21D12 mov rcx, [rbx+48h] mov rdx, [rbx+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r15, rsi jge short loc_21D05 mov edx, [rcx+r13*4-4] loc_21D05: mov ecx, edx mov rdi, [rax+rcx*8]; this call _ZN7testing8TestInfo4SkipEv; testing::TestInfo::Skip(void) jmp short loc_21D3E loc_21D12: mov rcx, [rbx+48h] mov rdx, [rbx+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r15, rsi jge short loc_21D33 mov edx, [rcx+r13*4-4] loc_21D33: mov ecx, edx mov rdi, [rax+rcx*8]; this call _ZN7testing8TestInfo3RunEv; testing::TestInfo::Run(void) loc_21D3E: cmp cs:_ZN7testing21FLAGS_gtest_fail_fastE, 1; testing::FLAGS_gtest_fail_fast jnz short loc_21D7E mov rax, [rbx+48h] mov rcx, [rbx+50h] sub rcx, rax shr rcx, 2 movsxd rdx, ecx mov ecx, 0FFFFFFFFh cmp r15, rdx jge short loc_21D68 mov ecx, [rax+r13*4-4] loc_21D68: mov eax, ecx mov rcx, [rbx+30h] mov rdi, [rcx+rax*8] add rdi, r12; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) test al, al jnz short loc_21DD0 loc_21D7E: mov rax, [rbx+30h] mov rcx, [rbx+38h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx lea rdx, [r13+1] cmp r13, rcx mov r13, rdx jl loc_21CDB jmp short loc_21DE4 loc_21DA2: mov rcx, [rbx+48h] mov rdx, [rbx+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r13, rsi jge short loc_21DC2 mov edx, [rcx+r13*4] loc_21DC2: mov ecx, edx mov rdi, [rax+rcx*8]; this call _ZN7testing8TestInfo4SkipEv; testing::TestInfo::Skip(void) inc r13 loc_21DD0: mov rax, [rbx+30h] mov rcx, [rbx+38h] sub rcx, rax shr rcx, 3 cmp r13d, ecx jl short loc_21DA2 loc_21DE4: call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void) sub rax, [rsp+38h+var_38] mov rcx, 431BDE82D7B634DBh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 12h add rdx, rax mov [rbx+80h], rdx call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) lea r15, _ZZN7testing8UnitTest11GetInstanceEvE8instance; testing::UnitTest::GetInstance(void)::instance mov rdi, r15; this call _ZN7testing8UnitTest16UponLeavingGTestEv; testing::UnitTest::UponLeavingGTest(void) lea rsi, _ZN7testing9TestSuite20RunTearDownTestSuiteEv; testing::TestSuite::RunTearDownTestSuite(void) lea rcx, aTeardowntestsu; "TearDownTestSuite()" mov rdi, rbx xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>(testing::TestSuite *,void (testing::TestSuite::*)(void),char const*) mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+60h] mov rax, [r14] mov rdi, r14; this mov rsi, rbx call qword ptr [rax+68h] call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, r15; this xor esi, esi; testing::TestSuite * add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZN7testing8UnitTest22set_current_test_suiteEPNS_9TestSuiteE; testing::UnitTest::set_current_test_suite(testing::TestSuite *) mov rbx, rax shl r15, 3 mov rdi, r12; void * mov rsi, r15; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume
long long testing::TestSuite::Run(testing::TestSuite *this) { long long result; // rax testing::UnitTest *v3; // r14 long long v4; // rbp long long v5; // r13 long long v6; // rax long long v7; // rdx void *v8; // r12 long long v9; // r15 std::chrono::_V2::system_clock *v10; // rdi char v11; // bp long long v12; // rax long long v13; // r13 long long v14; // r15 long long v15; // rcx unsigned int v16; // edx long long v17; // rcx unsigned int v18; // edx long long v19; // rax unsigned int v20; // ecx long long v22; // rcx unsigned int v23; // edx long long v24; // rax long long v25; // [rsp+0h] [rbp-38h] if ( *((_BYTE *)this + 112) == 1 ) { testing::UnitTest::GetInstance(this); testing::UnitTest::set_current_test_suite( (testing::UnitTest *)&testing::UnitTest::GetInstance(void)::instance, this); testing::UnitTest::GetInstance((testing::UnitTest *)&testing::UnitTest::GetInstance(void)::instance); v3 = (testing::UnitTest *)*((_QWORD *)qword_597B0 + 77); v4 = *((_QWORD *)this + 6); v5 = *((_QWORD *)this + 7); if ( v4 != v5 ) { v6 = std::get_temporary_buffer<testing::TestInfo *>((long long)(((v5 - v4) >> 3) + ((unsigned long long)(((v5 - v4) >> 3) + 1) >> 63) + 1) >> 1); v8 = (void *)v6; v9 = v7; if ( v6 ) { std::__stable_sort_adaptive<__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,testing::TestInfo **,long,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run(void)::$_0>>( v4, v5, v6, v7); } else { v9 = 0LL; std::__inplace_stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run(void)::$_0>>( v4, v5); } operator delete(v8, 8 * v9); } (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v3 + 48LL))(v3, this); (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v3 + 56LL))(v3, this); testing::UnitTest::GetInstance(v3); testing::UnitTest::UponLeavingGTest((testing::UnitTest *)&testing::UnitTest::GetInstance(void)::instance); testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>( this, testing::TestSuite::RunSetUpTestSuite, 0LL, "SetUpTestSuite()"); v10 = (testing::TestSuite *)((char *)this + 136); v11 = 1; if ( !(unsigned __int8)testing::TestResult::Failed((testing::TestSuite *)((char *)this + 136)) ) { v10 = (testing::TestSuite *)((char *)this + 136); v11 = testing::TestResult::Skipped((testing::TestSuite *)((char *)this + 136)); } *((_QWORD *)this + 15) = std::chrono::_V2::system_clock::now(v10) / 1000000LL; v25 = std::chrono::_V2::steady_clock::now(v10); v12 = *((_QWORD *)this + 6); if ( (int)((unsigned long long)(*((_QWORD *)this + 7) - v12) >> 3) > 0 ) { v13 = 1LL; while ( 1 ) { v14 = v13 - 1; if ( v11 ) { v15 = *((_QWORD *)this + 9); v16 = -1; if ( v14 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v15) >> 2) ) v16 = *(_DWORD *)(v15 + 4 * v13 - 4); v10 = *(std::chrono::_V2::system_clock **)(v12 + 8LL * v16); testing::TestInfo::Skip(v10); } else { v17 = *((_QWORD *)this + 9); v18 = -1; if ( v14 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v17) >> 2) ) v18 = *(_DWORD *)(v17 + 4 * v13 - 4); v10 = *(std::chrono::_V2::system_clock **)(v12 + 8LL * v18); testing::TestInfo::Run(v10); } if ( testing::FLAGS_gtest_fail_fast == 1 ) { v19 = *((_QWORD *)this + 9); v20 = -1; if ( v14 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v19) >> 2) ) v20 = *(_DWORD *)(v19 + 4 * v13 - 4); v10 = (std::chrono::_V2::system_clock *)(*(_QWORD *)(*((_QWORD *)this + 6) + 8LL * v20) + 144LL); if ( (unsigned __int8)testing::TestResult::Failed(v10) ) break; } v12 = *((_QWORD *)this + 6); if ( v13++ >= (int)((unsigned long long)(*((_QWORD *)this + 7) - v12) >> 3) ) goto LABEL_29; } while ( 1 ) { v24 = *((_QWORD *)this + 6); if ( (int)v13 >= (int)((unsigned long long)(*((_QWORD *)this + 7) - v24) >> 3) ) break; v22 = *((_QWORD *)this + 9); v23 = -1; if ( v13 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v22) >> 2) ) v23 = *(_DWORD *)(v22 + 4 * v13); v10 = *(std::chrono::_V2::system_clock **)(v24 + 8LL * v23); testing::TestInfo::Skip(v10); ++v13; } } LABEL_29: *((_QWORD *)this + 16) = (std::chrono::_V2::steady_clock::now(v10) - v25) / 1000000; testing::UnitTest::GetInstance(v10); testing::UnitTest::UponLeavingGTest((testing::UnitTest *)&testing::UnitTest::GetInstance(void)::instance); testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>( this, testing::TestSuite::RunTearDownTestSuite, 0LL, "TearDownTestSuite()"); (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v3 + 96LL))(v3, this); (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v3 + 104LL))(v3, this); testing::UnitTest::GetInstance(v3); return testing::UnitTest::set_current_test_suite( (testing::UnitTest *)&testing::UnitTest::GetInstance(void)::instance, 0LL); } return result; }
Run: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP byte ptr [RDI + 0x70],0x1 JNZ 0x00121c01 MOV RBX,RDI CALL 0x00119012 LEA RDI,[0x159770] MOV RSI,RBX CALL 0x00121e8a CALL 0x00119012 MOV RAX,qword ptr [0x001597b0] MOV R14,qword ptr [RAX + 0x268] MOV RBP,qword ptr [RBX + 0x30] MOV R13,qword ptr [RBX + 0x38] CMP RBP,R13 JZ 0x00121c2a MOV RAX,R13 SUB RAX,RBP SAR RAX,0x3 LEA RCX,[RAX + 0x1] SHR RCX,0x3f LEA RDI,[RAX + RCX*0x1] INC RDI SAR RDI,0x1 CALL 0x0013ba6d MOV R12,RAX MOV R15,RDX TEST RAX,RAX CMOVZ R15,RAX JZ 0x00121c10 LAB_00121bee: MOV RDI,RBP MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 CALL 0x00130ee3 JMP 0x00121c1b LAB_00121c01: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00121c10: MOV RDI,RBP MOV RSI,R13 CALL 0x00130e6c LAB_00121c1b: SHL R15,0x3 MOV RDI,R12 MOV RSI,R15 CALL 0x001084e0 LAB_00121c2a: MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x30] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x38] CALL 0x00119012 LEA RDI,[0x159770] CALL 0x00121706 LEA RSI,[0x134aec] LEA RCX,[0x1430fa] MOV RDI,RBX XOR EDX,EDX CALL 0x00134967 LEA R15,[RBX + 0x88] MOV RDI,R15 CALL 0x0012031a MOV BPL,0x1 TEST AL,AL JNZ 0x00121c8b MOV RDI,R15 CALL 0x001202de MOV EBP,EAX LAB_00121c8b: CALL 0x00108090 MOV RCX,0x431bde82d7b634db IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x12 ADD RDX,RAX MOV qword ptr [RBX + 0x78],RDX CALL 0x00108740 MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x00121de4 MOV R13D,0x1 MOV R12D,0x90 LAB_00121cdb: LEA R15,[R13 + -0x1] TEST BPL,BPL JZ 0x00121d12 MOV RCX,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R15,RSI JGE 0x00121d05 MOV EDX,dword ptr [RCX + R13*0x4 + -0x4] LAB_00121d05: MOV ECX,EDX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x0012173e JMP 0x00121d3e LAB_00121d12: MOV RCX,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R15,RSI JGE 0x00121d33 MOV EDX,dword ptr [RCX + R13*0x4 + -0x4] LAB_00121d33: MOV ECX,EDX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00121558 LAB_00121d3e: CMP byte ptr [0x00159682],0x1 JNZ 0x00121d7e MOV RAX,qword ptr [RBX + 0x48] MOV RCX,qword ptr [RBX + 0x50] SUB RCX,RAX SHR RCX,0x2 MOVSXD RDX,ECX MOV ECX,0xffffffff CMP R15,RDX JGE 0x00121d68 MOV ECX,dword ptr [RAX + R13*0x4 + -0x4] LAB_00121d68: MOV EAX,ECX MOV RCX,qword ptr [RBX + 0x30] MOV RDI,qword ptr [RCX + RAX*0x8] ADD RDI,R12 CALL 0x0012031a TEST AL,AL JNZ 0x00121dd0 LAB_00121d7e: MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX LEA RDX,[R13 + 0x1] CMP R13,RCX MOV R13,RDX JL 0x00121cdb JMP 0x00121de4 LAB_00121da2: MOV RCX,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R13,RSI JGE 0x00121dc2 MOV EDX,dword ptr [RCX + R13*0x4] LAB_00121dc2: MOV ECX,EDX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x0012173e INC R13 LAB_00121dd0: MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] SUB RCX,RAX SHR RCX,0x3 CMP R13D,ECX JL 0x00121da2 LAB_00121de4: CALL 0x00108740 SUB RAX,qword ptr [RSP] MOV RCX,0x431bde82d7b634db IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x12 ADD RDX,RAX MOV qword ptr [RBX + 0x80],RDX CALL 0x00119012 LEA R15,[0x159770] MOV RDI,R15 CALL 0x00121706 LEA RSI,[0x134af8] LEA RCX,[0x14310b] MOV RDI,RBX XOR EDX,EDX CALL 0x00134967 MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x60] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x68] CALL 0x00119012 MOV RDI,R15 XOR ESI,ESI ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00121e8a
/* testing::TestSuite::Run() */ void __thiscall testing::TestSuite::Run(TestSuite *this) { long lVar1; long *plVar2; bool bVar3; char cVar4; char cVar5; long lVar6; void *pvVar7; long lVar8; long lVar9; uint uVar10; int1 auVar11 [16]; if (this[0x70] != (TestSuite)0x1) { return; } UnitTest::GetInstance(); UnitTest::set_current_test_suite((UnitTest *)UnitTest::GetInstance()::instance,this); UnitTest::GetInstance(); plVar2 = *(long **)(UnitTest::GetInstance()::instance._64_8_ + 0x268); lVar8 = *(long *)(this + 0x30); lVar9 = *(long *)(this + 0x38); if (lVar8 != lVar9) { lVar6 = lVar9 - lVar8 >> 3; auVar11 = std::get_temporary_buffer<testing::TestInfo*>((lVar6 - (lVar6 + 1 >> 0x3f)) + 1 >> 1); lVar6 = auVar11._8_8_; pvVar7 = auVar11._0_8_; if (pvVar7 == (void *)0x0) { std:: __inplace_stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run()::__0>> (lVar8,lVar9); lVar6 = 0; } else { /* try { // try from 00121bee to 00121c1a has its CatchHandler @ 00121e70 */ std:: __stable_sort_adaptive<__gnu_cxx::__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>,testing::TestInfo**,long,__gnu_cxx::__ops::_Iter_comp_iter<testing::TestSuite::Run()::__0>> (lVar8,lVar9,pvVar7,lVar6); } operator_delete(pvVar7,lVar6 << 3); } (**(code **)(*plVar2 + 0x30))(plVar2,this); (**(code **)(*plVar2 + 0x38))(plVar2,this); UnitTest::GetInstance(); UnitTest::UponLeavingGTest((UnitTest *)UnitTest::GetInstance()::instance); internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void> (this,RunSetUpTestSuite,(char *)0x0); cVar4 = TestResult::Failed((TestResult *)(this + 0x88)); cVar5 = '\x01'; if (cVar4 == '\0') { cVar5 = TestResult::Skipped((TestResult *)(this + 0x88)); } lVar8 = std::chrono::_V2::system_clock::now(); *(long *)(this + 0x78) = lVar8 / 1000000; lVar9 = std::chrono::_V2::steady_clock::now(); lVar8 = *(long *)(this + 0x30); if (0 < (int)((ulong)(*(long *)(this + 0x38) - lVar8) >> 3)) { lVar6 = 1; do { lVar1 = lVar6 + -1; if (cVar5 == '\0') { uVar10 = 0xffffffff; if (lVar1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + -4 + lVar6 * 4); } TestInfo::Run(*(TestInfo **)(lVar8 + (ulong)uVar10 * 8)); } else { uVar10 = 0xffffffff; if (lVar1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + -4 + lVar6 * 4); } TestInfo::Skip(*(TestInfo **)(lVar8 + (ulong)uVar10 * 8)); } if (FLAGS_gtest_fail_fast == '\x01') { uVar10 = 0xffffffff; if (lVar1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + -4 + lVar6 * 4); } cVar4 = TestResult::Failed((TestResult *) (*(long *)(*(long *)(this + 0x30) + (ulong)uVar10 * 8) + 0x90)); if (cVar4 != '\0') goto LAB_00121dd0; } lVar8 = *(long *)(this + 0x30); bVar3 = lVar6 < (int)((ulong)(*(long *)(this + 0x38) - lVar8) >> 3); lVar6 = lVar6 + 1; } while (bVar3); } LAB_00121de4: lVar8 = std::chrono::_V2::steady_clock::now(); *(long *)(this + 0x80) = (lVar8 - lVar9) / 1000000; UnitTest::GetInstance(); UnitTest::UponLeavingGTest((UnitTest *)UnitTest::GetInstance()::instance); internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void> (this,RunTearDownTestSuite,(char *)0x0); (**(code **)(*plVar2 + 0x60))(plVar2,this); (**(code **)(*plVar2 + 0x68))(plVar2); UnitTest::GetInstance(); UnitTest::set_current_test_suite((UnitTest *)UnitTest::GetInstance()::instance,(TestSuite *)0x0); return; LAB_00121dd0: for (; (int)lVar6 < (int)((ulong)(*(long *)(this + 0x38) - *(long *)(this + 0x30)) >> 3); lVar6 = lVar6 + 1) { uVar10 = 0xffffffff; if (lVar6 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + lVar6 * 4); } TestInfo::Skip(*(TestInfo **)(*(long *)(this + 0x30) + (ulong)uVar10 * 8)); } goto LAB_00121de4; }
2,016
allocate_dynamic
eloqsql/mysys/array.c
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) { DBUG_ENTER("allocate_dynamic"); if (max_elements >= array->max_element) { uint size; uchar *new_ptr; size= (max_elements + array->alloc_increment)/array->alloc_increment; size*= array->alloc_increment; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this senerio, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key, array->buffer,size * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(TRUE); array->buffer= new_ptr; array->max_element= size; } DBUG_RETURN(FALSE); }
O0
c
allocate_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jb 0x329d5 movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx xorl %edx, %edx divl 0x10(%rcx) movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax imull -0x18(%rbp), %eax movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x3297e movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx orq $0x10, %rdx callq 0x2e7a0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x32943 jmp 0x3293a movb $0x0, -0x1(%rbp) jmp 0x329db movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x24200 movq -0x10(%rbp), %rax movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF andq 0x20(%rax), %rcx movq %rcx, 0x20(%rax) jmp 0x329c0 movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq (%rax), %rsi movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx orq $0x50, %rcx callq 0x2e970 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x329be jmp 0x329b8 movb $0x1, -0x1(%rbp) jmp 0x329db jmp 0x329c0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) jmp 0x329d7 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
allocate_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jb loc_329D5 mov eax, [rbp+var_14] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] xor edx, edx div dword ptr [rcx+10h] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov eax, [rax+10h] imul eax, [rbp+var_18] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz short loc_3297E mov rax, [rbp+var_10] mov edi, [rax+18h] mov eax, [rbp+var_18] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov esi, eax mov rax, [rbp+var_10] mov rdx, [rax+20h] or rdx, 10h call my_malloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_32943 jmp short $+2 loc_3293A: mov [rbp+var_1], 0 jmp loc_329DB loc_32943: mov rdi, [rbp+var_20] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy mov rax, [rbp+var_10] mov rcx, 0FFFFFEFFh and rcx, [rax+20h] mov [rax+20h], rcx jmp short loc_329C0 loc_3297E: mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax] mov eax, [rbp+var_18] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_10] mov rcx, [rax+20h] or rcx, 50h call my_realloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_329BE jmp short $+2 loc_329B8: mov [rbp+var_1], 1 jmp short loc_329DB loc_329BE: jmp short $+2 loc_329C0: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+0Ch], ecx loc_329D5: jmp short $+2 loc_329D7: mov [rbp+var_1], 0 loc_329DB: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char allocate_dynamic(long long *a1, unsigned int a2) { long long v3; // [rsp+0h] [rbp-20h] unsigned int v4; // [rsp+8h] [rbp-18h] if ( a2 < *((_DWORD *)a1 + 3) ) return 0; v4 = (*((_DWORD *)a1 + 4) + a2) / *((_DWORD *)a1 + 4) * *((_DWORD *)a1 + 4); if ( (a1[4] & 0x100) == 0 ) { v3 = my_realloc(*((_DWORD *)a1 + 6), *a1, *((_DWORD *)a1 + 5) * v4, *((_BYTE *)a1 + 32) | 0x50u); if ( !v3 ) return 1; goto LABEL_8; } v3 = my_malloc(*((_DWORD *)a1 + 6), *((_DWORD *)a1 + 5) * v4, *((_DWORD *)a1 + 8) | 0x10u); if ( v3 ) { memcpy(v3, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2))); a1[4] &= 0xFFFFFEFFuLL; LABEL_8: *a1 = v3; *((_DWORD *)a1 + 3) = v4; return 0; } return 0; }
allocate_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JC 0x001329d5 MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] XOR EDX,EDX DIV dword ptr [RCX + 0x10] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] IMUL EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x0013297e MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] OR RDX,0x10 CALL 0x0012e7a0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00132943 JMP 0x0013293a LAB_0013293a: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001329db LAB_00132943: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x00124200 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xfffffeff AND RCX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX JMP 0x001329c0 LAB_0013297e: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x50 CALL 0x0012e970 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001329be JMP 0x001329b8 LAB_001329b8: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001329db LAB_001329be: JMP 0x001329c0 LAB_001329c0: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],ECX LAB_001329d5: JMP 0x001329d7 LAB_001329d7: MOV byte ptr [RBP + -0x1],0x0 LAB_001329db: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 allocate_dynamic(int8 *param_1,uint param_2) { int iVar1; void *local_28; if (*(uint *)((long)param_1 + 0xc) <= param_2) { iVar1 = *(int *)(param_1 + 2) * ((param_2 + *(int *)(param_1 + 2)) / *(uint *)(param_1 + 2)); if ((param_1[4] & 0x100) == 0) { local_28 = (void *)my_realloc(*(int4 *)(param_1 + 3),*param_1, iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)my_malloc(*(int4 *)(param_1 + 3), iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10); if (local_28 == (void *)0x0) { return 0; } memcpy(local_28,(void *)*param_1, (ulong)(uint)(*(int *)(param_1 + 1) * *(int *)((long)param_1 + 0x14))); param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = local_28; *(int *)((long)param_1 + 0xc) = iVar1; } return 0; }
2,017
ma_reset_state
eloqsql/storage/maria/ma_state.c
void _ma_reset_state(MARIA_HA *info) { MARIA_SHARE *share= info->s; MARIA_STATE_HISTORY *history= share->state_history; DBUG_ENTER("_ma_reset_state"); /* Always true if share->now_transactional is set */ if (history && share->have_versioning) { MARIA_STATE_HISTORY *next; DBUG_PRINT("info", ("resetting history")); /* Set the current history to current state */ share->state_history->state= share->state.state; /* Set current table handler to point to new history state */ info->state= info->state_start= &share->state_history->state; for (history= history->next ; history ; history= next) { next= history->next; my_free(history); } share->state_history->next= 0; share->state_history->trid= 0; /* Visible for all */ } DBUG_VOID_RETURN; }
O0
c
ma_reset_state: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x450(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x3681e movq -0x10(%rbp), %rax movsbl 0x7e8(%rax), %eax cmpl $0x0, %eax je 0x3681e jmp 0x36787 jmp 0x36789 movq -0x10(%rbp), %rax movq 0x450(%rax), %rdi addq $0x10, %rdi movq -0x10(%rbp), %rsi addq $0x18, %rsi movl $0x38, %edx callq 0x2a090 movq -0x10(%rbp), %rax movq 0x450(%rax), %rcx addq $0x10, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x367f9 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0xf3bb0 movq -0x20(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x367d4 movq -0x10(%rbp), %rax movq 0x450(%rax), %rax movq $0x0, (%rax) movq -0x10(%rbp), %rax movq 0x450(%rax), %rax movq $0x0, 0x8(%rax) jmp 0x36820 jmp 0x36822 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_reset_state: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+450h] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz loc_3681E mov rax, [rbp+var_10] movsx eax, byte ptr [rax+7E8h] cmp eax, 0 jz loc_3681E jmp short $+2 loc_36787: jmp short $+2 loc_36789: mov rax, [rbp+var_10] mov rdi, [rax+450h] add rdi, 10h mov rsi, [rbp+var_10] add rsi, 18h mov edx, 38h ; '8' call _memcpy mov rax, [rbp+var_10] mov rcx, [rax+450h] add rcx, 10h mov rax, [rbp+var_8] mov [rax+60h], rcx mov rax, [rbp+var_8] mov [rax+20h], rcx mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax loc_367D4: cmp [rbp+var_18], 0 jz short loc_367F9 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_20], rax mov rdi, [rbp+var_18] call my_free mov rax, [rbp+var_20] mov [rbp+var_18], rax jmp short loc_367D4 loc_367F9: mov rax, [rbp+var_10] mov rax, [rax+450h] mov qword ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+450h] mov qword ptr [rax+8], 0 loc_3681E: jmp short $+2 loc_36820: jmp short $+2 loc_36822: add rsp, 20h pop rbp retn
unsigned long long ma_reset_state(_QWORD *a1) { unsigned long long result; // rax long long v2; // rcx _QWORD *v3; // [rsp+0h] [rbp-20h] _QWORD *v4; // [rsp+8h] [rbp-18h] _QWORD *i; // [rsp+8h] [rbp-18h] long long v6; // [rsp+10h] [rbp-10h] v6 = *a1; result = *(_QWORD *)(*a1 + 1104LL); v4 = (_QWORD *)result; if ( result ) { result = (unsigned int)*(char *)(v6 + 2024); if ( *(_BYTE *)(v6 + 2024) ) { memcpy(*(_QWORD *)(v6 + 1104) + 16LL, v6 + 24, 56LL); v2 = *(_QWORD *)(v6 + 1104) + 16LL; a1[12] = v2; a1[4] = v2; for ( i = (_QWORD *)*v4; i; i = v3 ) { v3 = (_QWORD *)*i; my_free(i); } **(_QWORD **)(v6 + 1104) = 0LL; result = *(_QWORD *)(v6 + 1104); *(_QWORD *)(result + 8) = 0LL; } } return result; }
_ma_reset_state: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x450] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013681e MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x7e8] CMP EAX,0x0 JZ 0x0013681e JMP 0x00136787 LAB_00136787: JMP 0x00136789 LAB_00136789: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x450] ADD RDI,0x10 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x18 MOV EDX,0x38 CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x450] ADD RCX,0x10 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001367d4: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001367f9 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001f3bb0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x18],RAX JMP 0x001367d4 LAB_001367f9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x450] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x450] MOV qword ptr [RAX + 0x8],0x0 LAB_0013681e: JMP 0x00136820 LAB_00136820: JMP 0x00136822 LAB_00136822: ADD RSP,0x20 POP RBP RET
void _ma_reset_state(long *param_1) { long lVar1; int8 *puVar2; long lVar3; int8 *local_20; lVar1 = *param_1; puVar2 = *(int8 **)(lVar1 + 0x450); if ((puVar2 != (int8 *)0x0) && (*(char *)(lVar1 + 0x7e8) != '\0')) { memcpy((void *)(*(long *)(lVar1 + 0x450) + 0x10),(void *)(lVar1 + 0x18),0x38); lVar3 = *(long *)(lVar1 + 0x450) + 0x10; param_1[0xc] = lVar3; param_1[4] = lVar3; local_20 = (int8 *)*puVar2; while (local_20 != (int8 *)0x0) { puVar2 = (int8 *)*local_20; my_free(local_20); local_20 = puVar2; } **(int8 **)(lVar1 + 0x450) = 0; *(int8 *)(*(long *)(lVar1 + 0x450) + 8) = 0; } return; }
2,018
llama_sampler_mirostat_reset(llama_sampler*)
monkey531[P]llama/src/llama-sampling.cpp
static void llama_sampler_mirostat_reset(struct llama_sampler * smpl) { auto * ctx = (llama_sampler_mirostat *) smpl->ctx; ctx->mu = 2.0f*ctx->tau; ctx->seed_cur = get_rng_seed(ctx->seed); ctx->rng.seed(ctx->seed_cur); }
O3
cpp
llama_sampler_mirostat_reset(llama_sampler*): pushq %rbx movq 0x8(%rdi), %rbx movss 0xc(%rbx), %xmm0 addss %xmm0, %xmm0 movss %xmm0, 0x18(%rbx) movl 0x4(%rbx), %edi callq 0xdb646 movl %eax, 0x8(%rbx) movl %eax, %ecx movq %rcx, 0x20(%rbx) movl $0x5, %eax movq %rcx, %rdx shrq $0x1e, %rdx xorl %ecx, %edx imull $0x6c078965, %edx, %ecx # imm = 0x6C078965 addl %eax, %ecx addl $-0x4, %ecx movq %rcx, (%rbx,%rax,8) incq %rax cmpq $0x274, %rax # imm = 0x274 jne 0xdf458 movq $0x270, 0x13a0(%rbx) # imm = 0x270 popq %rbx retq
_ZL28llama_sampler_mirostat_resetP13llama_sampler: push rbx mov rbx, [rdi+8] movss xmm0, dword ptr [rbx+0Ch] addss xmm0, xmm0 movss dword ptr [rbx+18h], xmm0 mov edi, [rbx+4]; unsigned int call _ZL12get_rng_seedj; get_rng_seed(uint) mov [rbx+8], eax mov ecx, eax mov [rbx+20h], rcx mov eax, 5 loc_DF458: mov rdx, rcx shr rdx, 1Eh xor edx, ecx imul ecx, edx, 6C078965h add ecx, eax add ecx, 0FFFFFFFCh mov [rbx+rax*8], rcx inc rax cmp rax, 274h jnz short loc_DF458 mov qword ptr [rbx+13A0h], 270h pop rbx retn
long long llama_sampler_mirostat_reset(long long a1) { long long v1; // rbx double v2; // xmm0_8 unsigned int rng_seed; // eax unsigned long long v4; // rcx long long result; // rax v1 = *(_QWORD *)(a1 + 8); *(_QWORD *)&v2 = *(unsigned int *)(v1 + 12); *(float *)&v2 = *(float *)&v2 + *(float *)&v2; *(_DWORD *)(v1 + 24) = LODWORD(v2); rng_seed = get_rng_seed((std::chrono::_V2::system_clock *)*(unsigned int *)(v1 + 4), v2); *(_DWORD *)(v1 + 8) = rng_seed; v4 = rng_seed; *(_QWORD *)(v1 + 32) = rng_seed; for ( result = 5LL; result != 628; ++result ) { v4 = (unsigned int)result + 1812433253 * ((unsigned int)v4 ^ (unsigned int)(v4 >> 30)) - 4; *(_QWORD *)(v1 + 8 * result) = v4; } *(_QWORD *)(v1 + 5024) = 624LL; return result; }
llama_sampler_mirostat_reset: PUSH RBX MOV RBX,qword ptr [RDI + 0x8] MOVSS XMM0,dword ptr [RBX + 0xc] ADDSS XMM0,XMM0 MOVSS dword ptr [RBX + 0x18],XMM0 MOV EDI,dword ptr [RBX + 0x4] CALL 0x001db646 MOV dword ptr [RBX + 0x8],EAX MOV ECX,EAX MOV qword ptr [RBX + 0x20],RCX MOV EAX,0x5 LAB_001df458: MOV RDX,RCX SHR RDX,0x1e XOR EDX,ECX IMUL ECX,EDX,0x6c078965 ADD ECX,EAX ADD ECX,-0x4 MOV qword ptr [RBX + RAX*0x8],RCX INC RAX CMP RAX,0x274 JNZ 0x001df458 MOV qword ptr [RBX + 0x13a0],0x270 POP RBX RET
/* llama_sampler_mirostat_reset(llama_sampler*) */ void llama_sampler_mirostat_reset(llama_sampler *param_1) { long lVar1; uint uVar2; long lVar3; ulong uVar4; lVar1 = *(long *)(param_1 + 8); *(float *)(lVar1 + 0x18) = *(float *)(lVar1 + 0xc) + *(float *)(lVar1 + 0xc); uVar2 = get_rng_seed(*(uint *)(lVar1 + 4)); *(uint *)(lVar1 + 8) = uVar2; uVar4 = (ulong)uVar2; *(ulong *)(lVar1 + 0x20) = uVar4; lVar3 = 5; do { uVar4 = (ulong)((((uint)(uVar4 >> 0x1e) ^ (uint)uVar4) * 0x6c078965 + (int)lVar3) - 4); *(ulong *)(lVar1 + lVar3 * 8) = uVar4; lVar3 = lVar3 + 1; } while (lVar3 != 0x274); *(int8 *)(lVar1 + 0x13a0) = 0x270; return; }
2,019
my_casefold_mb
eloqsql/strings/ctype-mb.c
static size_t my_casefold_mb(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar *map, size_t is_upper) { const char *srcend= src + srclen; char *dst0= dst; DBUG_ASSERT(cs->mbmaxlen == 2); while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1]))) { int code= is_upper ? ch->toupper : ch->tolower; src+= 2; if (code > 0xFF) *dst++= code >> 8; *dst++= code & 0xFF; } else { *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O3
c
my_casefold_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0xb30a7 movq %r8, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 addq %rsi, %r15 xorl %eax, %eax testq %r9, %r9 sete %al shll $0x2, %eax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rbx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax jge 0xb3047 movzbl (%r12), %eax incq %r12 movb (%r14,%rax), %al movb %al, (%rbx) incq %rbx jmp 0xb309e movb (%r12), %al movq 0x78(%r13), %rcx testq %rcx, %rcx je 0xb308c movzbl %al, %edx movq 0x8(%rcx), %rcx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0xb308c movzbl 0x1(%r12), %eax leaq (%rax,%rax,2), %rax leaq (%rcx,%rax,4), %rax movq -0x38(%rbp), %rcx movl (%rcx,%rax), %eax cmpl $0x100, %eax # imm = 0x100 jl 0xb3085 movb %ah, (%rbx) incq %rbx movb %al, (%rbx) incq %rbx jmp 0xb309a movb %al, (%rbx) movb 0x1(%r12), %al movb %al, 0x1(%rbx) addq $0x2, %rbx addq $0x2, %r12 cmpq %r15, %r12 jb 0xb3019 subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casefold_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov [rbp+var_30], rcx test rdx, rdx jle loc_B30A7 mov r14, r8 mov r15, rdx mov r12, rsi mov r13, rdi add r15, rsi xor eax, eax test r9, r9 setz al shl eax, 2 mov [rbp+var_38], rax mov rbx, [rbp+var_30] loc_B3019: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_B3047 movzx eax, byte ptr [r12] inc r12 mov al, [r14+rax] mov [rbx], al inc rbx jmp short loc_B309E loc_B3047: mov al, [r12] mov rcx, [r13+78h] test rcx, rcx jz short loc_B308C movzx edx, al mov rcx, [rcx+8] mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_B308C movzx eax, byte ptr [r12+1] lea rax, [rax+rax*2] lea rax, [rcx+rax*4] mov rcx, [rbp+var_38] mov eax, [rcx+rax] cmp eax, 100h jl short loc_B3085 mov [rbx], ah inc rbx loc_B3085: mov [rbx], al inc rbx jmp short loc_B309A loc_B308C: mov [rbx], al mov al, [r12+1] mov [rbx+1], al add rbx, 2 loc_B309A: add r12, 2 loc_B309E: cmp r12, r15 jb loc_B3019 loc_B30A7: sub rbx, [rbp+var_30] mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casefold_mb( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6) { unsigned __int8 *v6; // rbx unsigned __int8 *v8; // r12 unsigned long long v9; // r15 long long v10; // rax unsigned __int8 v11; // al long long v12; // rcx long long v13; // rcx int v14; // eax long long v16; // [rsp+8h] [rbp-38h] v6 = a4; if ( a3 > 0 ) { v8 = a2; v9 = (unsigned long long)&a2[a3]; v16 = 4 * (unsigned int)(a6 == 0); v6 = a4; do { if ( (*(int ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v8, v9) >= 2 ) { v11 = *v8; v12 = *(_QWORD *)(a1 + 120); if ( v12 && (v13 = *(_QWORD *)(*(_QWORD *)(v12 + 8) + 8LL * v11)) != 0 ) { v14 = *(_DWORD *)(v16 + v13 + 12LL * v8[1]); if ( v14 >= 256 ) *v6++ = BYTE1(v14); *v6++ = v14; } else { *v6 = v11; v6[1] = v8[1]; v6 += 2; } v8 += 2; } else { v10 = *v8++; *v6++ = *(_BYTE *)(a5 + v10); } } while ( (unsigned long long)v8 < v9 ); } return (_BYTE *)(v6 - a4); }
my_casefold_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x001b30a7 MOV R14,R8 MOV R15,RDX MOV R12,RSI MOV R13,RDI ADD R15,RSI XOR EAX,EAX TEST R9,R9 SETZ AL SHL EAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RBX,qword ptr [RBP + -0x30] LAB_001b3019: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x001b3047 MOVZX EAX,byte ptr [R12] INC R12 MOV AL,byte ptr [R14 + RAX*0x1] MOV byte ptr [RBX],AL INC RBX JMP 0x001b309e LAB_001b3047: MOV AL,byte ptr [R12] MOV RCX,qword ptr [R13 + 0x78] TEST RCX,RCX JZ 0x001b308c MOVZX EDX,AL MOV RCX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x001b308c MOVZX EAX,byte ptr [R12 + 0x1] LEA RAX,[RAX + RAX*0x2] LEA RAX,[RCX + RAX*0x4] MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RCX + RAX*0x1] CMP EAX,0x100 JL 0x001b3085 MOV byte ptr [RBX],AH INC RBX LAB_001b3085: MOV byte ptr [RBX],AL INC RBX JMP 0x001b309a LAB_001b308c: MOV byte ptr [RBX],AL MOV AL,byte ptr [R12 + 0x1] MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 LAB_001b309a: ADD R12,0x2 LAB_001b309e: CMP R12,R15 JC 0x001b3019 LAB_001b30a7: SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casefold_mb(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,long param_6) { byte bVar1; long lVar2; int iVar3; byte *pbVar4; byte *pbVar5; pbVar4 = param_4; if (0 < param_3) { pbVar5 = param_2 + param_3; do { iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar5); if (iVar3 < 2) { bVar1 = *param_2; param_2 = param_2 + 1; *pbVar4 = *(byte *)(param_5 + (ulong)bVar1); pbVar4 = pbVar4 + 1; } else { if ((*(long *)(param_1 + 0x78) == 0) || (lVar2 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8), lVar2 == 0)) { *pbVar4 = *param_2; pbVar4[1] = param_2[1]; pbVar4 = pbVar4 + 2; } else { iVar3 = *(int *)((ulong)(param_6 == 0) * 4 + lVar2 + (ulong)param_2[1] * 0xc); if (0xff < iVar3) { *pbVar4 = (byte)((uint)iVar3 >> 8); pbVar4 = pbVar4 + 1; } *pbVar4 = (byte)iVar3; pbVar4 = pbVar4 + 1; } param_2 = param_2 + 2; } } while (param_2 < pbVar5); } return (long)pbVar4 - (long)param_4; }
2,020
ma_update_at_original_place
eloqsql/storage/maria/ma_blockrec.c
static my_bool _ma_update_at_original_place(MARIA_HA *info, pgcache_page_no_t page, uint rownr, uint length_on_head_page, uint extent_count, const uchar *extent_info, const uchar *oldrec, const uchar *record, LSN undo_lsn) { MARIA_BITMAP_BLOCKS *blocks; MARIA_BITMAP_BLOCK *block; MARIA_ROW *cur_row= &info->cur_row, *new_row= &info->new_row; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; ha_checksum old_checksum; uint org_empty_size, empty_size; uint block_size= info->s->block_size; uchar *dir, *buff; struct st_row_pos_info row_pos; my_bool res; uint rec_offset, length; DBUG_ENTER("_ma_update_at_original_place"); #ifdef ENABLE_IF_PROBLEM_WITH_UPDATE DBUG_DUMP("oldrec", oldrec, share->base.reclength); DBUG_DUMP("newrec", record, share->base.reclength); #endif /* Checksums of new and old rows were computed by callers already; new row's was put into cur_row, old row's was put into new_row. */ old_checksum= new_row->checksum; new_row->checksum= cur_row->checksum; calc_record_size(info, record, new_row); _ma_bitmap_flushable(info, 1); buff= pagecache_read(share->pagecache, &info->dfile, (pgcache_page_no_t) page, 0, 0, share->page_type, PAGECACHE_LOCK_WRITE, &page_link.link); page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!buff) { _ma_set_fatal_error(info, my_errno); goto err; } org_empty_size= uint2korr(buff + EMPTY_SPACE_OFFSET); dir= dir_entry_pos(buff, block_size, rownr); if ((org_empty_size + cur_row->head_length) < length_on_head_page) { DBUG_PRINT("error", ("org_empty_size: %u head_length: %u length_on_page: %u", org_empty_size, (uint) cur_row->head_length, length_on_head_page)); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } /* We can fit the new row in the same page as the original head part of the row */ empty_size= org_empty_size; if (extend_area_on_page(info, buff, dir, rownr, length_on_head_page, &empty_size, &rec_offset, &length, 1)) goto err; row_pos.buff= buff; row_pos.rownr= rownr; row_pos.empty_space= empty_size; row_pos.dir= dir; row_pos.data= buff + rec_offset; /* Delete old row */ if (*cur_row->tail_positions && delete_tails(info, cur_row->tail_positions)) goto err; if (cur_row->extents_count && free_full_pages(info, cur_row)) goto err; /* Change extent information to be usable by write_block_record() */ blocks= &cur_row->insert_blocks; if (extent_to_bitmap_blocks(info, blocks, page, extent_count, extent_info)) goto err; block= blocks->block; block->empty_space= row_pos.empty_space; block->org_bitmap_value= _ma_free_size_to_head_pattern(&share->bitmap, (enough_free_entries_on_page(share, buff) ? org_empty_size : 0)); DBUG_ASSERT(block->org_bitmap_value == _ma_bitmap_get_page_bits(info, &info->s->bitmap, page)); block->used|= BLOCKUSED_USE_ORG_BITMAP; /* We have to use <= below as the new_row may be smaller than the original row as the new row doesn't have transaction id */ DBUG_ASSERT(blocks->count > 1 || MY_MAX(new_row->total_length, share->base.min_block_length) <= length_on_head_page); /* Store same amount of data on head page as on original page */ row_pos.length= (length_on_head_page - (extent_count + 1 - blocks->count) * ROW_EXTENT_SIZE); set_if_bigger(row_pos.length, share->base.min_block_length); if ((res= write_block_record(info, oldrec, record, new_row, blocks, 1, &row_pos, undo_lsn, old_checksum))) goto err; DBUG_RETURN(0); err: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_mark_file_crashed(share); if (info->non_flushable_state) _ma_bitmap_flushable(info, -1); _ma_unpin_all_pages_and_finalize_row(info, LSN_IMPOSSIBLE); DBUG_RETURN(1); }
O0
c
ma_update_at_original_place: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0x80, %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax addq $0x140, %rax # imm = 0x140 movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x7bc(%rax), %eax movl %eax, -0x80(%rbp) movq -0x50(%rbp), %rax movl 0x30(%rax), %eax movl %eax, -0x74(%rbp) movq -0x48(%rbp), %rax movl 0x30(%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x10(%rbp), %rdi movq 0x18(%rbp), %rsi movq -0x50(%rbp), %rdx callq 0x763b0 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x40490 movq -0x70(%rbp), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x18(%rbp), %rdx movq -0x70(%rbp), %rax movl 0x7d4(%rax), %r9d leaq -0x68(%rbp), %rax xorl %ecx, %ecx xorl %r8d, %r8d movl $0x4, (%rsp) movq %rax, 0x8(%rsp) callq 0x5a6a0 movq %rax, -0x90(%rbp) movl $0x6, -0x60(%rbp) cmpq $0x0, -0x90(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x58(%rbp) movq -0x10(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x68(%rbp), %rsi callq 0xdbc10 cmpq $0x0, -0x90(%rbp) jne 0x80afc movq -0x10(%rbp), %rax movq %rax, -0xd0(%rbp) callq 0xfabb0 movq -0xd0(%rbp), %rdi movl (%rax), %esi callq 0x30500 jmp 0x80d6f movq -0x90(%rbp), %rax movzwl 0xa(%rax), %eax movl %eax, -0x78(%rbp) movq -0x90(%rbp), %rdi movl -0x80(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x762d0 movq %rax, -0x88(%rbp) movl -0x78(%rbp), %eax movq -0x48(%rbp), %rcx addl 0xa0(%rcx), %eax cmpl -0x20(%rbp), %eax jae 0x80b4c jmp 0x80b37 jmp 0x80b39 movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x30500 jmp 0x80d6f movl -0x78(%rbp), %eax movl %eax, -0x7c(%rbp) movq -0x10(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0x88(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d leaq -0x7c(%rbp), %r9 leaq -0xc0(%rbp), %r10 leaq -0xc4(%rbp), %rax movq %r10, (%rsp) movq %rax, 0x8(%rsp) movl $0x1, 0x10(%rsp) callq 0x7b610 cmpb $0x0, %al je 0x80b9c jmp 0x80d6f movq -0x90(%rbp), %rax movq %rax, -0xb8(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x9c(%rbp) movl -0x7c(%rbp), %eax movl %eax, -0x98(%rbp) movq -0x88(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0x90(%rbp), %rax movl -0xc0(%rbp), %ecx addq %rcx, %rax movq %rax, -0xb0(%rbp) movq -0x48(%rbp), %rax movq 0x28(%rax), %rax cmpq $0x0, (%rax) je 0x80c0d movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rax movq 0x28(%rax), %rsi callq 0x77db0 movsbl %al, %eax cmpl $0x0, %eax je 0x80c0d jmp 0x80d6f movq -0x48(%rbp), %rax cmpl $0x0, 0xac(%rax) je 0x80c34 movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x77e40 movsbl %al, %eax cmpl $0x0, %eax je 0x80c34 jmp 0x80d6f movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 callq 0x7db90 cmpb $0x0, %al je 0x80c5d jmp 0x80d6f movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl -0x98(%rbp), %ecx movq -0x40(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x70(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0xd8(%rbp) movq -0x70(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x75940 movsbl %al, %eax cmpl $0x0, %eax je 0x80ca9 movl -0x78(%rbp), %eax movl %eax, -0xdc(%rbp) jmp 0x80cb3 xorl %eax, %eax movl %eax, -0xdc(%rbp) jmp 0x80cb3 movq -0xd8(%rbp), %rdi movl -0xdc(%rbp), %esi callq 0x3f150 movb %al, %cl movq -0x40(%rbp), %rax movb %cl, 0x15(%rax) jmp 0x80cd0 movq -0x40(%rbp), %rax movzbl 0x14(%rax), %ecx orl $0x2, %ecx movb %cl, 0x14(%rax) jmp 0x80ce0 movl -0x20(%rbp), %eax movl -0x24(%rbp), %ecx addl $0x1, %ecx movq -0x38(%rbp), %rdx subl 0x8(%rdx), %ecx imull $0x7, %ecx, %ecx subl %ecx, %eax movl %eax, -0xa0(%rbp) movl -0xa0(%rbp), %eax movq -0x70(%rbp), %rcx cmpq 0x3b8(%rcx), %rax jae 0x80d1f movq -0x70(%rbp), %rax movq 0x3b8(%rax), %rax movl %eax, -0xa0(%rbp) jmp 0x80d21 movq -0x10(%rbp), %rdi movq 0x10(%rbp), %rsi movq 0x18(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x38(%rbp), %r8 movq 0x20(%rbp), %r10 movl -0x74(%rbp), %eax movl $0x1, %r9d leaq -0xb8(%rbp), %r11 movq %r11, (%rsp) movq %r10, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x7e0a0 movb %al, -0xb9(%rbp) cmpb $0x0, %al je 0x80d67 jmp 0x80d6f jmp 0x80d69 movb $0x0, -0x1(%rbp) jmp 0x80da8 jmp 0x80d71 jmp 0x80d73 movq -0x70(%rbp), %rdi callq 0x32ea0 movq -0x10(%rbp), %rax cmpl $0x0, 0x644(%rax) je 0x80d97 movq -0x10(%rbp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x40490 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x773c0 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x100, %rsp # imm = 0x100 popq %rbp retq nopw %cs:(%rax,%rax)
_ma_update_at_original_place: push rbp mov rbp, rsp sub rsp, 100h mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov [rbp+var_24], r8d mov [rbp+var_30], r9 mov rax, [rbp+var_10] add rax, 80h mov [rbp+var_48], rax mov rax, [rbp+var_10] add rax, 140h mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_70], rax mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+7BCh] mov [rbp+var_80], eax mov rax, [rbp+var_50] mov eax, [rax+30h] mov [rbp+var_74], eax mov rax, [rbp+var_48] mov ecx, [rax+30h] mov rax, [rbp+var_50] mov [rax+30h], ecx mov rdi, [rbp+var_10] mov rsi, [rbp+arg_8] mov rdx, [rbp+var_50] call calc_record_size mov rdi, [rbp+var_10] mov esi, 1 call _ma_bitmap_flushable mov rax, [rbp+var_70] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rdx, [rbp+var_18] mov rax, [rbp+var_70] mov r9d, [rax+7D4h] lea rax, [rbp+var_68] xor ecx, ecx xor r8d, r8d mov dword ptr [rsp+100h+var_100], 4 mov [rsp+100h+var_F8], rax call pagecache_read mov [rbp+var_90], rax mov [rbp+var_60], 6 cmp [rbp+var_90], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_58], al mov rdi, [rbp+var_10] add rdi, 2E8h lea rsi, [rbp+var_68] call insert_dynamic cmp [rbp+var_90], 0 jnz short loc_80AFC mov rax, [rbp+var_10] mov [rbp+var_D0], rax call _my_thread_var mov rdi, [rbp+var_D0] mov esi, [rax] call _ma_set_fatal_error jmp loc_80D6F loc_80AFC: mov rax, [rbp+var_90] movzx eax, word ptr [rax+0Ah] mov [rbp+var_78], eax mov rdi, [rbp+var_90] mov esi, [rbp+var_80] mov edx, [rbp+var_1C] call dir_entry_pos mov [rbp+var_88], rax mov eax, [rbp+var_78] mov rcx, [rbp+var_48] add eax, [rcx+0A0h] cmp eax, [rbp+var_20] jnb short loc_80B4C jmp short $+2 loc_80B37: jmp short $+2 loc_80B39: mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error jmp loc_80D6F loc_80B4C: mov eax, [rbp+var_78] mov [rbp+var_7C], eax mov rdi, [rbp+var_10] mov rsi, [rbp+var_90] mov rdx, [rbp+var_88] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] lea r9, [rbp+var_7C] lea r10, [rbp+var_C0] lea rax, [rbp+var_C4] mov [rsp+100h+var_100], r10 mov [rsp+100h+var_F8], rax mov [rsp+100h+var_F0], 1 call extend_area_on_page cmp al, 0 jz short loc_80B9C jmp loc_80D6F loc_80B9C: mov rax, [rbp+var_90] mov [rbp+var_B8], rax mov eax, [rbp+var_1C] mov [rbp+var_9C], eax mov eax, [rbp+var_7C] mov [rbp+var_98], eax mov rax, [rbp+var_88] mov [rbp+var_A8], rax mov rax, [rbp+var_90] mov ecx, [rbp+var_C0] add rax, rcx mov [rbp+var_B0], rax mov rax, [rbp+var_48] mov rax, [rax+28h] cmp qword ptr [rax], 0 jz short loc_80C0D mov rdi, [rbp+var_10] mov rax, [rbp+var_48] mov rsi, [rax+28h] call delete_tails movsx eax, al cmp eax, 0 jz short loc_80C0D jmp loc_80D6F loc_80C0D: mov rax, [rbp+var_48] cmp dword ptr [rax+0ACh], 0 jz short loc_80C34 mov rdi, [rbp+var_10] mov rsi, [rbp+var_48] call free_full_pages movsx eax, al cmp eax, 0 jz short loc_80C34 jmp loc_80D6F loc_80C34: mov rax, [rbp+var_48] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov rdx, [rbp+var_18] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] call extent_to_bitmap_blocks cmp al, 0 jz short loc_80C5D jmp loc_80D6F loc_80C5D: mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_40], rax mov ecx, [rbp+var_98] mov rax, [rbp+var_40] mov [rax+0Ch], ecx mov rax, [rbp+var_70] add rax, 0A10h mov [rbp+var_D8], rax mov rdi, [rbp+var_70] mov rsi, [rbp+var_90] call enough_free_entries_on_page movsx eax, al cmp eax, 0 jz short loc_80CA9 mov eax, [rbp+var_78] mov [rbp+var_DC], eax jmp short loc_80CB3 loc_80CA9: xor eax, eax mov [rbp+var_DC], eax jmp short $+2 loc_80CB3: mov rdi, [rbp+var_D8] mov esi, [rbp+var_DC] call _ma_free_size_to_head_pattern mov cl, al mov rax, [rbp+var_40] mov [rax+15h], cl jmp short $+2 loc_80CD0: mov rax, [rbp+var_40] movzx ecx, byte ptr [rax+14h] or ecx, 2 mov [rax+14h], cl jmp short $+2 loc_80CE0: mov eax, [rbp+var_20] mov ecx, [rbp+var_24] add ecx, 1 mov rdx, [rbp+var_38] sub ecx, [rdx+8] imul ecx, 7 sub eax, ecx mov [rbp+var_A0], eax mov eax, [rbp+var_A0] mov rcx, [rbp+var_70] cmp rax, [rcx+3B8h] jnb short loc_80D1F mov rax, [rbp+var_70] mov rax, [rax+3B8h] mov [rbp+var_A0], eax loc_80D1F: jmp short $+2 loc_80D21: mov rdi, [rbp+var_10] mov rsi, [rbp+arg_0] mov rdx, [rbp+arg_8] mov rcx, [rbp+var_50] mov r8, [rbp+var_38] mov r10, [rbp+arg_10] mov eax, [rbp+var_74] mov r9d, 1 lea r11, [rbp+var_B8] mov [rsp+100h+var_100], r11 mov [rsp+100h+var_F8], r10 mov [rsp+100h+var_F0], eax call write_block_record mov [rbp+var_B9], al cmp al, 0 jz short loc_80D67 jmp short loc_80D6F loc_80D67: jmp short $+2 loc_80D69: mov [rbp+var_1], 0 jmp short loc_80DA8 loc_80D6F: jmp short $+2 loc_80D71: jmp short $+2 loc_80D73: mov rdi, [rbp+var_70] call _ma_mark_file_crashed mov rax, [rbp+var_10] cmp dword ptr [rax+644h], 0 jz short loc_80D97 mov rdi, [rbp+var_10] mov esi, 0FFFFFFFFh call _ma_bitmap_flushable loc_80D97: mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ma_unpin_all_pages_and_finalize_row_0 mov [rbp+var_1], 1 loc_80DA8: mov al, [rbp+var_1] add rsp, 100h pop rbp retn
char ma_update_at_original_place( long long a1, long long a2, unsigned int a3, unsigned int a4, unsigned int a5, long long a6, long long a7, long long a8, long long *a9) { long long *v9; // rdi int *v10; // rax long long v11; // rdx long long v12; // rcx long long v13; // r8 int v14; // r9d long long v15; // rdx long long v16; // r8 int v17; // r9d char v18; // al _DWORD *v20; // [rsp+28h] [rbp-D8h] long long *v21; // [rsp+30h] [rbp-D0h] unsigned int v22; // [rsp+3Ch] [rbp-C4h] BYREF int v23; // [rsp+40h] [rbp-C0h] BYREF _QWORD v25[3]; // [rsp+48h] [rbp-B8h] BYREF unsigned int v26; // [rsp+60h] [rbp-A0h] unsigned int v27; // [rsp+64h] [rbp-9Ch] unsigned int v28; // [rsp+68h] [rbp-98h] _BYTE *v29; // [rsp+70h] [rbp-90h] unsigned __int16 *v30; // [rsp+78h] [rbp-88h] unsigned int v31; // [rsp+80h] [rbp-80h] unsigned int v32; // [rsp+84h] [rbp-7Ch] BYREF unsigned int v33; // [rsp+88h] [rbp-78h] int v34; // [rsp+8Ch] [rbp-74h] long long v35; // [rsp+90h] [rbp-70h] char v36[8]; // [rsp+98h] [rbp-68h] BYREF int v37; // [rsp+A0h] [rbp-60h] bool v38; // [rsp+A8h] [rbp-58h] unsigned long long v39; // [rsp+B0h] [rbp-50h] long long v40; // [rsp+B8h] [rbp-48h] long long v41; // [rsp+C0h] [rbp-40h] long long *v42; // [rsp+C8h] [rbp-38h] long long v43; // [rsp+D0h] [rbp-30h] unsigned int v44; // [rsp+DCh] [rbp-24h] unsigned int v45; // [rsp+E0h] [rbp-20h] unsigned int v46; // [rsp+E4h] [rbp-1Ch] long long v47; // [rsp+E8h] [rbp-18h] long long *v48; // [rsp+F0h] [rbp-10h] v48 = (long long *)a1; v47 = a2; v46 = a3; v45 = a4; v44 = a5; v43 = a6; v40 = a1 + 128; v39 = a1 + 320; v35 = *(_QWORD *)a1; v31 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL); v34 = *(_DWORD *)(a1 + 368); *(_DWORD *)(a1 + 368) = *(_DWORD *)(a1 + 176); calc_record_size(v48, a8, v39); ma_bitmap_flushable(v48, 1); v29 = (_BYTE *)pagecache_read( *(_QWORD **)(v35 + 1536), (long long)(v48 + 142), v47, 0, 0LL, *(_DWORD *)(v35 + 2004), 4u, v36); v37 = 6; v38 = v29 != 0LL; v9 = v48 + 93; insert_dynamic(v48 + 93, v36); if ( v29 ) { v33 = *((unsigned __int16 *)v29 + 5); v30 = (unsigned __int16 *)dir_entry_pos((long long)v29, v31, v46); if ( *(_DWORD *)(v40 + 160) + v33 >= v45 ) { v32 = v33; if ( !extend_area_on_page(v48, (long long)v29, v30, v46, v45, &v32, &v23, &v22, 1) ) { v25[0] = v29; v27 = v46; v28 = v32; v25[2] = v30; v25[1] = &v29[v23]; if ( (!**(_QWORD **)(v40 + 40) || !delete_tails(v48, *(unsigned long long **)(v40 + 40))) && (!*(_DWORD *)(v40 + 172) || !free_full_pages(v48, v40)) ) { v42 = (long long *)v40; if ( !extent_to_bitmap_blocks(v48, v40, v47, v44, v43) ) { v41 = *v42; *(_DWORD *)(v41 + 12) = v28; v20 = (_DWORD *)(v35 + 2576); if ( enough_free_entries_on_page(v35, v29) ) v18 = ma_free_size_to_head_pattern(v20, v33); else v18 = ma_free_size_to_head_pattern(v20, 0); *(_BYTE *)(v41 + 21) = v18; *(_BYTE *)(v41 + 20) |= 2u; v26 = v45 - 7 * (v44 + 1 - *((_DWORD *)v42 + 2)); if ( (unsigned long long)v26 < *(_QWORD *)(v35 + 952) ) v26 = *(_QWORD *)(v35 + 952); if ( !write_block_record(v48, a7, a8, v39, v42, 1, (long long)v25, a9, v34) ) return 0; } } } } else { ma_set_fatal_error(v48, 127, v15, v40, v16, v17); } } else { v21 = v48; v10 = (int *)my_thread_var(v9, v36); ma_set_fatal_error(v21, *v10, v11, v12, v13, v14); } ma_mark_file_crashed(v35); if ( *((_DWORD *)v48 + 401) ) ma_bitmap_flushable(v48, -1); ma_unpin_all_pages_and_finalize_row_0((long long)v48, 0LL); return 1; }
_ma_update_at_original_place: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x80 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x140 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x80],EAX MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x30] MOV dword ptr [RBP + -0x74],EAX MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x30],ECX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + 0x18] MOV RDX,qword ptr [RBP + -0x50] CALL 0x001763b0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00140490 MOV RAX,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x70] MOV R9D,dword ptr [RAX + 0x7d4] LEA RAX,[RBP + -0x68] XOR ECX,ECX XOR R8D,R8D MOV dword ptr [RSP],0x4 MOV qword ptr [RSP + 0x8],RAX CALL 0x0015a6a0 MOV qword ptr [RBP + -0x90],RAX MOV dword ptr [RBP + -0x60],0x6 CMP qword ptr [RBP + -0x90],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x58],AL MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2e8 LEA RSI,[RBP + -0x68] CALL 0x001dbc10 CMP qword ptr [RBP + -0x90],0x0 JNZ 0x00180afc MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xd0],RAX CALL 0x001fabb0 MOV RDI,qword ptr [RBP + -0xd0] MOV ESI,dword ptr [RAX] CALL 0x00130500 JMP 0x00180d6f LAB_00180afc: MOV RAX,qword ptr [RBP + -0x90] MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x78],EAX MOV RDI,qword ptr [RBP + -0x90] MOV ESI,dword ptr [RBP + -0x80] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x001762d0 MOV qword ptr [RBP + -0x88],RAX MOV EAX,dword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x48] ADD EAX,dword ptr [RCX + 0xa0] CMP EAX,dword ptr [RBP + -0x20] JNC 0x00180b4c JMP 0x00180b37 LAB_00180b37: JMP 0x00180b39 LAB_00180b39: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x00130500 JMP 0x00180d6f LAB_00180b4c: MOV EAX,dword ptr [RBP + -0x78] MOV dword ptr [RBP + -0x7c],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x88] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] LEA R9,[RBP + -0x7c] LEA R10,[RBP + -0xc0] LEA RAX,[RBP + -0xc4] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x10],0x1 CALL 0x0017b610 CMP AL,0x0 JZ 0x00180b9c JMP 0x00180d6f LAB_00180b9c: MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0xb8],RAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x9c],EAX MOV EAX,dword ptr [RBP + -0x7c] MOV dword ptr [RBP + -0x98],EAX MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x90] MOV ECX,dword ptr [RBP + -0xc0] ADD RAX,RCX MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x28] CMP qword ptr [RAX],0x0 JZ 0x00180c0d MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX + 0x28] CALL 0x00177db0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00180c0d JMP 0x00180d6f LAB_00180c0d: MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0xac],0x0 JZ 0x00180c34 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x48] CALL 0x00177e40 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00180c34 JMP 0x00180d6f LAB_00180c34: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x30] CALL 0x0017db90 CMP AL,0x0 JZ 0x00180c5d JMP 0x00180d6f LAB_00180c5d: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x70] ADD RAX,0xa10 MOV qword ptr [RBP + -0xd8],RAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x90] CALL 0x00175940 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00180ca9 MOV EAX,dword ptr [RBP + -0x78] MOV dword ptr [RBP + -0xdc],EAX JMP 0x00180cb3 LAB_00180ca9: XOR EAX,EAX MOV dword ptr [RBP + -0xdc],EAX JMP 0x00180cb3 LAB_00180cb3: MOV RDI,qword ptr [RBP + -0xd8] MOV ESI,dword ptr [RBP + -0xdc] CALL 0x0013f150 MOV CL,AL MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x15],CL JMP 0x00180cd0 LAB_00180cd0: MOV RAX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RAX + 0x14] OR ECX,0x2 MOV byte ptr [RAX + 0x14],CL JMP 0x00180ce0 LAB_00180ce0: MOV EAX,dword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] ADD ECX,0x1 MOV RDX,qword ptr [RBP + -0x38] SUB ECX,dword ptr [RDX + 0x8] IMUL ECX,ECX,0x7 SUB EAX,ECX MOV dword ptr [RBP + -0xa0],EAX MOV EAX,dword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RCX + 0x3b8] JNC 0x00180d1f MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x3b8] MOV dword ptr [RBP + -0xa0],EAX LAB_00180d1f: JMP 0x00180d21 LAB_00180d21: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x38] MOV R10,qword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + -0x74] MOV R9D,0x1 LEA R11,[RBP + -0xb8] MOV qword ptr [RSP],R11 MOV qword ptr [RSP + 0x8],R10 MOV dword ptr [RSP + 0x10],EAX CALL 0x0017e0a0 MOV byte ptr [RBP + -0xb9],AL CMP AL,0x0 JZ 0x00180d67 JMP 0x00180d6f LAB_00180d67: JMP 0x00180d69 LAB_00180d69: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00180da8 LAB_00180d6f: JMP 0x00180d71 LAB_00180d71: JMP 0x00180d73 LAB_00180d73: MOV RDI,qword ptr [RBP + -0x70] CALL 0x00132ea0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x644],0x0 JZ 0x00180d97 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xffffffff CALL 0x00140490 LAB_00180d97: MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001773c0 MOV byte ptr [RBP + -0x1],0x1 LAB_00180da8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x100 POP RBP RET
int1 _ma_update_at_original_place (long *param_1,int8 param_2,int4 param_3,uint param_4,int param_5, int8 param_6,int8 param_7,int8 param_8,int8 param_9) { long *plVar1; char cVar2; int1 uVar3; int4 *puVar4; long lVar5; int8 in_stack_fffffffffffffef8; int4 uVar6; uint local_e4; int1 local_cc [4]; uint local_c8; char local_c1; long local_c0; long local_b8; int8 local_b0; uint local_a8; int4 local_a4; uint local_a0; long local_98; int8 local_90; int4 local_88; uint local_84; uint local_80; int4 local_7c; long local_78; int1 local_70 [8]; int4 local_68; int1 local_60; long *local_58; long *local_50; long local_48; long *local_40; int8 local_38; int local_2c; uint local_28; int4 local_24; int8 local_20; long *local_18; uVar6 = (int4)((ulong)in_stack_fffffffffffffef8 >> 0x20); local_50 = param_1 + 0x10; local_58 = param_1 + 0x28; local_78 = *param_1; local_88 = *(int4 *)(*param_1 + 0x7bc); local_7c = (int4)param_1[0x2e]; *(int *)(param_1 + 0x2e) = (int)param_1[0x16]; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; calc_record_size(param_1,param_8,local_58); _ma_bitmap_flushable(local_18,1); local_98 = pagecache_read(*(int8 *)(local_78 + 0x600),local_18 + 0x8e,local_20,0,0, *(int4 *)(local_78 + 0x7d4),CONCAT44(uVar6,4),local_70); local_68 = 6; local_60 = local_98 != 0; insert_dynamic(local_18 + 0x5d,local_70); plVar1 = local_18; if (local_98 == 0) { puVar4 = (int4 *)_my_thread_var(); _ma_set_fatal_error(plVar1,*puVar4); } else { local_80 = (uint)*(ushort *)(local_98 + 10); local_90 = dir_entry_pos(local_98,local_88,local_24); if (local_80 + (int)local_50[0x14] < local_28) { _ma_set_fatal_error(local_18,0x7f); } else { local_84 = local_80; cVar2 = extend_area_on_page(local_18,local_98,local_90,local_24,local_28,&local_84,&local_c8, local_cc,1); if (cVar2 == '\0') { local_c0 = local_98; local_a4 = local_24; local_a0 = local_84; local_b0 = local_90; local_b8 = local_98 + (ulong)local_c8; if (((*(long *)local_50[5] == 0) || (cVar2 = delete_tails(local_18,local_50[5]), cVar2 == '\0')) && ((*(int *)((long)local_50 + 0xac) == 0 || (cVar2 = free_full_pages(local_18,local_50), cVar2 == '\0')))) { local_40 = local_50; cVar2 = extent_to_bitmap_blocks(local_18,local_50,local_20,local_2c,local_38); if (cVar2 == '\0') { local_48 = *local_40; *(uint *)(local_48 + 0xc) = local_a0; lVar5 = local_78 + 0xa10; cVar2 = enough_free_entries_on_page(local_78,local_98); if (cVar2 == '\0') { local_e4 = 0; } else { local_e4 = local_80; } uVar3 = _ma_free_size_to_head_pattern(lVar5,local_e4); *(int1 *)(local_48 + 0x15) = uVar3; *(byte *)(local_48 + 0x14) = *(byte *)(local_48 + 0x14) | 2; local_a8 = local_28 + ((local_2c + 1) - (int)local_40[1]) * -7; if ((ulong)local_a8 < *(ulong *)(local_78 + 0x3b8)) { local_a8 = (uint)*(int8 *)(local_78 + 0x3b8); } local_c1 = write_block_record(local_18,param_7,param_8,local_58,local_40,1,&local_c0, param_9,local_7c); if (local_c1 == '\0') { return 0; } } } } } } _ma_mark_file_crashed(local_78); if (*(int *)((long)local_18 + 0x644) != 0) { _ma_bitmap_flushable(local_18,0xffffffff); } _ma_unpin_all_pages_and_finalize_row(local_18,0); return 1; }
2,021
my_hash_iterate
eloqsql/mysys/hash.c
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument) { uint records, i; records= hash->records; for (i= 0 ; i < records ; i++) { if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data, argument)) return 1; } return 0; }
O3
c
my_hash_iterate: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl 0x18(%rdi), %r12d testq %r12, %r12 je 0xb4514 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 shlq $0x4, %r12 xorl %r13d, %r13d movq 0x28(%r15), %rax movq 0x8(%rax,%r13), %rdi movq %rbx, %rsi callq *%r14 testb %al, %al jne 0xb4518 addq $0x10, %r13 cmpq %r13, %r12 jne 0xb44f8 xorl %eax, %eax jmp 0xb451a movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
my_hash_iterate: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, [rdi+18h] test r12, r12 jz short loc_B4514 mov rbx, rdx mov r14, rsi mov r15, rdi shl r12, 4 xor r13d, r13d loc_B44F8: mov rax, [r15+28h] mov rdi, [rax+r13+8] mov rsi, rbx call r14 test al, al jnz short loc_B4518 add r13, 10h cmp r12, r13 jnz short loc_B44F8 loc_B4514: xor eax, eax jmp short loc_B451A loc_B4518: mov al, 1 loc_B451A: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3) { long long v4; // r12 long long v5; // r13 if ( !*(_DWORD *)(a1 + 24) ) return 0; v4 = 16LL * *(unsigned int *)(a1 + 24); v5 = 0LL; while ( !a2(*(_QWORD *)(*(_QWORD *)(a1 + 40) + v5 + 8), a3) ) { v5 += 16LL; if ( v4 == v5 ) return 0; } return 1; }
my_hash_iterate: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,dword ptr [RDI + 0x18] TEST R12,R12 JZ 0x001b4514 MOV RBX,RDX MOV R14,RSI MOV R15,RDI SHL R12,0x4 XOR R13D,R13D LAB_001b44f8: MOV RAX,qword ptr [R15 + 0x28] MOV RDI,qword ptr [RAX + R13*0x1 + 0x8] MOV RSI,RBX CALL R14 TEST AL,AL JNZ 0x001b4518 ADD R13,0x10 CMP R12,R13 JNZ 0x001b44f8 LAB_001b4514: XOR EAX,EAX JMP 0x001b451a LAB_001b4518: MOV AL,0x1 LAB_001b451a: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_iterate(long param_1,code *param_2,int8 param_3) { uint uVar1; char cVar2; long lVar3; uVar1 = *(uint *)(param_1 + 0x18); if ((ulong)uVar1 != 0) { lVar3 = 0; do { cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + 8 + lVar3),param_3); if (cVar2 != '\0') { return 1; } lVar3 = lVar3 + 0x10; } while ((ulong)uVar1 << 4 != lVar3); } return 0; }
2,022
testing::internal::ShouldUseColor(bool)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
bool ShouldUseColor(bool stdout_is_tty) { std::string c = GTEST_FLAG_GET(color); const char* const gtest_color = c.c_str(); if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) { #if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW // On Windows the TERM variable is usually not set, but the // console there does support colors. return stdout_is_tty; #else // On non-Windows platforms, we rely on the TERM variable. const char* const term = posix::GetEnv("TERM"); const bool term_supports_color = String::CStringEquals(term, "xterm") || String::CStringEquals(term, "xterm-color") || String::CStringEquals(term, "xterm-256color") || String::CStringEquals(term, "screen") || String::CStringEquals(term, "screen-256color") || String::CStringEquals(term, "tmux") || String::CStringEquals(term, "tmux-256color") || String::CStringEquals(term, "rxvt-unicode") || String::CStringEquals(term, "rxvt-unicode-256color") || String::CStringEquals(term, "linux") || String::CStringEquals(term, "cygwin"); return stdout_is_tty && term_supports_color; #endif // GTEST_OS_WINDOWS } return String::CaseInsensitiveCStringEquals(gtest_color, "yes") || String::CaseInsensitiveCStringEquals(gtest_color, "true") || String::CaseInsensitiveCStringEquals(gtest_color, "t") || String::CStringEquals(gtest_color, "1"); // We take "yes", "true", "t", and "1" as meaning "yes". If the // value is neither one of these nor "auto", we treat it as "no" to // be conservative. }
O1
cpp
testing::internal::ShouldUseColor(bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edi, %ebp leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x4137f6a(%rip), %rsi # 0x415de38 movq 0x4137f6b(%rip), %rdx # 0x415de40 addq %rsi, %rdx leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0xf66a movq (%rbx), %rbx testq %rbx, %rbx je 0x25f97 leaq 0x1ca38(%rip), %rsi # 0x42930 movq %rbx, %rdi callq 0x9530 testl %eax, %eax je 0x25f9f testq %rbx, %rbx je 0x25f97 sete %bpl leaq 0x1d572(%rip), %rsi # 0x4348e movq %rbx, %rdi callq 0x9530 testl %eax, %eax sete %r15b orb %r15b, %bpl jne 0x26133 testq %rbx, %rbx sete %bpl leaq 0x1a1ba(%rip), %rsi # 0x400fb movq %rbx, %rdi callq 0x9530 testl %eax, %eax sete %r15b orb %r15b, %bpl jne 0x26133 testq %rbx, %rbx sete %bpl leaq 0x1d9f3(%rip), %rsi # 0x43959 movq %rbx, %rdi callq 0x9530 testl %eax, %eax sete %r15b orb %r15b, %bpl jne 0x26133 leaq 0x1c606(%rip), %rsi # 0x4258a movq %rbx, %rdi callq 0x97b0 testl %eax, %eax sete %r15b jmp 0x26133 xorl %r15d, %r15d jmp 0x26133 leaq 0x1d468(%rip), %rdi # 0x4340e callq 0x9660 testq %rax, %rax je 0x2612d movq %rax, %r14 sete %r13b leaq 0x1d451(%rip), %rsi # 0x43413 movq %rax, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d432(%rip), %rsi # 0x43419 movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d419(%rip), %rsi # 0x43425 movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d403(%rip), %rsi # 0x43434 movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d3e5(%rip), %rsi # 0x4343b movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d3d0(%rip), %rsi # 0x4344b movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d3b0(%rip), %rsi # 0x43450 movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d39d(%rip), %rsi # 0x4345e movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d389(%rip), %rsi # 0x4346b movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 testq %r14, %r14 sete %r13b leaq 0x1d37e(%rip), %rsi # 0x43481 movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b orb %r15b, %r13b jne 0x26130 leaq 0x1d36a(%rip), %rsi # 0x43487 movq %r14, %rdi callq 0x97b0 testl %eax, %eax sete %r15b jmp 0x26130 xorl %r15d, %r15d andb %bpl, %r15b cmpq %r12, %rbx je 0x26148 movq 0x18(%rsp), %rsi incq %rsi movq %rbx, %rdi callq 0x94c0 movl %r15d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN7testing8internal14ShouldUseColorEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, edi lea r12, [rsp+58h+var_40] mov [r12-10h], r12 mov rsi, cs:_ZN7testing17FLAGS_gtest_colorB5cxx11E; testing::FLAGS_gtest_color mov rdx, cs:qword_415DE40 add rdx, rsi lea rbx, [rsp+58h+var_50] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rbx, [rbx] test rbx, rbx jz loc_25F97 lea rsi, aAuto; "auto" mov rdi, rbx call _strcasecmp test eax, eax jz loc_25F9F test rbx, rbx jz loc_25F97 setz bpl lea rsi, aYes; "yes" mov rdi, rbx call _strcasecmp test eax, eax setz r15b or bpl, r15b jnz loc_26133 test rbx, rbx setz bpl lea rsi, aTrue; "true" mov rdi, rbx call _strcasecmp test eax, eax setz r15b or bpl, r15b jnz loc_26133 test rbx, rbx setz bpl lea rsi, aT+1; "t" mov rdi, rbx call _strcasecmp test eax, eax setz r15b or bpl, r15b jnz loc_26133 lea rsi, aFcntlPipeFd1FS+22h; "1" mov rdi, rbx call _strcmp test eax, eax setz r15b jmp loc_26133 loc_25F97: xor r15d, r15d jmp loc_26133 loc_25F9F: lea rdi, aTerm; "TERM" call _getenv test rax, rax jz loc_2612D mov r14, rax setz r13b lea rsi, aXterm; "xterm" mov rdi, rax call _strcmp test eax, eax setz r15b or r13b, r15b jnz loc_26130 test r14, r14 setz r13b lea rsi, aXtermColor; "xterm-color" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz loc_26130 test r14, r14 setz r13b lea rsi, aXterm256color; "xterm-256color" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz loc_26130 test r14, r14 setz r13b lea rsi, aScreen; "screen" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz loc_26130 test r14, r14 setz r13b lea rsi, aScreen256color; "screen-256color" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz loc_26130 test r14, r14 setz r13b lea rsi, aTmux; "tmux" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz loc_26130 test r14, r14 setz r13b lea rsi, aTmux256color; "tmux-256color" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz short loc_26130 test r14, r14 setz r13b lea rsi, aRxvtUnicode; "rxvt-unicode" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz short loc_26130 test r14, r14 setz r13b lea rsi, aRxvtUnicode256; "rxvt-unicode-256color" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz short loc_26130 test r14, r14 setz r13b lea rsi, aLinux; "linux" mov rdi, r14 call _strcmp test eax, eax setz r15b or r13b, r15b jnz short loc_26130 lea rsi, aCygwin; "cygwin" mov rdi, r14 call _strcmp test eax, eax setz r15b jmp short loc_26130 loc_2612D: xor r15d, r15d loc_26130: and r15b, bpl loc_26133: cmp rbx, r12 jz short loc_26148 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) loc_26148: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long testing::internal::ShouldUseColor(testing::internal *this) { unsigned int v1; // r15d _QWORD *v2; // rbx long long v3; // rax long long v4; // r14 bool v5; // r13 _QWORD *v7; // [rsp+8h] [rbp-50h] BYREF _QWORD v8[8]; // [rsp+18h] [rbp-40h] BYREF v7 = v8; std::string::_M_construct<char *>( &v7, (_BYTE *)testing::FLAGS_gtest_color[abi:cxx11], testing::FLAGS_gtest_color[abi:cxx11] + qword_415DE40); v2 = v7; if ( !v7 ) goto LABEL_8; if ( (unsigned int)strcasecmp(v7) ) { if ( v2 ) { LOBYTE(v1) = (unsigned int)strcasecmp(v2) == 0; if ( !((unsigned __int8)v1 | (v2 == 0LL)) ) { LOBYTE(v1) = (unsigned int)strcasecmp(v2) == 0; if ( !((unsigned __int8)v1 | (v2 == 0LL)) ) { LOBYTE(v1) = (unsigned int)strcasecmp(v2) == 0; if ( !((unsigned __int8)v1 | (v2 == 0LL)) ) LOBYTE(v1) = (unsigned int)strcmp(v2, "1") == 0; } } goto LABEL_23; } LABEL_8: v1 = 0; goto LABEL_23; } v3 = getenv("TERM"); if ( v3 ) { v4 = v3; v5 = v3 == 0; LOBYTE(v1) = (unsigned int)strcmp(v3, "xterm") == 0; if ( !((unsigned __int8)v1 | v5) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "xterm-color") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "xterm-256color") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "screen") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "screen-256color") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "tmux") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "tmux-256color") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "rxvt-unicode") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "rxvt-unicode-256color") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) { LOBYTE(v1) = (unsigned int)strcmp(v4, "linux") == 0; if ( !((unsigned __int8)v1 | (v4 == 0)) ) LOBYTE(v1) = (unsigned int)strcmp(v4, "cygwin") == 0; } } } } } } } } } } else { v1 = 0; } LOBYTE(v1) = (unsigned __int8)this & v1; LABEL_23: if ( v2 != v8 ) operator delete(v2, v8[0] + 1LL); return v1; }
ShouldUseColor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,EDI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [0x0425de38] MOV RDX,qword ptr [0x0425de40] ADD RDX,RSI LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x0010f66a MOV RBX,qword ptr [RBX] TEST RBX,RBX JZ 0x00125f97 LEA RSI,[0x142930] MOV RDI,RBX CALL 0x00109530 TEST EAX,EAX JZ 0x00125f9f TEST RBX,RBX JZ 0x00125f97 SETZ BPL LEA RSI,[0x14348e] MOV RDI,RBX CALL 0x00109530 TEST EAX,EAX SETZ R15B OR BPL,R15B JNZ 0x00126133 TEST RBX,RBX SETZ BPL LEA RSI,[0x1400fb] MOV RDI,RBX CALL 0x00109530 TEST EAX,EAX SETZ R15B OR BPL,R15B JNZ 0x00126133 TEST RBX,RBX SETZ BPL LEA RSI,[0x143959] MOV RDI,RBX CALL 0x00109530 TEST EAX,EAX SETZ R15B OR BPL,R15B JNZ 0x00126133 LEA RSI,[0x14258a] MOV RDI,RBX CALL 0x001097b0 TEST EAX,EAX SETZ R15B JMP 0x00126133 LAB_00125f97: XOR R15D,R15D JMP 0x00126133 LAB_00125f9f: LEA RDI,[0x14340e] CALL 0x00109660 TEST RAX,RAX JZ 0x0012612d MOV R14,RAX SETZ R13B LEA RSI,[0x143413] MOV RDI,RAX CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x143419] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x143425] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x143434] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x14343b] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x14344b] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x143450] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x14345e] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x14346b] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 TEST R14,R14 SETZ R13B LEA RSI,[0x143481] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B OR R13B,R15B JNZ 0x00126130 LEA RSI,[0x143487] MOV RDI,R14 CALL 0x001097b0 TEST EAX,EAX SETZ R15B JMP 0x00126130 LAB_0012612d: XOR R15D,R15D LAB_00126130: AND R15B,BPL LAB_00126133: CMP RBX,R12 JZ 0x00126148 MOV RSI,qword ptr [RSP + 0x18] INC RSI MOV RDI,RBX CALL 0x001094c0 LAB_00126148: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::ShouldUseColor(bool) */ ulong testing::internal::ShouldUseColor(bool param_1) { long *__s1; int iVar1; char *__s1_00; int8 unaff_R15; int7 uVar3; ulong uVar2; bool bVar4; long *local_50 [2]; long local_40 [2]; local_50[0] = local_40; std::__cxx11::string::_M_construct<char*> (local_50,FLAGS_gtest_color_abi_cxx11_,DAT_0425de40 + FLAGS_gtest_color_abi_cxx11_); __s1 = local_50[0]; if (local_50[0] != (long *)0x0) { iVar1 = strcasecmp((char *)local_50[0],"auto"); uVar3 = (int7)((ulong)unaff_R15 >> 8); if (iVar1 == 0) { __s1_00 = getenv("TERM"); if (__s1_00 == (char *)0x0) { bVar4 = false; uVar3 = 0; } else { iVar1 = strcmp(__s1_00,"xterm"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"xterm-color"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"xterm-256color"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"screen"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"screen-256color"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"tmux"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"tmux-256color"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"rxvt-unicode"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"rxvt-unicode-256color"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"linux"); bVar4 = iVar1 == 0; if (__s1_00 != (char *)0x0 && !bVar4) { iVar1 = strcmp(__s1_00,"cygwin"); bVar4 = iVar1 == 0; } } } } } } } } } } } uVar2 = CONCAT71(uVar3,bVar4 & param_1); goto LAB_00126133; } if (__s1 != (long *)0x0) { iVar1 = strcasecmp((char *)__s1,"yes"); uVar2 = CONCAT71(uVar3,iVar1 == 0); if (__s1 != (long *)0x0 && iVar1 != 0) { iVar1 = strcasecmp((char *)__s1,"true"); uVar2 = CONCAT71(uVar3,iVar1 == 0); if (__s1 != (long *)0x0 && iVar1 != 0) { iVar1 = strcasecmp((char *)__s1,"t"); uVar2 = CONCAT71(uVar3,iVar1 == 0); if (__s1 != (long *)0x0 && iVar1 != 0) { iVar1 = strcmp((char *)__s1,"1"); uVar2 = CONCAT71(uVar3,iVar1 == 0); } } } goto LAB_00126133; } } uVar2 = 0; LAB_00126133: if (__s1 != local_40) { operator_delete(__s1,local_40[0] + 1); } return uVar2 & 0xffffffff; }
2,023
js_proxy_revoke
bluesky950520[P]quickjs/quickjs.c
static JSValue js_proxy_revoke(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic, JSValue *func_data) { JSProxyData *s = JS_GetOpaque(func_data[0], JS_CLASS_PROXY); if (s) { /* We do not free the handler and target in case they are referenced as constants in the C call stack */ s->is_revoked = TRUE; JS_FreeValue(ctx, func_data[0]); func_data[0] = JS_NULL; } return JS_UNDEFINED; }
O0
c
js_proxy_revoke: subq $0x58, %rsp movq 0x60(%rsp), %rax movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movl %ecx, 0x2c(%rsp) movq %r8, 0x20(%rsp) movl %r9d, 0x1c(%rsp) movq 0x60(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi movl $0x30, %edx callq 0x3e640 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) je 0x9289d movq 0x10(%rsp), %rax movb $0x1, 0x21(%rax) movq 0x30(%rsp), %rdi movq 0x60(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x29f80 movq 0x60(%rsp), %rax movl $0x0, (%rsp) movq $0x2, 0x8(%rsp) movq (%rsp), %rcx movq %rcx, (%rax) movq 0x8(%rsp), %rcx movq %rcx, 0x8(%rax) movl $0x0, 0x48(%rsp) movq $0x3, 0x50(%rsp) movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdx addq $0x58, %rsp retq nopl (%rax)
js_proxy_revoke: sub rsp, 58h mov rax, [rsp+58h+arg_0] mov [rsp+58h+var_20], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_28], rdi mov [rsp+58h+var_2C], ecx mov [rsp+58h+var_38], r8 mov [rsp+58h+var_3C], r9d mov rax, [rsp+58h+arg_0] mov rdi, [rax] mov rsi, [rax+8] mov edx, 30h ; '0' call JS_GetOpaque mov [rsp+58h+var_48], rax cmp [rsp+58h+var_48], 0 jz short loc_9289D mov rax, [rsp+58h+var_48] mov byte ptr [rax+21h], 1 mov rdi, [rsp+58h+var_28] mov rax, [rsp+58h+arg_0] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov rax, [rsp+58h+arg_0] mov dword ptr [rsp+58h+var_58], 0 mov [rsp+58h+var_50], 2 mov rcx, [rsp+58h+var_58] mov [rax], rcx mov rcx, [rsp+58h+var_50] mov [rax+8], rcx loc_9289D: mov dword ptr [rsp+58h+var_10], 0 mov [rsp+58h+var_8], 3 mov rax, [rsp+58h+var_10] mov rdx, [rsp+58h+var_8] add rsp, 58h retn
long long js_proxy_revoke(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long *a7) { long long v8; // [rsp+0h] [rbp-58h] long long Opaque; // [rsp+10h] [rbp-48h] long long v10; // [rsp+48h] [rbp-10h] Opaque = JS_GetOpaque(*a7, a7[1], 48); if ( Opaque ) { *(_BYTE *)(Opaque + 33) = 1; JS_FreeValue(a1, *a7, a7[1]); LODWORD(v8) = 0; *a7 = v8; a7[1] = 2LL; } LODWORD(v10) = 0; return v10; }
js_proxy_revoke: SUB RSP,0x58 MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOV dword ptr [RSP + 0x2c],ECX MOV qword ptr [RSP + 0x20],R8 MOV dword ptr [RSP + 0x1c],R9D MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] MOV EDX,0x30 CALL 0x0013e640 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JZ 0x0019289d MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + 0x21],0x1 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00129f80 MOV RAX,qword ptr [RSP + 0x60] MOV dword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x2 MOV RCX,qword ptr [RSP] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_0019289d: MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x3 MOV RAX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RSP,0x58 RET
int1 [16] js_proxy_revoke(int8 param_1) { int1 auVar1 [16]; long lVar2; long *in_stack_00000008; uint uStack_54; uint uStack_c; lVar2 = JS_GetOpaque(*in_stack_00000008,in_stack_00000008[1],0x30); if (lVar2 != 0) { *(int1 *)(lVar2 + 0x21) = 1; JS_FreeValue(param_1,*in_stack_00000008,in_stack_00000008[1]); *in_stack_00000008 = (ulong)uStack_54 << 0x20; in_stack_00000008[1] = 2; } auVar1._8_8_ = 3; auVar1._0_8_ = (ulong)uStack_c << 0x20; return auVar1; }
2,024
js_proxy_revoke
bluesky950520[P]quickjs/quickjs.c
static JSValue js_proxy_revoke(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic, JSValue *func_data) { JSProxyData *s = JS_GetOpaque(func_data[0], JS_CLASS_PROXY); if (s) { /* We do not free the handler and target in case they are referenced as constants in the C call stack */ s->is_revoked = TRUE; JS_FreeValue(ctx, func_data[0]); func_data[0] = JS_NULL; } return JS_UNDEFINED; }
O2
c
js_proxy_revoke: pushq %rbx movq 0x10(%rsp), %rbx cmpl $-0x1, 0x8(%rbx) jne 0x4826a movq (%rbx), %rax cmpw $0x30, 0x6(%rax) jne 0x4826a movq 0x30(%rax), %rax testq %rax, %rax je 0x4826a movb $0x1, 0x21(%rax) movq (%rbx), %rsi movq 0x8(%rbx), %rdx callq 0x1bbce andl $0x0, (%rbx) movq $0x2, 0x8(%rbx) pushq $0x3 popq %rdx xorl %eax, %eax popq %rbx retq
js_proxy_revoke: push rbx mov rbx, [rsp+8+arg_0] cmp dword ptr [rbx+8], 0FFFFFFFFh jnz short loc_4826A mov rax, [rbx] cmp word ptr [rax+6], 30h ; '0' jnz short loc_4826A mov rax, [rax+30h] test rax, rax jz short loc_4826A mov byte ptr [rax+21h], 1 mov rsi, [rbx] mov rdx, [rbx+8] call JS_FreeValue and dword ptr [rbx], 0 mov qword ptr [rbx+8], 2 loc_4826A: push 3 pop rdx xor eax, eax pop rbx retn
long long js_proxy_revoke(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long *a7) { long long v7; // rax if ( *((_DWORD *)a7 + 2) == -1 && *(_WORD *)(*a7 + 6) == 48 ) { v7 = *(_QWORD *)(*a7 + 48); if ( v7 ) { *(_BYTE *)(v7 + 33) = 1; JS_FreeValue(a1, *a7, a7[1]); *(_DWORD *)a7 = 0; a7[1] = 2LL; } } return 0LL; }
js_proxy_revoke: PUSH RBX MOV RBX,qword ptr [RSP + 0x10] CMP dword ptr [RBX + 0x8],-0x1 JNZ 0x0014826a MOV RAX,qword ptr [RBX] CMP word ptr [RAX + 0x6],0x30 JNZ 0x0014826a MOV RAX,qword ptr [RAX + 0x30] TEST RAX,RAX JZ 0x0014826a MOV byte ptr [RAX + 0x21],0x1 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] CALL 0x0011bbce AND dword ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x2 LAB_0014826a: PUSH 0x3 POP RDX XOR EAX,EAX POP RBX RET
int1 [16] js_proxy_revoke(int8 param_1) { long lVar1; long *in_stack_00000008; if ((((int)in_stack_00000008[1] == -1) && (*(short *)(*in_stack_00000008 + 6) == 0x30)) && (lVar1 = *(long *)(*in_stack_00000008 + 0x30), lVar1 != 0)) { *(int1 *)(lVar1 + 0x21) = 1; JS_FreeValue(param_1,*in_stack_00000008,in_stack_00000008[1]); *(int4 *)in_stack_00000008 = 0; in_stack_00000008[1] = 2; } return ZEXT816(3) << 0x40; }
2,025
testing::internal::String::FormatByte[abi:cxx11](unsigned char)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
std::string String::FormatByte(unsigned char value) { std::stringstream ss; ss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << static_cast<unsigned int>(value); return ss.str(); }
O0
cpp
testing::internal::String::FormatByte[abi:cxx11](unsigned char): subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, 0x28(%rsp) movb %sil, %al movq %rdi, %rcx movq %rcx, 0x30(%rsp) movq %rdi, 0x1f0(%rsp) movb %al, 0x1ef(%rsp) leaq 0x60(%rsp), %rdi callq 0x14490 leaq 0x70(%rsp), %rax movq %rax, 0x38(%rsp) movl $0x30, %edi callq 0xe45b0 movb %al, 0x47(%rsp) jmp 0xc4d2a movq 0x38(%rsp), %rdi movb 0x47(%rsp), %al movb %al, 0x5f(%rsp) movzbl 0x5f(%rsp), %esi callq 0x14b60 movq %rax, 0x20(%rsp) jmp 0xc4d48 movl $0x2, %edi callq 0xe45d0 movl %eax, 0x1c(%rsp) jmp 0xc4d58 movq 0x20(%rsp), %rdi movl 0x1c(%rsp), %eax movl %eax, 0x48(%rsp) movl 0x48(%rsp), %esi callq 0x147c0 movq %rax, 0x10(%rsp) jmp 0xc4d75 movq 0x10(%rsp), %rdi leaq 0x1f7ef(%rip), %rsi # 0xe4570 callq 0x14210 movq %rax, 0x8(%rsp) jmp 0xc4d8d movq 0x8(%rsp), %rdi leaq 0x1f7f7(%rip), %rsi # 0xe4590 callq 0x14210 movq %rax, (%rsp) jmp 0xc4da4 movq (%rsp), %rdi movzbl 0x1ef(%rsp), %esi callq 0x149a0 jmp 0xc4db7 movq 0x28(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x14d10 jmp 0xc4dc8 leaq 0x60(%rsp), %rdi callq 0x14500 movq 0x30(%rsp), %rax addq $0x1f8, %rsp # imm = 0x1F8 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x60(%rsp), %rdi callq 0x14500 movq 0x50(%rsp), %rdi callq 0x14c80 nopw %cs:(%rax,%rax)
_ZN7testing8internal6String10FormatByteB5cxx11Eh: sub rsp, 1F8h mov [rsp+1F8h+var_1D0], rdi mov al, sil mov rcx, rdi mov [rsp+1F8h+var_1C8], rcx mov [rsp+1F8h+var_8], rdi mov [rsp+1F8h+var_9], al lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rax, [rsp+1F8h+var_188] mov [rsp+1F8h+var_1C0], rax mov edi, 30h ; '0' call _ZSt7setfillIcESt8_SetfillIT_ES1_; std::setfill<char>(char) mov [rsp+1F8h+var_1B1], al jmp short $+2 loc_C4D2A: mov rdi, [rsp+1F8h+var_1C0] mov al, [rsp+1F8h+var_1B1] mov [rsp+1F8h+var_199], al movzx esi, [rsp+1F8h+var_199] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St8_SetfillIS3_E; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setfill<char>) mov [rsp+1F8h+var_1D8], rax jmp short $+2 loc_C4D48: mov edi, 2; int call _ZSt4setwi; std::setw(int) mov [rsp+1F8h+var_1DC], eax jmp short $+2 loc_C4D58: mov rdi, [rsp+1F8h+var_1D8] mov eax, [rsp+1F8h+var_1DC] mov [rsp+1F8h+var_1B0], eax mov esi, [rsp+1F8h+var_1B0] call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rsp+1F8h+var_1E8], rax jmp short $+2 loc_C4D75: mov rdi, [rsp+1F8h+var_1E8] lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rsp+1F8h+var_1F0], rax jmp short $+2 loc_C4D8D: mov rdi, [rsp+1F8h+var_1F0] lea rsi, _ZSt9uppercaseRSt8ios_base; std::uppercase(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rsp+1F8h+var_1F8], rax jmp short $+2 loc_C4DA4: mov rdi, [rsp+1F8h+var_1F8] movzx esi, [rsp+1F8h+var_9] call __ZNSolsEj; std::ostream::operator<<(uint) jmp short $+2 loc_C4DB7: mov rdi, [rsp+1F8h+var_1D0] lea rsi, [rsp+1F8h+var_198] call __ZNKRSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_C4DC8: lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+1F8h+var_1C8] add rsp, 1F8h retn mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_58] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rsp+arg_48] call __Unwind_Resume
long long testing::internal::String::FormatByte[abi:cxx11](long long a1, unsigned __int8 a2) { long long v3; // [rsp+0h] [rbp-1F8h] long long v4; // [rsp+8h] [rbp-1F0h] long long v5; // [rsp+10h] [rbp-1E8h] long long v6; // [rsp+20h] [rbp-1D8h] unsigned int v7; // [rsp+48h] [rbp-1B0h] unsigned __int8 v8; // [rsp+5Fh] [rbp-199h] _BYTE v9[16]; // [rsp+60h] [rbp-198h] BYREF _BYTE v10[383]; // [rsp+70h] [rbp-188h] BYREF unsigned __int8 v11; // [rsp+1EFh] [rbp-9h] long long v12; // [rsp+1F0h] [rbp-8h] v12 = a1; v11 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9); v8 = std::setfill<char>(48LL); v6 = std::operator<<<char,std::char_traits<char>>(v10, v8); v7 = std::setw(2); v5 = std::operator<<<char,std::char_traits<char>>(v6, v7); v4 = std::ostream::operator<<(v5, std::hex); v3 = std::ostream::operator<<(v4, std::uppercase); std::ostream::operator<<(v3, v11); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9); return a1; }
FormatByte[abi:cxx11]: SUB RSP,0x1f8 MOV qword ptr [RSP + 0x28],RDI MOV AL,SIL MOV RCX,RDI MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x1f0],RDI MOV byte ptr [RSP + 0x1ef],AL LEA RDI,[RSP + 0x60] CALL 0x00114490 LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0x38],RAX LAB_001c4d1a: MOV EDI,0x30 CALL 0x001e45b0 MOV byte ptr [RSP + 0x47],AL JMP 0x001c4d2a LAB_001c4d2a: MOV RDI,qword ptr [RSP + 0x38] MOV AL,byte ptr [RSP + 0x47] MOV byte ptr [RSP + 0x5f],AL MOVZX ESI,byte ptr [RSP + 0x5f] CALL 0x00114b60 MOV qword ptr [RSP + 0x20],RAX JMP 0x001c4d48 LAB_001c4d48: MOV EDI,0x2 CALL 0x001e45d0 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001c4d58 LAB_001c4d58: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x48],EAX MOV ESI,dword ptr [RSP + 0x48] CALL 0x001147c0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001c4d75 LAB_001c4d75: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x1e4570] CALL 0x00114210 MOV qword ptr [RSP + 0x8],RAX JMP 0x001c4d8d LAB_001c4d8d: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x1e4590] CALL 0x00114210 MOV qword ptr [RSP],RAX JMP 0x001c4da4 LAB_001c4da4: MOV RDI,qword ptr [RSP] MOVZX ESI,byte ptr [RSP + 0x1ef] CALL 0x001149a0 JMP 0x001c4db7 LAB_001c4db7: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x60] CALL 0x00114d10 LAB_001c4dc6: JMP 0x001c4dc8 LAB_001c4dc8: LEA RDI,[RSP + 0x60] CALL 0x00114500 MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x1f8 RET
/* testing::internal::String::FormatByte[abi:cxx11](unsigned char) */ String * __thiscall testing::internal::String::FormatByte_abi_cxx11_(String *this,uchar param_1) { int1 uVar1; int4 uVar2; ostream *poVar3; stringstream local_198 [16]; int1 local_188 [383]; byte local_9; String *local_8; local_9 = param_1; local_8 = this; std::__cxx11::stringstream::stringstream(local_198); /* try { // try from 001c4d1a to 001c4dc5 has its CatchHandler @ 001c4ddf */ uVar1 = std::setfill<char>('0'); poVar3 = std::operator<<(local_188,uVar1); uVar2 = std::setw(2); poVar3 = std::operator<<(poVar3,uVar2); poVar3 = (ostream *)std::ostream::operator<<(poVar3,std::hex); poVar3 = (ostream *)std::ostream::operator<<(poVar3,std::uppercase); std::ostream::operator<<(poVar3,(uint)local_9); std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_198); return this; }
2,026
r3d_framebuffer_load_pingpong_post
r3d/src/r3d_state.c
void r3d_framebuffer_load_pingpong_post(int width, int height) { struct r3d_fb_pingpong_post_t* post = &R3D.framebuffer.post; post->id = rlLoadFramebuffer(); if (post->id == 0) { TraceLog(LOG_WARNING, "Failed to create framebuffer"); } rlEnableFramebuffer(post->id); // Generate (color) buffers post->source = rlLoadTexture(NULL, width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8, 1); post->target = rlLoadTexture(NULL, width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8, 1); // Activate the draw buffers for all the attachments rlActiveDrawBuffers(1); // Attach the textures to the framebuffer rlFramebufferAttach(post->id, post->target, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_TEXTURE2D, 0); // Check if the framebuffer is complete if (!rlFramebufferComplete(post->id)) { TraceLog(LOG_WARNING, "Framebuffer is not complete"); } }
O0
c
r3d_framebuffer_load_pingpong_post: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) leaq 0xea6cb(%rip), %rax # 0x24b040 addq $0x4, %rax addq $0x48, %rax movq %rax, -0x10(%rbp) callq 0x198c0 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax cmpl $0x0, (%rax) jne 0x1609aa movl $0x4, %edi leaq 0x4c42b(%rip), %rsi # 0x1acdce movb $0x0, %al callq 0x13ae70 movq -0x10(%rbp), %rax movl (%rax), %edi callq 0x15bb0 movl -0x4(%rbp), %esi movl -0x8(%rbp), %edx xorl %eax, %eax movl %eax, %edi movl $0x4, %ecx movl $0x1, %r8d callq 0x16840 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x4(%rbp), %esi movl -0x8(%rbp), %edx xorl %eax, %eax movl %eax, %edi movl $0x4, %ecx movl $0x1, %r8d callq 0x16840 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x8(%rax) movl $0x1, %edi callq 0x15cd0 movq -0x10(%rbp), %rax movl (%rax), %edi movq -0x10(%rbp), %rax movl 0x8(%rax), %esi xorl %r8d, %r8d movl $0x64, %ecx movl %r8d, %edx callq 0x19900 movq -0x10(%rbp), %rax movl (%rax), %edi callq 0x19aa0 testb $0x1, %al jne 0x160a44 movl $0x4, %edi leaq 0x4c3ae(%rip), %rsi # 0x1acdeb movb $0x0, %al callq 0x13ae70 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
r3d_framebuffer_load_pingpong_post: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov [rbp+var_8], esi lea rax, R3D add rax, 4 add rax, 48h ; 'H' mov [rbp+var_10], rax call rlLoadFramebuffer mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_10] cmp dword ptr [rax], 0 jnz short loc_1609AA mov edi, 4 lea rsi, aFailedToCreate; "Failed to create framebuffer" mov al, 0 call TraceLog loc_1609AA: mov rax, [rbp+var_10] mov edi, [rax] call rlEnableFramebuffer mov esi, [rbp+var_4] mov edx, [rbp+var_8] xor eax, eax mov edi, eax mov ecx, 4 mov r8d, 1 call rlLoadTexture mov ecx, eax mov rax, [rbp+var_10] mov [rax+4], ecx mov esi, [rbp+var_4] mov edx, [rbp+var_8] xor eax, eax mov edi, eax mov ecx, 4 mov r8d, 1 call rlLoadTexture mov ecx, eax mov rax, [rbp+var_10] mov [rax+8], ecx mov edi, 1 call rlActiveDrawBuffers mov rax, [rbp+var_10] mov edi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] xor r8d, r8d mov ecx, 64h ; 'd' mov edx, r8d call rlFramebufferAttach mov rax, [rbp+var_10] mov edi, [rax] call rlFramebufferComplete test al, 1 jnz short loc_160A44 mov edi, 4 lea rsi, aFramebufferIsN; "Framebuffer is not complete" mov al, 0 call TraceLog loc_160A44: add rsp, 10h pop rbp retn
unsigned __int8 r3d_framebuffer_load_pingpong_post(unsigned int a1, unsigned int a2) { int Texture; // eax int v3; // edx int v4; // r8d int v5; // r9d unsigned __int8 result; // al unsigned int *v7; // [rsp+0h] [rbp-10h] v7 = (unsigned int *)&R3D[76]; *(_DWORD *)&R3D[76] = rlLoadFramebuffer(); if ( !*(_DWORD *)&R3D[76] ) TraceLog(4, (long long)"Failed to create framebuffer"); rlEnableFramebuffer(*v7); *(_DWORD *)&R3D[80] = rlLoadTexture(0LL, a1, a2, 4u, 1); Texture = rlLoadTexture(0LL, a1, a2, 4u, 1); *(_DWORD *)&R3D[84] = Texture; rlActiveDrawBuffers(1, a1, v3, Texture, v4, v5); rlFramebufferAttach(*(_DWORD *)&R3D[76], *(_DWORD *)&R3D[84], 0, 100, 0); result = rlFramebufferComplete(*v7); if ( (result & 1) == 0 ) return (unsigned __int8)TraceLog(4, (long long)"Framebuffer is not complete"); return result; }
2,027
r3d_framebuffer_load_pingpong_post
r3d/src/r3d_state.c
void r3d_framebuffer_load_pingpong_post(int width, int height) { struct r3d_fb_pingpong_post_t* post = &R3D.framebuffer.post; post->id = rlLoadFramebuffer(); if (post->id == 0) { TraceLog(LOG_WARNING, "Failed to create framebuffer"); } rlEnableFramebuffer(post->id); // Generate (color) buffers post->source = rlLoadTexture(NULL, width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8, 1); post->target = rlLoadTexture(NULL, width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8, 1); // Activate the draw buffers for all the attachments rlActiveDrawBuffers(1); // Attach the textures to the framebuffer rlFramebufferAttach(post->id, post->target, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_TEXTURE2D, 0); // Check if the framebuffer is complete if (!rlFramebufferComplete(post->id)) { TraceLog(LOG_WARNING, "Framebuffer is not complete"); } }
O3
c
r3d_framebuffer_load_pingpong_post: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %esi, %ebx movl %edi, %r14d callq 0x1e7d7 movl %eax, 0xf0257(%rip) # 0x1b1c0c testl %eax, %eax jne 0xc19d2 leaq 0x5166c(%rip), %rsi # 0x11302c movl $0x4, %edi xorl %eax, %eax callq 0xaa495 movl 0xf023a(%rip), %eax # 0x1b1c0c movl %eax, %edi callq 0x1c62e xorl %edi, %edi movl %r14d, %esi movl %ebx, %edx movl $0x4, %ecx movl $0x1, %r8d callq 0x1cf44 movl %eax, 0xf021a(%rip) # 0x1b1c10 xorl %edi, %edi movl %r14d, %esi movl %ebx, %edx movl $0x4, %ecx movl $0x1, %r8d callq 0x1cf44 movl %eax, 0xf0201(%rip) # 0x1b1c14 movl $0x1, %edi callq 0x1c6b2 movl 0xf01e9(%rip), %edi # 0x1b1c0c movl 0xf01eb(%rip), %esi # 0x1b1c14 xorl %edx, %edx movl $0x64, %ecx xorl %r8d, %r8d callq 0x1e80b movl 0xf01ce(%rip), %edi # 0x1b1c0c callq 0x1e923 testb %al, %al je 0xc1a4c popq %rbx popq %r14 popq %rbp retq leaq 0x515f6(%rip), %rsi # 0x113049 movl $0x4, %edi xorl %eax, %eax popq %rbx popq %r14 popq %rbp jmp 0xaa495
r3d_framebuffer_load_pingpong_post: push rbp mov rbp, rsp push r14 push rbx mov ebx, esi mov r14d, edi call rlLoadFramebuffer mov dword ptr cs:qword_1B1C0C, eax test eax, eax jnz short loc_C19D2 lea rsi, aFailedToCreate; "Failed to create framebuffer" mov edi, 4 xor eax, eax call TraceLog mov eax, dword ptr cs:qword_1B1C0C loc_C19D2: mov edi, eax call rlEnableFramebuffer xor edi, edi mov esi, r14d mov edx, ebx mov ecx, 4 mov r8d, 1 call rlLoadTexture mov dword ptr cs:qword_1B1C0C+4, eax xor edi, edi mov esi, r14d mov edx, ebx mov ecx, 4 mov r8d, 1 call rlLoadTexture mov cs:dword_1B1C14, eax mov edi, 1 call rlActiveDrawBuffers mov edi, dword ptr cs:qword_1B1C0C mov esi, cs:dword_1B1C14 xor edx, edx mov ecx, 64h ; 'd' xor r8d, r8d call rlFramebufferAttach mov edi, dword ptr cs:qword_1B1C0C call rlFramebufferComplete test al, al jz short loc_C1A4C pop rbx pop r14 pop rbp retn loc_C1A4C: lea rsi, aFramebufferIsN; "Framebuffer is not complete" mov edi, 4 xor eax, eax pop rbx pop r14 pop rbp jmp TraceLog
void r3d_framebuffer_load_pingpong_post(long long a1, unsigned int a2) { unsigned int Framebuffer; // eax long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d Framebuffer = rlLoadFramebuffer(a1); LODWORD(qword_1B1C0C) = Framebuffer; if ( !Framebuffer ) { TraceLog(4, (long long)"Failed to create framebuffer"); Framebuffer = qword_1B1C0C; } rlEnableFramebuffer(Framebuffer); HIDWORD(qword_1B1C0C) = rlLoadTexture(0LL, a1, a2, 4u, 1u); dword_1B1C14 = rlLoadTexture(0LL, a1, a2, 4u, 1u); rlActiveDrawBuffers(1LL, (unsigned int)a1, v3, v4, v5, v6); rlFramebufferAttach(qword_1B1C0C, dword_1B1C14, 0, 100, 0); if ( !rlFramebufferComplete(qword_1B1C0C) ) TraceLog(4, (long long)"Framebuffer is not complete"); }
r3d_framebuffer_load_pingpong_post: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV EBX,ESI MOV R14D,EDI CALL 0x0011e7d7 MOV dword ptr [0x002b1c0c],EAX TEST EAX,EAX JNZ 0x001c19d2 LEA RSI,[0x21302c] MOV EDI,0x4 XOR EAX,EAX CALL 0x001aa495 MOV EAX,dword ptr [0x002b1c0c] LAB_001c19d2: MOV EDI,EAX CALL 0x0011c62e XOR EDI,EDI MOV ESI,R14D MOV EDX,EBX MOV ECX,0x4 MOV R8D,0x1 CALL 0x0011cf44 MOV dword ptr [0x002b1c10],EAX XOR EDI,EDI MOV ESI,R14D MOV EDX,EBX MOV ECX,0x4 MOV R8D,0x1 CALL 0x0011cf44 MOV dword ptr [0x002b1c14],EAX MOV EDI,0x1 CALL 0x0011c6b2 MOV EDI,dword ptr [0x002b1c0c] MOV ESI,dword ptr [0x002b1c14] XOR EDX,EDX MOV ECX,0x64 XOR R8D,R8D CALL 0x0011e80b MOV EDI,dword ptr [0x002b1c0c] CALL 0x0011e923 TEST AL,AL JZ 0x001c1a4c POP RBX POP R14 POP RBP RET LAB_001c1a4c: LEA RSI,[0x213049] MOV EDI,0x4 XOR EAX,EAX POP RBX POP R14 POP RBP JMP 0x001aa495
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void r3d_framebuffer_load_pingpong_post(int4 param_1,int4 param_2) { char cVar1; _DAT_002b1c0c = rlLoadFramebuffer(); if (_DAT_002b1c0c == 0) { TraceLog(4,"Failed to create framebuffer"); } rlEnableFramebuffer(_DAT_002b1c0c); _DAT_002b1c10 = rlLoadTexture(0,param_1,param_2,4,1); _DAT_002b1c14 = rlLoadTexture(0,param_1,param_2,4,1); rlActiveDrawBuffers(1); rlFramebufferAttach(_DAT_002b1c0c,_DAT_002b1c14,0,100,0); cVar1 = rlFramebufferComplete(_DAT_002b1c0c); if (cVar1 != '\0') { return; } TraceLog(4,"Framebuffer is not complete"); return; }
2,028
my_wildcmp_mb_impl
eloqsql/strings/ctype-mb.c
static int my_wildcmp_mb_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { int l; if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if ((l = my_ismbchar(cs, wildstr, wildend))) { if (str+l > str_end || memcmp(str, wildstr, l) != 0) return 1; str += l; wildstr += l; } else if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return (str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return (result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; const char* mb = wildstr; int mb_len=0; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return (-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* Ok if w_many is last */ if (str == str_end) return -1; if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; mb=wildstr; mb_len= my_ismbchar(cs, wildstr, wildend); INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ cmp=likeconv(cs,cmp); do { for (;;) { if (str >= str_end) return -1; if (mb_len) { if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0) { str += mb_len; break; } } else if (!my_ismbchar(cs, str, str_end) && likeconv(cs,*str) == cmp) { str++; break; } INC_PTR(cs,str, str_end); } { int tmp=my_wildcmp_mb_impl(cs,str,str_end,wildstr,wildend,escape,w_one, w_many, recurse_level + 1); if (tmp <= 0) return (tmp); } } while (str != str_end); return(-1); } } return (str != str_end ? 1 : 0); }
O3
c
my_wildcmp_mb_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, -0x44(%rbp) movq %r8, -0x40(%rbp) movq %rcx, %r15 movq %rdx, -0x58(%rbp) movq %rsi, %r12 movq %rdi, -0x38(%rbp) movl 0x20(%rbp), %eax movq %rax, -0x68(%rbp) leaq 0x38447c(%rip), %rax # 0x3da478 movq (%rax), %rax testq %rax, %rax je 0x56017 movl 0x20(%rbp), %edi callq *%rax movl $0x1, %r14d testl %eax, %eax jne 0x561b2 movl 0x10(%rbp), %edi movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq -0x40(%rbp), %r15 je 0x561a4 movb (%r15), %al movsbl %al, %ecx movl 0x18(%rbp), %edx cmpl %edx, %ecx sete %sil cmpl %edi, %ecx sete %dl orb %dl, %sil movq -0x58(%rbp), %r13 je 0x560e0 testb %dl, %dl je 0x560cd incq %r15 movq %r15, %rax movq -0x38(%rbp), %rbx cmpq %r13, %r12 je 0x561b2 movq %rax, %r15 movq 0xb8(%rbx), %rax movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x2, %ecx jl 0x560a8 movq 0xb8(%rbx), %rax movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x0, %ecx cmovll %ecx, %eax addq %rax, %r12 cmpq -0x40(%rbp), %r15 movl 0x10(%rbp), %edi jae 0x560c0 movsbl (%r15), %ecx leaq 0x1(%r15), %rax cmpl %edi, %ecx je 0x56059 cmpq -0x40(%rbp), %r15 je 0x561a8 movb (%r15), %al movsbl %al, %eax movl 0x18(%rbp), %ecx cmpl %ecx, %eax jne 0x56020 jmp 0x561c4 leaq 0x1(%r15), %rbx movq -0x40(%rbp), %rdx cmpq %rdx, %rbx cmoveq %r15, %rbx cmpl -0x44(%rbp), %ecx cmovneq %r15, %rbx movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq %rbx, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x56144 movl $0x1, %r14d cmpq %r13, %r12 je 0x561b2 movq -0x38(%rbp), %rax movq 0x58(%rax), %rax movzbl (%rbx), %ecx movb (%rax,%rcx), %cl movzbl (%r12), %edx cmpb (%rax,%rdx), %cl movl 0x10(%rbp), %edi jne 0x561b2 incq %rbx incq %r12 movq %rbx, %r15 jmp 0x56177 movl %eax, %r15d movq %r13, %rax leaq (%r12,%r15), %r13 movl $0x1, %r14d cmpq %rax, %r13 ja 0x561b2 movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x26350 testl %eax, %eax movl 0x10(%rbp), %edi jne 0x561b2 addq %r15, %rbx movq %rbx, %r15 movq %r13, %r12 cmpq -0x40(%rbp), %r15 movq -0x58(%rbp), %r13 je 0x561a8 movb (%r15), %al movsbl %al, %ecx cmpl %edi, %ecx sete %dl movl 0x18(%rbp), %esi cmpl %esi, %ecx je 0x5604b cmpl %edi, %ecx jne 0x560e0 jmp 0x5604b movq -0x58(%rbp), %r13 xorl %r14d, %r14d cmpq %r13, %r12 setne %r14b movl %r14d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1(%r15), %rax cmpq -0x40(%rbp), %rax je 0x56254 addq $0x2, %r15 xorl %r13d, %r13d xorl %r14d, %r14d movb -0x1(%r15), %bl movsbl %bl, %eax movl 0x18(%rbp), %ecx cmpl %ecx, %eax je 0x56242 cmpl %edi, %eax jne 0x5625c movq -0x58(%rbp), %rbx cmpq %rbx, %r12 je 0x56426 movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq %r12, %rsi movq %rbx, %rdx callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x2, %ecx jl 0x5623c movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq %r12, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovll %r13d, %eax addq %rax, %r12 movl 0x10(%rbp), %edi leaq 0x1(%r15), %rax cmpq -0x40(%rbp), %r15 movq %rax, %r15 jne 0x561dc jmp 0x561b2 xorl %r14d, %r14d jmp 0x561b2 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq -0x58(%rbp), %r13 cmpq %r13, %r12 je 0x561b2 movzbl %bl, %eax leaq -0x1(%r15), %rcx movq %rcx, -0x50(%rbp) cmpl -0x44(%rbp), %eax jne 0x5628c cmpq -0x40(%rbp), %r15 je 0x5628c movb (%r15), %bl movq %r15, -0x50(%rbp) movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq -0x50(%rbp), %rsi movq -0x40(%rbp), %rdx callq *0xc0(%rax) xorl %ecx, %ecx cmpl $0x2, %eax movl %eax, %r15d cmovll %ecx, %eax movl %eax, -0x60(%rbp) movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq -0x50(%rbp), %rsi movq -0x40(%rbp), %rdx callq *0xc0(%rax) movl $0x1, %ecx cmpl $0x2, %eax jl 0x562fc movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq -0x50(%rbp), %rsi movq -0x40(%rbp), %rdx callq *0xc0(%rax) movl %eax, %ecx cmpl $0x2, %eax movl $0x0, %eax cmovll %eax, %ecx addq -0x50(%rbp), %rcx movq %rcx, -0x70(%rbp) movq -0x38(%rbp), %rax movq 0x58(%rax), %rax movzbl %bl, %ecx movb (%rax,%rcx), %al movb %al, -0x29(%rbp) movl -0x60(%rbp), %eax movq %rax, -0x60(%rbp) movq -0x68(%rbp), %rax incl %eax movq %rax, -0x68(%rbp) cmpq %r13, %r12 jae 0x561b2 movq %r12, %rbx cmpl $0x2, %r15d jge 0x56369 movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq %rbx, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jg 0x5638a movq -0x38(%rbp), %rax movq 0x58(%rax), %rax movzbl (%rbx), %ecx movb -0x29(%rbp), %dl cmpb %dl, (%rax,%rcx) jne 0x5638a jmp 0x563e0 movq -0x60(%rbp), %rax leaq (%rbx,%rax), %r12 cmpq %r13, %r12 ja 0x5638a movq %rbx, %rdi movq -0x50(%rbp), %rsi movq -0x60(%rbp), %rdx callq 0x26350 testl %eax, %eax je 0x563e6 movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq %rbx, %rsi movq %r13, %rdx callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x2, %ecx jl 0x563cf movq -0x38(%rbp), %rdi movq 0xb8(%rdi), %rax movq %rbx, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x0, %ecx cmovll %ecx, %eax addq %rax, %rbx cmpq %r13, %rbx jb 0x56332 jmp 0x561b2 incq %rbx movq %rbx, %r12 subq $0x8, %rsp movq -0x38(%rbp), %rdi movq %r12, %rsi movq %r13, %rdx movq -0x70(%rbp), %rcx movq -0x40(%rbp), %r8 movl -0x44(%rbp), %r9d pushq -0x68(%rbp) movl 0x18(%rbp), %eax pushq %rax movl 0x10(%rbp), %eax pushq %rax callq 0x55fc7 addq $0x20, %rsp testl %eax, %eax jle 0x56431 cmpq %r13, %r12 jne 0x56326 jmp 0x561b2 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x561b2 movl %eax, %r14d jmp 0x561b2
my_wildcmp_mb_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_44], r9d mov [rbp+var_40], r8 mov r15, rcx mov [rbp+var_58], rdx mov r12, rsi mov [rbp+var_38], rdi mov eax, [rbp+arg_10] mov [rbp+var_68], rax lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_56017 mov edi, [rbp+arg_10] call rax mov r14d, 1 test eax, eax jnz loc_561B2 loc_56017: mov edi, [rbp+arg_0] mov r14d, 0FFFFFFFFh loc_56020: cmp r15, [rbp+var_40] jz loc_561A4 mov al, [r15] movsx ecx, al mov edx, [rbp+arg_8] cmp ecx, edx setz sil cmp ecx, edi setz dl or sil, dl mov r13, [rbp+var_58] jz loc_560E0 loc_5604B: test dl, dl jz short loc_560CD inc r15 mov rax, r15 mov rbx, [rbp+var_38] loc_56059: cmp r12, r13 jz loc_561B2 mov r15, rax mov rax, [rbx+0B8h] mov rdi, rbx mov rsi, r12 mov rdx, r13 call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 2 jl short loc_560A8 mov rax, [rbx+0B8h] mov rdi, rbx mov rsi, r12 mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 0 cmovl eax, ecx loc_560A8: add r12, rax cmp r15, [rbp+var_40] mov edi, [rbp+arg_0] jnb short loc_560C0 movsx ecx, byte ptr [r15] lea rax, [r15+1] cmp ecx, edi jz short loc_56059 loc_560C0: cmp r15, [rbp+var_40] jz loc_561A8 mov al, [r15] loc_560CD: movsx eax, al mov ecx, [rbp+arg_8] cmp eax, ecx jnz loc_56020 jmp loc_561C4 loc_560E0: lea rbx, [r15+1] mov rdx, [rbp+var_40] cmp rbx, rdx cmovz rbx, r15 cmp ecx, [rbp+var_44] cmovnz rbx, r15 mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, rbx call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_56144 mov r14d, 1 cmp r12, r13 jz loc_561B2 mov rax, [rbp+var_38] mov rax, [rax+58h] movzx ecx, byte ptr [rbx] mov cl, [rax+rcx] movzx edx, byte ptr [r12] cmp cl, [rax+rdx] mov edi, [rbp+arg_0] jnz short loc_561B2 inc rbx inc r12 mov r15, rbx jmp short loc_56177 loc_56144: mov r15d, eax mov rax, r13 lea r13, [r12+r15] mov r14d, 1 cmp r13, rax ja short loc_561B2 mov rdi, r12 mov rsi, rbx mov rdx, r15 call _bcmp test eax, eax mov edi, [rbp+arg_0] jnz short loc_561B2 add rbx, r15 mov r15, rbx mov r12, r13 loc_56177: cmp r15, [rbp+var_40] mov r13, [rbp+var_58] jz short loc_561A8 mov al, [r15] movsx ecx, al cmp ecx, edi setz dl mov esi, [rbp+arg_8] cmp ecx, esi jz loc_5604B cmp ecx, edi jnz loc_560E0 jmp loc_5604B loc_561A4: mov r13, [rbp+var_58] loc_561A8: xor r14d, r14d cmp r12, r13 setnz r14b loc_561B2: mov eax, r14d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_561C4: lea rax, [r15+1] cmp rax, [rbp+var_40] jz loc_56254 add r15, 2 xor r13d, r13d xor r14d, r14d loc_561DC: mov bl, [r15-1] movsx eax, bl mov ecx, [rbp+arg_8] cmp eax, ecx jz short loc_56242 cmp eax, edi jnz short loc_5625C mov rbx, [rbp+var_58] cmp r12, rbx jz loc_56426 mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, r12 mov rdx, rbx call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 2 jl short loc_5623C mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, r12 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovl eax, r13d loc_5623C: add r12, rax mov edi, [rbp+arg_0] loc_56242: lea rax, [r15+1] cmp r15, [rbp+var_40] mov r15, rax jnz short loc_561DC jmp loc_561B2 loc_56254: xor r14d, r14d jmp loc_561B2 loc_5625C: mov r14d, 0FFFFFFFFh mov r13, [rbp+var_58] cmp r12, r13 jz loc_561B2 movzx eax, bl lea rcx, [r15-1] mov [rbp+var_50], rcx cmp eax, [rbp+var_44] jnz short loc_5628C cmp r15, [rbp+var_40] jz short loc_5628C mov bl, [r15] mov [rbp+var_50], r15 loc_5628C: mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, [rbp+var_50] mov rdx, [rbp+var_40] call qword ptr [rax+0C0h] xor ecx, ecx cmp eax, 2 mov r15d, eax cmovl eax, ecx mov dword ptr [rbp+var_60], eax mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, [rbp+var_50] mov rdx, [rbp+var_40] call qword ptr [rax+0C0h] mov ecx, 1 cmp eax, 2 jl short loc_562FC mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, [rbp+var_50] mov rdx, [rbp+var_40] call qword ptr [rax+0C0h] mov ecx, eax cmp eax, 2 mov eax, 0 cmovl ecx, eax loc_562FC: add rcx, [rbp+var_50] mov [rbp+var_70], rcx mov rax, [rbp+var_38] mov rax, [rax+58h] movzx ecx, bl mov al, [rax+rcx] mov [rbp+var_29], al mov eax, dword ptr [rbp+var_60] mov [rbp+var_60], rax mov rax, [rbp+var_68] inc eax mov [rbp+var_68], rax loc_56326: cmp r12, r13 jnb loc_561B2 mov rbx, r12 loc_56332: cmp r15d, 2 jge short loc_56369 mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, rbx mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 1 jg short loc_5638A mov rax, [rbp+var_38] mov rax, [rax+58h] movzx ecx, byte ptr [rbx] mov dl, [rbp+var_29] cmp [rax+rcx], dl jnz short loc_5638A jmp short loc_563E0 loc_56369: mov rax, [rbp+var_60] lea r12, [rbx+rax] cmp r12, r13 ja short loc_5638A mov rdi, rbx mov rsi, [rbp+var_50] mov rdx, [rbp+var_60] call _bcmp test eax, eax jz short loc_563E6 loc_5638A: mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, rbx mov rdx, r13 call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 2 jl short loc_563CF mov rdi, [rbp+var_38] mov rax, [rdi+0B8h] mov rsi, rbx mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 0 cmovl eax, ecx loc_563CF: add rbx, rax cmp rbx, r13 jb loc_56332 jmp loc_561B2 loc_563E0: inc rbx mov r12, rbx loc_563E6: sub rsp, 8 mov rdi, [rbp+var_38] mov rsi, r12 mov rdx, r13 mov rcx, [rbp+var_70] mov r8, [rbp+var_40] mov r9d, [rbp+var_44] push [rbp+var_68] mov eax, [rbp+arg_8] push rax mov eax, [rbp+arg_0] push rax call my_wildcmp_mb_impl add rsp, 20h test eax, eax jle short loc_56431 cmp r12, r13 jnz loc_56326 jmp loc_561B2 loc_56426: mov r14d, 0FFFFFFFFh jmp loc_561B2 loc_56431: mov r14d, eax jmp loc_561B2
long long my_wildcmp_mb_impl( long long a1, unsigned __int8 *a2, unsigned __int8 *a3, char *a4, char *a5, int a6, int a7, int a8, unsigned int a9) { unsigned int v11; // r14d int v12; // edi char v13; // al int v14; // ecx bool v15; // dl unsigned __int8 *v16; // r13 char *v17; // rax int v18; // ecx long long v19; // rax unsigned __int8 *v20; // rbx int v21; // eax long long v22; // r15 unsigned __int8 *v23; // rax unsigned __int8 *v24; // r13 char *v26; // r15 unsigned __int8 v27; // bl int v28; // ecx long long v29; // rax int v31; // eax int v32; // r15d int v33; // eax int v34; // ecx unsigned __int8 *v35; // rbx int v36; // ecx long long v37; // rax int v38; // eax int v39; // [rsp+0h] [rbp-70h] int v40; // [rsp+10h] [rbp-60h] char *v42; // [rsp+20h] [rbp-50h] char v46; // [rsp+47h] [rbp-29h] if ( !my_string_stack_guard || (v11 = 1, !(unsigned int)my_string_stack_guard(a9)) ) { v12 = a7; v11 = -1; do { if ( a4 == a5 ) { v16 = a3; return a2 != v16; } v13 = *a4; v14 = *a4; v15 = v14 == v12; v16 = a3; if ( v14 != v12 && v14 != a8 ) { do { v20 = (unsigned __int8 *)(a4 + 1); if ( a4 + 1 == a5 ) v20 = (unsigned __int8 *)a4; if ( v14 != a6 ) v20 = (unsigned __int8 *)a4; v21 = (*(long long ( **)(long long, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v20); if ( v21 >= 2 ) { v22 = (unsigned int)v21; v23 = v16; v24 = &a2[v22]; v11 = 1; if ( &a2[v22] > v23 ) return v11; v12 = a7; if ( (unsigned int)bcmp(a2, v20) ) return v11; a4 = (char *)&v20[v22]; a2 = v24; } else { v11 = 1; if ( a2 == v16 ) return v11; v12 = a7; if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v20) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) ) return v11; ++a2; a4 = (char *)(v20 + 1); } v16 = a3; if ( a4 == a5 ) return a2 != v16; v13 = *a4; v14 = *a4; v15 = v14 == v12; } while ( v14 != a8 && v14 != v12 ); } if ( v15 ) { v17 = a4 + 1; do { if ( a2 == v16 ) return v11; a4 = v17; v18 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, v16); v19 = 1LL; if ( v18 >= 2 ) { v19 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, v16); if ( (int)v19 < 2 ) v19 = 0LL; } a2 += v19; v12 = a7; if ( a4 >= a5 ) break; v17 = a4 + 1; } while ( *a4 == a7 ); if ( a4 == a5 ) return a2 != v16; v13 = *a4; } } while ( v13 != a8 ); if ( a4 + 1 == a5 ) { return 0; } else { v26 = a4 + 2; v11 = 0; while ( 1 ) { v27 = *(v26 - 1); if ( (char)v27 == a8 ) goto LABEL_45; if ( (char)v27 != v12 ) break; if ( a2 == a3 ) return (unsigned int)-1; v28 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, a3); v29 = 1LL; if ( v28 >= 2 ) { v29 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, a3); if ( (int)v29 < 2 ) v29 = 0LL; } a2 += v29; v12 = a7; LABEL_45: if ( v26++ == a5 ) return v11; } v11 = -1; if ( a2 != a3 ) { v42 = v26 - 1; if ( v27 == a6 && v26 != a5 ) { v27 = *v26; v42 = v26; } v31 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5); v32 = v31; if ( v31 < 2 ) v31 = 0; v40 = v31; v33 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5); v34 = 1; if ( v33 >= 2 ) { v34 = (*(long long ( **)(long long, char *, char *, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v42, a5, 1LL); if ( v34 < 2 ) v34 = 0; } v39 = (_DWORD)v42 + v34; v46 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v27); do { if ( a2 >= a3 ) return v11; v35 = a2; while ( v32 >= 2 ) { a2 = &v35[v40]; if ( a2 <= a3 && !(unsigned int)bcmp(v35, v42) ) goto LABEL_71; LABEL_66: v36 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v35, a3); v37 = 1LL; if ( v36 >= 2 ) { v37 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v35, a3); if ( (int)v37 < 2 ) v37 = 0LL; } v35 += v37; if ( v35 >= a3 ) return v11; } if ( (*(int ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v35, a3) > 1 || *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v35) != v46 ) { goto LABEL_66; } a2 = v35 + 1; LABEL_71: v38 = my_wildcmp_mb_impl(a1, (_DWORD)a2, (_DWORD)a3, v39, (_DWORD)a5, a6, a7, a8, a9 + 1); if ( v38 <= 0 ) return (unsigned int)v38; } while ( a2 != a3 ); } } } return v11; }
my_wildcmp_mb_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV dword ptr [RBP + -0x44],R9D MOV qword ptr [RBP + -0x40],R8 MOV R15,RCX MOV qword ptr [RBP + -0x58],RDX MOV R12,RSI MOV qword ptr [RBP + -0x38],RDI MOV EAX,dword ptr [RBP + 0x20] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[0x4da478] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00156017 MOV EDI,dword ptr [RBP + 0x20] CALL RAX MOV R14D,0x1 TEST EAX,EAX JNZ 0x001561b2 LAB_00156017: MOV EDI,dword ptr [RBP + 0x10] MOV R14D,0xffffffff LAB_00156020: CMP R15,qword ptr [RBP + -0x40] JZ 0x001561a4 MOV AL,byte ptr [R15] MOVSX ECX,AL MOV EDX,dword ptr [RBP + 0x18] CMP ECX,EDX SETZ SIL CMP ECX,EDI SETZ DL OR SIL,DL MOV R13,qword ptr [RBP + -0x58] JZ 0x001560e0 LAB_0015604b: TEST DL,DL JZ 0x001560cd INC R15 MOV RAX,R15 MOV RBX,qword ptr [RBP + -0x38] LAB_00156059: CMP R12,R13 JZ 0x001561b2 MOV R15,RAX MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x2 JL 0x001560a8 MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x0 CMOVL EAX,ECX LAB_001560a8: ADD R12,RAX CMP R15,qword ptr [RBP + -0x40] MOV EDI,dword ptr [RBP + 0x10] JNC 0x001560c0 MOVSX ECX,byte ptr [R15] LEA RAX,[R15 + 0x1] CMP ECX,EDI JZ 0x00156059 LAB_001560c0: CMP R15,qword ptr [RBP + -0x40] JZ 0x001561a8 MOV AL,byte ptr [R15] LAB_001560cd: MOVSX EAX,AL MOV ECX,dword ptr [RBP + 0x18] CMP EAX,ECX JNZ 0x00156020 JMP 0x001561c4 LAB_001560e0: LEA RBX,[R15 + 0x1] MOV RDX,qword ptr [RBP + -0x40] CMP RBX,RDX CMOVZ RBX,R15 CMP ECX,dword ptr [RBP + -0x44] CMOVNZ RBX,R15 MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00156144 MOV R14D,0x1 CMP R12,R13 JZ 0x001561b2 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBX] MOV CL,byte ptr [RAX + RCX*0x1] MOVZX EDX,byte ptr [R12] CMP CL,byte ptr [RAX + RDX*0x1] MOV EDI,dword ptr [RBP + 0x10] JNZ 0x001561b2 INC RBX INC R12 MOV R15,RBX JMP 0x00156177 LAB_00156144: MOV R15D,EAX MOV RAX,R13 LEA R13,[R12 + R15*0x1] MOV R14D,0x1 CMP R13,RAX JA 0x001561b2 MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x00126350 TEST EAX,EAX MOV EDI,dword ptr [RBP + 0x10] JNZ 0x001561b2 ADD RBX,R15 MOV R15,RBX MOV R12,R13 LAB_00156177: CMP R15,qword ptr [RBP + -0x40] MOV R13,qword ptr [RBP + -0x58] JZ 0x001561a8 MOV AL,byte ptr [R15] MOVSX ECX,AL CMP ECX,EDI SETZ DL MOV ESI,dword ptr [RBP + 0x18] CMP ECX,ESI JZ 0x0015604b CMP ECX,EDI JNZ 0x001560e0 JMP 0x0015604b LAB_001561a4: MOV R13,qword ptr [RBP + -0x58] LAB_001561a8: XOR R14D,R14D CMP R12,R13 SETNZ R14B LAB_001561b2: MOV EAX,R14D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001561c4: LEA RAX,[R15 + 0x1] CMP RAX,qword ptr [RBP + -0x40] JZ 0x00156254 ADD R15,0x2 XOR R13D,R13D XOR R14D,R14D LAB_001561dc: MOV BL,byte ptr [R15 + -0x1] MOVSX EAX,BL MOV ECX,dword ptr [RBP + 0x18] CMP EAX,ECX JZ 0x00156242 CMP EAX,EDI JNZ 0x0015625c MOV RBX,qword ptr [RBP + -0x58] CMP R12,RBX JZ 0x00156426 MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R12 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x2 JL 0x0015623c MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R12 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVL EAX,R13D LAB_0015623c: ADD R12,RAX MOV EDI,dword ptr [RBP + 0x10] LAB_00156242: LEA RAX,[R15 + 0x1] CMP R15,qword ptr [RBP + -0x40] MOV R15,RAX JNZ 0x001561dc JMP 0x001561b2 LAB_00156254: XOR R14D,R14D JMP 0x001561b2 LAB_0015625c: MOV R14D,0xffffffff MOV R13,qword ptr [RBP + -0x58] CMP R12,R13 JZ 0x001561b2 MOVZX EAX,BL LEA RCX,[R15 + -0x1] MOV qword ptr [RBP + -0x50],RCX CMP EAX,dword ptr [RBP + -0x44] JNZ 0x0015628c CMP R15,qword ptr [RBP + -0x40] JZ 0x0015628c MOV BL,byte ptr [R15] MOV qword ptr [RBP + -0x50],R15 LAB_0015628c: MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0xc0] XOR ECX,ECX CMP EAX,0x2 MOV R15D,EAX CMOVL EAX,ECX MOV dword ptr [RBP + -0x60],EAX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0xc0] MOV ECX,0x1 CMP EAX,0x2 JL 0x001562fc MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0xc0] MOV ECX,EAX CMP EAX,0x2 MOV EAX,0x0 CMOVL ECX,EAX LAB_001562fc: ADD RCX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x70],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,BL MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x29],AL MOV EAX,dword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x68] INC EAX MOV qword ptr [RBP + -0x68],RAX LAB_00156326: CMP R12,R13 JNC 0x001561b2 MOV RBX,R12 LAB_00156332: CMP R15D,0x2 JGE 0x00156369 MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,RBX MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JG 0x0015638a MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBX] MOV DL,byte ptr [RBP + -0x29] CMP byte ptr [RAX + RCX*0x1],DL JNZ 0x0015638a JMP 0x001563e0 LAB_00156369: MOV RAX,qword ptr [RBP + -0x60] LEA R12,[RBX + RAX*0x1] CMP R12,R13 JA 0x0015638a MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x60] CALL 0x00126350 TEST EAX,EAX JZ 0x001563e6 LAB_0015638a: MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,RBX MOV RDX,R13 CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x2 JL 0x001563cf MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,RBX MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x0 CMOVL EAX,ECX LAB_001563cf: ADD RBX,RAX CMP RBX,R13 JC 0x00156332 JMP 0x001561b2 LAB_001563e0: INC RBX MOV R12,RBX LAB_001563e6: SUB RSP,0x8 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R12 MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x70] MOV R8,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RBP + -0x44] PUSH qword ptr [RBP + -0x68] MOV EAX,dword ptr [RBP + 0x18] PUSH RAX MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x00155fc7 ADD RSP,0x20 TEST EAX,EAX JLE 0x00156431 CMP R12,R13 JNZ 0x00156326 JMP 0x001561b2 LAB_00156426: MOV R14D,0xffffffff JMP 0x001561b2 LAB_00156431: MOV R14D,EAX JMP 0x001561b2
uint my_wildcmp_mb_impl(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5, uint param_6,uint param_7,uint param_8,int param_9) { char cVar1; byte bVar2; int iVar3; uint uVar4; uint uVar5; ulong uVar6; ulong uVar7; uint uVar8; byte *__s2; byte *pbVar9; bool bVar10; byte *local_58; if ((my_string_stack_guard != (code *)0x0) && (iVar3 = (*my_string_stack_guard)(param_9), iVar3 != 0)) { return 1; } uVar4 = 0xffffffff; do { if (param_4 == param_5) { LAB_001561a8: return (uint)(param_2 != param_3); } bVar2 = *param_4; uVar8 = (uint)(char)bVar2; bVar10 = uVar8 == param_7; pbVar9 = param_2; if (uVar8 != param_8 && !bVar10) { do { __s2 = param_4 + 1; if (param_4 + 1 == param_5) { __s2 = param_4; } if (uVar8 != param_6) { __s2 = param_4; } uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,__s2); if ((int)uVar4 < 2) { if (pbVar9 == param_3) { return 1; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*__s2) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*pbVar9)) { return 1; } param_4 = __s2 + 1; param_2 = pbVar9 + 1; } else { uVar6 = (ulong)uVar4; param_2 = pbVar9 + uVar6; if (param_3 < param_2) { return 1; } iVar3 = bcmp(pbVar9,__s2,uVar6); if (iVar3 != 0) { return 1; } param_4 = __s2 + uVar6; } uVar4 = 1; if (param_4 == param_5) goto LAB_001561a8; bVar2 = *param_4; uVar8 = (uint)(char)bVar2; bVar10 = uVar8 == param_7; } while ((uVar8 != param_8) && (pbVar9 = param_2, uVar8 != param_7)); } if (bVar10) { do { param_4 = param_4 + 1; if (param_2 == param_3) { return uVar4; } iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar6 = 1; if (1 < iVar3) { uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar6 = (ulong)uVar8; if ((int)uVar8 < 2) { uVar6 = 0; } } param_2 = param_2 + uVar6; } while ((param_4 < param_5) && ((int)(char)*param_4 == param_7)); if (param_4 == param_5) goto LAB_001561a8; bVar2 = *param_4; } } while ((int)(char)bVar2 != param_8); if (param_4 + 1 != param_5) { pbVar9 = param_4 + 2; do { bVar2 = pbVar9[-1]; if ((int)(char)bVar2 != param_8) { if ((int)(char)bVar2 != param_7) { if (param_2 == param_3) { return 0xffffffff; } local_58 = pbVar9 + -1; if ((bVar2 == param_6) && (pbVar9 != param_5)) { bVar2 = *pbVar9; local_58 = pbVar9; } uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5); uVar4 = uVar8; if ((int)uVar8 < 2) { uVar4 = 0; } iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5); uVar6 = 1; if (1 < iVar3) { uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5); uVar6 = (ulong)uVar5; if ((int)uVar5 < 2) { uVar6 = 0; } } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2); goto LAB_00156326; } if (param_2 == param_3) { return 0xffffffff; } iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar6 = 1; if (1 < iVar3) { uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar6 = (ulong)uVar4; if ((int)uVar4 < 2) { uVar6 = 0; } } param_2 = param_2 + uVar6; } bVar10 = pbVar9 != param_5; pbVar9 = pbVar9 + 1; } while (bVar10); } return 0; LAB_00156326: if (param_3 <= param_2) { return 0xffffffff; } do { if ((int)uVar8 < 2) { iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); if ((iVar3 < 2) && (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) == cVar1)) break; } else { pbVar9 = param_2 + uVar4; if ((pbVar9 <= param_3) && (iVar3 = bcmp(param_2,local_58,(ulong)uVar4), iVar3 == 0)) goto LAB_001563e6; } iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar7 = 1; if (1 < iVar3) { uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar7 = (ulong)uVar5; if ((int)uVar5 < 2) { uVar7 = 0; } } param_2 = param_2 + uVar7; if (param_3 <= param_2) { return 0xffffffff; } } while( true ); pbVar9 = param_2 + 1; LAB_001563e6: uVar5 = my_wildcmp_mb_impl(param_1,pbVar9,param_3,local_58 + uVar6,param_5,param_6,param_7,param_8 ,param_9 + 1); if ((int)uVar5 < 1) { return uVar5; } param_2 = pbVar9; if (pbVar9 == param_3) { return 0xffffffff; } goto LAB_00156326; }
2,029
ftxui::(anonymous namespace)::Reset[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
std::string Reset(const std::vector<DECMode>& parameters) { return CSI + "?" + Serialize(parameters) + "l"; }
O3
cpp
ftxui::(anonymous namespace)::Reset[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x2a0f9(%rip), %rsi # 0x5a2a0 movq 0x2a0fa(%rip), %rdx # 0x5a2a8 addq %rsi, %rdx leaq 0x28(%rsp), %r15 movq %r15, %rdi callq 0x11be0 leaq 0xece4(%rip), %rsi # 0x3eea9 movq %r15, %rdi callq 0xb7f0 movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x48(%rsp), %rdi callq 0x2fee4 movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r12, %rcx je 0x30200 movq 0x38(%rsp), %rdi movq 0x48(%rsp), %rsi cmpq %rdi, %rax jbe 0x30223 leaq 0x58(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0x3021e movq 0x58(%rsp), %rdi cmpq %rdi, %rax jbe 0x3022f leaq 0x28(%rsp), %rdi callq 0xb110 jmp 0x3023d leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0xb470 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x30261 movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x30267 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0xec15(%rip), %rsi # 0x3eea0 leaq 0x8(%rsp), %rdi callq 0xb7f0 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x302b7 movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x302bd movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%rax), %rdx movq %rdx, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x302ef movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3030a movq 0x58(%rsp), %rsi incq %rsi callq 0xb400 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x30321 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30350 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 jmp 0x30350 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x30372 movq 0x58(%rsp), %rsi incq %rsi callq 0xb400 jmp 0x30372 jmp 0x3036f movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x30389 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi callq 0xb780 nop
_ZN5ftxui12_GLOBAL__N_15ResetB5cxx11ERKSt6vectorINS0_7DECModeESaIS2_EE: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea r12, [rsp+88h+var_50] mov [r12-10h], r12 mov rsi, cs:_ZN5ftxui12_GLOBAL__N_13CSIB5cxx11E; ftxui::`anonymous namespace'::CSI mov rdx, cs:qword_5A2A8 add rdx, rsi lea r15, [rsp+88h+var_60] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, asc_3EEA9; "?" mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14]; int mov rdx, [r14+8]; int lea rdi, [rsp+88h+var_40]; int call _ZN5ftxui12_GLOBAL__N_19SerializeB5cxx11ERKSt6vectorINS0_7DECModeESaIS2_EE; ftxui::`anonymous namespace'::Serialize(std::vector<ftxui::`anonymous namespace'::DECMode> const&) mov rcx, [rsp+88h+var_60] mov r8, [rsp+88h+var_58] mov rdx, [rsp+88h+var_38] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r12 jz short loc_30200 mov rdi, [rsp+88h+var_50] loc_30200: mov rsi, qword ptr [rsp+88h+var_40] cmp rax, rdi jbe short loc_30223 lea r9, [rsp+88h+var_30] mov edi, 0Fh cmp rsi, r9 jz short loc_3021E mov rdi, [rsp+88h+var_30] loc_3021E: cmp rax, rdi jbe short loc_3022F loc_30223: lea rdi, [rsp+88h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_3023D loc_3022F: lea rdi, [rsp+88h+var_40] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_3023D: lea rdx, [rsp+88h+var_70] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_30261 mov [rsp+88h+var_80], rsi mov rdx, [rcx] mov [rsp+88h+var_70], rdx jmp short loc_30267 loc_30261: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_30267: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+88h+var_78], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, a25l+5; "l" lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_302B7 mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_302BD loc_302B7: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_302BD: mov rdx, [rax+8] mov [rbx+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_302EF mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_302EF: lea rax, [rsp+88h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3030A mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3030A: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r12 jz short loc_30321 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30321: add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30350 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_30350 mov rbx, rax loc_30350: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_30372 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_30372 jmp short $+2 loc_3036F: mov rbx, rax loc_30372: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_30389 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30389: mov rdi, rbx call __Unwind_Resume
void ftxui::`anonymous namespace'::Reset[abi:cxx11](long long a1, int **a2) { char *v3; // rax unsigned long long v4; // rdi unsigned long long v5; // rdi void **v6; // rax __int128 *v7; // rcx long long v8; // rax _OWORD *v9; // rcx void *v10[2]; // [rsp+8h] [rbp-80h] BYREF __int128 v11; // [rsp+18h] [rbp-70h] BYREF void *v12[2]; // [rsp+28h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+38h] [rbp-50h] BYREF int v14[2]; // [rsp+48h] [rbp-40h] BYREF long long v15; // [rsp+50h] [rbp-38h] _QWORD v16[6]; // [rsp+58h] [rbp-30h] BYREF v12[0] = v13; std::string::_M_construct<char *>( (long long)v12, (_BYTE *)ftxui::`anonymous namespace'::CSI[abi:cxx11], ftxui::`anonymous namespace'::CSI[abi:cxx11] + qword_5A2A8); std::string::append(v12, "?"); ftxui::`anonymous namespace'::Serialize[abi:cxx11]((long long)v14, *a2, a2[1]); v3 = (char *)v12[1] + v15; v4 = 15LL; if ( v12[0] != v13 ) v4 = v13[0]; if ( (unsigned long long)v3 <= v4 ) goto LABEL_7; v5 = 15LL; if ( *(_QWORD **)v14 != v16 ) v5 = v16[0]; if ( (unsigned long long)v3 <= v5 ) v6 = (void **)std::string::replace(v14, 0LL, 0LL); else LABEL_7: v6 = (void **)std::string::_M_append(v12, *(_QWORD *)v14, v15); v10[0] = &v11; v7 = (__int128 *)(v6 + 2); if ( *v6 == v6 + 2 ) { v11 = *v7; } else { v10[0] = *v6; *(_QWORD *)&v11 = *(_QWORD *)v7; } v10[1] = v6[1]; *v6 = v7; v6[1] = 0LL; *(_BYTE *)v7 = 0; v8 = std::string::append(v10, "l"); *(_QWORD *)a1 = a1 + 16; v9 = (_OWORD *)(v8 + 16); if ( *(_QWORD *)v8 == v8 + 16 ) { *(_OWORD *)(a1 + 16) = *v9; } else { *(_QWORD *)a1 = *(_QWORD *)v8; *(_QWORD *)(a1 + 16) = *(_QWORD *)v9; } *(_QWORD *)(a1 + 8) = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = v9; *(_QWORD *)(v8 + 8) = 0LL; *(_BYTE *)(v8 + 16) = 0; if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); if ( *(_QWORD **)v14 != v16 ) operator delete(*(void **)v14, v16[0] + 1LL); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); }
Reset[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [0x0015a2a0] MOV RDX,qword ptr [0x0015a2a8] ADD RDX,RSI LEA R15,[RSP + 0x28] MOV RDI,R15 CALL 0x00111be0 LAB_001301be: LEA RSI,[0x13eea9] MOV RDI,R15 CALL 0x0010b7f0 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001301d4: LEA RDI,[RSP + 0x48] CALL 0x0012fee4 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x50] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R12 JZ 0x00130200 MOV RDI,qword ptr [RSP + 0x38] LAB_00130200: MOV RSI,qword ptr [RSP + 0x48] CMP RAX,RDI JBE 0x00130223 LEA R9,[RSP + 0x58] MOV EDI,0xf CMP RSI,R9 JZ 0x0013021e MOV RDI,qword ptr [RSP + 0x58] LAB_0013021e: CMP RAX,RDI JBE 0x0013022f LAB_00130223: LEA RDI,[RSP + 0x28] CALL 0x0010b110 JMP 0x0013023d LAB_0013022f: LEA RDI,[RSP + 0x48] XOR ESI,ESI XOR EDX,EDX CALL 0x0010b470 LAB_0013023d: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x00130261 MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00130267 LAB_00130261: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_00130267: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_00130284: LEA RSI,[0x13eea0] LEA RDI,[RSP + 0x8] CALL 0x0010b7f0 LAB_00130295: LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x001302b7 MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x001302bd LAB_001302b7: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001302bd: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001302ef MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010b400 LAB_001302ef: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013030a MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010b400 LAB_0013030a: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x00130321 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010b400 LAB_00130321: ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* ftxui::(anonymous namespace)::Reset[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode> > const&) */ void ftxui::(anonymous_namespace)::Reset_abi_cxx11_(vector *param_1) { long lVar1; int8 *puVar2; long *plVar3; long *plVar4; ulong uVar5; long *local_80; int8 local_78; long local_70; int8 uStack_68; ulong *local_60; long local_58; ulong local_50 [2]; ulong *local_40; long local_38; ulong local_30 [2]; local_60 = local_50; std::__cxx11::string::_M_construct<char*>(&local_60,CSI_abi_cxx11_,DAT_0015a2a8 + CSI_abi_cxx11_); /* try { // try from 001301be to 001301cc has its CatchHandler @ 0013036f */ std::__cxx11::string::append((char *)&local_60); /* try { // try from 001301d4 to 001301dd has its CatchHandler @ 0013036d */ Serialize_abi_cxx11_((vector *)&local_40); uVar5 = 0xf; if (local_60 != local_50) { uVar5 = local_50[0]; } if (uVar5 < (ulong)(local_38 + local_58)) { uVar5 = 0xf; if (local_40 != local_30) { uVar5 = local_30[0]; } if ((ulong)(local_38 + local_58) <= uVar5) { puVar2 = (int8 *) std::__cxx11::string::replace((ulong)&local_40,0,(char *)0x0,(ulong)local_60); goto LAB_0013023d; } } /* try { // try from 00130223 to 0013023c has its CatchHandler @ 0013034d */ puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_60,(ulong)local_40); LAB_0013023d: local_80 = &local_70; plVar3 = puVar2 + 2; if ((long *)*puVar2 == plVar3) { local_70 = *plVar3; uStack_68 = puVar2[3]; } else { local_70 = *plVar3; local_80 = (long *)*puVar2; } local_78 = puVar2[1]; *puVar2 = plVar3; puVar2[1] = 0; *(int1 *)plVar3 = 0; /* try { // try from 00130284 to 00130294 has its CatchHandler @ 0013032d */ plVar3 = (long *)std::__cxx11::string::append((char *)&local_80); *(vector **)param_1 = param_1 + 0x10; plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { lVar1 = plVar3[3]; *(long *)(param_1 + 0x10) = *plVar4; *(long *)(param_1 + 0x18) = lVar1; } else { *(long **)param_1 = (long *)*plVar3; *(long *)(param_1 + 0x10) = *plVar4; } *(long *)(param_1 + 8) = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } return; }
2,030
lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const
dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp
PathCommand PathIterator::currentSegment(std::array<Point, 3>& points) const { auto command = m_elements[m_index].header.command; switch(command) { case PLUTOVG_PATH_COMMAND_MOVE_TO: points[0] = m_elements[m_index + 1].point; break; case PLUTOVG_PATH_COMMAND_LINE_TO: points[0] = m_elements[m_index + 1].point; break; case PLUTOVG_PATH_COMMAND_CUBIC_TO: points[0] = m_elements[m_index + 1].point; points[1] = m_elements[m_index + 2].point; points[2] = m_elements[m_index + 3].point; break; case PLUTOVG_PATH_COMMAND_CLOSE: points[0] = m_elements[m_index + 1].point; break; } return PathCommand(command); }
O0
cpp
lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rcx movq %rcx, -0x58(%rbp) movq (%rcx), %rax movslq 0xc(%rcx), %rcx movl (%rax,%rcx,8), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movq %rax, -0x50(%rbp) subq $0x3, %rax ja 0x12990 movq -0x50(%rbp), %rax leaq 0x798fb(%rip), %rcx # 0x8c13c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x58(%rbp), %rax movq (%rax), %rsi movl 0xc(%rax), %eax addl $0x1, %eax cltq shlq $0x3, %rax addq %rax, %rsi leaq -0x1c(%rbp), %rdi callq 0x14680 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x146b0 movq -0x1c(%rbp), %rcx movq %rcx, (%rax) jmp 0x12990 movq -0x58(%rbp), %rax movq (%rax), %rsi movl 0xc(%rax), %eax addl $0x1, %eax cltq shlq $0x3, %rax addq %rax, %rsi leaq -0x24(%rbp), %rdi callq 0x14680 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x146b0 movq -0x24(%rbp), %rcx movq %rcx, (%rax) jmp 0x12990 movq -0x58(%rbp), %rax movq (%rax), %rsi movl 0xc(%rax), %eax addl $0x1, %eax cltq shlq $0x3, %rax addq %rax, %rsi leaq -0x2c(%rbp), %rdi callq 0x14680 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x146b0 movq %rax, %rcx movq -0x58(%rbp), %rax movq -0x2c(%rbp), %rdx movq %rdx, (%rcx) movq (%rax), %rsi movl 0xc(%rax), %eax addl $0x2, %eax cltq shlq $0x3, %rax addq %rax, %rsi leaq -0x34(%rbp), %rdi callq 0x14680 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x146b0 movq %rax, %rcx movq -0x58(%rbp), %rax movq -0x34(%rbp), %rdx movq %rdx, (%rcx) movq (%rax), %rsi movl 0xc(%rax), %eax addl $0x3, %eax cltq shlq $0x3, %rax addq %rax, %rsi leaq -0x3c(%rbp), %rdi callq 0x14680 movq -0x10(%rbp), %rdi movl $0x2, %esi callq 0x146b0 movq -0x3c(%rbp), %rcx movq %rcx, (%rax) jmp 0x12990 movq -0x58(%rbp), %rax movq (%rax), %rsi movl 0xc(%rax), %eax addl $0x1, %eax cltq shlq $0x3, %rax addq %rax, %rsi leaq -0x44(%rbp), %rdi callq 0x14680 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x146b0 movq -0x44(%rbp), %rcx movq %rcx, (%rax) movl -0x14(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
_ZNK7lunasvg12PathIterator14currentSegmentERSt5arrayINS_5PointELm3EE: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rcx, [rbp+var_8] mov [rbp+var_58], rcx mov rax, [rcx] movsxd rcx, dword ptr [rcx+0Ch] mov eax, [rax+rcx*8] mov [rbp+var_14], eax mov eax, [rbp+var_14] mov [rbp+var_50], rax sub rax, 3; switch 4 cases ja def_12848; jumptable 0000000000012848 default case mov rax, [rbp+var_50] lea rcx, jpt_12848 movsxd rax, ds:(jpt_12848 - 8C13Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1284A: mov rax, [rbp+var_58]; jumptable 0000000000012848 case 0 mov rsi, [rax] mov eax, [rax+0Ch] add eax, 1 cdqe shl rax, 3 add rsi, rax lea rdi, [rbp+var_1C] call _ZN7lunasvg5PointC2ERK13plutovg_point; lunasvg::Point::Point(plutovg_point const&) mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNSt5arrayIN7lunasvg5PointELm3EEixEm; std::array<lunasvg::Point,3ul>::operator[](ulong) mov rcx, [rbp+var_1C] mov [rax], rcx jmp def_12848; jumptable 0000000000012848 default case loc_12882: mov rax, [rbp+var_58]; jumptable 0000000000012848 case 1 mov rsi, [rax] mov eax, [rax+0Ch] add eax, 1 cdqe shl rax, 3 add rsi, rax lea rdi, [rbp+var_24] call _ZN7lunasvg5PointC2ERK13plutovg_point; lunasvg::Point::Point(plutovg_point const&) mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNSt5arrayIN7lunasvg5PointELm3EEixEm; std::array<lunasvg::Point,3ul>::operator[](ulong) mov rcx, [rbp+var_24] mov [rax], rcx jmp def_12848; jumptable 0000000000012848 default case loc_128BA: mov rax, [rbp+var_58]; jumptable 0000000000012848 case 2 mov rsi, [rax] mov eax, [rax+0Ch] add eax, 1 cdqe shl rax, 3 add rsi, rax lea rdi, [rbp+var_2C] call _ZN7lunasvg5PointC2ERK13plutovg_point; lunasvg::Point::Point(plutovg_point const&) mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNSt5arrayIN7lunasvg5PointELm3EEixEm; std::array<lunasvg::Point,3ul>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_58] mov rdx, [rbp+var_2C] mov [rcx], rdx mov rsi, [rax] mov eax, [rax+0Ch] add eax, 2 cdqe shl rax, 3 add rsi, rax lea rdi, [rbp+var_34] call _ZN7lunasvg5PointC2ERK13plutovg_point; lunasvg::Point::Point(plutovg_point const&) mov rdi, [rbp+var_10] mov esi, 1 call _ZNSt5arrayIN7lunasvg5PointELm3EEixEm; std::array<lunasvg::Point,3ul>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_58] mov rdx, [rbp+var_34] mov [rcx], rdx mov rsi, [rax] mov eax, [rax+0Ch] add eax, 3 cdqe shl rax, 3 add rsi, rax lea rdi, [rbp+var_3C] call _ZN7lunasvg5PointC2ERK13plutovg_point; lunasvg::Point::Point(plutovg_point const&) mov rdi, [rbp+var_10] mov esi, 2 call _ZNSt5arrayIN7lunasvg5PointELm3EEixEm; std::array<lunasvg::Point,3ul>::operator[](ulong) mov rcx, [rbp+var_3C] mov [rax], rcx jmp short def_12848; jumptable 0000000000012848 default case loc_1295D: mov rax, [rbp+var_58]; jumptable 0000000000012848 case 3 mov rsi, [rax] mov eax, [rax+0Ch] add eax, 1 cdqe shl rax, 3 add rsi, rax lea rdi, [rbp+var_44] call _ZN7lunasvg5PointC2ERK13plutovg_point; lunasvg::Point::Point(plutovg_point const&) mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNSt5arrayIN7lunasvg5PointELm3EEixEm; std::array<lunasvg::Point,3ul>::operator[](ulong) mov rcx, [rbp+var_44] mov [rax], rcx def_12848: mov eax, [rbp+var_14]; jumptable 0000000000012848 default case add rsp, 60h pop rbp retn
long long lunasvg::PathIterator::currentSegment(long long a1, long long a2) { _QWORD *v2; // rax _QWORD *v3; // rax _QWORD *v4; // rax _QWORD *v5; // rax _QWORD *v6; // rax _QWORD *v7; // rax long long v9; // [rsp+1Ch] [rbp-44h] BYREF long long v10; // [rsp+24h] [rbp-3Ch] BYREF long long v11; // [rsp+2Ch] [rbp-34h] BYREF long long v12; // [rsp+34h] [rbp-2Ch] BYREF long long v13; // [rsp+3Ch] [rbp-24h] BYREF long long v14; // [rsp+44h] [rbp-1Ch] BYREF unsigned int v15; // [rsp+4Ch] [rbp-14h] long long v16; // [rsp+50h] [rbp-10h] long long v17; // [rsp+58h] [rbp-8h] v17 = a1; v16 = a2; v15 = *(_DWORD *)(*(_QWORD *)a1 + 8LL * *(int *)(a1 + 12)); switch ( v15 ) { case 0u: lunasvg::Point::Point(&v14, 8LL * (*(_DWORD *)(a1 + 12) + 1) + *(_QWORD *)a1); v2 = (_QWORD *)std::array<lunasvg::Point,3ul>::operator[](v16, 0LL); *v2 = v14; break; case 1u: lunasvg::Point::Point(&v13, 8LL * (*(_DWORD *)(a1 + 12) + 1) + *(_QWORD *)a1); v3 = (_QWORD *)std::array<lunasvg::Point,3ul>::operator[](v16, 0LL); *v3 = v13; break; case 2u: lunasvg::Point::Point(&v12, 8LL * (*(_DWORD *)(a1 + 12) + 1) + *(_QWORD *)a1); v4 = (_QWORD *)std::array<lunasvg::Point,3ul>::operator[](v16, 0LL); *v4 = v12; lunasvg::Point::Point(&v11, 8LL * (*(_DWORD *)(a1 + 12) + 2) + *(_QWORD *)a1); v5 = (_QWORD *)std::array<lunasvg::Point,3ul>::operator[](v16, 1LL); *v5 = v11; lunasvg::Point::Point(&v10, 8LL * (*(_DWORD *)(a1 + 12) + 3) + *(_QWORD *)a1); v6 = (_QWORD *)std::array<lunasvg::Point,3ul>::operator[](v16, 2LL); *v6 = v10; break; case 3u: lunasvg::Point::Point(&v9, 8LL * (*(_DWORD *)(a1 + 12) + 1) + *(_QWORD *)a1); v7 = (_QWORD *)std::array<lunasvg::Point,3ul>::operator[](v16, 0LL); *v7 = v9; break; default: return v15; } return v15; }
currentSegment: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x58],RCX MOV RAX,qword ptr [RCX] MOVSXD RCX,dword ptr [RCX + 0xc] MOV EAX,dword ptr [RAX + RCX*0x8] MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] MOV qword ptr [RBP + -0x50],RAX SUB RAX,0x3 JA 0x00112990 MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x18c13c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RAX,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] ADD EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX LEA RDI,[RBP + -0x1c] CALL 0x00114680 MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001146b0 MOV RCX,qword ptr [RBP + -0x1c] MOV qword ptr [RAX],RCX JMP 0x00112990 caseD_1: MOV RAX,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] ADD EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX LEA RDI,[RBP + -0x24] CALL 0x00114680 MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001146b0 MOV RCX,qword ptr [RBP + -0x24] MOV qword ptr [RAX],RCX JMP 0x00112990 caseD_2: MOV RAX,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] ADD EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX LEA RDI,[RBP + -0x2c] CALL 0x00114680 MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001146b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x2c] MOV qword ptr [RCX],RDX MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] ADD EAX,0x2 CDQE SHL RAX,0x3 ADD RSI,RAX LEA RDI,[RBP + -0x34] CALL 0x00114680 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x001146b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x34] MOV qword ptr [RCX],RDX MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] ADD EAX,0x3 CDQE SHL RAX,0x3 ADD RSI,RAX LEA RDI,[RBP + -0x3c] CALL 0x00114680 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 CALL 0x001146b0 MOV RCX,qword ptr [RBP + -0x3c] MOV qword ptr [RAX],RCX JMP 0x00112990 caseD_3: MOV RAX,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] ADD EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX LEA RDI,[RBP + -0x44] CALL 0x00114680 MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001146b0 MOV RCX,qword ptr [RBP + -0x44] MOV qword ptr [RAX],RCX default: MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x60 POP RBP RET
/* lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const */ int4 __thiscall lunasvg::PathIterator::currentSegment(PathIterator *this,array *param_1) { int8 *puVar1; int8 local_4c; int8 local_44; int8 local_3c; int8 local_34; int8 local_2c; int8 local_24; int4 local_1c; array<lunasvg::Point,3ul> *local_18; PathIterator *local_10; local_1c = *(int4 *)(*(long *)this + (long)*(int *)(this + 0xc) * 8); local_18 = (array<lunasvg::Point,3ul> *)param_1; local_10 = this; switch(local_1c) { case 0: Point::Point((Point *)&local_24, (plutovg_point *)(*(long *)this + (long)(*(int *)(this + 0xc) + 1) * 8)); puVar1 = (int8 *)std::array<lunasvg::Point,3ul>::operator[](local_18,0); *puVar1 = local_24; break; case 1: Point::Point((Point *)&local_2c, (plutovg_point *)(*(long *)this + (long)(*(int *)(this + 0xc) + 1) * 8)); puVar1 = (int8 *)std::array<lunasvg::Point,3ul>::operator[](local_18,0); *puVar1 = local_2c; break; case 2: Point::Point((Point *)&local_34, (plutovg_point *)(*(long *)this + (long)(*(int *)(this + 0xc) + 1) * 8)); puVar1 = (int8 *)std::array<lunasvg::Point,3ul>::operator[](local_18,0); *puVar1 = local_34; Point::Point((Point *)&local_3c, (plutovg_point *)(*(long *)this + (long)(*(int *)(this + 0xc) + 2) * 8)); puVar1 = (int8 *)std::array<lunasvg::Point,3ul>::operator[](local_18,1); *puVar1 = local_3c; Point::Point((Point *)&local_44, (plutovg_point *)(*(long *)this + (long)(*(int *)(this + 0xc) + 3) * 8)); puVar1 = (int8 *)std::array<lunasvg::Point,3ul>::operator[](local_18,2); *puVar1 = local_44; break; case 3: Point::Point((Point *)&local_4c, (plutovg_point *)(*(long *)this + (long)(*(int *)(this + 0xc) + 1) * 8)); puVar1 = (int8 *)std::array<lunasvg::Point,3ul>::operator[](local_18,0); *puVar1 = local_4c; } return local_1c; }
2,031
lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const
dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp
PathCommand PathIterator::currentSegment(std::array<Point, 3>& points) const { auto command = m_elements[m_index].header.command; switch(command) { case PLUTOVG_PATH_COMMAND_MOVE_TO: points[0] = m_elements[m_index + 1].point; break; case PLUTOVG_PATH_COMMAND_LINE_TO: points[0] = m_elements[m_index + 1].point; break; case PLUTOVG_PATH_COMMAND_CUBIC_TO: points[0] = m_elements[m_index + 1].point; points[1] = m_elements[m_index + 2].point; points[2] = m_elements[m_index + 3].point; break; case PLUTOVG_PATH_COMMAND_CLOSE: points[0] = m_elements[m_index + 1].point; break; } return PathCommand(command); }
O1
cpp
lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const: movq (%rdi), %rcx movslq 0xc(%rdi), %rdx movl (%rcx,%rdx,8), %eax cmpq $0x3, %rax ja 0xd3c8 leaq 0x35de5(%rip), %r8 # 0x43160 movslq (%r8,%rax,4), %r9 addq %r8, %r9 jmpq *%r9 movl 0x8(%rcx,%rdx,8), %edi movl 0xc(%rcx,%rdx,8), %ecx movl %edi, (%rsi) movl $0x4, %edx jmp 0xd3c5 movq 0x8(%rcx,%rdx,8), %rcx movq %rcx, (%rsi) movq (%rdi), %rcx movslq 0xc(%rdi), %rdx movq 0x10(%rcx,%rdx,8), %rcx movq %rcx, 0x8(%rsi) movq (%rdi), %rcx movslq 0xc(%rdi), %rdx movl 0x18(%rcx,%rdx,8), %edi movl 0x1c(%rcx,%rdx,8), %ecx movl %edi, 0x10(%rsi) movl $0x14, %edx movl %ecx, (%rsi,%rdx) retq nop
_ZNK7lunasvg12PathIterator14currentSegmentERSt5arrayINS_5PointELm3EE: mov rcx, [rdi] movsxd rdx, dword ptr [rdi+0Ch] mov eax, [rcx+rdx*8] cmp rax, 3; switch 4 cases ja short def_D382; jumptable 000000000000D382 default case lea r8, jpt_D382 movsxd r9, ds:(jpt_D382 - 43160h)[r8+rax*4] add r9, r8 jmp r9; switch jump loc_D385: mov edi, [rcx+rdx*8+8]; jumptable 000000000000D382 cases 0,1,3 mov ecx, [rcx+rdx*8+0Ch] mov [rsi], edi mov edx, 4 jmp short loc_D3C5 loc_D396: mov rcx, [rcx+rdx*8+8]; jumptable 000000000000D382 case 2 mov [rsi], rcx mov rcx, [rdi] movsxd rdx, dword ptr [rdi+0Ch] mov rcx, [rcx+rdx*8+10h] mov [rsi+8], rcx mov rcx, [rdi] movsxd rdx, dword ptr [rdi+0Ch] mov edi, [rcx+rdx*8+18h] mov ecx, [rcx+rdx*8+1Ch] mov [rsi+10h], edi mov edx, 14h loc_D3C5: mov [rsi+rdx], ecx def_D382: retn; jumptable 000000000000D382 default case
long long lunasvg::PathIterator::currentSegment(long long *a1, long long a2) { long long v2; // rcx long long v3; // rdx long long result; // rax int v5; // edi int v6; // ecx long long v7; // rdx long long v8; // rdx v2 = *a1; v3 = *((int *)a1 + 3); result = *(unsigned int *)(*a1 + 8 * v3); switch ( *(_DWORD *)(*a1 + 8 * v3) ) { case 0: case 1: case 3: v5 = *(_DWORD *)(v2 + 8 * v3 + 8); v6 = *(_DWORD *)(v2 + 8 * v3 + 12); *(_DWORD *)a2 = v5; v7 = 4LL; goto LABEL_4; case 2: *(_QWORD *)a2 = *(_QWORD *)(v2 + 8 * v3 + 8); *(_QWORD *)(a2 + 8) = *(_QWORD *)(*a1 + 8LL * *((int *)a1 + 3) + 16); v8 = *((int *)a1 + 3); v6 = *(_DWORD *)(*a1 + 8 * v8 + 28); *(_DWORD *)(a2 + 16) = *(_DWORD *)(*a1 + 8 * v8 + 24); v7 = 20LL; LABEL_4: *(_DWORD *)(a2 + v7) = v6; break; default: return result; } return result; }
currentSegment: MOV RCX,qword ptr [RDI] MOVSXD RDX,dword ptr [RDI + 0xc] MOV EAX,dword ptr [RCX + RDX*0x8] CMP RAX,0x3 JA 0x0010d3c8 LEA R8,[0x143160] MOVSXD R9,dword ptr [R8 + RAX*0x4] ADD R9,R8 switchD: JMP R9 caseD_0: MOV EDI,dword ptr [RCX + RDX*0x8 + 0x8] MOV ECX,dword ptr [RCX + RDX*0x8 + 0xc] MOV dword ptr [RSI],EDI MOV EDX,0x4 JMP 0x0010d3c5 caseD_2: MOV RCX,qword ptr [RCX + RDX*0x8 + 0x8] MOV qword ptr [RSI],RCX MOV RCX,qword ptr [RDI] MOVSXD RDX,dword ptr [RDI + 0xc] MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10] MOV qword ptr [RSI + 0x8],RCX MOV RCX,qword ptr [RDI] MOVSXD RDX,dword ptr [RDI + 0xc] MOV EDI,dword ptr [RCX + RDX*0x8 + 0x18] MOV ECX,dword ptr [RCX + RDX*0x8 + 0x1c] MOV dword ptr [RSI + 0x10],EDI MOV EDX,0x14 LAB_0010d3c5: MOV dword ptr [RSI + RDX*0x1],ECX default: RET
/* lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const */ void __thiscall lunasvg::PathIterator::currentSegment(PathIterator *this,array *param_1) { int4 uVar1; long lVar2; long lVar3; lVar3 = *(long *)this; lVar2 = (long)*(int *)(this + 0xc); switch(*(int4 *)(lVar3 + lVar2 * 8)) { case 0: case 1: case 3: uVar1 = *(int4 *)(lVar3 + 0xc + lVar2 * 8); *(int4 *)param_1 = *(int4 *)(lVar3 + 8 + lVar2 * 8); lVar3 = 4; break; case 2: *(int8 *)param_1 = *(int8 *)(lVar3 + 8 + lVar2 * 8); *(int8 *)(param_1 + 8) = *(int8 *)(*(long *)this + 0x10 + (long)*(int *)(this + 0xc) * 8); uVar1 = *(int4 *)(*(long *)this + 0x1c + (long)*(int *)(this + 0xc) * 8); *(int4 *)(param_1 + 0x10) = *(int4 *)(*(long *)this + 0x18 + (long)*(int *)(this + 0xc) * 8); lVar3 = 0x14; break; default: goto switchD_0010d382_default; } *(int4 *)(param_1 + lVar3) = uVar1; switchD_0010d382_default: return; }
2,032
lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const
dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp
PathCommand PathIterator::currentSegment(std::array<Point, 3>& points) const { auto command = m_elements[m_index].header.command; switch(command) { case PLUTOVG_PATH_COMMAND_MOVE_TO: points[0] = m_elements[m_index + 1].point; break; case PLUTOVG_PATH_COMMAND_LINE_TO: points[0] = m_elements[m_index + 1].point; break; case PLUTOVG_PATH_COMMAND_CUBIC_TO: points[0] = m_elements[m_index + 1].point; points[1] = m_elements[m_index + 2].point; points[2] = m_elements[m_index + 3].point; break; case PLUTOVG_PATH_COMMAND_CLOSE: points[0] = m_elements[m_index + 1].point; break; } return PathCommand(command); }
O2
cpp
lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const: movq (%rdi), %rcx movslq 0xc(%rdi), %rdx movl (%rcx,%rdx,8), %eax cmpq $0x3, %rax ja 0xca79 leaq 0x2d72f(%rip), %r8 # 0x3a160 movslq (%r8,%rax,4), %r9 addq %r8, %r9 jmpq *%r9 movl 0x8(%rcx,%rdx,8), %edi movl 0xc(%rcx,%rdx,8), %ecx movl %edi, (%rsi) pushq $0x4 jmp 0xca75 movq 0x8(%rcx,%rdx,8), %rcx movq %rcx, (%rsi) movq (%rdi), %rcx movslq 0xc(%rdi), %rdx movq 0x10(%rcx,%rdx,8), %rcx movq %rcx, 0x8(%rsi) movq (%rdi), %rcx movslq 0xc(%rdi), %rdx movl 0x18(%rcx,%rdx,8), %edi movl 0x1c(%rcx,%rdx,8), %ecx movl %edi, 0x10(%rsi) pushq $0x14 popq %rdx movl %ecx, (%rsi,%rdx) retq
_ZNK7lunasvg12PathIterator14currentSegmentERSt5arrayINS_5PointELm3EE: mov rcx, [rdi] movsxd rdx, dword ptr [rdi+0Ch] mov eax, [rcx+rdx*8] cmp rax, 3; switch 4 cases ja short def_CA38; jumptable 000000000000CA38 default case lea r8, jpt_CA38 movsxd r9, ds:(jpt_CA38 - 3A160h)[r8+rax*4] add r9, r8 jmp r9; switch jump loc_CA3B: mov edi, [rcx+rdx*8+8]; jumptable 000000000000CA38 cases 0,1,3 mov ecx, [rcx+rdx*8+0Ch] mov [rsi], edi push 4 jmp short loc_CA75 loc_CA49: mov rcx, [rcx+rdx*8+8]; jumptable 000000000000CA38 case 2 mov [rsi], rcx mov rcx, [rdi] movsxd rdx, dword ptr [rdi+0Ch] mov rcx, [rcx+rdx*8+10h] mov [rsi+8], rcx mov rcx, [rdi] movsxd rdx, dword ptr [rdi+0Ch] mov edi, [rcx+rdx*8+18h] mov ecx, [rcx+rdx*8+1Ch] mov [rsi+10h], edi push 14h loc_CA75: pop rdx mov [rsi+rdx], ecx def_CA38: retn; jumptable 000000000000CA38 default case
long long lunasvg::PathIterator::currentSegment(long long *a1, long long a2) { long long v2; // rcx long long v3; // rdx long long result; // rax int v5; // edi int v6; // ecx long long v7; // rdx long long v8; // [rsp-8h] [rbp-8h] v2 = *a1; v3 = *((int *)a1 + 3); result = *(unsigned int *)(*a1 + 8 * v3); switch ( *(_DWORD *)(*a1 + 8 * v3) ) { case 0: case 1: case 3: v5 = *(_DWORD *)(v2 + 8 * v3 + 8); v6 = *(_DWORD *)(v2 + 8 * v3 + 12); *(_DWORD *)a2 = v5; v8 = 4LL; goto LABEL_4; case 2: *(_QWORD *)a2 = *(_QWORD *)(v2 + 8 * v3 + 8); *(_QWORD *)(a2 + 8) = *(_QWORD *)(*a1 + 8LL * *((int *)a1 + 3) + 16); v7 = *((int *)a1 + 3); v6 = *(_DWORD *)(*a1 + 8 * v7 + 28); *(_DWORD *)(a2 + 16) = *(_DWORD *)(*a1 + 8 * v7 + 24); v8 = 20LL; LABEL_4: *(_DWORD *)(a2 + v8) = v6; break; default: return result; } return result; }
currentSegment: MOV RCX,qword ptr [RDI] MOVSXD RDX,dword ptr [RDI + 0xc] MOV EAX,dword ptr [RCX + RDX*0x8] CMP RAX,0x3 JA 0x0010ca79 LEA R8,[0x13a160] MOVSXD R9,dword ptr [R8 + RAX*0x4] ADD R9,R8 switchD: JMP R9 caseD_0: MOV EDI,dword ptr [RCX + RDX*0x8 + 0x8] MOV ECX,dword ptr [RCX + RDX*0x8 + 0xc] MOV dword ptr [RSI],EDI PUSH 0x4 JMP 0x0010ca75 caseD_2: MOV RCX,qword ptr [RCX + RDX*0x8 + 0x8] MOV qword ptr [RSI],RCX MOV RCX,qword ptr [RDI] MOVSXD RDX,dword ptr [RDI + 0xc] MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10] MOV qword ptr [RSI + 0x8],RCX MOV RCX,qword ptr [RDI] MOVSXD RDX,dword ptr [RDI + 0xc] MOV EDI,dword ptr [RCX + RDX*0x8 + 0x18] MOV ECX,dword ptr [RCX + RDX*0x8 + 0x1c] MOV dword ptr [RSI + 0x10],EDI PUSH 0x14 LAB_0010ca75: POP RDX MOV dword ptr [RSI + RDX*0x1],ECX default: RET
/* lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point, 3ul>&) const */ void __thiscall lunasvg::PathIterator::currentSegment(PathIterator *this,array *param_1) { long lVar1; int4 uVar2; long lVar3; long lStack_8; lVar1 = *(long *)this; lVar3 = (long)*(int *)(this + 0xc); switch(*(int4 *)(lVar1 + lVar3 * 8)) { case 0: case 1: case 3: uVar2 = *(int4 *)(lVar1 + 0xc + lVar3 * 8); *(int4 *)param_1 = *(int4 *)(lVar1 + 8 + lVar3 * 8); lStack_8 = 4; break; case 2: *(int8 *)param_1 = *(int8 *)(lVar1 + 8 + lVar3 * 8); *(int8 *)(param_1 + 8) = *(int8 *)(*(long *)this + 0x10 + (long)*(int *)(this + 0xc) * 8); uVar2 = *(int4 *)(*(long *)this + 0x1c + (long)*(int *)(this + 0xc) * 8); *(int4 *)(param_1 + 0x10) = *(int4 *)(*(long *)this + 0x18 + (long)*(int *)(this + 0xc) * 8); lStack_8 = 0x14; break; default: goto switchD_0010ca38_default; } *(int4 *)(param_1 + lStack_8) = uVar2; switchD_0010ca38_default: return; }
2,033
my_aes_crypt_init
eloqsql/mysys_ssl/my_crypt.cc
int my_aes_crypt_init(void *ctx, enum my_aes_mode mode, int flags, const unsigned char* key, unsigned int klen, const unsigned char* iv, unsigned int ivlen) { #ifdef HAVE_EncryptAes128Ctr #ifdef HAVE_EncryptAes128Gcm if (mode == MY_AES_GCM) if (flags & ENCRYPTION_FLAG_NOPAD) return MY_AES_OPENSSL_ERROR; else new (ctx) MyCTX_gcm(); else #endif if (mode == MY_AES_CTR) new (ctx) MyCTX(); else #endif if (flags & ENCRYPTION_FLAG_NOPAD) new (ctx) MyCTX_nopad(); else new (ctx) MyCTX(); return ((MyCTX*)ctx)->init(ciphers[mode](klen), flags & 1, key, klen, iv, ivlen); }
O3
cpp
my_aes_crypt_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %r14d movl %edx, %r12d movl %esi, %ebx movq %rdi, %r13 cmpl $0x2, %esi je 0xd8172 cmpl $0x3, %ebx jne 0xd81b1 testb $0x2, %r12b jne 0xd8242 movq %rcx, %r15 movq %r9, -0x30(%rbp) leaq 0x2ab671(%rip), %rax # 0x3837a8 addq $0x10, %rax movq %rax, (%r13) leaq 0x17(%r13), %rdi andq $-0x10, %rdi movq %rdi, 0xc8(%r13) movl $0xb0, %edx xorl %esi, %esi callq 0x292a0 movq 0xc8(%r13), %rdi callq 0x29990 leaq 0x2ab5db(%rip), %rax # 0x383748 jmp 0xd81fb movq %rcx, %r15 movq %r9, -0x30(%rbp) leaq 0x2ab628(%rip), %rax # 0x3837a8 addq $0x10, %rax movq %rax, (%r13) leaq 0x17(%r13), %rdi andq $-0x10, %rdi movq %rdi, 0xc8(%r13) movl $0xb0, %edx xorl %esi, %esi callq 0x292a0 movq 0xc8(%r13), %rdi callq 0x29990 jmp 0xd8203 movq %rcx, %r15 movq %r9, -0x30(%rbp) leaq 0x2ab5e9(%rip), %rax # 0x3837a8 addq $0x10, %rax movq %rax, (%r13) leaq 0x17(%r13), %rdi andq $-0x10, %rdi movq %rdi, 0xc8(%r13) movl $0xb0, %edx xorl %esi, %esi callq 0x292a0 movq 0xc8(%r13), %rdi callq 0x29990 testb $0x2, %r12b je 0xd8203 leaq 0x2ab5e5(%rip), %rax # 0x3837e0 addq $0x10, %rax movq %rax, (%r13) movl %ebx, %eax leaq 0x324164(%rip), %rcx # 0x3fc370 movl %r14d, %edi callq *(%rcx,%rax,8) andl $0x1, %r12d movq (%r13), %rcx movq 0x10(%rcx), %r11 movq %r13, %rdi movq %rax, %rsi movl %r12d, %edx movq %r15, %rcx movl %r14d, %r8d movq -0x30(%rbp), %r9 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%r11 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_aes_crypt_init: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, r8d mov r12d, edx mov ebx, esi mov r13, rdi cmp esi, 2 jz short loc_D8172 cmp ebx, 3 jnz loc_D81B1 test r12b, 2 jnz loc_D8242 mov r15, rcx mov [rbp+var_30], r9 lea rax, _ZTV5MyCTX; `vtable for'MyCTX add rax, 10h mov [r13+0], rax lea rdi, [r13+17h] and rdi, 0FFFFFFFFFFFFFFF0h mov [r13+0C8h], rdi mov edx, 0B0h xor esi, esi call _memset mov rdi, [r13+0C8h] call _EVP_CIPHER_CTX_reset lea rax, _ZTV9MyCTX_gcm; `vtable for'MyCTX_gcm jmp loc_D81FB loc_D8172: mov r15, rcx mov [rbp+var_30], r9 lea rax, _ZTV5MyCTX; `vtable for'MyCTX add rax, 10h mov [r13+0], rax lea rdi, [r13+17h] and rdi, 0FFFFFFFFFFFFFFF0h mov [r13+0C8h], rdi mov edx, 0B0h xor esi, esi call _memset mov rdi, [r13+0C8h] call _EVP_CIPHER_CTX_reset jmp short loc_D8203 loc_D81B1: mov r15, rcx mov [rbp+var_30], r9 lea rax, _ZTV5MyCTX; `vtable for'MyCTX add rax, 10h mov [r13+0], rax lea rdi, [r13+17h] and rdi, 0FFFFFFFFFFFFFFF0h mov [r13+0C8h], rdi mov edx, 0B0h xor esi, esi call _memset mov rdi, [r13+0C8h] call _EVP_CIPHER_CTX_reset test r12b, 2 jz short loc_D8203 lea rax, _ZTV11MyCTX_nopad; `vtable for'MyCTX_nopad loc_D81FB: add rax, 10h mov [r13+0], rax loc_D8203: mov eax, ebx lea rcx, ciphers mov edi, r14d; unsigned int call (ciphers - 3FC370h)[rcx+rax*8]; aes_ecb(uint) and r12d, 1 mov rcx, [r13+0] mov r11, [rcx+10h] mov rdi, r13 mov rsi, rax mov edx, r12d mov rcx, r15 mov r8d, r14d mov r9, [rbp+var_30] add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp r11 loc_D8242: mov eax, 0FFFFFF9Bh add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_aes_crypt_init(_QWORD *a1, int a2, char a3, long long a4, unsigned int a5, long long a6) { long long v9; // r15 unsigned long long v10; // rdi long long *v11; // rax unsigned long long v12; // rdi unsigned long long v13; // rdi long long v14; // rax long long v16; // [rsp+0h] [rbp-30h] if ( a2 == 2 ) { v9 = a4; v16 = a6; *a1 = &`vtable for'MyCTX + 2; v12 = ((unsigned long long)a1 + 23) & 0xFFFFFFFFFFFFFFF0LL; a1[25] = v12; memset(v12, 0LL, 176LL); EVP_CIPHER_CTX_reset(a1[25]); goto LABEL_9; } if ( a2 != 3 ) { v9 = a4; v16 = a6; *a1 = &`vtable for'MyCTX + 2; v13 = ((unsigned long long)a1 + 23) & 0xFFFFFFFFFFFFFFF0LL; a1[25] = v13; memset(v13, 0LL, 176LL); EVP_CIPHER_CTX_reset(a1[25]); if ( (a3 & 2) != 0 ) { v11 = &`vtable for'MyCTX_nopad; goto LABEL_8; } LABEL_9: v14 = ciphers[a2](a5); return (*(long long ( **)(_QWORD *, long long, _QWORD, long long, _QWORD, long long))(*a1 + 16LL))( a1, v14, a3 & 1, v9, a5, v16); } if ( (a3 & 2) == 0 ) { v9 = a4; v16 = a6; *a1 = &`vtable for'MyCTX + 2; v10 = ((unsigned long long)a1 + 23) & 0xFFFFFFFFFFFFFFF0LL; a1[25] = v10; memset(v10, 0LL, 176LL); EVP_CIPHER_CTX_reset(a1[25]); v11 = &`vtable for'MyCTX_gcm; LABEL_8: *a1 = v11 + 2; goto LABEL_9; } return 4294967195LL; }
my_aes_crypt_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,R8D MOV R12D,EDX MOV EBX,ESI MOV R13,RDI CMP ESI,0x2 JZ 0x001d8172 CMP EBX,0x3 JNZ 0x001d81b1 TEST R12B,0x2 JNZ 0x001d8242 MOV R15,RCX MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x4837a8] ADD RAX,0x10 MOV qword ptr [R13],RAX LEA RDI,[R13 + 0x17] AND RDI,-0x10 MOV qword ptr [R13 + 0xc8],RDI MOV EDX,0xb0 XOR ESI,ESI CALL 0x001292a0 MOV RDI,qword ptr [R13 + 0xc8] CALL 0x00129990 LEA RAX,[0x483748] JMP 0x001d81fb LAB_001d8172: MOV R15,RCX MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x4837a8] ADD RAX,0x10 MOV qword ptr [R13],RAX LEA RDI,[R13 + 0x17] AND RDI,-0x10 MOV qword ptr [R13 + 0xc8],RDI MOV EDX,0xb0 XOR ESI,ESI CALL 0x001292a0 MOV RDI,qword ptr [R13 + 0xc8] CALL 0x00129990 JMP 0x001d8203 LAB_001d81b1: MOV R15,RCX MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x4837a8] ADD RAX,0x10 MOV qword ptr [R13],RAX LEA RDI,[R13 + 0x17] AND RDI,-0x10 MOV qword ptr [R13 + 0xc8],RDI MOV EDX,0xb0 XOR ESI,ESI CALL 0x001292a0 MOV RDI,qword ptr [R13 + 0xc8] CALL 0x00129990 TEST R12B,0x2 JZ 0x001d8203 LEA RAX,[0x4837e0] LAB_001d81fb: ADD RAX,0x10 MOV qword ptr [R13],RAX LAB_001d8203: MOV EAX,EBX LEA RCX,[0x4fc370] MOV EDI,R14D CALL qword ptr [RCX + RAX*0x8] AND R12D,0x1 MOV RCX,qword ptr [R13] MOV R11,qword ptr [RCX + 0x10] MOV RDI,R13 MOV RSI,RAX MOV EDX,R12D MOV RCX,R15 MOV R8D,R14D MOV R9,qword ptr [RBP + -0x30] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP R11 LAB_001d8242: MOV EAX,0xffffff9b ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_aes_crypt_init(long *param_1,uint param_2,uint param_3,int8 param_4,int4 param_5, int8 param_6) { int *puVar1; int8 uVar2; void *pvVar3; if (param_2 == 2) { *param_1 = (long)&PTR__MyCTX_004837b8; pvVar3 = (void *)((long)param_1 + 0x17U & 0xfffffffffffffff0); param_1[0x19] = (long)pvVar3; memset(pvVar3,0,0xb0); EVP_CIPHER_CTX_reset(param_1[0x19]); } else { if (param_2 == 3) { if ((param_3 & 2) != 0) { return 0xffffff9b; } *param_1 = (long)&PTR__MyCTX_004837b8; pvVar3 = (void *)((long)param_1 + 0x17U & 0xfffffffffffffff0); param_1[0x19] = (long)pvVar3; memset(pvVar3,0,0xb0); EVP_CIPHER_CTX_reset(param_1[0x19]); puVar1 = &MyCTX_gcm::vtable; } else { *param_1 = (long)&PTR__MyCTX_004837b8; pvVar3 = (void *)((long)param_1 + 0x17U & 0xfffffffffffffff0); param_1[0x19] = (long)pvVar3; memset(pvVar3,0,0xb0); EVP_CIPHER_CTX_reset(param_1[0x19]); if ((param_3 & 2) == 0) goto LAB_001d8203; puVar1 = &MyCTX_nopad::vtable; } *param_1 = (long)(puVar1 + 0x10); } LAB_001d8203: uVar2 = (**(code **)(ciphers + (ulong)param_2 * 8))(param_5); /* WARNING: Could not recover jumptable at 0x001d823f. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar2 = (**(code **)(*param_1 + 0x10))(param_1,uVar2,param_3 & 1,param_4,param_5,param_6); return uVar2; }
2,034
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>(moodycamel::ConsumerToken&, emittra::Emittra::QueuedEvent&)
angrymouse[P]emittra/include/concurrentqueue.h
bool try_dequeue(consumer_token_t& token, U& item) { // The idea is roughly as follows: // Every 256 items from one producer, make everyone rotate (increase the global offset) -> this means the highest efficiency consumer dictates the rotation speed of everyone else, more or less // If you see that the global offset has changed, you must reset your consumption counter and move to your designated place // If there's no items where you're supposed to be, keep moving until you find a producer with some items // If the global offset has not changed but you've run out of items to consume, move over from your current position until you find an producer with something in it if (token.desiredProducer == nullptr || token.lastKnownGlobalOffset != globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { if (!update_current_producer_after_rotation(token)) { return false; } } // If there was at least one non-empty queue but it appears empty at the time // we try to dequeue from it, we need to make sure every queue's been tried if (static_cast<ProducerBase*>(token.currentProducer)->dequeue(item)) { if (++token.itemsConsumedFromCurrent == EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) { globalExplicitConsumerOffset.fetch_add(1, std::memory_order_relaxed); } return true; } auto tail = producerListTail.load(std::memory_order_acquire); auto ptr = static_cast<ProducerBase*>(token.currentProducer)->next_prod(); if (ptr == nullptr) { ptr = tail; } while (ptr != static_cast<ProducerBase*>(token.currentProducer)) { if (ptr->dequeue(item)) { token.currentProducer = ptr; token.itemsConsumedFromCurrent = 1; return true; } ptr = ptr->next_prod(); if (ptr == nullptr) { ptr = tail; } } return false; }
O0
c
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>(moodycamel::ConsumerToken&, emittra::Emittra::QueuedEvent&): subq $0xd8, %rsp movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq %rdx, 0x88(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x90(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0xee8b movq 0x70(%rsp), %rax movq 0x90(%rsp), %rcx movl 0x4(%rcx), %ecx movl %ecx, 0x5c(%rsp) addq $0x260, %rax # imm = 0x260 movq %rax, 0xd0(%rsp) movl $0x0, 0xcc(%rsp) movq 0xd0(%rsp), %rax movq %rax, 0x60(%rsp) movl 0xcc(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x6420 movl %eax, 0xc8(%rsp) movl 0xcc(%rsp), %eax movl %eax, 0x6c(%rsp) decl %eax subl $0x2, %eax jb 0xee60 jmp 0xee45 movl 0x6c(%rsp), %eax subl $0x5, %eax je 0xee70 jmp 0xee50 movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0xc4(%rsp) jmp 0xee7e movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0xc4(%rsp) jmp 0xee7e movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0xc4(%rsp) movl 0x5c(%rsp), %eax cmpl 0xc4(%rsp), %eax je 0xeeb0 movq 0x70(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0x22000 testb $0x1, %al jne 0xeeae movb $0x0, 0xa7(%rsp) jmp 0xf15d jmp 0xeeb0 movq 0x90(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x50(%rsp) cmpq $0x0, %rax je 0xeed7 movq 0x50(%rsp), %rax addq $-0x8, %rax movq %rax, 0x48(%rsp) jmp 0xeee0 xorl %eax, %eax movq %rax, 0x48(%rsp) jmp 0xeee0 movq 0x48(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x20b50 testb $0x1, %al jne 0xeefb jmp 0xf00d movq 0x90(%rsp), %rcx movl 0x8(%rcx), %eax addl $0x1, %eax movl %eax, 0x8(%rcx) cmpl $0x100, %eax # imm = 0x100 jne 0xf000 movq 0x70(%rsp), %rax addq $0x260, %rax # imm = 0x260 movq %rax, 0xb8(%rsp) movl $0x1, 0xb4(%rsp) movl $0x0, 0xb0(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x38(%rsp) movl 0xb0(%rsp), %eax movl 0xb4(%rsp), %ecx movl %ecx, 0xac(%rsp) decl %eax movl %eax, %ecx movq %rcx, 0x40(%rsp) subl $0x4, %eax ja 0xef85 movq 0x40(%rsp), %rax leaq 0x1d320(%rip), %rcx # 0x2c29c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x38(%rsp), %rcx movl 0xac(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0xa8(%rsp) jmp 0xf000 movq 0x38(%rsp), %rcx movl 0xac(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0xa8(%rsp) jmp 0xf000 movq 0x38(%rsp), %rcx movl 0xac(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0xa8(%rsp) jmp 0xf000 movq 0x38(%rsp), %rcx movl 0xac(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0xa8(%rsp) jmp 0xf000 movq 0x38(%rsp), %rcx movl 0xac(%rsp), %eax lock xaddl %eax, (%rcx) movl %eax, 0xa8(%rsp) movb $0x1, 0xa7(%rsp) jmp 0xf15d movq 0x70(%rsp), %rdi movl $0x2, %esi callq 0x123c0 movq %rax, 0x80(%rsp) movq 0x90(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x30(%rsp) cmpq $0x0, %rax je 0xf04b movq 0x30(%rsp), %rax addq $-0x8, %rax movq %rax, 0x28(%rsp) jmp 0xf054 xorl %eax, %eax movq %rax, 0x28(%rsp) jmp 0xf054 movq 0x28(%rsp), %rdi callq 0x12450 movq %rax, 0x78(%rsp) cmpq $0x0, 0x78(%rsp) jne 0xf078 movq 0x80(%rsp), %rax movq %rax, 0x78(%rsp) jmp 0xf07a movq 0x78(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x90(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x20(%rsp) cmpq $0x0, %rax je 0xf0ab movq 0x20(%rsp), %rax addq $-0x8, %rax movq %rax, 0x10(%rsp) jmp 0xf0b4 xorl %eax, %eax movq %rax, 0x10(%rsp) jmp 0xf0b4 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx cmpq %rcx, %rax je 0xf155 movq 0x78(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x20b50 testb $0x1, %al jne 0xf0df jmp 0xf12c movq 0x78(%rsp), %rcx movq %rcx, (%rsp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, 0x8(%rsp) je 0xf102 movq (%rsp), %rax addq $0x8, %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rcx movq 0x90(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x90(%rsp), %rax movl $0x1, 0x8(%rax) movb $0x1, 0xa7(%rsp) jmp 0xf15d movq 0x78(%rsp), %rdi callq 0x12450 movq %rax, 0x78(%rsp) cmpq $0x0, 0x78(%rsp) jne 0xf150 movq 0x80(%rsp), %rax movq %rax, 0x78(%rsp) jmp 0xf07a movb $0x0, 0xa7(%rsp) movb 0xa7(%rsp), %al andb $0x1, %al addq $0xd8, %rsp retq nop
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE11try_dequeueIS3_EEbRNS_13ConsumerTokenERT_: sub rsp, 0D8h mov [rsp+0D8h+var_40], rdi mov [rsp+0D8h+var_48], rsi mov [rsp+0D8h+var_50], rdx mov rax, [rsp+0D8h+var_40] mov [rsp+0D8h+var_68], rax mov rax, [rsp+0D8h+var_48] cmp qword ptr [rax+18h], 0 jz loc_EE8B mov rax, [rsp+0D8h+var_68] mov rcx, [rsp+0D8h+var_48] mov ecx, [rcx+4] mov [rsp+0D8h+var_7C], ecx add rax, 260h mov [rsp+0D8h+var_8], rax mov [rsp+0D8h+var_C], 0 mov rax, [rsp+0D8h+var_8] mov [rsp+0D8h+var_78], rax mov edi, [rsp+0D8h+var_C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+0D8h+var_10], eax mov eax, [rsp+0D8h+var_C] mov [rsp+0D8h+var_6C], eax dec eax sub eax, 2 jb short loc_EE60 jmp short $+2 loc_EE45: mov eax, [rsp+0D8h+var_6C] sub eax, 5 jz short loc_EE70 jmp short $+2 loc_EE50: mov rax, [rsp+0D8h+var_78] mov eax, [rax] mov [rsp+0D8h+var_14], eax jmp short loc_EE7E loc_EE60: mov rax, [rsp+0D8h+var_78] mov eax, [rax] mov [rsp+0D8h+var_14], eax jmp short loc_EE7E loc_EE70: mov rax, [rsp+0D8h+var_78] mov eax, [rax] mov [rsp+0D8h+var_14], eax loc_EE7E: mov eax, [rsp+0D8h+var_7C] cmp eax, [rsp+0D8h+var_14] jz short loc_EEB0 loc_EE8B: mov rdi, [rsp+0D8h+var_68] mov rsi, [rsp+0D8h+var_48] call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE38update_current_producer_after_rotationERNS_13ConsumerTokenE; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::update_current_producer_after_rotation(moodycamel::ConsumerToken &) test al, 1 jnz short loc_EEAE mov [rsp+0D8h+var_31], 0 jmp loc_F15D loc_EEAE: jmp short $+2 loc_EEB0: mov rax, [rsp+0D8h+var_48] mov rax, [rax+10h] mov [rsp+0D8h+var_88], rax cmp rax, 0 jz short loc_EED7 mov rax, [rsp+0D8h+var_88] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+0D8h+var_90], rax jmp short loc_EEE0 loc_EED7: xor eax, eax mov [rsp+0D8h+var_90], rax jmp short $+2 loc_EEE0: mov rdi, [rsp+0D8h+var_90] mov rsi, [rsp+0D8h+var_50] call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE12ProducerBase7dequeueIS3_EEbRT_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent &) test al, 1 jnz short loc_EEFB jmp loc_F00D loc_EEFB: mov rcx, [rsp+0D8h+var_48] mov eax, [rcx+8] add eax, 1 mov [rcx+8], eax cmp eax, 100h jnz loc_F000 mov rax, [rsp+0D8h+var_68] add rax, 260h mov [rsp+0D8h+var_20], rax mov [rsp+0D8h+var_24], 1 mov [rsp+0D8h+var_28], 0 mov rax, [rsp+0D8h+var_20] mov [rsp+0D8h+var_A0], rax mov eax, [rsp+0D8h+var_28] mov ecx, [rsp+0D8h+var_24] mov [rsp+0D8h+var_2C], ecx dec eax; switch 5 cases mov ecx, eax mov [rsp+0D8h+var_98], rcx sub eax, 4 ja short def_EF83; jumptable 000000000000EF83 default case mov rax, [rsp+0D8h+var_98] lea rcx, jpt_EF83 movsxd rax, ds:(jpt_EF83 - 2C29Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_EF83: mov rcx, [rsp+0D8h+var_A0]; jumptable 000000000000EF83 default case mov eax, [rsp+0D8h+var_2C] lock xadd [rcx], eax mov [rsp+0D8h+var_30], eax jmp short loc_F000 loc_EF9E: mov rcx, [rsp+0D8h+var_A0]; jumptable 000000000000EF83 cases 1,2 mov eax, [rsp+0D8h+var_2C] lock xadd [rcx], eax mov [rsp+0D8h+var_30], eax jmp short loc_F000 loc_EFB7: mov rcx, [rsp+0D8h+var_A0]; jumptable 000000000000EF83 case 3 mov eax, [rsp+0D8h+var_2C] lock xadd [rcx], eax mov [rsp+0D8h+var_30], eax jmp short loc_F000 loc_EFD0: mov rcx, [rsp+0D8h+var_A0]; jumptable 000000000000EF83 case 4 mov eax, [rsp+0D8h+var_2C] lock xadd [rcx], eax mov [rsp+0D8h+var_30], eax jmp short loc_F000 loc_EFE9: mov rcx, [rsp+0D8h+var_A0]; jumptable 000000000000EF83 case 5 mov eax, [rsp+0D8h+var_2C] lock xadd [rcx], eax mov [rsp+0D8h+var_30], eax loc_F000: mov [rsp+0D8h+var_31], 1 jmp loc_F15D loc_F00D: mov rdi, [rsp+0D8h+var_68] mov esi, 2 call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS0_28ConcurrentQueueDefaultTraitsEE12ProducerBaseEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase *>::load(std::memory_order) mov [rsp+0D8h+var_58], rax mov rax, [rsp+0D8h+var_48] mov rax, [rax+10h] mov [rsp+0D8h+var_A8], rax cmp rax, 0 jz short loc_F04B mov rax, [rsp+0D8h+var_A8] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+0D8h+var_B0], rax jmp short loc_F054 loc_F04B: xor eax, eax mov [rsp+0D8h+var_B0], rax jmp short $+2 loc_F054: mov rdi, [rsp+0D8h+var_B0] call _ZNK10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE12ProducerBase9next_prodEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::next_prod(void) mov [rsp+0D8h+var_60], rax cmp [rsp+0D8h+var_60], 0 jnz short loc_F078 mov rax, [rsp+0D8h+var_58] mov [rsp+0D8h+var_60], rax loc_F078: jmp short $+2 loc_F07A: mov rax, [rsp+0D8h+var_60] mov [rsp+0D8h+var_C0], rax mov rax, [rsp+0D8h+var_48] mov rax, [rax+10h] mov [rsp+0D8h+var_B8], rax cmp rax, 0 jz short loc_F0AB mov rax, [rsp+0D8h+var_B8] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+0D8h+var_C8], rax jmp short loc_F0B4 loc_F0AB: xor eax, eax mov [rsp+0D8h+var_C8], rax jmp short $+2 loc_F0B4: mov rax, [rsp+0D8h+var_C0] mov rcx, [rsp+0D8h+var_C8] cmp rax, rcx jz loc_F155 mov rdi, [rsp+0D8h+var_60] mov rsi, [rsp+0D8h+var_50] call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE12ProducerBase7dequeueIS3_EEbRT_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent &) test al, 1 jnz short loc_F0DF jmp short loc_F12C loc_F0DF: mov rcx, [rsp+0D8h+var_60] mov [rsp+0D8h+var_D8], rcx xor eax, eax cmp rcx, 0 mov [rsp+0D8h+var_D0], rax jz short loc_F102 mov rax, [rsp+0D8h+var_D8] add rax, 8 mov [rsp+0D8h+var_D0], rax loc_F102: mov rcx, [rsp+0D8h+var_D0] mov rax, [rsp+0D8h+var_48] mov [rax+10h], rcx mov rax, [rsp+0D8h+var_48] mov dword ptr [rax+8], 1 mov [rsp+0D8h+var_31], 1 jmp short loc_F15D loc_F12C: mov rdi, [rsp+0D8h+var_60] call _ZNK10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE12ProducerBase9next_prodEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::next_prod(void) mov [rsp+0D8h+var_60], rax cmp [rsp+0D8h+var_60], 0 jnz short loc_F150 mov rax, [rsp+0D8h+var_58] mov [rsp+0D8h+var_60], rax loc_F150: jmp loc_F07A loc_F155: mov [rsp+0D8h+var_31], 0 loc_F15D: mov al, [rsp+0D8h+var_31] and al, 1 add rsp, 0D8h retn
char moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>( long long a1, long long a2, long long a3) { char v3; // al int v4; // eax long long prod; // rax long long v7; // [rsp+8h] [rbp-D0h] long long v8; // [rsp+10h] [rbp-C8h] long long v9; // [rsp+20h] [rbp-B8h] long long v10; // [rsp+30h] [rbp-A8h] long long v11; // [rsp+50h] [rbp-88h] int v12; // [rsp+5Ch] [rbp-7Ch] long long v13; // [rsp+78h] [rbp-60h] long long v14; // [rsp+80h] [rbp-58h] if ( !*(_QWORD *)(a2 + 24) || (v12 = *(_DWORD *)(a2 + 4), std::operator&(0, 0xFFFF), v12 != *(_DWORD *)(a1 + 608)) ) { if ( (moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::update_current_producer_after_rotation( a1, a2) & 1) == 0 ) return 0; } v11 = *(_QWORD *)(a2 + 16); if ( v11 ) v3 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>( v11 - 8, a3); else v3 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>( 0LL, a3); if ( (v3 & 1) != 0 ) { v4 = *(_DWORD *)(a2 + 8) + 1; *(_DWORD *)(a2 + 8) = v4; if ( v4 == 256 ) _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 608), 1u); return 1; } else { v14 = std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase *>::load( a1, 2LL); v10 = *(_QWORD *)(a2 + 16); if ( v10 ) prod = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::next_prod(v10 - 8); else prod = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::next_prod(0LL); v13 = prod; if ( !prod ) v13 = v14; while ( 1 ) { v9 = *(_QWORD *)(a2 + 16); if ( v9 ) v8 = v9 - 8; else v8 = 0LL; if ( v13 == v8 ) return 0; if ( (moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>( v13, a3) & 1) != 0 ) break; v13 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::next_prod(v13); if ( !v13 ) v13 = v14; } v7 = 0LL; if ( v13 ) v7 = v13 + 8; *(_QWORD *)(a2 + 16) = v7; *(_DWORD *)(a2 + 8) = 1; return 1; } }
try_dequeue<emittra::Emittra::QueuedEvent>: SUB RSP,0xd8 MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI MOV qword ptr [RSP + 0x88],RDX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x90] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0010ee8b MOV RAX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x90] MOV ECX,dword ptr [RCX + 0x4] MOV dword ptr [RSP + 0x5c],ECX ADD RAX,0x260 MOV qword ptr [RSP + 0xd0],RAX MOV dword ptr [RSP + 0xcc],0x0 MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x60],RAX MOV EDI,dword ptr [RSP + 0xcc] MOV ESI,0xffff CALL 0x00106420 MOV dword ptr [RSP + 0xc8],EAX MOV EAX,dword ptr [RSP + 0xcc] MOV dword ptr [RSP + 0x6c],EAX DEC EAX SUB EAX,0x2 JC 0x0010ee60 JMP 0x0010ee45 LAB_0010ee45: MOV EAX,dword ptr [RSP + 0x6c] SUB EAX,0x5 JZ 0x0010ee70 JMP 0x0010ee50 LAB_0010ee50: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc4],EAX JMP 0x0010ee7e LAB_0010ee60: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc4],EAX JMP 0x0010ee7e LAB_0010ee70: MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc4],EAX LAB_0010ee7e: MOV EAX,dword ptr [RSP + 0x5c] CMP EAX,dword ptr [RSP + 0xc4] JZ 0x0010eeb0 LAB_0010ee8b: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x90] CALL 0x00122000 TEST AL,0x1 JNZ 0x0010eeae MOV byte ptr [RSP + 0xa7],0x0 JMP 0x0010f15d LAB_0010eeae: JMP 0x0010eeb0 LAB_0010eeb0: MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x50],RAX CMP RAX,0x0 JZ 0x0010eed7 MOV RAX,qword ptr [RSP + 0x50] ADD RAX,-0x8 MOV qword ptr [RSP + 0x48],RAX JMP 0x0010eee0 LAB_0010eed7: XOR EAX,EAX MOV qword ptr [RSP + 0x48],RAX JMP 0x0010eee0 LAB_0010eee0: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00120b50 TEST AL,0x1 JNZ 0x0010eefb JMP 0x0010f00d LAB_0010eefb: MOV RCX,qword ptr [RSP + 0x90] MOV EAX,dword ptr [RCX + 0x8] ADD EAX,0x1 MOV dword ptr [RCX + 0x8],EAX CMP EAX,0x100 JNZ 0x0010f000 MOV RAX,qword ptr [RSP + 0x70] ADD RAX,0x260 MOV qword ptr [RSP + 0xb8],RAX MOV dword ptr [RSP + 0xb4],0x1 MOV dword ptr [RSP + 0xb0],0x0 MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0xb0] MOV ECX,dword ptr [RSP + 0xb4] MOV dword ptr [RSP + 0xac],ECX DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x40],RCX SUB EAX,0x4 JA 0x0010ef85 MOV RAX,qword ptr [RSP + 0x40] LEA RCX,[0x12c29c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX LAB_0010ef85: MOV RCX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RSP + 0xac] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RSP + 0xa8],EAX JMP 0x0010f000 LAB_0010f000: MOV byte ptr [RSP + 0xa7],0x1 JMP 0x0010f15d LAB_0010f00d: MOV RDI,qword ptr [RSP + 0x70] MOV ESI,0x2 CALL 0x001123c0 MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x30],RAX CMP RAX,0x0 JZ 0x0010f04b MOV RAX,qword ptr [RSP + 0x30] ADD RAX,-0x8 MOV qword ptr [RSP + 0x28],RAX JMP 0x0010f054 LAB_0010f04b: XOR EAX,EAX MOV qword ptr [RSP + 0x28],RAX JMP 0x0010f054 LAB_0010f054: MOV RDI,qword ptr [RSP + 0x28] CALL 0x00112450 MOV qword ptr [RSP + 0x78],RAX CMP qword ptr [RSP + 0x78],0x0 JNZ 0x0010f078 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x78],RAX LAB_0010f078: JMP 0x0010f07a LAB_0010f07a: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x20],RAX CMP RAX,0x0 JZ 0x0010f0ab MOV RAX,qword ptr [RSP + 0x20] ADD RAX,-0x8 MOV qword ptr [RSP + 0x10],RAX JMP 0x0010f0b4 LAB_0010f0ab: XOR EAX,EAX MOV qword ptr [RSP + 0x10],RAX JMP 0x0010f0b4 LAB_0010f0b4: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] CMP RAX,RCX JZ 0x0010f155 MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00120b50 TEST AL,0x1 JNZ 0x0010f0df JMP 0x0010f12c LAB_0010f0df: MOV RCX,qword ptr [RSP + 0x78] MOV qword ptr [RSP],RCX XOR EAX,EAX CMP RCX,0x0 MOV qword ptr [RSP + 0x8],RAX JZ 0x0010f102 MOV RAX,qword ptr [RSP] ADD RAX,0x8 MOV qword ptr [RSP + 0x8],RAX LAB_0010f102: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x90] MOV dword ptr [RAX + 0x8],0x1 MOV byte ptr [RSP + 0xa7],0x1 JMP 0x0010f15d LAB_0010f12c: MOV RDI,qword ptr [RSP + 0x78] CALL 0x00112450 MOV qword ptr [RSP + 0x78],RAX CMP qword ptr [RSP + 0x78],0x0 JNZ 0x0010f150 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x78],RAX LAB_0010f150: JMP 0x0010f07a LAB_0010f155: MOV byte ptr [RSP + 0xa7],0x0 LAB_0010f15d: MOV AL,byte ptr [RSP + 0xa7] AND AL,0x1 ADD RSP,0xd8 RET
/* WARNING: Removing unreachable block (ram,0x0010ee60) */ /* WARNING: Removing unreachable block (ram,0x0010ee70) */ /* WARNING: Removing unreachable block (ram,0x0010ef70) */ /* bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>(moodycamel::ConsumerToken&, emittra::Emittra::QueuedEvent&) */ bool __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::try_dequeue<emittra::Emittra::QueuedEvent> (ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *this,ConsumerToken *param_1,QueuedEvent *param_2) { int iVar1; bool bVar2; ulong uVar3; ProducerBase *pPVar4; ProducerBase *local_d0; ProducerBase *local_c8; ProducerBase *local_b0; ProducerBase *local_90; ProducerBase *local_60; bool local_31; if (((*(long *)(param_1 + 0x18) == 0) || (iVar1 = *(int *)(param_1 + 4), std::operator&(0,0xffff), iVar1 != *(int *)(this + 0x260))) && (uVar3 = update_current_producer_after_rotation(this,param_1), (uVar3 & 1) == 0)) { local_31 = false; } else { if (*(long *)(param_1 + 0x10) == 0) { local_90 = (ProducerBase *)0x0; } else { local_90 = (ProducerBase *)(*(long *)(param_1 + 0x10) + -8); } bVar2 = ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(local_90,param_2); if (bVar2) { iVar1 = *(int *)(param_1 + 8); *(int *)(param_1 + 8) = iVar1 + 1; if (iVar1 + 1 == 0x100) { LOCK(); *(int *)(this + 0x260) = *(int *)(this + 0x260) + 1; UNLOCK(); } local_31 = true; } else { pPVar4 = (ProducerBase *) std:: atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase*> ::load((atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase*> *)this,2); if (*(long *)(param_1 + 0x10) == 0) { local_b0 = (ProducerBase *)0x0; } else { local_b0 = (ProducerBase *)(*(long *)(param_1 + 0x10) + -8); } local_60 = (ProducerBase *)ProducerBase::next_prod(local_b0); if (local_60 == (ProducerBase *)0x0) { local_60 = pPVar4; } while( true ) { if (*(long *)(param_1 + 0x10) == 0) { local_c8 = (ProducerBase *)0x0; } else { local_c8 = (ProducerBase *)(*(long *)(param_1 + 0x10) + -8); } if (local_60 == local_c8) { return false; } bVar2 = ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(local_60,param_2); if (bVar2) break; local_60 = (ProducerBase *)ProducerBase::next_prod(local_60); if (local_60 == (ProducerBase *)0x0) { local_60 = pPVar4; } } local_d0 = (ProducerBase *)0x0; if (local_60 != (ProducerBase *)0x0) { local_d0 = local_60 + 8; } *(ProducerBase **)(param_1 + 0x10) = local_d0; *(int4 *)(param_1 + 8) = 1; local_31 = true; } } return local_31; }
2,035
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>(moodycamel::ConsumerToken&, emittra::Emittra::QueuedEvent&)
angrymouse[P]emittra/include/concurrentqueue.h
bool try_dequeue(consumer_token_t& token, U& item) { // The idea is roughly as follows: // Every 256 items from one producer, make everyone rotate (increase the global offset) -> this means the highest efficiency consumer dictates the rotation speed of everyone else, more or less // If you see that the global offset has changed, you must reset your consumption counter and move to your designated place // If there's no items where you're supposed to be, keep moving until you find a producer with some items // If the global offset has not changed but you've run out of items to consume, move over from your current position until you find an producer with something in it if (token.desiredProducer == nullptr || token.lastKnownGlobalOffset != globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { if (!update_current_producer_after_rotation(token)) { return false; } } // If there was at least one non-empty queue but it appears empty at the time // we try to dequeue from it, we need to make sure every queue's been tried if (static_cast<ProducerBase*>(token.currentProducer)->dequeue(item)) { if (++token.itemsConsumedFromCurrent == EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) { globalExplicitConsumerOffset.fetch_add(1, std::memory_order_relaxed); } return true; } auto tail = producerListTail.load(std::memory_order_acquire); auto ptr = static_cast<ProducerBase*>(token.currentProducer)->next_prod(); if (ptr == nullptr) { ptr = tail; } while (ptr != static_cast<ProducerBase*>(token.currentProducer)) { if (ptr->dequeue(item)) { token.currentProducer = ptr; token.itemsConsumedFromCurrent = 1; return true; } ptr = ptr->next_prod(); if (ptr == nullptr) { ptr = tail; } } return false; }
O2
c
bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>(moodycamel::ConsumerToken&, emittra::Emittra::QueuedEvent&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 cmpq $0x0, 0x18(%rsi) je 0x603c movl 0x260(%r15), %eax cmpl %eax, 0x4(%rbx) je 0x604b movq %r15, %rdi movq %rbx, %rsi callq 0x8df8 testb %al, %al je 0x60c7 movq 0x10(%rbx), %rdi addq $-0x8, %rdi movq %r14, %rsi callq 0x8ba6 testb %al, %al je 0x607b movl 0x8(%rbx), %ecx incl %ecx movl %ecx, 0x8(%rbx) movb $0x1, %al cmpl $0x100, %ecx # imm = 0x100 jne 0x60d8 lock incl 0x260(%r15) jmp 0x60d8 movq (%r15), %r12 movq 0x10(%rbx), %rax movq (%rax), %rcx leaq -0x8(%rcx), %r15 testq %rcx, %rcx cmoveq %r12, %r15 leaq -0x8(%rax), %rcx testq %rax, %rax cmoveq %rax, %rcx cmpq %rcx, %r15 je 0x60c7 movq %r15, %rdi movq %r14, %rsi callq 0x8ba6 addq $0x8, %r15 testb %al, %al jne 0x60cb movq (%r15), %rax leaq -0x8(%rax), %r15 testq %rax, %rax cmoveq %r12, %r15 movq 0x10(%rbx), %rax jmp 0x6090 xorl %eax, %eax jmp 0x60d8 movq %r15, 0x10(%rbx) movl $0x1, 0x8(%rbx) movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE11try_dequeueIS3_EEbRNS_13ConsumerTokenERT_: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov rbx, rsi mov r15, rdi cmp qword ptr [rsi+18h], 0 jz short loc_603C mov eax, [r15+260h] cmp [rbx+4], eax jz short loc_604B loc_603C: mov rdi, r15 mov rsi, rbx call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE38update_current_producer_after_rotationERNS_13ConsumerTokenE; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::update_current_producer_after_rotation(moodycamel::ConsumerToken &) test al, al jz short loc_60C7 loc_604B: mov rdi, [rbx+10h] add rdi, 0FFFFFFFFFFFFFFF8h mov rsi, r14 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE12ProducerBase7dequeueIS3_EEbRT_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent &) test al, al jz short loc_607B mov ecx, [rbx+8] inc ecx mov [rbx+8], ecx mov al, 1 cmp ecx, 100h jnz short loc_60D8 lock inc dword ptr [r15+260h] jmp short loc_60D8 loc_607B: mov r12, [r15] mov rax, [rbx+10h] mov rcx, [rax] lea r15, [rcx-8] test rcx, rcx cmovz r15, r12 loc_6090: lea rcx, [rax-8] test rax, rax cmovz rcx, rax cmp r15, rcx jz short loc_60C7 mov rdi, r15 mov rsi, r14 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE12ProducerBase7dequeueIS3_EEbRT_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent &) add r15, 8 test al, al jnz short loc_60CB mov rax, [r15] lea r15, [rax-8] test rax, rax cmovz r15, r12 mov rax, [rbx+10h] jmp short loc_6090 loc_60C7: xor eax, eax jmp short loc_60D8 loc_60CB: mov [rbx+10h], r15 mov dword ptr [rbx+8], 1 mov al, 1 loc_60D8: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
char moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>( long long a1, long long a2, long long a3, long long a4) { long long v5; // rdx int v6; // ecx char result; // al long long v8; // r12 _QWORD *v9; // rax long long v10; // r15 _QWORD *v11; // rcx char v12; // al long long *v13; // r15 long long v14; // rax if ( (!*(_QWORD *)(a2 + 24) || *(_DWORD *)(a2 + 4) != *(_DWORD *)(a1 + 608)) && !(unsigned __int8)moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::update_current_producer_after_rotation( a1, a2) ) { return 0; } if ( !(unsigned __int8)moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>( *(_QWORD *)(a2 + 16) - 8LL, a3, a3, a4) ) { v8 = *(_QWORD *)a1; v9 = *(_QWORD **)(a2 + 16); v10 = *v9 - 8LL; if ( !*v9 ) v10 = *(_QWORD *)a1; while ( 1 ) { v11 = v9 - 1; if ( !v9 ) v11 = 0LL; if ( (_QWORD *)v10 == v11 ) break; v12 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::dequeue<emittra::Emittra::QueuedEvent>( v10, a3, v5, v11); v13 = (long long *)(v10 + 8); if ( v12 ) { *(_QWORD *)(a2 + 16) = v13; *(_DWORD *)(a2 + 8) = 1; return 1; } v14 = *v13; v10 = *v13 - 8; if ( !v14 ) v10 = v8; v9 = *(_QWORD **)(a2 + 16); } return 0; } v6 = *(_DWORD *)(a2 + 8) + 1; *(_DWORD *)(a2 + 8) = v6; result = 1; if ( v6 == 256 ) _InterlockedIncrement((volatile signed __int32 *)(a1 + 608)); return result; }
try_dequeue<emittra::Emittra::QueuedEvent>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI MOV R15,RDI CMP qword ptr [RSI + 0x18],0x0 JZ 0x0010603c MOV EAX,dword ptr [R15 + 0x260] CMP dword ptr [RBX + 0x4],EAX JZ 0x0010604b LAB_0010603c: MOV RDI,R15 MOV RSI,RBX CALL 0x00108df8 TEST AL,AL JZ 0x001060c7 LAB_0010604b: MOV RDI,qword ptr [RBX + 0x10] ADD RDI,-0x8 MOV RSI,R14 CALL 0x00108ba6 TEST AL,AL JZ 0x0010607b MOV ECX,dword ptr [RBX + 0x8] INC ECX MOV dword ptr [RBX + 0x8],ECX MOV AL,0x1 CMP ECX,0x100 JNZ 0x001060d8 INC.LOCK dword ptr [R15 + 0x260] JMP 0x001060d8 LAB_0010607b: MOV R12,qword ptr [R15] MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RAX] LEA R15,[RCX + -0x8] TEST RCX,RCX CMOVZ R15,R12 LAB_00106090: LEA RCX,[RAX + -0x8] TEST RAX,RAX CMOVZ RCX,RAX CMP R15,RCX JZ 0x001060c7 MOV RDI,R15 MOV RSI,R14 CALL 0x00108ba6 ADD R15,0x8 TEST AL,AL JNZ 0x001060cb MOV RAX,qword ptr [R15] LEA R15,[RAX + -0x8] TEST RAX,RAX CMOVZ R15,R12 MOV RAX,qword ptr [RBX + 0x10] JMP 0x00106090 LAB_001060c7: XOR EAX,EAX JMP 0x001060d8 LAB_001060cb: MOV qword ptr [RBX + 0x10],R15 MOV dword ptr [RBX + 0x8],0x1 MOV AL,0x1 LAB_001060d8: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* bool moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::try_dequeue<emittra::Emittra::QueuedEvent>(moodycamel::ConsumerToken&, emittra::Emittra::QueuedEvent&) */ bool __thiscall moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::try_dequeue<emittra::Emittra::QueuedEvent> (ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *this,ConsumerToken *param_1,QueuedEvent *param_2) { int iVar1; ProducerBase *pPVar2; long lVar3; char cVar4; bool bVar5; long *plVar6; ProducerBase *pPVar7; ProducerBase *this_00; if (((*(long *)(param_1 + 0x18) == 0) || (*(int *)(param_1 + 4) != *(int *)(this + 0x260))) && (cVar4 = update_current_producer_after_rotation(this,param_1), cVar4 == '\0')) { return false; } bVar5 = ProducerBase::dequeue<emittra::Emittra::QueuedEvent> ((ProducerBase *)(*(long *)(param_1 + 0x10) + -8),param_2); if (bVar5) { iVar1 = *(int *)(param_1 + 8); *(int *)(param_1 + 8) = iVar1 + 1; if (iVar1 + 1 == 0x100) { LOCK(); *(int *)(this + 0x260) = *(int *)(this + 0x260) + 1; UNLOCK(); } } else { pPVar2 = *(ProducerBase **)this; plVar6 = *(long **)(param_1 + 0x10); this_00 = (ProducerBase *)(*plVar6 + -8); if (*plVar6 == 0) { this_00 = pPVar2; } while( true ) { pPVar7 = (ProducerBase *)(plVar6 + -1); if (plVar6 == (long *)0x0) { pPVar7 = (ProducerBase *)0x0; } if (this_00 == pPVar7) { return false; } bVar5 = ProducerBase::dequeue<emittra::Emittra::QueuedEvent>(this_00,param_2); if (bVar5) break; lVar3 = *(long *)(this_00 + 8); this_00 = (ProducerBase *)(lVar3 + -8); if (lVar3 == 0) { this_00 = pPVar2; } plVar6 = *(long **)(param_1 + 0x10); } *(ProducerBase **)(param_1 + 0x10) = this_00 + 8; *(int4 *)(param_1 + 8) = 1; } return true; }
2,036
CLI::App::_process_config_file()
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::_process_config_file() { if(config_ptr_ != nullptr) { bool config_required = config_ptr_->get_required(); auto file_given = config_ptr_->count() > 0; auto config_files = config_ptr_->as<std::vector<std::string>>(); if(config_files.empty() || config_files.front().empty()) { if(config_required) { throw FileError::Missing("no specified config file"); } return; } for(auto rit = config_files.rbegin(); rit != config_files.rend(); ++rit) { const auto &config_file = *rit; auto path_result = detail::check_path(config_file.c_str()); if(path_result == detail::path_type::file) { try { std::vector<ConfigItem> values = config_formatter_->from_file(config_file); _parse_config(values); if(!file_given) { config_ptr_->add_result(config_file); } } catch(const FileError &) { if(config_required || file_given) throw; } } else if(config_required || file_given) { throw FileError::Missing(config_file); } } } }
O2
cpp
CLI::App::_process_config_file(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq 0x308(%rdi), %rsi testq %rsi, %rsi je 0x1ce1d movq %rdi, %rbx movb 0x20(%rsi), %r15b movq 0x220(%rsi), %rax movq %rax, 0x10(%rsp) movq 0x218(%rsi), %r12 leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x1cf1c movq (%r14), %rax movq 0x8(%r14), %r14 cmpq %r14, %rax je 0x1ce0e cmpq $0x0, 0x8(%rax) je 0x1ce0e cmpq %r12, 0x10(%rsp) setne %bpl orb %r15b, %bpl addq $-0x20, %r14 leaq 0x70(%rsp), %r15 leaq 0x20(%r14), %rcx cmpq %rax, %rcx je 0x1ce13 movq (%r14), %rdi callq 0xd7c3 cmpl $0x1, %eax jne 0x1cda4 movq 0x310(%rbx), %rsi movq %r15, %rdi movq %r14, %rdx callq 0x1cfac movq %rbx, %rdi movq %r15, %rsi callq 0x1d08a cmpq %r12, 0x10(%rsp) jne 0x1cd9a movq 0x308(%rbx), %r13 leaq 0x88(%rsp), %rdi movq %r14, %rsi callq 0x75e0 movq %r13, %rdi leaq 0x88(%rsp), %r13 movq %r13, %rsi callq 0x1aa6a movq %r13, %rdi callq 0x7860 movq %r15, %rdi callq 0x12a42 jmp 0x1cdad testb %bpl, %bpl jne 0x1ce2f movq 0x18(%rsp), %rax addq $-0x20, %r14 jmp 0x1cd2a movq %rdx, 0x8(%rsp) movq %rax, (%rsp) movq %r13, %rdi callq 0x7860 jmp 0x1cde2 movq %rdx, 0x8(%rsp) movq %rax, (%rsp) jmp 0x1cdea movq %rdx, 0x8(%rsp) movq %rax, (%rsp) movq %r15, %rdi callq 0x12a42 cmpl $0x1, 0x8(%rsp) jne 0x1cf08 movq (%rsp), %rdi callq 0x71a0 testb %bpl, %bpl jne 0x1cebc callq 0x76f0 jmp 0x1cdad testb %r15b, %r15b jne 0x1ce71 leaq 0x18(%rsp), %rdi callq 0x99ca addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x38 popq %rdi callq 0x7210 movq %rax, %rbx leaq 0x30(%rsp), %rdi movq %r14, %rsi callq 0x75e0 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %rbx, %rdi callq 0x1cf58 xorl %ebp, %ebp leaq 0x22998(%rip), %rsi # 0x3f7f8 leaq 0xdfd(%rip), %rdx # 0x1dc64 movq %rbx, %rdi callq 0x7750 jmp 0x1cec1 pushq $0x38 popq %rdi callq 0x7210 movq %rax, %rbx leaq 0xcdc8(%rip), %rsi # 0x29c4b leaq 0x50(%rsp), %rdi leaq 0x70(%rsp), %rdx callq 0x8762 movb $0x1, %bpl leaq 0x50(%rsp), %rsi movq %rbx, %rdi callq 0x1cf58 xorl %ebp, %ebp leaq 0x2294d(%rip), %rsi # 0x3f7f8 leaq 0xdb2(%rip), %rdx # 0x1dc64 movq %rbx, %rdi callq 0x7750 jmp 0x1cec1 callq 0x7630 movq %rax, (%rsp) callq 0x76f0 jmp 0x1cf08 movq %rax, %rdi callq 0xaa9f movq %rax, (%rsp) jmp 0x1cf08 movq %rax, (%rsp) leaq 0x50(%rsp), %rdi jmp 0x1cef0 jmp 0x1cefc movq %rax, (%rsp) leaq 0x30(%rsp), %rdi callq 0x7860 testb %bpl, %bpl jne 0x1cf00 jmp 0x1cf08 movq %rax, (%rsp) movq %rbx, %rdi callq 0x7360 leaq 0x18(%rsp), %rdi callq 0x99ca movq (%rsp), %rdi callq 0x7770 nop
_ZN3CLI3App20_process_config_fileEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rsi, [rdi+308h]; char * test rsi, rsi jz loc_1CE1D mov rbx, rdi mov r15b, [rsi+20h] mov rax, [rsi+220h] mov [rsp+0D8h+var_C8], rax mov r12, [rsi+218h] lea r14, [rsp+0D8h+var_C0] mov rdi, r14 call _ZNK3CLI6Option2asISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEEET_v; CLI::Option::as<std::vector<std::string>>(void) mov rax, [r14] mov r14, [r14+8] cmp rax, r14 jz loc_1CE0E cmp qword ptr [rax+8], 0 jz loc_1CE0E cmp [rsp+0D8h+var_C8], r12 setnz bpl or bpl, r15b add r14, 0FFFFFFFFFFFFFFE0h lea r15, [rsp+0D8h+var_68] loc_1CD2A: lea rcx, [r14+20h] cmp rcx, rax jz loc_1CE13 mov rdi, [r14]; this call _ZN3CLI6detail10check_pathEPKc; CLI::detail::check_path(char const*) cmp eax, 1 jnz short loc_1CDA4 mov rsi, [rbx+310h] mov rdi, r15 mov rdx, r14 call _ZNK3CLI6Config9from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Config::from_file(std::string const&) mov rdi, rbx; this mov rsi, r15 call _ZN3CLI3App13_parse_configERKSt6vectorINS_10ConfigItemESaIS2_EE; CLI::App::_parse_config(std::vector<CLI::ConfigItem> const&) cmp [rsp+0D8h+var_C8], r12 jnz short loc_1CD9A mov r13, [rbx+308h] lea rdi, [rsp+0D8h+var_50] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rdi, r13 lea r13, [rsp+0D8h+var_50] mov rsi, r13 call _ZN3CLI6Option10add_resultENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Option::add_result(std::string) mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1CD9A: mov rdi, r15 call _ZNSt6vectorIN3CLI10ConfigItemESaIS1_EED2Ev; std::vector<CLI::ConfigItem>::~vector() jmp short loc_1CDAD loc_1CDA4: test bpl, bpl jnz loc_1CE2F loc_1CDAD: mov rax, [rsp+0D8h+var_C0] add r14, 0FFFFFFFFFFFFFFE0h jmp loc_1CD2A mov [rsp+0D8h+var_D0], rdx mov [rsp+0D8h+var_D8], rax mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1CDE2 mov [rsp+0D8h+var_D0], rdx mov [rsp+0D8h+var_D8], rax jmp short loc_1CDEA mov [rsp+0D8h+var_D0], rdx mov [rsp+0D8h+var_D8], rax loc_1CDE2: mov rdi, r15 call _ZNSt6vectorIN3CLI10ConfigItemESaIS1_EED2Ev; std::vector<CLI::ConfigItem>::~vector() loc_1CDEA: cmp dword ptr [rsp+0D8h+var_D0], 1 jnz loc_1CF08 mov rdi, [rsp+0D8h+var_D8]; void * call ___cxa_begin_catch test bpl, bpl jnz loc_1CEBC call ___cxa_end_catch jmp short loc_1CDAD loc_1CE0E: test r15b, r15b jnz short loc_1CE71 loc_1CE13: lea rdi, [rsp+0D8h+var_C0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_1CE1D: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1CE2F: push 38h ; '8' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0D8h+var_A8] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov bpl, 1 lea rsi, [rsp+0D8h+var_A8] mov rdi, rbx call _ZN3CLI9FileError7MissingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FileError::Missing(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI9FileErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_1CEC1 loc_1CE71: push 38h ; '8' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aNoSpecifiedCon; "no specified config file" lea rdi, [rsp+0D8h+var_88] lea rdx, [rsp+0D8h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rsi, [rsp+0D8h+var_88] mov rdi, rbx call _ZN3CLI9FileError7MissingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FileError::Missing(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI9FileErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw
void CLI::App::_process_config_file(CLI::App *this) { _BYTE *v1; // rsi unsigned __int8 v2; // r15 long long v3; // r12 CLI::detail **v4; // rax CLI::detail **i; // r14 long long v6; // r13 void *v7; // rbx int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d void *exception; // rbx int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d long long v17; // [rsp+10h] [rbp-C8h] long long v18; // [rsp+18h] [rbp-C0h] BYREF long long v19; // [rsp+20h] [rbp-B8h] _BYTE v20[32]; // [rsp+30h] [rbp-A8h] BYREF _QWORD v21[4]; // [rsp+50h] [rbp-88h] BYREF _BYTE v22[24]; // [rsp+70h] [rbp-68h] BYREF _BYTE v23[80]; // [rsp+88h] [rbp-50h] BYREF v1 = (_BYTE *)*((_QWORD *)this + 97); if ( v1 ) { v2 = v1[32]; v17 = *((_QWORD *)v1 + 68); v3 = *((_QWORD *)v1 + 67); CLI::Option::as<std::vector<std::string>>(&v18); v4 = (CLI::detail **)v18; if ( v18 == v19 || !*(_QWORD *)(v18 + 8) ) { if ( v2 ) { exception = __cxa_allocate_exception(0x38uLL); std::string::basic_string<std::allocator<char>>(v21, (long long)"no specified config file"); CLI::FileError::Missing((_DWORD)exception, (unsigned int)v21, v13, v14, v15, v16); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::FileError, CLI::Error::~Error); } } else { for ( i = (CLI::detail **)(v19 - 32); i + 4 != v4; i -= 4 ) { if ( (unsigned int)CLI::detail::check_path(*i, v1) == 1 ) { CLI::Config::from_file(v22, *((_QWORD *)this + 98), i); v1 = v22; CLI::App::_parse_config(this); if ( v17 == v3 ) { v6 = *((_QWORD *)this + 97); std::string::basic_string(v23); v1 = v23; CLI::Option::add_result(v6, v23); std::string::~string(v23); } std::vector<CLI::ConfigItem>::~vector((long long)v22); } else if ( v2 | (v17 != v3) ) { v7 = __cxa_allocate_exception(0x38uLL); std::string::basic_string(v20); CLI::FileError::Missing((_DWORD)v7, (unsigned int)v20, v8, v9, v10, v11); __cxa_throw(v7, (struct type_info *)&`typeinfo for'CLI::FileError, CLI::Error::~Error); } v4 = (CLI::detail **)v18; } } std::vector<std::string>::~vector((long long)&v18); } }
_process_config_file: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RSI,qword ptr [RDI + 0x308] TEST RSI,RSI JZ 0x0011ce1d MOV RBX,RDI MOV R15B,byte ptr [RSI + 0x20] MOV RAX,qword ptr [RSI + 0x220] MOV qword ptr [RSP + 0x10],RAX MOV R12,qword ptr [RSI + 0x218] LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x0011cf1c MOV RAX,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] CMP RAX,R14 JZ 0x0011ce0e CMP qword ptr [RAX + 0x8],0x0 JZ 0x0011ce0e CMP qword ptr [RSP + 0x10],R12 SETNZ BPL OR BPL,R15B ADD R14,-0x20 LEA R15,[RSP + 0x70] LAB_0011cd2a: LEA RCX,[R14 + 0x20] CMP RCX,RAX JZ 0x0011ce13 MOV RDI,qword ptr [R14] CALL 0x0010d7c3 CMP EAX,0x1 JNZ 0x0011cda4 MOV RSI,qword ptr [RBX + 0x310] LAB_0011cd4b: MOV RDI,R15 MOV RDX,R14 CALL 0x0011cfac LAB_0011cd56: MOV RDI,RBX MOV RSI,R15 CALL 0x0011d08a CMP qword ptr [RSP + 0x10],R12 JNZ 0x0011cd9a MOV R13,qword ptr [RBX + 0x308] LEA RDI,[RSP + 0x88] MOV RSI,R14 CALL 0x001075e0 LAB_0011cd7f: MOV RDI,R13 LEA R13,[RSP + 0x88] MOV RSI,R13 CALL 0x0011aa6a LAB_0011cd92: MOV RDI,R13 CALL 0x00107860 LAB_0011cd9a: MOV RDI,R15 CALL 0x00112a42 JMP 0x0011cdad LAB_0011cda4: TEST BPL,BPL JNZ 0x0011ce2f LAB_0011cdad: MOV RAX,qword ptr [RSP + 0x18] ADD R14,-0x20 JMP 0x0011cd2a LAB_0011ce0e: TEST R15B,R15B JNZ 0x0011ce71 LAB_0011ce13: LEA RDI,[RSP + 0x18] CALL 0x001099ca LAB_0011ce1d: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011ce2f: PUSH 0x38 POP RDI CALL 0x00107210 MOV RBX,RAX LAB_0011ce3a: LEA RDI,[RSP + 0x30] MOV RSI,R14 CALL 0x001075e0 MOV BPL,0x1 LAB_0011ce4a: LEA RSI,[RSP + 0x30] MOV RDI,RBX CALL 0x0011cf58 XOR EBP,EBP LEA RSI,[0x13f7f8] LEA RDX,[0x11dc64] MOV RDI,RBX CALL 0x00107750 LAB_0011ce71: PUSH 0x38 POP RDI CALL 0x00107210 MOV RBX,RAX LAB_0011ce7c: LEA RSI,[0x129c4b] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x70] CALL 0x00108762 MOV BPL,0x1 LAB_0011ce95: LEA RSI,[RSP + 0x50] MOV RDI,RBX CALL 0x0011cf58 XOR EBP,EBP LEA RSI,[0x13f7f8] LEA RDX,[0x11dc64] MOV RDI,RBX CALL 0x00107750
/* CLI::App::_process_config_file() */ void __thiscall CLI::App::_process_config_file(App *this) { char cVar1; long lVar2; long lVar3; Option *pOVar4; int iVar5; FileError *pFVar6; string *psVar7; string *local_c0; string *local_b8; string local_a8 [32]; string local_88 [32]; string local_68 [24]; string local_50 [32]; lVar2 = *(long *)(this + 0x308); if (lVar2 != 0) { cVar1 = *(char *)(lVar2 + 0x20); lVar3 = *(long *)(lVar2 + 0x220); lVar2 = *(long *)(lVar2 + 0x218); Option::as<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>(); if ((local_c0 == local_b8) || (*(long *)(local_c0 + 8) == 0)) { if (cVar1 != '\0') { pFVar6 = (FileError *)__cxa_allocate_exception(0x38); /* try { // try from 0011ce7c to 0011ce91 has its CatchHandler @ 0011cee5 */ std::__cxx11::string::string<std::allocator<char>> (local_88,"no specified config file",(allocator *)local_68); /* try { // try from 0011ce95 to 0011ceb9 has its CatchHandler @ 0011ceda */ FileError::Missing(pFVar6,local_88); /* WARNING: Subroutine does not return */ __cxa_throw(pFVar6,&FileError::typeinfo,Error::~Error); } } else { while (psVar7 = local_b8 + -0x20, local_b8 != local_c0) { iVar5 = detail::check_path(*(char **)psVar7); local_b8 = psVar7; if (iVar5 == 1) { /* try { // try from 0011cd4b to 0011cd55 has its CatchHandler @ 0011cdce */ Config::from_file(local_68); /* try { // try from 0011cd56 to 0011cd7e has its CatchHandler @ 0011cdd9 */ _parse_config(this,(vector *)local_68); if (lVar3 == lVar2) { pOVar4 = *(Option **)(this + 0x308); std::__cxx11::string::string(local_50,psVar7); /* try { // try from 0011cd7f to 0011cd91 has its CatchHandler @ 0011cdbb */ Option::add_result(pOVar4,local_50); std::__cxx11::string::~string(local_50); } std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>::~vector ((vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *)local_68); } else if (lVar3 != lVar2 || cVar1 != '\0') { pFVar6 = (FileError *)__cxa_allocate_exception(0x38); /* try { // try from 0011ce3a to 0011ce46 has its CatchHandler @ 0011cefc */ std::__cxx11::string::string(local_a8,psVar7); /* try { // try from 0011ce4a to 0011ce6e has its CatchHandler @ 0011cee7 */ FileError::Missing(pFVar6,local_a8); /* WARNING: Subroutine does not return */ __cxa_throw(pFVar6,&FileError::typeinfo,Error::~Error); } } } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c0); } return; }
2,037
mbedtls_poly1305_self_test
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/poly1305.c
int mbedtls_poly1305_self_test(int verbose) { unsigned char mac[16]; unsigned i; int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; for (i = 0U; i < 2U; i++) { if (verbose != 0) { mbedtls_printf(" Poly1305 test %u ", i); } ret = mbedtls_poly1305_mac(test_keys[i], test_data[i], test_data_len[i], mac); ASSERT(0 == ret, ("error code: %i\n", ret)); ASSERT(0 == memcmp(mac, test_mac[i], 16U), ("failed (mac)\n")); if (verbose != 0) { mbedtls_printf("passed\n"); } } if (verbose != 0) { mbedtls_printf("\n"); } return 0; }
O3
c
mbedtls_poly1305_self_test: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edi, %ebx movb $0x1, %r15b movq %rsp, %r14 leaq 0x15def(%rip), %r12 # 0xb6ab0 xorl %r13d, %r13d testl %ebx, %ebx je 0xa0cd9 leaq 0x15d71(%rip), %rdi # 0xb6a40 movl %r13d, %esi xorl %eax, %eax callq 0xf070 movq %r13, %rdi shlq $0x5, %rdi leaq 0x15d89(%rip), %rax # 0xb6a70 addq %rax, %rdi movq %r13, %rsi shlq $0x7, %rsi subq %r13, %rsi leaq 0x15dd5(%rip), %rax # 0xb6ad0 addq %rax, %rsi leaq 0x15ecb(%rip), %rax # 0xb6bd0 movq (%rax,%r13,8), %rdx movq %r14, %rcx callq 0xa0c3a shlq $0x4, %r13 movdqu (%r13,%r12), %xmm0 pcmpeqb (%rsp), %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0xa0d70 testl %ebx, %ebx je 0xa0d56 leaq 0xa75d(%rip), %rdi # 0xab494 callq 0xf6b0 movl $0x1, %r13d xorl %ebp, %ebp testb $0x1, %r15b movl $0x0, %r15d jne 0xa0cc4 jmp 0xa0d87 xorl %ebp, %ebp movl $0x1, %r13d testb $0x1, %r15b movl $0x0, %r15d jne 0xa0cc4 jmp 0xa0d91 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testl %ebx, %ebx je 0xa0d91 leaq 0x15cd4(%rip), %rdi # 0xb6a54 callq 0xf6b0 jmp 0xa0d91 movl $0xa, %edi callq 0xf620 movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
mbedtls_poly1305_self_test: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, edi mov r15b, 1 mov r14, rsp lea r12, test_mac_0 xor r13d, r13d loc_A0CC4: test ebx, ebx jz short loc_A0CD9 lea rdi, aPoly1305TestU; " Poly1305 test %u " mov esi, r13d xor eax, eax call _printf loc_A0CD9: mov rdi, r13 shl rdi, 5 lea rax, test_keys_0 add rdi, rax mov rsi, r13 shl rsi, 7 sub rsi, r13 lea rax, test_data; "Cryptographic Forum Research Group" add rsi, rax lea rax, test_data_len mov rdx, [rax+r13*8] mov rcx, r14 call mbedtls_poly1305_mac shl r13, 4 movdqu xmm0, xmmword ptr [r13+r12+0] pcmpeqb xmm0, [rsp+48h+var_48] pmovmskb eax, xmm0 cmp eax, 0FFFFh jnz short loc_A0D70 test ebx, ebx jz short loc_A0D56 lea rdi, aPassed; "passed" call _puts mov r13d, 1 xor ebp, ebp test r15b, 1 mov r15d, 0 jnz loc_A0CC4 jmp short loc_A0D87 loc_A0D56: xor ebp, ebp mov r13d, 1 test r15b, 1 mov r15d, 0 jnz loc_A0CC4 jmp short loc_A0D91 loc_A0D70: mov ebp, 0FFFFFFFFh test ebx, ebx jz short loc_A0D91 lea rdi, aFailedMac; "failed (mac)" call _puts jmp short loc_A0D91 loc_A0D87: mov edi, 0Ah call _putchar loc_A0D91: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mbedtls_poly1305_self_test(int a1) { char v1; // r15 long long v2; // r13 unsigned int v3; // ebp bool v4; // zf __m128i v6[4]; // [rsp+0h] [rbp-48h] BYREF v1 = 1; v2 = 0LL; while ( 1 ) { if ( a1 ) printf(" Poly1305 test %u ", v2); mbedtls_poly1305_mac(&test_keys_0[16 * v2], &test_data[127 * v2], test_data_len[v2], (long long)v6); if ( _mm_movemask_epi8(_mm_cmpeq_epi8(_mm_loadu_si128(&test_mac_0[v2]), v6[0])) != 0xFFFF ) break; if ( a1 ) { puts("passed"); v2 = 1LL; v3 = 0; v4 = (v1 & 1) == 0; v1 = 0; if ( v4 ) { putchar(10LL); return v3; } } else { v3 = 0; v2 = 1LL; v4 = (v1 & 1) == 0; v1 = 0; if ( v4 ) return v3; } } v3 = -1; if ( a1 ) puts("failed (mac)"); return v3; }
mbedtls_poly1305_self_test: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,EDI MOV R15B,0x1 MOV R14,RSP LEA R12,[0x1b6ab0] XOR R13D,R13D LAB_001a0cc4: TEST EBX,EBX JZ 0x001a0cd9 LEA RDI,[0x1b6a40] MOV ESI,R13D XOR EAX,EAX CALL 0x0010f070 LAB_001a0cd9: MOV RDI,R13 SHL RDI,0x5 LEA RAX,[0x1b6a70] ADD RDI,RAX MOV RSI,R13 SHL RSI,0x7 SUB RSI,R13 LEA RAX,[0x1b6ad0] ADD RSI,RAX LEA RAX,[0x1b6bd0] MOV RDX,qword ptr [RAX + R13*0x8] MOV RCX,R14 CALL 0x001a0c3a SHL R13,0x4 MOVDQU XMM0,xmmword ptr [R13 + R12*0x1] PCMPEQB XMM0,xmmword ptr [RSP] PMOVMSKB EAX,XMM0 CMP EAX,0xffff JNZ 0x001a0d70 TEST EBX,EBX JZ 0x001a0d56 LEA RDI,[0x1ab494] CALL 0x0010f6b0 MOV R13D,0x1 XOR EBP,EBP TEST R15B,0x1 MOV R15D,0x0 JNZ 0x001a0cc4 JMP 0x001a0d87 LAB_001a0d56: XOR EBP,EBP MOV R13D,0x1 TEST R15B,0x1 MOV R15D,0x0 JNZ 0x001a0cc4 JMP 0x001a0d91 LAB_001a0d70: MOV EBP,0xffffffff TEST EBX,EBX JZ 0x001a0d91 LEA RDI,[0x1b6a54] CALL 0x0010f6b0 JMP 0x001a0d91 LAB_001a0d87: MOV EDI,0xa CALL 0x0010f620 LAB_001a0d91: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 mbedtls_poly1305_self_test(int param_1) { bool bVar1; bool bVar2; long lVar3; int1 auVar4 [16]; char local_48; char cStack_47; char cStack_46; char cStack_45; char cStack_44; char cStack_43; char cStack_42; char cStack_41; char cStack_40; char cStack_3f; char cStack_3e; char cStack_3d; char cStack_3c; char cStack_3b; char cStack_3a; char cStack_39; lVar3 = 0; bVar2 = true; while( true ) { if (param_1 != 0) { printf(" Poly1305 test %u ",lVar3); } mbedtls_poly1305_mac (test_keys + lVar3 * 0x20,"bCryptographic Forum Research Group" + lVar3 * 0x7f + 1, (&test_data_len)[lVar3],&local_48); lVar3 = lVar3 * 0x10; auVar4[0] = -((&test_mac)[lVar3] == local_48); auVar4[1] = -((&UNK_001b6ab1)[lVar3] == cStack_47); auVar4[2] = -((&UNK_001b6ab2)[lVar3] == cStack_46); auVar4[3] = -((&UNK_001b6ab3)[lVar3] == cStack_45); auVar4[4] = -((&UNK_001b6ab4)[lVar3] == cStack_44); auVar4[5] = -((&UNK_001b6ab5)[lVar3] == cStack_43); auVar4[6] = -((&UNK_001b6ab6)[lVar3] == cStack_42); auVar4[7] = -((&UNK_001b6ab7)[lVar3] == cStack_41); auVar4[8] = -((&UNK_001b6ab8)[lVar3] == cStack_40); auVar4[9] = -((&UNK_001b6ab9)[lVar3] == cStack_3f); auVar4[10] = -((&UNK_001b6aba)[lVar3] == cStack_3e); auVar4[0xb] = -((&UNK_001b6abb)[lVar3] == cStack_3d); auVar4[0xc] = -((&UNK_001b6abc)[lVar3] == cStack_3c); auVar4[0xd] = -((&UNK_001b6abd)[lVar3] == cStack_3b); auVar4[0xe] = -((&UNK_001b6abe)[lVar3] == cStack_3a); auVar4[0xf] = -((&UNK_001b6abf)[lVar3] == cStack_39); if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) | (ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe | (ushort)(auVar4[0xf] >> 7) << 0xf) != 0xffff) break; if (param_1 == 0) { lVar3 = 1; bVar1 = !bVar2; bVar2 = false; if (bVar1) { return 0; } } else { puts("passed"); lVar3 = 1; bVar1 = !bVar2; bVar2 = false; if (bVar1) { putchar(10); return 0; } } } if (param_1 == 0) { return 0xffffffff; } puts("failed (mac)"); return 0xffffffff; }
2,038
ulp
eloqsql/strings/dtoa.c
static double ulp(U *x) { register Long L; U u; L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1; word0(&u) = L; word1(&u) = 0; return dval(&u); }
O0
c
ulp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax andl $0x7ff00000, %eax # imm = 0x7FF00000 subl $0x3400000, %eax # imm = 0x3400000 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) movl $0x0, -0x18(%rbp) movsd -0x18(%rbp), %xmm0 popq %rbp retq
ulp: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+4] and eax, 7FF00000h sub eax, 3400000h mov [rbp+var_C], eax mov eax, [rbp+var_C] mov dword ptr [rbp+var_18+4], eax mov dword ptr [rbp+var_18], 0 movsd xmm0, [rbp+var_18] pop rbp retn
double ulp(long long a1) { double v2; // [rsp+0h] [rbp-18h] HIDWORD(v2) = (*(_DWORD *)(a1 + 4) & 0x7FF00000) - 54525952; LODWORD(v2) = 0; return v2; }
ulp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x7ff00000 SUB EAX,0x3400000 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX MOV dword ptr [RBP + -0x18],0x0 MOVSD XMM0,qword ptr [RBP + -0x18] POP RBP RET
long ulp(long param_1) { return (ulong)((*(uint *)(param_1 + 4) & 0x7ff00000) + 0xfcc00000) << 0x20; }
2,039
CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test()
seiftnesse[P]memoryallocator/tests/test_allocator.cpp
TEST_F(CustomAllocTest, VeryLargeAllocations) { std::vector<void *> large_blocks; // Try increasingly large sizes for (size_t size = 1024 * 1024; size <= 16 * 1024 * 1024; size *= 2) { void *ptr = _malloc(size); if (!ptr) { std::cout << "Failed to allocate block of size " << size << std::endl; continue; } std::cout << "Successfully allocated " << size << " bytes" << std::endl; large_blocks.push_back(ptr); // Only write to part of the memory to avoid excessive time size_t testSize = std::min(size, static_cast<size_t>(1024 * 1024)); fillMemory(ptr, testSize, 0xDD); EXPECT_TRUE(verifyPattern(ptr, testSize, 0xDD)); } // Free the blocks for (void *ptr: large_blocks) { _free(ptr); } }
O1
cpp
CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test(): pushq %rbx movq %rdi, %rbx callq 0x242c6 movl $0x10, %esi movq %rbx, %rdi popq %rbx jmp 0x94c0 nop
_ZN41CustomAllocTest_VeryLargeAllocations_TestD0Ev: push rbx mov rbx, rdi call _ZN7testing4TestD2Ev; testing::Test::~Test() mov esi, 10h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test( CustomAllocTest_VeryLargeAllocations_Test *this) { testing::Test::~Test(this); operator delete(this, 0x10uLL); }
~CustomAllocTest_VeryLargeAllocations_Test: PUSH RBX MOV RBX,RDI CALL 0x001242c6 MOV ESI,0x10 MOV RDI,RBX POP RBX JMP 0x001094c0
/* CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test() */ void __thiscall CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test (CustomAllocTest_VeryLargeAllocations_Test *this) { testing::Test::~Test((Test *)this); operator_delete(this,0x10); return; }
2,040
CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test()
seiftnesse[P]memoryallocator/tests/test_allocator.cpp
TEST_F(CustomAllocTest, VeryLargeAllocations) { std::vector<void *> large_blocks; // Try increasingly large sizes for (size_t size = 1024 * 1024; size <= 16 * 1024 * 1024; size *= 2) { void *ptr = _malloc(size); if (!ptr) { std::cout << "Failed to allocate block of size " << size << std::endl; continue; } std::cout << "Successfully allocated " << size << " bytes" << std::endl; large_blocks.push_back(ptr); // Only write to part of the memory to avoid excessive time size_t testSize = std::min(size, static_cast<size_t>(1024 * 1024)); fillMemory(ptr, testSize, 0xDD); EXPECT_TRUE(verifyPattern(ptr, testSize, 0xDD)); } // Free the blocks for (void *ptr: large_blocks) { _free(ptr); } }
O2
cpp
CustomAllocTest_VeryLargeAllocations_Test::~CustomAllocTest_VeryLargeAllocations_Test(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 xorps %xmm0, %xmm0 leaq 0x30(%rsp), %r15 movaps %xmm0, (%r15) andq $0x0, 0x10(%r15) movq 0x412fd(%rip), %r12 # 0x4cfb8 leaq 0x28(%rsp), %rbx movl $0x100000, %ebp # imm = 0x100000 cmpq $0x1000001, %rbp # imm = 0x1000001 jae 0xbe1c movq %rbp, %rdi callq 0xf89f movq %rax, 0x10(%rsp) testq %rax, %rax je 0xbdf2 movq %r12, %rdi leaq 0x24648(%rip), %rsi # 0x3033a callq 0x94b0 movq %rax, %rdi movq %rbp, %rsi callq 0x9320 movq %rax, %rdi leaq 0x24421(%rip), %rsi # 0x3012d callq 0x94b0 movq %rax, %rdi callq 0x9240 movq %r15, %rdi leaq 0x10(%rsp), %rsi callq 0xdad8 movl $0x100000, %eax # imm = 0x100000 cmpq %rax, %rbp movl $0x100000, %r13d # imm = 0x100000 cmovbq %rbp, %r13 movq 0x10(%rsp), %rdi movl $0xdd, %esi movq %r13, %rdx callq 0x92c0 movq 0x10(%rsp), %rsi movq %r14, %rdi movq %r13, %rdx movl $0xdd, %ecx callq 0xd818 movb %al, 0x18(%rsp) andq $0x0, 0x20(%rsp) testb %al, %al jne 0xbde6 leaq 0x8(%rsp), %rdi callq 0x183bc leaq 0x48(%rsp), %rdi leaq 0x18(%rsp), %rsi leaq 0x245ca(%rip), %rdx # 0x30352 leaq 0x24366(%rip), %rcx # 0x300f5 leaq 0x24365(%rip), %r8 # 0x300fb callq 0x147f9 movq 0x48(%rsp), %r8 movq %rbx, %rdi pushq $0x1 popq %rsi leaq 0x242b3(%rip), %rdx # 0x30060 movl $0x171, %ecx # imm = 0x171 callq 0x16396 movq %rbx, %rdi leaq 0x8(%rsp), %rsi callq 0x1491c movq %rbx, %rdi callq 0x163f6 leaq 0x48(%rsp), %rdi callq 0x9af8 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xbde6 movq (%rdi), %rax callq *0x8(%rax) leaq 0x20(%rsp), %rdi callq 0xdf40 jmp 0xbe14 movq %r12, %rdi leaq 0x2451c(%rip), %rsi # 0x30318 callq 0x94b0 movq %rax, %rdi movq %rbp, %rsi callq 0x9320 movq %rax, %rdi callq 0x9240 addq %rbp, %rbp jmp 0xbcc5 movq 0x30(%rsp), %rbx movq 0x38(%rsp), %r14 cmpq %r14, %rbx je 0xbe39 movq (%rbx), %rdi callq 0xf987 addq $0x8, %rbx jmp 0xbe26 leaq 0x30(%rsp), %rdi callq 0xef88 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0xbe88 movq %rax, %rbx jmp 0xbe78 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x163f6 jmp 0xbe6e movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x9af8 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xbe88 movq (%rdi), %rax callq *0x8(%rax) leaq 0x20(%rsp), %rdi callq 0xdf40 jmp 0xbe99 jmp 0xbe96 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0xef88 movq %rbx, %rdi callq 0x99d0 nop
_ZN41CustomAllocTest_VeryLargeAllocations_Test8TestBodyEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdi xorps xmm0, xmm0 lea r15, [rsp+98h+var_68] movaps xmmword ptr [r15], xmm0 and qword ptr [r15+10h], 0 mov r12, cs:_ZSt4cout_ptr lea rbx, [rsp+98h+var_70] mov ebp, offset unk_100000 loc_BCC5: cmp rbp, offset unk_1000001 jnb loc_BE1C mov rdi, rbp call _malloc mov [rsp+98h+var_88], rax test rax, rax jz loc_BDF2 mov rdi, r12 lea rsi, aSuccessfullyAl; "Successfully allocated " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, rbp call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rdi, rax lea rsi, aBytes; " bytes" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov rdi, r15 lea rsi, [rsp+98h+var_88] call _ZNSt6vectorIPvSaIS0_EE9push_backERKS0_; std::vector<void *>::push_back(void * const&) mov eax, offset unk_100000 cmp rbp, rax mov r13d, offset unk_100000 cmovb r13, rbp mov rdi, [rsp+98h+var_88] mov esi, 0DDh mov rdx, r13 call _memset mov rsi, [rsp+98h+var_88]; void * mov rdi, r14; this mov rdx, r13; unsigned __int64 mov ecx, 0DDh; unsigned __int8 call _ZN15CustomAllocTest13verifyPatternEPvmh; CustomAllocTest::verifyPattern(void *,ulong,uchar) mov [rsp+98h+var_80], al and [rsp+98h+var_78], 0 test al, al jnz short loc_BDE6 lea rdi, [rsp+98h+var_90]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) lea rdi, [rsp+98h+var_50] lea rsi, [rsp+98h+var_80] lea rdx, aVerifypatternP_0; "verifyPattern(ptr, testSize, 0xDD)" lea rcx, aFalse; "false" lea r8, aTrue; "true" call _ZN7testing8internal30GetBoolAssertionFailureMessageB5cxx11ERKNS_15AssertionResultEPKcS5_S5_; testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&,char const*,char const*,char const*) mov r8, [rsp+98h+var_50] mov rdi, rbx push 1 pop rsi lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov ecx, 171h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) mov rdi, rbx lea rsi, [rsp+98h+var_90] call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) mov rdi, rbx; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+98h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+98h+var_90] test rdi, rdi jz short loc_BDE6 mov rax, [rdi] call qword ptr [rax+8] loc_BDE6: lea rdi, [rsp+98h+var_78] call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr() jmp short loc_BE14 loc_BDF2: mov rdi, r12 lea rsi, aFailedToAlloca; "Failed to allocate block of size " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, rbp call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) loc_BE14: add rbp, rbp jmp loc_BCC5 loc_BE1C: mov rbx, [rsp+98h+var_68] mov r14, [rsp+98h+var_60] loc_BE26: cmp rbx, r14 jz short loc_BE39 mov rdi, [rbx] call _free add rbx, 8 jmp short loc_BE26 loc_BE39: lea rdi, [rsp+98h+var_68] call _ZNSt12_Vector_baseIPvSaIS0_EED2Ev; std::_Vector_base<void *>::~_Vector_base() add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_BE88 mov rbx, rax jmp short loc_BE78 mov rbx, rax lea rdi, [rsp+arg_20]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() jmp short loc_BE6E mov rbx, rax loc_BE6E: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_BE78: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_BE88 mov rax, [rdi] call qword ptr [rax+8] loc_BE88: lea rdi, [rsp+arg_18] call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr() jmp short loc_BE99 jmp short $+2 loc_BE96: mov rbx, rax loc_BE99: lea rdi, [rsp+arg_28] call _ZNSt12_Vector_baseIPvSaIS0_EED2Ev; std::_Vector_base<void *>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
long long CustomAllocTest_VeryLargeAllocations_Test::TestBody( CustomAllocTest_VeryLargeAllocations_Test *this, long long *a2) { unsigned long long i; // rbp long long v3; // rax long long v4; // rax long long v5; // rax void *v6; // r13 int v7; // r9d int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // rax long long v13; // rax _QWORD *j; // rbx _QWORD *v15; // r14 long long v17; // [rsp+0h] [rbp-98h] long long v18; // [rsp+8h] [rbp-90h] BYREF void *v19; // [rsp+10h] [rbp-88h] BYREF char v20; // [rsp+18h] [rbp-80h] BYREF long long v21; // [rsp+20h] [rbp-78h] BYREF _BYTE v22[8]; // [rsp+28h] [rbp-70h] BYREF __int128 v23; // [rsp+30h] [rbp-68h] BYREF long long v24; // [rsp+40h] [rbp-58h] _QWORD v25[10]; // [rsp+48h] [rbp-50h] BYREF v23 = 0LL; v24 = 0LL; for ( i = (unsigned long long)&unk_100000; i < (unsigned long long)&unk_1000001; i *= 2LL ) { v19 = (void *)malloc(i); if ( v19 ) { v3 = std::operator<<<std::char_traits<char>>(&std::cout, "Successfully allocated "); v4 = std::ostream::_M_insert<unsigned long>(v3, i); v5 = std::operator<<<std::char_traits<char>>(v4, " bytes"); std::endl<char,std::char_traits<char>>(v5); std::vector<void *>::push_back(&v23, &v19); v6 = &unk_100000; if ( i < (unsigned long long)&unk_100000 ) v6 = (void *)i; memset(v19, 221LL, v6); a2 = (long long *)v19; v20 = CustomAllocTest::verifyPattern(this, v19, (unsigned long long)v6, 0xDDu); v21 = 0LL; if ( !v20 ) { testing::Message::Message((testing::Message *)&v18); testing::internal::GetBoolAssertionFailureMessage[abi:cxx11]( (unsigned int)v25, (unsigned int)&v20, (unsigned int)"verifyPattern(ptr, testSize, 0xDD)", (unsigned int)"false", (unsigned int)"true", v7, v17); testing::internal::AssertHelper::AssertHelper( v22, 1LL, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/tests/test_allocator.cpp", 369LL, v25[0]); a2 = &v18; testing::internal::AssertHelper::operator=((unsigned int)v22, (unsigned int)&v18, v8, v9, v10, v11); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v22); std::string::~string(v25); if ( v18 ) (*(void ( **)(long long))(*(_QWORD *)v18 + 8LL))(v18); } std::unique_ptr<std::string>::~unique_ptr(&v21); } else { v12 = std::operator<<<std::char_traits<char>>(&std::cout, "Failed to allocate block of size "); a2 = (long long *)i; v13 = std::ostream::_M_insert<unsigned long>(v12, i); std::endl<char,std::char_traits<char>>(v13); } } v15 = (_QWORD *)*((_QWORD *)&v23 + 1); for ( j = (_QWORD *)v23; j != v15; ++j ) free(*j, a2); return std::_Vector_base<void *>::~_Vector_base(&v23); }
TestBody: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDI XORPS XMM0,XMM0 LEA R15,[RSP + 0x30] MOVAPS xmmword ptr [R15],XMM0 AND qword ptr [R15 + 0x10],0x0 MOV R12,qword ptr [0x0014cfb8] LEA RBX,[RSP + 0x28] MOV EBP,0x100000 LAB_0010bcc5: CMP RBP,0x1000001 JNC 0x0010be1c LAB_0010bcd2: MOV RDI,RBP CALL 0x0010f89f MOV qword ptr [RSP + 0x10],RAX TEST RAX,RAX JZ 0x0010bdf2 MOV RDI,R12 LEA RSI,[0x13033a] CALL 0x001094b0 MOV RDI,RAX MOV RSI,RBP CALL 0x00109320 MOV RDI,RAX LEA RSI,[0x13012d] CALL 0x001094b0 MOV RDI,RAX CALL 0x00109240 MOV RDI,R15 LEA RSI,[RSP + 0x10] CALL 0x0010dad8 LAB_0010bd26: MOV EAX,0x100000 CMP RBP,RAX MOV R13D,0x100000 CMOVC R13,RBP MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0xdd MOV RDX,R13 CALL 0x001092c0 MOV RSI,qword ptr [RSP + 0x10] MOV RDI,R14 MOV RDX,R13 MOV ECX,0xdd CALL 0x0010d818 MOV byte ptr [RSP + 0x18],AL AND qword ptr [RSP + 0x20],0x0 TEST AL,AL JNZ 0x0010bde6 LAB_0010bd6d: LEA RDI,[RSP + 0x8] CALL 0x001183bc LAB_0010bd77: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x18] LEA RDX,[0x130352] LEA RCX,[0x1300f5] LEA R8,[0x1300fb] CALL 0x001147f9 MOV R8,qword ptr [RSP + 0x48] LAB_0010bda0: MOV RDI,RBX PUSH 0x1 POP RSI LEA RDX,[0x130060] MOV ECX,0x171 CALL 0x00116396 LAB_0010bdb7: MOV RDI,RBX LEA RSI,[RSP + 0x8] CALL 0x0011491c LAB_0010bdc4: MOV RDI,RBX CALL 0x001163f6 LEA RDI,[RSP + 0x48] CALL 0x00109af8 MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010bde6 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010bde6: LEA RDI,[RSP + 0x20] CALL 0x0010df40 JMP 0x0010be14 LAB_0010bdf2: MOV RDI,R12 LEA RSI,[0x130318] CALL 0x001094b0 MOV RDI,RAX MOV RSI,RBP CALL 0x00109320 MOV RDI,RAX CALL 0x00109240 LAB_0010be14: ADD RBP,RBP JMP 0x0010bcc5 LAB_0010be1c: MOV RBX,qword ptr [RSP + 0x30] MOV R14,qword ptr [RSP + 0x38] LAB_0010be26: CMP RBX,R14 JZ 0x0010be39 MOV RDI,qword ptr [RBX] LAB_0010be2e: CALL 0x0010f987 LAB_0010be33: ADD RBX,0x8 JMP 0x0010be26 LAB_0010be39: LEA RDI,[RSP + 0x30] CALL 0x0010ef88 ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CustomAllocTest_VeryLargeAllocations_Test::TestBody() */ void __thiscall CustomAllocTest_VeryLargeAllocations_Test::TestBody(CustomAllocTest_VeryLargeAllocations_Test *this) { int *puVar1; int8 *puVar2; ostream *poVar3; int8 *puVar4; ulong uVar5; size_t __n; long *local_90; void *local_88; AssertionResult local_80 [8]; int8 local_78; AssertHelper local_70 [8]; int8 *local_68; int8 *puStack_60; int8 local_58; int8 local_50 [4]; puVar1 = PTR_cout_0014cfb8; local_68 = (int8 *)0x0; puStack_60 = (int8 *)0x0; local_58 = 0; for (uVar5 = 0x100000; puVar2 = puStack_60, puVar4 = local_68, uVar5 < 0x1000001; uVar5 = uVar5 * 2) { /* try { // try from 0010bcd2 to 0010bd25 has its CatchHandler @ 0010be96 */ local_88 = (void *)_malloc(uVar5); if (local_88 == (void *)0x0) { /* try { // try from 0010bdf2 to 0010be13 has its CatchHandler @ 0010be96 */ poVar3 = std::operator<<((ostream *)puVar1,"Failed to allocate block of size "); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::endl<char,std::char_traits<char>>(poVar3); } else { poVar3 = std::operator<<((ostream *)puVar1,"Successfully allocated "); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); poVar3 = std::operator<<(poVar3," bytes"); std::endl<char,std::char_traits<char>>(poVar3); std::vector<void*,std::allocator<void*>>::push_back ((vector<void*,std::allocator<void*>> *)&local_68,&local_88); __n = 0x100000; if (uVar5 < 0x100000) { __n = uVar5; } memset(local_88,0xdd,__n); local_80[0] = (AssertionResult) CustomAllocTest::verifyPattern((CustomAllocTest *)this,local_88,__n,0xdd); local_78 = 0; if (local_80[0] == (AssertionResult)0x0) { /* try { // try from 0010bd6d to 0010bd76 has its CatchHandler @ 0010be52 */ testing::Message::Message((Message *)&local_90); /* try { // try from 0010bd77 to 0010bd9a has its CatchHandler @ 0010be57 */ testing::internal::GetBoolAssertionFailureMessage_abi_cxx11_ ((internal *)local_50,local_80,"verifyPattern(ptr, testSize, 0xDD)","false","true" ); /* try { // try from 0010bda0 to 0010bdb6 has its CatchHandler @ 0010be6b */ testing::internal::AssertHelper::AssertHelper (local_70,1, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/tests/test_allocator.cpp" ,0x171,local_50[0]); /* try { // try from 0010bdb7 to 0010bdc3 has its CatchHandler @ 0010be5c */ testing::internal::AssertHelper::operator=(local_70,(Message *)&local_90); testing::internal::AssertHelper::~AssertHelper(local_70); std::__cxx11::string::~string((string *)local_50); if (local_90 != (long *)0x0) { (**(code **)(*local_90 + 8))(); } } std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr ((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *) &local_78); } } for (; puVar4 != puVar2; puVar4 = puVar4 + 1) { /* try { // try from 0010be2e to 0010be32 has its CatchHandler @ 0010be94 */ _free(*puVar4); } std::_Vector_base<void*,std::allocator<void*>>::~_Vector_base ((_Vector_base<void*,std::allocator<void*>> *)&local_68); return; }
2,041
LefDefParser::defrData::upperCase(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defrData.cpp
const char* defrData::upperCase(const char* str) { const static char defiShift [] = { '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'l', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0' }; char* place = (char*)str; char* to; int len = strlen(str) + 1; if (len > shiftBufLength) { if (shiftBuf == 0) { len = len < 64 ? 64 : len; shiftBuf = (char*)malloc(len); shiftBufLength = len; } else { free(shiftBuf); shiftBuf = (char*)malloc(len); shiftBufLength = len; } } to = shiftBuf; while (*place) { int i = (int)*place; place++; *to++ = defiShift[i]; } *to = '\0'; return shiftBuf; }
O3
cpp
LefDefParser::defrData::upperCase(char const*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x60d0 movq %rax, %r15 incl %r15d movq 0x60(%rbx), %rax cmpl 0x19c(%rbx), %r15d jle 0x2dcca testq %rax, %rax je 0x2dcaa movq %rax, %rdi callq 0x6220 movslq %r15d, %rdi jmp 0x2dcba cmpl $0x41, %r15d movl $0x40, %edi cmovgel %r15d, %edi movl %edi, %r15d callq 0x6270 movq %rax, 0x60(%rbx) movl %r15d, 0x19c(%rbx) movb (%r14), %cl testb %cl, %cl je 0x2dcf1 incq %r14 leaq 0x1b6c5(%rip), %rdx # 0x493a0 movsbq %cl, %rcx movb (%rcx,%rdx), %cl movb %cl, (%rax) incq %rax movb (%r14), %cl incq %r14 testb %cl, %cl jne 0x2dcdb movb $0x0, (%rax) movq 0x60(%rbx), %rax popq %rbx popq %r14 popq %r15 retq
_ZN12LefDefParser8defrData9upperCaseEPKc: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov rdi, rsi call _strlen mov r15, rax inc r15d mov rax, [rbx+60h] cmp r15d, [rbx+19Ch] jle short loc_2DCCA test rax, rax jz short loc_2DCAA mov rdi, rax call _free movsxd rdi, r15d jmp short loc_2DCBA loc_2DCAA: cmp r15d, 41h ; 'A' mov edi, 40h ; '@' cmovge edi, r15d mov r15d, edi loc_2DCBA: call _malloc mov [rbx+60h], rax mov [rbx+19Ch], r15d loc_2DCCA: mov cl, [r14] test cl, cl jz short loc_2DCF1 inc r14 lea rdx, _ZZN12LefDefParser8defrData9upperCaseEPKcE9defiShift; LefDefParser::defrData::upperCase(char const*)::defiShift loc_2DCDB: movsx rcx, cl mov cl, [rcx+rdx] mov [rax], cl inc rax mov cl, [r14] inc r14 test cl, cl jnz short loc_2DCDB loc_2DCF1: mov byte ptr [rax], 0 mov rax, [rbx+60h] pop rbx pop r14 pop r15 retn
long long LefDefParser::defrData::upperCase(LefDefParser::defrData *this, const char *a2) { int v3; // r15d _BYTE *v4; // rax long long v5; // rdi char v6; // cl const char *v7; // r14 v3 = strlen(a2) + 1; v4 = (_BYTE *)*((_QWORD *)this + 12); if ( v3 > *((_DWORD *)this + 103) ) { if ( v4 ) { free(*((_QWORD *)this + 12)); v5 = v3; } else { v5 = 64LL; if ( v3 >= 65 ) v5 = (unsigned int)v3; v3 = v5; } v4 = (_BYTE *)malloc(v5); *((_QWORD *)this + 12) = v4; *((_DWORD *)this + 103) = v3; } v6 = *a2; if ( *a2 ) { v7 = a2 + 1; do { *v4++ = LefDefParser::defrData::upperCase(char const*)::defiShift[v6]; v6 = *v7++; } while ( v6 ); } *v4 = 0; return *((_QWORD *)this + 12); }
upperCase: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x001060d0 MOV R15,RAX INC R15D MOV RAX,qword ptr [RBX + 0x60] CMP R15D,dword ptr [RBX + 0x19c] JLE 0x0012dcca TEST RAX,RAX JZ 0x0012dcaa MOV RDI,RAX CALL 0x00106220 MOVSXD RDI,R15D JMP 0x0012dcba LAB_0012dcaa: CMP R15D,0x41 MOV EDI,0x40 CMOVGE EDI,R15D MOV R15D,EDI LAB_0012dcba: CALL 0x00106270 MOV qword ptr [RBX + 0x60],RAX MOV dword ptr [RBX + 0x19c],R15D LAB_0012dcca: MOV CL,byte ptr [R14] TEST CL,CL JZ 0x0012dcf1 INC R14 LEA RDX,[0x1493a0] LAB_0012dcdb: MOVSX RCX,CL MOV CL,byte ptr [RCX + RDX*0x1] MOV byte ptr [RAX],CL INC RAX MOV CL,byte ptr [R14] INC R14 TEST CL,CL JNZ 0x0012dcdb LAB_0012dcf1: MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBX + 0x60] POP RBX POP R14 POP R15 RET
/* LefDefParser::defrData::upperCase(char const*) */ int8 __thiscall LefDefParser::defrData::upperCase(defrData *this,char *param_1) { size_t sVar1; int1 *__ptr; char cVar2; char *pcVar3; uint uVar4; sVar1 = strlen(param_1); uVar4 = (int)sVar1 + 1; __ptr = *(int1 **)(this + 0x60); if (*(int *)(this + 0x19c) < (int)uVar4) { if (__ptr == (int1 *)0x0) { sVar1 = 0x40; if (0x40 < (int)uVar4) { sVar1 = (size_t)uVar4; } uVar4 = (uint)sVar1; } else { free(__ptr); sVar1 = (size_t)(int)uVar4; } __ptr = (int1 *)malloc(sVar1); *(int1 **)(this + 0x60) = __ptr; *(uint *)(this + 0x19c) = uVar4; } cVar2 = *param_1; if (cVar2 != '\0') { pcVar3 = param_1 + 1; do { *__ptr = (&upperCase(char_const*)::defiShift)[cVar2]; __ptr = __ptr + 1; cVar2 = *pcVar3; pcVar3 = pcVar3 + 1; } while (cVar2 != '\0'); } *__ptr = 0; return *(int8 *)(this + 0x60); }
2,042
free
seiftnesse[P]memoryallocator/src/custom_alloc_core.c
void _free(void *ptr) { HEAP_LOG("Free request for pointer: %p\n", ptr); if (!ptr) { HEAP_LOG("Ignoring free request for NULL pointer\n"); return; } // Check if this is a small allocation if (is_small_allocation(ptr)) { free_small(ptr); return; } segment_t *s = PtrToSegment(ptr); if (!s) { HEAP_LOG("Invalid pointer for free: %p (not a valid segment)\n", ptr); return; } check_memory_corruption(s); // Perform more comprehensive corruption check verify_segment_integrity(s, 1); // Guard against double-free if (s->is_free) { HEAP_LOG("WARNING: Attempted double-free detected for pointer: %p\n", ptr); return; } HEAP_LOG("Freeing segment: %p, size=%d blocks, id=%u\n", s, s->size, s->allocation_id); if (zero_on_free_depth > ZERO_DEPTH_NONE) { void *user_ptr = SegmentToPtr(s); size_t total_size = s->size * BLOCK_SIZE; size_t user_data_offset = (char *) user_ptr - (char *) s; size_t user_data_size = total_size - user_data_offset; if (user_data_size > 0) { size_t zero_size = 0; switch (zero_on_free_depth) { case ZERO_DEPTH_SHALLOW: // Zero only the first portion (headers/pointers) zero_size = (shallow_zero_size < user_data_size) ? shallow_zero_size : user_data_size; break; case ZERO_DEPTH_MEDIUM: // Zero half the memory zero_size = user_data_size / 2; break; case ZERO_DEPTH_DEEP: default: // Zero all memory (most secure, but slowest) zero_size = user_data_size; break; } if (zero_size > 0) { HEAP_LOG("Zeroing %zu bytes on free at %p (depth=%d)\n", zero_size, user_ptr, zero_on_free_depth); _memset(user_ptr, 0, zero_size); } } } // Update statistics update_stats_free(s->size * BLOCK_SIZE); // Mark as free and update cache s->is_free = 1; last_free_segment = s; // Try to merge with adjacent segments if (s->next && s->next->is_free) { HEAP_LOG("Merging with next segment: %p\n", s->next); s = MergeSegment(s, s->next); } if (s->prev && s->prev->is_free) { HEAP_LOG("Merging with previous segment: %p\n", s->prev); s = MergeSegment(s->prev, s); } last_free_segment = s; HEAP_LOG("Free completed, last_free_segment updated to %p\n", s); }
O0
c
free: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x2d68 jmp 0x2f33 movq -0x8(%rbp), %rdi callq 0x37f0 cmpl $0x0, %eax je 0x2d84 movq -0x8(%rbp), %rdi callq 0x35a0 jmp 0x2f33 movq -0x8(%rbp), %rdi callq 0x3c60 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x2d9d jmp 0x2f33 movq -0x10(%rbp), %rdi callq 0x48d0 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x3f20 movq -0x10(%rbp), %rax cmpl $0x0, (%rax) je 0x2dc2 jmp 0x2f33 leaq 0x410635f(%rip), %rax # 0x4109128 cmpl $0x0, (%rax) jle 0x2ea7 movq -0x10(%rbp), %rdi callq 0x3c00 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x4(%rax), %eax shll $0xc, %eax cltq movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax subq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jbe 0x2ea5 movq $0x0, -0x38(%rbp) leaq 0x4106304(%rip), %rax # 0x4109128 movl (%rax), %eax movl %eax, -0x3c(%rbp) subl $0x1, %eax je 0x2e44 jmp 0x2e30 movl -0x3c(%rbp), %eax subl $0x2, %eax je 0x2e76 jmp 0x2e3a movl -0x3c(%rbp), %eax subl $0x3, %eax je 0x2e83 jmp 0x2e85 leaq 0x526d(%rip), %rax # 0x80b8 movq (%rax), %rax cmpq -0x30(%rbp), %rax jae 0x2e64 leaq 0x525d(%rip), %rax # 0x80b8 movq (%rax), %rax movq %rax, -0x48(%rbp) jmp 0x2e6c movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x2e8d movq -0x30(%rbp), %rax shrq %rax movq %rax, -0x38(%rbp) jmp 0x2e8d jmp 0x2e85 movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jbe 0x2ea3 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rdx xorl %esi, %esi callq 0x43e0 jmp 0x2ea5 jmp 0x2ea7 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax shll $0xc, %eax movslq %eax, %rdi callq 0x4700 movq -0x10(%rbp), %rax movl $0x1, (%rax) movq -0x10(%rbp), %rax movq %rax, 0x520a(%rip) # 0x80d8 movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x2efb movq -0x10(%rbp), %rax movq 0x8(%rax), %rax cmpl $0x0, (%rax) je 0x2efb movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x3b20 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x2f28 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax cmpl $0x0, (%rax) je 0x2f28 movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi movq -0x10(%rbp), %rsi callq 0x3b20 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, 0x51a5(%rip) # 0x80d8 addq $0x50, %rsp popq %rbp retq nopl (%rax)
_free: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jnz short loc_2D68 jmp loc_2F33 loc_2D68: mov rdi, [rbp+var_8] call is_small_allocation cmp eax, 0 jz short loc_2D84 mov rdi, [rbp+var_8] call free_small jmp loc_2F33 loc_2D84: mov rdi, [rbp+var_8] call PtrToSegment mov [rbp+var_10], rax cmp [rbp+var_10], 0 jnz short loc_2D9D jmp loc_2F33 loc_2D9D: mov rdi, [rbp+var_10] call check_memory_corruption mov rdi, [rbp+var_10] mov esi, 1 call verify_segment_integrity mov rax, [rbp+var_10] cmp dword ptr [rax], 0 jz short loc_2DC2 jmp loc_2F33 loc_2DC2: lea rax, zero_on_free_depth cmp dword ptr [rax], 0 jle loc_2EA7 mov rdi, [rbp+var_10] call SegmentToPtr mov [rbp+var_18], rax mov rax, [rbp+var_10] mov eax, [rax+4] shl eax, 0Ch cdqe mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_20] sub rax, [rbp+var_28] mov [rbp+var_30], rax cmp [rbp+var_30], 0 jbe loc_2EA5 mov [rbp+var_38], 0 lea rax, zero_on_free_depth mov eax, [rax] mov [rbp+var_3C], eax sub eax, 1 jz short loc_2E44 jmp short $+2 loc_2E30: mov eax, [rbp+var_3C] sub eax, 2 jz short loc_2E76 jmp short $+2 loc_2E3A: mov eax, [rbp+var_3C] sub eax, 3 jz short loc_2E83 jmp short loc_2E85 loc_2E44: lea rax, shallow_zero_size mov rax, [rax] cmp rax, [rbp+var_30] jnb short loc_2E64 lea rax, shallow_zero_size mov rax, [rax] mov [rbp+var_48], rax jmp short loc_2E6C loc_2E64: mov rax, [rbp+var_30] mov [rbp+var_48], rax loc_2E6C: mov rax, [rbp+var_48] mov [rbp+var_38], rax jmp short loc_2E8D loc_2E76: mov rax, [rbp+var_30] shr rax, 1 mov [rbp+var_38], rax jmp short loc_2E8D loc_2E83: jmp short $+2 loc_2E85: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_2E8D: cmp [rbp+var_38], 0 jbe short loc_2EA3 mov rdi, [rbp+var_18] mov rdx, [rbp+var_38] xor esi, esi call _memset loc_2EA3: jmp short $+2 loc_2EA5: jmp short $+2 loc_2EA7: mov rax, [rbp+var_10] mov eax, [rax+4] shl eax, 0Ch movsxd rdi, eax call update_stats_free mov rax, [rbp+var_10] mov dword ptr [rax], 1 mov rax, [rbp+var_10] mov cs:last_free_segment, rax mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_2EFB mov rax, [rbp+var_10] mov rax, [rax+8] cmp dword ptr [rax], 0 jz short loc_2EFB mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax+8] call MergeSegment mov [rbp+var_10], rax loc_2EFB: mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jz short loc_2F28 mov rax, [rbp+var_10] mov rax, [rax+10h] cmp dword ptr [rax], 0 jz short loc_2F28 mov rax, [rbp+var_10] mov rdi, [rax+10h] mov rsi, [rbp+var_10] call MergeSegment mov [rbp+var_10], rax loc_2F28: mov rax, [rbp+var_10] mov cs:last_free_segment, rax loc_2F33: add rsp, 50h pop rbp retn
void free(long long a1) { int *v1; // [rsp+8h] [rbp-48h] int *v2; // [rsp+18h] [rbp-38h] unsigned long long v3; // [rsp+20h] [rbp-30h] long long v4; // [rsp+38h] [rbp-18h] long long v5; // [rsp+40h] [rbp-10h] if ( a1 ) { if ( (unsigned int)is_small_allocation(a1) ) { free_small(a1); } else { v5 = PtrToSegment(a1); if ( v5 ) { check_memory_corruption(v5); verify_segment_integrity(v5, 1LL); if ( !*(_DWORD *)v5 ) { if ( zero_on_free_depth > 0 ) { v4 = SegmentToPtr(v5); v3 = (int)(*(_DWORD *)(v5 + 4) << 12) - (v4 - v5); if ( v3 ) { if ( zero_on_free_depth == 1 ) { v1 = (unsigned long long)shallow_zero_size >= v3 ? (int *)((int)(*(_DWORD *)(v5 + 4) << 12) - (v4 - v5)) : shallow_zero_size; v2 = v1; } else { v2 = (int *)(zero_on_free_depth == 2 ? v3 >> 1 : (int)(*(_DWORD *)(v5 + 4) << 12) - (v4 - v5)); } if ( v2 ) memset(v4, 0LL, v2); } } update_stats_free((int)(*(_DWORD *)(v5 + 4) << 12)); *(_DWORD *)v5 = 1; last_free_segment = v5; if ( *(_QWORD *)(v5 + 8) && **(_DWORD **)(v5 + 8) ) v5 = MergeSegment(v5, *(_QWORD *)(v5 + 8)); if ( *(_QWORD *)(v5 + 16) ) { if ( **(_DWORD **)(v5 + 16) ) v5 = MergeSegment(*(_QWORD *)(v5 + 16), v5); } last_free_segment = v5; } } } } }
_free: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00102d68 JMP 0x00102f33 LAB_00102d68: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001037f0 CMP EAX,0x0 JZ 0x00102d84 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001035a0 JMP 0x00102f33 LAB_00102d84: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00103c60 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00102d9d JMP 0x00102f33 LAB_00102d9d: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001048d0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00103f20 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x0 JZ 0x00102dc2 JMP 0x00102f33 LAB_00102dc2: LEA RAX,[0x4209128] CMP dword ptr [RAX],0x0 JLE 0x00102ea7 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00103c00 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] SHL EAX,0xc CDQE MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] SUB RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JBE 0x00102ea5 MOV qword ptr [RBP + -0x38],0x0 LEA RAX,[0x4209128] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX SUB EAX,0x1 JZ 0x00102e44 JMP 0x00102e30 LAB_00102e30: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x2 JZ 0x00102e76 JMP 0x00102e3a LAB_00102e3a: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x3 JZ 0x00102e83 JMP 0x00102e85 LAB_00102e44: LEA RAX,[0x1080b8] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00102e64 LEA RAX,[0x1080b8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX JMP 0x00102e6c LAB_00102e64: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX LAB_00102e6c: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX JMP 0x00102e8d LAB_00102e76: MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00102e8d LAB_00102e83: JMP 0x00102e85 LAB_00102e85: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_00102e8d: CMP qword ptr [RBP + -0x38],0x0 JBE 0x00102ea3 MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x38] XOR ESI,ESI CALL 0x001043e0 LAB_00102ea3: JMP 0x00102ea5 LAB_00102ea5: JMP 0x00102ea7 LAB_00102ea7: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] SHL EAX,0xc MOVSXD RDI,EAX CALL 0x00104700 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x001080d8],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00102efb MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] CMP dword ptr [RAX],0x0 JZ 0x00102efb MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00103b20 MOV qword ptr [RBP + -0x10],RAX LAB_00102efb: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00102f28 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] CMP dword ptr [RAX],0x0 JZ 0x00102f28 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00103b20 MOV qword ptr [RBP + -0x10],RAX LAB_00102f28: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x001080d8],RAX LAB_00102f33: ADD RSP,0x50 POP RBP RET
void _free(void *__ptr) { int iVar1; long lVar2; ulong local_50; ulong local_40; int *local_18; if (__ptr != (void *)0x0) { iVar1 = is_small_allocation(__ptr); if (iVar1 == 0) { local_18 = (int *)PtrToSegment(__ptr); if (local_18 != (int *)0x0) { check_memory_corruption(local_18); verify_segment_integrity(local_18,1); if (*local_18 == 0) { if (0 < zero_on_free_depth) { lVar2 = SegmentToPtr(local_18); local_50 = (long)(local_18[1] << 0xc) - (lVar2 - (long)local_18); if (local_50 != 0) { if (zero_on_free_depth == 1) { if (shallow_zero_size < local_50) { local_50 = shallow_zero_size; } local_40 = local_50; } else { local_40 = local_50; if (zero_on_free_depth == 2) { local_40 = local_50 >> 1; } } if (local_40 != 0) { _memset(lVar2,0,local_40); } } } update_stats_free((long)(local_18[1] << 0xc)); *local_18 = 1; last_free_segment = local_18; if ((*(long *)(local_18 + 2) != 0) && (**(int **)(local_18 + 2) != 0)) { local_18 = (int *)MergeSegment(local_18,*(int8 *)(local_18 + 2)); } if ((*(long *)(local_18 + 4) != 0) && (**(int **)(local_18 + 4) != 0)) { local_18 = (int *)MergeSegment(*(int8 *)(local_18 + 4),local_18); } last_free_segment = local_18; } } } else { free_small(__ptr); } } return; }
2,043
free
seiftnesse[P]memoryallocator/src/custom_alloc_core.c
void _free(void *ptr) { HEAP_LOG("Free request for pointer: %p\n", ptr); if (!ptr) { HEAP_LOG("Ignoring free request for NULL pointer\n"); return; } // Check if this is a small allocation if (is_small_allocation(ptr)) { free_small(ptr); return; } segment_t *s = PtrToSegment(ptr); if (!s) { HEAP_LOG("Invalid pointer for free: %p (not a valid segment)\n", ptr); return; } check_memory_corruption(s); // Perform more comprehensive corruption check verify_segment_integrity(s, 1); // Guard against double-free if (s->is_free) { HEAP_LOG("WARNING: Attempted double-free detected for pointer: %p\n", ptr); return; } HEAP_LOG("Freeing segment: %p, size=%d blocks, id=%u\n", s, s->size, s->allocation_id); if (zero_on_free_depth > ZERO_DEPTH_NONE) { void *user_ptr = SegmentToPtr(s); size_t total_size = s->size * BLOCK_SIZE; size_t user_data_offset = (char *) user_ptr - (char *) s; size_t user_data_size = total_size - user_data_offset; if (user_data_size > 0) { size_t zero_size = 0; switch (zero_on_free_depth) { case ZERO_DEPTH_SHALLOW: // Zero only the first portion (headers/pointers) zero_size = (shallow_zero_size < user_data_size) ? shallow_zero_size : user_data_size; break; case ZERO_DEPTH_MEDIUM: // Zero half the memory zero_size = user_data_size / 2; break; case ZERO_DEPTH_DEEP: default: // Zero all memory (most secure, but slowest) zero_size = user_data_size; break; } if (zero_size > 0) { HEAP_LOG("Zeroing %zu bytes on free at %p (depth=%d)\n", zero_size, user_ptr, zero_on_free_depth); _memset(user_ptr, 0, zero_size); } } } // Update statistics update_stats_free(s->size * BLOCK_SIZE); // Mark as free and update cache s->is_free = 1; last_free_segment = s; // Try to merge with adjacent segments if (s->next && s->next->is_free) { HEAP_LOG("Merging with next segment: %p\n", s->next); s = MergeSegment(s, s->next); } if (s->prev && s->prev->is_free) { HEAP_LOG("Merging with previous segment: %p\n", s->prev); s = MergeSegment(s->prev, s); } last_free_segment = s; HEAP_LOG("Free completed, last_free_segment updated to %p\n", s); }
O3
c
free: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x21e0 movq %rdi, %rbx callq 0x2673 movq %rbx, %rdi testl %eax, %eax je 0x2104 addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2536 callq 0x283c testq %rax, %rax je 0x21e0 movq %rax, %rbx movq %rax, %rdi callq 0x2ee8 movq %rbx, %rdi movl $0x1, %esi callq 0x295e cmpl $0x0, (%rbx) jne 0x21e0 leaq 0x4103ffe(%rip), %r14 # 0x4106138 cmpl $0x0, (%r14) jle 0x218d movq %rbx, %rdi callq 0x282c movslq 0x4(%rbx), %rcx shlq $0xc, %rcx movq %rbx, %rdx subq %rax, %rdx addq %rcx, %rdx je 0x218d movl (%r14), %ecx cmpl $0x2, %ecx je 0x217b cmpl $0x1, %ecx jne 0x2183 leaq 0x2f51(%rip), %rcx # 0x50c0 movq (%rcx), %rcx cmpq %rdx, %rcx cmovbq %rcx, %rdx jmp 0x217e shrq %rdx testq %rdx, %rdx je 0x218d movq %rax, %rdi xorl %esi, %esi callq 0x2c1a movslq 0x4(%rbx), %rdi shlq $0xc, %rdi callq 0x2e27 movl $0x1, (%rbx) movq %rbx, 0x2f41(%rip) # 0x50e8 movq 0x8(%rbx), %rsi testq %rsi, %rsi je 0x21c0 cmpl $0x0, (%rsi) je 0x21c0 movq %rbx, %rdi callq 0x27b4 movq %rax, %rbx movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x21d9 cmpl $0x0, (%rdi) je 0x21d9 movq %rbx, %rsi callq 0x27b4 movq %rax, %rbx movq %rbx, 0x2f08(%rip) # 0x50e8 addq $0x8, %rsp popq %rbx popq %r14 retq
_free: push r14 push rbx push rax test rdi, rdi jz loc_21E0 mov rbx, rdi call is_small_allocation mov rdi, rbx test eax, eax jz short loc_2104 add rsp, 8 pop rbx pop r14 jmp free_small loc_2104: call PtrToSegment test rax, rax jz loc_21E0 mov rbx, rax mov rdi, rax call check_memory_corruption mov rdi, rbx mov esi, 1 call verify_segment_integrity cmp dword ptr [rbx], 0 jnz loc_21E0 lea r14, zero_on_free_depth cmp dword ptr [r14], 0 jle short loc_218D mov rdi, rbx call SegmentToPtr movsxd rcx, dword ptr [rbx+4] shl rcx, 0Ch mov rdx, rbx sub rdx, rax add rdx, rcx jz short loc_218D mov ecx, [r14] cmp ecx, 2 jz short loc_217B cmp ecx, 1 jnz short loc_2183 lea rcx, shallow_zero_size mov rcx, [rcx] cmp rcx, rdx cmovb rdx, rcx jmp short loc_217E loc_217B: shr rdx, 1 loc_217E: test rdx, rdx jz short loc_218D loc_2183: mov rdi, rax xor esi, esi call _memset loc_218D: movsxd rdi, dword ptr [rbx+4] shl rdi, 0Ch call update_stats_free mov dword ptr [rbx], 1 mov cs:last_free_segment, rbx mov rsi, [rbx+8] test rsi, rsi jz short loc_21C0 cmp dword ptr [rsi], 0 jz short loc_21C0 mov rdi, rbx call MergeSegment mov rbx, rax loc_21C0: mov rdi, [rbx+10h] test rdi, rdi jz short loc_21D9 cmp dword ptr [rdi], 0 jz short loc_21D9 mov rsi, rbx call MergeSegment mov rbx, rax loc_21D9: mov cs:last_free_segment, rbx loc_21E0: add rsp, 8 pop rbx pop r14 retn
long long free(long long a1) { long long result; // rax long long v2; // rbx long long v3; // rax unsigned long long v4; // rdx _DWORD *v5; // rsi _DWORD *v6; // rdi if ( a1 ) { if ( (unsigned int)is_small_allocation(a1) ) return free_small(); result = PtrToSegment(a1); if ( result ) { v2 = result; check_memory_corruption(result); result = verify_segment_integrity(v2, 1LL); if ( !*(_DWORD *)v2 ) { if ( zero_on_free_depth <= 0 ) goto LABEL_16; v3 = SegmentToPtr(v2); v4 = ((long long)*(int *)(v2 + 4) << 12) + v2 - v3; if ( !v4 ) goto LABEL_16; if ( zero_on_free_depth == 2 ) { v4 >>= 1; } else { if ( zero_on_free_depth != 1 ) { LABEL_15: memset(v3, 0LL, v4); LABEL_16: result = update_stats_free((long long)*(int *)(v2 + 4) << 12); *(_DWORD *)v2 = 1; last_free_segment = v2; v5 = *(_DWORD **)(v2 + 8); if ( v5 && *v5 ) { result = MergeSegment(v2); v2 = result; } v6 = *(_DWORD **)(v2 + 16); if ( v6 ) { if ( *v6 ) { result = MergeSegment(v6); v2 = result; } } last_free_segment = v2; return result; } if ( (unsigned long long)shallow_zero_size < v4 ) v4 = (unsigned long long)shallow_zero_size; } if ( !v4 ) goto LABEL_16; goto LABEL_15; } } } return result; }
_free: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x001021e0 MOV RBX,RDI CALL 0x00102673 MOV RDI,RBX TEST EAX,EAX JZ 0x00102104 ADD RSP,0x8 POP RBX POP R14 JMP 0x00102536 LAB_00102104: CALL 0x0010283c TEST RAX,RAX JZ 0x001021e0 MOV RBX,RAX MOV RDI,RAX CALL 0x00102ee8 MOV RDI,RBX MOV ESI,0x1 CALL 0x0010295e CMP dword ptr [RBX],0x0 JNZ 0x001021e0 LEA R14,[0x4206138] CMP dword ptr [R14],0x0 JLE 0x0010218d MOV RDI,RBX CALL 0x0010282c MOVSXD RCX,dword ptr [RBX + 0x4] SHL RCX,0xc MOV RDX,RBX SUB RDX,RAX ADD RDX,RCX JZ 0x0010218d MOV ECX,dword ptr [R14] CMP ECX,0x2 JZ 0x0010217b CMP ECX,0x1 JNZ 0x00102183 LEA RCX,[0x1050c0] MOV RCX,qword ptr [RCX] CMP RCX,RDX CMOVC RDX,RCX JMP 0x0010217e LAB_0010217b: SHR RDX,0x1 LAB_0010217e: TEST RDX,RDX JZ 0x0010218d LAB_00102183: MOV RDI,RAX XOR ESI,ESI CALL 0x00102c1a LAB_0010218d: MOVSXD RDI,dword ptr [RBX + 0x4] SHL RDI,0xc CALL 0x00102e27 MOV dword ptr [RBX],0x1 MOV qword ptr [0x001050e8],RBX MOV RSI,qword ptr [RBX + 0x8] TEST RSI,RSI JZ 0x001021c0 CMP dword ptr [RSI],0x0 JZ 0x001021c0 MOV RDI,RBX CALL 0x001027b4 MOV RBX,RAX LAB_001021c0: MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x001021d9 CMP dword ptr [RDI],0x0 JZ 0x001021d9 MOV RSI,RBX CALL 0x001027b4 MOV RBX,RAX LAB_001021d9: MOV qword ptr [0x001050e8],RBX LAB_001021e0: ADD RSP,0x8 POP RBX POP R14 RET
void _free(void *__ptr) { int *piVar1; int iVar2; int *piVar3; long lVar4; ulong uVar5; if (__ptr == (void *)0x0) { return; } iVar2 = is_small_allocation(); if (iVar2 != 0) { free_small(); return; } piVar3 = (int *)PtrToSegment(__ptr); if (piVar3 == (int *)0x0) { return; } check_memory_corruption(piVar3); verify_segment_integrity(piVar3,1); if (*piVar3 != 0) { return; } if (zero_on_free_depth < 1) goto LAB_0010218d; lVar4 = SegmentToPtr(piVar3); uVar5 = (long)piVar3 + ((long)piVar3[1] * 0x1000 - lVar4); if (uVar5 == 0) goto LAB_0010218d; if (zero_on_free_depth == 2) { uVar5 = uVar5 >> 1; LAB_0010217e: if (uVar5 == 0) goto LAB_0010218d; } else if (zero_on_free_depth == 1) { if (shallow_zero_size < uVar5) { uVar5 = shallow_zero_size; } goto LAB_0010217e; } _memset(lVar4,0); LAB_0010218d: update_stats_free((long)piVar3[1] << 0xc); *piVar3 = 1; last_free_segment = piVar3; if ((*(int **)(piVar3 + 2) != (int *)0x0) && (**(int **)(piVar3 + 2) != 0)) { piVar3 = (int *)MergeSegment(piVar3); } piVar1 = *(int **)(piVar3 + 4); if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) { piVar3 = (int *)MergeSegment(piVar1,piVar3); } last_free_segment = piVar3; return; }
2,044
LefDefParser::defrSetLimitPerMsg(int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defrReader.cpp
void defrSetLimitPerMsg(int msgId, int numMsg) { DEF_INIT; char msgStr[10]; if ((msgId <= 0) || ((msgId - 5000) >= NODEFMSG)) { // Def starts at 5000 sprintf(msgStr, "%d", msgId); return; } defContext.settings->MsgLimit[msgId - 5000] = numMsg; return; }
O0
cpp
LefDefParser::defrSetLimitPerMsg(int, int): subq $0x18, %rsp movl %edi, 0x14(%rsp) movl %esi, 0x10(%rsp) leaq 0x51bd5(%rip), %rdi # 0x74018 callq 0x1e090 cmpl $0x0, 0x14(%rsp) jle 0x2245f movl 0x14(%rsp), %eax subl $0x1388, %eax # imm = 0x1388 cmpl $0xfad, %eax # imm = 0xFAD jl 0x22478 leaq 0x6(%rsp), %rdi movl 0x14(%rsp), %edx leaq 0x4edd9(%rip), %rsi # 0x71248 movb $0x0, %al callq 0x7060 jmp 0x2249a movl 0x10(%rsp), %edx leaq 0x70e6d(%rip), %rax # 0x932f0 movq (%rax), %rax movl 0x14(%rsp), %ecx subl $0x1388, %ecx # imm = 0x1388 movslq %ecx, %rcx movl %edx, 0x378(%rax,%rcx,4) addq $0x18, %rsp retq nop
_ZN12LefDefParser18defrSetLimitPerMsgEii: sub rsp, 18h mov [rsp+18h+var_4], edi mov [rsp+18h+var_8], esi lea rdi, aDefrsetlimitpe; "defrSetLimitPerMsg" call _ZN12LefDefParser8def_initEPKc; LefDefParser::def_init(char const*) cmp [rsp+18h+var_4], 0 jle short loc_2245F mov eax, [rsp+18h+var_4] sub eax, 1388h cmp eax, 0FADh jl short loc_22478 loc_2245F: lea rdi, [rsp+18h+var_12] mov edx, [rsp+18h+var_4] lea rsi, aAntennapinpart_0+1Fh; "%d" mov al, 0 call _sprintf jmp short loc_2249A loc_22478: mov edx, [rsp+18h+var_8] lea rax, _ZN12LefDefParser10defContextE; LefDefParser::defContext mov rax, [rax] mov ecx, [rsp+18h+var_4] sub ecx, 1388h movsxd rcx, ecx mov [rax+rcx*4+378h], edx loc_2249A: add rsp, 18h retn
long long LefDefParser::defrSetLimitPerMsg(LefDefParser *this, const char *a2) { long long result; // rax _BYTE v3[10]; // [rsp+6h] [rbp-12h] BYREF int v4; // [rsp+10h] [rbp-8h] int v5; // [rsp+14h] [rbp-4h] v5 = (int)this; v4 = (int)a2; LefDefParser::def_init((LefDefParser *)"defrSetLimitPerMsg", a2); if ( (int)this <= 0 || v5 - 5000 >= 4013 ) return sprintf(v3, "%d", v5); result = LefDefParser::defContext[0]; *(_DWORD *)(LefDefParser::defContext[0] + 4LL * (v5 - 5000) + 888) = v4; return result; }
defrSetLimitPerMsg: SUB RSP,0x18 MOV dword ptr [RSP + 0x14],EDI MOV dword ptr [RSP + 0x10],ESI LEA RDI,[0x174018] CALL 0x0011e090 CMP dword ptr [RSP + 0x14],0x0 JLE 0x0012245f MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x1388 CMP EAX,0xfad JL 0x00122478 LAB_0012245f: LEA RDI,[RSP + 0x6] MOV EDX,dword ptr [RSP + 0x14] LEA RSI,[0x171248] MOV AL,0x0 CALL 0x00107060 JMP 0x0012249a LAB_00122478: MOV EDX,dword ptr [RSP + 0x10] LEA RAX,[0x1932f0] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0x14] SUB ECX,0x1388 MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4 + 0x378],EDX LAB_0012249a: ADD RSP,0x18 RET
/* LefDefParser::defrSetLimitPerMsg(int, int) */ void LefDefParser::defrSetLimitPerMsg(int param_1,int param_2) { char local_12 [10]; int local_8; uint local_4; local_8 = param_2; local_4 = param_1; def_init("defrSetLimitPerMsg"); if (((int)local_4 < 1) || (0xfac < (int)(local_4 - 5000))) { sprintf(local_12,"%d",(ulong)local_4); } else { *(int *)(defContext + 0x378 + (long)(int)(local_4 - 5000) * 4) = local_8; } return; }
2,045
js_module_loader
bluesky950520[P]quickjs/quickjs-libc.c
JSModuleDef *js_module_loader(JSContext *ctx, const char *module_name, void *opaque) { JSModuleDef *m; if (js__has_suffix(module_name, QJS_NATIVE_MODULE_SUFFIX)) { m = js_module_loader_so(ctx, module_name); } else { size_t buf_len; uint8_t *buf; JSValue func_val; buf = js_load_file(ctx, &buf_len, module_name); if (!buf) { JS_ThrowReferenceError(ctx, "could not load module filename '%s'", module_name); return NULL; } /* compile the module */ func_val = JS_Eval(ctx, (char *)buf, buf_len, module_name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY); js_free(ctx, buf); if (JS_IsException(func_val)) return NULL; /* XXX: could propagate the exception */ js_module_set_import_meta(ctx, func_val, TRUE, FALSE); /* the module is already referenced, so we must free it */ m = JS_VALUE_GET_PTR(func_val); JS_FreeValue(ctx, func_val); } return m; }
O0
c
js_module_loader: subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movq %rdx, 0x48(%rsp) movq 0x50(%rsp), %rdi leaq 0xf8e6b(%rip), %rsi # 0x10929a callq 0x1e2c0 cmpl $0x0, %eax je 0x10452 movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x10560 movq %rax, 0x40(%rsp) jmp 0x10546 movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rdx leaq 0x38(%rsp), %rsi callq 0xfed0 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x104a3 movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rdx leaq 0xf8e54(%rip), %rsi # 0x1092d8 movb $0x0, %al callq 0x2d3f0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq $0x0, 0x60(%rsp) jmp 0x10550 movq 0x58(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq 0x50(%rsp), %rcx movl $0x21, %r8d callq 0x4ad00 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x20(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x58(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x21db0 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x1050c movq $0x0, 0x60(%rsp) jmp 0x10550 movq 0x58(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movl $0x1, %ecx xorl %r8d, %r8d callq 0x10070 movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x23c90 movq 0x40(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax addq $0x68, %rsp retq nopw (%rax,%rax)
js_module_loader: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi mov [rsp+68h+var_20], rdx mov rdi, [rsp+68h+var_18] lea rsi, aSo; ".so" call js__has_suffix cmp eax, 0 jz short loc_10452 mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_18] call js_module_loader_so mov [rsp+68h+var_28], rax jmp loc_10546 loc_10452: mov rdi, [rsp+68h+var_10] mov rdx, [rsp+68h+var_18] lea rsi, [rsp+68h+var_30] call js_load_file mov [rsp+68h+var_38], rax cmp [rsp+68h+var_38], 0 jnz short loc_104A3 mov rdi, [rsp+68h+var_10] mov rdx, [rsp+68h+var_18] lea rsi, aCouldNotLoadMo; "could not load module filename '%s'" mov al, 0 call JS_ThrowReferenceError mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], rdx mov [rsp+68h+var_8], 0 jmp loc_10550 loc_104A3: mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_38] mov rdx, [rsp+68h+var_30] mov rcx, [rsp+68h+var_18] mov r8d, 21h ; '!' call JS_Eval mov [rsp+68h+var_68], rax mov [rsp+68h+var_60], rdx mov rax, [rsp+68h+var_68] mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_60] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_38] call js_free mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] call JS_IsException_0 cmp eax, 0 jz short loc_1050C mov [rsp+68h+var_8], 0 jmp short loc_10550 loc_1050C: mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_48] mov rdx, [rsp+68h+var_40] mov ecx, 1 xor r8d, r8d call js_module_set_import_meta mov rax, [rsp+68h+var_48] mov [rsp+68h+var_28], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_48] mov rdx, [rsp+68h+var_40] call JS_FreeValue loc_10546: mov rax, [rsp+68h+var_28] mov [rsp+68h+var_8], rax loc_10550: mov rax, [rsp+68h+var_8] add rsp, 68h retn
long long js_module_loader(long long a1, long long a2, long long a3) { int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // rdx long long v8; // [rsp+0h] [rbp-68h] long long v9; // [rsp+28h] [rbp-40h] long long v10; // [rsp+30h] [rbp-38h] long long v11; // [rsp+38h] [rbp-30h] BYREF long long v12; // [rsp+40h] [rbp-28h] long long v13; // [rsp+48h] [rbp-20h] long long v14; // [rsp+50h] [rbp-18h] long long v15; // [rsp+58h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; if ( (unsigned int)js__has_suffix(a2, ".so") ) return js_module_loader_so(v15, v14); v10 = js_load_file(v15, &v11, v14); if ( v10 ) { v8 = JS_Eval(v15, v10, v11, v14, 33LL); v9 = v6; js_free(v15, v10); if ( !JS_IsException_0(v8, v9) ) { js_module_set_import_meta(v15, v8, v9, 1, 0); v12 = v8; JS_FreeValue(v15, v8, v9); return v12; } return 0LL; } else { JS_ThrowReferenceError(v15, (unsigned int)"could not load module filename '%s'", v14, v3, v4, v5); return 0LL; } }
js_module_loader: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x48],RDX MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x20929a] CALL 0x0011e2c0 CMP EAX,0x0 JZ 0x00110452 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00110560 MOV qword ptr [RSP + 0x40],RAX JMP 0x00110546 LAB_00110452: MOV RDI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x50] LEA RSI,[RSP + 0x38] CALL 0x0010fed0 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x001104a3 MOV RDI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x50] LEA RSI,[0x2092d8] MOV AL,0x0 CALL 0x0012d3f0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x60],0x0 JMP 0x00110550 LAB_001104a3: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x50] MOV R8D,0x21 CALL 0x0014ad00 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00121db0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00110390 CMP EAX,0x0 JZ 0x0011050c MOV qword ptr [RSP + 0x60],0x0 JMP 0x00110550 LAB_0011050c: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV ECX,0x1 XOR R8D,R8D CALL 0x00110070 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] CALL 0x00123c90 LAB_00110546: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x60],RAX LAB_00110550: MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int8 js_module_loader(int8 param_1,int8 param_2,int8 param_3) { int iVar1; long lVar2; int8 uVar3; int8 uVar4; int1 auVar5 [16]; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int8 local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; iVar1 = js__has_suffix(param_2,&DAT_0020929a); if (iVar1 == 0) { lVar2 = js_load_file(local_10,&local_30,local_18); if (lVar2 == 0) { JS_ThrowReferenceError(local_10,"could not load module filename \'%s\'",local_18); return 0; } auVar5 = JS_Eval(local_10,lVar2,local_30,local_18,0x21); uVar4 = auVar5._8_8_; uVar3 = auVar5._0_8_; js_free(local_10,lVar2); iVar1 = JS_IsException(uVar3,uVar4); if (iVar1 != 0) { return 0; } js_module_set_import_meta(local_10,uVar3,uVar4,1,0); local_28 = uVar3; JS_FreeValue(local_10,uVar3,uVar4); } else { local_28 = js_module_loader_so(local_10,local_18); } return local_28; }
2,046
js_module_loader
bluesky950520[P]quickjs/quickjs-libc.c
JSModuleDef *js_module_loader(JSContext *ctx, const char *module_name, void *opaque) { JSModuleDef *m; if (js__has_suffix(module_name, QJS_NATIVE_MODULE_SUFFIX)) { m = js_module_loader_so(ctx, module_name); } else { size_t buf_len; uint8_t *buf; JSValue func_val; buf = js_load_file(ctx, &buf_len, module_name); if (!buf) { JS_ThrowReferenceError(ctx, "could not load module filename '%s'", module_name); return NULL; } /* compile the module */ func_val = JS_Eval(ctx, (char *)buf, buf_len, module_name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY); js_free(ctx, buf); if (JS_IsException(func_val)) return NULL; /* XXX: could propagate the exception */ js_module_set_import_meta(ctx, func_val, TRUE, FALSE); /* the module is already referenced, so we must free it */ m = JS_VALUE_GET_PTR(func_val); JS_FreeValue(ctx, func_val); } return m; }
O2
c
js_module_loader: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x72851(%rip), %rsi # 0x8221a movq %r14, %rdi callq 0x15b53 testl %eax, %eax je 0xfa83 pushq $0x2f popq %rsi movq %r14, %rdi callq 0xe280 movq %r14, %r15 testq %rax, %rax jne 0xfa24 movq %r14, %rdi callq 0xe250 leaq 0x3(%rax), %rsi movq %rbx, %rdi callq 0x17214 testq %rax, %rax je 0xfb1c movq %rax, %r15 movb $0x0, 0x2(%rax) movw $0x2f2e, (%rax) # imm = 0x2F2E movq %rax, %rdi addq $0x2, %rdi movq %r14, %rsi callq 0xe110 pushq $0x2 popq %rsi movq %r15, %rdi callq 0xe540 movq %rax, %r12 cmpq %r14, %r15 je 0xfa42 movq %rbx, %rdi movq %r15, %rsi callq 0x1726e testq %r12, %r12 je 0xfae7 leaq 0x72f76(%rip), %rsi # 0x829c8 movq %r12, %rdi callq 0xe860 testq %rax, %rax je 0xfb21 movq %rbx, %rdi movq %r14, %rsi callq *%rax movq %rax, %r15 testq %rax, %rax jne 0xfb40 leaq 0x72f97(%rip), %rsi # 0x82a15 jmp 0xfb28 movq %rsp, %rsi movq %rbx, %rdi movq %r14, %rdx callq 0xf70c testq %rax, %rax je 0xfb08 movq %rax, %r12 movq (%rsp), %rdx pushq $0x21 popq %r8 movq %rbx, %rdi movq %rax, %rsi movq %r14, %rcx callq 0x29a09 movq %rax, %r15 movq %rdx, %r14 movq %rbx, %rdi movq %r12, %rsi callq 0x1726e cmpl $0x6, %r14d je 0xfb1c pushq $0x1 popq %rcx movq %rbx, %rdi movq %r15, %rsi xorl %r8d, %r8d callq 0xf818 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e jmp 0xfb40 callq 0xe050 leaq 0x72e9b(%rip), %rsi # 0x8298e xorl %r15d, %r15d movq %rbx, %rdi movq %r14, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x1c6df jmp 0xfb40 leaq 0x72749(%rip), %rsi # 0x82258 movq %rbx, %rdi movq %r14, %rdx xorl %eax, %eax callq 0x1c6df xorl %r15d, %r15d jmp 0xfb40 leaq 0x72eaf(%rip), %rsi # 0x829d7 xorl %r15d, %r15d movq %rbx, %rdi movq %r14, %rdx xorl %eax, %eax callq 0x1c6df movq %r12, %rdi callq 0xe960 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_module_loader: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi lea rsi, aSo; ".so" mov rdi, r14 call js__has_suffix test eax, eax jz loc_FA83 push 2Fh ; '/' pop rsi mov rdi, r14 call _strchr mov r15, r14 test rax, rax jnz short loc_FA24 mov rdi, r14 call _strlen lea rsi, [rax+3] mov rdi, rbx call js_malloc test rax, rax jz loc_FB1C mov r15, rax mov byte ptr [rax+2], 0 mov word ptr [rax], 2F2Eh mov rdi, rax add rdi, 2 mov rsi, r14 call _strcpy loc_FA24: push 2 pop rsi mov rdi, r15 call _dlopen mov r12, rax cmp r15, r14 jz short loc_FA42 mov rdi, rbx mov rsi, r15 call js_free loc_FA42: test r12, r12 jz loc_FAE7 lea rsi, aJsInitModule; "js_init_module" mov rdi, r12 call _dlsym test rax, rax jz loc_FB21 mov rdi, rbx mov rsi, r14 call rax mov r15, rax test rax, rax jnz loc_FB40 lea rsi, aCouldNotLoadMo_0; "could not load module filename '%s': in"... jmp loc_FB28 loc_FA83: mov rsi, rsp mov rdi, rbx mov rdx, r14 call js_load_file test rax, rax jz short loc_FB08 mov r12, rax mov rdx, [rsp+28h+var_28] push 21h ; '!' pop r8 mov rdi, rbx mov rsi, rax mov rcx, r14 call JS_Eval mov r15, rax mov r14, rdx mov rdi, rbx mov rsi, r12 call js_free cmp r14d, 6 jz short loc_FB1C push 1 pop rcx mov rdi, rbx mov rsi, r15 xor r8d, r8d call js_module_set_import_meta mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue jmp short loc_FB40 loc_FAE7: call _dlerror lea rsi, aCouldNotLoadMo_1; "could not load module filename '%s' as "... xor r15d, r15d mov rdi, rbx mov rdx, r14 mov rcx, rax xor eax, eax call JS_ThrowReferenceError jmp short loc_FB40 loc_FB08: lea rsi, aCouldNotLoadMo; "could not load module filename '%s'" mov rdi, rbx mov rdx, r14 xor eax, eax call JS_ThrowReferenceError loc_FB1C: xor r15d, r15d jmp short loc_FB40 loc_FB21: lea rsi, aCouldNotLoadMo_2; "could not load module filename '%s': js"... loc_FB28: xor r15d, r15d mov rdi, rbx mov rdx, r14 xor eax, eax call JS_ThrowReferenceError mov rdi, r12 call _dlclose loc_FB40: mov rax, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_module_loader(long long a1, long long a2) { long long v2; // rax int v3; // r14d long long v5; // r15 long long v6; // rax char *v7; // rax long long v8; // rdi long long v9; // r12 long long ( *v10)(long long, long long); // rax int v11; // ecx int v12; // r8d int v13; // r9d long long v14; // r15 const char *v15; // rsi long long file; // rax int v17; // ecx int v18; // r8d int v19; // r9d long long v20; // r12 long long v21; // rdx long long v22; // r14 long long v23; // rdx int v24; // eax int v25; // r8d int v26; // r9d long long v28[5]; // [rsp+0h] [rbp-28h] BYREF v28[0] = v2; v3 = a2; if ( !(unsigned int)js__has_suffix(a2, ".so") ) { file = js_load_file(a1, v28, a2); if ( file ) { v20 = file; v14 = JS_Eval(a1, file, v28[0], a2, 33LL); v22 = v21; js_free(a1, v20); if ( (_DWORD)v22 != 6 ) { js_module_set_import_meta(a1, v14, v23, 1, 0); JS_FreeValue(a1, v14, v22); return v14; } } else { JS_ThrowReferenceError(a1, (unsigned int)"could not load module filename '%s'", a2, v17, v18, v19); } return 0LL; } v5 = a2; if ( strchr(a2, 47LL) ) goto LABEL_5; v6 = strlen(a2); v7 = (char *)js_malloc(a1, v6 + 3); if ( !v7 ) return 0LL; v5 = (long long)v7; strcpy(v7, "./"); strcpy(v7 + 2, a2); LABEL_5: v8 = v5; v9 = dlopen(v5, 2LL); if ( v5 != a2 ) { v8 = a1; js_free(a1, v5); } if ( v9 ) { v10 = (long long ( *)(long long, long long))dlsym(v9, "js_init_module"); if ( !v10 ) { v15 = "could not load module filename '%s': js_init_module not found"; goto LABEL_18; } v14 = v10(a1, a2); if ( !v14 ) { v15 = "could not load module filename '%s': initialization error"; LABEL_18: v14 = 0LL; JS_ThrowReferenceError(a1, (_DWORD)v15, v3, v11, v12, v13); dlclose(v9); } } else { v24 = dlerror(v8); v14 = 0LL; JS_ThrowReferenceError( a1, (unsigned int)"could not load module filename '%s' as shared library: %s", a2, v24, v25, v26); } return v14; }
re_parse_error: SUB RSP,0xd8 MOV R10,RSI LEA RSI,[RSP + 0x20] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0017fa0e MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_0017fa0e: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RSP + 0xe0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RCX],RAX ADD RDI,0xa0 MOV ESI,0x80 MOV RDX,R10 CALL 0x001111a0 ADD RSP,0xd8 RET
void re_parse_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long param_9,char *param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 local_d8; int1 *local_d0; int1 *local_c8; int1 local_b8 [16]; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int8 local_18; local_c8 = local_b8; if (in_AL != '\0') { local_88 = param_1; local_78 = param_2; local_68 = param_3; local_58 = param_4; local_48 = param_5; local_38 = param_6; local_28 = param_7; local_18 = param_8; } local_d0 = &stack0x00000008; local_d8 = 0x3000000010; local_a8 = param_11; local_a0 = param_12; local_98 = param_13; local_90 = param_14; vsnprintf((char *)(param_9 + 0xa0),0x80,param_10,&local_d8); return; }
2,047
mysql_get_timeout_value
eloqsql/libmariadb/libmariadb/mariadb_lib.c
unsigned int STDCALL mysql_get_timeout_value(const MYSQL *mysql) { unsigned int timeout= 0; if (mysql->options.extension && mysql->options.extension->async_context) timeout= mysql->options.extension->async_context->timeout_value; /* Avoid overflow. */ if (timeout > UINT_MAX - 999) return (timeout - 1)/1000 + 1; else return (timeout+999)/1000; }
O0
c
mysql_get_timeout_value: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x1db94 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x1db94 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movl 0x10(%rax), %eax movl %eax, -0x14(%rbp) cmpl $0xfffffc18, -0x14(%rbp) # imm = 0xFFFFFC18 jbe 0x1dbb4 movl -0x14(%rbp), %eax subl $0x1, %eax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divl %ecx addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x1dbc8 movl -0x14(%rbp), %eax addl $0x3e7, %eax # imm = 0x3E7 movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divl %ecx movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
mysql_get_timeout_value: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_1DB94 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_1DB94 mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+28h] mov eax, [rax+10h] mov [rbp+var_14], eax loc_1DB94: cmp [rbp+var_14], 0FFFFFC18h jbe short loc_1DBB4 mov eax, [rbp+var_14] sub eax, 1 mov ecx, 3E8h xor edx, edx div ecx add eax, 1 mov [rbp+var_4], eax jmp short loc_1DBC8 loc_1DBB4: mov eax, [rbp+var_14] add eax, 3E7h mov ecx, 3E8h xor edx, edx div ecx mov [rbp+var_4], eax loc_1DBC8: mov eax, [rbp+var_4] pop rbp retn
long long mysql_get_timeout_value(long long a1) { unsigned int v2; // [rsp+0h] [rbp-14h] v2 = 0; if ( *(_QWORD *)(a1 + 1152) && *(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) ) v2 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 16LL); if ( v2 <= 0xFFFFFC18 ) return (v2 + 999) / 0x3E8; else return (v2 - 1) / 0x3E8 + 1; }
mysql_get_timeout_value: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0011db94 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0011db94 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x14],EAX LAB_0011db94: CMP dword ptr [RBP + -0x14],0xfffffc18 JBE 0x0011dbb4 MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV ECX,0x3e8 XOR EDX,EDX DIV ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0011dbc8 LAB_0011dbb4: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x3e7 MOV ECX,0x3e8 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x4],EAX LAB_0011dbc8: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint mysql_get_timeout_value(long param_1) { int4 local_1c; int4 local_c; local_1c = 0; if ((*(long *)(param_1 + 0x480) != 0) && (*(long *)(*(long *)(param_1 + 0x480) + 0x28) != 0)) { local_1c = *(uint *)(*(long *)(*(long *)(param_1 + 0x480) + 0x28) + 0x10); } if (local_1c < 0xfffffc19) { local_c = (local_1c + 999) / 1000; } else { local_c = (local_1c - 1) / 1000 + 1; } return local_c; }
2,048
google::protobuf::RepeatedField<long>::Add()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
inline Element* RepeatedField<Element>::Add() { uint32_t size = current_size_; if (static_cast<int>(size) == total_size_) Reserve(total_size_ + 1); auto ptr = &elements()[size]; current_size_ = size + 1; return ptr; }
O0
c
google::protobuf::RepeatedField<long>::Add(): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x8(%rsp) movl (%rcx), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x4(%rcx), %eax jne 0x3dccc2 movq 0x8(%rsp), %rdi movl 0x4(%rdi), %esi addl $0x1, %esi callq 0x3db710 movq 0x8(%rsp), %rdi callq 0x3dc5d0 movq %rax, %rcx movq 0x8(%rsp), %rax movl 0x1c(%rsp), %edx shlq $0x3, %rdx addq %rdx, %rcx movq %rcx, 0x10(%rsp) movl 0x1c(%rsp), %ecx addl $0x1, %ecx movl %ecx, (%rax) movq 0x10(%rsp), %rax addq $0x28, %rsp retq nopw (%rax,%rax)
_ZN6google8protobuf13RepeatedFieldIlE3AddEv: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rcx, [rsp+28h+var_8] mov [rsp+28h+var_20], rcx mov eax, [rcx] mov [rsp+28h+var_C], eax mov eax, [rsp+28h+var_C] cmp eax, [rcx+4] jnz short loc_3DCCC2 mov rdi, [rsp+28h+var_20] mov esi, [rdi+4] add esi, 1 call _ZN6google8protobuf13RepeatedFieldIlE7ReserveEi; google::protobuf::RepeatedField<long>::Reserve(int) loc_3DCCC2: mov rdi, [rsp+28h+var_20] call _ZNK6google8protobuf13RepeatedFieldIlE8elementsEv; google::protobuf::RepeatedField<long>::elements(void) mov rcx, rax mov rax, [rsp+28h+var_20] mov edx, [rsp+28h+var_C] shl rdx, 3 add rcx, rdx mov [rsp+28h+var_18], rcx mov ecx, [rsp+28h+var_C] add ecx, 1 mov [rax], ecx mov rax, [rsp+28h+var_18] add rsp, 28h retn
long long google::protobuf::RepeatedField<long>::Add(unsigned int *a1) { long long v1; // rax unsigned int v3; // [rsp+1Ch] [rbp-Ch] v3 = *a1; if ( *a1 == a1[1] ) google::protobuf::RepeatedField<long>::Reserve(a1, a1[1] + 1); v1 = google::protobuf::RepeatedField<long>::elements((long long)a1); *a1 = v3 + 1; return 8LL * v3 + v1; }
expires_at: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0029c370 MOV qword ptr [RSP + 0x10],RAX MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX] MOV qword ptr [RAX],RCX MOV RDI,RSP CALL 0x0029a360 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x38 RET
/* asio::detail::deadline_timer_service<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock> > >::expires_at(asio::detail::deadline_timer_service<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock> > >::implementation_type&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::error_code&) */ int8 __thiscall asio::detail:: deadline_timer_service<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>> ::expires_at(deadline_timer_service<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>> *this,implementation_type *param_1,time_point *param_2,error_code *param_3) { int8 local_38; int8 local_30; int8 local_28; error_code *local_20; time_point *local_18; implementation_type *local_10; deadline_timer_service<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>> *local_8; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; local_28 = cancel(this,param_1,param_3); *(int8 *)local_10 = *(int8 *)local_18; std::error_code::error_code((error_code *)&local_38); *(int8 *)local_20 = local_38; *(int8 *)(local_20 + 8) = local_30; return local_28; }
2,049
mysql_cset_escape_quotes
eloqsql/libmariadb/libmariadb/ma_charset.c
size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr, const char * escapestr, size_t escapestr_len ) { const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; my_bool escape_overflow = FALSE; for (;escapestr < end; escapestr++) { unsigned int len = 0; /* check unicode characters */ if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) { /* check possible overflow */ if ((newstr + len) > newstr_e) { escape_overflow = TRUE; break; } /* copy mb char without escaping it */ while (len--) { *newstr++ = *escapestr++; } escapestr--; continue; } if (*escapestr == '\'') { if (newstr + 2 > newstr_e) { escape_overflow = TRUE; break; } *newstr++ = '\''; *newstr++ = '\''; } else { if (newstr + 1 > newstr_e) { escape_overflow = TRUE; break; } *newstr++ = *escapestr; } } *newstr = '\0'; if (escape_overflow) { return((size_t)~0); } return((size_t)(newstr - newstr_s)); }
O3
c
mysql_cset_escape_quotes: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, -0x30(%rbp) movq %rsi, %rax testq %rcx, %rcx jle 0x30d42 movq %rcx, %r14 movq %rdx, %r12 movq %rdi, %r15 movq -0x30(%rbp), %rbx leaq (%rbx,%rcx,2), %r13 addq %rdx, %r14 cmpl $0x2, 0x34(%r15) jb 0x30d13 movq %r12, %rdi movq %r14, %rsi callq *0x40(%r15) testl %eax, %eax je 0x30d13 movl %eax, %ecx movl %eax, %eax addq %rbx, %rax cmpq %r13, %rax ja 0x30d4b decq %r12 movq %r12, %rdx leaq 0x1(%rdx), %r12 leaq 0x1(%rbx), %rax movb 0x1(%rdx), %dl movb %dl, (%rbx) movq %r12, %rdx movq %rax, %rbx decl %ecx jne 0x30cfa jmp 0x30d37 movb (%r12), %cl cmpb $0x27, %cl jne 0x30d2c leaq 0x2(%rbx), %rax cmpq %r13, %rax ja 0x30d4b movw $0x2727, (%rbx) # imm = 0x2727 jmp 0x30d37 leaq 0x1(%rbx), %rax cmpq %r13, %rax ja 0x30d4b movb %cl, (%rbx) incq %r12 movq %rax, %rbx cmpq %r14, %r12 jb 0x30cd3 movb $0x0, (%rax) subq -0x30(%rbp), %rax jmp 0x30d55 movb $0x0, (%rbx) movq $-0x1, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mysql_cset_escape_quotes: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rsi mov rax, rsi test rcx, rcx jle loc_30D42 mov r14, rcx mov r12, rdx mov r15, rdi mov rbx, [rbp+var_30] lea r13, [rbx+rcx*2] add r14, rdx loc_30CD3: cmp dword ptr [r15+34h], 2 jb short loc_30D13 mov rdi, r12 mov rsi, r14 call qword ptr [r15+40h] test eax, eax jz short loc_30D13 mov ecx, eax mov eax, eax add rax, rbx cmp rax, r13 ja short loc_30D4B dec r12 mov rdx, r12 loc_30CFA: lea r12, [rdx+1] lea rax, [rbx+1] mov dl, [rdx+1] mov [rbx], dl mov rdx, r12 mov rbx, rax dec ecx jnz short loc_30CFA jmp short loc_30D37 loc_30D13: mov cl, [r12] cmp cl, 27h ; ''' jnz short loc_30D2C lea rax, [rbx+2] cmp rax, r13 ja short loc_30D4B mov word ptr [rbx], 2727h jmp short loc_30D37 loc_30D2C: lea rax, [rbx+1] cmp rax, r13 ja short loc_30D4B mov [rbx], cl loc_30D37: inc r12 mov rbx, rax cmp r12, r14 jb short loc_30CD3 loc_30D42: mov byte ptr [rax], 0 sub rax, [rbp+var_30] jmp short loc_30D55 loc_30D4B: mov byte ptr [rbx], 0 mov rax, 0FFFFFFFFFFFFFFFFh loc_30D55: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mysql_cset_escape_quotes(long long a1, _BYTE *a2, _BYTE *a3, long long a4) { _BYTE *v4; // rax _BYTE *v5; // r12 _WORD *v6; // rbx unsigned long long v7; // r13 unsigned long long v8; // r14 unsigned int v9; // eax unsigned int v10; // ecx _BYTE *v11; // rdx v4 = a2; if ( a4 <= 0 ) { LABEL_15: *v4 = 0; return v4 - a2; } v5 = a3; v6 = a2; v7 = (unsigned long long)&a2[2 * a4]; v8 = (unsigned long long)&a3[a4]; while ( 1 ) { if ( *(_DWORD *)(a1 + 52) >= 2u ) { v9 = (*(long long ( **)(_BYTE *, unsigned long long))(a1 + 64))(v5, v8); if ( v9 ) { v10 = v9; if ( (unsigned long long)v6 + v9 > v7 ) goto LABEL_16; v11 = v5 - 1; do { v5 = v11 + 1; v4 = (char *)v6 + 1; *(_BYTE *)v6 = *++v11; v6 = (_WORD *)((char *)v6 + 1); --v10; } while ( v10 ); goto LABEL_14; } } if ( *v5 != 39 ) break; v4 = v6 + 1; if ( (unsigned long long)(v6 + 1) > v7 ) goto LABEL_16; *v6 = 10023; LABEL_14: ++v5; v6 = v4; if ( (unsigned long long)v5 >= v8 ) goto LABEL_15; } v4 = (char *)v6 + 1; if ( (unsigned long long)v6 + 1 <= v7 ) { *(_BYTE *)v6 = *v5; goto LABEL_14; } LABEL_16: *(_BYTE *)v6 = 0; return -1LL; }
mysql_cset_escape_quotes: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI TEST RCX,RCX JLE 0x00130d42 MOV R14,RCX MOV R12,RDX MOV R15,RDI MOV RBX,qword ptr [RBP + -0x30] LEA R13,[RBX + RCX*0x2] ADD R14,RDX LAB_00130cd3: CMP dword ptr [R15 + 0x34],0x2 JC 0x00130d13 MOV RDI,R12 MOV RSI,R14 CALL qword ptr [R15 + 0x40] TEST EAX,EAX JZ 0x00130d13 MOV ECX,EAX MOV EAX,EAX ADD RAX,RBX CMP RAX,R13 JA 0x00130d4b DEC R12 MOV RDX,R12 LAB_00130cfa: LEA R12,[RDX + 0x1] LEA RAX,[RBX + 0x1] MOV DL,byte ptr [RDX + 0x1] MOV byte ptr [RBX],DL MOV RDX,R12 MOV RBX,RAX DEC ECX JNZ 0x00130cfa JMP 0x00130d37 LAB_00130d13: MOV CL,byte ptr [R12] CMP CL,0x27 JNZ 0x00130d2c LEA RAX,[RBX + 0x2] CMP RAX,R13 JA 0x00130d4b MOV word ptr [RBX],0x2727 JMP 0x00130d37 LAB_00130d2c: LEA RAX,[RBX + 0x1] CMP RAX,R13 JA 0x00130d4b MOV byte ptr [RBX],CL LAB_00130d37: INC R12 MOV RBX,RAX CMP R12,R14 JC 0x00130cd3 LAB_00130d42: MOV byte ptr [RAX],0x0 SUB RAX,qword ptr [RBP + -0x30] JMP 0x00130d55 LAB_00130d4b: MOV byte ptr [RBX],0x0 MOV RAX,-0x1 LAB_00130d55: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4) { char *pcVar1; uint uVar2; char *pcVar3; char *pcVar4; char *pcVar5; char *pcVar6; pcVar3 = param_2; if (0 < param_4) { pcVar1 = param_2 + param_4 * 2; pcVar6 = param_3 + param_4; pcVar5 = param_2; do { if ((*(uint *)(param_1 + 0x34) < 2) || (uVar2 = (**(code **)(param_1 + 0x40))(param_3,pcVar6), uVar2 == 0)) { if (*param_3 == '\'') { pcVar3 = pcVar5 + 2; if (pcVar1 < pcVar3) { LAB_00130d4b: *pcVar5 = '\0'; return -1; } pcVar5[0] = '\''; pcVar5[1] = '\''; } else { pcVar3 = pcVar5 + 1; if (pcVar1 < pcVar3) goto LAB_00130d4b; *pcVar5 = *param_3; } } else { if (pcVar1 < pcVar5 + uVar2) goto LAB_00130d4b; pcVar4 = param_3 + -1; do { param_3 = pcVar4 + 1; pcVar3 = pcVar5 + 1; *pcVar5 = pcVar4[1]; uVar2 = uVar2 - 1; pcVar4 = param_3; pcVar5 = pcVar3; } while (uVar2 != 0); } param_3 = param_3 + 1; pcVar5 = pcVar3; } while (param_3 < pcVar6); } *pcVar3 = '\0'; return (long)pcVar3 - (long)param_2; }
2,050
ByteBuffer::operator>>(float&)
SylCore-WoTLK/src/server/shared/Packets/ByteBuffer.cpp
ByteBuffer& ByteBuffer::operator>>(float& value) { value = read<float>(); if (!std::isfinite(value)) throw ByteBufferInvalidValueException("float", "infinity"); return *this; }
O3
cpp
ByteBuffer::operator>>(float&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x8(%rdi), %rsi callq 0x4cc04 addq $0x4, 0x8(%rbx) movd %xmm0, %eax movd %xmm0, (%r14) andl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpl $0x7f800000, %eax # imm = 0x7F800000 jge 0x4b10a movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x28, %edi callq 0x1b6a0 movq %rax, %rbx leaq 0xb0777(%rip), %rsi # 0xfb895 leaq 0xb0776(%rip), %rdx # 0xfb89b movq %rax, %rdi callq 0x4afd4 leaq 0x11b75c(%rip), %rsi # 0x166890 leaq -0x3a11(%rip), %rdx # 0x4772a movq %rbx, %rdi callq 0x1baf0 movq %rax, %r14 movq %rbx, %rdi callq 0x1c130 movq %r14, %rdi callq 0x1bba0
_ZN10ByteBufferrsERf: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rdi+8] call _ZNK10ByteBuffer4readIfEET_m; ByteBuffer::read<float>(ulong) add qword ptr [rbx+8], 4 movd eax, xmm0 movd dword ptr [r14], xmm0 and eax, 7FFFFFFFh cmp eax, 7F800000h jge short loc_4B10A mov rax, rbx add rsp, 8 pop rbx pop r14 retn loc_4B10A: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFloat; "float" lea rdx, aInfinity; "infinity" mov rdi, rax; this call _ZN31ByteBufferInvalidValueExceptionC2EPKcS1_; ByteBufferInvalidValueException::ByteBufferInvalidValueException(char const*,char const*) lea rsi, _ZTI31ByteBufferInvalidValueException; lptinfo lea rdx, _ZN19ByteBufferExceptionD2Ev; 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 ByteBuffer::operator>>(long long a1, _DWORD *a2, __m128i a3) { ByteBufferInvalidValueException *exception; // rbx long long v5; // rcx long long v6; // r8 int v7; // r9d *(double *)a3.m128i_i64 = ByteBuffer::read<float>(a1, *(_QWORD *)(a1 + 8)); *(_QWORD *)(a1 + 8) += 4LL; *a2 = _mm_cvtsi128_si32(a3); if ( (_mm_cvtsi128_si32(a3) & 0x7FFFFFFFu) >= 0x7F800000 ) { exception = (ByteBufferInvalidValueException *)__cxa_allocate_exception(0x28uLL); ByteBufferInvalidValueException::ByteBufferInvalidValueException(exception, "float", "infinity", v5, v6, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'ByteBufferInvalidValueException, (void (*)(void *))ByteBufferException::~ByteBufferException); } return a1; }
operator>>: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x8] CALL 0x0014cc04 ADD qword ptr [RBX + 0x8],0x4 MOVD EAX,XMM0 MOVD dword ptr [R14],XMM0 AND EAX,0x7fffffff CMP EAX,0x7f800000 JGE 0x0014b10a MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_0014b10a: MOV EDI,0x28 CALL 0x0011b6a0 MOV RBX,RAX LAB_0014b117: LEA RSI,[0x1fb895] LEA RDX,[0x1fb89b] MOV RDI,RAX CALL 0x0014afd4 LAB_0014b12d: LEA RSI,[0x266890] LEA RDX,[0x14772a] MOV RDI,RBX CALL 0x0011baf0
/* ByteBuffer::TEMPNAMEPLACEHOLDERVALUE(float&) */ ByteBuffer * __thiscall ByteBuffer::operator>>(ByteBuffer *this,float *param_1) { ByteBufferInvalidValueException *this_00; float fVar1; fVar1 = read<float>(this,*(ulong *)(this + 8)); *(long *)(this + 8) = *(long *)(this + 8) + 4; *param_1 = fVar1; if ((uint)ABS(fVar1) < 0x7f800000) { return this; } this_00 = (ByteBufferInvalidValueException *)__cxa_allocate_exception(0x28); /* try { // try from 0014b117 to 0014b12c has its CatchHandler @ 0014b143 */ ByteBufferInvalidValueException::ByteBufferInvalidValueException(this_00,"float","infinity"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&ByteBufferInvalidValueException::typeinfo, ByteBufferException::~ByteBufferException); }
2,051
my_filename
eloqsql/mysys/my_div.c
char * my_filename(File fd) { DBUG_ENTER("my_filename"); if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name) DBUG_RETURN((char*) "UNKNOWN"); if (fd >= 0 && my_file_info[fd].type != UNOPEN) { DBUG_RETURN(my_file_info[fd].name); } else DBUG_RETURN((char*) "UNOPENED"); /* Debug message */ }
O3
c
my_filename: pushq %rbp movq %rsp, %rbp leaq 0x2e4811(%rip), %rcx # 0x337400 leaq 0xf16b(%rip), %rax # 0x61d61 cmpl %edi, (%rcx) jbe 0x52c2b leaq 0x2e4807(%rip), %rcx # 0x337408 movq (%rcx), %rcx movslq %edi, %rdx shlq $0x4, %rdx movq (%rcx,%rdx), %rsi testq %rsi, %rsi je 0x52c2b testl %edi, %edi js 0x52c24 addq %rdx, %rcx cmpl $0x0, 0x8(%rcx) movq %rsi, %rax jne 0x52c2b leaq 0xf13e(%rip), %rax # 0x61d69 popq %rbp retq nopl (%rax)
my_filename: push rbp mov rbp, rsp lea rcx, my_file_limit lea rax, aUnknown_0; "UNKNOWN" cmp [rcx], edi jbe short loc_52C2B lea rcx, my_file_info mov rcx, [rcx] movsxd rdx, edi shl rdx, 4 mov rsi, [rcx+rdx] test rsi, rsi jz short loc_52C2B test edi, edi js short loc_52C24 add rcx, rdx cmp dword ptr [rcx+8], 0 mov rax, rsi jnz short loc_52C2B loc_52C24: lea rax, aUnopened; "UNOPENED" loc_52C2B: pop rbp retn
const char * my_filename(int a1) { const char *result; // rax long long v2; // rdx result = "UNKNOWN"; if ( my_file_limit > (unsigned int)a1 ) { v2 = 16LL * a1; if ( *(_QWORD *)((char *)my_file_info + v2) ) { if ( a1 < 0 ) return "UNOPENED"; result = (const char *)*((_QWORD *)my_file_info + 2 * a1); if ( !*(_DWORD *)((char *)my_file_info + v2 + 8) ) return "UNOPENED"; } } return result; }
my_filename: PUSH RBP MOV RBP,RSP LEA RCX,[0x437400] LEA RAX,[0x161d61] CMP dword ptr [RCX],EDI JBE 0x00152c2b LEA RCX,[0x437408] MOV RCX,qword ptr [RCX] MOVSXD RDX,EDI SHL RDX,0x4 MOV RSI,qword ptr [RCX + RDX*0x1] TEST RSI,RSI JZ 0x00152c2b TEST EDI,EDI JS 0x00152c24 ADD RCX,RDX CMP dword ptr [RCX + 0x8],0x0 MOV RAX,RSI JNZ 0x00152c2b LAB_00152c24: LEA RAX,[0x161d69] LAB_00152c2b: POP RBP RET
char * my_filename(uint param_1) { char *pcVar1; pcVar1 = "UNKNOWN"; if (param_1 < my_file_limit) { if ((*(char **)(my_file_info + (long)(int)param_1 * 0x10) != (char *)0x0) && (((int)param_1 < 0 || (pcVar1 = *(char **)(my_file_info + (long)(int)param_1 * 0x10), *(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)))) { pcVar1 = "UNOPENED"; } } return pcVar1; }
2,052
computational_graph_forward
tsotchke[P]eshkol/src/core/utils/autodiff.c
float computational_graph_forward(ComputationalGraph* graph, float* values) { assert(graph != NULL); assert(values != NULL); assert(graph->root != NULL); // Set values for variable nodes for (size_t i = 0; i < graph->num_variables; i++) { if (graph->variables[i]) { graph->variables[i]->value = values[i]; } } // Forward pass is already done during node creation return graph->root->value; }
O0
c
computational_graph_forward: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x8(%rbp) je 0xac29 jmp 0xac48 leaq 0x38b5(%rip), %rdi # 0xe4e5 leaq 0x34a5(%rip), %rsi # 0xe0dc movl $0x300, %edx # imm = 0x300 leaq 0x3d1e(%rip), %rcx # 0xe961 callq 0x10b0 cmpq $0x0, -0x10(%rbp) je 0xac51 jmp 0xac70 leaq 0x3d4a(%rip), %rdi # 0xe9a2 leaq 0x347d(%rip), %rsi # 0xe0dc movl $0x301, %edx # imm = 0x301 leaq 0x3cf6(%rip), %rcx # 0xe961 callq 0x10b0 movq -0x8(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xac7d jmp 0xac9c leaq 0x3d2d(%rip), %rdi # 0xe9b1 leaq 0x3451(%rip), %rsi # 0xe0dc movl $0x302, %edx # imm = 0x302 leaq 0x3cca(%rip), %rcx # 0xe961 callq 0x10b0 movq $0x0, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x18(%rcx), %rax jae 0xacf7 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0xace7 movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx movq (%rax,%rcx,8), %rax movss %xmm0, 0x4(%rax) jmp 0xace9 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0xaca4 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movss 0x4(%rax), %xmm0 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
computational_graph_forward: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp [rbp+var_8], 0 jz short loc_AC29 jmp short loc_AC48 loc_AC29: lea rdi, aGraphNull; "graph != NULL" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov edx, 300h lea rcx, aFloatComputati; "float computational_graph_forward(Compu"... call ___assert_fail loc_AC48: cmp [rbp+var_10], 0 jz short loc_AC51 jmp short loc_AC70 loc_AC51: lea rdi, aValuesNull; "values != NULL" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov edx, 301h lea rcx, aFloatComputati; "float computational_graph_forward(Compu"... call ___assert_fail loc_AC70: mov rax, [rbp+var_8] cmp qword ptr [rax+8], 0 jz short loc_AC7D jmp short loc_AC9C loc_AC7D: lea rdi, aGraphRootNull; "graph->root != NULL" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov edx, 302h lea rcx, aFloatComputati; "float computational_graph_forward(Compu"... call ___assert_fail loc_AC9C: mov [rbp+var_18], 0 loc_ACA4: mov rax, [rbp+var_18] mov rcx, [rbp+var_8] cmp rax, [rcx+18h] jnb short loc_ACF7 mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_18] cmp qword ptr [rax+rcx*8], 0 jz short loc_ACE7 mov rax, [rbp+var_10] mov rcx, [rbp+var_18] movss xmm0, dword ptr [rax+rcx*4] mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_18] mov rax, [rax+rcx*8] movss dword ptr [rax+4], xmm0 loc_ACE7: jmp short $+2 loc_ACE9: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_ACA4 loc_ACF7: mov rax, [rbp+var_8] mov rax, [rax+8] movss xmm0, dword ptr [rax+4] add rsp, 20h pop rbp retn
float computational_graph_forward(_QWORD *a1, long long a2) { unsigned long long i; // [rsp+8h] [rbp-18h] if ( !a1 ) __assert_fail( "graph != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c", 768LL, "float computational_graph_forward(ComputationalGraph *, float *)"); if ( !a2 ) __assert_fail( "values != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c", 769LL, "float computational_graph_forward(ComputationalGraph *, float *)"); if ( !a1[1] ) __assert_fail( "graph->root != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c", 770LL, "float computational_graph_forward(ComputationalGraph *, float *)"); for ( i = 0LL; i < a1[3]; ++i ) { if ( *(_QWORD *)(a1[2] + 8 * i) ) *(_DWORD *)(*(_QWORD *)(a1[2] + 8 * i) + 4LL) = *(_DWORD *)(a2 + 4 * i); } return *(float *)(a1[1] + 4LL); }
computational_graph_forward: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP qword ptr [RBP + -0x8],0x0 JZ 0x0010ac29 JMP 0x0010ac48 LAB_0010ac29: LEA RDI,[0x10e4a3] LEA RSI,[0x10e0ac] MOV EDX,0x300 LEA RCX,[0x10e91f] CALL 0x001010b0 LAB_0010ac48: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0010ac51 JMP 0x0010ac70 LAB_0010ac51: LEA RDI,[0x10e960] LEA RSI,[0x10e0ac] MOV EDX,0x301 LEA RCX,[0x10e91f] CALL 0x001010b0 LAB_0010ac70: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0010ac7d JMP 0x0010ac9c LAB_0010ac7d: LEA RDI,[0x10e96f] LEA RSI,[0x10e0ac] MOV EDX,0x302 LEA RCX,[0x10e91f] CALL 0x001010b0 LAB_0010ac9c: MOV qword ptr [RBP + -0x18],0x0 LAB_0010aca4: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x18] JNC 0x0010acf7 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0010ace7 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + RCX*0x8] MOVSS dword ptr [RAX + 0x4],XMM0 LAB_0010ace7: JMP 0x0010ace9 LAB_0010ace9: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0010aca4 LAB_0010acf7: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOVSS XMM0,dword ptr [RAX + 0x4] ADD RSP,0x20 POP RBP RET
int4 computational_graph_forward(long param_1,long param_2) { ulong local_20; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("graph != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x300, "float computational_graph_forward(ComputationalGraph *, float *)"); } if (param_2 != 0) { if (*(long *)(param_1 + 8) != 0) { for (local_20 = 0; local_20 < *(ulong *)(param_1 + 0x18); local_20 = local_20 + 1) { if (*(long *)(*(long *)(param_1 + 0x10) + local_20 * 8) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x10) + local_20 * 8) + 4) = *(int4 *)(param_2 + local_20 * 4); } } return *(int4 *)(*(long *)(param_1 + 8) + 4); } /* WARNING: Subroutine does not return */ __assert_fail("graph->root != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x302, "float computational_graph_forward(ComputationalGraph *, float *)"); } /* WARNING: Subroutine does not return */ __assert_fail("values != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c" ,0x301,"float computational_graph_forward(ComputationalGraph *, float *)"); }
2,053
computational_graph_forward
tsotchke[P]eshkol/src/core/utils/autodiff.c
float computational_graph_forward(ComputationalGraph* graph, float* values) { assert(graph != NULL); assert(values != NULL); assert(graph->root != NULL); // Set values for variable nodes for (size_t i = 0; i < graph->num_variables; i++) { if (graph->variables[i]) { graph->variables[i]->value = values[i]; } } // Forward pass is already done during node creation return graph->root->value; }
O3
c
computational_graph_forward: pushq %rax testq %rdi, %rdi je 0x77b9 testq %rsi, %rsi je 0x77d8 movq 0x8(%rdi), %rax testq %rax, %rax je 0x77f7 movq 0x18(%rdi), %rcx testq %rcx, %rcx je 0x77b2 movq 0x10(%rdi), %rdx xorl %edi, %edi movq (%rdx,%rdi,8), %r8 testq %r8, %r8 je 0x77aa movss (%rsi,%rdi,4), %xmm0 movss %xmm0, 0x4(%r8) incq %rdi cmpq %rdi, %rcx jne 0x7796 movss 0x4(%rax), %xmm0 popq %rax retq leaq 0x3e95(%rip), %rdi # 0xb655 leaq 0x3a85(%rip), %rsi # 0xb24c leaq 0x4303(%rip), %rcx # 0xbad1 movl $0x300, %edx # imm = 0x300 callq 0x10b0 leaq 0x4333(%rip), %rdi # 0xbb12 leaq 0x3a66(%rip), %rsi # 0xb24c leaq 0x42e4(%rip), %rcx # 0xbad1 movl $0x301, %edx # imm = 0x301 callq 0x10b0 leaq 0x4323(%rip), %rdi # 0xbb21 leaq 0x3a47(%rip), %rsi # 0xb24c leaq 0x42c5(%rip), %rcx # 0xbad1 movl $0x302, %edx # imm = 0x302 callq 0x10b0
computational_graph_forward: push rax test rdi, rdi jz short loc_77B9 test rsi, rsi jz short loc_77D8 mov rax, [rdi+8] test rax, rax jz short loc_77F7 mov rcx, [rdi+18h] test rcx, rcx jz short loc_77B2 mov rdx, [rdi+10h] xor edi, edi loc_7796: mov r8, [rdx+rdi*8] test r8, r8 jz short loc_77AA movss xmm0, dword ptr [rsi+rdi*4] movss dword ptr [r8+4], xmm0 loc_77AA: inc rdi cmp rcx, rdi jnz short loc_7796 loc_77B2: movss xmm0, dword ptr [rax+4] pop rax retn loc_77B9: lea rdi, aGraphNull; "graph != NULL" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatComputati; "float computational_graph_forward(Compu"... mov edx, 300h call ___assert_fail loc_77D8: lea rdi, aValuesNull; "values != NULL" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatComputati; "float computational_graph_forward(Compu"... mov edx, 301h call ___assert_fail loc_77F7: lea rdi, aGraphRootNull; "graph->root != NULL" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rcx, aFloatComputati; "float computational_graph_forward(Compu"... mov edx, 302h call ___assert_fail
float __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> computational_graph_forward(_QWORD *a1, long long a2) { long long v2; // rax long long v3; // rcx long long v4; // rdx long long i; // rdi long long v6; // r8 if ( !a1 ) __assert_fail( "graph != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c", 768LL, "float computational_graph_forward(ComputationalGraph *, float *)"); if ( !a2 ) __assert_fail( "values != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c", 769LL, "float computational_graph_forward(ComputationalGraph *, float *)"); v2 = a1[1]; if ( !v2 ) __assert_fail( "graph->root != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c", 770LL, "float computational_graph_forward(ComputationalGraph *, float *)"); v3 = a1[3]; if ( v3 ) { v4 = a1[2]; for ( i = 0LL; i != v3; ++i ) { v6 = *(_QWORD *)(v4 + 8 * i); if ( v6 ) *(_DWORD *)(v6 + 4) = *(_DWORD *)(a2 + 4 * i); } } return *(float *)(v2 + 4); }
2,054
tailoring_append
eloqsql/strings/ctype.c
static int tailoring_append(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len, attr); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
tailoring_append: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x690(%rax), %rax addq -0x20(%rbp), %rax addq $0x40, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x14b2a0 movl %eax, %ecx xorl %eax, %eax cmpl %ecx, %eax jne 0x14b28d movq -0x30(%rbp), %rax movq 0x688(%rax), %rax movq -0x30(%rbp), %rcx addq 0x690(%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rax movl %eax, %edx movq -0x28(%rbp), %rcx movb $0x0, %al callq 0x2a7a0 movq -0x40(%rbp), %rdi callq 0x2a330 movq %rax, %rcx movq -0x30(%rbp), %rax addq 0x690(%rax), %rcx movq %rcx, 0x690(%rax) movl $0x0, -0x4(%rbp) jmp 0x14b294 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
tailoring_append: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+690h] add rax, [rbp+var_20] add rax, 40h ; '@' mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] call my_charset_file_tailoring_realloc mov ecx, eax xor eax, eax cmp eax, ecx jnz short loc_14B28D mov rax, [rbp+var_30] mov rax, [rax+688h] mov rcx, [rbp+var_30] add rax, [rcx+690h] mov [rbp+var_40], rax mov rdi, [rbp+var_40] mov rsi, [rbp+var_18] mov rax, [rbp+var_20] mov edx, eax mov rcx, [rbp+var_28] mov al, 0 call _sprintf mov rdi, [rbp+var_40] call _strlen mov rcx, rax mov rax, [rbp+var_30] add rcx, [rax+690h] mov [rax+690h], rcx mov [rbp+var_4], 0 jmp short loc_14B294 loc_14B28D: mov [rbp+var_4], 1 loc_14B294: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long tailoring_append(long long a1, const char *a2, long long a3, long long a4) { long long v5; // [rsp+0h] [rbp-40h] long long v6; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+20h] [rbp-20h] v8 = a3; v6 = *(_QWORD *)(a1 + 320); if ( (unsigned int)my_charset_file_tailoring_realloc(v6, a3 + *(_QWORD *)(v6 + 1680) + 64) ) { return 1; } else { v5 = *(_QWORD *)(v6 + 1680) + *(_QWORD *)(v6 + 1672); sprintf(v5, a2, v8, a4); *(_QWORD *)(v6 + 1680) += strlen(v5); return 0; } }
2,055
tailoring_append
eloqsql/strings/ctype.c
static int tailoring_append(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len, attr); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O3
c
tailoring_append: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r9 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x690(%rdi), %r13 leaq (%rdx,%r13), %rax addq $0x40, %rax cmpq %rax, 0x698(%rdi) jbe 0xd6eaf movq 0x688(%rbx), %rax jmp 0xd6ef3 movq %r9, %r14 addq %r15, %r13 movq 0x688(%rbx), %rdi movq 0x7a8(%rbx), %rax movq 0x90(%rax), %rax addq $0x8040, %r13 # imm = 0x8040 movq %r13, 0x698(%rbx) movq %r13, %rsi callq *%rax movq %rax, 0x688(%rbx) testq %rax, %rax je 0xd6f36 movq 0x690(%rbx), %r13 movq %r14, %r9 addq %rax, %r13 xorl %r14d, %r14d movq %r13, %rdi movl $0x1, %esi movq $-0x1, %rdx movq %r12, %rcx movl %r15d, %r8d xorl %eax, %eax callq 0x2a990 movq %r13, %rdi callq 0x2a320 addq %rax, 0x690(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %r14d jmp 0xd6f24
tailoring_append: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r9, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov r13, [rdi+690h] lea rax, [rdx+r13] add rax, 40h ; '@' cmp [rdi+698h], rax jbe short loc_D6EAF mov rax, [rbx+688h] jmp short loc_D6EF3 loc_D6EAF: mov r14, r9 add r13, r15 mov rdi, [rbx+688h] mov rax, [rbx+7A8h] mov rax, [rax+90h] add r13, 8040h mov [rbx+698h], r13 mov rsi, r13 call rax mov [rbx+688h], rax test rax, rax jz short loc_D6F36 mov r13, [rbx+690h] mov r9, r14 loc_D6EF3: add r13, rax xor r14d, r14d mov rdi, r13 mov esi, 1 mov rdx, 0FFFFFFFFFFFFFFFFh mov rcx, r12 mov r8d, r15d xor eax, eax call ___sprintf_chk mov rdi, r13 call _strlen add [rbx+690h], rax loc_D6F24: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D6F36: mov r14d, 1 jmp short loc_D6F24
long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4) { long long v4; // rax long long v5; // r9 unsigned int v6; // r15d long long v8; // r13 long long v9; // rax long long v11; // rdi long long ( *v12)(long long, long long); // rax long long v13; // r13 long long v14; // r13 unsigned int v15; // r14d long long v17; // [rsp-8h] [rbp-30h] v17 = v4; v5 = a4; v6 = a3; v8 = a1[210]; if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) ) { v11 = a1[209]; v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL); v13 = a3 + v8 + 32832; a1[211] = v13; v9 = v12(v11, v13); a1[209] = v9; if ( !v9 ) return 1; v8 = a1[210]; v5 = a4; } else { v9 = a1[209]; } v14 = v9 + v8; v15 = 0; __sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17); a1[210] += strlen(v14); return v15; }
tailoring_append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R9,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x690] LEA RAX,[RDX + R13*0x1] ADD RAX,0x40 CMP qword ptr [RDI + 0x698],RAX JBE 0x001d6eaf MOV RAX,qword ptr [RBX + 0x688] JMP 0x001d6ef3 LAB_001d6eaf: MOV R14,R9 ADD R13,R15 MOV RDI,qword ptr [RBX + 0x688] MOV RAX,qword ptr [RBX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] ADD R13,0x8040 MOV qword ptr [RBX + 0x698],R13 MOV RSI,R13 CALL RAX MOV qword ptr [RBX + 0x688],RAX TEST RAX,RAX JZ 0x001d6f36 MOV R13,qword ptr [RBX + 0x690] MOV R9,R14 LAB_001d6ef3: ADD R13,RAX XOR R14D,R14D MOV RDI,R13 MOV ESI,0x1 MOV RDX,-0x1 MOV RCX,R12 MOV R8D,R15D XOR EAX,EAX CALL 0x0012a990 MOV RDI,R13 CALL 0x0012a320 ADD qword ptr [RBX + 0x690],RAX LAB_001d6f24: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d6f36: MOV R14D,0x1 JMP 0x001d6f24
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4) { code *pcVar1; long lVar2; size_t sVar3; long lVar4; lVar4 = *(long *)(param_1 + 0x690); if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) { lVar2 = *(long *)(param_1 + 0x688); } else { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); lVar4 = lVar4 + param_3 + 0x8040; *(long *)(param_1 + 0x698) = lVar4; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } lVar4 = *(long *)(param_1 + 0x690); } __sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4); sVar3 = strlen((char *)(lVar4 + lVar2)); *(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3; return 0; }
2,056
aria_get_capabilities
eloqsql/storage/maria/ma_backup.c
int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap) { MARIA_SHARE share; int error= 0; uint head_length= sizeof(share.state.header), base_pos; uint aligned_bit_blocks; size_t info_length; uchar *disc_cache; DBUG_ENTER("aria_get_capabilities"); bzero(cap, sizeof(*cap)); if (my_pread(kfile,share.state.header.file_version, head_length, 0, MYF(MY_NABP))) DBUG_RETURN(HA_ERR_NOT_A_TABLE); if (memcmp(share.state.header.file_version, maria_file_magic, 4)) DBUG_RETURN(HA_ERR_NOT_A_TABLE); share.options= mi_uint2korr(share.state.header.options); info_length= mi_uint2korr(share.state.header.header_length); base_pos= mi_uint2korr(share.state.header.base_pos); /* Allocate space for header information and for data that is too big to keep on stack */ if (!(disc_cache= my_malloc(PSI_NOT_INSTRUMENTED, info_length, MYF(MY_WME)))) DBUG_RETURN(ENOMEM); if (my_pread(kfile, disc_cache, info_length, 0L, MYF(MY_NABP))) { error= my_errno; goto err; } _ma_base_info_read(disc_cache + base_pos, &share.base); cap->transactional= share.base.born_transactional; cap->checksum= MY_TEST(share.options & HA_OPTION_PAGE_CHECKSUM); cap->online_backup_safe= cap->transactional && cap->checksum; cap->header_size= share.base.keystart; cap->keypage_header= ((share.base.born_transactional ? LSN_STORE_SIZE + TRANSID_SIZE : 0) + KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE + KEYPAGE_USED_SIZE); cap->block_size= share.base.block_size; cap->data_file_type= share.state.header.data_file_type; cap->s3_block_size= share.base.s3_block_size; cap->compression= share.base.compression_algorithm; cap->encrypted= MY_TEST(share.base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED); if (share.state.header.data_file_type == BLOCK_RECORD) { /* Calulate how man pages the row bitmap covers. From _ma_bitmap_init() */ aligned_bit_blocks= (cap->block_size - PAGE_SUFFIX_SIZE) / 6; /* In each 6 bytes, we have 6*8/3 = 16 pages covered The +1 is to add the bitmap page, as this doesn't have to be covered */ cap->bitmap_pages_covered= aligned_bit_blocks * 16 + 1; } /* Do a check that that we got things right */ if (share.state.header.data_file_type != BLOCK_RECORD && cap->online_backup_safe) error= HA_ERR_NOT_A_TABLE; err: my_free(disc_cache); DBUG_RETURN(error); }
O0
c
aria_get_capabilities: pushq %rbp movq %rsp, %rbp subq $0xc80, %rsp # imm = 0xC80 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0xc48(%rbp) movq %rsi, -0xc50(%rbp) movl $0x0, -0xc54(%rbp) movl $0x18, -0xc58(%rbp) movq -0xc50(%rbp), %rdi xorl %esi, %esi movl $0x30, %edx callq 0x29280 movl -0xc48(%rbp), %edi leaq -0xc40(%rbp), %rsi movl -0xc58(%rbp), %eax movl %eax, %edx xorl %eax, %eax movl %eax, %ecx movl $0x4, %r8d callq 0xfc0f0 cmpq $0x0, %rax je 0xa3ee7 jmp 0xa3ed8 movl $0x82, -0xc44(%rbp) jmp 0xa41ae leaq -0xc40(%rbp), %rax leaq 0x22124b(%rip), %rcx # 0x2c5140 movl (%rcx), %ecx movl (%rax), %eax subl %ecx, %eax setne %al movzbl %al, %eax cmpl $0x0, %eax je 0xa3f17 jmp 0xa3f08 movl $0x82, -0xc44(%rbp) jmp 0xa41ae movzbl -0xc3b(%rbp), %eax movzwl %ax, %eax movzbl -0xc3c(%rbp), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movq %rax, -0x520(%rbp) movzbl -0xc39(%rbp), %eax movzwl %ax, %eax movzbl -0xc3a(%rbp), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movq %rax, -0xc68(%rbp) movzbl -0xc33(%rbp), %eax movzwl %ax, %eax movzbl -0xc34(%rbp), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0xc5c(%rbp) movq -0xc68(%rbp), %rsi xorl %edi, %edi movl $0x10, %edx callq 0xfb390 movq %rax, -0xc70(%rbp) cmpq $0x0, %rax jne 0xa3fb0 jmp 0xa3fa1 movl $0xc, -0xc44(%rbp) jmp 0xa41ae movl -0xc48(%rbp), %edi movq -0xc70(%rbp), %rsi movq -0xc68(%rbp), %rdx xorl %eax, %eax movl %eax, %ecx movl $0x4, %r8d callq 0xfc0f0 cmpq $0x0, %rax je 0xa3feb callq 0xfdd30 movl (%rax), %eax movl %eax, -0xc54(%rbp) jmp 0xa4196 movq -0xc70(%rbp), %rdi movl -0xc5c(%rbp), %eax addq %rax, %rdi leaq -0xc40(%rbp), %rsi addq $0x360, %rsi # imm = 0x360 callq 0xa41e0 movb -0x7f4(%rbp), %cl movq -0xc50(%rbp), %rax movb %cl, 0x1d(%rax) movq -0x520(%rbp), %rdx andq $0x800, %rdx # imm = 0x800 xorl %eax, %eax movl $0x1, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x1c(%rax) movq -0xc50(%rbp), %rax movsbl 0x1d(%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0xc71(%rbp) je 0xa4075 movq -0xc50(%rbp), %rax movsbl 0x1c(%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0xc71(%rbp) movb -0xc71(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x1f(%rax) movq -0x8e0(%rbp), %rcx movq -0xc50(%rbp), %rax movq %rcx, (%rax) movsbl -0x7f4(%rbp), %edx xorl %ecx, %ecx movl $0xd, %eax cmpl $0x0, %edx cmovnel %eax, %ecx addl $0x1, %ecx addl $0x1, %ecx addl $0x2, %ecx movq -0xc50(%rbp), %rax movl %ecx, 0x14(%rax) movl -0x824(%rbp), %ecx movq -0xc50(%rbp), %rax movl %ecx, 0x10(%rax) movzbl -0xc2a(%rbp), %ecx movq -0xc50(%rbp), %rax movl %ecx, 0x18(%rax) movq -0x880(%rbp), %rcx movq -0xc50(%rbp), %rax movq %rcx, 0x20(%rax) movl -0x810(%rbp), %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x28(%rax) movl -0x818(%rbp), %edx andl $0x1, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movb %al, %cl movq -0xc50(%rbp), %rax movb %cl, 0x1e(%rax) movzbl -0xc2a(%rbp), %eax cmpl $0x3, %eax jne 0xa416e movq -0xc50(%rbp), %rax movl 0x10(%rax), %eax subl $0x4, %eax movl $0x6, %ecx xorl %edx, %edx divl %ecx movl %eax, -0xc60(%rbp) movl -0xc60(%rbp), %eax shll $0x4, %eax addl $0x1, %eax movl %eax, %eax movl %eax, %ecx movq -0xc50(%rbp), %rax movq %rcx, 0x8(%rax) movzbl -0xc2a(%rbp), %eax cmpl $0x3, %eax je 0xa4194 movq -0xc50(%rbp), %rax movsbl 0x1f(%rax), %eax cmpl $0x0, %eax je 0xa4194 movl $0x82, -0xc54(%rbp) jmp 0xa4196 movq -0xc70(%rbp), %rdi callq 0xfb710 movl -0xc54(%rbp), %eax movl %eax, -0xc44(%rbp) movl -0xc44(%rbp), %eax movl %eax, -0xc78(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa41db movl -0xc78(%rbp), %eax addq $0xc80, %rsp # imm = 0xC80 popq %rbp retq callq 0x29230
aria_get_capabilities: push rbp mov rbp, rsp sub rsp, 0C80h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_C48], edi mov [rbp+var_C50], rsi mov [rbp+var_C54], 0 mov [rbp+var_C58], 18h mov rdi, [rbp+var_C50] xor esi, esi mov edx, 30h ; '0' call _memset mov edi, [rbp+var_C48] lea rsi, [rbp+var_C40] mov eax, [rbp+var_C58] mov edx, eax xor eax, eax mov ecx, eax mov r8d, 4 call my_pread cmp rax, 0 jz short loc_A3EE7 jmp short $+2 loc_A3ED8: mov [rbp+var_C44], 82h jmp loc_A41AE loc_A3EE7: lea rax, [rbp+var_C40] lea rcx, maria_file_magic mov ecx, [rcx] mov eax, [rax] sub eax, ecx setnz al movzx eax, al cmp eax, 0 jz short loc_A3F17 jmp short $+2 loc_A3F08: mov [rbp+var_C44], 82h jmp loc_A41AE loc_A3F17: movzx eax, [rbp+var_C3B] movzx eax, ax movzx ecx, [rbp+var_C3C] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_520], rax movzx eax, [rbp+var_C39] movzx eax, ax movzx ecx, [rbp+var_C3A] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_C68], rax movzx eax, [rbp+var_C33] movzx eax, ax movzx ecx, [rbp+var_C34] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_C5C], eax mov rsi, [rbp+var_C68] xor edi, edi mov edx, 10h call my_malloc mov [rbp+var_C70], rax cmp rax, 0 jnz short loc_A3FB0 jmp short $+2 loc_A3FA1: mov [rbp+var_C44], 0Ch jmp loc_A41AE loc_A3FB0: mov edi, [rbp+var_C48] mov rsi, [rbp+var_C70] mov rdx, [rbp+var_C68] xor eax, eax mov ecx, eax mov r8d, 4 call my_pread cmp rax, 0 jz short loc_A3FEB call _my_thread_var mov eax, [rax] mov [rbp+var_C54], eax jmp loc_A4196 loc_A3FEB: mov rdi, [rbp+var_C70] mov eax, [rbp+var_C5C] add rdi, rax lea rsi, [rbp+var_C40] add rsi, 360h call _ma_base_info_read mov cl, [rbp+var_7F4] mov rax, [rbp+var_C50] mov [rax+1Dh], cl mov rdx, [rbp+var_520] and rdx, 800h xor eax, eax mov ecx, 1 cmp rdx, 0 cmovnz eax, ecx mov cl, al mov rax, [rbp+var_C50] mov [rax+1Ch], cl mov rax, [rbp+var_C50] movsx ecx, byte ptr [rax+1Dh] xor eax, eax cmp ecx, 0 mov [rbp+var_C71], al jz short loc_A4075 mov rax, [rbp+var_C50] movsx eax, byte ptr [rax+1Ch] cmp eax, 0 setnz al mov [rbp+var_C71], al loc_A4075: mov al, [rbp+var_C71] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_C50] mov [rax+1Fh], cl mov rcx, [rbp+var_8E0] mov rax, [rbp+var_C50] mov [rax], rcx movsx edx, [rbp+var_7F4] xor ecx, ecx mov eax, 0Dh cmp edx, 0 cmovnz ecx, eax add ecx, 1 add ecx, 1 add ecx, 2 mov rax, [rbp+var_C50] mov [rax+14h], ecx mov ecx, [rbp+var_824] mov rax, [rbp+var_C50] mov [rax+10h], ecx movzx ecx, [rbp+var_C2A] mov rax, [rbp+var_C50] mov [rax+18h], ecx mov rcx, [rbp+var_880] mov rax, [rbp+var_C50] mov [rax+20h], rcx mov eax, [rbp+var_810] mov cl, al mov rax, [rbp+var_C50] mov [rax+28h], cl mov edx, [rbp+var_818] and edx, 1 xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov cl, al mov rax, [rbp+var_C50] mov [rax+1Eh], cl movzx eax, [rbp+var_C2A] cmp eax, 3 jnz short loc_A416E mov rax, [rbp+var_C50] mov eax, [rax+10h] sub eax, 4 mov ecx, 6 xor edx, edx div ecx mov [rbp+var_C60], eax mov eax, [rbp+var_C60] shl eax, 4 add eax, 1 mov eax, eax mov ecx, eax mov rax, [rbp+var_C50] mov [rax+8], rcx loc_A416E: movzx eax, [rbp+var_C2A] cmp eax, 3 jz short loc_A4194 mov rax, [rbp+var_C50] movsx eax, byte ptr [rax+1Fh] cmp eax, 0 jz short loc_A4194 mov [rbp+var_C54], 82h loc_A4194: jmp short $+2 loc_A4196: mov rdi, [rbp+var_C70] call my_free mov eax, [rbp+var_C54] mov [rbp+var_C44], eax loc_A41AE: mov eax, [rbp+var_C44] mov [rbp+var_C78], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A41DB mov eax, [rbp+var_C78] add rsp, 0C80h pop rbp retn loc_A41DB: call ___stack_chk_fail
long long aria_get_capabilities(unsigned int a1, long long a2) { int v2; // ecx bool v4; // [rsp+Fh] [rbp-C71h] const char *v5; // [rsp+10h] [rbp-C70h] long long v6; // [rsp+18h] [rbp-C68h] int v7; // [rsp+24h] [rbp-C5Ch] unsigned int v8; // [rsp+2Ch] [rbp-C54h] int v10; // [rsp+40h] [rbp-C40h] BYREF unsigned __int16 v11; // [rsp+44h] [rbp-C3Ch] unsigned __int16 v12; // [rsp+46h] [rbp-C3Ah] unsigned __int16 v13; // [rsp+4Ch] [rbp-C34h] unsigned __int8 v14; // [rsp+56h] [rbp-C2Ah] _QWORD v15[23]; // [rsp+3A0h] [rbp-8E0h] BYREF int v16; // [rsp+45Ch] [rbp-824h] int v17; // [rsp+468h] [rbp-818h] int v18; // [rsp+470h] [rbp-810h] char v19; // [rsp+48Ch] [rbp-7F4h] long long v20; // [rsp+760h] [rbp-520h] unsigned long long v21; // [rsp+C78h] [rbp-8h] v21 = __readfsqword(0x28u); v8 = 0; memset(a2, 0LL, 48LL); if ( my_pread(a1, &v10, 24LL, 0LL, 4LL) ) { return 130; } else if ( v10 == maria_file_magic ) { v20 = _byteswap_ushort(v11); v6 = _byteswap_ushort(v12); v7 = _byteswap_ushort(v13); v5 = (const char *)my_malloc(0LL, v6, 16LL); if ( v5 ) { if ( my_pread(a1, v5, v6, 0LL, 4LL) ) { v8 = *(_DWORD *)my_thread_var(a1, v5); } else { ma_base_info_read(&v5[v7], v15); *(_BYTE *)(a2 + 29) = v19; *(_BYTE *)(a2 + 28) = (v20 & 0x800) != 0; v4 = 0; if ( *(_BYTE *)(a2 + 29) ) v4 = *(_BYTE *)(a2 + 28) != 0; *(_BYTE *)(a2 + 31) = v4; *(_QWORD *)a2 = v15[0]; v2 = 0; if ( v19 ) v2 = 13; *(_DWORD *)(a2 + 20) = v2 + 4; *(_DWORD *)(a2 + 16) = v16; *(_DWORD *)(a2 + 24) = v14; *(_QWORD *)(a2 + 32) = v15[12]; *(_BYTE *)(a2 + 40) = v18; *(_BYTE *)(a2 + 30) = (v17 & 1) != 0; if ( v14 == 3 ) *(_QWORD *)(a2 + 8) = 16 * ((*(_DWORD *)(a2 + 16) - 4) / 6u) + 1; if ( v14 != 3 && *(_BYTE *)(a2 + 31) ) v8 = 130; } my_free(v5); return v8; } else { return 12; } } else { return 130; } }
aria_get_capabilities: PUSH RBP MOV RBP,RSP SUB RSP,0xc80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc48],EDI MOV qword ptr [RBP + -0xc50],RSI MOV dword ptr [RBP + -0xc54],0x0 MOV dword ptr [RBP + -0xc58],0x18 MOV RDI,qword ptr [RBP + -0xc50] XOR ESI,ESI MOV EDX,0x30 CALL 0x00129280 MOV EDI,dword ptr [RBP + -0xc48] LEA RSI,[RBP + -0xc40] MOV EAX,dword ptr [RBP + -0xc58] MOV EDX,EAX XOR EAX,EAX MOV ECX,EAX MOV R8D,0x4 CALL 0x001fc0f0 CMP RAX,0x0 JZ 0x001a3ee7 JMP 0x001a3ed8 LAB_001a3ed8: MOV dword ptr [RBP + -0xc44],0x82 JMP 0x001a41ae LAB_001a3ee7: LEA RAX,[RBP + -0xc40] LEA RCX,[0x3c5140] MOV ECX,dword ptr [RCX] MOV EAX,dword ptr [RAX] SUB EAX,ECX SETNZ AL MOVZX EAX,AL CMP EAX,0x0 JZ 0x001a3f17 JMP 0x001a3f08 LAB_001a3f08: MOV dword ptr [RBP + -0xc44],0x82 JMP 0x001a41ae LAB_001a3f17: MOVZX EAX,byte ptr [RBP + -0xc3b] MOVZX EAX,AX MOVZX ECX,byte ptr [RBP + -0xc3c] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0x520],RAX MOVZX EAX,byte ptr [RBP + -0xc39] MOVZX EAX,AX MOVZX ECX,byte ptr [RBP + -0xc3a] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0xc68],RAX MOVZX EAX,byte ptr [RBP + -0xc33] MOVZX EAX,AX MOVZX ECX,byte ptr [RBP + -0xc34] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0xc5c],EAX MOV RSI,qword ptr [RBP + -0xc68] XOR EDI,EDI MOV EDX,0x10 CALL 0x001fb390 MOV qword ptr [RBP + -0xc70],RAX CMP RAX,0x0 JNZ 0x001a3fb0 JMP 0x001a3fa1 LAB_001a3fa1: MOV dword ptr [RBP + -0xc44],0xc JMP 0x001a41ae LAB_001a3fb0: MOV EDI,dword ptr [RBP + -0xc48] MOV RSI,qword ptr [RBP + -0xc70] MOV RDX,qword ptr [RBP + -0xc68] XOR EAX,EAX MOV ECX,EAX MOV R8D,0x4 CALL 0x001fc0f0 CMP RAX,0x0 JZ 0x001a3feb CALL 0x001fdd30 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc54],EAX JMP 0x001a4196 LAB_001a3feb: MOV RDI,qword ptr [RBP + -0xc70] MOV EAX,dword ptr [RBP + -0xc5c] ADD RDI,RAX LEA RSI,[RBP + -0xc40] ADD RSI,0x360 CALL 0x001a41e0 MOV CL,byte ptr [RBP + -0x7f4] MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1d],CL MOV RDX,qword ptr [RBP + -0x520] AND RDX,0x800 XOR EAX,EAX MOV ECX,0x1 CMP RDX,0x0 CMOVNZ EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1c],CL MOV RAX,qword ptr [RBP + -0xc50] MOVSX ECX,byte ptr [RAX + 0x1d] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0xc71],AL JZ 0x001a4075 MOV RAX,qword ptr [RBP + -0xc50] MOVSX EAX,byte ptr [RAX + 0x1c] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0xc71],AL LAB_001a4075: MOV AL,byte ptr [RBP + -0xc71] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1f],CL MOV RCX,qword ptr [RBP + -0x8e0] MOV RAX,qword ptr [RBP + -0xc50] MOV qword ptr [RAX],RCX MOVSX EDX,byte ptr [RBP + -0x7f4] XOR ECX,ECX MOV EAX,0xd CMP EDX,0x0 CMOVNZ ECX,EAX ADD ECX,0x1 ADD ECX,0x1 ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0xc50] MOV dword ptr [RAX + 0x14],ECX MOV ECX,dword ptr [RBP + -0x824] MOV RAX,qword ptr [RBP + -0xc50] MOV dword ptr [RAX + 0x10],ECX MOVZX ECX,byte ptr [RBP + -0xc2a] MOV RAX,qword ptr [RBP + -0xc50] MOV dword ptr [RAX + 0x18],ECX MOV RCX,qword ptr [RBP + -0x880] MOV RAX,qword ptr [RBP + -0xc50] MOV qword ptr [RAX + 0x20],RCX MOV EAX,dword ptr [RBP + -0x810] MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x28],CL MOV EDX,dword ptr [RBP + -0x818] AND EDX,0x1 XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0xc50] MOV byte ptr [RAX + 0x1e],CL MOVZX EAX,byte ptr [RBP + -0xc2a] CMP EAX,0x3 JNZ 0x001a416e MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x10] SUB EAX,0x4 MOV ECX,0x6 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0xc60],EAX MOV EAX,dword ptr [RBP + -0xc60] SHL EAX,0x4 ADD EAX,0x1 MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xc50] MOV qword ptr [RAX + 0x8],RCX LAB_001a416e: MOVZX EAX,byte ptr [RBP + -0xc2a] CMP EAX,0x3 JZ 0x001a4194 MOV RAX,qword ptr [RBP + -0xc50] MOVSX EAX,byte ptr [RAX + 0x1f] CMP EAX,0x0 JZ 0x001a4194 MOV dword ptr [RBP + -0xc54],0x82 LAB_001a4194: JMP 0x001a4196 LAB_001a4196: MOV RDI,qword ptr [RBP + -0xc70] CALL 0x001fb710 MOV EAX,dword ptr [RBP + -0xc54] MOV dword ptr [RBP + -0xc44],EAX LAB_001a41ae: MOV EAX,dword ptr [RBP + -0xc44] MOV dword ptr [RBP + -0xc78],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a41db MOV EAX,dword ptr [RBP + -0xc78] ADD RSP,0xc80 POP RBP RET LAB_001a41db: CALL 0x00129230
int4 aria_get_capabilities(int4 param_1,int8 *param_2) { long lVar1; long lVar2; int4 *puVar3; int iVar4; long in_FS_OFFSET; bool local_c79; int4 local_c5c; int4 local_c4c; int local_c48; int1 local_c44; int1 local_c43; int1 local_c42; int1 local_c41; int1 local_c3c; int1 local_c3b; byte local_c32; int8 local_8e8 [12]; int8 local_888; int4 local_82c; uint local_820; int1 local_818; char local_7fc; ulong local_528; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c5c = 0; memset(param_2,0,0x30); lVar1 = my_pread(param_1,&local_c48,0x18,0,4); if (lVar1 == 0) { if (local_c48 == maria_file_magic) { local_528 = (ulong)CONCAT11(local_c44,local_c43); lVar1 = my_malloc(0,CONCAT11(local_c42,local_c41),0x10); if (lVar1 == 0) { local_c4c = 0xc; } else { lVar2 = my_pread(param_1,lVar1,CONCAT11(local_c42,local_c41),0,4); if (lVar2 == 0) { _ma_base_info_read(lVar1 + (ulong)CONCAT11(local_c3c,local_c3b),local_8e8); *(char *)((long)param_2 + 0x1d) = local_7fc; *(bool *)((long)param_2 + 0x1c) = (local_528 & 0x800) != 0; local_c79 = false; if (*(char *)((long)param_2 + 0x1d) != '\0') { local_c79 = *(char *)((long)param_2 + 0x1c) != '\0'; } *(bool *)((long)param_2 + 0x1f) = local_c79; *param_2 = local_8e8[0]; iVar4 = 0; if (local_7fc != '\0') { iVar4 = 0xd; } *(int *)((long)param_2 + 0x14) = iVar4 + 4; *(int4 *)(param_2 + 2) = local_82c; *(uint *)(param_2 + 3) = (uint)local_c32; param_2[4] = local_888; *(int1 *)(param_2 + 5) = local_818; *(bool *)((long)param_2 + 0x1e) = (local_820 & 1) != 0; if (local_c32 == 3) { param_2[1] = (ulong)(((*(int *)(param_2 + 2) - 4U) / 6) * 0x10 + 1); } else if (*(char *)((long)param_2 + 0x1f) != '\0') { local_c5c = 0x82; } } else { puVar3 = (int4 *)_my_thread_var(); local_c5c = *puVar3; } my_free(lVar1); local_c4c = local_c5c; } } else { local_c4c = 0x82; } } else { local_c4c = 0x82; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_c4c; }
2,057
non_inline_func
ng-log[P]ng-log/src/symbolize_unittest.cc
void* ATTRIBUTE_NOINLINE non_inline_func() { void* pc = nullptr; # ifdef TEST_WITH_LABEL_ADDRESSES pc = &&curr_pc; curr_pc: # endif return pc; }
O0
cpp
non_inline_func: pushq %rbp movq %rsp, %rbp movq $0x0, -0x8(%rbp) leaq 0x4(%rip), %rax # 0xcb07 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
non_inline_func: push rbp mov rbp, rsp mov [rbp+var_8], 0 lea rax, loc_CB07 mov [rbp+var_8], rax loc_CB07: mov rax, [rbp+var_8] pop rbp retn
void *non_inline_func() { return &loc_CB07; }
non_inline_func: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],0x0 LEA RAX,[0x10cb07] MOV qword ptr [RBP + -0x8],RAX LAB_0010cb07: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int8 non_inline_func(void) { return 0x10cb07; }
2,058
non_inline_func
ng-log[P]ng-log/src/symbolize_unittest.cc
void* ATTRIBUTE_NOINLINE non_inline_func() { void* pc = nullptr; # ifdef TEST_WITH_LABEL_ADDRESSES pc = &&curr_pc; curr_pc: # endif return pc; }
O2
cpp
non_inline_func: leaq -0x7(%rip), %rax # 0x9459 retq
non_inline_func: lea rax, non_inline_func retn
long long ( *non_inline_func())() { return non_inline_func; }
non_inline_func: LEA RAX,[0x109459] RET
code * non_inline_func(void) { return non_inline_func; }
2,059
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O0
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): subq $0x208, %rsp # imm = 0x208 movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x200(%rsp) movq %rsi, 0x1f8(%rsp) leaq 0x70(%rsp), %rdi callq 0x59530 leaq 0x80(%rsp), %rdi leaq 0x122d66(%rip), %rsi # 0x20d4a3 callq 0x599f0 jmp 0xea744 movb $0x1, 0x63(%rsp) movq 0x1f8(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x8f0c0 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0x8f0f0 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xf5230 testb $0x1, %al jne 0xea78c jmp 0xea836 leaq 0x50(%rsp), %rdi callq 0xf5270 movl (%rax), %eax movl %eax, 0x44(%rsp) testb $0x1, 0x63(%rsp) je 0xea7bd movb $0x0, 0x63(%rsp) jmp 0xea7d5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0xea874 leaq 0x80(%rsp), %rdi leaq 0x12368e(%rip), %rsi # 0x20de5a callq 0x599f0 jmp 0xea7d3 jmp 0xea7d5 leaq 0x80(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x44(%rsp), %esi leaq 0x20(%rsp), %rdi callq 0x9fb90 jmp 0xea7f2 movq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x59520 jmp 0xea803 leaq 0x20(%rsp), %rdi callq 0x5a4d8 leaq 0x50(%rsp), %rdi callq 0xf5280 jmp 0xea774 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x20(%rsp), %rdi callq 0x5a4d8 jmp 0xea874 leaq 0x80(%rsp), %rdi leaq 0x122c61(%rip), %rsi # 0x20d4a6 callq 0x599f0 jmp 0xea84c movq 0x10(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x59c50 jmp 0xea85d leaq 0x70(%rsp), %rdi callq 0x59650 movq 0x18(%rsp), %rax addq $0x208, %rsp # imm = 0x208 retq leaq 0x70(%rsp), %rdi callq 0x59650 movq 0x68(%rsp), %rdi callq 0x59b80 nopl (%rax,%rax)
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: sub rsp, 208h mov [rsp+208h+var_1F8], rdi mov rax, rdi mov [rsp+208h+var_1F0], rax mov [rsp+208h+var_8], rdi mov [rsp+208h+var_10], rsi lea rdi, [rsp+208h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+208h+var_188] lea rsi, asc_20D4A3; "[ " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_EA744: mov [rsp+208h+var_1A5], 1 mov rax, [rsp+208h+var_10] mov [rsp+208h+var_1B0], rax mov rdi, [rsp+208h+var_1B0] call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void) mov [rsp+208h+var_1B8], rax mov rdi, [rsp+208h+var_1B0] call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov [rsp+208h+var_1C0], rax loc_EA774: lea rdi, [rsp+208h+var_1B8] lea rsi, [rsp+208h+var_1C0] call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&) test al, 1 jnz short loc_EA78C jmp loc_EA836 loc_EA78C: lea rdi, [rsp+208h+var_1B8] call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void) mov eax, [rax] mov [rsp+208h+var_1C4], eax test [rsp+208h+var_1A5], 1 jz short loc_EA7BD mov [rsp+208h+var_1A5], 0 jmp short loc_EA7D5 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp loc_EA874 loc_EA7BD: lea rdi, [rsp+208h+var_188] lea rsi, aZuD+6; ", " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_EA7D3: jmp short $+2 loc_EA7D5: lea rax, [rsp+208h+var_188] mov [rsp+208h+var_200], rax mov esi, [rsp+208h+var_1C4]; int lea rdi, [rsp+208h+var_1E8]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_EA7F2: mov rdi, [rsp+208h+var_200] lea rsi, [rsp+208h+var_1E8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_EA803: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+208h+var_1B8] call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void) jmp loc_EA774 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_EA874 loc_EA836: lea rdi, [rsp+208h+var_188] lea rsi, asc_20D4A6; " ]" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_EA84C: mov rdi, [rsp+208h+var_1F8] lea rsi, [rsp+208h+var_198] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_EA85D: lea rdi, [rsp+208h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+208h+var_1F0] add rsp, 208h retn loc_EA874: lea rdi, [rsp+arg_68] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rsp+arg_60] call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, long long a2) { _BYTE v3[36]; // [rsp+20h] [rbp-1E8h] BYREF int v4; // [rsp+44h] [rbp-1C4h] long long v5; // [rsp+48h] [rbp-1C0h] BYREF long long v6; // [rsp+50h] [rbp-1B8h] BYREF long long v7; // [rsp+58h] [rbp-1B0h] char v8; // [rsp+63h] [rbp-1A5h] _BYTE v9[16]; // [rsp+70h] [rbp-198h] BYREF _BYTE v10[376]; // [rsp+80h] [rbp-188h] BYREF long long v11; // [rsp+1F8h] [rbp-10h] long long v12; // [rsp+200h] [rbp-8h] v12 = a1; v11 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9); std::operator<<<std::char_traits<char>>(v10, "[ "); v8 = 1; v7 = v11; v6 = std::vector<int>::begin(v11); v5 = std::vector<int>::end(v7); while ( (__gnu_cxx::operator!=<int const*,std::vector<int>>(&v6, &v5) & 1) != 0 ) { v4 = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v6); if ( (v8 & 1) != 0 ) v8 = 0; else std::operator<<<std::char_traits<char>>(v10, ", "); std::to_string((std::__cxx11 *)v3, v4); std::operator<<<char>(v10, v3); std::string::~string(v3); __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v6); } std::operator<<<std::char_traits<char>>(v10, " ]"); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9); return a1; }
string_from[abi:cxx11]: SUB RSP,0x208 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x200],RDI MOV qword ptr [RSP + 0x1f8],RSI LEA RDI,[RSP + 0x70] CALL 0x00159530 LEA RDI,[RSP + 0x80] LAB_001ea736: LEA RSI,[0x30d4a3] CALL 0x001599f0 JMP 0x001ea744 LAB_001ea744: MOV byte ptr [RSP + 0x63],0x1 MOV RAX,qword ptr [RSP + 0x1f8] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x0018f0c0 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x0018f0f0 MOV qword ptr [RSP + 0x48],RAX LAB_001ea774: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x48] CALL 0x001f5230 TEST AL,0x1 JNZ 0x001ea78c JMP 0x001ea836 LAB_001ea78c: LEA RDI,[RSP + 0x50] CALL 0x001f5270 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x44],EAX TEST byte ptr [RSP + 0x63],0x1 JZ 0x001ea7bd MOV byte ptr [RSP + 0x63],0x0 JMP 0x001ea7d5 LAB_001ea7bd: LEA RDI,[RSP + 0x80] LEA RSI,[0x30de5a] CALL 0x001599f0 JMP 0x001ea7d3 LAB_001ea7d3: JMP 0x001ea7d5 LAB_001ea7d5: LEA RAX,[RSP + 0x80] MOV qword ptr [RSP + 0x8],RAX MOV ESI,dword ptr [RSP + 0x44] LEA RDI,[RSP + 0x20] CALL 0x0019fb90 JMP 0x001ea7f2 LAB_001ea7f2: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] CALL 0x00159520 JMP 0x001ea803 LAB_001ea803: LEA RDI,[RSP + 0x20] CALL 0x0015a4d8 LEA RDI,[RSP + 0x50] CALL 0x001f5280 JMP 0x001ea774 LAB_001ea836: LEA RDI,[RSP + 0x80] LAB_001ea83e: LEA RSI,[0x30d4a6] CALL 0x001599f0 JMP 0x001ea84c LAB_001ea84c: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x70] CALL 0x00159c50 LAB_001ea85b: JMP 0x001ea85d LAB_001ea85d: LEA RDI,[RSP + 0x70] CALL 0x00159650 MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x208 RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { bool bVar1; int *piVar2; vector<int,std::allocator<int>> *in_RSI; __cxx11 local_1e8 [36]; int local_1c4; int8 local_1c0; int8 local_1b8; vector<int,std::allocator<int>> *local_1b0; byte local_1a5; stringstream local_198 [16]; ostream local_188 [376]; vector<int,std::allocator<int>> *local_10; vector *local_8; local_10 = in_RSI; local_8 = param_1; std::__cxx11::stringstream::stringstream(local_198); /* try { // try from 001ea736 to 001ea7ef has its CatchHandler @ 001ea7aa */ std::operator<<(local_188,"[ "); local_1a5 = 1; local_1b0 = local_10; local_1b8 = std::vector<int,std::allocator<int>>::begin(local_10); local_1c0 = std::vector<int,std::allocator<int>>::end(local_1b0); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1b8,(__normal_iterator *)&local_1c0); if (!bVar1) break; piVar2 = (int *)__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>:: operator*((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *) &local_1b8); local_1c4 = *piVar2; if ((local_1a5 & 1) == 0) { std::operator<<(local_188,", "); } else { local_1a5 = 0; } std::__cxx11::to_string(local_1e8,local_1c4); /* try { // try from 001ea7f2 to 001ea800 has its CatchHandler @ 001ea81c */ std::operator<<(local_188,(string *)local_1e8); std::__cxx11::string::~string((string *)local_1e8); __gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++ ((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_1b8); } /* try { // try from 001ea83e to 001ea85a has its CatchHandler @ 001ea7aa */ std::operator<<(local_188," ]"); std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_198); return param_1; }
2,060
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O3
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %rbx movq %rdi, 0x28(%rsp) leaq 0x30(%rsp), %rdi callq 0x1a610 leaq 0x40(%rsp), %rdi leaq 0x7c2b7(%rip), %rsi # 0xedadf movl $0x2, %edx callq 0x1a9a0 movq (%rbx), %r12 movq 0x8(%rbx), %r15 cmpq %r15, %r12 je 0x71928 movb $0x1, %al movl $0xd1b71759, %r14d # imm = 0xD1B71759 movl (%r12), %r13d testb $0x1, %al jne 0x71868 movl $0x2, %edx leaq 0x40(%rsp), %rdi leaq 0x7cc20(%rip), %rsi # 0xee483 callq 0x1a9a0 movl %r13d, %ebp negl %ebp cmovsl %r13d, %ebp movl $0x1, %ebx cmpl $0xa, %ebp jb 0x718b7 movl $0x4, %ebx movl %ebp, %eax cmpl $0x63, %eax jbe 0x718b0 cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0x718b5 cmpl $0x2710, %eax # imm = 0x2710 jb 0x718b7 movl %eax, %ecx imulq %r14, %rcx shrq $0x2d, %rcx addl $0x4, %ebx cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0x71882 addl $-0x3, %ebx jmp 0x718b7 addl $-0x2, %ebx jmp 0x718b7 decl %ebx shrl $0x1f, %r13d leal (%rbx,%r13), %esi leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x8(%rsp), %rdi movl $0x2d, %edx callq 0x1a9d0 addq 0x8(%rsp), %r13 movq %r13, %rdi movl %ebx, %esi movl %ebp, %edx callq 0x57d3d movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1a9a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x71919 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 addq $0x4, %r12 xorl %eax, %eax cmpq %r15, %r12 jne 0x7184a leaq 0x7c1b3(%rip), %rsi # 0xedae2 movl $0x2, %edx leaq 0x40(%rsp), %rdi callq 0x1a9a0 movq 0x28(%rsp), %rbx leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x1ad50 movq 0xb85c1(%rip), %rsi # 0x129f18 leaq 0x30(%rsp), %rdi callq 0x1a650 leaq 0xb0(%rsp), %rdi callq 0x1a2a0 movq %rbx, %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x71989 jmp 0x71989 jmp 0x71989 movq %rax, %rbx jmp 0x719ad movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x719ad movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 movq 0xb8564(%rip), %rsi # 0x129f18 leaq 0x30(%rsp), %rdi callq 0x1a650 leaq 0xb0(%rsp), %rdi callq 0x1a2a0 movq %rbx, %rdi callq 0x1af20
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rsi mov [rsp+1E8h+var_1C0], rdi lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1E8h+var_1A8] lea rsi, asc_EDADF; "[ " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, [rbx] mov r15, [rbx+8] cmp r12, r15 jz loc_71928 mov al, 1 mov r14d, 0D1B71759h loc_7184A: mov r13d, [r12] test al, 1 jnz short loc_71868 mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] lea rsi, aZuD+6; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_71868: mov ebp, r13d neg ebp cmovs ebp, r13d mov ebx, 1 cmp ebp, 0Ah jb short loc_718B7 mov ebx, 4 mov eax, ebp loc_71882: cmp eax, 63h ; 'c' jbe short loc_718B0 cmp eax, 3E7h jbe short loc_718B5 cmp eax, 2710h jb short loc_718B7 mov ecx, eax imul rcx, r14 shr rcx, 2Dh add ebx, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_71882 add ebx, 0FFFFFFFDh jmp short loc_718B7 loc_718B0: add ebx, 0FFFFFFFEh jmp short loc_718B7 loc_718B5: dec ebx loc_718B7: shr r13d, 1Fh lea esi, [rbx+r13] lea rax, [rsp+1E8h+var_1D0] mov [rsp+1E8h+var_1E0], rax lea rdi, [rsp+1E8h+var_1E0] mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r13, [rsp+1E8h+var_1E0] mov rdi, r13 mov esi, ebx mov edx, ebp call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) 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 rdi, [rsp+1E8h+var_1E0]; void * lea rax, [rsp+1E8h+var_1D0] cmp rdi, rax jz short loc_71919 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71919: add r12, 4 xor eax, eax cmp r12, r15 jnz loc_7184A loc_71928: lea rsi, asc_EDAE2; " ]" mov edx, 2 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_1C0] lea rsi, [rsp+1E8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_71989 jmp short loc_71989 jmp short $+2 loc_71989: mov rbx, rax jmp short loc_719AD mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_719AD mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_719AD: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_28] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, int **a2) { int *v2; // r12 int *v3; // r15 char v4; // al int v5; // r13d unsigned int v6; // ebp int v7; // ebx unsigned int v8; // eax bool v9; // cc unsigned int v10; // r13d long long v11; // rbx void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF _QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF long long v15; // [rsp+28h] [rbp-1C0h] _BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF char v19[312]; // [rsp+B0h] [rbp-138h] BYREF v15 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16); std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL); v2 = *a2; v3 = a2[1]; if ( *a2 != v3 ) { v4 = 1; do { v5 = *v2; if ( (v4 & 1) == 0 ) std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL); v6 = -v5; if ( v5 > 0 ) v6 = v5; v7 = 1; if ( v6 >= 0xA ) { v7 = 4; v8 = v6; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_16; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_16; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710u; if ( v9 ) { v7 -= 3; goto LABEL_16; } } --v7; } LABEL_16: v10 = (unsigned int)v5 >> 31; v13[0] = v14; std::string::_M_construct(v13, v7 + v10, 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6); std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); ++v2; v4 = 0; } while ( v2 != v3 ); } std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL); v11 = v15; std::stringbuf::str(v15, v18); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v16, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v19); return v11; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RSI MOV qword ptr [RSP + 0x28],RDI LEA RDI,[RSP + 0x30] CALL 0x0011a610 LEA RDI,[RSP + 0x40] LAB_00171821: LEA RSI,[0x1edadf] MOV EDX,0x2 CALL 0x0011a9a0 MOV R12,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x8] CMP R12,R15 JZ 0x00171928 MOV AL,0x1 MOV R14D,0xd1b71759 LAB_0017184a: MOV R13D,dword ptr [R12] TEST AL,0x1 JNZ 0x00171868 LAB_00171852: MOV EDX,0x2 LEA RDI,[RSP + 0x40] LEA RSI,[0x1ee483] CALL 0x0011a9a0 LAB_00171868: MOV EBP,R13D NEG EBP CMOVS EBP,R13D MOV EBX,0x1 CMP EBP,0xa JC 0x001718b7 MOV EBX,0x4 MOV EAX,EBP LAB_00171882: CMP EAX,0x63 JBE 0x001718b0 CMP EAX,0x3e7 JBE 0x001718b5 CMP EAX,0x2710 JC 0x001718b7 MOV ECX,EAX IMUL RCX,R14 SHR RCX,0x2d ADD EBX,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x00171882 ADD EBX,-0x3 JMP 0x001718b7 LAB_001718b0: ADD EBX,-0x2 JMP 0x001718b7 LAB_001718b5: DEC EBX LAB_001718b7: SHR R13D,0x1f LEA ESI,[RBX + R13*0x1] LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_001718c9: LEA RDI,[RSP + 0x8] MOV EDX,0x2d CALL 0x0011a9d0 ADD R13,qword ptr [RSP + 0x8] MOV RDI,R13 MOV ESI,EBX MOV EDX,EBP CALL 0x00157d3d MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001718f3: LEA RDI,[RSP + 0x40] CALL 0x0011a9a0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00171919 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a890 LAB_00171919: ADD R12,0x4 XOR EAX,EAX CMP R12,R15 JNZ 0x0017184a LAB_00171928: LEA RSI,[0x1edae2] MOV EDX,0x2 LEA RDI,[RSP + 0x40] CALL 0x0011a9a0 MOV RBX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x0011ad50 LAB_00171950: MOV RSI,qword ptr [0x00229f18] LEA RDI,[RSP + 0x30] CALL 0x0011a650 LEA RDI,[RSP + 0xb0] CALL 0x0011a2a0 MOV RAX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { uint uVar1; uint *puVar2; uint uVar3; vector *pvVar4; uint uVar5; bool bVar6; uint uVar7; ulong uVar8; uint uVar9; int8 *in_RSI; uint *puVar10; long *local_1e0; long local_1d8; long local_1d0 [2]; vector *local_1c0; stringstream local_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; local_1c0 = param_1; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 00171821 to 00171831 has its CatchHandler @ 00171983 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2); puVar10 = (uint *)*in_RSI; puVar2 = (uint *)in_RSI[1]; if (puVar10 != puVar2) { bVar6 = true; do { uVar1 = *puVar10; if (!bVar6) { /* try { // try from 00171852 to 00171867 has its CatchHandler @ 00171987 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2); } uVar3 = -uVar1; if (0 < (int)uVar1) { uVar3 = uVar1; } uVar9 = 1; if (9 < uVar3) { uVar8 = (ulong)uVar3; uVar5 = 4; do { uVar9 = uVar5; uVar7 = (uint)uVar8; if (uVar7 < 100) { uVar9 = uVar9 - 2; goto LAB_001718b7; } if (uVar7 < 1000) { uVar9 = uVar9 - 1; goto LAB_001718b7; } if (uVar7 < 10000) goto LAB_001718b7; uVar8 = uVar8 / 10000; uVar5 = uVar9 + 4; } while (99999 < uVar7); uVar9 = uVar9 + 1; } LAB_001718b7: local_1e0 = local_1d0; /* try { // try from 001718c9 to 001718d7 has its CatchHandler @ 00171989 */ std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f)) ; std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3); /* try { // try from 001718f3 to 001718fc has its CatchHandler @ 0017198e */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } puVar10 = puVar10 + 1; bVar6 = false; } while (puVar10 != puVar2); } /* try { // try from 00171928 to 0017194f has its CatchHandler @ 00171985 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2); pvVar4 = local_1c0; std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); std::ios_base::~ios_base(local_138); return pvVar4; }
2,061
fn_format
eloqsql/mysys/mf_format.c
char * fn_format(char * to, const char *name, const char *dir, const char *extension, uint flag) { char dev[FN_REFLEN], buff[FN_REFLEN], *pos, *startpos; const char *ext; reg1 size_t length; size_t dev_length; DBUG_ENTER("fn_format"); DBUG_ASSERT(name != NULL); DBUG_ASSERT(extension != NULL); DBUG_PRINT("enter",("name: %s dir: %s extension: %s flag: %d", name,dir,extension,flag)); /* Copy and skip directory */ name+=(length=dirname_part(dev, (startpos=(char *) name), &dev_length)); if (length == 0 || (flag & MY_REPLACE_DIR)) { /* Use given directory */ convert_dirname(dev,dir,NullS); /* Fix to this OS */ } else if ((flag & MY_RELATIVE_PATH) && !test_if_hard_path(dev)) { /* Put 'dir' before the given path */ strmake_buf(buff, dev); pos=convert_dirname(dev,dir,NullS); strmake(pos,buff,sizeof(buff)-1- (int) (pos-dev)); } if (flag & MY_PACK_FILENAME) pack_dirname(dev,dev); /* Put in ./.. and ~/.. */ if (flag & MY_UNPACK_FILENAME) (void) unpack_dirname(dev,dev); /* Replace ~/.. with dir */ if (!(flag & MY_APPEND_EXT) && (pos= (char*) strchr(name,FN_EXTCHAR)) != NullS) { if ((flag & MY_REPLACE_EXT) == 0) /* If we should keep old ext */ { length=strlength(name); /* Use old extension */ ext = ""; } else { length= (size_t) (pos-(char*) name); /* Change extension */ ext= extension; } } else { length=strlength(name); /* No ext, use the now one */ ext=extension; } if (strlen(dev)+length+strlen(ext) >= FN_REFLEN || length >= FN_LEN ) { /* To long path, return original or NULL */ size_t tmp_length; if (flag & MY_SAFE_PATH) DBUG_RETURN(NullS); tmp_length= strlength(startpos); DBUG_PRINT("error",("dev: '%s' ext: '%s' length: %u",dev,ext, (uint) length)); (void) strmake(to,startpos,MY_MIN(tmp_length,FN_REFLEN-1)); } else { if (to == startpos) { bmove(buff,(uchar*) name,length); /* Save name for last copy */ name=buff; } pos=strmake(strmov(to,dev),name,length); (void) strmov(pos,ext); /* Don't convert extension */ } if (flag & MY_RETURN_REAL_PATH) (void) my_realpath(to, to, MYF(0)); else if (flag & MY_RESOLVE_SYMLINKS) { strmov(buff,to); (void) my_readlink(to, buff, MYF(0)); } DBUG_RETURN(to); }
O3
c
fn_format: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x428, %rsp # imm = 0x428 movl %r8d, %r14d movq %rcx, -0x438(%rbp) movq %rdx, %r12 movq %rsi, %r15 movq %rdi, -0x440(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x230(%rbp), %rdi leaq -0x448(%rbp), %rdx callq 0x5c77d movq %rax, %r13 testq %rax, %rax setne %al testb $0x1, %r14b sete %cl testb %al, %cl je 0x5c973 testb %r14b, %r14b jns 0x5c984 leaq -0x230(%rbp), %rdi callq 0x60952 testl %eax, %eax jne 0x5c984 leaq -0x430(%rbp), %rdi leaq -0x230(%rbp), %rsi movl $0x1ff, %ebx # imm = 0x1FF movl $0x1ff, %edx # imm = 0x1FF callq 0x91a2c leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x5c7cf movl %eax, %ecx leaq -0x230(%rbp), %rdx subl %edx, %ecx movslq %ecx, %rcx subq %rcx, %rbx movq %rax, %rdi leaq -0x430(%rbp), %rsi movq %rbx, %rdx callq 0x91a2c jmp 0x5c984 leaq -0x230(%rbp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x5c7cf testb $0x8, %r14b je 0x5c999 leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x5cc14 testb $0x4, %r14b je 0x5c9ae leaq -0x230(%rbp), %rdi movq %rdi, %rsi callq 0x5d19a addq %r15, %r13 btl $0x8, %r14d jb 0x5ca13 movq %r13, %rdi movl $0x2e, %esi callq 0x36510 testq %rax, %rax je 0x5ca13 movq %rax, %r12 testb $0x2, %r14b jne 0x5ca70 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x5c9fe movzbl %al, %eax testl %eax, %eax je 0x5ca5f movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x5ca4f cmpl $0x20, %eax jne 0x5c9ec movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x5ca01 movq %r12, %rcx movq %rdx, %r12 jmp 0x5c9e1 movb (%r13), %al movq %r13, %rcx movq %r13, %r12 cmpb $0x20, %al je 0x5ca3a movzbl %al, %eax testl %eax, %eax je 0x5ca6d movzbl 0x1(%r12), %eax incq %r12 testl %eax, %eax je 0x5ca70 cmpl $0x20, %eax jne 0x5ca28 movq %r12, %rdx movb 0x1(%rdx), %al incq %rdx cmpb $0x20, %al je 0x5ca3d movq %r12, %rcx movq %rdx, %r12 jmp 0x5ca1d leaq 0x3748d(%rip), %rax # 0x93ee3 movq %rax, -0x438(%rbp) jmp 0x5ca70 leaq 0x3747d(%rip), %rax # 0x93ee3 movq %rax, -0x438(%rbp) movq %rcx, %r12 subq %r13, %r12 leaq -0x230(%rbp), %rdi callq 0x36420 movq %rax, %rbx movq -0x438(%rbp), %rdi callq 0x36420 cmpq $0xff, %r12 ja 0x5cb00 addq %r12, %rbx addq %rax, %rbx cmpq $0x200, %rbx # imm = 0x200 jae 0x5cb00 movq -0x440(%rbp), %rax cmpq %r15, %rax movq %rax, %r15 jne 0x5cad2 leaq -0x430(%rbp), %rbx movl $0x200, %ecx # imm = 0x200 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x365c0 movq %rbx, %r13 leaq -0x230(%rbp), %rsi movq %r15, %rdi callq 0x369f0 movq %rax, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x91a2c movq %rax, %rdi movq -0x438(%rbp), %rsi callq 0x36430 jmp 0x5cb6a testb $0x40, %r14b jne 0x5cb41 movb (%r15), %cl movq %r15, %rdx movq %r15, %rax cmpb $0x20, %cl je 0x5cb2b movzbl %cl, %ecx testl %ecx, %ecx je 0x5cb49 movzbl 0x1(%rax), %ecx incq %rax testl %ecx, %ecx je 0x5cb46 cmpl $0x20, %ecx jne 0x5cb1b movq %rax, %rsi movb 0x1(%rsi), %cl incq %rsi cmpb $0x20, %cl je 0x5cb2e movq %rax, %rdx movq %rsi, %rax jmp 0x5cb0f xorl %r15d, %r15d jmp 0x5cba4 movq %rax, %rdx subq %r15, %rdx movl $0x1ff, %eax # imm = 0x1FF cmpq %rax, %rdx cmovaeq %rax, %rdx movq -0x440(%rbp), %rdi movq %r15, %rsi movq %rdi, %r15 callq 0x91a2c testb $0x20, %r14b jne 0x5cb97 testb $0x10, %r14b je 0x5cba4 leaq -0x430(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x36430 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x61c00 jmp 0x5cba4 movq %r15, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x61d5d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x5cbc8 movq %r15, %rax addq $0x428, %rsp # imm = 0x428 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x362b0
fn_format: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 428h mov r14d, r8d mov [rbp+var_438], rcx mov r12, rdx mov r15, rsi mov [rbp+var_440], rdi mov rax, fs:28h mov [rbp+var_30], rax lea rdi, [rbp+var_230] lea rdx, [rbp+var_448] call dirname_part mov r13, rax test rax, rax setnz al test r14b, 1 setz cl test cl, al jz short loc_5C973 test r14b, r14b jns short loc_5C984 lea rdi, [rbp+var_230] call test_if_hard_path test eax, eax jnz short loc_5C984 lea rdi, [rbp+var_430] lea rsi, [rbp+var_230] mov ebx, 1FFh mov edx, 1FFh call strmake lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname mov ecx, eax lea rdx, [rbp+var_230] sub ecx, edx movsxd rcx, ecx sub rbx, rcx mov rdi, rax lea rsi, [rbp+var_430] mov rdx, rbx call strmake jmp short loc_5C984 loc_5C973: lea rdi, [rbp+var_230] mov rsi, r12 xor edx, edx call convert_dirname loc_5C984: test r14b, 8 jz short loc_5C999 lea rdi, [rbp+var_230] mov rsi, rdi call pack_dirname loc_5C999: test r14b, 4 jz short loc_5C9AE lea rdi, [rbp+var_230] mov rsi, rdi call unpack_dirname loc_5C9AE: add r13, r15 bt r14d, 8 jb short loc_5CA13 mov rdi, r13 mov esi, 2Eh ; '.' call _strchr test rax, rax jz short loc_5CA13 mov r12, rax test r14b, 2 jnz loc_5CA70 mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_5C9E1: cmp al, 20h ; ' ' jz short loc_5C9FE movzx eax, al test eax, eax jz short loc_5CA5F loc_5C9EC: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_5CA4F cmp eax, 20h ; ' ' jnz short loc_5C9EC loc_5C9FE: mov rdx, r12 loc_5CA01: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_5CA01 mov rcx, r12 mov r12, rdx jmp short loc_5C9E1 loc_5CA13: mov al, [r13+0] mov rcx, r13 mov r12, r13 loc_5CA1D: cmp al, 20h ; ' ' jz short loc_5CA3A movzx eax, al test eax, eax jz short loc_5CA6D loc_5CA28: movzx eax, byte ptr [r12+1] inc r12 test eax, eax jz short loc_5CA70 cmp eax, 20h ; ' ' jnz short loc_5CA28 loc_5CA3A: mov rdx, r12 loc_5CA3D: mov al, [rdx+1] inc rdx cmp al, 20h ; ' ' jz short loc_5CA3D mov rcx, r12 mov r12, rdx jmp short loc_5CA1D loc_5CA4F: lea rax, aS_0+5; "" mov [rbp+var_438], rax jmp short loc_5CA70 loc_5CA5F: lea rax, aS_0+5; "" mov [rbp+var_438], rax loc_5CA6D: mov r12, rcx loc_5CA70: sub r12, r13 lea rdi, [rbp+var_230] call _strlen mov rbx, rax mov rdi, [rbp+var_438] call _strlen cmp r12, 0FFh ja short loc_5CB00 add rbx, r12 add rbx, rax cmp rbx, 200h jnb short loc_5CB00 mov rax, [rbp+var_440] cmp rax, r15 mov r15, rax jnz short loc_5CAD2 lea rbx, [rbp+var_430] mov ecx, 200h mov rdi, rbx mov rsi, r13 mov rdx, r12 call ___memmove_chk mov r13, rbx loc_5CAD2: lea rsi, [rbp+var_230] mov rdi, r15 call _stpcpy mov rdi, rax mov rsi, r13 mov rdx, r12 call strmake mov rdi, rax mov rsi, [rbp+var_438] call _strcpy jmp short loc_5CB6A loc_5CB00: test r14b, 40h jnz short loc_5CB41 mov cl, [r15] mov rdx, r15 mov rax, r15 loc_5CB0F: cmp cl, 20h ; ' ' jz short loc_5CB2B movzx ecx, cl test ecx, ecx jz short loc_5CB49 loc_5CB1B: movzx ecx, byte ptr [rax+1] inc rax test ecx, ecx jz short loc_5CB46 cmp ecx, 20h ; ' ' jnz short loc_5CB1B loc_5CB2B: mov rsi, rax loc_5CB2E: mov cl, [rsi+1] inc rsi cmp cl, 20h ; ' ' jz short loc_5CB2E mov rdx, rax mov rax, rsi jmp short loc_5CB0F loc_5CB41: xor r15d, r15d jmp short loc_5CBA4 loc_5CB46: mov rdx, rax loc_5CB49: sub rdx, r15 mov eax, 1FFh cmp rdx, rax cmovnb rdx, rax mov rdi, [rbp+var_440] mov rsi, r15 mov r15, rdi call strmake loc_5CB6A: test r14b, 20h jnz short loc_5CB97 test r14b, 10h jz short loc_5CBA4 lea rbx, [rbp+var_430] mov rdi, rbx mov rsi, r15 call _strcpy mov rdi, r15 mov rsi, rbx xor edx, edx call my_readlink jmp short loc_5CBA4 loc_5CB97: mov rdi, r15 mov rsi, r15 xor edx, edx call my_realpath loc_5CBA4: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_5CBC8 mov rax, r15 add rsp, 428h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5CBC8: call ___stack_chk_fail
_BYTE * fn_format(_BYTE *a1, _BYTE *a2, long long a3, char *a4, __int16 a5) { long long v8; // rdx long long v9; // r13 long long v10; // rcx _WORD *v11; // rax _BYTE *v12; // r13 long long v13; // rax _BYTE *v14; // r12 char v15; // al _BYTE *v16; // rcx int v17; // eax _BYTE *v18; // rdx char v19; // al int v20; // eax _BYTE *v21; // rdx unsigned long long v22; // r12 long long v23; // rbx long long v24; // rax _BYTE *v25; // r15 long long v26; // rax long long v27; // rax char v28; // cl _BYTE *v29; // rdx _BYTE *v30; // rax int v31; // ecx _BYTE *v32; // rsi unsigned long long v33; // rdx _BYTE *v34; // rsi long long v36; // [rsp+8h] [rbp-448h] BYREF _BYTE *v37; // [rsp+10h] [rbp-440h] char *v38; // [rsp+18h] [rbp-438h] _BYTE v39[512]; // [rsp+20h] [rbp-430h] BYREF _WORD v40[256]; // [rsp+220h] [rbp-230h] BYREF unsigned long long v41; // [rsp+420h] [rbp-30h] long long savedregs; // [rsp+450h] [rbp+0h] BYREF v38 = a4; v37 = a1; v41 = __readfsqword(0x28u); v9 = dirname_part((long long)v40, a2, &v36); LOBYTE(v10) = (a5 & 1) == 0; if ( ((v9 != 0) & (unsigned __int8)v10) != 0 ) { if ( (a5 & 0x80u) != 0 && !(unsigned int)test_if_hard_path(v40) ) { strmake(v39, v40, 511LL); v11 = convert_dirname(v40, a3, 0LL); strmake(v11, v39, 511LL - (int)((_DWORD)v11 - ((unsigned int)&savedregs - 560))); } } else { convert_dirname(v40, a3, 0LL); } if ( (a5 & 8) != 0 ) pack_dirname(v40, v40); if ( (a5 & 4) != 0 ) unpack_dirname(v40, v40); v12 = &a2[v9]; if ( (a5 & 0x100) == 0 ) { v13 = strchr(v12, 46LL, v8, v10); if ( v13 ) { v14 = (_BYTE *)v13; if ( (a5 & 2) != 0 ) goto LABEL_32; v15 = *v12; v16 = v12; v14 = v12; while ( v15 == 32 ) { LABEL_18: v18 = v14; do v15 = *++v18; while ( v15 == 32 ); v16 = v14; v14 = v18; } if ( v15 ) { while ( 1 ) { v17 = (unsigned __int8)*++v14; if ( !v17 ) break; if ( v17 == 32 ) goto LABEL_18; } v38 = ""; goto LABEL_32; } v38 = ""; LABEL_31: v14 = v16; goto LABEL_32; } } v19 = *v12; v16 = v12; v14 = v12; while ( v19 == 32 ) { LABEL_26: v21 = v14; do v19 = *++v21; while ( v19 == 32 ); v16 = v14; v14 = v21; } if ( !v19 ) goto LABEL_31; while ( 1 ) { v20 = (unsigned __int8)*++v14; if ( !v20 ) break; if ( v20 == 32 ) goto LABEL_26; } LABEL_32: v22 = v14 - v12; v23 = strlen(v40); v24 = strlen(v38); if ( v22 > 0xFF || v24 + v22 + v23 >= 0x200 ) { if ( (a5 & 0x40) != 0 ) return 0LL; v28 = *a2; v29 = a2; v30 = a2; while ( v28 == 32 ) { LABEL_43: v32 = v30; do v28 = *++v32; while ( v28 == 32 ); v29 = v30; v30 = v32; } if ( v28 ) { while ( 1 ) { v31 = (unsigned __int8)*++v30; if ( !v31 ) break; if ( v31 == 32 ) goto LABEL_43; } v29 = v30; } v33 = v29 - a2; if ( v33 >= 0x1FF ) v33 = 511LL; v34 = a2; v25 = v37; strmake(v37, v34, v33); } else { v25 = v37; if ( v37 == a2 ) { __memmove_chk(v39, v12, v22, 512LL); v12 = v39; } v26 = stpcpy(v25, v40); v27 = strmake(v26, v12, v22); strcpy(v27, v38); } if ( (a5 & 0x20) != 0 ) { my_realpath(v25, v25, 0LL); } else if ( (a5 & 0x10) != 0 ) { strcpy(v39, v25); my_readlink(v25, v39, 0LL); } return v25; }
fn_format: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x428 MOV R14D,R8D MOV qword ptr [RBP + -0x438],RCX MOV R12,RDX MOV R15,RSI MOV qword ptr [RBP + -0x440],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x230] LEA RDX,[RBP + -0x448] CALL 0x0015c77d MOV R13,RAX TEST RAX,RAX SETNZ AL TEST R14B,0x1 SETZ CL TEST CL,AL JZ 0x0015c973 TEST R14B,R14B JNS 0x0015c984 LEA RDI,[RBP + -0x230] CALL 0x00160952 TEST EAX,EAX JNZ 0x0015c984 LEA RDI,[RBP + -0x430] LEA RSI,[RBP + -0x230] MOV EBX,0x1ff MOV EDX,0x1ff CALL 0x00191a2c LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x0015c7cf MOV ECX,EAX LEA RDX,[RBP + -0x230] SUB ECX,EDX MOVSXD RCX,ECX SUB RBX,RCX MOV RDI,RAX LEA RSI,[RBP + -0x430] MOV RDX,RBX CALL 0x00191a2c JMP 0x0015c984 LAB_0015c973: LEA RDI,[RBP + -0x230] MOV RSI,R12 XOR EDX,EDX CALL 0x0015c7cf LAB_0015c984: TEST R14B,0x8 JZ 0x0015c999 LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x0015cc14 LAB_0015c999: TEST R14B,0x4 JZ 0x0015c9ae LEA RDI,[RBP + -0x230] MOV RSI,RDI CALL 0x0015d19a LAB_0015c9ae: ADD R13,R15 BT R14D,0x8 JC 0x0015ca13 MOV RDI,R13 MOV ESI,0x2e CALL 0x00136510 TEST RAX,RAX JZ 0x0015ca13 MOV R12,RAX TEST R14B,0x2 JNZ 0x0015ca70 MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_0015c9e1: CMP AL,0x20 JZ 0x0015c9fe MOVZX EAX,AL TEST EAX,EAX JZ 0x0015ca5f LAB_0015c9ec: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x0015ca4f CMP EAX,0x20 JNZ 0x0015c9ec LAB_0015c9fe: MOV RDX,R12 LAB_0015ca01: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x0015ca01 MOV RCX,R12 MOV R12,RDX JMP 0x0015c9e1 LAB_0015ca13: MOV AL,byte ptr [R13] MOV RCX,R13 MOV R12,R13 LAB_0015ca1d: CMP AL,0x20 JZ 0x0015ca3a MOVZX EAX,AL TEST EAX,EAX JZ 0x0015ca6d LAB_0015ca28: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 TEST EAX,EAX JZ 0x0015ca70 CMP EAX,0x20 JNZ 0x0015ca28 LAB_0015ca3a: MOV RDX,R12 LAB_0015ca3d: MOV AL,byte ptr [RDX + 0x1] INC RDX CMP AL,0x20 JZ 0x0015ca3d MOV RCX,R12 MOV R12,RDX JMP 0x0015ca1d LAB_0015ca4f: LEA RAX,[0x193ee3] MOV qword ptr [RBP + -0x438],RAX JMP 0x0015ca70 LAB_0015ca5f: LEA RAX,[0x193ee3] MOV qword ptr [RBP + -0x438],RAX LAB_0015ca6d: MOV R12,RCX LAB_0015ca70: SUB R12,R13 LEA RDI,[RBP + -0x230] CALL 0x00136420 MOV RBX,RAX MOV RDI,qword ptr [RBP + -0x438] CALL 0x00136420 CMP R12,0xff JA 0x0015cb00 ADD RBX,R12 ADD RBX,RAX CMP RBX,0x200 JNC 0x0015cb00 MOV RAX,qword ptr [RBP + -0x440] CMP RAX,R15 MOV R15,RAX JNZ 0x0015cad2 LEA RBX,[RBP + -0x430] MOV ECX,0x200 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x001365c0 MOV R13,RBX LAB_0015cad2: LEA RSI,[RBP + -0x230] MOV RDI,R15 CALL 0x001369f0 MOV RDI,RAX MOV RSI,R13 MOV RDX,R12 CALL 0x00191a2c MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x438] CALL 0x00136430 JMP 0x0015cb6a LAB_0015cb00: TEST R14B,0x40 JNZ 0x0015cb41 MOV CL,byte ptr [R15] MOV RDX,R15 MOV RAX,R15 LAB_0015cb0f: CMP CL,0x20 JZ 0x0015cb2b MOVZX ECX,CL TEST ECX,ECX JZ 0x0015cb49 LAB_0015cb1b: MOVZX ECX,byte ptr [RAX + 0x1] INC RAX TEST ECX,ECX JZ 0x0015cb46 CMP ECX,0x20 JNZ 0x0015cb1b LAB_0015cb2b: MOV RSI,RAX LAB_0015cb2e: MOV CL,byte ptr [RSI + 0x1] INC RSI CMP CL,0x20 JZ 0x0015cb2e MOV RDX,RAX MOV RAX,RSI JMP 0x0015cb0f LAB_0015cb41: XOR R15D,R15D JMP 0x0015cba4 LAB_0015cb46: MOV RDX,RAX LAB_0015cb49: SUB RDX,R15 MOV EAX,0x1ff CMP RDX,RAX CMOVNC RDX,RAX MOV RDI,qword ptr [RBP + -0x440] MOV RSI,R15 MOV R15,RDI CALL 0x00191a2c LAB_0015cb6a: TEST R14B,0x20 JNZ 0x0015cb97 TEST R14B,0x10 JZ 0x0015cba4 LEA RBX,[RBP + -0x430] MOV RDI,RBX MOV RSI,R15 CALL 0x00136430 MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX CALL 0x00161c00 JMP 0x0015cba4 LAB_0015cb97: MOV RDI,R15 MOV RSI,R15 XOR EDX,EDX CALL 0x00161d5d LAB_0015cba4: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0015cbc8 MOV RAX,R15 ADD RSP,0x428 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015cbc8: CALL 0x001362b0
char * fn_format(char *param_1,char *param_2,int8 param_3,char *param_4,uint param_5) { char *pcVar1; char *pcVar2; char cVar3; int iVar4; long lVar5; int8 uVar6; char *pcVar7; size_t sVar8; size_t sVar9; char *pcVar10; ulong uVar11; char *pcVar12; long in_FS_OFFSET; int1 local_450 [8]; char *local_448; char *local_440; char local_438 [512]; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_448 = param_1; local_440 = param_4; lVar5 = dirname_part(local_238,param_2,local_450); if ((param_5 & 1) == 0 && lVar5 != 0) { if (((char)param_5 < '\0') && (iVar4 = test_if_hard_path(local_238), iVar4 == 0)) { strmake(local_438,local_238,0x1ff); uVar6 = convert_dirname(local_238,param_3,0); strmake(uVar6,local_438,0x1ff - (long)((int)uVar6 - (int)local_238)); } } else { convert_dirname(local_238,param_3,0); } if ((param_5 & 8) != 0) { pack_dirname(local_238,local_238); } if ((param_5 & 4) != 0) { unpack_dirname(local_238,local_238); } pcVar12 = param_2 + lVar5; if (((param_5 >> 8 & 1) != 0) || (pcVar7 = strchr(pcVar12,0x2e), pcVar7 == (char *)0x0)) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_0015ca70; do { pcVar1 = pcVar10 + 1; pcVar10 = pcVar10 + 1; pcVar7 = pcVar10; if (*pcVar1 == '\0') goto LAB_0015ca70; pcVar2 = pcVar10; } while (*pcVar1 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } if ((param_5 & 2) == 0) { cVar3 = *pcVar12; pcVar7 = pcVar12; pcVar10 = pcVar12; do { pcVar2 = pcVar10; if (cVar3 != ' ') { if (cVar3 == '\0') { local_440 = ""; break; } do { pcVar7 = pcVar10 + 1; pcVar10 = pcVar10 + 1; if (*pcVar7 == '\0') { local_440 = ""; pcVar7 = pcVar10; goto LAB_0015ca70; } pcVar2 = pcVar10; } while (*pcVar7 != ' '); } do { pcVar7 = pcVar2; cVar3 = pcVar10[1]; pcVar10 = pcVar10 + 1; pcVar2 = pcVar7; } while (cVar3 == ' '); } while( true ); } LAB_0015ca70: uVar11 = (long)pcVar7 - (long)pcVar12; sVar8 = strlen(local_238); sVar9 = strlen(local_440); pcVar7 = local_448; if ((0xff < uVar11) || (0x1ff < sVar8 + uVar11 + sVar9)) { if ((param_5 & 0x40) == 0) { cVar3 = *param_2; pcVar12 = param_2; pcVar10 = param_2; do { pcVar2 = pcVar12; if (cVar3 != ' ') { if (cVar3 == '\0') goto LAB_0015cb49; do { pcVar1 = pcVar12 + 1; pcVar12 = pcVar12 + 1; pcVar10 = pcVar12; if (*pcVar1 == '\0') goto LAB_0015cb49; pcVar2 = pcVar12; } while (*pcVar1 != ' '); } do { pcVar10 = pcVar2; cVar3 = pcVar12[1]; pcVar12 = pcVar12 + 1; pcVar2 = pcVar10; } while (cVar3 == ' '); } while( true ); } pcVar7 = (char *)0x0; goto LAB_0015cba4; } pcVar10 = pcVar12; if (local_448 == param_2) { pcVar10 = local_438; __memmove_chk(pcVar10,pcVar12,uVar11,0x200); } pcVar12 = stpcpy(pcVar7,local_238); pcVar12 = (char *)strmake(pcVar12,pcVar10,uVar11); strcpy(pcVar12,local_440); LAB_0015cb6a: if ((param_5 & 0x20) == 0) { if ((param_5 & 0x10) != 0) { strcpy(local_438,pcVar7); my_readlink(pcVar7,local_438,0); } } else { my_realpath(pcVar7,pcVar7,0); } LAB_0015cba4: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return pcVar7; LAB_0015cb49: uVar11 = (long)pcVar10 - (long)param_2; if (0x1fe < uVar11) { uVar11 = 0x1ff; } strmake(local_448,param_2,uVar11); goto LAB_0015cb6a; }
2,062
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>>::end_object()
monkey531[P]llama/common/json.hpp
bool end_object() { if (ref_stack.back()) { if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) { // discard object *ref_stack.back() = discarded; } else { ref_stack.back()->set_parents(); } } JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(!keep_stack.empty()); ref_stack.pop_back(); keep_stack.pop_back(); if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) { // remove discarded value for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) { if (it->is_discarded()) { ref_stack.back()->erase(it); break; } } } return true; }
O1
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>>::end_object(): pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rax movq -0x8(%rax), %rcx testq %rcx, %rcx je 0x6ec3c subq 0x8(%rbx), %rax shrq $0x3, %rax decl %eax movl %eax, (%rsp) movb $0x1, 0x20(%rsp) cmpq $0x0, 0x90(%rbx) je 0x6ed9b leaq 0x80(%rbx), %rdi movq %rsp, %rsi leaq 0x20(%rsp), %rdx callq *0x98(%rbx) testb %al, %al jne 0x6ec3c leaq 0xa8(%rbx), %rsi leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x6ff00 movq 0x10(%rbx), %rax movq -0x8(%rax), %rdi movq %r14, %rsi callq 0x6d62c movq %r14, %rdi xorl %esi, %esi callq 0x6adae movq %r14, %rdi callq 0x70460 movq 0x8(%rbx), %rcx movq 0x10(%rbx), %rax cmpq %rax, %rcx je 0x6ed5e movq 0x30(%rbx), %rdx movl 0x38(%rbx), %esi cmpq %rdx, 0x20(%rbx) sete %dil testl %esi, %esi sete %r8b andb %dil, %r8b cmpb $0x1, %r8b je 0x6ed7a leaq -0x8(%rax), %rdi movq %rdi, 0x10(%rbx) subl $0x1, %esi movl %esi, 0x38(%rbx) jae 0x6ec8e movl $0x3f, 0x38(%rbx) addq $-0x8, %rdx movq %rdx, 0x30(%rbx) cmpq %rdi, %rcx je 0x6ed52 movq -0x10(%rax), %rcx testq %rcx, %rcx je 0x6ed52 movb (%rcx), %cl decb %cl cmpb $0x1, %cl ja 0x6ed52 movq -0x10(%rax), %rsi movq %rsp, %r14 movq %r14, %rdi callq 0x6ffb4 movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi leaq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x70006 movq %r14, %rdi movq %r15, %rsi callq 0x70ede testb %al, %al jne 0x6ed52 movq %rsp, %r14 leaq 0x20(%rsp), %r15 movq %r14, %rdi callq 0x70058 cmpb $0x9, (%rax) je 0x6ed22 movq %r14, %rdi callq 0x70412 movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq %r15, %rdi callq 0x70006 movq %r14, %rdi movq %r15, %rsi callq 0x70ede testb %al, %al je 0x6ecec jmp 0x6ed52 movq 0x10(%rbx), %rax movq -0x8(%rax), %rsi movq (%rsp), %rax leaq 0x50(%rsp), %rdx movq %rax, (%rdx) movups 0x8(%rsp), %xmm0 movups %xmm0, 0x8(%rdx) movq 0x18(%rsp), %rax movq %rax, 0x18(%rdx) leaq 0x20(%rsp), %rdi callq 0x701a8 movb $0x1, %al addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x85f97(%rip), %rdi # 0xf4cfc leaq 0x7e869(%rip), %rdx # 0xed5d5 leaq 0x86f74(%rip), %rcx # 0xf5ce7 movl $0x1bbd, %esi # imm = 0x1BBD jmp 0x6ed94 leaq 0x85f7b(%rip), %rdi # 0xf4cfc leaq 0x7e84d(%rip), %rdx # 0xed5d5 leaq 0x86ed2(%rip), %rcx # 0xf5c61 movl $0x1bbe, %esi # imm = 0x1BBE xorl %eax, %eax callq 0x1bef0 callq 0x1b320
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv: push r15 push r14 push rbx sub rsp, 70h mov rbx, rdi mov rax, [rdi+10h] mov rcx, [rax-8] test rcx, rcx jz short loc_6EC3C sub rax, [rbx+8] shr rax, 3 dec eax mov dword ptr [rsp+88h+var_88], eax mov [rsp+88h+var_68], 1 cmp qword ptr [rbx+90h], 0 jz loc_6ED9B lea rdi, [rbx+80h] mov rsi, rsp lea rdx, [rsp+88h+var_68] call qword ptr [rbx+98h] test al, al jnz short loc_6EC3C lea rsi, [rbx+0A8h] lea r14, [rsp+88h+var_48] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, [rbx+10h] mov rdi, [rax-8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_6EC3C: mov rcx, [rbx+8] mov rax, [rbx+10h] cmp rcx, rax jz loc_6ED5E mov rdx, [rbx+30h] mov esi, [rbx+38h] cmp [rbx+20h], rdx setz dil test esi, esi setz r8b and r8b, dil cmp r8b, 1 jz loc_6ED7A lea rdi, [rax-8] mov [rbx+10h], rdi sub esi, 1 mov [rbx+38h], esi jnb short loc_6EC8E mov dword ptr [rbx+38h], 3Fh ; '?' add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx loc_6EC8E: cmp rcx, rdi jz loc_6ED52 mov rcx, [rax-10h] test rcx, rcx jz loc_6ED52 mov cl, [rcx] dec cl cmp cl, 1 ja loc_6ED52 mov rsi, [rax-10h] mov r14, rsp mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::begin(void) mov rax, [rbx+10h] mov rsi, [rax-8] lea r15, [rsp+88h+var_68] mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void) mov rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jnz short loc_6ED52 mov r14, rsp lea r15, [rsp+88h+var_68] loc_6ECEC: mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; 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>>::operator->(void) cmp byte ptr [rax], 9 jz short loc_6ED22 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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>>::operator++(void) mov rax, [rbx+10h] mov rsi, [rax-8] mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void) mov rdi, r14 mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ test al, al jz short loc_6ECEC jmp short loc_6ED52 loc_6ED22: mov rax, [rbx+10h] mov rsi, [rax-8] mov rax, [rsp+88h+var_88] lea rdx, [rsp+88h+var_38] mov [rdx], rax movups xmm0, [rsp+88h+var_80] movups xmmword ptr [rdx+8], xmm0 mov rax, [rsp+88h+var_70] mov [rdx+18h], rax lea rdi, [rsp+88h+var_68] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ loc_6ED52: mov al, 1 add rsp, 70h pop rbx pop r14 pop r15 retn loc_6ED5E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1BBDh jmp short loc_6ED94 loc_6ED7A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1BBEh loc_6ED94: xor eax, eax call _ggml_abort loc_6ED9B: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
char 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>>::end_object( long long a1) { long long v1; // rax long long v2; // rcx long long v3; // rax long long v4; // rdx int v5; // esi _BYTE *v6; // rcx long long v7; // rsi long long v9; // [rsp+0h] [rbp-88h] BYREF __int128 v10; // [rsp+8h] [rbp-80h] long long v11; // [rsp+18h] [rbp-70h] _BYTE v12[32]; // [rsp+20h] [rbp-68h] BYREF char v13[16]; // [rsp+40h] [rbp-48h] BYREF long long v14; // [rsp+50h] [rbp-38h] __int128 v15; // [rsp+58h] [rbp-30h] long long v16; // [rsp+68h] [rbp-20h] v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(v1 - 8) ) { LODWORD(v9) = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1; v12[0] = 1; if ( !*(_QWORD *)(a1 + 144) ) goto LABEL_20; if ( !(*(unsigned __int8 ( **)(long long, long long *, _BYTE *))(a1 + 152))(a1 + 128, &v9, v12) ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v13, a1 + 168); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL), (long long)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13); } } v2 = *(_QWORD *)(a1 + 8); v3 = *(_QWORD *)(a1 + 16); if ( v2 == v3 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7101LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); goto LABEL_20; } v4 = *(_QWORD *)(a1 + 48); v5 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v4 && v5 == 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7102LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); LABEL_20: std::__throw_bad_function_call(); } *(_QWORD *)(a1 + 16) = v3 - 8; *(_DWORD *)(a1 + 56) = v5 - 1; if ( !v5 ) { *(_DWORD *)(a1 + 56) = 63; *(_QWORD *)(a1 + 48) = v4 - 8; } if ( v2 != v3 - 8 ) { v6 = *(_BYTE **)(v3 - 16); if ( v6 ) { if ( (unsigned __int8)(*v6 - 1) <= 1u ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::begin( &v9, *(_QWORD *)(v3 - 16)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end( v12, *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL)); if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v9, v12) ) { while ( *(_BYTE *)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>>::operator->(&v9) != 9 ) { 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>>::operator++(&v9); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end( v12, *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL)); if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( &v9, v12) ) return 1; } v7 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL); v14 = v9; v15 = v10; v16 = v11; ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( v12, v7); } } } } return 1; }
end_object: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RAX + -0x8] TEST RCX,RCX JZ 0x0016ec3c SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 DEC EAX MOV dword ptr [RSP],EAX MOV byte ptr [RSP + 0x20],0x1 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0016ed9b LEA RDI,[RBX + 0x80] MOV RSI,RSP LEA RDX,[RSP + 0x20] CALL qword ptr [RBX + 0x98] TEST AL,AL JNZ 0x0016ec3c LEA RSI,[RBX + 0xa8] LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x0016ff00 MOV RAX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,R14 CALL 0x0016d62c MOV RDI,R14 XOR ESI,ESI CALL 0x0016adae MOV RDI,R14 CALL 0x00170460 LAB_0016ec3c: MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x10] CMP RCX,RAX JZ 0x0016ed5e MOV RDX,qword ptr [RBX + 0x30] MOV ESI,dword ptr [RBX + 0x38] CMP qword ptr [RBX + 0x20],RDX SETZ DIL TEST ESI,ESI SETZ R8B AND R8B,DIL CMP R8B,0x1 JZ 0x0016ed7a LEA RDI,[RAX + -0x8] MOV qword ptr [RBX + 0x10],RDI SUB ESI,0x1 MOV dword ptr [RBX + 0x38],ESI JNC 0x0016ec8e MOV dword ptr [RBX + 0x38],0x3f ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX LAB_0016ec8e: CMP RCX,RDI JZ 0x0016ed52 MOV RCX,qword ptr [RAX + -0x10] TEST RCX,RCX JZ 0x0016ed52 MOV CL,byte ptr [RCX] DEC CL CMP CL,0x1 JA 0x0016ed52 MOV RSI,qword ptr [RAX + -0x10] MOV R14,RSP MOV RDI,R14 CALL 0x0016ffb4 MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] LEA R15,[RSP + 0x20] MOV RDI,R15 CALL 0x00170006 MOV RDI,R14 MOV RSI,R15 CALL 0x00170ede TEST AL,AL JNZ 0x0016ed52 MOV R14,RSP LEA R15,[RSP + 0x20] LAB_0016ecec: MOV RDI,R14 CALL 0x00170058 CMP byte ptr [RAX],0x9 JZ 0x0016ed22 MOV RDI,R14 CALL 0x00170412 MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RDI,R15 CALL 0x00170006 MOV RDI,R14 MOV RSI,R15 CALL 0x00170ede TEST AL,AL JZ 0x0016ecec JMP 0x0016ed52 LAB_0016ed22: MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RSP] LEA RDX,[RSP + 0x50] MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RDX + 0x8],XMM0 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RDX + 0x18],RAX LEA RDI,[RSP + 0x20] CALL 0x001701a8 LAB_0016ed52: MOV AL,0x1 ADD RSP,0x70 POP RBX POP R14 POP R15 RET LAB_0016ed5e: LEA RDI,[0x1f4cfc] LEA RDX,[0x1ed5d5] LEA RCX,[0x1f5ce7] MOV ESI,0x1bbd JMP 0x0016ed94 LAB_0016ed7a: LEA RDI,[0x1f4cfc] LEA RDX,[0x1ed5d5] LEA RCX,[0x1f5c61] MOV ESI,0x1bbe LAB_0016ed94: XOR EAX,EAX CALL 0x0011bef0 LAB_0016ed9b: CALL 0x0011b320
/* 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> >::end_object() */ int8 __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>> ::end_object(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) { int iVar1; long lVar2; char cVar3; char *pcVar4; int8 uVar5; int local_88; int4 uStack_84; int4 local_80; int4 uStack_7c; int4 uStack_78; int4 uStack_74; int8 local_70; int1 local_68 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_48 [16]; int8 local_38; int4 local_30; int4 uStack_2c; int4 uStack_28; int4 uStack_24; int8 local_20; if (*(long *)(*(long *)(this + 0x10) + -8) != 0) { local_88 = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1; local_68[0] = 1; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } cVar3 = (**(code **)(this + 0x98))(this + 0x80,&local_88,local_68); if (cVar3 == '\0') { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_48,(basic_json *)(this + 0xa8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(*(long *)(this + 0x10) + -8),local_48); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_48,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_48); } } lVar2 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar2) { pcVar4 = "!ref_stack.empty()"; uVar5 = 0x1bbd; } else { iVar1 = *(int *)(this + 0x38); if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) { *(long *)(this + 0x10) = lVar2 + -8; *(int *)(this + 0x38) = iVar1 + -1; if (iVar1 == 0) { *(int4 *)(this + 0x38) = 0x3f; *(long *)(this + 0x30) = *(long *)(this + 0x30) + -8; } if (((*(long *)(this + 8) != lVar2 + -8) && (*(char **)(lVar2 + -0x10) != (char *)0x0)) && ((byte)(**(char **)(lVar2 + -0x10) - 1U) < 2)) { 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> ::begin(); 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> ::end(); cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (&local_88,local_68); if (cVar3 == '\0') { do { pcVar4 = (char *)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>> ::operator->((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>> *)&local_88); if (*pcVar4 == '\t') { local_38 = CONCAT44(uStack_84,local_88); local_30 = local_80; uStack_2c = uStack_7c; uStack_28 = uStack_78; uStack_24 = uStack_74; local_20 = local_70; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (local_68,*(int8 *)(*(long *)(this + 0x10) + -8)); return 1; } 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>> ::operator++((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>> *)&local_88); 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> ::end(); cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (&local_88,local_68); } while (cVar3 == '\0'); } } return 1; } pcVar4 = "!keep_stack.empty()"; uVar5 = 0x1bbe; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5, "GGML_ASSERT(%s) failed",pcVar4); }
2,063
mi_find_last_pos
eloqsql/storage/myisam/mi_write.c
static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint *return_key_length, uchar **after_key) { uint keys, length, UNINIT_VAR(last_length), key_ref_length; uchar *end,*lastpos,*prevpos; uchar key_buff[HA_MAX_KEY_BUFF]; DBUG_ENTER("_mi_find_last_pos"); key_ref_length=2; length=mi_getint(page)-key_ref_length; page+=key_ref_length; if (!(keyinfo->flag & (HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { keys=length/keyinfo->keylength-2; *return_key_length=length=keyinfo->keylength; end=page+keys*length; *after_key=end+length; memcpy(key,end,length); DBUG_RETURN(end); } end=page+length-key_ref_length; DBUG_ASSERT(page < end); *key='\0'; length=0; lastpos=page; do { prevpos=lastpos; lastpos=page; last_length=length; memcpy(key, key_buff, length); /* previous key */ if (!(length=(*keyinfo->get_key)(keyinfo,0,&page,key_buff))) { mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } while (page < end); *return_key_length=last_length; *after_key=lastpos; DBUG_PRINT("exit",("returns: %p page: %p end: %p", prevpos, page, end)); DBUG_RETURN(prevpos); }
O0
c
mi_find_last_pos: pushq %rbp movq %rsp, %rbp subq $0x520, %rsp # imm = 0x520 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x4d0(%rbp) movq %rsi, -0x4d8(%rbp) movq %rdx, -0x4e0(%rbp) movq %rcx, -0x4e8(%rbp) movq %r8, -0x4f0(%rbp) movl -0x4fc(%rbp), %eax movl %eax, -0x4fc(%rbp) movl $0x2, -0x500(%rbp) movq -0x4d8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x4d8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF subl -0x500(%rbp), %eax movl %eax, -0x4f8(%rbp) movl -0x500(%rbp), %ecx movq -0x4d8(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x4d8(%rbp) movq -0x4d0(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x2e, %eax cmpl $0x0, %eax jne 0xc7df5 movl -0x4f8(%rbp), %eax movq -0x4d0(%rbp), %rcx movzwl 0x12(%rcx), %ecx xorl %edx, %edx divl %ecx subl $0x2, %eax movl %eax, -0x4f4(%rbp) movq -0x4d0(%rbp), %rax movzwl 0x12(%rax), %ecx movl %ecx, -0x4f8(%rbp) movq -0x4e8(%rbp), %rax movl %ecx, (%rax) movq -0x4d8(%rbp), %rax movl -0x4f4(%rbp), %ecx imull -0x4f8(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x508(%rbp) movq -0x508(%rbp), %rcx movl -0x4f8(%rbp), %eax addq %rax, %rcx movq -0x4f0(%rbp), %rax movq %rcx, (%rax) movq -0x4e0(%rbp), %rdi movq -0x508(%rbp), %rsi movl -0x4f8(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x508(%rbp), %rax movq %rax, -0x4c8(%rbp) jmp 0xc7f2d movq -0x4d8(%rbp), %rax movl -0x4f8(%rbp), %ecx addq %rcx, %rax movl -0x500(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x508(%rbp) jmp 0xc7e1e movq -0x4e0(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x4f8(%rbp) movq -0x4d8(%rbp), %rax movq %rax, -0x510(%rbp) movq -0x510(%rbp), %rax movq %rax, -0x518(%rbp) movq -0x4d8(%rbp), %rax movq %rax, -0x510(%rbp) movl -0x4f8(%rbp), %eax movl %eax, -0x4fc(%rbp) movq -0x4e0(%rbp), %rdi leaq -0x4c0(%rbp), %rsi movl -0x4f8(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x4d0(%rbp), %rax movq 0x48(%rax), %rax movq -0x4d0(%rbp), %rdi leaq -0x4c0(%rbp), %rcx xorl %esi, %esi leaq -0x4d8(%rbp), %rdx callq *%rax movl %eax, -0x4f8(%rbp) cmpl $0x0, %eax jne 0xc7ee5 movq -0x4d0(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xae540 callq 0xf6090 movl $0x7e, (%rax) movq $0x0, -0x4c8(%rbp) jmp 0xc7f2d jmp 0xc7ee7 movq -0x4d8(%rbp), %rax cmpq -0x508(%rbp), %rax jb 0xc7e40 movl -0x4fc(%rbp), %ecx movq -0x4e8(%rbp), %rax movl %ecx, (%rax) movq -0x510(%rbp), %rcx movq -0x4f0(%rbp), %rax movq %rcx, (%rax) jmp 0xc7f1d jmp 0xc7f1f movq -0x518(%rbp), %rax movq %rax, -0x4c8(%rbp) movq -0x4c8(%rbp), %rax movq %rax, -0x520(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xc7f5d movq -0x520(%rbp), %rax addq $0x520, %rsp # imm = 0x520 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_mi_find_last_pos: push rbp mov rbp, rsp sub rsp, 520h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_4D0], rdi mov [rbp+var_4D8], rsi mov [rbp+var_4E0], rdx mov [rbp+var_4E8], rcx mov [rbp+var_4F0], r8 mov eax, [rbp+var_4FC] mov [rbp+var_4FC], eax mov [rbp+var_500], 2 mov rax, [rbp+var_4D8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_4D8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh sub eax, [rbp+var_500] mov [rbp+var_4F8], eax mov ecx, [rbp+var_500] mov rax, [rbp+var_4D8] mov ecx, ecx add rax, rcx mov [rbp+var_4D8], rax mov rax, [rbp+var_4D0] movzx eax, word ptr [rax+0Ah] and eax, 2Eh cmp eax, 0 jnz loc_C7DF5 mov eax, [rbp+var_4F8] mov rcx, [rbp+var_4D0] movzx ecx, word ptr [rcx+12h] xor edx, edx div ecx sub eax, 2 mov [rbp+var_4F4], eax mov rax, [rbp+var_4D0] movzx ecx, word ptr [rax+12h] mov [rbp+var_4F8], ecx mov rax, [rbp+var_4E8] mov [rax], ecx mov rax, [rbp+var_4D8] mov ecx, [rbp+var_4F4] imul ecx, [rbp+var_4F8] mov ecx, ecx add rax, rcx mov [rbp+var_508], rax mov rcx, [rbp+var_508] mov eax, [rbp+var_4F8] add rcx, rax mov rax, [rbp+var_4F0] mov [rax], rcx mov rdi, [rbp+var_4E0] mov rsi, [rbp+var_508] mov eax, [rbp+var_4F8] mov edx, eax call _memcpy mov rax, [rbp+var_508] mov [rbp+var_4C8], rax jmp loc_C7F2D loc_C7DF5: mov rax, [rbp+var_4D8] mov ecx, [rbp+var_4F8] add rax, rcx mov ecx, [rbp+var_500] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_508], rax jmp short $+2 loc_C7E1E: mov rax, [rbp+var_4E0] mov byte ptr [rax], 0 mov [rbp+var_4F8], 0 mov rax, [rbp+var_4D8] mov [rbp+var_510], rax loc_C7E40: mov rax, [rbp+var_510] mov [rbp+var_518], rax mov rax, [rbp+var_4D8] mov [rbp+var_510], rax mov eax, [rbp+var_4F8] mov [rbp+var_4FC], eax mov rdi, [rbp+var_4E0] lea rsi, [rbp+var_4C0] mov eax, [rbp+var_4F8] mov edx, eax call _memcpy mov rax, [rbp+var_4D0] mov rax, [rax+48h] mov rdi, [rbp+var_4D0] lea rcx, [rbp+var_4C0] xor esi, esi lea rdx, [rbp+var_4D8] call rax mov [rbp+var_4F8], eax cmp eax, 0 jnz short loc_C7EE5 mov rax, [rbp+var_4D0] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_4C8], 0 jmp short loc_C7F2D loc_C7EE5: jmp short $+2 loc_C7EE7: mov rax, [rbp+var_4D8] cmp rax, [rbp+var_508] jb loc_C7E40 mov ecx, [rbp+var_4FC] mov rax, [rbp+var_4E8] mov [rax], ecx mov rcx, [rbp+var_510] mov rax, [rbp+var_4F0] mov [rax], rcx jmp short $+2 loc_C7F1D: jmp short $+2 loc_C7F1F: mov rax, [rbp+var_518] mov [rbp+var_4C8], rax loc_C7F2D: mov rax, [rbp+var_4C8] mov [rbp+var_520], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_C7F5D mov rax, [rbp+var_520] add rsp, 520h pop rbp retn loc_C7F5D: call ___stack_chk_fail
unsigned __int16 * mi_find_last_pos( long long a1, unsigned __int16 *a2, _BYTE *a3, unsigned int *a4, unsigned __int16 **a5) { const char *v5; // rsi unsigned __int16 *v7; // [rsp+8h] [rbp-518h] unsigned __int16 *v8; // [rsp+10h] [rbp-510h] char *v9; // [rsp+18h] [rbp-508h] unsigned long long v10; // [rsp+18h] [rbp-508h] unsigned int v11; // [rsp+24h] [rbp-4FCh] unsigned int v12; // [rsp+28h] [rbp-4F8h] unsigned int v13; // [rsp+28h] [rbp-4F8h] unsigned int v14; // [rsp+28h] [rbp-4F8h] unsigned int v15; // [rsp+2Ch] [rbp-4F4h] unsigned __int16 *v19; // [rsp+48h] [rbp-4D8h] BYREF long long v20; // [rsp+50h] [rbp-4D0h] _BYTE v22[1208]; // [rsp+60h] [rbp-4C0h] BYREF unsigned long long v23; // [rsp+518h] [rbp-8h] v23 = __readfsqword(0x28u); v20 = a1; v19 = a2; v12 = (_byteswap_ushort(*a2) & 0x7FFF) - 2; v19 = a2 + 1; if ( (*(_WORD *)(a1 + 10) & 0x2E) != 0 ) { v10 = (unsigned long long)v19 + v12 - 2; *a3 = 0; v14 = 0; v8 = v19; do { v7 = v8; v8 = v19; v11 = v14; memcpy(a3, v22, v14); v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v20 + 72))(v20, 0LL, &v19, v22); if ( !v14 ) { v5 = *(const char **)(*(_QWORD *)v20 + 616LL); mi_report_error(126, (long long)v5); *(_DWORD *)my_thread_var(126LL, v5) = 126; return 0LL; } } while ( (unsigned long long)v19 < v10 ); *a4 = v11; *a5 = v8; return v7; } else { v15 = v12 / *(unsigned __int16 *)(v20 + 18) - 2; v13 = *(unsigned __int16 *)(v20 + 18); *a4 = v13; v9 = (char *)v19 + v13 * v15; *a5 = (unsigned __int16 *)&v9[v13]; memcpy(a3, v9, v13); return (unsigned __int16 *)v9; } }
_mi_find_last_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x520 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x4d0],RDI MOV qword ptr [RBP + -0x4d8],RSI MOV qword ptr [RBP + -0x4e0],RDX MOV qword ptr [RBP + -0x4e8],RCX MOV qword ptr [RBP + -0x4f0],R8 MOV EAX,dword ptr [RBP + -0x4fc] MOV dword ptr [RBP + -0x4fc],EAX MOV dword ptr [RBP + -0x500],0x2 MOV RAX,qword ptr [RBP + -0x4d8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x4d8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff SUB EAX,dword ptr [RBP + -0x500] MOV dword ptr [RBP + -0x4f8],EAX MOV ECX,dword ptr [RBP + -0x500] MOV RAX,qword ptr [RBP + -0x4d8] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x4d8],RAX MOV RAX,qword ptr [RBP + -0x4d0] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x2e CMP EAX,0x0 JNZ 0x001c7df5 MOV EAX,dword ptr [RBP + -0x4f8] MOV RCX,qword ptr [RBP + -0x4d0] MOVZX ECX,word ptr [RCX + 0x12] XOR EDX,EDX DIV ECX SUB EAX,0x2 MOV dword ptr [RBP + -0x4f4],EAX MOV RAX,qword ptr [RBP + -0x4d0] MOVZX ECX,word ptr [RAX + 0x12] MOV dword ptr [RBP + -0x4f8],ECX MOV RAX,qword ptr [RBP + -0x4e8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x4d8] MOV ECX,dword ptr [RBP + -0x4f4] IMUL ECX,dword ptr [RBP + -0x4f8] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x508],RAX MOV RCX,qword ptr [RBP + -0x508] MOV EAX,dword ptr [RBP + -0x4f8] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x4f0] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x4e0] MOV RSI,qword ptr [RBP + -0x508] MOV EAX,dword ptr [RBP + -0x4f8] MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x508] MOV qword ptr [RBP + -0x4c8],RAX JMP 0x001c7f2d LAB_001c7df5: MOV RAX,qword ptr [RBP + -0x4d8] MOV ECX,dword ptr [RBP + -0x4f8] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x500] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x508],RAX JMP 0x001c7e1e LAB_001c7e1e: MOV RAX,qword ptr [RBP + -0x4e0] MOV byte ptr [RAX],0x0 MOV dword ptr [RBP + -0x4f8],0x0 MOV RAX,qword ptr [RBP + -0x4d8] MOV qword ptr [RBP + -0x510],RAX LAB_001c7e40: MOV RAX,qword ptr [RBP + -0x510] MOV qword ptr [RBP + -0x518],RAX MOV RAX,qword ptr [RBP + -0x4d8] MOV qword ptr [RBP + -0x510],RAX MOV EAX,dword ptr [RBP + -0x4f8] MOV dword ptr [RBP + -0x4fc],EAX MOV RDI,qword ptr [RBP + -0x4e0] LEA RSI,[RBP + -0x4c0] MOV EAX,dword ptr [RBP + -0x4f8] MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x4d0] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x4d0] LEA RCX,[RBP + -0x4c0] XOR ESI,ESI LEA RDX,[RBP + -0x4d8] CALL RAX MOV dword ptr [RBP + -0x4f8],EAX CMP EAX,0x0 JNZ 0x001c7ee5 MOV RAX,qword ptr [RBP + -0x4d0] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001ae540 CALL 0x001f6090 MOV dword ptr [RAX],0x7e MOV qword ptr [RBP + -0x4c8],0x0 JMP 0x001c7f2d LAB_001c7ee5: JMP 0x001c7ee7 LAB_001c7ee7: MOV RAX,qword ptr [RBP + -0x4d8] CMP RAX,qword ptr [RBP + -0x508] JC 0x001c7e40 MOV ECX,dword ptr [RBP + -0x4fc] MOV RAX,qword ptr [RBP + -0x4e8] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RBP + -0x4f0] MOV qword ptr [RAX],RCX JMP 0x001c7f1d LAB_001c7f1d: JMP 0x001c7f1f LAB_001c7f1f: MOV RAX,qword ptr [RBP + -0x518] MOV qword ptr [RBP + -0x4c8],RAX LAB_001c7f2d: MOV RAX,qword ptr [RBP + -0x4c8] MOV qword ptr [RBP + -0x520],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001c7f5d MOV RAX,qword ptr [RBP + -0x520] ADD RSP,0x520 POP RBP RET LAB_001c7f5d: CALL 0x0012a270
byte * _mi_find_last_pos(long *param_1,byte *param_2,int1 *param_3,uint *param_4, int8 *param_5) { ushort uVar1; byte *pbVar2; byte *pbVar3; uint uVar4; byte *pbVar5; int4 *puVar6; uint uVar7; long in_FS_OFFSET; byte *local_518; uint local_500; byte *local_4e0; long *local_4d8; byte *local_4d0; int1 local_4c8 [1208]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = ((uint)param_2[1] | (*param_2 & 0x7f) << 8) - 2; local_518 = param_2 + 2; local_4e0 = local_518; local_4d8 = param_1; if ((*(ushort *)((long)param_1 + 10) & 0x2e) == 0) { uVar1 = *(ushort *)((long)param_1 + 0x12); uVar7 = (uint)*(ushort *)((long)param_1 + 0x12); *param_4 = uVar7; local_518 = local_518 + (uVar4 / uVar1 - 2) * uVar7; *param_5 = local_518 + uVar7; memcpy(param_3,local_518,(ulong)uVar7); local_4d0 = local_518; } else { pbVar5 = local_518 + ((ulong)uVar4 - 2); *param_3 = 0; local_500 = 0; uVar4 = local_500; do { local_500 = uVar4; pbVar3 = local_4e0; pbVar2 = local_518; local_518 = local_4e0; memcpy(param_3,local_4c8,(ulong)local_500); uVar4 = (*(code *)local_4d8[9])(local_4d8,0,&local_4e0,local_4c8); if (uVar4 == 0) { mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268)); puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7e; local_4d0 = (byte *)0x0; goto LAB_001c7f2d; } } while (local_4e0 < pbVar5); *param_4 = local_500; *param_5 = pbVar3; local_4d0 = pbVar2; } LAB_001c7f2d: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_4d0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,064
decode_pos
eloqsql/storage/maria/ma_packrec.c
static uint decode_pos(MARIA_BIT_BUFF *bit_buff, MARIA_DECODE_TREE *decode_tree) { uint16 *pos=decode_tree->table; for (;;) { if (get_bit(bit_buff)) pos++; if (*pos & IS_CHAR) return (uint) (*pos & ~IS_CHAR); pos+= *pos; } }
O0
c
decode_pos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x3ffca movq -0x8(%rbp), %rax movl (%rax), %eax movq -0x8(%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 0x3ffee jmp 0x3fffa movq -0x8(%rbp), %rdi callq 0x3e850 movq -0x8(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x3fffa movq -0x18(%rbp), %rax addq $0x2, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax je 0x4001d movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0xffff7fff, %eax # imm = 0xFFFF7FFF addq $0x20, %rsp popq %rbp retq movq -0x18(%rbp), %rax movzwl (%rax), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x3ff9b nopw (%rax,%rax)
decode_pos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax loc_3FF9B: mov rax, [rbp+var_8] cmp dword ptr [rax+4], 0 jz short loc_3FFCA mov rax, [rbp+var_8] mov eax, [rax] mov rdx, [rbp+var_8] 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_3FFEE jmp short loc_3FFFA loc_3FFCA: mov rdi, [rbp+var_8] call fill_buffer mov rax, [rbp+var_8] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_8] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_3FFFA loc_3FFEE: mov rax, [rbp+var_18] add rax, 2 mov [rbp+var_18], rax loc_3FFFA: mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jz short loc_4001D mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 0FFFF7FFFh add rsp, 20h pop rbp retn loc_4001D: mov rax, [rbp+var_18] movzx ecx, word ptr [rax] mov rax, [rbp+var_18] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_18], rax jmp loc_3FF9B
long long decode_pos(int *a1, _WORD **a2) { int v2; // eax int v3; // ecx _WORD *i; // [rsp+8h] [rbp-18h] for ( i = *a2; ; i += (unsigned __int16)*i ) { if ( !a1[1] ) { fill_buffer((long long)a1); a1[1] = 31; if ( *a1 >= 0 ) goto LABEL_7; LABEL_6: ++i; goto LABEL_7; } v2 = *a1; v3 = a1[1] - 1; a1[1] = v3; if ( ((1 << v3) & v2) != 0 ) goto LABEL_6; LABEL_7: if ( (*i & 0x8000) != 0 ) break; } return *i & 0x7FFF; }
decode_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_0013ff9b: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0013ffca MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x8] 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 0x0013ffee JMP 0x0013fffa LAB_0013ffca: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013e850 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0013fffa LAB_0013ffee: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 MOV qword ptr [RBP + -0x18],RAX LAB_0013fffa: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JZ 0x0014001d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0xffff7fff ADD RSP,0x20 POP RBP RET LAB_0014001d: MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0013ff9b
ushort decode_pos(uint *param_1,int8 *param_2) { uint uVar1; ushort *local_20; local_20 = (ushort *)*param_2; while( true ) { if (param_1[1] == 0) { fill_buffer(param_1); param_1[1] = 0x1f; uVar1 = *param_1 & 0x80000000; } else { uVar1 = param_1[1]; param_1[1] = uVar1 - 1; uVar1 = *param_1 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 != 0) { local_20 = local_20 + 1; } if ((*local_20 & 0x8000) != 0) break; local_20 = local_20 + (int)(uint)*local_20; } return *local_20 & 0x7fff; }
2,065
string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string string_strip(const std::string & str) { size_t start = 0; size_t end = str.size(); while (start < end && std::isspace(str[start])) { start++; } while (end > start && std::isspace(str[end - 1])) { end--; } return str.substr(start, end - start); }
O2
cpp
string_strip(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 %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rbp movq 0x8(%rsi), %r13 xorl %r15d, %r15d cmpq %r15, %r13 je 0x5f7ab movsbl (%rbp,%r15), %edi callq 0x240c0 testl %eax, %eax je 0x5f7ae incq %r15 jmp 0x5f792 movq %r13, %r15 cmpq %r13, %r15 movq %r13, %r12 cmovbq %r15, %r12 cmpq %r15, %r13 jbe 0x5f7d5 movsbl -0x1(%rbp,%r13), %edi decq %r13 callq 0x240c0 testl %eax, %eax jne 0x5f7b8 incq %r13 movq %r13, %r12 subq %r15, %r12 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x24950 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov rbp, [rsi] mov r13, [rsi+8] xor r15d, r15d loc_5F792: cmp r13, r15 jz short loc_5F7AB movsx edi, byte ptr [rbp+r15+0] call _isspace test eax, eax jz short loc_5F7AE inc r15 jmp short loc_5F792 loc_5F7AB: mov r15, r13 loc_5F7AE: cmp r15, r13 mov r12, r13 cmovb r12, r15 loc_5F7B8: cmp r13, r15 jbe short loc_5F7D5 movsx edi, byte ptr [rbp+r13-1] dec r13 call _isspace test eax, eax jnz short loc_5F7B8 inc r13 mov r12, r13 loc_5F7D5: sub r12, r15 mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_strip(long long a1, long long *a2) { long long v3; // rbp unsigned long long v4; // r13 unsigned long long i; // r15 unsigned long long v6; // r12 long long v7; // rdi v3 = *a2; v4 = a2[1]; for ( i = 0LL; v4 != i; ++i ) { if ( !(unsigned int)isspace((unsigned int)*(char *)(v3 + i)) ) goto LABEL_6; } i = v4; LABEL_6: v6 = v4; if ( i < v4 ) v6 = i; while ( v4 > i ) { v7 = (unsigned int)*(char *)(v3 + v4-- - 1); if ( !(unsigned int)isspace(v7) ) { v6 = v4 + 1; break; } } std::string::substr(a1, a2, i, v6 - i); return a1; }
string_strip: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RBP,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] XOR R15D,R15D LAB_0015f792: CMP R13,R15 JZ 0x0015f7ab MOVSX EDI,byte ptr [RBP + R15*0x1] CALL 0x001240c0 TEST EAX,EAX JZ 0x0015f7ae INC R15 JMP 0x0015f792 LAB_0015f7ab: MOV R15,R13 LAB_0015f7ae: CMP R15,R13 MOV R12,R13 CMOVC R12,R15 LAB_0015f7b8: CMP R13,R15 JBE 0x0015f7d5 MOVSX EDI,byte ptr [RBP + R13*0x1 + -0x1] DEC R13 CALL 0x001240c0 TEST EAX,EAX JNZ 0x0015f7b8 INC R13 MOV R12,R13 LAB_0015f7d5: SUB R12,R15 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 CALL 0x00124950 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_strip(std::__cxx11::string const&) */ string * string_strip(string *param_1) { char *pcVar1; long lVar2; int iVar3; long *in_RSI; ulong uVar4; ulong uVar5; ulong uVar6; lVar2 = *in_RSI; uVar4 = in_RSI[1]; uVar5 = 0; while ((uVar6 = uVar4, uVar4 != uVar5 && (iVar3 = isspace((int)*(char *)(lVar2 + uVar5)), uVar6 = uVar5, iVar3 != 0))) { uVar5 = uVar5 + 1; } do { if (uVar4 <= uVar6) break; pcVar1 = (char *)(lVar2 + -1 + uVar4); uVar4 = uVar4 - 1; iVar3 = isspace((int)*pcVar1); } while (iVar3 != 0); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI); return param_1; }
2,066
ExportDataAsCode
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/utils.c
bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName) { bool success = false; #ifndef TEXT_BYTES_PER_LINE #define TEXT_BYTES_PER_LINE 20 #endif // NOTE: Text data buffer size is estimated considering raw data size in bytes // and requiring 6 char bytes for every byte: "0x00, " char *txtData = (char *)RL_CALLOC(dataSize*6 + 2000, sizeof(char)); int byteCount = 0; byteCount += sprintf(txtData + byteCount, "////////////////////////////////////////////////////////////////////////////////////////\n"); byteCount += sprintf(txtData + byteCount, "// //\n"); byteCount += sprintf(txtData + byteCount, "// DataAsCode exporter v1.0 - Raw data exported as an array of bytes //\n"); byteCount += sprintf(txtData + byteCount, "// //\n"); byteCount += sprintf(txtData + byteCount, "// more info and bugs-report: github.com/raysan5/raylib //\n"); byteCount += sprintf(txtData + byteCount, "// feedback and support: ray[at]raylib.com //\n"); byteCount += sprintf(txtData + byteCount, "// //\n"); byteCount += sprintf(txtData + byteCount, "// Copyright (c) 2022-2024 Ramon Santamaria (@raysan5) //\n"); byteCount += sprintf(txtData + byteCount, "// //\n"); byteCount += sprintf(txtData + byteCount, "////////////////////////////////////////////////////////////////////////////////////////\n\n"); // Get file name from path char varFileName[256] = { 0 }; strcpy(varFileName, GetFileNameWithoutExt(fileName)); for (int i = 0; varFileName[i] != '\0'; i++) { // Convert variable name to uppercase if ((varFileName[i] >= 'a') && (varFileName[i] <= 'z')) { varFileName[i] = varFileName[i] - 32; } // Replace non valid character for C identifier with '_' else if (varFileName[i] == '.' || varFileName[i] == '-' || varFileName[i] == '?' || varFileName[i] == '!' || varFileName[i] == '+') { varFileName[i] = '_'; } } byteCount += sprintf(txtData + byteCount, "#define %s_DATA_SIZE %i\n\n", varFileName, dataSize); byteCount += sprintf(txtData + byteCount, "static unsigned char %s_DATA[%s_DATA_SIZE] = { ", varFileName, varFileName); for (int i = 0; i < (dataSize - 1); i++) byteCount += sprintf(txtData + byteCount, ((i%TEXT_BYTES_PER_LINE == 0)? "0x%x,\n" : "0x%x, "), data[i]); byteCount += sprintf(txtData + byteCount, "0x%x };\n", data[dataSize - 1]); // NOTE: Text data size exported is determined by '\0' (NULL) character success = SaveFileText(fileName, txtData); RL_FREE(txtData); if (success != 0) TRACELOG(LOG_INFO, "FILEIO: [%s] Data as code exported successfully", fileName); else TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to export data as code", fileName); return success; }
O2
c
ExportDataAsCode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rdx, %rbx movl %esi, %ebp movq %rdi, 0x8(%rsp) imull $0x6, %esi, %eax addl $0x7d0, %eax # imm = 0x7D0 movslq %eax, %rdi pushq $0x1 popq %rsi callq 0x9320 movq %rax, %r14 leaq 0x2cba2(%rip), %rsi # 0xce283 pushq $0x59 popq %r12 movq %rax, %rdi movq %r12, %rdx callq 0x9400 leaq 0x59(%r14), %rdi leaq 0x2cbe2(%rip), %r13 # 0xce2dd movq %r13, %rsi movq %r12, %rdx callq 0x9400 leaq 0xb2(%r14), %rdi leaq 0x339ef(%rip), %rsi # 0xd5103 movq %r12, %rdx callq 0x9400 leaq 0x10b(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x9400 leaq 0x164(%r14), %rdi leaq 0x2cc55(%rip), %rsi # 0xce391 movq %r12, %rdx callq 0x9400 leaq 0x1bd(%r14), %rdi leaq 0x2cc99(%rip), %rsi # 0xce3eb movq %r12, %rdx callq 0x9400 leaq 0x216(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x9400 leaq 0x26f(%r14), %rdi leaq 0x339e3(%rip), %rsi # 0xd515d movq %r12, %rdx callq 0x9400 leaq 0x2c8(%r14), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x9400 leaq 0x321(%r14), %rdi leaq 0x2cebf(%rip), %rsi # 0xce661 pushq $0x5b popq %rdx callq 0x9400 leaq 0x20(%rsp), %r12 movl $0x100, %edx # imm = 0x100 movq %r12, %rdi xorl %esi, %esi callq 0x92c0 movq %rbx, %rdi callq 0x63782 movq %r12, %rdi movq %rax, %rsi callq 0x94a0 movabsq $-0x7fff97fe00000000, %rax # imm = 0x8000680200000000 movzbl (%r12), %ecx testl %ecx, %ecx je 0xa180b leal -0x61(%rcx), %edx cmpb $0x19, %dl ja 0xa17f3 addb $-0x20, %cl movl %ecx, %edx jmp 0xa1802 cmpl $0x3f, %ecx ja 0xa1806 movb $0x5f, %dl movl %ecx, %ecx btq %rcx, %rax jae 0xa1806 movb %dl, (%r12) incq %r12 jmp 0xa17db movq %rbx, 0x18(%rsp) leaq 0x37b(%r14), %rdi leaq 0x33999(%rip), %rsi # 0xd51b7 leaq 0x20(%rsp), %r12 movq %r12, %rdx movl %ebp, %ecx xorl %eax, %eax callq 0x90d0 movslq %eax, %rbx leaq (%r14,%rbx), %rdi addq $0x37b, %rdi # imm = 0x37B leaq 0x33991(%rip), %rsi # 0xd51d5 movq %r12, %rdx movq %r12, %rcx xorl %eax, %eax callq 0x90d0 addl %eax, %ebx addl $0x37b, %ebx # imm = 0x37B movslq %ebp, %rcx decq %rcx testl %ecx, %ecx movl $0x0, %ebp movq %rcx, 0x10(%rsp) cmovgl %ecx, %ebp pushq $0x14 popq %r13 leaq 0x317dc(%rip), %r15 # 0xd3055 xorl %r12d, %r12d movl %r12d, %eax xorl %edx, %edx divl %r13d movslq %ebx, %rdi addq %r14, %rdi cmpq %r12, %rbp je 0xa18b9 imull $-0x14, %eax, %eax movq %r15, %rsi addl %r12d, %eax je 0xa18a1 leaq 0x1a929(%rip), %rsi # 0xbc1ca movq 0x8(%rsp), %rax movzbl (%rax,%r12), %edx xorl %eax, %eax callq 0x90d0 addl %eax, %ebx incq %r12 jmp 0xa187c movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %edx leaq 0x1a903(%rip), %rsi # 0xbc1d1 xorl %eax, %eax callq 0x90d0 movq 0x18(%rsp), %rbx movq %rbx, %rdi movq %r14, %rsi callq 0xa1927 movl %eax, %ebp movq %r14, %rdi callq 0x9640 testb %bpl, %bpl je 0xa18ff leaq 0x3390a(%rip), %rsi # 0xd5205 pushq $0x3 jmp 0xa1908 leaq 0x3392f(%rip), %rsi # 0xd5235 pushq $0x4 popq %rdi movq %rbx, %rdx xorl %eax, %eax callq 0xa128b movl %ebp, %eax addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ExportDataAsCode: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov rbx, rdx mov ebp, esi mov [rsp+158h+var_150], rdi imul eax, esi, 6 add eax, 7D0h movsxd rdi, eax push 1 pop rsi call _calloc mov r14, rax lea rsi, asc_CE283; "///////////////////////////////////////"... push 59h ; 'Y' pop r12 mov rdi, rax mov rdx, r12 call _memcpy lea rdi, [r14+59h] lea r13, asc_CE2DD; "// "... mov rsi, r13 mov rdx, r12 call _memcpy lea rdi, [r14+0B2h] lea rsi, aDataascodeExpo; "// DataAsCode exporter v1.0 - Raw data "... mov rdx, r12 call _memcpy lea rdi, [r14+10Bh] mov rsi, r13 mov rdx, r12 call _memcpy lea rdi, [r14+164h] lea rsi, aMoreInfoAndBug_0; "// more info and bugs-report: github.c"... mov rdx, r12 call _memcpy lea rdi, [r14+1BDh] lea rsi, aFeedbackAndSup_0; "// feedback and support: ray[at]r"... mov rdx, r12 call _memcpy lea rdi, [r14+216h] mov rsi, r13 mov rdx, r12 call _memcpy lea rdi, [r14+26Fh] lea rsi, aCopyrightC2022; "// Copyright (c) 2022-2024 Ramon Santam"... mov rdx, r12 call _memcpy lea rdi, [r14+2C8h] mov rsi, r13 mov rdx, r12 call _memcpy lea rdi, [r14+321h] lea rsi, asc_CE661; "///////////////////////////////////////"... push 5Bh ; '[' pop rdx call _memcpy lea r12, [rsp+158h+var_138] mov edx, 100h mov rdi, r12 xor esi, esi call _memset mov rdi, rbx call GetFileNameWithoutExt mov rdi, r12 mov rsi, rax call _strcpy mov rax, 8000680200000000h loc_A17DB: movzx ecx, byte ptr [r12] test ecx, ecx jz short loc_A180B lea edx, [rcx-61h] cmp dl, 19h ja short loc_A17F3 add cl, 0E0h mov edx, ecx jmp short loc_A1802 loc_A17F3: cmp ecx, 3Fh ; '?' ja short loc_A1806 mov dl, 5Fh ; '_' mov ecx, ecx bt rax, rcx jnb short loc_A1806 loc_A1802: mov [r12], dl loc_A1806: inc r12 jmp short loc_A17DB loc_A180B: mov [rsp+158h+var_140], rbx lea rdi, [r14+37Bh] lea rsi, aDefineSDataSiz; "#define %s_DATA_SIZE %i\n\n" lea r12, [rsp+158h+var_138] mov rdx, r12 mov ecx, ebp xor eax, eax call _sprintf movsxd rbx, eax lea rdi, [r14+rbx] add rdi, 37Bh lea rsi, aStaticUnsigned_1; "static unsigned char %s_DATA[%s_DATA_SI"... mov rdx, r12 mov rcx, r12 xor eax, eax call _sprintf add ebx, eax add ebx, 37Bh movsxd rcx, ebp dec rcx test ecx, ecx mov ebp, 0 mov [rsp+158h+var_148], rcx cmovg ebp, ecx push 14h pop r13 lea r15, a0xX_2; "0x%x,\n" xor r12d, r12d loc_A187C: mov eax, r12d xor edx, edx div r13d movsxd rdi, ebx add rdi, r14 cmp rbp, r12 jz short loc_A18B9 imul eax, -14h mov rsi, r15 add eax, r12d jz short loc_A18A1 lea rsi, a0xX_0; "0x%x, " loc_A18A1: mov rax, [rsp+158h+var_150] movzx edx, byte ptr [rax+r12] xor eax, eax call _sprintf add ebx, eax inc r12 jmp short loc_A187C loc_A18B9: mov rax, [rsp+158h+var_150] mov rcx, [rsp+158h+var_148] movzx edx, byte ptr [rax+rcx] lea rsi, a0xX_1; "0x%x };\n" xor eax, eax call _sprintf mov rbx, [rsp+158h+var_140] mov rdi, rbx mov rsi, r14 call SaveFileText mov ebp, eax mov rdi, r14 call _free test bpl, bpl jz short loc_A18FF lea rsi, aFileioSDataAsC; "FILEIO: [%s] Data as code exported succ"... push 3 jmp short loc_A1908 loc_A18FF: lea rsi, aFileioSFailedT_8; "FILEIO: [%s] Failed to export data as c"... push 4 loc_A1908: pop rdi mov rdx, rbx xor eax, eax call TraceLog mov eax, ebp add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ExportDataAsCode(long long a1, int a2, long long a3) { long long v4; // r14 char *v5; // r12 _BYTE *FileNameWithoutExt; // rax unsigned long long v7; // rax unsigned int v8; // ecx char v9; // dl int v10; // ebx int v11; // ebx long long v12; // rbp long long i; // r12 long long v14; // rdi const char *v15; // rsi unsigned int v16; // ebp long long v19; // [rsp+10h] [rbp-148h] long long v20; // [rsp+18h] [rbp-140h] char v21[312]; // [rsp+20h] [rbp-138h] BYREF v4 = calloc(6 * a2 + 2000, 1LL); memcpy(v4, "////////////////////////////////////////////////////////////////////////////////////////\n", 89LL); memcpy(v4 + 89, "// //\n", 89LL); memcpy(v4 + 178, "// DataAsCode exporter v1.0 - Raw data exported as an array of bytes //\n", 89LL); memcpy(v4 + 267, "// //\n", 89LL); memcpy(v4 + 356, "// more info and bugs-report: github.com/raysan5/raylib //\n", 89LL); memcpy(v4 + 445, "// feedback and support: ray[at]raylib.com //\n", 89LL); memcpy(v4 + 534, "// //\n", 89LL); memcpy(v4 + 623, "// Copyright (c) 2022-2024 Ramon Santamaria (@raysan5) //\n", 89LL); memcpy(v4 + 712, "// //\n", 89LL); memcpy(v4 + 801, "////////////////////////////////////////////////////////////////////////////////////////\n\n", 91LL); v5 = v21; memset(v21, 0LL, 256LL); FileNameWithoutExt = GetFileNameWithoutExt(a3); strcpy(v21, FileNameWithoutExt); v7 = 0x8000680200000000LL; while ( 1 ) { v8 = (unsigned __int8)*v5; if ( !*v5 ) break; if ( (unsigned __int8)(v8 - 97) <= 0x19u ) { v9 = v8 - 32; LABEL_7: *v5 = v9; goto LABEL_8; } if ( v8 <= 0x3F ) { v9 = 95; if ( _bittest64((const long long *)&v7, (unsigned __int8)*v5) ) goto LABEL_7; } LABEL_8: ++v5; } v20 = a3; v10 = sprintf(v4 + 891, "#define %s_DATA_SIZE %i\n\n", v21, a2); v11 = sprintf(v4 + v10 + 891, "static unsigned char %s_DATA[%s_DATA_SIZE] = { ", v21, v21) + v10 + 891; v12 = 0LL; v19 = a2 - 1LL; if ( a2 - 1 > 0 ) v12 = (unsigned int)(a2 - 1); for ( i = 0LL; ; ++i ) { v14 = v4 + v11; if ( v12 == i ) break; v15 = "0x%x,\n"; if ( (unsigned int)i % 0x14 ) v15 = "0x%x, "; v11 += sprintf(v14, v15, *(unsigned __int8 *)(a1 + i)); } sprintf(v14, "0x%x };\n", *(unsigned __int8 *)(a1 + v19)); v16 = SaveFileText(v20, v4); free(v4); if ( (_BYTE)v16 ) TraceLog(3, (long long)"FILEIO: [%s] Data as code exported successfully", v20); else TraceLog(4, (long long)"FILEIO: [%s] Failed to export data as code", v20); return v16; }
ExportDataAsCode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV RBX,RDX MOV EBP,ESI MOV qword ptr [RSP + 0x8],RDI IMUL EAX,ESI,0x6 ADD EAX,0x7d0 MOVSXD RDI,EAX PUSH 0x1 POP RSI CALL 0x00109320 MOV R14,RAX LEA RSI,[0x1ce283] PUSH 0x59 POP R12 MOV RDI,RAX MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x59] LEA R13,[0x1ce2dd] MOV RSI,R13 MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0xb2] LEA RSI,[0x1d5103] MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x10b] MOV RSI,R13 MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x164] LEA RSI,[0x1ce391] MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x1bd] LEA RSI,[0x1ce3eb] MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x216] MOV RSI,R13 MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x26f] LEA RSI,[0x1d515d] MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x2c8] MOV RSI,R13 MOV RDX,R12 CALL 0x00109400 LEA RDI,[R14 + 0x321] LEA RSI,[0x1ce661] PUSH 0x5b POP RDX CALL 0x00109400 LEA R12,[RSP + 0x20] MOV EDX,0x100 MOV RDI,R12 XOR ESI,ESI CALL 0x001092c0 MOV RDI,RBX CALL 0x00163782 MOV RDI,R12 MOV RSI,RAX CALL 0x001094a0 MOV RAX,-0x7fff97fe00000000 LAB_001a17db: MOVZX ECX,byte ptr [R12] TEST ECX,ECX JZ 0x001a180b LEA EDX,[RCX + -0x61] CMP DL,0x19 JA 0x001a17f3 ADD CL,0xe0 MOV EDX,ECX JMP 0x001a1802 LAB_001a17f3: CMP ECX,0x3f JA 0x001a1806 MOV DL,0x5f MOV ECX,ECX BT RAX,RCX JNC 0x001a1806 LAB_001a1802: MOV byte ptr [R12],DL LAB_001a1806: INC R12 JMP 0x001a17db LAB_001a180b: MOV qword ptr [RSP + 0x18],RBX LEA RDI,[R14 + 0x37b] LEA RSI,[0x1d51b7] LEA R12,[RSP + 0x20] MOV RDX,R12 MOV ECX,EBP XOR EAX,EAX CALL 0x001090d0 MOVSXD RBX,EAX LEA RDI,[R14 + RBX*0x1] ADD RDI,0x37b LEA RSI,[0x1d51d5] MOV RDX,R12 MOV RCX,R12 XOR EAX,EAX CALL 0x001090d0 ADD EBX,EAX ADD EBX,0x37b MOVSXD RCX,EBP DEC RCX TEST ECX,ECX MOV EBP,0x0 MOV qword ptr [RSP + 0x10],RCX CMOVG EBP,ECX PUSH 0x14 POP R13 LEA R15,[0x1d3055] XOR R12D,R12D LAB_001a187c: MOV EAX,R12D XOR EDX,EDX DIV R13D MOVSXD RDI,EBX ADD RDI,R14 CMP RBP,R12 JZ 0x001a18b9 IMUL EAX,EAX,-0x14 MOV RSI,R15 ADD EAX,R12D JZ 0x001a18a1 LEA RSI,[0x1bc1ca] LAB_001a18a1: MOV RAX,qword ptr [RSP + 0x8] MOVZX EDX,byte ptr [RAX + R12*0x1] XOR EAX,EAX CALL 0x001090d0 ADD EBX,EAX INC R12 JMP 0x001a187c LAB_001a18b9: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDX,byte ptr [RAX + RCX*0x1] LEA RSI,[0x1bc1d1] XOR EAX,EAX CALL 0x001090d0 MOV RBX,qword ptr [RSP + 0x18] MOV RDI,RBX MOV RSI,R14 CALL 0x001a1927 MOV EBP,EAX MOV RDI,R14 CALL 0x00109640 TEST BPL,BPL JZ 0x001a18ff LEA RSI,[0x1d5205] PUSH 0x3 JMP 0x001a1908 LAB_001a18ff: LEA RSI,[0x1d5235] PUSH 0x4 LAB_001a1908: POP RDI MOV RDX,RBX XOR EAX,EAX CALL 0x001a128b MOV EAX,EBP ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 ExportDataAsCode(long param_1,uint param_2,int8 param_3) { byte bVar1; int iVar2; int iVar3; int4 uVar4; void *__dest; char *pcVar5; byte bVar6; ulong uVar7; ulong uVar8; byte *__dest_00; ulong uVar9; int8 uStack_160; byte local_138 [264]; __dest = calloc((long)(int)(param_2 * 6 + 2000),1); memcpy(__dest, "////////////////////////////////////////////////////////////////////////////////////////\n" ,0x59); memcpy((void *)((long)__dest + 0x59), "// //\n" ,0x59); memcpy((void *)((long)__dest + 0xb2), "// DataAsCode exporter v1.0 - Raw data exported as an array of bytes //\n" ,0x59); memcpy((void *)((long)__dest + 0x10b), "// //\n" ,0x59); memcpy((void *)((long)__dest + 0x164), "// more info and bugs-report: github.com/raysan5/raylib //\n" ,0x59); memcpy((void *)((long)__dest + 0x1bd), "// feedback and support: ray[at]raylib.com //\n" ,0x59); memcpy((void *)((long)__dest + 0x216), "// //\n" ,0x59); memcpy((void *)((long)__dest + 0x26f), "// Copyright (c) 2022-2024 Ramon Santamaria (@raysan5) //\n" ,0x59); memcpy((void *)((long)__dest + 0x2c8), "// //\n" ,0x59); memcpy((void *)((long)__dest + 0x321), "////////////////////////////////////////////////////////////////////////////////////////\n\n" ,0x5b); __dest_00 = local_138; memset(__dest_00,0,0x100); pcVar5 = (char *)GetFileNameWithoutExt(param_3); strcpy((char *)__dest_00,pcVar5); do { bVar1 = *__dest_00; if (bVar1 == 0) { iVar2 = sprintf((char *)((long)__dest + 0x37b),"#define %s_DATA_SIZE %i\n\n",local_138, (ulong)param_2); iVar3 = sprintf((char *)((long)__dest + (long)iVar2 + 0x37b), "static unsigned char %s_DATA[%s_DATA_SIZE] = { ",local_138,local_138); iVar2 = iVar2 + iVar3 + 0x37b; uVar7 = (long)(int)param_2 - 1; uVar8 = 0; if (0 < (int)uVar7) { uVar8 = uVar7 & 0xffffffff; } uVar9 = 0; while( true ) { if (uVar8 == uVar9) break; pcVar5 = "0x%x,\n"; if ((int)((uVar9 & 0xffffffff) / 0x14) * -0x14 + (int)uVar9 != 0) { pcVar5 = "0x%x, "; } iVar3 = sprintf((char *)((long)iVar2 + (long)__dest),pcVar5, (ulong)*(byte *)(param_1 + uVar9)); iVar2 = iVar2 + iVar3; uVar9 = uVar9 + 1; } sprintf((char *)((long)iVar2 + (long)__dest),"0x%x };\n",(ulong)*(byte *)(param_1 + uVar7)); uVar4 = SaveFileText(param_3,__dest); free(__dest); if ((char)uVar4 == '\0') { pcVar5 = "FILEIO: [%s] Failed to export data as code"; uStack_160 = 4; } else { pcVar5 = "FILEIO: [%s] Data as code exported successfully"; uStack_160 = 3; } TraceLog(uStack_160,pcVar5,param_3); return uVar4; } if ((byte)(bVar1 + 0x9f) < 0x1a) { bVar6 = bVar1 - 0x20; LAB_001a1802: *__dest_00 = bVar6; } else if ((bVar1 < 0x40) && (bVar6 = 0x5f, (0x8000680200000000U >> ((ulong)(uint)bVar1 & 0x3f) & 1) != 0)) goto LAB_001a1802; __dest_00 = __dest_00 + 1; } while( true ); }
2,067
my_wc_mb_bin
eloqsql/strings/ctype-bin.c
int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (s >= e) return MY_CS_TOOSMALL; if (wc < 256) { s[0]= (char) wc; return 1; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_bin: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xad34f xorl %eax, %eax cmpq $0xff, %rsi ja 0xad34f movb %sil, (%rdx) movl $0x1, %eax popq %rbp retq
my_wc_mb_bin: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_AD34F xor eax, eax cmp rsi, 0FFh ja short loc_AD34F mov [rdx], sil mov eax, 1 loc_AD34F: pop rbp retn
long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { result = 0LL; if ( a2 <= 0xFF ) { *a3 = a2; return 1LL; } } return result; }
my_wc_mb_bin: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001ad34f XOR EAX,EAX CMP RSI,0xff JA 0x001ad34f MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_001ad34f: POP RBP RET
int8 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if ((param_3 < param_4) && (uVar1 = 0, param_2 < 0x100)) { *param_3 = (char)param_2; uVar1 = 1; } return uVar1; }
2,068
js_math_imul
bluesky950520[P]quickjs/quickjs.c
static JSValue js_math_imul(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint32_t a, b, c; int32_t d; if (JS_ToUint32(ctx, &a, argv[0])) return JS_EXCEPTION; if (JS_ToUint32(ctx, &b, argv[1])) return JS_EXCEPTION; c = a * b; memcpy(&d, &c, sizeof(d)); return js_int32(d); }
O0
c
js_math_imul: subq $0x48, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0xc(%rsp), %rsi callq 0x53c30 cmpl $0x0, %eax je 0xdedaf movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0xdee09 movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x8(%rsp), %rsi callq 0x53c30 cmpl $0x0, %eax je 0xdede3 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0xdee09 movl 0xc(%rsp), %eax imull 0x8(%rsp), %eax movl %eax, 0x4(%rsp) movl 0x4(%rsp), %eax movl %eax, (%rsp) movl (%rsp), %edi callq 0x39fb0 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x48, %rsp retq nopl (%rax,%rax)
js_math_imul: sub rsp, 48h mov [rsp+48h+var_20], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_28], rdi mov [rsp+48h+var_2C], ecx mov [rsp+48h+var_38], r8 mov rdi, [rsp+48h+var_28] mov rax, [rsp+48h+var_38] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+48h+var_3C] call JS_ToUint32_1 cmp eax, 0 jz short loc_DEDAF mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp short loc_DEE09 loc_DEDAF: mov rdi, [rsp+48h+var_28] mov rax, [rsp+48h+var_38] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+48h+var_40] call JS_ToUint32_1 cmp eax, 0 jz short loc_DEDE3 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp short loc_DEE09 loc_DEDE3: mov eax, [rsp+48h+var_3C] imul eax, [rsp+48h+var_40] mov [rsp+48h+var_44], eax mov eax, [rsp+48h+var_44] mov [rsp+48h+var_48], eax mov edi, [rsp+48h+var_48] call js_int32 mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx loc_DEE09: mov rax, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] add rsp, 48h retn
long long js_math_imul(long long a1, long long a2, long long a3, int a4, long long a5) { long long v5; // rdx int v7; // [rsp+8h] [rbp-40h] BYREF int v8; // [rsp+Ch] [rbp-3Ch] BYREF long long v9; // [rsp+10h] [rbp-38h] int v10; // [rsp+1Ch] [rbp-2Ch] long long v11; // [rsp+20h] [rbp-28h] long long v12; // [rsp+28h] [rbp-20h] long long v13; // [rsp+30h] [rbp-18h] long long v14; // [rsp+38h] [rbp-10h] long long v15; // [rsp+40h] [rbp-8h] v12 = a2; v13 = a3; v11 = a1; v10 = a4; v9 = a5; if ( (unsigned int)JS_ToUint32_1(a1, (long long)&v8, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) ) { LODWORD(v14) = 0; v15 = 6LL; } else if ( (unsigned int)JS_ToUint32_1(v11, (long long)&v7, *(_DWORD **)(v9 + 16), *(_QWORD *)(v9 + 24)) ) { LODWORD(v14) = 0; v15 = 6LL; } else { v14 = js_int32(v7 * v8); v15 = v5; } return v14; }
js_math_imul: SUB RSP,0x48 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0xc] CALL 0x00153c30 CMP EAX,0x0 JZ 0x001dedaf MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x001dee09 LAB_001dedaf: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x8] CALL 0x00153c30 CMP EAX,0x0 JZ 0x001dede3 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x001dee09 LAB_001dede3: MOV EAX,dword ptr [RSP + 0xc] IMUL EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP],EAX MOV EDI,dword ptr [RSP] CALL 0x00139fb0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX LAB_001dee09: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int1 [16] js_math_imul(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int iVar1; int1 auVar2 [16]; int local_40; int local_3c; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar1 = JS_ToUint32(param_1,&local_3c,*param_5,param_5[1]); if (iVar1 == 0) { iVar1 = JS_ToUint32(local_28,&local_40,local_38[2],local_38[3]); if (iVar1 == 0) { auVar2 = js_int32(local_3c * local_40); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { local_10 = 0; local_8 = 6; } } else { local_10 = 0; local_8 = 6; } auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
2,069
js_math_imul
bluesky950520[P]quickjs/quickjs.c
static JSValue js_math_imul(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint32_t a, b, c; int32_t d; if (JS_ToUint32(ctx, &a, argv[0])) return JS_EXCEPTION; if (JS_ToUint32(ctx, &b, argv[1])) return JS_EXCEPTION; c = a * b; memcpy(&d, &c, sizeof(d)); return js_int32(d); }
O1
c
js_math_imul: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %r8, %r15 movq %rdi, %r14 movq (%r8), %rdx movq 0x8(%r8), %rcx movq %rdx, (%rsp) cmpl $-0x9, %ecx jb 0x8222c movq (%rsp), %rax incl (%rax) leaq 0xc(%rsp), %rsi movq %r14, %rdi callq 0x2ba1f movl $0x6, %ebx testl %eax, %eax jne 0x82268 movq 0x10(%r15), %rdx movq 0x18(%r15), %rcx movq %rdx, (%rsp) cmpl $-0x9, %ecx jb 0x82259 movq (%rsp), %rax incl (%rax) movq %rsp, %rsi movq %r14, %rdi callq 0x2ba1f testl %eax, %eax je 0x82277 xorl %eax, %eax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movl (%rsp), %eax imull 0xc(%rsp), %eax xorl %ebx, %ebx jmp 0x8226a
js_math_imul: push r15 push r14 push rbx sub rsp, 10h mov r15, r8 mov r14, rdi mov rdx, [r8] mov rcx, [r8+8] mov [rsp+28h+var_28], rdx cmp ecx, 0FFFFFFF7h jb short loc_8222C mov rax, [rsp+28h+var_28] inc dword ptr [rax] loc_8222C: lea rsi, [rsp+28h+var_1C] mov rdi, r14 call JS_ToInt32Free mov ebx, 6 test eax, eax jnz short loc_82268 mov rdx, [r15+10h] mov rcx, [r15+18h] mov [rsp+28h+var_28], rdx cmp ecx, 0FFFFFFF7h jb short loc_82259 mov rax, [rsp+28h+var_28] inc dword ptr [rax] loc_82259: mov rsi, rsp mov rdi, r14 call JS_ToInt32Free test eax, eax jz short loc_82277 loc_82268: xor eax, eax loc_8226A: mov rdx, rbx add rsp, 10h pop rbx pop r14 pop r15 retn loc_82277: mov eax, dword ptr [rsp+28h+var_28] imul eax, [rsp+28h+var_1C] xor ebx, ebx jmp short loc_8226A
long long js_math_imul(long long a1, long long a2, long long a3, long long a4, unsigned long long *a5) { unsigned long long v6; // rdx long long v7; // rcx unsigned long long v8; // rdx long long v9; // rcx int v11[3]; // [rsp+0h] [rbp-28h] BYREF int v12[7]; // [rsp+Ch] [rbp-1Ch] BYREF v6 = *a5; v7 = a5[1]; *(_QWORD *)v11 = *a5; if ( (unsigned int)v7 >= 0xFFFFFFF7 ) ++**(_DWORD **)v11; if ( (unsigned int)JS_ToInt32Free(a1, v12, v6, v7) ) return 0LL; v8 = a5[2]; v9 = a5[3]; *(_QWORD *)v11 = v8; if ( (unsigned int)v9 >= 0xFFFFFFF7 ) ++**(_DWORD **)v11; if ( (unsigned int)JS_ToInt32Free(a1, v11, v8, v9) ) return 0LL; else return (unsigned int)(v12[0] * v11[0]); }
js_math_imul: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,R8 MOV R14,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] MOV qword ptr [RSP],RDX CMP ECX,-0x9 JC 0x0018222c MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_0018222c: LEA RSI,[RSP + 0xc] MOV RDI,R14 CALL 0x0012ba1f MOV EBX,0x6 TEST EAX,EAX JNZ 0x00182268 MOV RDX,qword ptr [R15 + 0x10] MOV RCX,qword ptr [R15 + 0x18] MOV qword ptr [RSP],RDX CMP ECX,-0x9 JC 0x00182259 MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_00182259: MOV RSI,RSP MOV RDI,R14 CALL 0x0012ba1f TEST EAX,EAX JZ 0x00182277 LAB_00182268: XOR EAX,EAX LAB_0018226a: MOV RDX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_00182277: MOV EAX,dword ptr [RSP] IMUL EAX,dword ptr [RSP + 0xc] XOR EBX,EBX JMP 0x0018226a
int js_math_imul(int8 param_1) { int iVar1; int8 *in_R8; int *local_28; int local_1c; local_28 = (int *)*in_R8; if (0xfffffff6 < (uint)in_R8[1]) { *local_28 = *local_28 + 1; } iVar1 = JS_ToInt32Free(param_1,&local_1c); if (iVar1 == 0) { local_28 = (int *)in_R8[2]; if (0xfffffff6 < (uint)in_R8[3]) { *local_28 = *local_28 + 1; } iVar1 = JS_ToInt32Free(param_1,&local_28); if (iVar1 == 0) { return (int)local_28 * local_1c; } } return 0; }
2,070
blst_uint32_from_scalar
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c
void blst_uint32_from_scalar(unsigned int ret[8], const pow256 a) { const union { long one; char little; } is_endian = { 1 }; size_t i; if ((uptr_t)ret==(uptr_t)a && is_endian.little) return; for(i = 0; i < 8; i++) { unsigned int w = (unsigned int)(*a++); w |= (unsigned int)(*a++) << 8; w |= (unsigned int)(*a++) << 16; w |= (unsigned int)(*a++) << 24; ret[i] = w; } }
O1
c
blst_uint32_from_scalar: pushq %rbp movq %rsp, %rbp cmpq %rsi, %rdi je 0x257b8 xorl %eax, %eax movl (%rsi,%rax,4), %ecx movl %ecx, (%rdi,%rax,4) incq %rax cmpq $0x8, %rax jne 0x257a9 popq %rbp retq
blst_uint32_from_scalar: push rbp mov rbp, rsp cmp rdi, rsi jz short loc_257B8 xor eax, eax loc_257A9: mov ecx, [rsi+rax*4] mov [rdi+rax*4], ecx inc rax cmp rax, 8 jnz short loc_257A9 loc_257B8: pop rbp retn
void blst_uint32_from_scalar(long long a1, long long a2) { long long i; // rax if ( a1 != a2 ) { for ( i = 0LL; i != 8; ++i ) *(_DWORD *)(a1 + 4 * i) = *(_DWORD *)(a2 + 4 * i); } }
blst_uint32_from_scalar: PUSH RBP MOV RBP,RSP CMP RDI,RSI JZ 0x001257b8 XOR EAX,EAX LAB_001257a9: MOV ECX,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDI + RAX*0x4],ECX INC RAX CMP RAX,0x8 JNZ 0x001257a9 LAB_001257b8: POP RBP RET
void blst_uint32_from_scalar(long param_1,long param_2) { long lVar1; if (param_1 != param_2) { lVar1 = 0; do { *(int4 *)(param_1 + lVar1 * 4) = *(int4 *)(param_2 + lVar1 * 4); lVar1 = lVar1 + 1; } while (lVar1 != 8); } return; }
2,071
js_strdup
bluesky950520[P]quickjs/quickjs.c
char *js_strdup(JSContext *ctx, const char *str) { return js_strndup(ctx, str, strlen(str)); }
O1
c
js_strdup: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq %rsi, %rdi callq 0xe240 movq %rax, %r14 leaq 0x1(%rax), %rsi movq %r15, %rdi callq 0xed5d movq %rax, %r15 testq %rax, %rax je 0xee18 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0xe5a0 movb $0x0, (%r15,%r14) movq %r15, %rax popq %rbx popq %r14 popq %r15 retq
js_strdup: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov rdi, rsi call _strlen mov r14, rax lea rsi, [rax+1] mov rdi, r15 call js_malloc mov r15, rax test rax, rax jz short loc_EE18 mov rdi, r15 mov rsi, rbx mov rdx, r14 call _memcpy mov byte ptr [r15+r14], 0 loc_EE18: mov rax, r15 pop rbx pop r14 pop r15 retn
long long js_strdup(long long a1, long long a2) { long long v2; // r14 long long v3; // rax long long v4; // r15 v2 = strlen(a2); v3 = js_malloc(a1, v2 + 1); v4 = v3; if ( v3 ) { memcpy(v3, a2, v2); *(_BYTE *)(v4 + v2) = 0; } return v4; }
js_strdup: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV RDI,RSI CALL 0x0010e240 MOV R14,RAX LEA RSI,[RAX + 0x1] MOV RDI,R15 CALL 0x0010ed5d MOV R15,RAX TEST RAX,RAX JZ 0x0010ee18 MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x0010e5a0 MOV byte ptr [R15 + R14*0x1],0x0 LAB_0010ee18: MOV RAX,R15 POP RBX POP R14 POP R15 RET
void * js_strdup(int8 param_1,char *param_2) { size_t __n; void *__dest; __n = strlen(param_2); __dest = (void *)js_malloc(param_1,__n + 1); if (__dest != (void *)0x0) { memcpy(__dest,param_2,__n); *(int1 *)((long)__dest + __n) = 0; } return __dest; }
2,072
js_strdup
bluesky950520[P]quickjs/quickjs.c
char *js_strdup(JSContext *ctx, const char *str) { return js_strndup(ctx, str, strlen(str)); }
O3
c
js_strdup: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq %rsi, %rdi callq 0xe240 movq %rax, %r14 leaq 0x1(%rax), %rsi movq %r15, %rdi callq 0xed89 movq %rax, %r15 testq %rax, %rax je 0xee5e movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0xe5a0 movb $0x0, (%r15,%r14) movq %r15, %rax popq %rbx popq %r14 popq %r15 retq
js_strdup: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov rdi, rsi call _strlen mov r14, rax lea rsi, [rax+1] mov rdi, r15 call js_malloc mov r15, rax test rax, rax jz short loc_EE5E mov rdi, r15 mov rsi, rbx mov rdx, r14 call _memcpy mov byte ptr [r15+r14], 0 loc_EE5E: mov rax, r15 pop rbx pop r14 pop r15 retn
long long js_strdup(long long a1, long long a2) { long long v2; // r14 long long v3; // rax long long v4; // r15 v2 = strlen(a2); v3 = js_malloc(a1, v2 + 1); v4 = v3; if ( v3 ) { memcpy(v3, a2, v2); *(_BYTE *)(v4 + v2) = 0; } return v4; }
js_strdup: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV RDI,RSI CALL 0x0010e240 MOV R14,RAX LEA RSI,[RAX + 0x1] MOV RDI,R15 CALL 0x0010ed89 MOV R15,RAX TEST RAX,RAX JZ 0x0010ee5e MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x0010e5a0 MOV byte ptr [R15 + R14*0x1],0x0 LAB_0010ee5e: MOV RAX,R15 POP RBX POP R14 POP R15 RET
void * js_strdup(int8 param_1,char *param_2) { size_t __n; void *__dest; __n = strlen(param_2); __dest = (void *)js_malloc(param_1,__n + 1); if (__dest != (void *)0x0) { memcpy(__dest,param_2,__n); *(int1 *)((long)__dest + __n) = 0; } return __dest; }
2,073
glfwPlatformCreateWindowSurface
untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c
VkResult _glfwPlatformCreateWindowSurface(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface) { if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle) { VkResult err; VkXcbSurfaceCreateInfoKHR sci; PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display); if (!connection) { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to retrieve XCB connection"); return VK_ERROR_EXTENSION_NOT_PRESENT; } vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR) vkGetInstanceProcAddr(instance, "vkCreateXcbSurfaceKHR"); if (!vkCreateXcbSurfaceKHR) { _glfwInputError(GLFW_API_UNAVAILABLE, "X11: Vulkan instance missing VK_KHR_xcb_surface extension"); return VK_ERROR_EXTENSION_NOT_PRESENT; } memset(&sci, 0, sizeof(sci)); sci.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; sci.connection = connection; sci.window = window->x11.handle; err = vkCreateXcbSurfaceKHR(instance, &sci, allocator, surface); if (err) { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to create Vulkan XCB surface: %s", _glfwGetVulkanResultString(err)); } return err; } else { VkResult err; VkXlibSurfaceCreateInfoKHR sci; PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR) vkGetInstanceProcAddr(instance, "vkCreateXlibSurfaceKHR"); if (!vkCreateXlibSurfaceKHR) { _glfwInputError(GLFW_API_UNAVAILABLE, "X11: Vulkan instance missing VK_KHR_xlib_surface extension"); return VK_ERROR_EXTENSION_NOT_PRESENT; } memset(&sci, 0, sizeof(sci)); sci.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR; sci.dpy = _glfw.x11.display; sci.window = window->x11.handle; err = vkCreateXlibSurfaceKHR(instance, &sci, allocator, surface); if (err) { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to create Vulkan X11 surface: %s", _glfwGetVulkanResultString(err)); } return err; } }
O0
c
glfwPlatformCreateWindowSurface: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) leaq 0xab426(%rip), %rax # 0xe0c68 cmpl $0x0, 0x1fea8(%rax) je 0x35967 leaq 0xab412(%rip), %rax # 0xe0c68 cmpq $0x0, 0x206b8(%rax) je 0x35967 leaq 0xab3fd(%rip), %rax # 0xe0c68 movq 0x206c0(%rax), %rax leaq 0xab3ef(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi callq *%rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x68(%rbp) jne 0x358ac movl $0x10008, %edi # imm = 0x10008 leaq 0x84e5f(%rip), %rsi # 0xba6f8 movb $0x0, %al callq 0x221a0 movl $0xfffffff9, -0x4(%rbp) # imm = 0xFFFFFFF9 jmp 0x35a39 leaq 0xab3b5(%rip), %rax # 0xe0c68 movq 0x1fe98(%rax), %rax movq -0x10(%rbp), %rdi leaq 0x84ec3(%rip), %rsi # 0xba788 callq *%rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x60(%rbp) jne 0x358f1 movl $0x10006, %edi # imm = 0x10006 leaq 0x84de0(%rip), %rsi # 0xba6be movb $0x0, %al callq 0x221a0 movl $0xfffffff9, -0x4(%rbp) # imm = 0xFFFFFFF9 jmp 0x35a39 leaq -0x58(%rbp), %rdi xorl %esi, %esi movl $0x28, %edx callq 0xc490 movl $0x3b9add88, -0x58(%rbp) # imm = 0x3B9ADD88 movq -0x68(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x348(%rax), %rax movq %rax, -0x38(%rbp) movq -0x60(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x58(%rbp), %rsi callq *%rax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x3595c movl -0x2c(%rbp), %edi callq 0x27940 movq %rax, %rdx movl $0x10008, %edi # imm = 0x10008 leaq 0x84e49(%rip), %rsi # 0xba79e movb $0x0, %al callq 0x221a0 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x35a39 leaq 0xab2fa(%rip), %rax # 0xe0c68 movq 0x1fe98(%rax), %rax movq -0x10(%rbp), %rdi leaq 0x84e4b(%rip), %rsi # 0xba7cb callq *%rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0xa0(%rbp) jne 0x359b2 movl $0x10006, %edi # imm = 0x10006 leaq 0x84dae(%rip), %rsi # 0xba74d movb $0x0, %al callq 0x221a0 movl $0xfffffff9, -0x4(%rbp) # imm = 0xFFFFFFF9 jmp 0x35a39 leaq -0x98(%rbp), %rdi xorl %esi, %esi movl $0x28, %edx callq 0xc490 movl $0x3b9ad9a0, -0x98(%rbp) # imm = 0x3B9AD9A0 leaq 0xab292(%rip), %rax # 0xe0c68 movq 0x1fec0(%rax), %rax movq %rax, -0x80(%rbp) movq -0x18(%rbp), %rax movq 0x348(%rax), %rax movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x98(%rbp), %rsi callq *%rax movl %eax, -0x6c(%rbp) cmpl $0x0, -0x6c(%rbp) je 0x35a33 movl -0x6c(%rbp), %edi callq 0x27940 movq %rax, %rdx movl $0x10008, %edi # imm = 0x10008 leaq 0x84db6(%rip), %rsi # 0xba7e2 movb $0x0, %al callq 0x221a0 movl -0x6c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_glfwPlatformCreateWindowSurface: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx lea rax, _glfw cmp dword ptr [rax+1FEA8h], 0 jz loc_35967 lea rax, _glfw cmp qword ptr [rax+206B8h], 0 jz loc_35967 lea rax, _glfw mov rax, [rax+206C0h] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] call rax mov [rbp+var_68], rax cmp [rbp+var_68], 0 jnz short loc_358AC mov edi, 10008h lea rsi, aX11FailedToRet; "X11: Failed to retrieve XCB connection" mov al, 0 call _glfwInputError mov [rbp+var_4], 0FFFFFFF9h jmp loc_35A39 loc_358AC: lea rax, _glfw mov rax, [rax+1FE98h] mov rdi, [rbp+var_10] lea rsi, aVkcreatexcbsur; "vkCreateXcbSurfaceKHR" call rax mov [rbp+var_60], rax cmp [rbp+var_60], 0 jnz short loc_358F1 mov edi, 10006h lea rsi, aX11VulkanInsta; "X11: Vulkan instance missing VK_KHR_xcb"... mov al, 0 call _glfwInputError mov [rbp+var_4], 0FFFFFFF9h jmp loc_35A39 loc_358F1: lea rdi, [rbp+var_58] xor esi, esi mov edx, 28h ; '(' call _memset mov [rbp+var_58], 3B9ADD88h mov rax, [rbp+var_68] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+348h] mov [rbp+var_38], rax mov rax, [rbp+var_60] mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] lea rsi, [rbp+var_58] call rax mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_3595C mov edi, [rbp+var_2C] call _glfwGetVulkanResultString mov rdx, rax mov edi, 10008h lea rsi, aX11FailedToCre_1; "X11: Failed to create Vulkan XCB surfac"... mov al, 0 call _glfwInputError loc_3595C: mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp loc_35A39 loc_35967: lea rax, _glfw mov rax, [rax+1FE98h] mov rdi, [rbp+var_10] lea rsi, aVkcreatexlibsu; "vkCreateXlibSurfaceKHR" call rax mov [rbp+var_A0], rax cmp [rbp+var_A0], 0 jnz short loc_359B2 mov edi, 10006h lea rsi, aX11VulkanInsta_0; "X11: Vulkan instance missing VK_KHR_xli"... mov al, 0 call _glfwInputError mov [rbp+var_4], 0FFFFFFF9h jmp loc_35A39 loc_359B2: lea rdi, [rbp+var_98] xor esi, esi mov edx, 28h ; '(' call _memset mov [rbp+var_98], 3B9AD9A0h lea rax, _glfw mov rax, qword ptr ds:loc_1FEC0[rax] mov [rbp+var_80], rax mov rax, [rbp+var_18] mov rax, [rax+348h] mov [rbp+var_78], rax mov rax, [rbp+var_A0] mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] lea rsi, [rbp+var_98] call rax mov [rbp+var_6C], eax cmp [rbp+var_6C], 0 jz short loc_35A33 mov edi, [rbp+var_6C] call _glfwGetVulkanResultString mov rdx, rax mov edi, 10008h lea rsi, aX11FailedToCre_2; "X11: Failed to create Vulkan X11 surfac"... mov al, 0 call _glfwInputError loc_35A33: mov eax, [rbp+var_6C] mov [rbp+var_4], eax loc_35A39: mov eax, [rbp+var_4] add rsp, 0A0h pop rbp retn
long long glfwPlatformCreateWindowSurface(long long a1, long long a2, long long a3, long long a4) { const char *VulkanResultString; // rax const char *v5; // rax long long ( *v7)(long long, _DWORD *, long long, long long); // [rsp+0h] [rbp-A0h] _DWORD v8[6]; // [rsp+8h] [rbp-98h] BYREF long long v9; // [rsp+20h] [rbp-80h] long long v10; // [rsp+28h] [rbp-78h] unsigned int v11; // [rsp+34h] [rbp-6Ch] long long v12; // [rsp+38h] [rbp-68h] long long ( *v13)(long long, _DWORD *, long long, long long); // [rsp+40h] [rbp-60h] _DWORD v14[6]; // [rsp+48h] [rbp-58h] BYREF long long v15; // [rsp+60h] [rbp-40h] long long v16; // [rsp+68h] [rbp-38h] unsigned int v17; // [rsp+74h] [rbp-2Ch] long long v18; // [rsp+78h] [rbp-28h] long long v19; // [rsp+80h] [rbp-20h] long long v20; // [rsp+88h] [rbp-18h] long long v21; // [rsp+90h] [rbp-10h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; if ( glfw[32682] && *(_QWORD *)&glfw[33198] ) { v12 = (*(long long ( **)(_QWORD))&glfw[33200])(*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw)); if ( v12 ) { v13 = (long long ( *)(long long, _DWORD *, long long, long long))(*(long long ( **)(long long, const char *))&glfw[32678])( v21, "vkCreateXcbSurfaceKHR"); if ( v13 ) { memset(v14, 0LL, 40LL); v14[0] = 1000005000; v15 = v12; v16 = *(_QWORD *)(v20 + 840); v17 = v13(v21, v14, v19, v18); if ( v17 ) { VulkanResultString = glfwGetVulkanResultString(v17); glfwInputError(0x10008u, (long long)"X11: Failed to create Vulkan XCB surface: %s", VulkanResultString); } return v17; } else { glfwInputError(0x10006u, (long long)"X11: Vulkan instance missing VK_KHR_xcb_surface extension"); return (unsigned int)-7; } } else { glfwInputError(0x10008u, (long long)"X11: Failed to retrieve XCB connection"); return (unsigned int)-7; } } else { v7 = (long long ( *)(long long, _DWORD *, long long, long long))(*(long long ( **)(long long, const char *))&glfw[32678])( v21, "vkCreateXlibSurfaceKHR"); if ( v7 ) { memset(v8, 0LL, 40LL); v8[0] = 1000004000; v9 = *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw); v10 = *(_QWORD *)(v20 + 840); v11 = v7(v21, v8, v19, v18); if ( v11 ) { v5 = glfwGetVulkanResultString(v11); glfwInputError(0x10008u, (long long)"X11: Failed to create Vulkan X11 surface: %s", v5); } return v11; } else { glfwInputError(0x10006u, (long long)"X11: Vulkan instance missing VK_KHR_xlib_surface extension"); return (unsigned int)-7; } } }
_glfwPlatformCreateWindowSurface: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX LEA RAX,[0x1e0c68] CMP dword ptr [RAX + 0x1fea8],0x0 JZ 0x00135967 LEA RAX,[0x1e0c68] CMP qword ptr [RAX + 0x206b8],0x0 JZ 0x00135967 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x206c0] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] CALL RAX MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x68],0x0 JNZ 0x001358ac MOV EDI,0x10008 LEA RSI,[0x1ba6f8] MOV AL,0x0 CALL 0x001221a0 MOV dword ptr [RBP + -0x4],0xfffffff9 JMP 0x00135a39 LAB_001358ac: LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x1fe98] MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1ba788] CALL RAX MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x60],0x0 JNZ 0x001358f1 MOV EDI,0x10006 LEA RSI,[0x1ba6be] MOV AL,0x0 CALL 0x001221a0 MOV dword ptr [RBP + -0x4],0xfffffff9 JMP 0x00135a39 LAB_001358f1: LEA RDI,[RBP + -0x58] XOR ESI,ESI MOV EDX,0x28 CALL 0x0010c490 MOV dword ptr [RBP + -0x58],0x3b9add88 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x348] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x58] CALL RAX MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0013595c MOV EDI,dword ptr [RBP + -0x2c] CALL 0x00127940 MOV RDX,RAX MOV EDI,0x10008 LEA RSI,[0x1ba79e] MOV AL,0x0 CALL 0x001221a0 LAB_0013595c: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00135a39 LAB_00135967: LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x1fe98] MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1ba7cb] CALL RAX MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0xa0],0x0 JNZ 0x001359b2 MOV EDI,0x10006 LEA RSI,[0x1ba74d] MOV AL,0x0 CALL 0x001221a0 MOV dword ptr [RBP + -0x4],0xfffffff9 JMP 0x00135a39 LAB_001359b2: LEA RDI,[RBP + -0x98] XOR ESI,ESI MOV EDX,0x28 CALL 0x0010c490 MOV dword ptr [RBP + -0x98],0x3b9ad9a0 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x1fec0] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x348] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x98] CALL RAX MOV dword ptr [RBP + -0x6c],EAX CMP dword ptr [RBP + -0x6c],0x0 JZ 0x00135a33 MOV EDI,dword ptr [RBP + -0x6c] CALL 0x00127940 MOV RDX,RAX MOV EDI,0x10008 LEA RSI,[0x1ba7e2] MOV AL,0x0 CALL 0x001221a0 LAB_00135a33: MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x4],EAX LAB_00135a39: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xa0 POP RBP RET
int _glfwPlatformCreateWindowSurface (int8 param_1,long param_2,int8 param_3,int8 param_4) { int8 uVar1; code *pcVar2; int4 local_a0 [6]; int8 local_88; int8 local_80; int local_74; long local_70; code *local_68; int4 local_60 [6]; long local_48; int8 local_40; int local_34; int8 local_30; int8 local_28; long local_20; int8 local_18; int local_c; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if ((DAT_00200b10 == 0) || (DAT_00201320 == 0)) { pcVar2 = (code *)(*DAT_00200b00)(param_1); if (pcVar2 == (code *)0x0) { _glfwInputError(0x10006,"X11: Vulkan instance missing VK_KHR_xlib_surface extension"); local_c = -7; } else { memset(local_a0,0,0x28); local_a0[0] = 0x3b9ad9a0; local_88 = DAT_00200b28; local_80 = *(int8 *)(local_20 + 0x348); local_74 = (*pcVar2)(local_18,local_a0,local_28,local_30); if (local_74 != 0) { uVar1 = _glfwGetVulkanResultString(local_74); _glfwInputError(0x10008,"X11: Failed to create Vulkan X11 surface: %s",uVar1); } local_c = local_74; } } else { local_70 = (*DAT_00201328)(DAT_00200b28); if (local_70 == 0) { _glfwInputError(0x10008,"X11: Failed to retrieve XCB connection"); local_c = -7; } else { local_68 = (code *)(*DAT_00200b00)(local_18); if (local_68 == (code *)0x0) { _glfwInputError(0x10006,"X11: Vulkan instance missing VK_KHR_xcb_surface extension"); local_c = -7; } else { memset(local_60,0,0x28); local_60[0] = 0x3b9add88; local_48 = local_70; local_40 = *(int8 *)(local_20 + 0x348); local_34 = (*local_68)(local_18,local_60,local_28,local_30); if (local_34 != 0) { uVar1 = _glfwGetVulkanResultString(local_34); _glfwInputError(0x10008,"X11: Failed to create Vulkan XCB surface: %s",uVar1); } local_c = local_34; } } } return local_c; }
2,074
CLI::App::remove_option(CLI::Option*)
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE bool App::remove_option(Option *opt) { // Make sure no links exist for(Option_p &op : options_) { op->remove_needs(opt); op->remove_excludes(opt); } if(help_ptr_ == opt) help_ptr_ = nullptr; if(help_all_ptr_ == opt) help_all_ptr_ = nullptr; auto iterator = std::find_if(std::begin(options_), std::end(options_), [opt](const Option_p &v) { return v.get() == opt; }); if(iterator != std::end(options_)) { options_.erase(iterator); return true; } return false; }
O0
cpp
CLI::App::remove_option(CLI::Option*): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) addq $0xd8, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x280f0 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x28120 movq %rax, -0x30(%rbp) leaq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x28150 testb $0x1, %al jne 0x27eb2 jmp 0x27ef4 leaq -0x28(%rbp), %rdi callq 0x28190 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi callq 0x195d0 movq %rax, %rdi movq -0x18(%rbp), %rsi callq 0x281b0 movq -0x38(%rbp), %rdi callq 0x195d0 movq %rax, %rdi movq -0x18(%rbp), %rsi callq 0x28260 leaq -0x28(%rbp), %rdi callq 0x28310 jmp 0x27e9f movq -0x78(%rbp), %rax movq 0x130(%rax), %rax cmpq -0x18(%rbp), %rax jne 0x27f14 movq -0x78(%rbp), %rax movq $0x0, 0x130(%rax) movq -0x78(%rbp), %rax movq 0x138(%rax), %rax cmpq -0x18(%rbp), %rax jne 0x27f34 movq -0x78(%rbp), %rax movq $0x0, 0x138(%rax) movq -0x78(%rbp), %rdi addq $0xd8, %rdi callq 0x28390 movq -0x78(%rbp), %rdi movq %rax, -0x48(%rbp) addq $0xd8, %rdi callq 0x283c0 movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x58(%rbp), %rdx callq 0x28330 movq -0x78(%rbp), %rdi movq %rax, -0x40(%rbp) addq $0xd8, %rdi callq 0x283c0 movq %rax, -0x60(%rbp) leaq -0x40(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x28150 testb $0x1, %al jne 0x27fa0 jmp 0x27fd2 movq -0x78(%rbp), %rax addq $0xd8, %rax movq %rax, -0x80(%rbp) leaq -0x68(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x28460 movq -0x80(%rbp), %rdi movq -0x68(%rbp), %rsi callq 0x283f0 movq %rax, -0x70(%rbp) movb $0x1, -0x1(%rbp) jmp 0x27fd6 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN3CLI3App13remove_optionEPNS_6OptionE: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_78], rax add rax, 0D8h mov [rbp+var_20], rax mov rdi, [rbp+var_20] call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EE5beginEv; std::vector<std::unique_ptr<CLI::Option>>::begin(void) mov [rbp+var_28], rax mov rdi, [rbp+var_20] call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EE3endEv; std::vector<std::unique_ptr<CLI::Option>>::end(void) mov [rbp+var_30], rax loc_27E9F: lea rdi, [rbp+var_28] lea rsi, [rbp+var_30] call _ZN9__gnu_cxxneIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>> const&) test al, 1 jnz short loc_27EB2 jmp short loc_27EF4 loc_27EB2: lea rdi, [rbp+var_28] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator*(void) mov [rbp+var_38], rax mov rdi, [rbp+var_38] call _ZNKSt10unique_ptrIN3CLI6OptionESt14default_deleteIS1_EEptEv; std::unique_ptr<CLI::Option>::operator->(void) mov rdi, rax; this mov rsi, [rbp+var_18]; CLI::Option * call _ZN3CLI6Option12remove_needsEPS0_; CLI::Option::remove_needs(CLI::Option*) mov rdi, [rbp+var_38] call _ZNKSt10unique_ptrIN3CLI6OptionESt14default_deleteIS1_EEptEv; std::unique_ptr<CLI::Option>::operator->(void) mov rdi, rax; this mov rsi, [rbp+var_18]; CLI::Option * call _ZN3CLI6Option15remove_excludesEPS0_; CLI::Option::remove_excludes(CLI::Option*) lea rdi, [rbp+var_28] call _ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator++(void) jmp short loc_27E9F loc_27EF4: mov rax, [rbp+var_78] mov rax, [rax+130h] cmp rax, [rbp+var_18] jnz short loc_27F14 mov rax, [rbp+var_78] mov qword ptr [rax+130h], 0 loc_27F14: mov rax, [rbp+var_78] mov rax, [rax+138h] cmp rax, [rbp+var_18] jnz short loc_27F34 mov rax, [rbp+var_78] mov qword ptr [rax+138h], 0 loc_27F34: mov rdi, [rbp+var_78] add rdi, 0D8h call _ZSt5beginISt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESaIS6_EEEDTcldtfp_5beginEERT_ mov rdi, [rbp+var_78] mov [rbp+var_48], rax add rdi, 0D8h call _ZSt3endISt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESaIS6_EEEDTcldtfp_3endEERT_ mov [rbp+var_50], rax mov rax, [rbp+var_18] mov [rbp+var_58], rax mov rdi, [rbp+var_48] mov rsi, [rbp+var_50] mov rdx, [rbp+var_58] call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEEZNS3_3App13remove_optionEPS4_EUlRKS7_E_ET_SI_SI_T0_; std::find_if<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,CLI::App::remove_option(CLI::Option*)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,CLI::App::remove_option(CLI::Option*)::{lambda(std::unique_ptr<CLI::Option> const&)#1}) mov rdi, [rbp+var_78] mov [rbp+var_40], rax add rdi, 0D8h call _ZSt3endISt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESaIS6_EEEDTcldtfp_3endEERT_ mov [rbp+var_60], rax lea rdi, [rbp+var_40] lea rsi, [rbp+var_60] call _ZN9__gnu_cxxneIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>> const&) test al, 1 jnz short loc_27FA0 jmp short loc_27FD2 loc_27FA0: mov rax, [rbp+var_78] add rax, 0D8h mov [rbp+var_80], rax lea rdi, [rbp+var_68] lea rsi, [rbp+var_40] call _ZN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEC2IPS6_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISF_SE_EE7__valueESB_E6__typeEEE mov rdi, [rbp+var_80] mov rsi, [rbp+var_68] call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS5_S7_EE; std::vector<std::unique_ptr<CLI::Option>>::erase(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>) mov [rbp+var_70], rax mov [rbp+var_1], 1 jmp short loc_27FD6 loc_27FD2: mov [rbp+var_1], 0 loc_27FD6: mov al, [rbp+var_1] and al, 1 add rsp, 80h pop rbp retn
char CLI::App::remove_option(CLI::App *this, CLI::Option *a2) { CLI::Option *v2; // rax CLI::Option *v3; // rax long long v5; // [rsp+18h] [rbp-68h] BYREF _QWORD v6[2]; // [rsp+20h] [rbp-60h] BYREF long long v7; // [rsp+30h] [rbp-50h] long long v8; // [rsp+38h] [rbp-48h] long long v9; // [rsp+40h] [rbp-40h] BYREF long long v10; // [rsp+48h] [rbp-38h] long long v11; // [rsp+50h] [rbp-30h] BYREF _QWORD v12[2]; // [rsp+58h] [rbp-28h] BYREF CLI::Option *v13; // [rsp+68h] [rbp-18h] CLI::App *v14; // [rsp+70h] [rbp-10h] v14 = this; v13 = a2; v12[1] = (char *)this + 216; v12[0] = std::vector<std::unique_ptr<CLI::Option>>::begin((char *)this + 216); v11 = std::vector<std::unique_ptr<CLI::Option>>::end((char *)this + 216); while ( (__gnu_cxx::operator!=<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>(v12, &v11) & 1) != 0 ) { v10 = __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator*(v12); v2 = (CLI::Option *)std::unique_ptr<CLI::Option>::operator->(v10); CLI::Option::remove_needs(v2, v13); v3 = (CLI::Option *)std::unique_ptr<CLI::Option>::operator->(v10); CLI::Option::remove_excludes(v3, v13); __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator++(v12); } if ( *((CLI::Option **)this + 38) == v13 ) *((_QWORD *)this + 38) = 0LL; if ( *((CLI::Option **)this + 39) == v13 ) *((_QWORD *)this + 39) = 0LL; v8 = std::begin<std::vector<std::unique_ptr<CLI::Option>>>((char *)this + 216); v7 = std::end<std::vector<std::unique_ptr<CLI::Option>>>((char *)this + 216); v6[1] = v13; v9 = std::find_if<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>,CLI::App::remove_option(CLI::Option*)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>( v8, v7, v13); v6[0] = std::end<std::vector<std::unique_ptr<CLI::Option>>>((char *)this + 216); if ( (__gnu_cxx::operator!=<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>(&v9, v6) & 1) == 0 ) return 0; __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>::__normal_iterator<std::unique_ptr<CLI::Option>*>( &v5, &v9); std::vector<std::unique_ptr<CLI::Option>>::erase((char *)this + 216, v5); return 1; }
remove_option: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x78],RAX ADD RAX,0xd8 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001280f0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00128120 MOV qword ptr [RBP + -0x30],RAX LAB_00127e9f: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x00128150 TEST AL,0x1 JNZ 0x00127eb2 JMP 0x00127ef4 LAB_00127eb2: LEA RDI,[RBP + -0x28] CALL 0x00128190 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x001195d0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] CALL 0x001281b0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x001195d0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] CALL 0x00128260 LEA RDI,[RBP + -0x28] CALL 0x00128310 JMP 0x00127e9f LAB_00127ef4: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x130] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00127f14 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x130],0x0 LAB_00127f14: MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX + 0x138] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00127f34 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RAX + 0x138],0x0 LAB_00127f34: MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0xd8 CALL 0x00128390 MOV RDI,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x48],RAX ADD RDI,0xd8 CALL 0x001283c0 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x58] CALL 0x00128330 MOV RDI,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x40],RAX ADD RDI,0xd8 CALL 0x001283c0 MOV qword ptr [RBP + -0x60],RAX LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x60] CALL 0x00128150 TEST AL,0x1 JNZ 0x00127fa0 JMP 0x00127fd2 LAB_00127fa0: MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0xd8 MOV qword ptr [RBP + -0x80],RAX LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x40] CALL 0x00128460 MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x68] CALL 0x001283f0 MOV qword ptr [RBP + -0x70],RAX MOV byte ptr [RBP + -0x1],0x1 JMP 0x00127fd6 LAB_00127fd2: MOV byte ptr [RBP + -0x1],0x0 LAB_00127fd6: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x80 POP RBP RET
/* CLI::App::remove_option(CLI::Option*) */ int8 __thiscall CLI::App::remove_option(App *this,Option *param_1) { bool bVar1; Option *pOVar2; int7 extraout_var; int7 extraout_var_00; int7 uVar3; int8 local_70; int8 local_68; Option *local_60; int8 local_58; int8 local_50; int8 local_48; unique_ptr<CLI::Option,std::default_delete<CLI::Option>> *local_40; int8 local_38; int8 local_30; vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>> *local_28; Option *local_20; App *local_18; local_28 = (vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>> *)(this + 0xd8); local_20 = param_1; local_18 = this; local_30 = std:: vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>> ::begin(local_28); local_38 = std:: vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>> ::end(local_28); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_30,(__normal_iterator *)&local_38), bVar1) { local_40 = (unique_ptr<CLI::Option,std::default_delete<CLI::Option>> *) __gnu_cxx:: __normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> ::operator*((__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> *)&local_30); pOVar2 = (Option *) std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>::operator->(local_40); Option::remove_needs(pOVar2,local_20); pOVar2 = (Option *) std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>::operator->(local_40); Option::remove_excludes(pOVar2,local_20); __gnu_cxx:: __normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> ::operator++((__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> *)&local_30); } if (*(Option **)(this + 0x130) == local_20) { *(int8 *)(this + 0x130) = 0; } if (*(Option **)(this + 0x138) == local_20) { *(int8 *)(this + 0x138) = 0; } local_50 = std:: begin<std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> ((vector *)(this + 0xd8)); local_58 = std:: end<std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> ((vector *)(this + 0xd8)); local_60 = local_20; local_48 = std:: find_if<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>>,CLI::App::remove_option(CLI::Option*)::_lambda(std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const&)_1_> (local_50,local_58,local_20); local_68 = std:: end<std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> ((vector *)(this + 0xd8)); bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_48,(__normal_iterator *)&local_68); uVar3 = extraout_var; if (bVar1) { __gnu_cxx:: __normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> ::__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*> ((__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>> *)&local_70,(__normal_iterator *)&local_48); std:: vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>> ::erase((vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>> *)(this + 0xd8),local_70); uVar3 = extraout_var_00; } return CONCAT71(uVar3,bVar1); }
2,075
my_strnxfrm_unicode_full_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (flags & MY_STRXFRM_PAD_WITH_SPACE) { for ( ; dst < de && nweights; nweights--) { *dst++= 0x00; if (dst < de) { *dst++= 0x00; if (dst < de) *dst++= 0x20; } } } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if (flags & MY_STRXFRM_PAD_TO_MAXLEN) { while (dst < de) { *dst++= 0x00; if (dst < de) { *dst++= 0x00; if (dst < de) *dst++= 0x20; } } } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r12 movq %rsi, %rbx movl 0x10(%rbp), %r15d leaq -0x24(%rbp), %rax movl %ecx, (%rax) leaq (%rsi,%rdx), %r14 addq %r8, %r9 movq %r14, %rdx movq %rax, %rcx callq 0x5767f leaq (%rbx,%rax), %rcx testb $0x40, %r15b jne 0x577c8 movq %rcx, %r12 movq %rbx, %rdi movq %r12, %rsi movl %r15d, %edx xorl %ecx, %ecx callq 0x42626 testb %r15b, %r15b setns %al cmpq %r14, %r12 setae %cl orb %al, %cl jne 0x57814 leaq 0x1(%r12), %rax movb $0x0, (%r12) cmpq %r14, %rax jae 0x577be leaq 0x2(%r12), %rax movb $0x0, 0x1(%r12) cmpq %r14, %rax jae 0x577be movb $0x20, 0x2(%r12) addq $0x3, %r12 movq %r12, %rax movq %rax, %r12 cmpq %r14, %rax jb 0x57792 jmp 0x57817 cmpq %r12, %rax jge 0x5776b cmpl $0x0, -0x24(%rbp) je 0x5776b leaq 0x1(%rcx), %r12 movb $0x0, (%rcx) cmpq %r14, %r12 jae 0x577f7 leaq 0x2(%rcx), %r12 movb $0x0, 0x1(%rcx) cmpq %r14, %r12 jae 0x577f7 movb $0x20, 0x2(%rcx) addq $0x3, %rcx movq %rcx, %r12 movl -0x24(%rbp), %eax decl %eax movl %eax, -0x24(%rbp) cmpq %r14, %r12 jae 0x5776e movq %r12, %rcx testl %eax, %eax jne 0x577d3 jmp 0x5776e movq %r12, %rax subq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_bin: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r12, rdx mov rbx, rsi mov r15d, [rbp+arg_0] lea rax, [rbp+var_24] mov [rax], ecx lea r14, [rsi+rdx] add r9, r8 mov rdx, r14 mov rcx, rax call my_strnxfrm_unicode_full_bin_internal lea rcx, [rbx+rax] test r15b, 40h jnz short loc_577C8 loc_5776B: mov r12, rcx loc_5776E: mov rdi, rbx mov rsi, r12 mov edx, r15d xor ecx, ecx call my_strxfrm_desc_and_reverse test r15b, r15b setns al cmp r12, r14 setnb cl or cl, al jnz loc_57814 loc_57792: lea rax, [r12+1] mov byte ptr [r12], 0 cmp rax, r14 jnb short loc_577BE lea rax, [r12+2] mov byte ptr [r12+1], 0 cmp rax, r14 jnb short loc_577BE mov byte ptr [r12+2], 20h ; ' ' add r12, 3 mov rax, r12 loc_577BE: mov r12, rax cmp rax, r14 jb short loc_57792 jmp short loc_57817 loc_577C8: cmp rax, r12 jge short loc_5776B cmp [rbp+var_24], 0 jz short loc_5776B loc_577D3: lea r12, [rcx+1] mov byte ptr [rcx], 0 cmp r12, r14 jnb short loc_577F7 lea r12, [rcx+2] mov byte ptr [rcx+1], 0 cmp r12, r14 jnb short loc_577F7 mov byte ptr [rcx+2], 20h ; ' ' add rcx, 3 mov r12, rcx loc_577F7: mov eax, [rbp+var_24] dec eax mov [rbp+var_24], eax cmp r12, r14 jnb loc_5776E mov rcx, r12 test eax, eax jnz short loc_577D3 jmp loc_5776E loc_57814: mov rax, r12 loc_57817: sub rax, rbx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { unsigned long long v8; // r14 long long v9; // rax _BYTE *v10; // rcx _BYTE *v11; // r12 _BYTE *v12; // rax int v13; // eax int v15[9]; // [rsp+Ch] [rbp-24h] BYREF v15[0] = a4; v8 = (unsigned long long)&a2[a3]; v9 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v15, a5, a5 + a6); v10 = &a2[v9]; if ( (a7 & 0x40) != 0 && v9 < a3 && v15[0] ) { do { v11 = v10 + 1; *v10 = 0; if ( (unsigned long long)(v10 + 1) < v8 ) { v11 = v10 + 2; v10[1] = 0; if ( (unsigned long long)(v10 + 2) < v8 ) { v10[2] = 32; v11 = v10 + 3; } } v13 = --v15[0]; if ( (unsigned long long)v11 >= v8 ) break; v10 = v11; } while ( v13 ); } else { v11 = &a2[v9]; } my_strxfrm_desc_and_reverse(a2, v11, a7, 0); if ( (a7 & 0x80u) == 0 || (unsigned long long)v11 >= v8 ) { v12 = v11; } else { do { v12 = v11 + 1; *v11 = 0; if ( (unsigned long long)(v11 + 1) < v8 ) { v12 = v11 + 2; v11[1] = 0; if ( (unsigned long long)(v11 + 2) < v8 ) { v11[2] = 32; v12 = v11 + 3; } } v11 = v12; } while ( (unsigned long long)v12 < v8 ); } return v12 - a2; }
my_strnxfrm_unicode_full_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RDX MOV RBX,RSI MOV R15D,dword ptr [RBP + 0x10] LEA RAX,[RBP + -0x24] MOV dword ptr [RAX],ECX LEA R14,[RSI + RDX*0x1] ADD R9,R8 MOV RDX,R14 MOV RCX,RAX CALL 0x0015767f LEA RCX,[RBX + RAX*0x1] TEST R15B,0x40 JNZ 0x001577c8 LAB_0015776b: MOV R12,RCX LAB_0015776e: MOV RDI,RBX MOV RSI,R12 MOV EDX,R15D XOR ECX,ECX CALL 0x00142626 TEST R15B,R15B SETNS AL CMP R12,R14 SETNC CL OR CL,AL JNZ 0x00157814 LAB_00157792: LEA RAX,[R12 + 0x1] MOV byte ptr [R12],0x0 CMP RAX,R14 JNC 0x001577be LEA RAX,[R12 + 0x2] MOV byte ptr [R12 + 0x1],0x0 CMP RAX,R14 JNC 0x001577be MOV byte ptr [R12 + 0x2],0x20 ADD R12,0x3 MOV RAX,R12 LAB_001577be: MOV R12,RAX CMP RAX,R14 JC 0x00157792 JMP 0x00157817 LAB_001577c8: CMP RAX,R12 JGE 0x0015776b CMP dword ptr [RBP + -0x24],0x0 JZ 0x0015776b LAB_001577d3: LEA R12,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP R12,R14 JNC 0x001577f7 LEA R12,[RCX + 0x2] MOV byte ptr [RCX + 0x1],0x0 CMP R12,R14 JNC 0x001577f7 MOV byte ptr [RCX + 0x2],0x20 ADD RCX,0x3 MOV R12,RCX LAB_001577f7: MOV EAX,dword ptr [RBP + -0x24] DEC EAX MOV dword ptr [RBP + -0x24],EAX CMP R12,R14 JNC 0x0015776e MOV RCX,R12 TEST EAX,EAX JNZ 0x001577d3 JMP 0x0015776e LAB_00157814: MOV RAX,R12 LAB_00157817: SUB RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { int1 *puVar1; long lVar2; int1 *puVar3; int1 *puVar4; int local_2c; puVar1 = (int1 *)(param_2 + param_3); local_2c = param_4; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,puVar1,&local_2c,param_5,param_6 + param_5); puVar4 = (int1 *)(param_2 + lVar2); if (((param_7 & 0x40) != 0) && (lVar2 < param_3)) { do { if (local_2c == 0) break; puVar3 = puVar4 + 1; *puVar4 = 0; if (puVar3 < puVar1) { puVar3 = puVar4 + 2; puVar4[1] = 0; if (puVar3 < puVar1) { puVar4[2] = 0x20; puVar3 = puVar4 + 3; } } local_2c = local_2c + -1; puVar4 = puVar3; } while (puVar3 < puVar1); } my_strxfrm_desc_and_reverse(param_2,puVar4,param_7,0); puVar3 = puVar4; if (puVar4 < puVar1 && (char)param_7 < '\0') { do { puVar4 = puVar3 + 1; *puVar3 = 0; if (puVar4 < puVar1) { puVar4 = puVar3 + 2; puVar3[1] = 0; if (puVar4 < puVar1) { puVar3[2] = 0x20; puVar4 = puVar3 + 3; } } puVar3 = puVar4; } while (puVar4 < puVar1); } return (long)puVar4 - param_2; }
2,076
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa2c80 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1293f8 jmp 0x1294d4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x50540 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa04c0 movq %rax, 0x90(%rsp) leaq 0xabd00(%rip), %rsi # 0x1d5128 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x125a10 jmp 0x12943f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xa0260 jmp 0x12945d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x128c87(%rip), %rsi # 0x2520f8 leaq -0x88f08(%rip), %rdx # 0xa0570 callq 0x508f0 jmp 0x129651 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1294b9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x510c0 testb $0x1, 0x83(%rsp) jne 0x1294c5 jmp 0x1294cf movq 0x18(%rsp), %rdi callq 0x50c40 jmp 0x129644 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x126b60 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa2ac0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbb9f0 testb $0x1, %al jne 0x12951d jmp 0x12962e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x50d60 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x61bd0 jmp 0x129562 leaq 0xabdeb(%rip), %rsi # 0x1d5354 leaq 0xabdea(%rip), %rcx # 0x1d535a leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x126c30 jmp 0x129581 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x127b20 jmp 0x12959b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x128c35(%rip), %rsi # 0x2521e0 leaq -0x70672(%rip), %rdx # 0xb8f40 callq 0x508f0 jmp 0x129651 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x129610 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x129606 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x510c0 leaq 0x30(%rsp), %rdi callq 0x510c0 leaq 0x2f(%rsp), %rdi callq 0x510a0 testb $0x1, 0x2e(%rsp) jne 0x129623 jmp 0x12962c movq (%rsp), %rdi callq 0x50c40 jmp 0x129644 leaq 0x78(%rsp), %rdi callq 0xbbbe0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1293F8 jmp loc_1294D4 loc_1293F8: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int 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* &&) jmp short $+2 loc_12943F: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_12945D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_129651 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1294B9 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1294B9: test [rsp+arg_7B], 1 jnz short loc_1294C5 jmp short loc_1294CF loc_1294C5: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_1294CF: jmp loc_129644 loc_1294D4: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_12951D jmp loc_12962E loc_12951D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_129562: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_129581: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_12959B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_129651 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_129610 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_129606 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_129606: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_129610: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_129623 jmp short loc_12962C loc_129623: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_12962C: jmp short loc_129644 loc_12962E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) add rax, 20h ; ' ' add rsp, 0C8h retn loc_129644: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_129651: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::out_of_range *v3; // [rsp+0h] [rbp-C8h] long long v4; // [rsp+8h] [rbp-C0h] void *exception; // [rsp+18h] [rbp-B0h] int v6[8]; // [rsp+2Fh] [rbp-99h] BYREF int v7[8]; // [rsp+50h] [rbp-78h] BYREF char v8[8]; // [rsp+70h] [rbp-58h] BYREF int v9[2]; // [rsp+78h] [rbp-50h] BYREF char v10; // [rsp+83h] [rbp-45h] char v11[8]; // [rsp+90h] [rbp-38h] BYREF int v12[8]; // [rsp+98h] [rbp-30h] BYREF int v13[2]; // [rsp+B8h] [rbp-10h] long long v14; // [rsp+C0h] [rbp-8h] v14 = a1; *(_QWORD *)v13 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v12, (long long)"cannot use at() with ", (nlohmann::json_abi_v3_11_3::detail **)v11); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)exception, 304, (long long)v12, a1); v10 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } *(_QWORD *)v9 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(long long *)v13); *(_QWORD *)v8 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v9, (long long)v8) ) { v3 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); v4 = *(_QWORD *)v13; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v6 + 1, v4, (long long)v6); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v7, (long long)"key '", (long long)v6 + 1, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v3, 403, (long long)v7, a1); __cxa_throw( v3, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v9) + 32; }
2,077
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x835cd movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x6339a movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x8362b addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx movq %r14, %rdi callq 0x3b8b2 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x1dddd(%rip), %rsi # 0xa13cc leaq 0x8(%rsp), %rdi callq 0x62ca1 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3b766 xorl %ebp, %ebp leaq 0x5cc9e(%rip), %rsi # 0xe02b8 leaq -0x3c63f(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 jmp 0x83695 pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x262e2 leaq 0x1dfa9(%rip), %rsi # 0xa15f8 leaq 0x1dfa8(%rip), %rcx # 0xa15fe leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x632a9 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x63712 xorl %ebp, %ebp leaq 0x5cd1a(%rip), %rsi # 0xe03a0 leaq -0x3c6ab(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 jmp 0x836aa movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x836bb jmp 0x836c7 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 testb %bpl, %bpl jne 0x836ca jmp 0x836d2 movq %rax, %r14 movq %rbx, %rdi callq 0x20520 movq %r14, %rdi callq 0x20b90
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_835CD mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_8362B add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_835CD: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_83695 loc_8362B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_83695: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_836AA mov r14, rax mov bpl, 1 loc_836AA: lea rdi, [rsp+68h+var_40] jmp short loc_836BB jmp short loc_836C7 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_836BB: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_836CA jmp short loc_836D2 loc_836C7: mov r14, rax loc_836CA: mov rdi, rbx; void * call ___cxa_free_exception loc_836D2: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v6, (long long)"cannot use at() with ", v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x130u, (long long)v6, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v6, (long long)"key '", (long long)v7, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001835cd MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x0016339a MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0018362b ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001835cd: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX MOV RDI,R14 CALL 0x0013b8b2 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_001835e8: LEA RSI,[0x1a13cc] LEA RDI,[RSP + 0x8] CALL 0x00162ca1 MOV BPL,0x1 LAB_001835fc: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0013b766 XOR EBP,EBP LEA RSI,[0x1e02b8] LEA RDX,[0x146fe2] MOV RDI,RBX CALL 0x00120b30 LAB_0018362b: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX LAB_00183636: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x001262e2 LAB_00183648: LEA RSI,[0x1a15f8] LEA RCX,[0x1a15fe] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x001632a9 MOV BPL,0x1 LAB_00183668: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00163712 XOR EBP,EBP LEA RSI,[0x1e03a0] LEA RDX,[0x146fe2] MOV RDI,RBX CALL 0x00120b30
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001835e8 to 001835f8 has its CatchHandler @ 001836c7 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 001835fc to 00183628 has its CatchHandler @ 001836b3 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 00183636 to 00183647 has its CatchHandler @ 001836b1 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 00183648 to 00183664 has its CatchHandler @ 001836a4 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 00183668 to 00183694 has its CatchHandler @ 00183695 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
2,078
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
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> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x69bb7 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x69ba1 movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0x69b96 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x69b77 jmp 0x69b99 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x69c15 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3e096 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x52b9a(%rip), %rsi # 0xbc773 leaq 0x20(%rsp), %rdi callq 0x6f3e3 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3de42 xorl %ebp, %ebp leaq 0x846b4(%rip), %rsi # 0xee2b8 leaq -0x1d85b(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 jmp 0x69c8e movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18310 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x590a2 leaq 0x52d55(%rip), %rsi # 0xbc99f leaq 0x52d54(%rip), %rcx # 0xbc9a5 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x6f9be movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x6fd36 xorl %ebp, %ebp leaq 0x84721(%rip), %rsi # 0xee3a0 leaq -0x1d8d6(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69cac movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69cf7 movq 0x10(%rsp), %rsi jmp 0x69cef movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69d01 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x69d01 jmp 0x69cfe movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69cf7 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x69d01 jmp 0x69d09 movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_69BB7 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_69BA1 loc_69B77: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_69B96 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_69B77 jmp short loc_69B99 loc_69B96: mov rax, rbx loc_69B99: mov rcx, [r14+8] mov rbx, [rcx+8] loc_69BA1: cmp rax, rbx jz short loc_69C15 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_69BB7: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_69C8E loc_69C15: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_69C8E: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69CAC mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69CAC: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_69CF7 mov rsi, [rsp+68h+var_58] jmp short loc_69CEF mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_69D01 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_69D01 jmp short loc_69CFE mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69CF7 mov rsi, [rsp+68h+var_38] loc_69CEF: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69CF7: test bpl, bpl jnz short loc_69D01 jmp short loc_69D09 loc_69CFE: mov r14, rax loc_69D01: mov rdi, rbx; void * call ___cxa_free_exception loc_69D09: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00169bb7 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00169ba1 LAB_00169b77: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x00169b96 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00169b77 JMP 0x00169b99 LAB_00169b96: MOV RAX,RBX LAB_00169b99: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_00169ba1: CMP RAX,RBX JZ 0x00169c15 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00169bb7: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e096 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00169bd2: LEA RSI,[0x1bc773] LEA RDI,[RSP + 0x20] CALL 0x0016f3e3 MOV BPL,0x1 LAB_00169be6: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0013de42 XOR EBP,EBP LEA RSI,[0x1ee2b8] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30 LAB_00169c15: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118310 LEA RDX,[RAX + R15*0x1] LAB_00169c38: MOV RDI,RSP MOV RSI,R15 CALL 0x001590a2 LAB_00169c43: LEA RSI,[0x1bc99f] LEA RCX,[0x1bc9a5] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0016f9be MOV BPL,0x1 LAB_00169c61: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0016fd36 XOR EBP,EBP LEA RSI,[0x1ee3a0] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00169bd2 to 00169be2 has its CatchHandler @ 00169cfe */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 00169be6 to 00169c12 has its CatchHandler @ 00169cd9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 00169c38 to 00169c42 has its CatchHandler @ 00169cd7 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 00169c43 to 00169c5d has its CatchHandler @ 00169cbc */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 00169c61 to 00169c8d has its CatchHandler @ 00169c8e */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
2,079
tailoring_append2
eloqsql/strings/ctype.c
static int tailoring_append2(MY_XML_PARSER *st, const char *fmt, size_t len1, const char *attr1, size_t len2, const char *attr2) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len1 + len2 + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len1, attr1, (int) len2, attr2); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
tailoring_append2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq 0x690(%rax), %rax addq -0x20(%rbp), %rax addq -0x30(%rbp), %rax addq $0x40, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x6f6f0 movl %eax, %ecx xorl %eax, %eax cmpl %ecx, %eax jne 0x6fae4 movq -0x40(%rbp), %rax movq 0x688(%rax), %rax movq -0x40(%rbp), %rcx addq 0x690(%rcx), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rax movl %eax, %edx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %rax movl %eax, %r8d movq -0x38(%rbp), %r9 movb $0x0, %al callq 0x240a0 movq -0x50(%rbp), %rdi callq 0x24120 movq %rax, %rcx movq -0x40(%rbp), %rax addq 0x690(%rax), %rcx movq %rcx, 0x690(%rax) movl $0x0, -0x4(%rbp) jmp 0x6faeb movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
tailoring_append2: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rax, [rax+690h] add rax, [rbp+var_20] add rax, [rbp+var_30] add rax, 40h ; '@' mov [rbp+var_48], rax mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] call my_charset_file_tailoring_realloc mov ecx, eax xor eax, eax cmp eax, ecx jnz short loc_6FAE4 mov rax, [rbp+var_40] mov rax, [rax+688h] mov rcx, [rbp+var_40] add rax, [rcx+690h] mov [rbp+var_50], rax mov rdi, [rbp+var_50] mov rsi, [rbp+var_18] mov rax, [rbp+var_20] mov edx, eax mov rcx, [rbp+var_28] mov rax, [rbp+var_30] mov r8d, eax mov r9, [rbp+var_38] mov al, 0 call _sprintf mov rdi, [rbp+var_50] call _strlen mov rcx, rax mov rax, [rbp+var_40] add rcx, [rax+690h] mov [rax+690h], rcx mov [rbp+var_4], 0 jmp short loc_6FAEB loc_6FAE4: mov [rbp+var_4], 1 loc_6FAEB: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long tailoring_append2(long long a1, const char *a2, long long a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-50h] _QWORD *v8; // [rsp+10h] [rbp-40h] unsigned int v10; // [rsp+20h] [rbp-30h] unsigned int v12; // [rsp+30h] [rbp-20h] v12 = a3; v10 = a5; v8 = *(_QWORD **)(a1 + 320); if ( (unsigned int)my_charset_file_tailoring_realloc(v8, a5 + a3 + v8[210] + 64) ) { return 1; } else { v7 = v8[210] + v8[209]; sprintf(v7, a2, v12, a4, v10, a6); v8[210] += strlen(v7); return 0; } }
tailoring_append2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x690] ADD RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x30] ADD RAX,0x40 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] CALL 0x0016f6f0 MOV ECX,EAX XOR EAX,EAX CMP EAX,ECX JNZ 0x0016fae4 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x688] MOV RCX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RCX + 0x690] MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV R8D,EAX MOV R9,qword ptr [RBP + -0x38] MOV AL,0x0 CALL 0x001240a0 MOV RDI,qword ptr [RBP + -0x50] CALL 0x00124120 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RAX + 0x690] MOV qword ptr [RAX + 0x690],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016faeb LAB_0016fae4: MOV dword ptr [RBP + -0x4],0x1 LAB_0016faeb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
bool tailoring_append2(long param_1,char *param_2,ulong param_3,int8 param_4,ulong param_5, int8 param_6) { long lVar1; int iVar2; char *__s; size_t sVar3; lVar1 = *(long *)(param_1 + 0x140); iVar2 = my_charset_file_tailoring_realloc (lVar1,*(long *)(lVar1 + 0x690) + param_3 + param_5 + 0x40); if (iVar2 == 0) { __s = (char *)(*(long *)(lVar1 + 0x688) + *(long *)(lVar1 + 0x690)); sprintf(__s,param_2,param_3 & 0xffffffff,param_4,param_5 & 0xffffffff,param_6); sVar3 = strlen(__s); *(size_t *)(lVar1 + 0x690) = sVar3 + *(long *)(lVar1 + 0x690); } return iVar2 != 0; }
2,080
key_cache_write
eloqsql/mysys/mf_keycache.c
int key_cache_write(KEY_CACHE *keycache, File file, void *file_extra, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int force_write) { if (keycache->can_be_used) return keycache->interface_funcs->write(keycache->keycache_cb, file, file_extra, filepos, level, buff, length, block_length, force_write); /* We can't use mutex here as the key cache may not be initialized */ if (my_pwrite(file, buff, length, filepos, MYF(MY_NABP | MY_WAIT_IF_FULL))) return 1; return 0; }
O0
c
key_cache_write: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x58, %rsp movl 0x20(%rbp), %eax movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movq %rdx, -0x28(%rbp) movq %rcx, -0x30(%rbp) movl %r8d, -0x34(%rbp) movq %r9, -0x40(%rbp) movq -0x18(%rbp), %rax cmpb $0x0, 0x49(%rax) je 0x8dda9 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq 0x28(%rax), %rax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0x1c(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movl -0x34(%rbp), %r8d movq -0x40(%rbp), %r9 movl 0x10(%rbp), %ebx movl 0x18(%rbp), %r11d movl 0x20(%rbp), %r10d movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movl %r10d, 0x10(%rsp) callq *%rax movl %eax, -0xc(%rbp) jmp 0x8ddda movl -0x1c(%rbp), %edi movq -0x40(%rbp), %rsi movl 0x10(%rbp), %eax movl %eax, %edx movq -0x30(%rbp), %rcx movl $0x24, %r8d callq 0xa10f0 cmpq $0x0, %rax je 0x8ddd3 movl $0x1, -0xc(%rbp) jmp 0x8ddda movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x58, %rsp popq %rbx popq %rbp retq nopw %cs:(%rax,%rax)
key_cache_write: push rbp mov rbp, rsp push rbx sub rsp, 58h mov eax, [rbp+arg_10] mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_30], rcx mov [rbp+var_34], r8d mov [rbp+var_40], r9 mov rax, [rbp+var_18] cmp byte ptr [rax+49h], 0 jz short loc_8DDA9 mov rax, [rbp+var_18] mov rax, [rax+10h] mov rax, [rax+28h] mov rcx, [rbp+var_18] mov rdi, [rcx+8] mov esi, [rbp+var_1C] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8d, [rbp+var_34] mov r9, [rbp+var_40] mov ebx, [rbp+arg_0] mov r11d, [rbp+arg_8] mov r10d, [rbp+arg_10] mov [rsp+60h+var_60], ebx mov [rsp+60h+var_58], r11d mov [rsp+60h+var_50], r10d call rax mov [rbp+var_C], eax jmp short loc_8DDDA loc_8DDA9: mov edi, [rbp+var_1C] mov rsi, [rbp+var_40] mov eax, [rbp+arg_0] mov edx, eax mov rcx, [rbp+var_30] mov r8d, 24h ; '$' call my_pwrite cmp rax, 0 jz short loc_8DDD3 mov [rbp+var_C], 1 jmp short loc_8DDDA loc_8DDD3: mov [rbp+var_C], 0 loc_8DDDA: mov eax, [rbp+var_C] add rsp, 58h pop rbx pop rbp retn
long long key_cache_write( long long a1, unsigned int a2, long long a3, long long a4, unsigned int a5, long long a6, unsigned int a7, int a8, int a9) { if ( *(_BYTE *)(a1 + 73) ) return (unsigned int)(*(long long ( **)(_QWORD, _QWORD, long long, long long, _QWORD, long long, unsigned int, int, int))(*(_QWORD *)(a1 + 16) + 40LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5, a6, a7, a8, a9); else return my_pwrite(a2, a6, a7, a4, 36LL) != 0; }
key_cache_write: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x58 MOV EAX,dword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RBP + -0x30],RCX MOV dword ptr [RBP + -0x34],R8D MOV qword ptr [RBP + -0x40],R9 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x49],0x0 JZ 0x0018dda9 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8D,dword ptr [RBP + -0x34] MOV R9,qword ptr [RBP + -0x40] MOV EBX,dword ptr [RBP + 0x10] MOV R11D,dword ptr [RBP + 0x18] MOV R10D,dword ptr [RBP + 0x20] MOV dword ptr [RSP],EBX MOV dword ptr [RSP + 0x8],R11D MOV dword ptr [RSP + 0x10],R10D CALL RAX MOV dword ptr [RBP + -0xc],EAX JMP 0x0018ddda LAB_0018dda9: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + 0x10] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x30] MOV R8D,0x24 CALL 0x001a10f0 CMP RAX,0x0 JZ 0x0018ddd3 MOV dword ptr [RBP + -0xc],0x1 JMP 0x0018ddda LAB_0018ddd3: MOV dword ptr [RBP + -0xc],0x0 LAB_0018ddda: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x58 POP RBX POP RBP RET
int4 key_cache_write(long param_1,int4 param_2,int8 param_3,int8 param_4, int4 param_5,int8 param_6,int4 param_7,int4 param_8, int4 param_9) { long lVar1; int4 local_14; if (*(char *)(param_1 + 0x49) == '\0') { lVar1 = my_pwrite(param_2,param_6,param_7,param_4,0x24); if (lVar1 == 0) { local_14 = 0; } else { local_14 = 1; } } else { local_14 = (**(code **)(*(long *)(param_1 + 0x10) + 0x28)) (*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6, param_7,param_8,param_9); } return local_14; }
2,081
CLI::detail::format_aliases(std::ostream&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, unsigned long)
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/StringTools_inl.hpp
CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const std::vector<std::string> &aliases, std::size_t wid) { if(!aliases.empty()) { out << std::setw(static_cast<int>(wid)) << " aliases: "; bool front = true; for(const auto &alias : aliases) { if(!front) { out << ", "; } else { front = false; } out << detail::fix_newlines(" ", alias); } out << "\n"; } return out; }
O2
cpp
CLI::detail::format_aliases(std::ostream&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<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 $0x68, %rsp movq %rdi, %rbx movq (%rsi), %rax cmpq 0x8(%rsi), %rax je 0x2026d movq %rsi, %r15 movq (%rbx), %rax movq -0x18(%rax), %rax movslq %edx, %rcx movq %rcx, 0x10(%rbx,%rax) leaq 0x9bdd(%rip), %rsi # 0x29dab movq %rbx, %rdi callq 0x7460 movq (%r15), %r14 movq 0x8(%r15), %r13 movb $0x1, %al leaq 0x28(%rsp), %r12 leaq 0x8(%rsp), %rbp leaq 0x48(%rsp), %r15 cmpq %r13, %r14 je 0x2025e testb $0x1, %al jne 0x20206 movq %rbx, %rdi leaq 0x9bb9(%rip), %rsi # 0x29dba callq 0x7460 movq %r12, %rdi leaq 0x9bad(%rip), %rsi # 0x29dbd leaq 0x7(%rsp), %rdx callq 0x8762 movq %rbp, %rdi movq %r14, %rsi callq 0x75e0 movq %r15, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x952c movq %rbx, %rdi movq %r15, %rsi callq 0x7400 movq %r15, %rdi callq 0x7860 movq %rbp, %rdi callq 0x7860 movq %r12, %rdi callq 0x7860 addq $0x20, %r14 xorl %eax, %eax jmp 0x201ee leaq 0x9b40(%rip), %rsi # 0x29da5 movq %rbx, %rdi callq 0x7460 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x202a0 movq %rax, %rbx jmp 0x20296 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x7860 leaq 0x8(%rsp), %rdi callq 0x7860 leaq 0x28(%rsp), %rdi callq 0x7860 movq %rbx, %rdi callq 0x7770
_ZN3CLI6detail14format_aliasesERSoRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, rdi mov rax, [rsi] cmp rax, [rsi+8] jz loc_2026D mov r15, rsi mov rax, [rbx] mov rax, [rax-18h] movsxd rcx, edx mov [rbx+rax+10h], rcx lea rsi, aAliases; " aliases: " mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, [r15] mov r13, [r15+8] mov al, 1 lea r12, [rsp+98h+var_70] lea rbp, [rsp+98h+var_90] lea r15, [rsp+98h+var_50] loc_201EE: cmp r14, r13 jz short loc_2025E test al, 1 jnz short loc_20206 mov rdi, rbx lea rsi, asc_29DBA; ", " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_20206: mov rdi, r12 lea rsi, asc_29DBD; " " lea rdx, [rsp+98h+var_91] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbp mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rdi, r15 mov rsi, r12 mov rdx, rbp call _ZN3CLI6detail12fix_newlinesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; CLI::detail::fix_newlines(std::string const&,std::string) mov rdi, rbx mov rsi, r15 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add r14, 20h ; ' ' xor eax, eax jmp short loc_201EE loc_2025E: lea rsi, asc_29DA4+1; "\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_2026D: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_202A0 mov rbx, rax jmp short loc_20296 mov rbx, rax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_20296: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_202A0: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
_QWORD * CLI::detail::format_aliases(_QWORD *a1, long long *a2, int a3) { long long v3; // r14 long long v4; // r13 char v5; // al _BYTE v7[32]; // [rsp+8h] [rbp-90h] BYREF _QWORD v8[4]; // [rsp+28h] [rbp-70h] BYREF _BYTE v9[80]; // [rsp+48h] [rbp-50h] BYREF if ( *a2 != a2[1] ) { *(_QWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24LL) + 16) = a3; std::operator<<<std::char_traits<char>>(a1, " aliases: "); v3 = *a2; v4 = a2[1]; v5 = 1; while ( v3 != v4 ) { if ( (v5 & 1) == 0 ) std::operator<<<std::char_traits<char>>(a1, ", "); std::string::basic_string<std::allocator<char>>(v8, (long long)" "); std::string::basic_string(v7); CLI::detail::fix_newlines((long long)v9, (long long)v8, (long long)v7); std::operator<<<char>(a1, v9); std::string::~string(v9); std::string::~string(v7); std::string::~string(v8); v3 += 32LL; v5 = 0; } std::operator<<<std::char_traits<char>>(a1, "\n"); } return a1; }
format_aliases: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RDI MOV RAX,qword ptr [RSI] CMP RAX,qword ptr [RSI + 0x8] JZ 0x0012026d MOV R15,RSI MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] MOVSXD RCX,EDX MOV qword ptr [RBX + RAX*0x1 + 0x10],RCX LEA RSI,[0x129dab] MOV RDI,RBX CALL 0x00107460 MOV R14,qword ptr [R15] MOV R13,qword ptr [R15 + 0x8] MOV AL,0x1 LEA R12,[RSP + 0x28] LEA RBP,[RSP + 0x8] LEA R15,[RSP + 0x48] LAB_001201ee: CMP R14,R13 JZ 0x0012025e TEST AL,0x1 JNZ 0x00120206 MOV RDI,RBX LEA RSI,[0x129dba] CALL 0x00107460 LAB_00120206: MOV RDI,R12 LEA RSI,[0x129dbd] LEA RDX,[RSP + 0x7] CALL 0x00108762 LAB_0012021a: MOV RDI,RBP MOV RSI,R14 CALL 0x001075e0 LAB_00120225: MOV RDI,R15 MOV RSI,R12 MOV RDX,RBP CALL 0x0010952c LAB_00120233: MOV RDI,RBX MOV RSI,R15 CALL 0x00107400 LAB_0012023e: MOV RDI,R15 CALL 0x00107860 MOV RDI,RBP CALL 0x00107860 MOV RDI,R12 CALL 0x00107860 ADD R14,0x20 XOR EAX,EAX JMP 0x001201ee LAB_0012025e: LEA RSI,[0x129da5] MOV RDI,RBX CALL 0x00107460 LAB_0012026d: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CLI::detail::format_aliases(std::ostream&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, unsigned long) */ ostream * CLI::detail::format_aliases(ostream *param_1,vector *param_2,ulong param_3) { string *psVar1; bool bVar2; string *psVar3; allocator local_91; string local_90 [32]; string local_70 [32]; string local_50 [32]; if (*(long *)param_2 != *(long *)(param_2 + 8)) { *(long *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x10) = (long)(int)param_3; std::operator<<(param_1," aliases: "); psVar1 = *(string **)(param_2 + 8); bVar2 = true; for (psVar3 = *(string **)param_2; psVar3 != psVar1; psVar3 = psVar3 + 0x20) { if (!bVar2) { std::operator<<(param_1,", "); } std::__cxx11::string::string<std::allocator<char>>(local_70," ",&local_91); /* try { // try from 0012021a to 00120224 has its CatchHandler @ 0012027f */ std::__cxx11::string::string(local_90,psVar3); /* try { // try from 00120225 to 00120232 has its CatchHandler @ 00120284 */ fix_newlines((detail *)local_50,local_70,local_90); /* try { // try from 00120233 to 0012023d has its CatchHandler @ 00120289 */ std::operator<<(param_1,local_50); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_90); std::__cxx11::string::~string(local_70); bVar2 = false; } std::operator<<(param_1,"\n"); } return param_1; }
2,082
my_close
eloqsql/mysys/my_open.c
int my_close(File fd, myf MyFlags) { int err; char *name= NULL; DBUG_ENTER("my_close"); DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE))) MyFlags|= my_global_flags; if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN) { name= my_file_info[fd].name; my_file_info[fd].name= NULL; my_file_info[fd].type= UNOPEN; } #ifndef _WIN32 err= close(fd); #else err= my_win_close(fd); #endif if (err) { DBUG_PRINT("error",("Got error %d on close",err)); my_errno=errno; if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), name,errno); } if (name) { my_free(name); } my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED); DBUG_RETURN(err); }
O0
c
my_close: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq $0x0, -0x20(%rbp) jmp 0xfbfa9 movq -0x10(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax jne 0xfbfc9 leaq 0xb91faa(%rip), %rax # 0xc8df68 movq (%rax), %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movl -0x4(%rbp), %eax leaq 0x1cbb5d(%rip), %rcx # 0x2c7b30 cmpl (%rcx), %eax jae 0xfc046 leaq 0x1cbb5a(%rip), %rax # 0x2c7b38 movq (%rax), %rax movslq -0x4(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) je 0xfc046 leaq 0x1cbb3f(%rip), %rax # 0x2c7b38 movq (%rax), %rax movslq -0x4(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x20(%rbp) leaq 0x1cbb23(%rip), %rax # 0x2c7b38 movq (%rax), %rax movslq -0x4(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq $0x0, (%rax) leaq 0x1cbb07(%rip), %rax # 0x2c7b38 movq (%rax), %rax movslq -0x4(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x8(%rax) movl -0x4(%rbp), %edi callq 0x29190 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0xfc0b4 jmp 0xfc059 jmp 0xfc05b callq 0x29700 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0xfdd30 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0xfc0b2 movq -0x10(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) callq 0x29700 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx movl (%rax), %ecx movl $0x4, %edi movb $0x0, %al callq 0xf76a0 jmp 0xfc0b4 cmpq $0x0, -0x20(%rbp) je 0xfc0c4 movq -0x20(%rbp), %rdi callq 0xfb710 movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF movl -0x24(%rbp), %eax leaq 0xb91e9f(%rip), %rcx # 0xc8df74 lock xaddl %eax, (%rcx) movl %eax, -0x28(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
my_close: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_20], 0 jmp short $+2 loc_FBFA9: mov rax, [rbp+var_10] and rax, 18h cmp rax, 0 jnz short loc_FBFC9 lea rax, my_global_flags mov rax, [rax] or rax, [rbp+var_10] mov [rbp+var_10], rax loc_FBFC9: mov eax, [rbp+var_4] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_FC046 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_4] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jz short loc_FC046 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_4] shl rcx, 4 add rax, rcx mov rax, [rax] mov [rbp+var_20], rax lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_4] shl rcx, 4 add rax, rcx mov qword ptr [rax], 0 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_4] shl rcx, 4 add rax, rcx mov dword ptr [rax+8], 0 loc_FC046: mov edi, [rbp+var_4] call _close mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_FC0B4 jmp short $+2 loc_FC059: jmp short $+2 loc_FC05B: call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx mov rax, [rbp+var_10] and rax, 18h cmp rax, 0 jz short loc_FC0B2 mov rax, [rbp+var_10] and rax, 440h or rax, 4 mov [rbp+var_40], rax mov rax, [rbp+var_20] mov [rbp+var_38], rax call ___errno_location mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] mov ecx, [rax] mov edi, 4 mov al, 0 call my_error loc_FC0B2: jmp short $+2 loc_FC0B4: cmp [rbp+var_20], 0 jz short loc_FC0C4 mov rdi, [rbp+var_20] call my_free loc_FC0C4: mov [rbp+var_24], 0FFFFFFFFh mov eax, [rbp+var_24] lea rcx, my_file_opened lock xadd [rcx], eax mov [rbp+var_28], eax mov eax, [rbp+var_14] mov [rbp+var_44], eax mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long my_close(unsigned int a1, const char *a2) { unsigned int *v2; // rax int v4; // [rsp+24h] [rbp-2Ch] long long v5; // [rsp+30h] [rbp-20h] unsigned int v6; // [rsp+3Ch] [rbp-14h] __int16 v7; // [rsp+40h] [rbp-10h] v7 = (__int16)a2; v5 = 0LL; if ( ((unsigned __int8)a2 & 0x18) == 0 ) v7 = (unsigned __int16)a2 | my_global_flags; if ( a1 < my_file_limit && *((_DWORD *)my_file_info + 4 * (int)a1 + 2) ) { v5 = *((_QWORD *)my_file_info + 2 * (int)a1); *((_QWORD *)my_file_info + 2 * (int)a1) = 0LL; *((_DWORD *)my_file_info + 4 * (int)a1 + 2) = 0; } v6 = close(a1); if ( v6 ) { v4 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, a2) = v4; if ( (v7 & 0x18) != 0 ) { v2 = (unsigned int *)__errno_location(); my_error(4u, v7 & 0x440 | 4LL, v5, *v2); } } if ( v5 ) my_free(v5); _InterlockedExchangeAdd(my_file_opened, 0xFFFFFFFF); return v6; }
my_close: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x20],0x0 JMP 0x001fbfa9 LAB_001fbfa9: MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x18 CMP RAX,0x0 JNZ 0x001fbfc9 LEA RAX,[0xd8df68] MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX LAB_001fbfc9: MOV EAX,dword ptr [RBP + -0x4] LEA RCX,[0x3c7b30] CMP EAX,dword ptr [RCX] JNC 0x001fc046 LEA RAX,[0x3c7b38] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x4] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JZ 0x001fc046 LEA RAX,[0x3c7b38] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x4] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3c7b38] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x4] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RAX],0x0 LEA RAX,[0x3c7b38] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x4] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RAX + 0x8],0x0 LAB_001fc046: MOV EDI,dword ptr [RBP + -0x4] CALL 0x00129190 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001fc0b4 JMP 0x001fc059 LAB_001fc059: JMP 0x001fc05b LAB_001fc05b: CALL 0x00129700 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x001fdd30 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x18 CMP RAX,0x0 JZ 0x001fc0b2 MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX CALL 0x00129700 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV EDI,0x4 MOV AL,0x0 CALL 0x001f76a0 LAB_001fc0b2: JMP 0x001fc0b4 LAB_001fc0b4: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001fc0c4 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001fb710 LAB_001fc0c4: MOV dword ptr [RBP + -0x24],0xffffffff MOV EAX,dword ptr [RBP + -0x24] LEA RCX,[0xd8df74] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int my_close(uint param_1,ulong param_2) { int iVar1; int iVar2; int *piVar3; long local_28; ulong local_18; local_28 = 0; local_18 = param_2; if ((param_2 & 0x18) == 0) { local_18 = my_global_flags | param_2; } if ((param_1 < my_file_limit) && (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) != 0)) { local_28 = *(long *)(my_file_info + (long)(int)param_1 * 0x10); *(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = 0; *(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = 0; } iVar2 = close(param_1); if (iVar2 != 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((local_18 & 0x18) != 0) { piVar3 = __errno_location(); my_error(4,local_18 & 0x440 | 4,local_28,*piVar3); } } if (local_28 != 0) { my_free(local_28); } LOCK(); my_file_opened = my_file_opened + -1; UNLOCK(); return iVar2; }
2,083
quantize_row_q8_K_ref
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
void quantize_row_q8_K_ref(const float * GGML_RESTRICT x, block_q8_K * GGML_RESTRICT y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int i = 0; i < nb; i++) { float max = 0; float amax = 0; for (int j = 0; j < QK_K; ++j) { float ax = fabsf(x[j]); if (ax > amax) { amax = ax; max = x[j]; } } if (!amax) { y[i].d = 0; memset(y[i].qs, 0, QK_K); x += QK_K; continue; } //const float iscale = -128.f/max; // We need this change for IQ2_XXS, else the AVX implementation becomes very awkward const float iscale = -127.f/max; for (int j = 0; j < QK_K; ++j) { int v = nearest_int(iscale*x[j]); y[i].qs[j] = MIN(127, v); } for (int j = 0; j < QK_K/16; ++j) { int sum = 0; for (int ii = 0; ii < 16; ++ii) { sum += y[i].qs[j*16 + ii]; } y[i].bsums[j] = sum; } y[i].d = 1/iscale; x += QK_K; } }
O3
c
quantize_row_q8_K_ref: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax leaq 0xff(%rdx), %r15 testq %rdx, %rdx cmovnsq %rdx, %r15 cmpq $0x100, %rdx # imm = 0x100 jl 0x3359b movq %rsi, %rbx movq %rdi, %r14 sarq $0x8, %r15 leaq 0x4(%rsi), %r12 leaq 0x104(%rsi), %r13 xorl %ebp, %ebp movaps 0x16c1f(%rip), %xmm5 # 0x4a020 xorps %xmm6, %xmm6 movaps 0x1b2e5(%rip), %xmm7 # 0x4e6f0 movaps 0x1b2fd(%rip), %xmm8 # 0x4e710 movdqa 0x1b3c4(%rip), %xmm9 # 0x4e7e0 movdqa 0x1b2db(%rip), %xmm10 # 0x4e700 movl $0x124, %edx # imm = 0x124 xorl %eax, %eax xorps %xmm0, %xmm0 xorps %xmm2, %xmm2 movaps %xmm0, %xmm3 movss (%r14,%rax,4), %xmm4 movaps %xmm4, %xmm0 andps %xmm5, %xmm0 movaps %xmm3, %xmm1 cmpltss %xmm0, %xmm1 andps %xmm1, %xmm4 andnps %xmm2, %xmm1 orps %xmm4, %xmm1 maxss %xmm3, %xmm0 incq %rax movaps %xmm1, %xmm2 cmpq $0x100, %rax # imm = 0x100 jne 0x33432 ucomiss %xmm6, %xmm0 jne 0x3346f jnp 0x3353c movss 0x1b6dd(%rip), %xmm0 # 0x4eb54 divss %xmm1, %xmm0 movaps %xmm0, %xmm1 shufps $0x0, %xmm0, %xmm1 # xmm1 = xmm1[0,0],xmm0[0,0] xorl %eax, %eax movups (%r14,%rax,4), %xmm2 mulps %xmm1, %xmm2 addps %xmm7, %xmm2 movaps %xmm2, %xmm3 andps %xmm8, %xmm3 movdqa %xmm9, %xmm4 pcmpgtd %xmm3, %xmm4 andps %xmm4, %xmm2 pandn %xmm9, %xmm4 por %xmm2, %xmm4 pand %xmm10, %xmm4 packuswb %xmm4, %xmm4 packuswb %xmm4, %xmm4 movd %xmm4, (%r12,%rax) addq $0x4, %rax cmpq $0x100, %rax # imm = 0x100 jne 0x33484 xorl %eax, %eax movq (%r12,%rax,8), %xmm1 punpcklbw %xmm1, %xmm1 # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] psraw $0x8, %xmm1 movq 0x8(%r12,%rax,8), %xmm2 punpcklbw %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] psraw $0x8, %xmm2 paddw %xmm1, %xmm2 pshufd $0xee, %xmm2, %xmm1 # xmm1 = xmm2[2,3,2,3] paddw %xmm2, %xmm1 pshufd $0x55, %xmm1, %xmm2 # xmm2 = xmm1[1,1,1,1] paddw %xmm1, %xmm2 movdqa %xmm2, %xmm1 psrld $0x10, %xmm1 paddw %xmm2, %xmm1 movd %xmm1, %ecx movw %cx, (%r13,%rax) addq $0x2, %rax cmpq $0x20, %rax jne 0x334cc movss 0x16bc6(%rip), %xmm1 # 0x4a0f0 divss %xmm0, %xmm1 imulq $0x124, %rbp, %rax # imm = 0x124 movss %xmm1, (%rbx,%rax) jmp 0x33582 imulq $0x124, %rbp, %rdi # imm = 0x124 addq %rbx, %rdi movl $0x104, %edx # imm = 0x104 xorl %esi, %esi callq 0x168e0 movl $0x124, %edx # imm = 0x124 movdqa 0x1b1a0(%rip), %xmm10 # 0x4e700 movdqa 0x1b277(%rip), %xmm9 # 0x4e7e0 movaps 0x1b19f(%rip), %xmm8 # 0x4e710 movaps 0x1b178(%rip), %xmm7 # 0x4e6f0 xorps %xmm6, %xmm6 movaps 0x16a9e(%rip), %xmm5 # 0x4a020 addq $0x400, %r14 # imm = 0x400 incq %rbp addq %rdx, %r12 addq %rdx, %r13 cmpq %r15, %rbp jne 0x3342a addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
quantize_row_q8_K_ref: push rbp push r15 push r14 push r13 push r12 push rbx push rax lea r15, [rdx+0FFh] test rdx, rdx cmovns r15, rdx cmp rdx, 100h jl loc_3359B mov rbx, rsi mov r14, rdi sar r15, 8 lea r12, [rsi+4] lea r13, [rsi+104h] xor ebp, ebp movaps xmm5, cs:xmmword_4A020 xorps xmm6, xmm6 movaps xmm7, cs:xmmword_4E6F0 movaps xmm8, cs:xmmword_4E710 movdqa xmm9, cs:xmmword_4E7E0 movdqa xmm10, cs:xmmword_4E700 mov edx, 124h loc_3342A: xor eax, eax xorps xmm0, xmm0 xorps xmm2, xmm2 loc_33432: movaps xmm3, xmm0 movss xmm4, dword ptr [r14+rax*4] movaps xmm0, xmm4 andps xmm0, xmm5 movaps xmm1, xmm3 cmpltss xmm1, xmm0 andps xmm4, xmm1 andnps xmm1, xmm2 orps xmm1, xmm4 maxss xmm0, xmm3 inc rax movaps xmm2, xmm1 cmp rax, 100h jnz short loc_33432 ucomiss xmm0, xmm6 jnz short loc_3346F jnp loc_3353C loc_3346F: movss xmm0, cs:dword_4EB54 divss xmm0, xmm1 movaps xmm1, xmm0 shufps xmm1, xmm0, 0 xor eax, eax loc_33484: movups xmm2, xmmword ptr [r14+rax*4] mulps xmm2, xmm1 addps xmm2, xmm7 movaps xmm3, xmm2 andps xmm3, xmm8 movdqa xmm4, xmm9 pcmpgtd xmm4, xmm3 andps xmm2, xmm4 pandn xmm4, xmm9 por xmm4, xmm2 pand xmm4, xmm10 packuswb xmm4, xmm4 packuswb xmm4, xmm4 movd dword ptr [r12+rax], xmm4 add rax, 4 cmp rax, 100h jnz short loc_33484 xor eax, eax loc_334CC: movq xmm1, qword ptr [r12+rax*8] punpcklbw xmm1, xmm1 psraw xmm1, 8 movq xmm2, qword ptr [r12+rax*8+8] punpcklbw xmm2, xmm2 psraw xmm2, 8 paddw xmm2, xmm1 pshufd xmm1, xmm2, 0EEh paddw xmm1, xmm2 pshufd xmm2, xmm1, 55h ; 'U' paddw xmm2, xmm1 movdqa xmm1, xmm2 psrld xmm1, 10h paddw xmm1, xmm2 movd ecx, xmm1 mov [r13+rax+0], cx add rax, 2 cmp rax, 20h ; ' ' jnz short loc_334CC movss xmm1, cs:dword_4A0F0 divss xmm1, xmm0 imul rax, rbp, 124h movss dword ptr [rbx+rax], xmm1 jmp short loc_33582 loc_3353C: imul rdi, rbp, 124h add rdi, rbx mov edx, 104h xor esi, esi call _memset mov edx, 124h movdqa xmm10, cs:xmmword_4E700 movdqa xmm9, cs:xmmword_4E7E0 movaps xmm8, cs:xmmword_4E710 movaps xmm7, cs:xmmword_4E6F0 xorps xmm6, xmm6 movaps xmm5, cs:xmmword_4A020 loc_33582: add r14, 400h inc rbp add r12, rdx add r13, rdx cmp rbp, r15 jnz loc_3342A loc_3359B: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long quantize_row_q8_K_ref(long long a1, long long a2, long long a3) { long long result; // rax long long v4; // r15 long long v6; // r15 long long v7; // r12 long long v8; // r13 long long v9; // rbp __m128 v10; // xmm5 __m128 v11; // xmm7 __m128 v12; // xmm8 __m128i si128; // xmm9 __m128i v14; // xmm10 long long v15; // rax __m128 v16; // xmm0 __m128 v17; // xmm2 __m128 v18; // xmm3 __m128 v19; // xmm1 __m128 v20; // xmm1 __m128 v21; // xmm0 __m128 v22; // xmm1 long long i; // rax __m128 v24; // xmm2 __m128 v25; // xmm4 __m128i v26; // xmm4 __m128i v27; // xmm4 long long j; // rax __m128i v29; // xmm1 __m128i v30; // xmm2 __m128i v31; // xmm2 __m128i v32; // xmm1 __m128i v33; // xmm2 v4 = a3 + 255; if ( a3 >= 0 ) v4 = a3; if ( a3 >= 256 ) { v6 = v4 >> 8; v7 = a2 + 4; v8 = a2 + 260; v9 = 0LL; v10 = (__m128)xmmword_4A020; v11 = (__m128)xmmword_4E6F0; v12 = (__m128)xmmword_4E710; si128 = _mm_load_si128((const __m128i *)&xmmword_4E7E0); v14 = _mm_load_si128((const __m128i *)&xmmword_4E700); do { v15 = 0LL; v16 = 0LL; v17 = 0LL; do { v18 = v16; v16 = _mm_and_ps((__m128)*(unsigned int *)(a1 + 4 * v15), v10); v19 = _mm_cmplt_ss(v18, v16); v20 = _mm_or_ps(_mm_andnot_ps(v19, v17), _mm_and_ps((__m128)*(unsigned int *)(a1 + 4 * v15), v19)); v16.m128_f32[0] = fmaxf(v16.m128_f32[0], v18.m128_f32[0]); ++v15; v17 = v20; } while ( v15 != 256 ); if ( v16.m128_f32[0] == 0.0 ) { result = memset(a2 + 292 * v9, 0LL, 260LL); v14 = _mm_load_si128((const __m128i *)&xmmword_4E700); si128 = _mm_load_si128((const __m128i *)&xmmword_4E7E0); v12 = (__m128)xmmword_4E710; v11 = (__m128)xmmword_4E6F0; v10 = (__m128)xmmword_4A020; } else { v21 = (__m128)0xC2FE0000; v21.m128_f32[0] = -127.0 / v20.m128_f32[0]; v22 = _mm_shuffle_ps(v21, v21, 0); for ( i = 0LL; i != 256; i += 4LL ) { v24 = _mm_add_ps(_mm_mul_ps(*(__m128 *)(a1 + 4 * i), v22), v11); v25 = (__m128)_mm_cmpgt_epi32(si128, (__m128i)_mm_and_ps(v24, v12)); v26 = _mm_and_si128(_mm_or_si128(_mm_andnot_si128((__m128i)v25, si128), (__m128i)_mm_and_ps(v24, v25)), v14); v27 = _mm_packus_epi16(v26, v26); *(_DWORD *)(v7 + i) = _mm_cvtsi128_si32(_mm_packus_epi16(v27, v27)); } for ( j = 0LL; j != 32; j += 2LL ) { v29 = _mm_loadl_epi64((const __m128i *)(v7 + 8 * j)); v30 = _mm_loadl_epi64((const __m128i *)(v7 + 8 * j + 8)); v31 = _mm_add_epi16( _mm_srai_epi16(_mm_unpacklo_epi8(v30, v30), 8u), _mm_srai_epi16(_mm_unpacklo_epi8(v29, v29), 8u)); v32 = _mm_add_epi16(_mm_shuffle_epi32(v31, 238), v31); v33 = _mm_add_epi16(_mm_shuffle_epi32(v32, 85), v32); *(_WORD *)(v8 + j) = _mm_cvtsi128_si32(_mm_add_epi16(_mm_srli_epi32(v33, 0x10u), v33)); } result = 292 * v9; *(float *)(a2 + 292 * v9) = 1.0 / v21.m128_f32[0]; } a1 += 1024LL; ++v9; v7 += 292LL; v8 += 292LL; } while ( v9 != v6 ); } return result; }
quantize_row_q8_K_ref: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX LEA R15,[RDX + 0xff] TEST RDX,RDX CMOVNS R15,RDX CMP RDX,0x100 JL 0x0013359b MOV RBX,RSI MOV R14,RDI SAR R15,0x8 LEA R12,[RSI + 0x4] LEA R13,[RSI + 0x104] XOR EBP,EBP MOVAPS XMM5,xmmword ptr [0x0014a020] XORPS XMM6,XMM6 MOVAPS XMM7,xmmword ptr [0x0014e6f0] MOVAPS XMM8,xmmword ptr [0x0014e710] MOVDQA XMM9,xmmword ptr [0x0014e7e0] MOVDQA XMM10,xmmword ptr [0x0014e700] MOV EDX,0x124 LAB_0013342a: XOR EAX,EAX XORPS XMM0,XMM0 XORPS XMM2,XMM2 LAB_00133432: MOVAPS XMM3,XMM0 MOVSS XMM4,dword ptr [R14 + RAX*0x4] MOVAPS XMM0,XMM4 ANDPS XMM0,XMM5 MOVAPS XMM1,XMM3 CMPLTSS XMM1,XMM0 ANDPS XMM4,XMM1 ANDNPS XMM1,XMM2 ORPS XMM1,XMM4 MAXSS XMM0,XMM3 INC RAX MOVAPS XMM2,XMM1 CMP RAX,0x100 JNZ 0x00133432 UCOMISS XMM0,XMM6 JNZ 0x0013346f JNP 0x0013353c LAB_0013346f: MOVSS XMM0,dword ptr [0x0014eb54] DIVSS XMM0,XMM1 MOVAPS XMM1,XMM0 SHUFPS XMM1,XMM0,0x0 XOR EAX,EAX LAB_00133484: MOVUPS XMM2,xmmword ptr [R14 + RAX*0x4] MULPS XMM2,XMM1 ADDPS XMM2,XMM7 MOVAPS XMM3,XMM2 ANDPS XMM3,XMM8 MOVDQA XMM4,XMM9 PCMPGTD XMM4,XMM3 ANDPS XMM2,XMM4 PANDN XMM4,XMM9 POR XMM4,XMM2 PAND XMM4,XMM10 PACKUSWB XMM4,XMM4 PACKUSWB XMM4,XMM4 MOVD dword ptr [R12 + RAX*0x1],XMM4 ADD RAX,0x4 CMP RAX,0x100 JNZ 0x00133484 XOR EAX,EAX LAB_001334cc: MOVQ XMM1,qword ptr [R12 + RAX*0x8] PUNPCKLBW XMM1,XMM1 PSRAW XMM1,0x8 MOVQ XMM2,qword ptr [R12 + RAX*0x8 + 0x8] PUNPCKLBW XMM2,XMM2 PSRAW XMM2,0x8 PADDW XMM2,XMM1 PSHUFD XMM1,XMM2,0xee PADDW XMM1,XMM2 PSHUFD XMM2,XMM1,0x55 PADDW XMM2,XMM1 MOVDQA XMM1,XMM2 PSRLD XMM1,0x10 PADDW XMM1,XMM2 MOVD ECX,XMM1 MOV word ptr [R13 + RAX*0x1],CX ADD RAX,0x2 CMP RAX,0x20 JNZ 0x001334cc MOVSS XMM1,dword ptr [0x0014a0f0] DIVSS XMM1,XMM0 IMUL RAX,RBP,0x124 MOVSS dword ptr [RBX + RAX*0x1],XMM1 JMP 0x00133582 LAB_0013353c: IMUL RDI,RBP,0x124 ADD RDI,RBX MOV EDX,0x104 XOR ESI,ESI CALL 0x001168e0 MOV EDX,0x124 MOVDQA XMM10,xmmword ptr [0x0014e700] MOVDQA XMM9,xmmword ptr [0x0014e7e0] MOVAPS XMM8,xmmword ptr [0x0014e710] MOVAPS XMM7,xmmword ptr [0x0014e6f0] XORPS XMM6,XMM6 MOVAPS XMM5,xmmword ptr [0x0014a020] LAB_00133582: ADD R14,0x400 INC RBP ADD R12,RDX ADD R13,RDX CMP RBP,R15 JNZ 0x0013342a LAB_0013359b: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void quantize_row_q8_K_ref(long param_1,long param_2,long param_3) { float *pfVar1; uint uVar2; ulong uVar3; char cVar4; short sVar8; short sVar9; short sVar10; long lVar11; long lVar12; long lVar13; long lVar14; long lVar15; float fVar16; float fVar17; int1 auVar18 [16]; float fVar27; float fVar37; float fVar38; int1 auVar28 [16]; int1 auVar36 [16]; short sVar39; int1 auVar42 [16]; uint uVar43; float fVar44; float fVar45; float fVar46; float fVar47; uint uVar48; uint uVar49; uint uVar50; uint uVar51; int1 auVar52 [16]; int1 auVar53 [16]; char cVar5; char cVar6; char cVar7; int1 auVar19 [16]; int1 auVar20 [16]; int1 auVar21 [16]; int1 auVar22 [16]; int1 auVar23 [16]; int1 auVar24 [16]; int1 auVar25 [16]; int1 uVar26; int1 auVar29 [16]; int1 auVar30 [16]; int1 auVar31 [16]; int1 auVar32 [16]; int1 auVar33 [16]; int1 auVar34 [16]; int1 auVar35 [16]; int4 uVar40; int6 uVar41; lVar15 = param_3 + 0xff; if (-1 < param_3) { lVar15 = param_3; } if (0xff < param_3) { lVar13 = param_2 + 4; lVar14 = param_2 + 0x104; lVar12 = 0; uVar43 = _DAT_0014a020; fVar44 = _DAT_0014e6f0; fVar45 = _UNK_0014e6f4; fVar46 = _UNK_0014e6f8; fVar47 = _UNK_0014e6fc; uVar48 = _DAT_0014e710; uVar49 = _UNK_0014e714; uVar50 = _UNK_0014e718; uVar51 = _UNK_0014e71c; auVar52 = _DAT_0014e7e0; auVar53 = _DAT_0014e700; do { lVar11 = 0; fVar17 = 0.0; fVar27 = 0.0; do { uVar2 = *(uint *)(param_1 + lVar11 * 4); fVar16 = (float)(uVar2 & uVar43); fVar17 = (float)(~-(uint)(fVar27 < fVar16) & (uint)fVar17 | uVar2 & -(uint)(fVar27 < fVar16) ); if (fVar16 <= fVar27) { fVar16 = fVar27; } lVar11 = lVar11 + 1; fVar27 = fVar16; } while (lVar11 != 0x100); if ((fVar16 != 0.0) || (NAN(fVar16))) { fVar17 = DAT_0014eb54 / fVar17; lVar11 = 0; do { pfVar1 = (float *)(param_1 + lVar11 * 4); fVar27 = *pfVar1 * fVar17 + fVar44; fVar16 = pfVar1[1] * fVar17 + fVar45; fVar37 = pfVar1[2] * fVar17 + fVar46; fVar38 = pfVar1[3] * fVar17 + fVar47; auVar36._0_4_ = -(uint)((int)((uint)fVar27 & uVar48) < auVar52._0_4_); auVar36._4_4_ = -(uint)((int)((uint)fVar16 & uVar49) < auVar52._4_4_); auVar36._8_4_ = -(uint)((int)((uint)fVar37 & uVar50) < auVar52._8_4_); auVar36._12_4_ = -(uint)((int)((uint)fVar38 & uVar51) < auVar52._12_4_); auVar42._0_4_ = (uint)fVar27 & auVar36._0_4_; auVar42._4_4_ = (uint)fVar16 & auVar36._4_4_; auVar42._8_4_ = (uint)fVar37 & auVar36._8_4_; auVar42._12_4_ = (uint)fVar38 & auVar36._12_4_; auVar42 = (~auVar36 & auVar52 | auVar42) & auVar53; sVar8 = auVar42._0_2_; cVar4 = (0 < sVar8) * (sVar8 < 0x100) * auVar42[0] - (0xff < sVar8); sVar8 = auVar42._2_2_; sVar39 = CONCAT11((0 < sVar8) * (sVar8 < 0x100) * auVar42[2] - (0xff < sVar8),cVar4); sVar8 = auVar42._4_2_; cVar5 = (0 < sVar8) * (sVar8 < 0x100) * auVar42[4] - (0xff < sVar8); sVar8 = auVar42._6_2_; uVar40 = CONCAT13((0 < sVar8) * (sVar8 < 0x100) * auVar42[6] - (0xff < sVar8), CONCAT12(cVar5,sVar39)); sVar8 = auVar42._8_2_; cVar6 = (0 < sVar8) * (sVar8 < 0x100) * auVar42[8] - (0xff < sVar8); sVar8 = auVar42._10_2_; uVar41 = CONCAT15((0 < sVar8) * (sVar8 < 0x100) * auVar42[10] - (0xff < sVar8), CONCAT14(cVar6,uVar40)); sVar8 = auVar42._12_2_; cVar7 = (0 < sVar8) * (sVar8 < 0x100) * auVar42[0xc] - (0xff < sVar8); sVar10 = auVar42._14_2_; sVar8 = (short)((uint)uVar40 >> 0x10); sVar9 = (short)((uint6)uVar41 >> 0x20); sVar10 = (short)(CONCAT17((0 < sVar10) * (sVar10 < 0x100) * auVar42[0xe] - (0xff < sVar10) ,CONCAT16(cVar7,uVar41)) >> 0x30); *(uint *)(lVar13 + lVar11) = CONCAT13((0 < sVar10) * (sVar10 < 0x100) * cVar7 - (0xff < sVar10), CONCAT12((0 < sVar9) * (sVar9 < 0x100) * cVar6 - (0xff < sVar9), CONCAT11((0 < sVar8) * (sVar8 < 0x100) * cVar5 - (0xff < sVar8), (0 < sVar39) * (sVar39 < 0x100) * cVar4 - (0xff < sVar39)) )); lVar11 = lVar11 + 4; } while (lVar11 != 0x100); lVar11 = 0; do { uVar3 = *(ulong *)(lVar13 + lVar11 * 8); uVar26 = (int1)(uVar3 >> 0x38); auVar25._8_6_ = 0; auVar25._0_8_ = uVar3; auVar25[0xe] = uVar26; auVar25[0xf] = uVar26; uVar26 = (int1)(uVar3 >> 0x30); auVar24._14_2_ = auVar25._14_2_; auVar24._8_5_ = 0; auVar24._0_8_ = uVar3; auVar24[0xd] = uVar26; auVar23._13_3_ = auVar24._13_3_; auVar23._8_4_ = 0; auVar23._0_8_ = uVar3; auVar23[0xc] = uVar26; uVar26 = (int1)(uVar3 >> 0x28); auVar22._12_4_ = auVar23._12_4_; auVar22._8_3_ = 0; auVar22._0_8_ = uVar3; auVar22[0xb] = uVar26; auVar21._11_5_ = auVar22._11_5_; auVar21._8_2_ = 0; auVar21._0_8_ = uVar3; auVar21[10] = uVar26; uVar26 = (int1)(uVar3 >> 0x20); auVar20._10_6_ = auVar21._10_6_; auVar20[8] = 0; auVar20._0_8_ = uVar3; auVar20[9] = uVar26; auVar19._9_7_ = auVar20._9_7_; auVar19[8] = uVar26; auVar19._0_8_ = uVar3; uVar26 = (int1)(uVar3 >> 0x18); auVar18._8_8_ = auVar19._8_8_; auVar18[7] = uVar26; auVar18[6] = uVar26; uVar26 = (int1)(uVar3 >> 0x10); auVar18[5] = uVar26; auVar18[4] = uVar26; uVar26 = (int1)(uVar3 >> 8); auVar18[3] = uVar26; auVar18[2] = uVar26; auVar18[0] = (int1)uVar3; auVar18[1] = auVar18[0]; auVar42 = psraw(auVar18,8); uVar3 = *(ulong *)(lVar13 + 8 + lVar11 * 8); uVar26 = (int1)(uVar3 >> 0x38); auVar35._8_6_ = 0; auVar35._0_8_ = uVar3; auVar35[0xe] = uVar26; auVar35[0xf] = uVar26; uVar26 = (int1)(uVar3 >> 0x30); auVar34._14_2_ = auVar35._14_2_; auVar34._8_5_ = 0; auVar34._0_8_ = uVar3; auVar34[0xd] = uVar26; auVar33._13_3_ = auVar34._13_3_; auVar33._8_4_ = 0; auVar33._0_8_ = uVar3; auVar33[0xc] = uVar26; uVar26 = (int1)(uVar3 >> 0x28); auVar32._12_4_ = auVar33._12_4_; auVar32._8_3_ = 0; auVar32._0_8_ = uVar3; auVar32[0xb] = uVar26; auVar31._11_5_ = auVar32._11_5_; auVar31._8_2_ = 0; auVar31._0_8_ = uVar3; auVar31[10] = uVar26; uVar26 = (int1)(uVar3 >> 0x20); auVar30._10_6_ = auVar31._10_6_; auVar30[8] = 0; auVar30._0_8_ = uVar3; auVar30[9] = uVar26; auVar29._9_7_ = auVar30._9_7_; auVar29[8] = uVar26; auVar29._0_8_ = uVar3; uVar26 = (int1)(uVar3 >> 0x18); auVar28._8_8_ = auVar29._8_8_; auVar28[7] = uVar26; auVar28[6] = uVar26; uVar26 = (int1)(uVar3 >> 0x10); auVar28[5] = uVar26; auVar28[4] = uVar26; uVar26 = (int1)(uVar3 >> 8); auVar28[3] = uVar26; auVar28[2] = uVar26; auVar28[0] = (int1)uVar3; auVar28[1] = auVar28[0]; auVar36 = psraw(auVar28,8); *(short *)(lVar14 + lVar11) = auVar36._14_2_ + auVar42._14_2_ + auVar36._6_2_ + auVar42._6_2_ + auVar36._10_2_ + auVar42._10_2_ + auVar36._2_2_ + auVar42._2_2_ + auVar36._12_2_ + auVar42._12_2_ + auVar36._4_2_ + auVar42._4_2_ + auVar36._8_2_ + auVar42._8_2_ + auVar36._0_2_ + auVar42._0_2_; lVar11 = lVar11 + 2; } while (lVar11 != 0x20); *(float *)(param_2 + lVar12 * 0x124) = DAT_0014a0f0 / fVar17; } else { memset((void *)(lVar12 * 0x124 + param_2),0,0x104); uVar43 = _DAT_0014a020; fVar44 = _DAT_0014e6f0; fVar45 = _UNK_0014e6f4; fVar46 = _UNK_0014e6f8; fVar47 = _UNK_0014e6fc; uVar48 = _DAT_0014e710; uVar49 = _UNK_0014e714; uVar50 = _UNK_0014e718; uVar51 = _UNK_0014e71c; auVar52 = _DAT_0014e7e0; auVar53 = _DAT_0014e700; } param_1 = param_1 + 0x400; lVar12 = lVar12 + 1; lVar13 = lVar13 + 0x124; lVar14 = lVar14 + 0x124; } while (lVar12 != lVar15 >> 8); } return; }
2,084
mul_sum_us8_pairs_int32x8(long long vector[4], long long vector[4])
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
static inline __m256i mul_sum_us8_pairs_int32x8(const __m256i ax, const __m256i sy) { #if defined(__AVX512VNNI__) && defined(__AVX512VL__) const __m256i zero = _mm256_setzero_si256(); return _mm256_dpbusd_epi32(zero, ax, sy); #elif defined(__AVXVNNI__) const __m256i zero = _mm256_setzero_si256(); return _mm256_dpbusd_avx_epi32(zero, ax, sy); #else // Perform multiplication and create 16-bit values const __m256i dot = _mm256_maddubs_epi16(ax, sy); return sum_i16_pairs_int32x8(dot); #endif }
O0
cpp
mul_sum_us8_pairs_int32x8(long long vector[4], long long vector[4]): pushq %rbp movq %rsp, %rbp andq $-0x20, %rsp subq $0xc0, %rsp vmovdqa %ymm0, 0x40(%rsp) vmovdqa %ymm1, 0x20(%rsp) vmovdqa 0x40(%rsp), %ymm1 vmovdqa 0x20(%rsp), %ymm0 vmovdqa %ymm1, 0x80(%rsp) vmovdqa %ymm0, 0x60(%rsp) vmovdqa 0x80(%rsp), %ymm0 vmovdqa 0x60(%rsp), %ymm1 vpmaddubsw %ymm1, %ymm0, %ymm0 vmovdqa %ymm0, (%rsp) vmovdqa (%rsp), %ymm0 callq 0x4f750 movq %rbp, %rsp popq %rbp retq nop
_ZL25mul_sum_us8_pairs_int32x8Dv4_xS_: push rbp mov rbp, rsp and rsp, 0FFFFFFFFFFFFFFE0h sub rsp, 0C0h vmovdqa [rsp+0C0h+var_80], ymm0 vmovdqa [rsp+0C0h+var_A0], ymm1 vmovdqa ymm1, [rsp+0C0h+var_80] vmovdqa ymm0, [rsp+0C0h+var_A0] vmovdqa [rsp+0C0h+var_40], ymm1 vmovdqa [rsp+0C0h+var_60], ymm0 vmovdqa ymm0, [rsp+0C0h+var_40] vmovdqa ymm1, [rsp+0C0h+var_60] vpmaddubsw ymm0, ymm0, ymm1 vmovdqa [rsp+0C0h+var_C0], ymm0 vmovdqa ymm0, [rsp+0C0h+var_C0] call _ZL21sum_i16_pairs_int32x8Dv4_x mov rsp, rbp pop rbp retn
long long mul_sum_us8_pairs_int32x8(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { __m256 v15; // [rsp+0h] [rbp-C0h] __m256 v16; // [rsp+20h] [rbp-A0h] __m256 v17; // [rsp+40h] [rbp-80h] __m256 v18; // [rsp+60h] [rbp-60h] __asm { vmovdqa [rsp+0C0h+var_80], ymm0 vmovdqa [rsp+0C0h+var_A0], ymm1 vmovdqa ymm1, [rsp+0C0h+var_80] vmovdqa ymm0, [rsp+0C0h+var_A0] vmovdqa [rsp+0C0h+var_40], ymm1 vmovdqa [rsp+0C0h+var_60], ymm0 vmovdqa ymm0, [rsp+0C0h+var_40] vmovdqa ymm1, [rsp+0C0h+var_60] vpmaddubsw ymm0, ymm0, ymm1 vmovdqa [rsp+0C0h+var_C0], ymm0 vmovdqa ymm0, [rsp+0C0h+var_C0] } return sum_i16_pairs_int32x8( a1, a2, a3, a4, a5, a6, *(_QWORD *)v15.m256_f32, *(_QWORD *)&v15.m256_f32[2], *(_QWORD *)&v15.m256_f32[4], *(_QWORD *)&v15.m256_f32[6], *(_QWORD *)v16.m256_f32, *(_QWORD *)&v16.m256_f32[2], *(_QWORD *)&v16.m256_f32[4], *(_QWORD *)&v16.m256_f32[6], *(_QWORD *)v17.m256_f32, *(_QWORD *)&v17.m256_f32[2], *(_QWORD *)&v17.m256_f32[4], *(_QWORD *)&v17.m256_f32[6], *(_QWORD *)v18.m256_f32, *(_QWORD *)&v18.m256_f32[2]); }
mul_sum_us8_pairs_int32x8: PUSH RBP MOV RBP,RSP AND RSP,-0x20 SUB RSP,0xc0 VMOVDQA ymmword ptr [RSP + 0x40],YMM0 VMOVDQA ymmword ptr [RSP + 0x20],YMM1 VMOVDQA YMM1,ymmword ptr [RSP + 0x40] VMOVDQA YMM0,ymmword ptr [RSP + 0x20] VMOVDQA ymmword ptr [RSP + 0x80],YMM1 VMOVDQA ymmword ptr [RSP + 0x60],YMM0 VMOVDQA YMM0,ymmword ptr [RSP + 0x80] VMOVDQA YMM1,ymmword ptr [RSP + 0x60] VPMADDUBSW YMM0,YMM0,YMM1 VMOVDQA ymmword ptr [RSP],YMM0 VMOVDQA YMM0,ymmword ptr [RSP] CALL 0x0014f750 MOV RSP,RBP POP RBP RET
/* mul_sum_us8_pairs_int32x8(long long __vector(4), long long __vector(4)) */ void mul_sum_us8_pairs_int32x8(_func_longlong_int *param_1,_func_longlong_int *param_2) { int1 auVar1 [32]; int1 auVar2 [32]; int8 in_XMM0_Qa; int8 in_XMM0_Qb; int8 in_YMM0_H; int8 in_register_00001218; int8 in_XMM1_Qa; int8 in_XMM1_Qb; int8 in_YMM1_H; int8 in_register_00001258; auVar2._8_8_ = in_XMM0_Qb; auVar2._0_8_ = in_XMM0_Qa; auVar2._16_8_ = in_YMM0_H; auVar2._24_8_ = in_register_00001218; auVar1._8_8_ = in_XMM1_Qb; auVar1._0_8_ = in_XMM1_Qa; auVar1._16_8_ = in_YMM1_H; auVar1._24_8_ = in_register_00001258; vpmaddubsw_avx2(auVar2,auVar1); sum_i16_pairs_int32x8(param_1); return; }
2,085
my_copy_8bit
eloqsql/strings/ctype-simple.c
size_t my_copy_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { set_if_smaller(src_length, dst_length); set_if_smaller(src_length, nchars); if (src_length) memmove(dst, src, src_length); status->m_source_end_pos= src + src_length; status->m_well_formed_error_pos= NULL; return src_length; }
O3
c
my_copy_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %rbx movq 0x10(%rbp), %r15 cmpq %rdx, %r8 cmovbq %r8, %rbx cmpq %r9, %rbx cmovaeq %r9, %rbx testq %rbx, %rbx je 0x71a0d movq %rsi, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x286d0 addq %rbx, %r14 movq %r14, (%r15) movq $0x0, 0x8(%r15) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_copy_8bit: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rcx mov rbx, rdx mov r15, [rbp+arg_0] cmp r8, rdx cmovb rbx, r8 cmp rbx, r9 cmovnb rbx, r9 test rbx, rbx jz short loc_71A0D mov rdi, rsi mov rsi, r14 mov rdx, rbx call _memmove loc_71A0D: add r14, rbx mov [r15], r14 mov qword ptr [r15+8], 0 mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
unsigned long long my_copy_8bit( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6, _QWORD *a7) { unsigned long long v8; // rbx v8 = a3; if ( a5 < a3 ) v8 = a5; if ( v8 >= a6 ) v8 = a6; if ( v8 ) memmove(a2, a4, v8); *a7 = v8 + a4; a7[1] = 0LL; return v8; }
my_copy_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDX MOV R15,qword ptr [RBP + 0x10] CMP R8,RDX CMOVC RBX,R8 CMP RBX,R9 CMOVNC RBX,R9 TEST RBX,RBX JZ 0x00171a0d MOV RDI,RSI MOV RSI,R14 MOV RDX,RBX CALL 0x001286d0 LAB_00171a0d: ADD R14,RBX MOV qword ptr [R15],R14 MOV qword ptr [R15 + 0x8],0x0 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
size_t my_copy_8bit(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, ulong param_6,long *param_7) { if (param_5 < param_3) { param_3 = param_5; } if (param_6 <= param_3) { param_3 = param_6; } if (param_3 != 0) { memmove(param_2,param_4,param_3); } *param_7 = (long)param_4 + param_3; param_7[1] = 0; return param_3; }
2,086
set_prealloc_root
eloqsql/mysys/my_alloc.c
void set_prealloc_root(MEM_ROOT *root, char *ptr) { USED_MEM *next; for (next=root->used; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } for (next=root->free ; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } }
O3
c
set_prealloc_root: pushq %rbp movq %rsp, %rbp movq 0x8(%rdi), %rax testq %rax, %rax je 0x364b6 cmpq %rsi, %rax ja 0x364b1 movq 0x10(%rax), %rcx addq %rax, %rcx cmpq %rsi, %rcx ja 0x364d4 movq (%rax), %rax jmp 0x3649b movq (%rdi), %rax testq %rax, %rax je 0x364d8 cmpq %rsi, %rax ja 0x364cf movq 0x10(%rax), %rcx addq %rax, %rcx cmpq %rsi, %rcx ja 0x364d4 movq (%rax), %rax jmp 0x364b9 movq %rax, 0x10(%rdi) popq %rbp retq
set_prealloc_root: push rbp mov rbp, rsp mov rax, [rdi+8] loc_3649B: test rax, rax jz short loc_364B6 cmp rax, rsi ja short loc_364B1 mov rcx, [rax+10h] add rcx, rax cmp rcx, rsi ja short loc_364D4 loc_364B1: mov rax, [rax] jmp short loc_3649B loc_364B6: mov rax, [rdi] loc_364B9: test rax, rax jz short loc_364D8 cmp rax, rsi ja short loc_364CF mov rcx, [rax+10h] add rcx, rax cmp rcx, rsi ja short loc_364D4 loc_364CF: mov rax, [rax] jmp short loc_364B9 loc_364D4: mov [rdi+10h], rax loc_364D8: pop rbp retn
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2) { _QWORD *result; // rax for ( result = (_QWORD *)a1[1]; result; result = (_QWORD *)*result ) { if ( (unsigned long long)result <= a2 && (unsigned long long)result + result[2] > a2 ) { LABEL_11: a1[2] = result; return result; } } for ( result = (_QWORD *)*a1; result; result = (_QWORD *)*result ) { if ( (unsigned long long)result <= a2 && (unsigned long long)result + result[2] > a2 ) goto LABEL_11; } return result; }
set_prealloc_root: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x8] LAB_0013649b: TEST RAX,RAX JZ 0x001364b6 CMP RAX,RSI JA 0x001364b1 MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RAX CMP RCX,RSI JA 0x001364d4 LAB_001364b1: MOV RAX,qword ptr [RAX] JMP 0x0013649b LAB_001364b6: MOV RAX,qword ptr [RDI] LAB_001364b9: TEST RAX,RAX JZ 0x001364d8 CMP RAX,RSI JA 0x001364cf MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RAX CMP RCX,RSI JA 0x001364d4 LAB_001364cf: MOV RAX,qword ptr [RAX] JMP 0x001364b9 LAB_001364d4: MOV qword ptr [RDI + 0x10],RAX LAB_001364d8: POP RBP RET
void set_prealloc_root(int8 *param_1,int8 *param_2) { int8 *puVar1; for (puVar1 = (int8 *)param_1[1]; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { if ((puVar1 <= param_2) && (param_2 < (int8 *)(puVar1[2] + (long)puVar1))) goto LAB_001364d4; } puVar1 = (int8 *)*param_1; while( true ) { if (puVar1 == (int8 *)0x0) { return; } if ((puVar1 <= param_2) && (param_2 < (int8 *)(puVar1[2] + (long)puVar1))) break; puVar1 = (int8 *)*puVar1; } LAB_001364d4: param_1[2] = puVar1; return; }
2,087
coro::io_scheduler::event_to_poll_status(unsigned int)
AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp
auto io_scheduler::event_to_poll_status(uint32_t events) -> poll_status { if (events & EPOLLIN || events & EPOLLOUT) { return poll_status::event; } else if (events & EPOLLERR) { return poll_status::error; } else if (events & EPOLLRDHUP || events & EPOLLHUP) { return poll_status::closed; } throw std::runtime_error{"invalid epoll state"}; }
O3
cpp
coro::io_scheduler::event_to_poll_status(unsigned int): pushq %r14 pushq %rbx pushq %rax xorl %eax, %eax testb $0x5, %dil jne 0xca6a0 movl $0x2, %eax testb $0x8, %dil jne 0xca6a0 movl $0x3, %eax testl $0x2010, %edi # imm = 0x2010 je 0xca6a8 addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x17490 movq %rax, %rbx leaq 0x18fd3(%rip), %rsi # 0xe368f movq %rax, %rdi callq 0x17320 movq 0x678e5(%rip), %rsi # 0x131fb0 movq 0x6789e(%rip), %rdx # 0x131f70 movq %rbx, %rdi callq 0x17700 movq %rax, %r14 movq %rbx, %rdi callq 0x17aa0 movq %r14, %rdi callq 0x17740 nop
_ZN4coro12io_scheduler20event_to_poll_statusEj: push r14 push rbx push rax xor eax, eax test dil, 5 jnz short loc_CA6A0 mov eax, 2 test dil, 8 jnz short loc_CA6A0 mov eax, 3 test edi, 2010h jz short loc_CA6A8 loc_CA6A0: add rsp, 8 pop rbx pop r14 retn loc_CA6A8: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aInvalidEpollSt; "invalid epoll state" 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 coro::io_scheduler::event_to_poll_status(coro::io_scheduler *this) { long long result; // rax std::runtime_error *exception; // rbx result = 0LL; if ( ((unsigned __int8)this & 5) == 0 ) { result = 2LL; if ( ((unsigned __int8)this & 8) == 0 ) { result = 3LL; if ( ((unsigned __int16)this & 0x2010) == 0 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "invalid epoll state"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } } return result; }
event_to_poll_status: PUSH R14 PUSH RBX PUSH RAX XOR EAX,EAX TEST DIL,0x5 JNZ 0x001ca6a0 MOV EAX,0x2 TEST DIL,0x8 JNZ 0x001ca6a0 MOV EAX,0x3 TEST EDI,0x2010 JZ 0x001ca6a8 LAB_001ca6a0: ADD RSP,0x8 POP RBX POP R14 RET LAB_001ca6a8: MOV EDI,0x10 CALL 0x00117490 MOV RBX,RAX LAB_001ca6b5: LEA RSI,[0x1e368f] MOV RDI,RAX CALL 0x00117320 LAB_001ca6c4: MOV RSI,qword ptr [0x00231fb0] MOV RDX,qword ptr [0x00231f70] MOV RDI,RBX CALL 0x00117700
/* coro::io_scheduler::event_to_poll_status(unsigned int) */ int8 coro::io_scheduler::event_to_poll_status(uint param_1) { int8 uVar1; runtime_error *this; uVar1 = 0; if ((((param_1 & 5) == 0) && (uVar1 = 2, (param_1 & 8) == 0)) && (uVar1 = 3, (param_1 & 0x2010) == 0)) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ca6b5 to 001ca6c3 has its CatchHandler @ 001ca6da */ std::runtime_error::runtime_error(this,"invalid epoll state"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00231fb0,PTR__runtime_error_00231f70); } return uVar1; }
2,088
write_full_pages
eloqsql/storage/maria/ma_blockrec.c
static my_bool write_full_pages(MARIA_HA *info, LSN lsn, MARIA_BITMAP_BLOCK *block, uchar *data, ulong length) { pgcache_page_no_t page; MARIA_SHARE *share= info->s; uint block_size= share->block_size; uint data_size= FULL_PAGE_SIZE(share); uchar *buff= info->keyread_buff; uint page_count, sub_blocks; my_off_t position, max_position; DBUG_ENTER("write_full_pages"); DBUG_PRINT("enter", ("length: %lu page: %lu page_count: %lu", (ulong) length, (ulong) block->page, (ulong) block->page_count)); DBUG_ASSERT((block->page_count & TAIL_BIT) == 0); info->keyread_buff_used= 1; page= block->page; page_count= block->page_count; sub_blocks= block->sub_blocks; max_position= (my_off_t) (page + page_count) * block_size; /* Increase data file size, if extended */ for (; length; data+= data_size) { uint copy_length; if (!page_count--) { if (!--sub_blocks) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); } block++; page= block->page; page_count= block->page_count - 1; DBUG_PRINT("info", ("page: %lu page_count: %lu", (ulong) block->page, (ulong) block->page_count)); position= (page + page_count + 1) * block_size; set_if_bigger(max_position, position); } lsn_store(buff, lsn); buff[PAGE_TYPE_OFFSET]= (uchar) BLOB_PAGE; bzero(buff + LSN_SIZE + PAGE_TYPE_SIZE, FULL_PAGE_HEADER_SIZE(share) - (LSN_SIZE + PAGE_TYPE_SIZE)); copy_length= MY_MIN(data_size, length); memcpy(buff + FULL_PAGE_HEADER_SIZE(share), data, copy_length); length-= copy_length; /* Zero out old information from the block. This removes possible sensitive information from the block and also makes the file easier to compress and easier to compare after recovery. */ if (copy_length != data_size) bzero(buff + block_size - PAGE_SUFFIX_SIZE - (data_size - copy_length), (data_size - copy_length) + PAGE_SUFFIX_SIZE); if (pagecache_write(share->pagecache, &info->dfile, page, 0, buff, share->page_type, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, info->trn->rec_lsn)) DBUG_RETURN(1); page++; DBUG_ASSERT(block->used & BLOCKUSED_USED); } if (share->state.state.data_file_length < max_position) _ma_set_share_data_file_length(share, max_position); DBUG_RETURN(0); }
O3
c
write_full_pages: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %r8, %r14 movq %rcx, %r15 movq (%rdi), %rax movl 0x7bc(%rax), %r8d movq %rax, -0x40(%rbp) movl 0xc18(%rax), %eax movl %r8d, %ecx subl %eax, %ecx movq 0x380(%rdi), %r12 movb $0x1, 0x685(%rdi) movq (%rdx), %r13 movl 0x8(%rdx), %r9d leaq (%r9,%r13), %rax imulq %r8, %rax movq %rax, -0x38(%rbp) testq %r14, %r14 je 0x54466 addl $-0xc, %ecx movl %ecx, -0x44(%rbp) movl 0x10(%rdx), %eax movl %eax, -0x2c(%rbp) movq %rsi, %rax shrq $0x20, %rax movq %rax, -0xa8(%rbp) movq %rsi, %rax shrq $0x28, %rax movq %rax, -0xa0(%rbp) movq %rsi, %rax shrq $0x30, %rax movq %rax, -0x98(%rbp) leaq 0x8(%r12), %rax movq %rax, -0x90(%rbp) movl %ecx, %ebx leaq -0x4(%r12,%r8), %rax movq %rax, -0x68(%rbp) leaq 0x470(%rdi), %rax movq %rax, -0x88(%rbp) movq %rdi, -0x60(%rbp) movq %r8, -0x78(%rbp) movq %rsi, -0x80(%rbp) movq %rbx, -0x70(%rbp) subl $0x1, %r9d movq %r15, -0xb0(%rbp) jae 0x54357 movl -0x2c(%rbp), %eax decl %eax je 0x5447d movl %eax, -0x2c(%rbp) movq 0x18(%rdx), %r13 movl 0x20(%rdx), %ecx leaq 0x18(%rdx), %rax decl %ecx movq %rcx, -0x50(%rbp) addq %r13, %rcx incq %rcx imulq %r8, %rcx movq -0x38(%rbp), %rdx cmpq %rcx, %rdx cmovbeq %rcx, %rdx movq %rdx, -0x38(%rbp) movq %rax, -0x58(%rbp) jmp 0x5435f movq %r9, -0x50(%rbp) movq %rdx, -0x58(%rbp) movq -0xa8(%rbp), %rax movb %al, (%r12) movq -0xa0(%rbp), %rax movb %al, 0x1(%r12) movq -0x98(%rbp), %rax movb %al, 0x2(%r12) movl %esi, 0x3(%r12) movb $0x3, 0x7(%r12) movq -0x40(%rbp), %r15 movl 0xc18(%r15), %edx movq -0x90(%rbp), %rdi xorl %esi, %esi callq 0x2b2f0 cmpq %rbx, %r14 cmovbq %r14, %rbx movl 0xc18(%r15), %edi addl $0x8, %edi addq %r12, %rdi movq -0xb0(%rbp), %r15 movq %r15, %rsi movq %rbx, %rdx callq 0x2b0b0 movl -0x44(%rbp), %eax movl %eax, %edx subl %ebx, %edx je 0x543e6 movq -0x68(%rbp), %rdi subq %rdx, %rdi addl $0x4, %edx xorl %esi, %esi callq 0x2b2f0 movq -0x40(%rbp), %rax movq 0x600(%rax), %rdi movl 0x7d4(%rax), %r9d movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl 0x80(%rdi), %r10d subq $0x8, %rsp movq -0x88(%rbp), %rsi movq %r13, %rdx xorl %ecx, %ecx movq %r12, %r8 pushq %r10 xorl %r10d, %r10d pushq %r10 pushq 0x90(%rax) pushq $0x0 pushq %r10 pushq $0x1 pushq %r10 callq 0x853a6 addq $0x40, %rsp testb %al, %al jne 0x54487 subq %rbx, %r14 incq %r13 movq -0x70(%rbp), %rbx addq %rbx, %r15 testq %r14, %r14 movq -0x60(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x78(%rbp), %r8 movq -0x58(%rbp), %rdx movq -0x50(%rbp), %r9 jne 0x5430c movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi cmpq %rsi, 0x40(%rdi) jae 0x54479 callq 0x450bc xorl %eax, %eax jmp 0x54489 movl $0x7f, %esi callq 0x3dca8 movb $0x1, %al addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
write_full_pages: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, r8 mov r15, rcx mov rax, [rdi] mov r8d, [rax+7BCh] mov [rbp+var_40], rax mov eax, [rax+0C18h] mov ecx, r8d sub ecx, eax mov r12, [rdi+380h] mov byte ptr [rdi+685h], 1 mov r13, [rdx] mov r9d, [rdx+8] lea rax, [r9+r13] imul rax, r8 mov [rbp+var_38], rax test r14, r14 jz loc_54466 add ecx, 0FFFFFFF4h mov [rbp+var_44], ecx mov eax, [rdx+10h] mov [rbp+var_2C], eax mov rax, rsi shr rax, 20h mov [rbp+var_A8], rax mov rax, rsi shr rax, 28h mov [rbp+var_A0], rax mov rax, rsi shr rax, 30h mov [rbp+var_98], rax lea rax, [r12+8] mov [rbp+var_90], rax mov ebx, ecx lea rax, [r12+r8-4] mov [rbp+var_68], rax lea rax, [rdi+470h] mov [rbp+var_88], rax mov [rbp+var_60], rdi mov [rbp+var_78], r8 mov [rbp+var_80], rsi mov [rbp+var_70], rbx loc_5430C: sub r9d, 1 mov [rbp+var_B0], r15 jnb short loc_54357 mov eax, [rbp+var_2C] dec eax jz loc_5447D mov [rbp+var_2C], eax mov r13, [rdx+18h] mov ecx, [rdx+20h] lea rax, [rdx+18h] dec ecx mov [rbp+var_50], rcx add rcx, r13 inc rcx imul rcx, r8 mov rdx, [rbp+var_38] cmp rdx, rcx cmovbe rdx, rcx mov [rbp+var_38], rdx mov [rbp+var_58], rax jmp short loc_5435F loc_54357: mov [rbp+var_50], r9 mov [rbp+var_58], rdx loc_5435F: mov rax, [rbp+var_A8] mov [r12], al mov rax, [rbp+var_A0] mov [r12+1], al mov rax, [rbp+var_98] mov [r12+2], al mov [r12+3], esi mov byte ptr [r12+7], 3 mov r15, [rbp+var_40] mov edx, [r15+0C18h] mov rdi, [rbp+var_90] xor esi, esi call _memset cmp r14, rbx cmovb rbx, r14 mov edi, [r15+0C18h] add edi, 8 add rdi, r12 mov r15, [rbp+var_B0] mov rsi, r15 mov rdx, rbx call _memcpy mov eax, [rbp+var_44] mov edx, eax sub edx, ebx jz short loc_543E6 mov rdi, [rbp+var_68] sub rdi, rdx add edx, 4 xor esi, esi call _memset loc_543E6: mov rax, [rbp+var_40] mov rdi, [rax+600h] mov r9d, [rax+7D4h] mov rax, [rbp+var_60] mov rax, [rax+8] mov r10d, [rdi+80h] sub rsp, 8 mov rsi, [rbp+var_88] mov rdx, r13 xor ecx, ecx mov r8, r12 push r10 xor r10d, r10d push r10 push qword ptr [rax+90h] push 0 push r10 push 1 push r10 call pagecache_write_part add rsp, 40h test al, al jnz short loc_54487 sub r14, rbx inc r13 mov rbx, [rbp+var_70] add r15, rbx test r14, r14 mov rdi, [rbp+var_60] mov rsi, [rbp+var_80] mov r8, [rbp+var_78] mov rdx, [rbp+var_58] mov r9, [rbp+var_50] jnz loc_5430C loc_54466: mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] cmp [rdi+40h], rsi jnb short loc_54479 call _ma_set_share_data_file_length loc_54479: xor eax, eax jmp short loc_54489 loc_5447D: mov esi, 7Fh call _ma_set_fatal_error loc_54487: mov al, 1 loc_54489: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char write_full_pages(_DWORD *a1, unsigned long long a2, long long a3, long long a4, unsigned long long a5) { long long v7; // r8 int v8; // ecx long long v9; // r12 long long v10; // r13 long long v11; // r9 long long v12; // rcx unsigned long long v13; // rbx bool v14; // cf int v15; // r9d long long v16; // rax long long v17; // rdx unsigned long long v19; // [rsp+8h] [rbp-A8h] unsigned long long v20; // [rsp+10h] [rbp-A0h] unsigned long long v21; // [rsp+18h] [rbp-98h] int v22; // [rsp+28h] [rbp-88h] int v23; // [rsp+30h] [rbp-80h] long long v24; // [rsp+38h] [rbp-78h] unsigned long long v25; // [rsp+40h] [rbp-70h] long long v26; // [rsp+48h] [rbp-68h] _DWORD *v27; // [rsp+50h] [rbp-60h] long long v28; // [rsp+58h] [rbp-58h] long long v29; // [rsp+60h] [rbp-50h] int v30; // [rsp+6Ch] [rbp-44h] long long v31; // [rsp+70h] [rbp-40h] unsigned long long v32; // [rsp+78h] [rbp-38h] int v33; // [rsp+84h] [rbp-2Ch] v7 = *(unsigned int *)(*(_QWORD *)a1 + 1980LL); v31 = *(_QWORD *)a1; v8 = v7 - *(_DWORD *)(*(_QWORD *)a1 + 3096LL); v9 = *((_QWORD *)a1 + 112); *((_BYTE *)a1 + 1669) = 1; v10 = *(_QWORD *)a3; v11 = *(unsigned int *)(a3 + 8); v32 = v7 * (v11 + *(_QWORD *)a3); if ( !a5 ) { LABEL_15: if ( *(_QWORD *)(v31 + 64) < v32 ) ma_set_share_data_file_length(v31, v32); return 0; } v12 = (unsigned int)(v8 - 12); v30 = v12; v33 = *(_DWORD *)(a3 + 16); v19 = HIDWORD(a2); v20 = a2 >> 40; v21 = HIWORD(a2); v13 = (unsigned int)v12; v26 = v9 + v7 - 4; v22 = (_DWORD)a1 + 1136; v27 = a1; v24 = v7; v23 = a2; v25 = (unsigned int)v12; while ( 1 ) { v14 = (_DWORD)v11 == 0; v15 = v11 - 1; if ( !v14 ) { LODWORD(v29) = v15; v28 = a3; goto LABEL_9; } if ( v33 == 1 ) break; --v33; v10 = *(_QWORD *)(a3 + 24); v16 = a3 + 24; v29 = (unsigned int)(*(_DWORD *)(a3 + 32) - 1); v17 = v32; if ( v32 <= v7 * (v10 + v29 + 1) ) v17 = v7 * (v10 + v29 + 1); v32 = v17; v28 = v16; LABEL_9: *(_BYTE *)v9 = v19; *(_BYTE *)(v9 + 1) = v20; *(_BYTE *)(v9 + 2) = v21; *(_DWORD *)(v9 + 3) = a2; *(_BYTE *)(v9 + 7) = 3; memset(v9 + 8, 0LL, *(unsigned int *)(v31 + 3096)); if ( a5 < v13 ) v13 = a5; memcpy(v9 + (unsigned int)(*(_DWORD *)(v31 + 3096) + 8), a4, v13); if ( v30 != (_DWORD)v13 ) memset(v26 - (unsigned int)(v30 - v13), 0LL, (unsigned int)(v30 - v13 + 4)); if ( (unsigned __int8)pagecache_write_part( *(_QWORD *)(v31 + 1536), v22, v10, 0, v9, *(_DWORD *)(v31 + 2004), 0, 1, 0, 0LL, *(_QWORD *)(*((_QWORD *)v27 + 1) + 144LL), 0, *(_DWORD *)(*(_QWORD *)(v31 + 1536) + 128LL)) ) return 1; a5 -= v13; LODWORD(v10) = v10 + 1; v13 = v25; a4 += v25; a1 = v27; LODWORD(a2) = v23; v7 = v24; a3 = v28; LODWORD(v11) = v29; if ( !a5 ) goto LABEL_15; } ma_set_fatal_error(a1, 127, a3, v12, v7, v15); return 1; }
write_full_pages: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,R8 MOV R15,RCX MOV RAX,qword ptr [RDI] MOV R8D,dword ptr [RAX + 0x7bc] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RAX + 0xc18] MOV ECX,R8D SUB ECX,EAX MOV R12,qword ptr [RDI + 0x380] MOV byte ptr [RDI + 0x685],0x1 MOV R13,qword ptr [RDX] MOV R9D,dword ptr [RDX + 0x8] LEA RAX,[R9 + R13*0x1] IMUL RAX,R8 MOV qword ptr [RBP + -0x38],RAX TEST R14,R14 JZ 0x00154466 ADD ECX,-0xc MOV dword ptr [RBP + -0x44],ECX MOV EAX,dword ptr [RDX + 0x10] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,RSI SHR RAX,0x20 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,RSI SHR RAX,0x28 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,RSI SHR RAX,0x30 MOV qword ptr [RBP + -0x98],RAX LEA RAX,[R12 + 0x8] MOV qword ptr [RBP + -0x90],RAX MOV EBX,ECX LEA RAX,[R12 + R8*0x1 + -0x4] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[RDI + 0x470] MOV qword ptr [RBP + -0x88],RAX MOV qword ptr [RBP + -0x60],RDI MOV qword ptr [RBP + -0x78],R8 MOV qword ptr [RBP + -0x80],RSI MOV qword ptr [RBP + -0x70],RBX LAB_0015430c: SUB R9D,0x1 MOV qword ptr [RBP + -0xb0],R15 JNC 0x00154357 MOV EAX,dword ptr [RBP + -0x2c] DEC EAX JZ 0x0015447d MOV dword ptr [RBP + -0x2c],EAX MOV R13,qword ptr [RDX + 0x18] MOV ECX,dword ptr [RDX + 0x20] LEA RAX,[RDX + 0x18] DEC ECX MOV qword ptr [RBP + -0x50],RCX ADD RCX,R13 INC RCX IMUL RCX,R8 MOV RDX,qword ptr [RBP + -0x38] CMP RDX,RCX CMOVBE RDX,RCX MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x58],RAX JMP 0x0015435f LAB_00154357: MOV qword ptr [RBP + -0x50],R9 MOV qword ptr [RBP + -0x58],RDX LAB_0015435f: MOV RAX,qword ptr [RBP + -0xa8] MOV byte ptr [R12],AL MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [R12 + 0x1],AL MOV RAX,qword ptr [RBP + -0x98] MOV byte ptr [R12 + 0x2],AL MOV dword ptr [R12 + 0x3],ESI MOV byte ptr [R12 + 0x7],0x3 MOV R15,qword ptr [RBP + -0x40] MOV EDX,dword ptr [R15 + 0xc18] MOV RDI,qword ptr [RBP + -0x90] XOR ESI,ESI CALL 0x0012b2f0 CMP R14,RBX CMOVC RBX,R14 MOV EDI,dword ptr [R15 + 0xc18] ADD EDI,0x8 ADD RDI,R12 MOV R15,qword ptr [RBP + -0xb0] MOV RSI,R15 MOV RDX,RBX CALL 0x0012b0b0 MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX SUB EDX,EBX JZ 0x001543e6 MOV RDI,qword ptr [RBP + -0x68] SUB RDI,RDX ADD EDX,0x4 XOR ESI,ESI CALL 0x0012b2f0 LAB_001543e6: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x600] MOV R9D,dword ptr [RAX + 0x7d4] MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV R10D,dword ptr [RDI + 0x80] SUB RSP,0x8 MOV RSI,qword ptr [RBP + -0x88] MOV RDX,R13 XOR ECX,ECX MOV R8,R12 PUSH R10 XOR R10D,R10D PUSH R10 PUSH qword ptr [RAX + 0x90] PUSH 0x0 PUSH R10 PUSH 0x1 PUSH R10 CALL 0x001853a6 ADD RSP,0x40 TEST AL,AL JNZ 0x00154487 SUB R14,RBX INC R13 MOV RBX,qword ptr [RBP + -0x70] ADD R15,RBX TEST R14,R14 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x80] MOV R8,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] JNZ 0x0015430c LAB_00154466: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] CMP qword ptr [RDI + 0x40],RSI JNC 0x00154479 CALL 0x001450bc LAB_00154479: XOR EAX,EAX JMP 0x00154489 LAB_0015447d: MOV ESI,0x7f CALL 0x0013dca8 LAB_00154487: MOV AL,0x1 LAB_00154489: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 write_full_pages(long *param_1,int8 param_2,long *param_3,void *param_4,ulong param_5) { long lVar1; int1 *puVar2; char cVar3; uint uVar4; ulong uVar5; uint uVar6; ulong uVar7; ulong uVar8; int iVar9; long lVar10; long *local_60; ulong local_58; ulong local_40; int local_34; lVar1 = *param_1; uVar4 = *(uint *)(lVar1 + 0x7bc); uVar8 = (ulong)uVar4; iVar9 = *(int *)(lVar1 + 0xc18); puVar2 = (int1 *)param_1[0x70]; *(int1 *)((long)param_1 + 0x685) = 1; lVar10 = *param_3; local_58 = (ulong)*(uint *)(param_3 + 1); local_40 = (local_58 + lVar10) * uVar8; if (param_5 != 0) { uVar4 = (uVar4 - iVar9) - 0xc; local_34 = (int)param_3[2]; uVar7 = (ulong)uVar4; do { iVar9 = (int)local_58; local_58 = (ulong)(iVar9 - 1); local_60 = param_3; if (iVar9 == 0) { local_34 = local_34 + -1; if (local_34 == 0) { _ma_set_fatal_error(param_1,0x7f); return 1; } lVar10 = param_3[3]; local_60 = param_3 + 3; local_58 = (ulong)((int)param_3[4] - 1); uVar5 = (local_58 + lVar10 + 1) * uVar8; if (local_40 <= uVar5) { local_40 = uVar5; } } *puVar2 = (char)((ulong)param_2 >> 0x20); puVar2[1] = (char)((ulong)param_2 >> 0x28); puVar2[2] = (char)((ulong)param_2 >> 0x30); *(int *)(puVar2 + 3) = (int)param_2; puVar2[7] = 3; memset(puVar2 + 8,0,(ulong)*(uint *)(lVar1 + 0xc18)); uVar5 = uVar7; if (param_5 < uVar7) { uVar5 = param_5; } memcpy(puVar2 + (*(int *)(lVar1 + 0xc18) + 8),param_4,uVar5); uVar6 = uVar4 - (int)uVar5; if (uVar6 != 0) { memset(puVar2 + ((uVar8 - 4) - (ulong)uVar6),0,(ulong)(uVar6 + 4)); } cVar3 = pagecache_write_part (*(long *)(lVar1 + 0x600),param_1 + 0x8e,lVar10,0,puVar2, *(int4 *)(lVar1 + 0x7d4),0,1,0,0,*(int8 *)(param_1[1] + 0x90),0 ,*(int4 *)(*(long *)(lVar1 + 0x600) + 0x80)); if (cVar3 != '\0') { return 1; } param_5 = param_5 - uVar5; lVar10 = lVar10 + 1; param_4 = (void *)((long)param_4 + uVar7); param_3 = local_60; } while (param_5 != 0); } if (*(ulong *)(lVar1 + 0x40) < local_40) { _ma_set_share_data_file_length(); } return 0; }
2,089
crc32_pclmul
eloqsql/mysys/crc32/crc32_x86.c
unsigned int crc32_pclmul(unsigned int crc32, const void *buf, size_t len) { return ~crcr32_calc_pclmulqdq(buf, (uint32_t)len, ~crc32, &ether_crc32_clmul); }
O3
c
crc32_pclmul: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdx, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) testl %ebx, %ebx je 0x33772 notl %edi movd %edi, %xmm2 cmpl $0x1f, %ebx jbe 0x3378c movdqu (%rsi), %xmm1 pxor %xmm2, %xmm1 pushq $0x10 popq %rax movl $0xccaa009e, %ecx # imm = 0xCCAA009E movq %rcx, %xmm0 movdqa 0xda142(%rip), %xmm2 # 0x10d7c0 movl %eax, %ecx movdqu (%rsi,%rcx), %xmm3 movdqa %xmm1, %xmm4 pclmulqdq $0x1, %xmm0, %xmm4 pxor %xmm3, %xmm4 pclmulqdq $0x10, %xmm2, %xmm1 pxor %xmm4, %xmm1 leal 0x10(%rax), %ecx addl $0x20, %eax cmpl %ebx, %eax movl %ecx, %eax jbe 0x3367e cmpl %ebx, %ecx jae 0x33705 leal -0x10(%rbx), %eax movdqu (%rsi,%rax), %xmm2 andl $0xf, %ebx leaq 0xdab81(%rip), %rax # 0x10e240 movdqu (%rbx,%rax), %xmm0 movdqa %xmm1, %xmm3 pshufb %xmm0, %xmm3 pxor 0xda0fb(%rip), %xmm0 # 0x10d7d0 pshufb %xmm0, %xmm1 pblendvb %xmm0, %xmm2, %xmm1 movl $0xccaa009e, %eax # imm = 0xCCAA009E movq %rax, %xmm0 pclmulqdq $0x10, %xmm3, %xmm0 pxor %xmm1, %xmm0 pclmulqdq $0x10, 0xda0c3(%rip), %xmm3 # 0x10d7c0 pxor %xmm0, %xmm3 movdqa %xmm3, %xmm1 movl $0xccaa009e, %eax # imm = 0xCCAA009E movq %rax, %xmm0 pclmulqdq $0x0, %xmm1, %xmm0 psrldq $0x8, %xmm1 # xmm1 = xmm1[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero pxor %xmm0, %xmm1 movdqa %xmm1, %xmm2 psllq $0x20, %xmm2 pclmulqdq $0x10, 0xda0af(%rip), %xmm2 # 0x10d7e0 pxor %xmm1, %xmm2 pxor %xmm0, %xmm0 pblendw $0xfc, %xmm2, %xmm0 # xmm0 = xmm0[0,1],xmm2[2,3,4,5,6,7] movabsq $0x1f7011640, %rax # imm = 0x1F7011640 movq %rax, %xmm1 pclmulqdq $0x0, %xmm0, %xmm1 pxor %xmm0, %xmm1 movq %xmm1, %xmm0 # xmm0 = xmm1[0],zero pclmulqdq $0x10, 0xda08a(%rip), %xmm0 # 0x10d7f0 pxor %xmm2, %xmm0 pextrd $0x2, %xmm0, %edi notl %edi movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x337a3 movl %edi, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq cmpl $0x10, %ebx je 0x337a8 jb 0x337b5 movdqu (%rsi), %xmm1 pxor %xmm2, %xmm1 pushq $0x10 popq %rcx jmp 0x336a9 callq 0x2b280 movdqu (%rsi), %xmm1 pxor %xmm2, %xmm1 jmp 0x33705 xorps %xmm0, %xmm0 leaq -0x30(%rbp), %r14 movaps %xmm0, (%r14) movl %ebx, %edx andl $0xf, %edx pushq $0x10 popq %rcx movq %r14, %rdi movdqa %xmm2, -0x40(%rbp) callq 0x2b4b0 movdqa -0x40(%rbp), %xmm1 pxor (%r14), %xmm1 cmpl $0x4, %ebx jae 0x33809 pushq $0x8 popq %rax subl %ebx, %eax andl $0xf, %eax leaq 0xdc53d(%rip), %rcx # 0x10fd30 subq %rax, %rcx movdqu 0x10(%rcx), %xmm0 movdqa %xmm1, %xmm2 pshufb %xmm0, %xmm2 jmp 0x33735 pushq $0x10 popq %rax subl %ebx, %eax andl $0x1f, %eax leaq 0xdc518(%rip), %rcx # 0x10fd30 subq %rax, %rcx movdqu 0x10(%rcx), %xmm0 pshufb %xmm0, %xmm1 jmp 0x33705
crc32_pclmul: push rbp mov rbp, rsp push r14 push rbx sub rsp, 30h mov rbx, rdx mov rax, fs:28h mov [rbp+var_18], rax test ebx, ebx jz loc_33772 not edi movd xmm2, edi cmp ebx, 1Fh jbe loc_3378C movdqu xmm1, xmmword ptr [rsi] pxor xmm1, xmm2 push 10h pop rax mov ecx, 0CCAA009Eh movq xmm0, rcx movdqa xmm2, cs:xmmword_10D7C0 loc_3367E: mov ecx, eax movdqu xmm3, xmmword ptr [rsi+rcx] movdqa xmm4, xmm1 pclmulqdq xmm4, xmm0, 1 pxor xmm4, xmm3 pclmulqdq xmm1, xmm2, 10h pxor xmm1, xmm4 lea ecx, [rax+10h] add eax, 20h ; ' ' cmp eax, ebx mov eax, ecx jbe short loc_3367E loc_336A9: cmp ecx, ebx jnb short loc_33705 lea eax, [rbx-10h] movdqu xmm2, xmmword ptr [rsi+rax] and ebx, 0Fh lea rax, crcr32_calc_pclmulqdq_shf_table movdqu xmm0, xmmword ptr [rbx+rax] movdqa xmm3, xmm1 pshufb xmm3, xmm0 pxor xmm0, cs:xmmword_10D7D0 pshufb xmm1, xmm0 pblendvb xmm1, xmm2 mov eax, 0CCAA009Eh movq xmm0, rax pclmulqdq xmm0, xmm3, 10h pxor xmm0, xmm1 pclmulqdq xmm3, cs:xmmword_10D7C0, 10h pxor xmm3, xmm0 movdqa xmm1, xmm3 loc_33705: mov eax, 0CCAA009Eh movq xmm0, rax pclmulqdq xmm0, xmm1, 0 psrldq xmm1, 8 pxor xmm1, xmm0 movdqa xmm2, xmm1 psllq xmm2, 20h ; ' ' pclmulqdq xmm2, cs:xmmword_10D7E0, 10h pxor xmm2, xmm1 loc_33735: pxor xmm0, xmm0 pblendw xmm0, xmm2, 0FCh mov rax, 1F7011640h movq xmm1, rax pclmulqdq xmm1, xmm0, 0 pxor xmm1, xmm0 movq xmm0, xmm1 pclmulqdq xmm0, cs:xmmword_10D7F0, 10h pxor xmm0, xmm2 pextrd edi, xmm0, 2 not edi loc_33772: mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_337A3 mov eax, edi add rsp, 30h pop rbx pop r14 pop rbp retn loc_3378C: cmp ebx, 10h jz short loc_337A8 jb short loc_337B5 movdqu xmm1, xmmword ptr [rsi] pxor xmm1, xmm2 push 10h pop rcx jmp loc_336A9 loc_337A3: call ___stack_chk_fail loc_337A8: movdqu xmm1, xmmword ptr [rsi] pxor xmm1, xmm2 jmp loc_33705 loc_337B5: xorps xmm0, xmm0 lea r14, [rbp+var_30] movaps xmmword ptr [r14], xmm0 mov edx, ebx and edx, 0Fh push 10h pop rcx mov rdi, r14 movdqa [rbp+var_40], xmm2 call ___memcpy_chk movdqa xmm1, [rbp+var_40] pxor xmm1, xmmword ptr [r14] cmp ebx, 4 jnb short loc_33809 push 8 pop rax sub eax, ebx and eax, 0Fh lea rcx, xmm_shift_left_crc_xmm_shift_tab sub rcx, rax movdqu xmm0, xmmword ptr [rcx+10h] movdqa xmm2, xmm1 pshufb xmm2, xmm0 jmp loc_33735 loc_33809: push 10h pop rax sub eax, ebx and eax, 1Fh lea rcx, xmm_shift_left_crc_xmm_shift_tab sub rcx, rax movdqu xmm0, xmmword ptr [rcx+10h] pshufb xmm1, xmm0 jmp loc_33705
long long crc32_pclmul(unsigned int a1, const __m128i *a2, unsigned int a3) { __m128i v4; // xmm2 unsigned int v6; // eax unsigned int v12; // ecx bool v13; // cc __m128i v14; // xmm0 __m128i v16; // xmm0 __m128i v17; // xmm1 __m128i v23; // xmm1 __m128i v26; // xmm2 __m128i v33; // xmm1 __m128i v34; // [rsp+0h] [rbp-40h] BYREF __m128i v35; // [rsp+10h] [rbp-30h] BYREF unsigned long long v36; // [rsp+28h] [rbp-18h] v36 = __readfsqword(0x28u); if ( a3 ) { v4 = _mm_cvtsi32_si128(~a1); if ( a3 > 0x1F ) { _XMM1 = _mm_xor_si128(_mm_loadu_si128(a2), v4); v6 = 1; _XMM0 = 0xCCAA009EuLL; _XMM2 = _mm_load_si128((const __m128i *)&xmmword_10D7C0); do { _XMM4 = _XMM1; __asm { pclmulqdq xmm4, xmm0, 1 pclmulqdq xmm1, xmm2, 10h } _XMM1 = _mm_xor_si128(_XMM1, _mm_xor_si128(_XMM4, _mm_loadu_si128(&a2[v6]))); v12 = v6 * 16 + 16; v13 = v6 * 16 + 32 <= a3; ++v6; } while ( v13 ); LABEL_5: if ( v12 < a3 ) { v14 = _mm_loadu_si128((const __m128i *)((char *)&crcr32_calc_pclmulqdq_shf_table + (a3 & 0xF))); _XMM3 = _mm_shuffle_epi8(_XMM1, v14); v16 = _mm_xor_si128(v14, (__m128i)xmmword_10D7D0); v17 = _mm_blendv_epi8( _mm_shuffle_epi8(_XMM1, v16), _mm_loadu_si128((const __m128i *)((char *)a2 + a3 - 16)), v16); _XMM0 = 0xCCAA009EuLL; __asm { pclmulqdq xmm0, xmm3, 10h pclmulqdq xmm3, cs:xmmword_10D7C0, 10h } _XMM1 = _mm_xor_si128(_XMM3, _mm_xor_si128(_XMM0, v17)); } goto LABEL_7; } if ( a3 == 16 ) { _XMM1 = _mm_xor_si128(_mm_loadu_si128(a2), v4); } else { if ( a3 >= 0x10 ) { _XMM1 = _mm_xor_si128(_mm_loadu_si128(a2), v4); v12 = 16; goto LABEL_5; } v35 = 0LL; v34 = v4; __memcpy_chk(&v35, a2, a3 & 0xF, 16LL); v33 = _mm_xor_si128(_mm_load_si128(&v34), v35); if ( a3 < 4 ) { v26 = _mm_shuffle_epi8( v33, _mm_loadu_si128((const __m128i *)((char *)&xmm_shift_left_crc_xmm_shift_tab - ((8 - (_BYTE)a3) & 0xF) + 16))); goto LABEL_8; } _XMM1 = _mm_shuffle_epi8( v33, _mm_loadu_si128((const __m128i *)((char *)&xmm_shift_left_crc_xmm_shift_tab - ((16 - (_BYTE)a3) & 0x1F) + 16))); } LABEL_7: _XMM0 = 0xCCAA009EuLL; __asm { pclmulqdq xmm0, xmm1, 0 } v23 = _mm_xor_si128(_mm_srli_si128(_XMM1, 8), _XMM0); _XMM2 = _mm_slli_epi64(v23, 0x20u); __asm { pclmulqdq xmm2, cs:xmmword_10D7E0, 10h } v26 = _mm_xor_si128(_XMM2, v23); LABEL_8: _XMM0 = _mm_blend_epi16((__m128i)0LL, v26, 252); _XMM1 = 0x1F7011640uLL; __asm { pclmulqdq xmm1, xmm0, 0 } _XMM0 = _mm_move_epi64(_mm_xor_si128(_XMM1, _XMM0)); __asm { pclmulqdq xmm0, cs:xmmword_10D7F0, 10h } return (unsigned int)~_mm_extract_epi32(_mm_xor_si128(_XMM0, v26), 2); } return a1; }
crc32_pclmul: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX TEST EBX,EBX JZ 0x00133772 NOT EDI MOVD XMM2,EDI CMP EBX,0x1f JBE 0x0013378c MOVDQU XMM1,xmmword ptr [RSI] PXOR XMM1,XMM2 PUSH 0x10 POP RAX MOV ECX,0xccaa009e MOVQ XMM0,RCX MOVDQA XMM2,xmmword ptr [0x0020d7c0] LAB_0013367e: MOV ECX,EAX MOVDQU XMM3,xmmword ptr [RSI + RCX*0x1] MOVDQA XMM4,XMM1 PCLMULHQLQDQ XMM4,XMM0 PXOR XMM4,XMM3 PCLMULLQHQDQ XMM1,XMM2 PXOR XMM1,XMM4 LEA ECX,[RAX + 0x10] ADD EAX,0x20 CMP EAX,EBX MOV EAX,ECX JBE 0x0013367e LAB_001336a9: CMP ECX,EBX JNC 0x00133705 LEA EAX,[RBX + -0x10] MOVDQU XMM2,xmmword ptr [RSI + RAX*0x1] AND EBX,0xf LEA RAX,[0x20e240] MOVDQU XMM0,xmmword ptr [RBX + RAX*0x1] MOVDQA XMM3,XMM1 PSHUFB XMM3,XMM0 PXOR XMM0,xmmword ptr [0x0020d7d0] PSHUFB XMM1,XMM0 PBLENDVB XMM1,XMM2 MOV EAX,0xccaa009e MOVQ XMM0,RAX PCLMULLQHQDQ XMM0,XMM3 PXOR XMM0,XMM1 PCLMULQDQ XMM3,xmmword ptr [0x0020d7c0],0x10 PXOR XMM3,XMM0 MOVDQA XMM1,XMM3 LAB_00133705: MOV EAX,0xccaa009e MOVQ XMM0,RAX PCLMULLQLQDQ XMM0,XMM1 PSRLDQ XMM1,0x8 PXOR XMM1,XMM0 MOVDQA XMM2,XMM1 PSLLQ XMM2,0x20 PCLMULQDQ XMM2,xmmword ptr [0x0020d7e0],0x10 PXOR XMM2,XMM1 LAB_00133735: PXOR XMM0,XMM0 PBLENDW XMM0,XMM2,0xfc MOV RAX,0x1f7011640 MOVQ XMM1,RAX PCLMULLQLQDQ XMM1,XMM0 PXOR XMM1,XMM0 MOVQ XMM0,XMM1 PCLMULQDQ XMM0,xmmword ptr [0x0020d7f0],0x10 PXOR XMM0,XMM2 PEXTRD EDI,XMM0,0x2 NOT EDI LAB_00133772: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001337a3 MOV EAX,EDI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0013378c: CMP EBX,0x10 JZ 0x001337a8 JC 0x001337b5 MOVDQU XMM1,xmmword ptr [RSI] PXOR XMM1,XMM2 PUSH 0x10 POP RCX JMP 0x001336a9 LAB_001337a3: CALL 0x0012b280 LAB_001337a8: MOVDQU XMM1,xmmword ptr [RSI] PXOR XMM1,XMM2 JMP 0x00133705 LAB_001337b5: XORPS XMM0,XMM0 LEA R14,[RBP + -0x30] MOVAPS xmmword ptr [R14],XMM0 MOV EDX,EBX AND EDX,0xf PUSH 0x10 POP RCX MOV RDI,R14 MOVDQA xmmword ptr [RBP + -0x40],XMM2 CALL 0x0012b4b0 MOVDQA XMM1,xmmword ptr [RBP + -0x40] PXOR XMM1,xmmword ptr [R14] CMP EBX,0x4 JNC 0x00133809 PUSH 0x8 POP RAX SUB EAX,EBX AND EAX,0xf LEA RCX,[0x20fd30] SUB RCX,RAX MOVDQU XMM0,xmmword ptr [RCX + 0x10] MOVDQA XMM2,XMM1 PSHUFB XMM2,XMM0 JMP 0x00133735 LAB_00133809: PUSH 0x10 POP RAX SUB EAX,EBX AND EAX,0x1f LEA RCX,[0x20fd30] SUB RCX,RAX MOVDQU XMM0,xmmword ptr [RCX + 0x10] PSHUFB XMM1,XMM0 JMP 0x00133705
/* WARNING: Removing unreachable block (ram,0x0013375c) */ /* WARNING: Removing unreachable block (ram,0x00133727) */ /* WARNING: Removing unreachable block (ram,0x001336f3) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint crc32_pclmul(uint param_1,int1 (*param_2) [16],uint param_3) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; uint uVar10; uint uVar11; uint uVar12; long in_FS_OFFSET; int1 auVar13 [16]; int1 auVar14 [16]; int1 auVar15 [16]; int1 auVar16 [16]; int8 local_38; int8 uStack_30; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 == 0) goto LAB_00133772; auVar15 = ZEXT416(~param_1); if (param_3 < 0x20) { if (param_3 == 0x10) { auVar15 = *param_2 ^ auVar15; goto LAB_00133705; } if (0xf < param_3) { auVar15 = *param_2 ^ auVar15; uVar12 = 0x10; goto LAB_001336a9; } local_38 = 0; uStack_30 = 0; __memcpy_chk(&local_38,param_2,param_3 & 0xf,0x10); auVar13._8_8_ = uStack_30; auVar13._0_8_ = local_38; if (3 < param_3) { auVar15 = pshufb(auVar15 ^ auVar13, *(int1 (*) [16]) (xmm_shift_left_crc_xmm_shift_tab + (0x10 - (ulong)(0x10 - param_3 & 0x1f))) ); goto LAB_00133705; } auVar15 = pshufb(auVar15 ^ auVar13, *(int1 (*) [16]) (xmm_shift_left_crc_xmm_shift_tab + (0x10 - (ulong)(8 - param_3 & 0xf)))); } else { auVar15 = *param_2 ^ auVar15; uVar10 = 0x10; do { auVar14._8_8_ = 0; auVar14._0_8_ = auVar15._8_8_; auVar13 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((auVar14 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar13 = auVar13 ^ ZEXT816(0xccaa009e) << uVar12; } } auVar16._8_8_ = 0; auVar16._0_8_ = auVar15._0_8_; auVar3._8_8_ = 0; auVar3._0_8_ = _UNK_0020d7c8; auVar15 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((auVar16 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar15 = auVar15 ^ auVar3 << uVar12; } } auVar15 = auVar15 ^ auVar13 ^ *(int1 (*) [16])(*param_2 + uVar10); uVar12 = uVar10 + 0x10; uVar11 = uVar10 + 0x20; uVar10 = uVar12; } while (uVar11 <= param_3); LAB_001336a9: if (uVar12 < param_3) { auVar16 = pshufb(auVar15,*(int1 (*) [16]) (crcr32_calc_pclmulqdq_shf_table + (param_3 & 0xf))); auVar13 = *(int1 (*) [16])(crcr32_calc_pclmulqdq_shf_table + (param_3 & 0xf)) ^ _DAT_0020d7d0; auVar15 = pshufb(auVar15,auVar13); auVar14 = pblendvb(auVar15,*(int1 (*) [16])(*param_2 + (param_3 - 0x10)),auVar13); auVar15._8_8_ = 0; auVar15._0_8_ = auVar16._8_8_; auVar13 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((ZEXT816(0xccaa009e) & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar13 = auVar13 ^ auVar15 << uVar12; } } auVar4._8_8_ = 0; auVar4._0_8_ = auVar16._0_8_; auVar7._8_8_ = 0; auVar7._0_8_ = _UNK_0020d7c8; auVar15 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((auVar4 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar15 = auVar15 ^ auVar7 << uVar12; } } auVar15 = auVar15 ^ auVar13 ^ auVar14; } LAB_00133705: auVar1._8_8_ = 0; auVar1._0_8_ = auVar15._0_8_; auVar13 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((ZEXT816(0xccaa009e) & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar13 = auVar13 ^ auVar1 << uVar12; } } auVar13 = auVar15 >> 0x40 ^ auVar13; auVar5._8_8_ = 0; auVar5._0_8_ = auVar13._0_8_ << 0x20; auVar8._8_8_ = 0; auVar8._0_8_ = _UNK_0020d7e8; auVar15 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((auVar5 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar15 = auVar15 ^ auVar8 << uVar12; } } auVar15 = auVar15 ^ auVar13; } auVar14 = pblendw((int1 [16])0x0,auVar15,0xfc); auVar2._8_8_ = 0; auVar2._0_8_ = auVar14._0_8_; auVar13 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((ZEXT816(0x1f7011640) & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar13 = auVar13 ^ auVar2 << uVar12; } } auVar6._8_8_ = 0; auVar6._0_8_ = auVar13._0_8_ ^ auVar14._0_8_; auVar9._8_8_ = 0; auVar9._0_8_ = _UNK_0020d7f8; auVar13 = (int1 [16])0x0; for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) { if ((auVar6 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) { auVar13 = auVar13 ^ auVar9 << uVar12; } } param_1 = ~(auVar13._8_4_ ^ auVar15._8_4_); LAB_00133772: if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return param_1; }
2,090
ma_read
eloqsql/libmariadb/libmariadb/ma_io.c
size_t ma_read(void *ptr, size_t size, size_t nmemb, MA_FILE *file) { size_t s= 0; if (!file) return -1; switch (file->type) { case MA_FILE_LOCAL: s= fread(ptr, size, nmemb, (FILE *)file->ptr); return s; break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mread(ptr, size, nmemb, file); break; #endif default: return -1; } }
O3
c
ma_read: pushq %rbp movq %rsp, %rbp testq %rcx, %rcx je 0x27afd movl (%rcx), %eax cmpl $0x2, %eax je 0x27b06 cmpl $0x1, %eax jne 0x27afd movq 0x8(%rcx), %rcx popq %rbp jmp 0x136c0 movq $-0x1, %rax popq %rbp retq leaq 0x22ce3(%rip), %rax # 0x4a7f0 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x18(%rax), %rax popq %rbp jmpq *%rax
ma_read: push rbp mov rbp, rsp test rcx, rcx jz short loc_27AFD mov eax, [rcx] cmp eax, 2 jz short loc_27B06 cmp eax, 1 jnz short loc_27AFD mov rcx, [rcx+8] pop rbp jmp _fread loc_27AFD: mov rax, 0FFFFFFFFFFFFFFFFh pop rbp retn loc_27B06: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+18h] pop rbp jmp rax
long long ma_read(long long a1, long long a2, long long a3, long long a4) { if ( !a4 ) return -1LL; if ( *(_DWORD *)a4 != 2 ) { if ( *(_DWORD *)a4 == 1 ) return fread(a1, a2, a3, *(_QWORD *)(a4 + 8)); return -1LL; } return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 24LL))(); }
ma_read: PUSH RBP MOV RBP,RSP TEST RCX,RCX JZ 0x00127afd MOV EAX,dword ptr [RCX] CMP EAX,0x2 JZ 0x00127b06 CMP EAX,0x1 JNZ 0x00127afd MOV RCX,qword ptr [RCX + 0x8] POP RBP JMP 0x001136c0 LAB_00127afd: MOV RAX,-0x1 POP RBP RET LAB_00127b06: LEA RAX,[0x14a7f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x18] POP RBP JMP RAX
size_t ma_read(void *param_1,size_t param_2,size_t param_3,int *param_4) { size_t sVar1; if (param_4 != (int *)0x0) { if (*param_4 == 2) { /* WARNING: Could not recover jumptable at 0x00127b19. Too many branches */ /* WARNING: Treating indirect jump as call */ sVar1 = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x18))(); return sVar1; } if (*param_4 == 1) { sVar1 = fread(param_1,param_2,param_3,*(FILE **)(param_4 + 2)); return sVar1; } } return 0xffffffffffffffff; }
2,091
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O3
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) callq 0xc5bf8 movq %rsp, %rdi callq 0xc1498 movq 0x20(%r15), %r13 movq 0x28(%r15), %rbp cmpq %rbp, %r13 je 0xe97ec leaq 0x58(%rsp), %r15 leaq 0x18(%rsp), %r12 movq (%r13), %rsi testq %rsi, %rsi je 0xe97fe movq %r12, %rdi movq %r14, %rdx callq 0xe4830 movq %rbx, %rdi movq %r12, %rsi callq 0xc5d1a movq %r15, %rdi xorl %esi, %esi callq 0x886ee movq %r15, %rdi callq 0x8ce08 leaq 0x50(%rsp), %rdi callq 0x74104 leaq 0x40(%rsp), %rdi callq 0x74104 leaq 0x30(%rsp), %rdi callq 0x74104 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xe97df movq 0x7c7d6(%rip), %rax # 0x165f90 cmpb $0x0, (%rax) je 0xe97ca movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xe97d4 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xe97df movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %r13 cmpq %rbp, %r13 jne 0xe9756 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x21700 movq %rax, %r15 leaq 0x3b133(%rip), %rsi # 0x124945 movq %rax, %rdi callq 0x21490 movq 0x7c797(%rip), %rsi # 0x165fb8 movq 0x7c750(%rip), %rdx # 0x165f78 movq %r15, %rdi callq 0x21b50 movq %rax, %r14 movq %rsp, %rdi callq 0xc1498 jmp 0xe9866 jmp 0xe984c movq %rax, %r14 movq %r15, %rdi callq 0x220a0 jmp 0xe985e movq %rax, %r14 jmp 0xe985e movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0xb9610 movq %rbx, %rdi callq 0xb9610 movq %r14, %rdi callq 0x21c10
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r13, [r15+20h] mov rbp, [r15+28h] cmp r13, rbp jz loc_E97EC lea r15, [rsp+98h+var_40] lea r12, [rsp+98h+var_80] loc_E9756: mov rsi, [r13+0] test rsi, rsi jz loc_E97FE mov rdi, r12 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r12; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+98h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+98h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+98h+var_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+98h+var_78] test rdi, rdi jz short loc_E97DF mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_E97CA mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_E97D4 loc_E97CA: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_E97D4: cmp eax, 1 jnz short loc_E97DF mov rax, [rdi] call qword ptr [rax+18h] loc_E97DF: add r13, 10h cmp r13, rbp jnz loc_E9756 loc_E97EC: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E97FE: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element is null" 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, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_E9866 jmp short loc_E984C mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_E985E loc_E984C: mov r14, rax jmp short loc_E985E mov r14, rax lea rdi, [rsp+98h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_E985E: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_E9866: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2) { void (****v3)(void); // r13 void (****i)(void); // rbp long long v5; // rdi signed __int32 v6; // eax std::runtime_error *exception; // r15 __int128 v9; // [rsp+0h] [rbp-98h] BYREF long long v10; // [rsp+10h] [rbp-88h] _BYTE v11[8]; // [rsp+18h] [rbp-80h] BYREF long long v12; // [rsp+20h] [rbp-78h] volatile signed __int32 *v13; // [rsp+30h] [rbp-68h] BYREF volatile signed __int32 *v14; // [rsp+40h] [rbp-58h] BYREF volatile signed __int32 *v15; // [rsp+50h] [rbp-48h] BYREF char v16[64]; // [rsp+58h] [rbp-40h] BYREF v9 = 0LL; v10 = 0LL; minja::Value::array((long long)this, (long long *)&v9); std::vector<minja::Value>::~vector(&v9); v3 = *(void (*****)(void))(a2 + 32); for ( i = *(void (*****)(void))(a2 + 40); v3 != i; v3 += 2 ) { if ( !*v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v11, *v3); minja::Value::push_back(this, (const minja::Value *)v11); 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(v16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); v5 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_001e972e: CALL 0x001c5bf8 MOV RDI,RSP CALL 0x001c1498 MOV R13,qword ptr [R15 + 0x20] MOV RBP,qword ptr [R15 + 0x28] CMP R13,RBP JZ 0x001e97ec LEA R15,[RSP + 0x58] LEA R12,[RSP + 0x18] LAB_001e9756: MOV RSI,qword ptr [R13] TEST RSI,RSI JZ 0x001e97fe LAB_001e9763: MOV RDI,R12 MOV RDX,R14 CALL 0x001e4830 LAB_001e976e: MOV RDI,RBX MOV RSI,R12 CALL 0x001c5d1a LAB_001e9779: MOV RDI,R15 XOR ESI,ESI CALL 0x001886ee MOV RDI,R15 CALL 0x0018ce08 LEA RDI,[RSP + 0x50] CALL 0x00174104 LEA RDI,[RSP + 0x40] CALL 0x00174104 LEA RDI,[RSP + 0x30] CALL 0x00174104 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001e97df MOV RAX,qword ptr [0x00265f90] CMP byte ptr [RAX],0x0 JZ 0x001e97ca MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001e97d4 LAB_001e97ca: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001e97d4: CMP EAX,0x1 JNZ 0x001e97df MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001e97df: ADD R13,0x10 CMP R13,RBP JNZ 0x001e9756 LAB_001e97ec: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e97fe: MOV EDI,0x10 CALL 0x00121700 MOV R15,RAX LAB_001e980b: LEA RSI,[0x224945] MOV RDI,RAX CALL 0x00121490 LAB_001e981a: MOV RSI,qword ptr [0x00265fb8] MOV RDX,qword ptr [0x00265f78] MOV RDI,R15 CALL 0x00121b50
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1) { int *piVar1; int8 *puVar2; int iVar3; runtime_error *this_00; int8 *puVar4; int8 local_98; int8 uStack_90; int8 local_88; Expression local_80 [8]; long *local_78; __shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; data local_40 [16]; local_98 = 0; uStack_90 = 0; local_88 = 0; /* try { // try from 001e972e to 001e9732 has its CatchHandler @ 001e9830 */ Value::array(); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_98); puVar4 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar4 != puVar2) { do { if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e980b to 001e9819 has its CatchHandler @ 001e983f */ std::runtime_error::runtime_error(this_00,"Array element is null"); /* try { // try from 001e981a to 001e982f has its CatchHandler @ 001e983d */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00265fb8,PTR__runtime_error_00265f78); } /* try { // try from 001e9763 to 001e976d has its CatchHandler @ 001e984c */ Expression::evaluate(local_80,(shared_ptr *)*puVar4); /* try { // try from 001e976e to 001e9778 has its CatchHandler @ 001e9851 */ Value::push_back((Value *)this,(Value *)local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68); if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_00265f90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } puVar4 = puVar4 + 2; } while (puVar4 != puVar2); } return this; }
2,092
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O1
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) callq 0x9c58a movq %rsp, %rdi callq 0x9bd72 movq 0x20(%r15), %r13 movq 0x28(%r15), %rbp cmpq %rbp, %r13 je 0x9c487 leaq 0x58(%rsp), %r15 leaq 0x18(%rsp), %r12 cmpq $0x0, (%r13) je 0x9c499 movq (%r13), %rsi movq %r12, %rdi movq %r14, %rdx callq 0x94128 movq %rbx, %rdi movq %r12, %rsi callq 0x9c640 movq %r15, %rdi xorl %esi, %esi callq 0x65cc4 movq %r15, %rdi callq 0x6b4b0 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x9c426 callq 0x7ae1c movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x9c435 callq 0x7ae1c movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x9c444 callq 0x7ae1c movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9c47a movq 0xa0b2b(%rip), %rax # 0x13cf80 cmpb $0x0, (%rax) je 0x9c465 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9c46f movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9c47a movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %r13 cmpq %rbp, %r13 jne 0x9c3e0 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %r15 leaq 0x63e6f(%rip), %rsi # 0x10031c movq %rax, %rdi callq 0x1b330 movq 0xa0b2c(%rip), %rsi # 0x13cfe8 movq 0xa0a95(%rip), %rdx # 0x13cf58 movq %r15, %rdi callq 0x1bf90 movq %rax, %r14 movq %rsp, %rdi callq 0x9bd72 jmp 0x9c501 jmp 0x9c4e7 movq %rax, %r14 movq %r15, %rdi callq 0x1b680 jmp 0x9c4f9 movq %rax, %r14 jmp 0x9c4f9 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x9441e movq %rbx, %rdi callq 0x9441e movq %r14, %rdi callq 0x1c020 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r13, [r15+20h] mov rbp, [r15+28h] cmp r13, rbp jz loc_9C487 lea r15, [rsp+98h+var_40] lea r12, [rsp+98h+var_80] loc_9C3E0: cmp qword ptr [r13+0], 0 jz loc_9C499 mov rsi, [r13+0] mov rdi, r12 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r12; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+98h+var_48] test rdi, rdi jz short loc_9C426 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9C426: mov rdi, [rsp+98h+var_58] test rdi, rdi jz short loc_9C435 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9C435: mov rdi, [rsp+98h+var_68] test rdi, rdi jz short loc_9C444 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9C444: mov rdi, [rsp+98h+var_78] test rdi, rdi jz short loc_9C47A mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9C465 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9C46F loc_9C465: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9C46F: cmp eax, 1 jnz short loc_9C47A mov rax, [rdi] call qword ptr [rax+18h] loc_9C47A: add r13, 10h cmp r13, rbp jnz loc_9C3E0 loc_9C487: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9C499: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_9C501 jmp short loc_9C4E7 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_9C4F9 loc_9C4E7: mov r14, rax jmp short loc_9C4F9 mov r14, rax lea rdi, [rsp+98h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9C4F9: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_9C501: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2, int a3, int a4, int a5, int a6) { void (****v7)(void); // r13 void (****i)(void); // rbp long long v9; // rdi signed __int32 v10; // eax std::runtime_error *exception; // r15 __int128 v13; // [rsp+0h] [rbp-98h] BYREF long long v14; // [rsp+10h] [rbp-88h] _BYTE v15[8]; // [rsp+18h] [rbp-80h] BYREF long long v16; // [rsp+20h] [rbp-78h] volatile signed __int32 *v17; // [rsp+30h] [rbp-68h] volatile signed __int32 *v18; // [rsp+40h] [rbp-58h] volatile signed __int32 *v19; // [rsp+50h] [rbp-48h] char v20[64]; // [rsp+58h] [rbp-40h] BYREF v13 = 0LL; v14 = 0LL; minja::Value::array((_DWORD)this, (unsigned int)&v13, a3, a4, a5, a6, 0LL); std::vector<minja::Value>::~vector(&v13); v7 = *(void (*****)(void))(a2 + 32); for ( i = *(void (*****)(void))(a2 + 40); v7 != i; v7 += 2 ) { if ( !*v7 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v15, *v7); minja::Value::push_back(this, (const minja::Value *)v15); 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(v20); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v18 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); v9 = v16; if ( v16 ) { if ( _libc_single_threaded ) { v10 = *(_DWORD *)(v16 + 12); *(_DWORD *)(v16 + 12) = v10 - 1; } else { v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v16 + 12), 0xFFFFFFFF); } if ( v10 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL); } } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_0019c3b8: CALL 0x0019c58a MOV RDI,RSP CALL 0x0019bd72 MOV R13,qword ptr [R15 + 0x20] MOV RBP,qword ptr [R15 + 0x28] CMP R13,RBP JZ 0x0019c487 LEA R15,[RSP + 0x58] LEA R12,[RSP + 0x18] LAB_0019c3e0: CMP qword ptr [R13],0x0 JZ 0x0019c499 MOV RSI,qword ptr [R13] LAB_0019c3ef: MOV RDI,R12 MOV RDX,R14 CALL 0x00194128 LAB_0019c3fa: MOV RDI,RBX MOV RSI,R12 CALL 0x0019c640 LAB_0019c405: MOV RDI,R15 XOR ESI,ESI CALL 0x00165cc4 MOV RDI,R15 CALL 0x0016b4b0 MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0019c426 CALL 0x0017ae1c LAB_0019c426: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0019c435 CALL 0x0017ae1c LAB_0019c435: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0019c444 CALL 0x0017ae1c LAB_0019c444: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0019c47a MOV RAX,qword ptr [0x0023cf80] CMP byte ptr [RAX],0x0 JZ 0x0019c465 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019c46f LAB_0019c465: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019c46f: CMP EAX,0x1 JNZ 0x0019c47a MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019c47a: ADD R13,0x10 CMP R13,RBP JNZ 0x0019c3e0 LAB_0019c487: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019c499: MOV EDI,0x10 CALL 0x0011b450 MOV R15,RAX LAB_0019c4a6: LEA RSI,[0x20031c] MOV RDI,RAX CALL 0x0011b330 LAB_0019c4b5: MOV RSI,qword ptr [0x0023cfe8] MOV RDX,qword ptr [0x0023cf58] MOV RDI,R15 CALL 0x0011bf90
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1) { int *piVar1; long *plVar2; int iVar3; runtime_error *this_00; long *plVar4; int8 local_98; int8 uStack_90; int8 local_88; Expression local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; local_98 = 0; uStack_90 = 0; local_88 = 0; /* try { // try from 0019c3b8 to 0019c3bc has its CatchHandler @ 0019c4cb */ Value::array(); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_98); plVar4 = *(long **)(param_1 + 0x20); plVar2 = *(long **)(param_1 + 0x28); if (plVar4 != plVar2) { do { if (*plVar4 == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019c4a6 to 0019c4b4 has its CatchHandler @ 0019c4da */ std::runtime_error::runtime_error(this_00,"Array element is null"); /* try { // try from 0019c4b5 to 0019c4ca has its CatchHandler @ 0019c4d8 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0023cfe8,PTR__runtime_error_0023cf58); } /* try { // try from 0019c3ef to 0019c3f9 has its CatchHandler @ 0019c4e7 */ Expression::evaluate(local_80,(shared_ptr *)*plVar4); /* try { // try from 0019c3fa to 0019c404 has its CatchHandler @ 0019c4ec */ Value::push_back((Value *)this,(Value *)local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_0023cf80 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } plVar4 = plVar4 + 2; } while (plVar4 != plVar2); } return this; }
2,093
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 0x6c907 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 0x6c8fd 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 0x6c790 cmpl $0x0, %eax jne 0x6c8f0 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x6c90f jmp 0x6c8f2 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0x6c8a7 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_6C907 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_6C8A7: cmp [rbp+var_34], 0FFFFFFFFh jz short loc_6C8FD 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_6C8F0 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_6C90F loc_6C8F0: jmp short $+2 loc_6C8F2: mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_6C8A7 loc_6C8FD: mov rax, [rbp+var_28] mov dword ptr [rax], 0FFFFFFFFh loc_6C907: mov [rbp+var_8], 0 loc_6C90F: 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 0x0016c907 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_0016c8a7: CMP dword ptr [RBP + -0x34],-0x1 JZ 0x0016c8fd 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 0x0016c790 CMP EAX,0x0 JNZ 0x0016c8f0 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 0x0016c90f LAB_0016c8f0: JMP 0x0016c8f2 LAB_0016c8f2: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x0016c8a7 LAB_0016c8fd: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0xffffffff LAB_0016c907: MOV qword ptr [RBP + -0x8],0x0 LAB_0016c90f: 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; }
2,094
parse_time
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static int parse_time(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm) { int err= 0; const char *p = str; const char *end = str + length; size_t frac_len; int ret=1; tm->hour = my_strtoui(p, end-p, &p, &err); if (err || tm->hour > 838 || p == end || *p != ':' ) goto end; p++; tm->minute = my_strtoui(p, end-p, &p, &err); if (err || tm->minute > 59 || p == end || *p != ':') goto end; p++; tm->second = my_strtoui(p, end-p, &p, &err); if (err || tm->second > 59) goto end; ret = 0; tm->second_part = 0; if (p == end) goto end; /* Check for fractional part*/ if (*p != '.') goto end; p++; frac_len = MIN(6,end-p); tm->second_part = my_strtoui(p, frac_len, &p, &err); if (err) goto end; if (frac_len < 6) tm->second_part *= frac_mul[frac_len]; ret = 0; /* Consume whole fractional part, even after 6 digits.*/ p += frac_len; while(p < *end_ptr) { if (*p < '0' || *p > '9') break; p++; } end: *end_ptr = p; return ret; }
O3
c
parse_time: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %rbx movl $0x0, -0x24(%rbp) leaq (%rdi,%rsi), %rax testq %rsi, %rsi jle 0x26d74 movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999 xorl %edx, %edx xorl %esi, %esi xorl %ecx, %ecx movsbq (%rdi,%rsi), %r9 leal -0x3a(%r9), %r10d cmpb $-0xa, %r10b jb 0x26d84 cmpq %r8, %rcx ja 0x26d78 leaq (%rcx,%rcx), %r10 leaq (%r10,%r10,4), %r10 movl $0x2f, %r11d subq %r9, %r11 cmpq %r11, %r10 ja 0x26d78 leaq (%r10,%r9), %rcx addq $-0x30, %rcx leaq (%rdi,%rsi), %r9 incq %r9 incq %rsi cmpq %rax, %r9 jb 0x26d2c addq %rsi, %rdi xorl %edx, %edx jmp 0x26d9a xorl %ecx, %ecx jmp 0x26d8e movl $0x22, -0x24(%rbp) movl $0x22, %edx testq %rsi, %rsi je 0x26d8e addq %rsi, %rdi jmp 0x26d9a movl $0x22, -0x24(%rbp) movl $0x22, %edx movq %rdi, -0x30(%rbp) movq %rcx, %rsi shrq $0x20, %rsi movl %ecx, 0xc(%r14) movl $0x1, %r15d jne 0x26e7b testl %edx, %edx setne %dl cmpl $0x347, %ecx # imm = 0x347 setae %cl orb %dl, %cl cmpq %rax, %rdi sete %dl orb %cl, %dl jne 0x26e7b cmpb $0x3a, (%rdi) jne 0x26e7b incq %rdi movq %rdi, -0x30(%rbp) movq %rax, %rcx subq %rdi, %rcx testq %rcx, %rcx jle 0x26e46 movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999 xorl %edx, %edx xorl %esi, %esi xorl %ecx, %ecx movsbq (%rdi,%rsi), %r9 leal -0x3a(%r9), %r10d cmpb $-0xa, %r10b jb 0x26e56 cmpq %r8, %rcx ja 0x26e4a leaq (%rcx,%rcx), %r10 leaq (%r10,%r10,4), %r10 movl $0x2f, %r11d subq %r9, %r11 cmpq %r11, %r10 ja 0x26e4a leaq (%r10,%r9), %rcx addq $-0x30, %rcx leaq (%rdi,%rsi), %r9 incq %r9 incq %rsi cmpq %rax, %r9 jb 0x26dfe addq %rsi, %rdi xorl %edx, %edx jmp 0x26e6a xorl %ecx, %ecx jmp 0x26e5e movl $0x22, -0x24(%rbp) movl $0x22, %edx addq %rsi, %rdi testq %rsi, %rsi jne 0x26e6a movl $0x22, -0x24(%rbp) movl $0x22, %edx movq %rdi, -0x30(%rbp) movq %rcx, %rsi shrq $0x20, %rsi movl %ecx, 0x10(%r14) je 0x26e92 movq -0x30(%rbp), %rax movq %rax, (%rbx) movl %r15d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpl $0x3b, %ecx ja 0x26e7b testl %edx, %edx jne 0x26e7b cmpq %rax, %rdi je 0x26e7b cmpb $0x3a, (%rdi) jne 0x26e7b incq %rdi movq %rdi, -0x30(%rbp) movq %rax, %rcx subq %rdi, %rcx testq %rcx, %rcx jle 0x26f0f movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999 xorl %edx, %edx xorl %esi, %esi xorl %ecx, %ecx movsbq (%rdi,%rsi), %r9 leal -0x3a(%r9), %r10d cmpb $-0xa, %r10b jb 0x26f1f cmpq %r8, %rcx ja 0x26f13 leaq (%rcx,%rcx), %r10 leaq (%r10,%r10,4), %r10 movl $0x2f, %r11d subq %r9, %r11 cmpq %r11, %r10 ja 0x26f13 leaq (%r10,%r9), %rcx addq $-0x30, %rcx leaq (%rdi,%rsi), %r9 incq %r9 incq %rsi cmpq %rax, %r9 jb 0x26ec7 addq %rsi, %rdi xorl %edx, %edx jmp 0x26f33 xorl %ecx, %ecx jmp 0x26f27 movl $0x22, -0x24(%rbp) movl $0x22, %edx addq %rsi, %rdi testq %rsi, %rsi jne 0x26f33 movl $0x22, -0x24(%rbp) movl $0x22, %edx movq %rdi, -0x30(%rbp) movq %rcx, %rsi shrq $0x20, %rsi movl %ecx, 0x14(%r14) jne 0x26e7b testl %edx, %edx setne %dl cmpl $0x3c, %ecx setae %cl orb %dl, %cl jne 0x26e7b movq $0x0, 0x18(%r14) xorl %r15d, %r15d cmpq %rax, %rdi je 0x26e7b cmpb $0x2e, (%rdi) jne 0x26e7b incq %rdi leaq -0x30(%rbp), %rdx movq %rdi, (%rdx) subq %rdi, %rax cmpq $0x6, %rax movl $0x6, %r12d cmovlq %rax, %r12 leaq -0x24(%rbp), %rcx movq %r12, %rsi callq 0x27dd0 movq %rax, %rcx shrq $0x20, %rcx je 0x26fb3 movl %eax, %eax movq %rax, 0x18(%r14) jmp 0x26e7b cmpl $0x0, -0x24(%rbp) movq %rax, 0x18(%r14) jne 0x26e7b cmpq $0x5, %r12 ja 0x26fda leaq 0x162e2(%rip), %rcx # 0x3d2b0 movl (%rcx,%r12,4), %ecx imulq %rcx, %rax movq %rax, 0x18(%r14) addq -0x30(%rbp), %r12 movq (%rbx), %rax cmpq %rax, %r12 jae 0x26ffd movb (%r12), %cl addb $-0x3a, %cl cmpb $-0xa, %cl jb 0x26ffd incq %r12 cmpq %rax, %r12 jb 0x26fe6 movq %rax, %r12 movq %r12, -0x30(%rbp) jmp 0x26e7b
parse_time: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r14, rcx mov rbx, rdx mov [rbp+var_24], 0 lea rax, [rdi+rsi] test rsi, rsi jle short loc_26D74 mov r8, 1999999999999999h xor edx, edx xor esi, esi xor ecx, ecx loc_26D2C: movsx r9, byte ptr [rdi+rsi] lea r10d, [r9-3Ah] cmp r10b, 0F6h jb short loc_26D84 cmp rcx, r8 ja short loc_26D78 lea r10, [rcx+rcx] lea r10, [r10+r10*4] mov r11d, 2Fh ; '/' sub r11, r9 cmp r10, r11 ja short loc_26D78 lea rcx, [r10+r9] add rcx, 0FFFFFFFFFFFFFFD0h lea r9, [rdi+rsi] inc r9 inc rsi cmp r9, rax jb short loc_26D2C add rdi, rsi xor edx, edx jmp short loc_26D9A loc_26D74: xor ecx, ecx jmp short loc_26D8E loc_26D78: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_26D84: test rsi, rsi jz short loc_26D8E add rdi, rsi jmp short loc_26D9A loc_26D8E: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_26D9A: mov [rbp+var_30], rdi mov rsi, rcx shr rsi, 20h mov [r14+0Ch], ecx mov r15d, 1 jnz loc_26E7B test edx, edx setnz dl cmp ecx, 347h setnb cl or cl, dl cmp rdi, rax setz dl or dl, cl jnz loc_26E7B cmp byte ptr [rdi], 3Ah ; ':' jnz loc_26E7B inc rdi mov [rbp+var_30], rdi mov rcx, rax sub rcx, rdi test rcx, rcx jle short loc_26E46 mov r8, 1999999999999999h xor edx, edx xor esi, esi xor ecx, ecx loc_26DFE: movsx r9, byte ptr [rdi+rsi] lea r10d, [r9-3Ah] cmp r10b, 0F6h jb short loc_26E56 cmp rcx, r8 ja short loc_26E4A lea r10, [rcx+rcx] lea r10, [r10+r10*4] mov r11d, 2Fh ; '/' sub r11, r9 cmp r10, r11 ja short loc_26E4A lea rcx, [r10+r9] add rcx, 0FFFFFFFFFFFFFFD0h lea r9, [rdi+rsi] inc r9 inc rsi cmp r9, rax jb short loc_26DFE add rdi, rsi xor edx, edx jmp short loc_26E6A loc_26E46: xor ecx, ecx jmp short loc_26E5E loc_26E4A: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_26E56: add rdi, rsi test rsi, rsi jnz short loc_26E6A loc_26E5E: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_26E6A: mov [rbp+var_30], rdi mov rsi, rcx shr rsi, 20h mov [r14+10h], ecx jz short loc_26E92 loc_26E7B: mov rax, [rbp+var_30] mov [rbx], rax mov eax, r15d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_26E92: cmp ecx, 3Bh ; ';' ja short loc_26E7B test edx, edx jnz short loc_26E7B cmp rdi, rax jz short loc_26E7B cmp byte ptr [rdi], 3Ah ; ':' jnz short loc_26E7B inc rdi mov [rbp+var_30], rdi mov rcx, rax sub rcx, rdi test rcx, rcx jle short loc_26F0F mov r8, 1999999999999999h xor edx, edx xor esi, esi xor ecx, ecx loc_26EC7: movsx r9, byte ptr [rdi+rsi] lea r10d, [r9-3Ah] cmp r10b, 0F6h jb short loc_26F1F cmp rcx, r8 ja short loc_26F13 lea r10, [rcx+rcx] lea r10, [r10+r10*4] mov r11d, 2Fh ; '/' sub r11, r9 cmp r10, r11 ja short loc_26F13 lea rcx, [r10+r9] add rcx, 0FFFFFFFFFFFFFFD0h lea r9, [rdi+rsi] inc r9 inc rsi cmp r9, rax jb short loc_26EC7 add rdi, rsi xor edx, edx jmp short loc_26F33 loc_26F0F: xor ecx, ecx jmp short loc_26F27 loc_26F13: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_26F1F: add rdi, rsi test rsi, rsi jnz short loc_26F33 loc_26F27: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_26F33: mov [rbp+var_30], rdi mov rsi, rcx shr rsi, 20h mov [r14+14h], ecx jnz loc_26E7B test edx, edx setnz dl cmp ecx, 3Ch ; '<' setnb cl or cl, dl jnz loc_26E7B mov qword ptr [r14+18h], 0 xor r15d, r15d cmp rdi, rax jz loc_26E7B cmp byte ptr [rdi], 2Eh ; '.' jnz loc_26E7B inc rdi lea rdx, [rbp+var_30] mov [rdx], rdi sub rax, rdi cmp rax, 6 mov r12d, 6 cmovl r12, rax lea rcx, [rbp+var_24] mov rsi, r12 call my_strtoull mov rcx, rax shr rcx, 20h jz short loc_26FB3 mov eax, eax mov [r14+18h], rax jmp loc_26E7B loc_26FB3: cmp [rbp+var_24], 0 mov [r14+18h], rax jnz loc_26E7B cmp r12, 5 ja short loc_26FDA lea rcx, frac_mul mov ecx, [rcx+r12*4] imul rax, rcx mov [r14+18h], rax loc_26FDA: add r12, [rbp+var_30] mov rax, [rbx] cmp r12, rax jnb short loc_26FFD loc_26FE6: mov cl, [r12] add cl, 0C6h cmp cl, 0F6h jb short loc_26FFD inc r12 cmp r12, rax jb short loc_26FE6 mov r12, rax loc_26FFD: mov [rbp+var_30], r12 jmp loc_26E7B
long long parse_time(_BYTE *a1, long long a2, _BYTE **a3, long long a4, long long a5) { _BYTE *v7; // rax int v8; // edx long long v9; // rsi unsigned long long v10; // rcx long long v11; // r9 unsigned long long v12; // r9 unsigned int v13; // r15d _BYTE *v14; // rdi int v15; // edx long long v16; // rsi unsigned long long v17; // rcx long long v18; // r9 unsigned long long v19; // r9 _BYTE *v21; // rdi int v22; // edx long long v23; // rsi unsigned long long v24; // rcx long long v25; // r9 unsigned long long v26; // r9 _BYTE *v27; // rdi long long v28; // rax unsigned long long v29; // r12 unsigned long long v30; // rax bool v31; // zf _BYTE *v32; // r12 _BYTE *v33; // [rsp+0h] [rbp-30h] BYREF int v34[9]; // [rsp+Ch] [rbp-24h] BYREF v34[0] = 0; v7 = &a1[a2]; if ( a2 <= 0 ) { v10 = 0LL; LABEL_12: v34[0] = 34; v8 = 34; goto LABEL_13; } a5 = 0x1999999999999999LL; v8 = 0; v9 = 0LL; v10 = 0LL; while ( 1 ) { v11 = (char)a1[v9]; if ( (unsigned __int8)(v11 - 58) < 0xF6u ) break; if ( v10 > 0x1999999999999999LL || 10 * v10 > 47 - v11 ) { v34[0] = 34; v8 = 34; break; } v10 = 10 * v10 + v11 - 48; v12 = (unsigned long long)&a1[++v9]; if ( v12 >= (unsigned long long)v7 ) { a1 += v9; v8 = 0; goto LABEL_13; } } if ( !v9 ) goto LABEL_12; a1 += v9; LABEL_13: v33 = a1; *(_DWORD *)(a4 + 12) = v10; v13 = 1; if ( HIDWORD(v10) || v8 != 0 || (unsigned int)v10 >= 0x347 || a1 == v7 || *a1 != 58 ) goto LABEL_28; v14 = a1 + 1; v33 = v14; if ( v7 - v14 <= 0 ) { v17 = 0LL; LABEL_26: v34[0] = 34; v15 = 34; goto LABEL_27; } a5 = 0x1999999999999999LL; v15 = 0; v16 = 0LL; v17 = 0LL; while ( 1 ) { v18 = (char)v14[v16]; if ( (unsigned __int8)(v18 - 58) < 0xF6u ) break; if ( v17 > 0x1999999999999999LL || 10 * v17 > 47 - v18 ) { v34[0] = 34; v15 = 34; break; } v17 = 10 * v17 + v18 - 48; v19 = (unsigned long long)&v14[++v16]; if ( v19 >= (unsigned long long)v7 ) { v14 += v16; v15 = 0; goto LABEL_27; } } v14 += v16; if ( !v16 ) goto LABEL_26; LABEL_27: v33 = v14; *(_DWORD *)(a4 + 16) = v17; if ( HIDWORD(v17) || (unsigned int)v17 > 0x3B || v15 || v14 == v7 || *v14 != 58 ) goto LABEL_28; v21 = v14 + 1; v33 = v21; if ( v7 - v21 <= 0 ) { v24 = 0LL; } else { a5 = 0x1999999999999999LL; v22 = 0; v23 = 0LL; v24 = 0LL; while ( 1 ) { v25 = (char)v21[v23]; if ( (unsigned __int8)(v25 - 58) < 0xF6u ) break; if ( v24 > 0x1999999999999999LL || 10 * v24 > 47 - v25 ) { v34[0] = 34; v22 = 34; break; } v24 = 10 * v24 + v25 - 48; v26 = (unsigned long long)&v21[++v23]; if ( v26 >= (unsigned long long)v7 ) { v21 += v23; v22 = 0; goto LABEL_44; } } v21 += v23; if ( v23 ) goto LABEL_44; } v34[0] = 34; v22 = 34; LABEL_44: v33 = v21; *(_DWORD *)(a4 + 20) = v24; if ( !HIDWORD(v24) && v22 == 0 && (unsigned int)v24 < 0x3C ) { *(_QWORD *)(a4 + 24) = 0LL; v13 = 0; if ( v21 != v7 && *v21 == 46 ) { v27 = v21 + 1; v33 = v27; v28 = v7 - v27; v29 = 6LL; if ( v28 < 6 ) v29 = v28; v30 = my_strtoull(v27, v29, &v33, v34, a5); if ( HIDWORD(v30) ) { *(_QWORD *)(a4 + 24) = (unsigned int)v30; } else { v31 = v34[0] == 0; *(_QWORD *)(a4 + 24) = v30; if ( v31 ) { if ( v29 <= 5 ) *(_QWORD *)(a4 + 24) = frac_mul[v29] * v30; v32 = &v33[v29]; if ( v32 < *a3 ) { while ( (unsigned __int8)(*v32 - 58) >= 0xF6u ) { if ( ++v32 >= *a3 ) { v32 = *a3; break; } } } v33 = v32; } } } } LABEL_28: *a3 = v33; return v13; }
parse_time: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV RBX,RDX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[RDI + RSI*0x1] TEST RSI,RSI JLE 0x00126d74 MOV R8,0x1999999999999999 XOR EDX,EDX XOR ESI,ESI XOR ECX,ECX LAB_00126d2c: MOVSX R9,byte ptr [RDI + RSI*0x1] LEA R10D,[R9 + -0x3a] CMP R10B,0xf6 JC 0x00126d84 CMP RCX,R8 JA 0x00126d78 LEA R10,[RCX + RCX*0x1] LEA R10,[R10 + R10*0x4] MOV R11D,0x2f SUB R11,R9 CMP R10,R11 JA 0x00126d78 LEA RCX,[R10 + R9*0x1] ADD RCX,-0x30 LEA R9,[RDI + RSI*0x1] INC R9 INC RSI CMP R9,RAX JC 0x00126d2c ADD RDI,RSI XOR EDX,EDX JMP 0x00126d9a LAB_00126d74: XOR ECX,ECX JMP 0x00126d8e LAB_00126d78: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00126d84: TEST RSI,RSI JZ 0x00126d8e ADD RDI,RSI JMP 0x00126d9a LAB_00126d8e: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00126d9a: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RCX SHR RSI,0x20 MOV dword ptr [R14 + 0xc],ECX MOV R15D,0x1 JNZ 0x00126e7b TEST EDX,EDX SETNZ DL CMP ECX,0x347 SETNC CL OR CL,DL CMP RDI,RAX SETZ DL OR DL,CL JNZ 0x00126e7b CMP byte ptr [RDI],0x3a JNZ 0x00126e7b INC RDI MOV qword ptr [RBP + -0x30],RDI MOV RCX,RAX SUB RCX,RDI TEST RCX,RCX JLE 0x00126e46 MOV R8,0x1999999999999999 XOR EDX,EDX XOR ESI,ESI XOR ECX,ECX LAB_00126dfe: MOVSX R9,byte ptr [RDI + RSI*0x1] LEA R10D,[R9 + -0x3a] CMP R10B,0xf6 JC 0x00126e56 CMP RCX,R8 JA 0x00126e4a LEA R10,[RCX + RCX*0x1] LEA R10,[R10 + R10*0x4] MOV R11D,0x2f SUB R11,R9 CMP R10,R11 JA 0x00126e4a LEA RCX,[R10 + R9*0x1] ADD RCX,-0x30 LEA R9,[RDI + RSI*0x1] INC R9 INC RSI CMP R9,RAX JC 0x00126dfe ADD RDI,RSI XOR EDX,EDX JMP 0x00126e6a LAB_00126e46: XOR ECX,ECX JMP 0x00126e5e LAB_00126e4a: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00126e56: ADD RDI,RSI TEST RSI,RSI JNZ 0x00126e6a LAB_00126e5e: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00126e6a: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RCX SHR RSI,0x20 MOV dword ptr [R14 + 0x10],ECX JZ 0x00126e92 LAB_00126e7b: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBX],RAX MOV EAX,R15D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00126e92: CMP ECX,0x3b JA 0x00126e7b TEST EDX,EDX JNZ 0x00126e7b CMP RDI,RAX JZ 0x00126e7b CMP byte ptr [RDI],0x3a JNZ 0x00126e7b INC RDI MOV qword ptr [RBP + -0x30],RDI MOV RCX,RAX SUB RCX,RDI TEST RCX,RCX JLE 0x00126f0f MOV R8,0x1999999999999999 XOR EDX,EDX XOR ESI,ESI XOR ECX,ECX LAB_00126ec7: MOVSX R9,byte ptr [RDI + RSI*0x1] LEA R10D,[R9 + -0x3a] CMP R10B,0xf6 JC 0x00126f1f CMP RCX,R8 JA 0x00126f13 LEA R10,[RCX + RCX*0x1] LEA R10,[R10 + R10*0x4] MOV R11D,0x2f SUB R11,R9 CMP R10,R11 JA 0x00126f13 LEA RCX,[R10 + R9*0x1] ADD RCX,-0x30 LEA R9,[RDI + RSI*0x1] INC R9 INC RSI CMP R9,RAX JC 0x00126ec7 ADD RDI,RSI XOR EDX,EDX JMP 0x00126f33 LAB_00126f0f: XOR ECX,ECX JMP 0x00126f27 LAB_00126f13: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00126f1f: ADD RDI,RSI TEST RSI,RSI JNZ 0x00126f33 LAB_00126f27: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00126f33: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RCX SHR RSI,0x20 MOV dword ptr [R14 + 0x14],ECX JNZ 0x00126e7b TEST EDX,EDX SETNZ DL CMP ECX,0x3c SETNC CL OR CL,DL JNZ 0x00126e7b MOV qword ptr [R14 + 0x18],0x0 XOR R15D,R15D CMP RDI,RAX JZ 0x00126e7b CMP byte ptr [RDI],0x2e JNZ 0x00126e7b INC RDI LEA RDX,[RBP + -0x30] MOV qword ptr [RDX],RDI SUB RAX,RDI CMP RAX,0x6 MOV R12D,0x6 CMOVL R12,RAX LEA RCX,[RBP + -0x24] MOV RSI,R12 CALL 0x00127dd0 MOV RCX,RAX SHR RCX,0x20 JZ 0x00126fb3 MOV EAX,EAX MOV qword ptr [R14 + 0x18],RAX JMP 0x00126e7b LAB_00126fb3: CMP dword ptr [RBP + -0x24],0x0 MOV qword ptr [R14 + 0x18],RAX JNZ 0x00126e7b CMP R12,0x5 JA 0x00126fda LEA RCX,[0x13d2b0] MOV ECX,dword ptr [RCX + R12*0x4] IMUL RAX,RCX MOV qword ptr [R14 + 0x18],RAX LAB_00126fda: ADD R12,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBX] CMP R12,RAX JNC 0x00126ffd LAB_00126fe6: MOV CL,byte ptr [R12] ADD CL,0xc6 CMP CL,0xf6 JC 0x00126ffd INC R12 CMP R12,RAX JC 0x00126fe6 MOV R12,RAX LAB_00126ffd: MOV qword ptr [RBP + -0x30],R12 JMP 0x00126e7b
int8 parse_time(char *param_1,long param_2,ulong *param_3,long param_4) { char cVar1; long lVar2; ulong uVar3; ulong uVar4; int iVar5; long lVar6; char *pcVar7; int8 uVar8; int8 uVar9; char *local_38; int local_2c; local_2c = 0; pcVar7 = param_1 + param_2; if (param_2 < 1) { uVar4 = 0; LAB_00126d8e: local_2c = 0x22; iVar5 = 0x22; } else { iVar5 = 0; lVar6 = 0; uVar4 = 0; do { cVar1 = param_1[lVar6]; if ((byte)(cVar1 - 0x3aU) < 0xf6) { LAB_00126d84: if (lVar6 == 0) goto LAB_00126d8e; param_1 = param_1 + lVar6; goto LAB_00126d9a; } if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) { local_2c = 0x22; iVar5 = 0x22; goto LAB_00126d84; } uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30; lVar2 = lVar6 + 1; lVar6 = lVar6 + 1; } while (param_1 + lVar2 < pcVar7); param_1 = param_1 + lVar6; iVar5 = 0; } LAB_00126d9a: *(uint *)(param_4 + 0xc) = (uint)uVar4; uVar8 = 1; local_38 = param_1; if (((uVar4 >> 0x20 == 0) && (local_38 = param_1, param_1 != pcVar7 && ((uint)uVar4 < 0x347 && iVar5 == 0))) && (local_38 = param_1, *param_1 == ':')) { local_38 = param_1 + 1; if (pcVar7 == local_38 || (long)pcVar7 - (long)local_38 < 0) { uVar4 = 0; LAB_00126e5e: local_2c = 0x22; iVar5 = 0x22; } else { iVar5 = 0; lVar6 = 0; uVar4 = 0; do { cVar1 = local_38[lVar6]; if ((byte)(cVar1 - 0x3aU) < 0xf6) { LAB_00126e56: local_38 = local_38 + lVar6; if (lVar6 == 0) goto LAB_00126e5e; goto LAB_00126e6a; } if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) { local_2c = 0x22; iVar5 = 0x22; goto LAB_00126e56; } uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30; lVar2 = lVar6 + 1; lVar6 = lVar6 + 1; } while (local_38 + lVar2 < pcVar7); local_38 = local_38 + lVar6; iVar5 = 0; } LAB_00126e6a: *(uint *)(param_4 + 0x10) = (uint)uVar4; if (((uVar4 >> 0x20 == 0) && ((uint)uVar4 < 0x3c)) && ((iVar5 == 0 && ((local_38 != pcVar7 && (*local_38 == ':')))))) { local_38 = local_38 + 1; if (pcVar7 == local_38 || (long)pcVar7 - (long)local_38 < 0) { uVar4 = 0; LAB_00126f27: local_2c = 0x22; iVar5 = 0x22; } else { iVar5 = 0; lVar6 = 0; uVar4 = 0; do { cVar1 = local_38[lVar6]; if ((byte)(cVar1 - 0x3aU) < 0xf6) { LAB_00126f1f: local_38 = local_38 + lVar6; if (lVar6 == 0) goto LAB_00126f27; goto LAB_00126f33; } if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) { local_2c = 0x22; iVar5 = 0x22; goto LAB_00126f1f; } uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30; lVar2 = lVar6 + 1; lVar6 = lVar6 + 1; } while (local_38 + lVar2 < pcVar7); local_38 = local_38 + lVar6; iVar5 = 0; } LAB_00126f33: *(uint *)(param_4 + 0x14) = (uint)uVar4; if ((uVar4 >> 0x20 == 0) && ((uint)uVar4 < 0x3c && iVar5 == 0)) { *(int8 *)(param_4 + 0x18) = 0; uVar8 = 0; uVar9 = 0; if ((local_38 != pcVar7) && (*local_38 == '.')) { local_38 = local_38 + 1; uVar4 = 6; if ((long)pcVar7 - (long)local_38 < 6) { uVar4 = (long)pcVar7 - (long)local_38; } uVar3 = my_strtoull(local_38,uVar4,&local_38,&local_2c); if (uVar3 >> 0x20 == 0) { *(ulong *)(param_4 + 0x18) = uVar3; uVar8 = uVar9; if (local_2c == 0) { if (uVar4 < 6) { *(ulong *)(param_4 + 0x18) = uVar3 * *(uint *)(frac_mul + uVar4 * 4); } pcVar7 = local_38 + uVar4; local_38 = pcVar7; for (; (pcVar7 < (char *)*param_3 && (local_38 = pcVar7, 0xf5 < (byte)(*pcVar7 - 0x3aU))); pcVar7 = pcVar7 + 1) { local_38 = (char *)*param_3; } } } else { *(ulong *)(param_4 + 0x18) = uVar3 & 0xffffffff; } } } } } *param_3 = (ulong)local_38; return uVar8; }
2,095
ma_base_info_read
eloqsql/storage/maria/ma_backup.c
uchar *_ma_base_info_read(uchar *ptr, MARIA_BASE_INFO *base) { bmove(base->uuid, ptr, MY_UUID_SIZE); ptr+= MY_UUID_SIZE; base->keystart= mi_sizekorr(ptr); ptr+= 8; base->max_data_file_length= mi_sizekorr(ptr); ptr+= 8; base->max_key_file_length= mi_sizekorr(ptr); ptr+= 8; base->records= (ha_rows) mi_sizekorr(ptr); ptr+= 8; base->reloc= (ha_rows) mi_sizekorr(ptr); ptr+= 8; base->mean_row_length= mi_uint4korr(ptr); ptr+= 4; base->reclength= mi_uint4korr(ptr); ptr+= 4; base->pack_reclength= mi_uint4korr(ptr); ptr+= 4; base->min_pack_length= mi_uint4korr(ptr); ptr+= 4; base->max_pack_length= mi_uint4korr(ptr); ptr+= 4; base->min_block_length= mi_uint4korr(ptr); ptr+= 4; base->fields= mi_uint2korr(ptr); ptr+= 2; base->fixed_not_null_fields= mi_uint2korr(ptr); ptr+= 2; base->fixed_not_null_fields_length= mi_uint2korr(ptr);ptr+= 2; base->max_field_lengths= mi_uint2korr(ptr); ptr+= 2; base->pack_fields= mi_uint2korr(ptr); ptr+= 2; base->extra_options= mi_uint2korr(ptr); ptr+= 2; base->null_bytes= mi_uint2korr(ptr); ptr+= 2; base->original_null_bytes= mi_uint2korr(ptr); ptr+= 2; base->field_offsets= mi_uint2korr(ptr); ptr+= 2; base->language= mi_uint2korr(ptr); ptr+= 2; base->block_size= mi_uint2korr(ptr); ptr+= 2; base->rec_reflength= *ptr++; base->key_reflength= *ptr++; base->keys= *ptr++; base->auto_key= *ptr++; base->born_transactional= *ptr++; base->compression_algorithm= *ptr++; base->pack_bytes= mi_uint2korr(ptr); ptr+= 2; base->blobs= mi_uint2korr(ptr); ptr+= 2; base->max_key_block_length= mi_uint2korr(ptr); ptr+= 2; base->max_key_length= mi_uint2korr(ptr); ptr+= 2; base->extra_alloc_bytes= mi_uint2korr(ptr); ptr+= 2; base->extra_alloc_procent= *ptr++; base->s3_block_size= mi_uint3korr(ptr); ptr+= 3; ptr+= 13; return ptr; }
O3
c
ma_base_info_read: pushq %rbp movq %rsp, %rbp movups (%rdi), %xmm0 movups %xmm0, 0xdc(%rsi) movq 0x10(%rdi), %rax bswapq %rax movq %rax, (%rsi) movq 0x18(%rdi), %rax bswapq %rax movq %rax, 0x8(%rsi) movq 0x20(%rdi), %rax bswapq %rax movq %rax, 0x10(%rsi) movq 0x28(%rdi), %rax bswapq %rax movq %rax, 0x20(%rsi) movq 0x30(%rdi), %rax bswapq %rax movq %rax, 0x28(%rsi) movl 0x38(%rdi), %eax bswapl %eax movq %rax, 0x30(%rsi) movl 0x3c(%rdi), %eax bswapl %eax movq %rax, 0x38(%rsi) movl 0x40(%rdi), %eax bswapl %eax movq %rax, 0x40(%rsi) movl 0x44(%rdi), %eax bswapl %eax movq %rax, 0x48(%rsi) movl 0x48(%rdi), %eax bswapl %eax movq %rax, 0x50(%rsi) movl 0x4c(%rdi), %eax bswapl %eax movq %rax, 0x58(%rsi) movzwl 0x50(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x68(%rsi) movzwl 0x52(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x6c(%rsi) movzwl 0x54(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x70(%rsi) movzwl 0x56(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x74(%rsi) movzwl 0x58(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x78(%rsi) movzwl 0x5a(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xc8(%rsi) movzwl 0x5c(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x9c(%rsi) movzwl 0x5e(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x98(%rsi) movzwl 0x60(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xa0(%rsi) movzwl 0x62(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xcc(%rsi) movzwl 0x64(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xbc(%rsi) movzbl 0x66(%rdi), %eax movl %eax, 0x80(%rsi) movzbl 0x67(%rdi), %eax movl %eax, 0x84(%rsi) movzbl 0x68(%rdi), %eax movl %eax, 0x88(%rsi) movzbl 0x69(%rdi), %eax movl %eax, 0x8c(%rsi) movb 0x6a(%rdi), %al movb %al, 0xec(%rsi) movzbl 0x6b(%rdi), %eax movl %eax, 0xd0(%rsi) movzwl 0x6c(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x94(%rsi) movzwl 0x6e(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x90(%rsi) movzwl 0x70(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xa4(%rsi) movzwl 0x72(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xa8(%rsi) movzwl 0x74(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0xac(%rsi) movzbl 0x76(%rdi), %eax movl %eax, 0xb0(%rsi) movzwl 0x78(%rdi), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x77(%rdi), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x60(%rsi) leaq 0x87(%rdi), %rax popq %rbp retq
_ma_base_info_read: push rbp mov rbp, rsp movups xmm0, xmmword ptr [rdi] movups xmmword ptr [rsi+0DCh], xmm0 mov rax, [rdi+10h] bswap rax mov [rsi], rax mov rax, [rdi+18h] bswap rax mov [rsi+8], rax mov rax, [rdi+20h] bswap rax mov [rsi+10h], rax mov rax, [rdi+28h] bswap rax mov [rsi+20h], rax mov rax, [rdi+30h] bswap rax mov [rsi+28h], rax mov eax, [rdi+38h] bswap eax mov [rsi+30h], rax mov eax, [rdi+3Ch] bswap eax mov [rsi+38h], rax mov eax, [rdi+40h] bswap eax mov [rsi+40h], rax mov eax, [rdi+44h] bswap eax mov [rsi+48h], rax mov eax, [rdi+48h] bswap eax mov [rsi+50h], rax mov eax, [rdi+4Ch] bswap eax mov [rsi+58h], rax movzx eax, word ptr [rdi+50h] rol ax, 8 movzx eax, ax mov [rsi+68h], eax movzx eax, word ptr [rdi+52h] rol ax, 8 movzx eax, ax mov [rsi+6Ch], eax movzx eax, word ptr [rdi+54h] rol ax, 8 movzx eax, ax mov [rsi+70h], eax movzx eax, word ptr [rdi+56h] rol ax, 8 movzx eax, ax mov [rsi+74h], eax movzx eax, word ptr [rdi+58h] rol ax, 8 movzx eax, ax mov [rsi+78h], eax movzx eax, word ptr [rdi+5Ah] rol ax, 8 movzx eax, ax mov [rsi+0C8h], eax movzx eax, word ptr [rdi+5Ch] rol ax, 8 movzx eax, ax mov [rsi+9Ch], eax movzx eax, word ptr [rdi+5Eh] rol ax, 8 movzx eax, ax mov [rsi+98h], eax movzx eax, word ptr [rdi+60h] rol ax, 8 movzx eax, ax mov [rsi+0A0h], eax movzx eax, word ptr [rdi+62h] rol ax, 8 movzx eax, ax mov [rsi+0CCh], eax movzx eax, word ptr [rdi+64h] rol ax, 8 movzx eax, ax mov [rsi+0BCh], eax movzx eax, byte ptr [rdi+66h] mov [rsi+80h], eax movzx eax, byte ptr [rdi+67h] mov [rsi+84h], eax movzx eax, byte ptr [rdi+68h] mov [rsi+88h], eax movzx eax, byte ptr [rdi+69h] mov [rsi+8Ch], eax mov al, [rdi+6Ah] mov [rsi+0ECh], al movzx eax, byte ptr [rdi+6Bh] mov [rsi+0D0h], eax movzx eax, word ptr [rdi+6Ch] rol ax, 8 movzx eax, ax mov [rsi+94h], eax movzx eax, word ptr [rdi+6Eh] rol ax, 8 movzx eax, ax mov [rsi+90h], eax movzx eax, word ptr [rdi+70h] rol ax, 8 movzx eax, ax mov [rsi+0A4h], eax movzx eax, word ptr [rdi+72h] rol ax, 8 movzx eax, ax mov [rsi+0A8h], eax movzx eax, word ptr [rdi+74h] rol ax, 8 movzx eax, ax mov [rsi+0ACh], eax movzx eax, byte ptr [rdi+76h] mov [rsi+0B0h], eax movzx eax, word ptr [rdi+78h] rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rdi+77h] shl ecx, 10h or rcx, rax mov [rsi+60h], rcx lea rax, [rdi+87h] pop rbp retn
long long ma_base_info_read(long long a1, long long a2) { *(_OWORD *)(a2 + 220) = *(_OWORD *)a1; *(_QWORD *)a2 = _byteswap_uint64(*(_QWORD *)(a1 + 16)); *(_QWORD *)(a2 + 8) = _byteswap_uint64(*(_QWORD *)(a1 + 24)); *(_QWORD *)(a2 + 16) = _byteswap_uint64(*(_QWORD *)(a1 + 32)); *(_QWORD *)(a2 + 32) = _byteswap_uint64(*(_QWORD *)(a1 + 40)); *(_QWORD *)(a2 + 40) = _byteswap_uint64(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a2 + 48) = _byteswap_ulong(*(_DWORD *)(a1 + 56)); *(_QWORD *)(a2 + 56) = _byteswap_ulong(*(_DWORD *)(a1 + 60)); *(_QWORD *)(a2 + 64) = _byteswap_ulong(*(_DWORD *)(a1 + 64)); *(_QWORD *)(a2 + 72) = _byteswap_ulong(*(_DWORD *)(a1 + 68)); *(_QWORD *)(a2 + 80) = _byteswap_ulong(*(_DWORD *)(a1 + 72)); *(_QWORD *)(a2 + 88) = _byteswap_ulong(*(_DWORD *)(a1 + 76)); *(_DWORD *)(a2 + 104) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 80), 8); *(_DWORD *)(a2 + 108) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 82), 8); *(_DWORD *)(a2 + 112) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 84), 8); *(_DWORD *)(a2 + 116) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 86), 8); *(_DWORD *)(a2 + 120) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 88), 8); *(_DWORD *)(a2 + 200) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 90), 8); *(_DWORD *)(a2 + 156) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 92), 8); *(_DWORD *)(a2 + 152) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 94), 8); *(_DWORD *)(a2 + 160) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 96), 8); *(_DWORD *)(a2 + 204) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 98), 8); *(_DWORD *)(a2 + 188) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 100), 8); *(_DWORD *)(a2 + 128) = *(unsigned __int8 *)(a1 + 102); *(_DWORD *)(a2 + 132) = *(unsigned __int8 *)(a1 + 103); *(_DWORD *)(a2 + 136) = *(unsigned __int8 *)(a1 + 104); *(_DWORD *)(a2 + 140) = *(unsigned __int8 *)(a1 + 105); *(_BYTE *)(a2 + 236) = *(_BYTE *)(a1 + 106); *(_DWORD *)(a2 + 208) = *(unsigned __int8 *)(a1 + 107); *(_DWORD *)(a2 + 148) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 108), 8); *(_DWORD *)(a2 + 144) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 110), 8); *(_DWORD *)(a2 + 164) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 112), 8); *(_DWORD *)(a2 + 168) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 114), 8); *(_DWORD *)(a2 + 172) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 116), 8); *(_DWORD *)(a2 + 176) = *(unsigned __int8 *)(a1 + 118); *(_QWORD *)(a2 + 96) = (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 120), 8) | (unsigned long long)(*(unsigned __int8 *)(a1 + 119) << 16); return a1 + 135; }
_ma_base_info_read: PUSH RBP MOV RBP,RSP MOVUPS XMM0,xmmword ptr [RDI] MOVUPS xmmword ptr [RSI + 0xdc],XMM0 MOV RAX,qword ptr [RDI + 0x10] BSWAP RAX MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RDI + 0x18] BSWAP RAX MOV qword ptr [RSI + 0x8],RAX MOV RAX,qword ptr [RDI + 0x20] BSWAP RAX MOV qword ptr [RSI + 0x10],RAX MOV RAX,qword ptr [RDI + 0x28] BSWAP RAX MOV qword ptr [RSI + 0x20],RAX MOV RAX,qword ptr [RDI + 0x30] BSWAP RAX MOV qword ptr [RSI + 0x28],RAX MOV EAX,dword ptr [RDI + 0x38] BSWAP EAX MOV qword ptr [RSI + 0x30],RAX MOV EAX,dword ptr [RDI + 0x3c] BSWAP EAX MOV qword ptr [RSI + 0x38],RAX MOV EAX,dword ptr [RDI + 0x40] BSWAP EAX MOV qword ptr [RSI + 0x40],RAX MOV EAX,dword ptr [RDI + 0x44] BSWAP EAX MOV qword ptr [RSI + 0x48],RAX MOV EAX,dword ptr [RDI + 0x48] BSWAP EAX MOV qword ptr [RSI + 0x50],RAX MOV EAX,dword ptr [RDI + 0x4c] BSWAP EAX MOV qword ptr [RSI + 0x58],RAX MOVZX EAX,word ptr [RDI + 0x50] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x68],EAX MOVZX EAX,word ptr [RDI + 0x52] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x6c],EAX MOVZX EAX,word ptr [RDI + 0x54] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x70],EAX MOVZX EAX,word ptr [RDI + 0x56] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x74],EAX MOVZX EAX,word ptr [RDI + 0x58] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x78],EAX MOVZX EAX,word ptr [RDI + 0x5a] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xc8],EAX MOVZX EAX,word ptr [RDI + 0x5c] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x9c],EAX MOVZX EAX,word ptr [RDI + 0x5e] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x98],EAX MOVZX EAX,word ptr [RDI + 0x60] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xa0],EAX MOVZX EAX,word ptr [RDI + 0x62] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xcc],EAX MOVZX EAX,word ptr [RDI + 0x64] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xbc],EAX MOVZX EAX,byte ptr [RDI + 0x66] MOV dword ptr [RSI + 0x80],EAX MOVZX EAX,byte ptr [RDI + 0x67] MOV dword ptr [RSI + 0x84],EAX MOVZX EAX,byte ptr [RDI + 0x68] MOV dword ptr [RSI + 0x88],EAX MOVZX EAX,byte ptr [RDI + 0x69] MOV dword ptr [RSI + 0x8c],EAX MOV AL,byte ptr [RDI + 0x6a] MOV byte ptr [RSI + 0xec],AL MOVZX EAX,byte ptr [RDI + 0x6b] MOV dword ptr [RSI + 0xd0],EAX MOVZX EAX,word ptr [RDI + 0x6c] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x94],EAX MOVZX EAX,word ptr [RDI + 0x6e] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0x90],EAX MOVZX EAX,word ptr [RDI + 0x70] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xa4],EAX MOVZX EAX,word ptr [RDI + 0x72] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xa8],EAX MOVZX EAX,word ptr [RDI + 0x74] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSI + 0xac],EAX MOVZX EAX,byte ptr [RDI + 0x76] MOV dword ptr [RSI + 0xb0],EAX MOVZX EAX,word ptr [RDI + 0x78] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RDI + 0x77] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RSI + 0x60],RCX LEA RAX,[RDI + 0x87] POP RBP RET
long _ma_base_info_read(int8 *param_1,ulong *param_2) { uint uVar1; ulong uVar2; int8 uVar3; uVar3 = param_1[1]; *(int8 *)((long)param_2 + 0xdc) = *param_1; *(int8 *)((long)param_2 + 0xe4) = uVar3; uVar2 = param_1[2]; *param_2 = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_1[3]; param_2[1] = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_1[4]; param_2[2] = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_1[5]; param_2[4] = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar2 = param_1[6]; param_2[5] = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; uVar1 = *(uint *)(param_1 + 7); param_2[6] = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); uVar1 = *(uint *)((long)param_1 + 0x3c); param_2[7] = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); uVar1 = *(uint *)(param_1 + 8); param_2[8] = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); uVar1 = *(uint *)((long)param_1 + 0x44); param_2[9] = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); uVar1 = *(uint *)(param_1 + 9); param_2[10] = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); uVar1 = *(uint *)((long)param_1 + 0x4c); param_2[0xb] = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); *(uint *)(param_2 + 0xd) = (uint)(ushort)(*(ushort *)(param_1 + 10) << 8 | *(ushort *)(param_1 + 10) >> 8); *(uint *)((long)param_2 + 0x6c) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x52) << 8 | *(ushort *)((long)param_1 + 0x52) >> 8); *(uint *)(param_2 + 0xe) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x54) << 8 | *(ushort *)((long)param_1 + 0x54) >> 8); *(uint *)((long)param_2 + 0x74) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x56) << 8 | *(ushort *)((long)param_1 + 0x56) >> 8); *(uint *)(param_2 + 0xf) = (uint)(ushort)(*(ushort *)(param_1 + 0xb) << 8 | *(ushort *)(param_1 + 0xb) >> 8); *(uint *)(param_2 + 0x19) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x5a) << 8 | *(ushort *)((long)param_1 + 0x5a) >> 8); *(uint *)((long)param_2 + 0x9c) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x5c) << 8 | *(ushort *)((long)param_1 + 0x5c) >> 8); *(uint *)(param_2 + 0x13) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x5e) << 8 | *(ushort *)((long)param_1 + 0x5e) >> 8); *(uint *)(param_2 + 0x14) = (uint)(ushort)(*(ushort *)(param_1 + 0xc) << 8 | *(ushort *)(param_1 + 0xc) >> 8); *(uint *)((long)param_2 + 0xcc) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x62) << 8 | *(ushort *)((long)param_1 + 0x62) >> 8); *(uint *)((long)param_2 + 0xbc) = (uint)(ushort)(*(ushort *)((long)param_1 + 100) << 8 | *(ushort *)((long)param_1 + 100) >> 8) ; *(uint *)(param_2 + 0x10) = (uint)*(byte *)((long)param_1 + 0x66); *(uint *)((long)param_2 + 0x84) = (uint)*(byte *)((long)param_1 + 0x67); *(uint *)(param_2 + 0x11) = (uint)*(byte *)(param_1 + 0xd); *(uint *)((long)param_2 + 0x8c) = (uint)*(byte *)((long)param_1 + 0x69); *(int1 *)((long)param_2 + 0xec) = *(int1 *)((long)param_1 + 0x6a); *(uint *)(param_2 + 0x1a) = (uint)*(byte *)((long)param_1 + 0x6b); *(uint *)((long)param_2 + 0x94) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x6c) << 8 | *(ushort *)((long)param_1 + 0x6c) >> 8); *(uint *)(param_2 + 0x12) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x6e) << 8 | *(ushort *)((long)param_1 + 0x6e) >> 8); *(uint *)((long)param_2 + 0xa4) = (uint)(ushort)(*(ushort *)(param_1 + 0xe) << 8 | *(ushort *)(param_1 + 0xe) >> 8); *(uint *)(param_2 + 0x15) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x72) << 8 | *(ushort *)((long)param_1 + 0x72) >> 8); *(uint *)((long)param_2 + 0xac) = (uint)(ushort)(*(ushort *)((long)param_1 + 0x74) << 8 | *(ushort *)((long)param_1 + 0x74) >> 8); *(uint *)(param_2 + 0x16) = (uint)*(byte *)((long)param_1 + 0x76); param_2[0xc] = (ulong)CONCAT12(*(int1 *)((long)param_1 + 0x77), *(ushort *)(param_1 + 0xf) << 8 | *(ushort *)(param_1 + 0xf) >> 8); return (long)param_1 + 0x87; }
2,096
inline_mysql_file_pread
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_pread( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, my_off_t offset, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_pread(file, buffer, count, offset, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_pread(file, buffer, count, offset, flags); return result; }
O0
c
inline_mysql_file_pread: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x1e946c(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xd6d5f leaq 0x1e9422(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0xf4630 movq %rax, -0x38(%rbp) movq 0x10(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xd6d0a cmpq $0x0, -0x38(%rbp) jne 0xd6cef movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xd6cfa xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xd6cfa movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xd6d37 cmpq $-0x1, -0x38(%rbp) je 0xd6d1e movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xd6d29 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xd6d29 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x1e937a(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xd6d83 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0xf4630 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq
inline_mysql_file_pread_8: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 6 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_D6D5F lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pread mov [rbp+var_38], rax mov rax, [rbp+arg_0] and rax, 6 cmp rax, 0 jz short loc_D6D0A cmp [rbp+var_38], 0 jnz short loc_D6CEF mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_D6CFA loc_D6CEF: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_D6CFA: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_D6D37 loc_D6D0A: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_D6D1E mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_D6D29 loc_D6D1E: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_D6D29: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_D6D37: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_D6D83 loc_D6D5F: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pread mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_D6D83: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_pread_8( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6, long long a7) { long long v8; // [rsp+0h] [rbp-A0h] long long v9; // [rsp+8h] [rbp-98h] _BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF long long v11; // [rsp+60h] [rbp-40h] long long v12; // [rsp+68h] [rbp-38h] long long v13; // [rsp+70h] [rbp-30h] long long v14; // [rsp+78h] [rbp-28h] long long v15; // [rsp+80h] [rbp-20h] unsigned int v16; // [rsp+88h] [rbp-18h] unsigned int v17; // [rsp+8Ch] [rbp-14h] long long v18; // [rsp+90h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 6LL); if ( v11 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17); v12 = my_pread(v16, v15, v14, v13, a7); if ( (a7 & 6) != 0 ) { if ( v12 ) v9 = 0LL; else v9 = v14; ((void ( *)(long long, long long))PSI_server[67])(v11, v9); } else { if ( v12 == -1 ) v8 = 0LL; else v8 = v12; ((void ( *)(long long, long long))PSI_server[67])(v11, v8); } return v12; } else { return my_pread(v16, v15, v14, v13, a7); } }
inline_mysql_file_pread: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001d6d5f LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x001f4630 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x10] AND RAX,0x6 CMP RAX,0x0 JZ 0x001d6d0a CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001d6cef MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001d6cfa LAB_001d6cef: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001d6cfa LAB_001d6cfa: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001d6d37 LAB_001d6d0a: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001d6d1e MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001d6d29 LAB_001d6d1e: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001d6d29 LAB_001d6d29: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001d6d37: LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001d6d83 LAB_001d6d5f: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x001f4630 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001d6d83: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_pread (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,int8 param_6,ulong param_7) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; int8 local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6); if (local_48 == 0) { local_10 = my_pread(local_20,local_28,local_30,local_38,param_7); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_pread(local_20,local_28,local_30,local_38,param_7); if ((param_7 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
2,097
ma_test_if_changed
eloqsql/storage/maria/ma_locking.c
int _ma_test_if_changed(register MARIA_HA *info) { #ifdef MARIA_EXTERNAL_LOCKING MARIA_SHARE *share= info->s; if (share->state.process != share->last_process || share->state.unique != info->last_unique || share->state.update_count != info->last_loop) { /* Keyfile has changed */ DBUG_PRINT("info",("index file changed")); if (share->state.process != share->this_process) VOID(flush_pagecache_blocks(share->pagecache, &share->kfile, FLUSH_RELEASE)); share->last_process=share->state.process; info->last_unique= share->state.unique; info->last_loop= share->state.update_count; info->update|= HA_STATE_WRITTEN; /* Must use file on next */ info->data_changed= 1; /* For maria_is_changed */ return 1; } #endif return (!(info->update & HA_STATE_AKTIV) || (info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED | HA_STATE_KEY_CHANGED))); }
O3
c
ma_test_if_changed: pushq %rbp movq %rsp, %rbp movl $0x8e, %ecx andl 0x624(%rdi), %ecx xorl %eax, %eax cmpl $0x2, %ecx setne %al popq %rbp retq
_ma_test_if_changed: push rbp mov rbp, rsp mov ecx, 8Eh and ecx, [rdi+624h] xor eax, eax cmp ecx, 2 setnz al pop rbp retn
_BOOL8 ma_test_if_changed(long long a1) { return (*(_DWORD *)(a1 + 1572) & 0x8E) != 2; }
_ma_test_if_changed: PUSH RBP MOV RBP,RSP MOV ECX,0x8e AND ECX,dword ptr [RDI + 0x624] XOR EAX,EAX CMP ECX,0x2 SETNZ AL POP RBP RET
bool _ma_test_if_changed(long param_1) { return (*(uint *)(param_1 + 0x624) & 0x8e) != 2; }
2,098
mi_seq_search
eloqsql/storage/myisam/mi_search.c
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, my_bool *last_key) { int UNINIT_VAR(flag); uint nod_flag,UNINIT_VAR(length),not_used[2]; uchar t_buff[HA_MAX_KEY_BUFF],*end; DBUG_ENTER("_mi_seq_search"); end= page+mi_getint(page); nod_flag=mi_test_if_nod(page); page+=2+nod_flag; *ret_pos=page; t_buff[0]=0; /* Avoid bugs */ while (page < end) { length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff); if (length == 0 || page > end) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_PRINT("error", ("Found wrong key: length: %u page: %p end: %p", length, page, end)); DBUG_RETURN(MI_FOUND_WRONG_KEY); } if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag, not_used)) >= 0) break; #ifdef EXTRA_DEBUG DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff, flag)); #endif memcpy(buff,t_buff,length); *ret_pos=page; } if (flag == 0) memcpy(buff,t_buff,length); /* Result is first key */ *last_key= page == end; DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos)); DBUG_RETURN(flag); }
O3
c
mi_seq_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x508, %rsp # imm = 0x508 movl %r9d, -0x508(%rbp) movl %r8d, -0x504(%rbp) movq %rcx, -0x520(%rbp) movq %rsi, -0x510(%rbp) movq 0x10(%rbp), %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movzbl 0x1(%rdx), %ecx movzbl (%rdx), %r9d movl %r9d, %eax andl $0x7f, %eax shll $0x8, %eax orq %rcx, %rax xorl %esi, %esi testb %r9b, %r9b jns 0x9f82c movq (%rdi), %rcx movl 0x17c(%rcx), %esi movq %rdi, -0x518(%rbp) leaq (%rdx,%rax), %rcx movq %rcx, -0x500(%rbp) leal 0x2(%rsi), %ecx addq %rcx, %rdx movq %rdx, -0x4f8(%rbp) movq %rdx, (%rbx) movb $0x0, -0x4f0(%rbp) cmpl %ecx, %eax jbe 0x9f93b leaq -0x4f0(%rbp), %rcx movq -0x510(%rbp), %rdi movq %rsi, %r12 leaq -0x4f8(%rbp), %rdx movq %rcx, %r13 callq *0x48(%rdi) testl %eax, %eax je 0x9f8f5 movl %eax, %r15d movq -0x500(%rbp), %rax cmpq %rax, -0x4f8(%rbp) ja 0x9f8f5 movq -0x510(%rbp), %rax movq 0x28(%rax), %rdi movq %r13, %rsi movq -0x520(%rbp), %rdx movl -0x504(%rbp), %ecx movl -0x508(%rbp), %r8d leaq -0x528(%rbp), %r9 callq 0xbdd92 movl %eax, %r14d testl %eax, %eax jns 0x9f923 movl %r15d, %edx movq 0x18(%rbp), %rdi movq %r13, %rsi callq 0x2a0b0 movq -0x4f8(%rbp), %rax movq %rax, (%rbx) cmpq -0x500(%rbp), %rax movq %r12, %rsi movq %r13, %rcx jb 0x9f864 jmp 0x9f93b movq -0x518(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x95dfa callq 0xc14ee movl $0x7e, (%rax) movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF jmp 0x9f950 jne 0x9f93b movl %r15d, %edx leaq -0x4f0(%rbp), %rsi movq 0x18(%rbp), %rdi callq 0x2a0b0 xorl %r14d, %r14d movq -0x500(%rbp), %rax cmpq %rax, -0x4f8(%rbp) movq 0x20(%rbp), %rax sete (%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9f974 movl %r14d, %eax addq $0x508, %rsp # imm = 0x508 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a280
_mi_seq_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 508h mov [rbp+var_508], r9d mov [rbp+var_504], r8d mov [rbp+var_520], rcx mov [rbp+var_510], rsi mov rbx, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_30], rax movzx ecx, byte ptr [rdx+1] movzx r9d, byte ptr [rdx] mov eax, r9d and eax, 7Fh shl eax, 8 or rax, rcx xor esi, esi test r9b, r9b jns short loc_9F82C mov rcx, [rdi] mov esi, [rcx+17Ch] loc_9F82C: mov [rbp+var_518], rdi lea rcx, [rdx+rax] mov [rbp+var_500], rcx lea ecx, [rsi+2] add rdx, rcx mov [rbp+var_4F8], rdx mov [rbx], rdx mov [rbp+var_4F0], 0 cmp eax, ecx jbe loc_9F93B lea rcx, [rbp+var_4F0] loc_9F864: mov rdi, [rbp+var_510] mov r12, rsi lea rdx, [rbp+var_4F8] mov r13, rcx call qword ptr [rdi+48h] test eax, eax jz short loc_9F8F5 mov r15d, eax mov rax, [rbp+var_500] cmp [rbp+var_4F8], rax ja short loc_9F8F5 mov rax, [rbp+var_510] mov rdi, [rax+28h] mov rsi, r13 mov rdx, [rbp+var_520] mov ecx, [rbp+var_504] mov r8d, [rbp+var_508] lea r9, [rbp+var_528] call ha_key_cmp mov r14d, eax test eax, eax jns short loc_9F923 mov edx, r15d mov rdi, [rbp+arg_8] mov rsi, r13 call _memcpy mov rax, [rbp+var_4F8] mov [rbx], rax cmp rax, [rbp+var_500] mov rsi, r12 mov rcx, r13 jb loc_9F864 jmp short loc_9F93B loc_9F8F5: mov rax, [rbp+var_518] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov r14d, 7FFFFFFFh jmp short loc_9F950 loc_9F923: jnz short loc_9F93B mov edx, r15d lea rsi, [rbp+var_4F0] mov rdi, [rbp+arg_8] call _memcpy xor r14d, r14d loc_9F93B: mov rax, [rbp+var_500] cmp [rbp+var_4F8], rax mov rax, [rbp+arg_10] setz byte ptr [rax] loc_9F950: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9F974 mov eax, r14d add rsp, 508h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9F974: call ___stack_chk_fail
long long mi_seq_search( long long a1, long long a2, char *a3, long long a4, unsigned int a5, unsigned int a6, char **a7, long long a8, bool *a9) { unsigned int v9; // r14d unsigned long long v10; // rax long long v11; // rsi long long v12; // rcx _BYTE *v13; // rcx _BYTE *v14; // r13 unsigned int v15; // eax unsigned int v16; // r15d int v17; // eax char *v18; // rax char v20[8]; // [rsp+8h] [rbp-528h] BYREF long long v21; // [rsp+10h] [rbp-520h] long long v22; // [rsp+18h] [rbp-518h] long long v23; // [rsp+20h] [rbp-510h] unsigned int v24; // [rsp+28h] [rbp-508h] unsigned int v25; // [rsp+2Ch] [rbp-504h] char *v26; // [rsp+30h] [rbp-500h] char *v27; // [rsp+38h] [rbp-4F8h] BYREF _BYTE v28[1216]; // [rsp+40h] [rbp-4F0h] BYREF unsigned long long v29; // [rsp+500h] [rbp-30h] v24 = a6; v25 = a5; v21 = a4; v23 = a2; v29 = __readfsqword(0x28u); v10 = (unsigned __int8)a3[1] | (unsigned long long)((unsigned __int8)(*a3 & 0x7F) << 8); v11 = 0LL; if ( *a3 < 0 ) v11 = *(unsigned int *)(*(_QWORD *)a1 + 380LL); v22 = a1; v26 = &a3[v10]; v12 = (unsigned int)(v11 + 2); v27 = &a3[v12]; *a7 = &a3[v12]; v28[0] = 0; if ( (unsigned int)v10 > (unsigned int)v12 ) { v13 = v28; while ( 1 ) { v14 = v13; v15 = (*(long long ( **)(long long, long long, char **))(v23 + 72))(v23, v11, &v27); if ( !v15 || (v16 = v15, v27 > v26) ) { mi_report_error(126, *(_QWORD *)(*(_QWORD *)v22 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; return 0x7FFFFFFF; } v17 = ha_key_cmp(*(_QWORD *)(v23 + 40), v14, v21, v25, v24, v20); v9 = v17; if ( v17 >= 0 ) break; memcpy(a8, v14, v16); v18 = v27; *a7 = v27; v13 = v14; if ( v18 >= v26 ) goto LABEL_13; } if ( !v17 ) { memcpy(a8, v28, v16); v9 = 0; } } LABEL_13: *a9 = v27 == v26; return v9; }
_mi_seq_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x508 MOV dword ptr [RBP + -0x508],R9D MOV dword ptr [RBP + -0x504],R8D MOV qword ptr [RBP + -0x520],RCX MOV qword ptr [RBP + -0x510],RSI MOV RBX,qword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOVZX ECX,byte ptr [RDX + 0x1] MOVZX R9D,byte ptr [RDX] MOV EAX,R9D AND EAX,0x7f SHL EAX,0x8 OR RAX,RCX XOR ESI,ESI TEST R9B,R9B JNS 0x0019f82c MOV RCX,qword ptr [RDI] MOV ESI,dword ptr [RCX + 0x17c] LAB_0019f82c: MOV qword ptr [RBP + -0x518],RDI LEA RCX,[RDX + RAX*0x1] MOV qword ptr [RBP + -0x500],RCX LEA ECX,[RSI + 0x2] ADD RDX,RCX MOV qword ptr [RBP + -0x4f8],RDX MOV qword ptr [RBX],RDX MOV byte ptr [RBP + -0x4f0],0x0 CMP EAX,ECX JBE 0x0019f93b LEA RCX,[RBP + -0x4f0] LAB_0019f864: MOV RDI,qword ptr [RBP + -0x510] MOV R12,RSI LEA RDX,[RBP + -0x4f8] MOV R13,RCX CALL qword ptr [RDI + 0x48] TEST EAX,EAX JZ 0x0019f8f5 MOV R15D,EAX MOV RAX,qword ptr [RBP + -0x500] CMP qword ptr [RBP + -0x4f8],RAX JA 0x0019f8f5 MOV RAX,qword ptr [RBP + -0x510] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x520] MOV ECX,dword ptr [RBP + -0x504] MOV R8D,dword ptr [RBP + -0x508] LEA R9,[RBP + -0x528] CALL 0x001bdd92 MOV R14D,EAX TEST EAX,EAX JNS 0x0019f923 MOV EDX,R15D MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x4f8] MOV qword ptr [RBX],RAX CMP RAX,qword ptr [RBP + -0x500] MOV RSI,R12 MOV RCX,R13 JC 0x0019f864 JMP 0x0019f93b LAB_0019f8f5: MOV RAX,qword ptr [RBP + -0x518] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00195dfa CALL 0x001c14ee MOV dword ptr [RAX],0x7e MOV R14D,0x7fffffff JMP 0x0019f950 LAB_0019f923: JNZ 0x0019f93b MOV EDX,R15D LEA RSI,[RBP + -0x4f0] MOV RDI,qword ptr [RBP + 0x18] CALL 0x0012a0b0 XOR R14D,R14D LAB_0019f93b: MOV RAX,qword ptr [RBP + -0x500] CMP qword ptr [RBP + -0x4f8],RAX MOV RAX,qword ptr [RBP + 0x20] SETZ byte ptr [RAX] LAB_0019f950: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019f974 MOV EAX,R14D ADD RSP,0x508 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019f974: CALL 0x0012a280
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,void *param_8,int8 param_9) { uint uVar1; ulong uVar2; int4 *puVar3; int iVar4; int unaff_R14D; long in_FS_OFFSET; int1 local_530 [8]; int8 local_528; long *local_520; long local_518; int4 local_510; int4 local_50c; byte *local_508; byte *local_500; int1 local_4f8 [1216]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (ulong)((*param_3 & 0x7f) << 8) | (ulong)param_3[1]; iVar4 = 0; if ((char)*param_3 < '\0') { iVar4 = *(int *)(*param_1 + 0x17c); } local_508 = param_3 + uVar2; local_500 = param_3 + (iVar4 + 2U); *param_7 = local_500; local_4f8[0] = 0; local_528 = param_4; local_520 = param_1; local_518 = param_2; local_510 = param_6; local_50c = param_5; if (iVar4 + 2U < (uint)uVar2) { do { uVar1 = (**(code **)(local_518 + 0x48))(local_518,iVar4,&local_500); if ((uVar1 == 0) || (local_508 < local_500)) { mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268)); puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x7e; unaff_R14D = 0x7fffffff; goto LAB_0019f950; } unaff_R14D = ha_key_cmp(*(int8 *)(local_518 + 0x28),local_4f8,local_528,local_50c, local_510,local_530); if (-1 < unaff_R14D) { if (unaff_R14D == 0) { memcpy(param_8,local_4f8,(ulong)uVar1); unaff_R14D = 0; } break; } memcpy(param_8,local_4f8,(ulong)uVar1); *param_7 = local_500; } while (local_500 < local_508); } *(bool *)param_9 = local_500 == local_508; LAB_0019f950: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return unaff_R14D; }
2,099
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_array(unsigned long)
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/input/json_sax.hpp
bool start_array(std::size_t len) { ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_array(unsigned long): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x90(%rsp), %rdi movq %rdi, 0x18(%rsp) movq %rdi, %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movb $0x2, 0x7f(%rsp) leaq 0x7f(%rsp), %rsi callq 0x86d30 movq 0x20(%rsp), %rdi movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rsi callq 0x86d00 xorl %eax, %eax cmpq $-0x1, 0x88(%rsp) movb %al, 0x2a(%rsp) je 0x86a1f movq 0x18(%rsp), %rdi movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) addq $0x8, %rdi callq 0x80ba0 movq (%rax), %rdi callq 0x80be0 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax seta %al movb %al, 0x2a(%rsp) movb 0x2a(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x86a30 jmp 0x86b0d movb $0x1, 0x2b(%rsp) movl $0x20, %edi callq 0x125d0 movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0x6b680 jmp 0x86a58 leaq 0x547d09(%rip), %rsi # 0x5ce768 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0x83810 jmp 0x86a70 movq 0x18(%rsp), %rdi addq $0x8, %rdi callq 0x80ba0 movq 0x8(%rsp), %rdi movq (%rax), %rcx movl $0x198, %esi # imm = 0x198 leaq 0x58(%rsp), %rdx callq 0x80c60 jmp 0x86a97 movq 0x8(%rsp), %rdi movb $0x0, 0x2b(%rsp) leaq 0x604f20(%rip), %rsi # 0x68b9c8 leaq -0x670f(%rip), %rdx # 0x803a0 callq 0x134c0 jmp 0x86b23 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0x86af8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0x86aee movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x58(%rsp), %rdi callq 0x13768 leaq 0x38(%rsp), %rdi callq 0x13768 testb $0x1, 0x2b(%rsp) jne 0x86b01 jmp 0x86b0b movq 0x8(%rsp), %rdi callq 0x12880 jmp 0x86b19 movb $0x1, %al andb $0x1, %al addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0x13540 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11start_arrayEm: sub rsp, 98h mov qword ptr [rsp+98h+var_8], rdi; char mov [rsp+98h+var_10], rsi; int mov rdi, qword ptr [rsp+98h+var_8] mov qword ptr [rsp+98h+var_80], rdi; char mov rax, rdi add rax, 8 mov qword ptr [rsp+98h+var_78], rax; int mov [rsp+98h+var_19], 2 lea rsi, [rsp+98h+var_19] call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&) mov rdi, qword ptr [rsp+98h+var_78] mov qword ptr [rsp+98h+var_18], rax; int lea rsi, [rsp+98h+var_18] call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backEOSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *&&) xor eax, eax cmp [rsp+98h+var_10], 0FFFFFFFFFFFFFFFFh mov [rsp+98h+var_6E], al jz short loc_86A1F mov rdi, qword ptr [rsp+98h+var_80] mov rax, [rsp+98h+var_10] mov qword ptr [rsp+98h+var_88], rax; int add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void) mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void) mov rcx, rax mov rax, qword ptr [rsp+98h+var_88] cmp rax, rcx setnbe al mov [rsp+98h+var_6E], al loc_86A1F: mov al, [rsp+98h+var_6E] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_86A30 jmp loc_86B0D loc_86A30: mov [rsp+98h+var_6D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+98h+var_90], rax; int mov rsi, [rsp+98h+var_10]; unsigned __int64 lea rdi, [rsp+98h+var_60]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_86A58: lea rsi, aExcessiveArray; "excessive array size: " lea rdi, [rsp+98h+var_40] lea rdx, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&) jmp short $+2 loc_86A70: mov rdi, qword ptr [rsp+98h+var_80] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void) mov rdi, [rsp+98h+var_90]; int mov rcx, [rax] mov esi, 198h lea rdx, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_86A97: mov rdi, [rsp+98h+var_90]; void * mov [rsp+98h+var_6D], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_86B23 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_86AF8 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_86AEE mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_86AEE: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_86AF8: test [rsp+arg_23], 1 jnz short loc_86B01 jmp short loc_86B0B loc_86B01: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_86B0B: jmp short loc_86B19 loc_86B0D: mov al, 1 and al, 1 add rsp, 98h retn loc_86B19: mov rdi, [rsp+arg_28] call __Unwind_Resume loc_86B23: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::start_array( long long a1, unsigned long long a2) { long long *v2; // rax long long *v3; // rax nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // [rsp+8h] [rbp-90h] unsigned long long v6; // [rsp+10h] [rbp-88h] bool v7; // [rsp+2Ah] [rbp-6Eh] _BYTE v8[32]; // [rsp+38h] [rbp-60h] BYREF _BYTE v9[39]; // [rsp+58h] [rbp-40h] BYREF char v10; // [rsp+7Fh] [rbp-19h] BYREF int v11[2]; // [rsp+80h] [rbp-18h] BYREF unsigned long long v12; // [rsp+88h] [rbp-10h] char v13[8]; // [rsp+90h] [rbp-8h] *(_QWORD *)v13 = a1; v12 = a2; v10 = 2; *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, &v10); std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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> *>>::push_back( a1 + 8, v11); v7 = 0; if ( v12 != -1LL ) { v6 = v12; v2 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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> *>>::back(a1 + 8); v7 = v6 > nlohmann::json_abi_v3_11_3::basic_json<std::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>::max_size(*v2); } if ( v7 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v8, v12); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>( (long long)v9, (long long)"excessive array size: ", (nlohmann::json_abi_v3_11_3::detail *)v8); v3 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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> *>>::back(a1 + 8); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408LL, (long long)v9, *v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return 1; }
start_array: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV RDI,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x7f],0x2 LEA RSI,[RSP + 0x7f] CALL 0x00186d30 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX LEA RSI,[RSP + 0x80] CALL 0x00186d00 XOR EAX,EAX CMP qword ptr [RSP + 0x88],-0x1 MOV byte ptr [RSP + 0x2a],AL JZ 0x00186a1f MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX ADD RDI,0x8 CALL 0x00180ba0 MOV RDI,qword ptr [RAX] CALL 0x00180be0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX SETA AL MOV byte ptr [RSP + 0x2a],AL LAB_00186a1f: MOV AL,byte ptr [RSP + 0x2a] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x00186a30 JMP 0x00186b0d LAB_00186a30: MOV byte ptr [RSP + 0x2b],0x1 MOV EDI,0x20 CALL 0x001125d0 MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x88] LAB_00186a4c: LEA RDI,[RSP + 0x38] CALL 0x0016b680 JMP 0x00186a58 LAB_00186a58: LEA RSI,[0x6ce768] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x38] CALL 0x00183810 JMP 0x00186a70 LAB_00186a70: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x00180ba0 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_00186a86: MOV ESI,0x198 LEA RDX,[RSP + 0x58] CALL 0x00180c60 JMP 0x00186a97 LAB_00186a97: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2b],0x0 LEA RSI,[0x78b9c8] LEA RDX,[0x1803a0] CALL 0x001134c0 LAB_00186b0d: MOV AL,0x1 AND AL,0x1 ADD RSP,0x98 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::start_array(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::start_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong param_1) { bool bVar1; ulong uVar2; int8 *puVar3; ulong uVar4; int7 uVar6; int8 uVar5; __cxx11 local_60 [32]; detail local_40 [39]; value_t local_19; basic_json *local_18; ulong local_10; json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_8; local_19 = 2; local_10 = param_1; local_8 = this; local_18 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_19); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8),&local_18); uVar2 = local_10; uVar6 = 0; bVar1 = false; if (local_10 != 0xffffffffffffffff) { puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar4 = basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::max_size((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar3); bVar1 = uVar4 < uVar2; uVar6 = (int7)(uVar2 >> 8); } if (!bVar1) { return CONCAT71(uVar6,1); } uVar5 = __cxa_allocate_exception(0x20); /* try { // try from 00186a4c to 00186a55 has its CatchHandler @ 00186ab6 */ std::__cxx11::to_string(local_60,local_10); /* try { // try from 00186a58 to 00186a6d has its CatchHandler @ 00186ac6 */ concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string> (local_40,"excessive array size: ",(string *)local_60); puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); /* try { // try from 00186a86 to 00186ab3 has its CatchHandler @ 00186ad6 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0x198,local_40,*puVar3); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&out_of_range::typeinfo,out_of_range::~out_of_range); }