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
11,000
lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document*)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
SVGSVGElement::SVGSVGElement(Document* document) : SVGGraphicsElement(document, ElementID::Svg) , SVGFitToViewBox(this) , m_x(PropertyID::X, LengthDirection::Horizontal, LengthNegativeMode::Allow, 0.f, LengthUnits::None) , m_y(PropertyID::Y, LengthDirection::Vertical, LengthNegativeMode::Allow, 0.f, LengthUnits::None) , m_width(PropertyID::Width, LengthDirection::Horizontal, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent) , m_height(PropertyID::Height, LengthDirection::Vertical, LengthNegativeMode::Forbid, 100.f, LengthUnits::Percent) { addProperty(m_x); addProperty(m_y); addProperty(m_width); addProperty(m_height); }
O1
cpp
lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x14, %edx callq 0x102f8 leaq 0x48349(%rip), %r14 # 0x58958 movq %r14, (%rbx) leaq 0x98(%rbx), %rdi movq %rbx, %rsi callq 0x1007e movq %r14, (%rbx) leaq 0xd0(%rbx), %r14 movq %r14, %rdi movl $0x4b, %esi callq 0x1f3bc leaq 0x4a7d1(%rip), %rbp # 0x5ae10 addq $0x10, %rbp movq %rbp, 0xd0(%rbx) movw $0x0, 0xd9(%rbx) movl $0x0, 0xdc(%rbx) movb $0x0, 0xe0(%rbx) leaq 0xe8(%rbx), %r13 movq %r13, %rdi movl $0x4e, %esi callq 0x1f3bc movq %rbp, 0xe8(%rbx) movw $0x1, 0xf1(%rbx) movl $0x0, 0xf4(%rbx) movb $0x0, 0xf8(%rbx) leaq 0x100(%rbx), %r12 movq %r12, %rdi movl $0x4a, %esi callq 0x1f3bc movq %rbp, 0x100(%rbx) movw $0x100, 0x109(%rbx) # imm = 0x100 movl $0x42c80000, 0x10c(%rbx) # imm = 0x42C80000 movb $0x1, 0x110(%rbx) leaq 0x118(%rbx), %r15 movq %r15, %rdi movl $0x1b, %esi callq 0x1f3bc movq %rbp, 0x118(%rbx) movw $0x101, 0x121(%rbx) # imm = 0x101 movl $0x42c80000, 0x124(%rbx) # imm = 0x42C80000 movb $0x1, 0x128(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r14, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r13, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r12, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) movl $0x10, %edi callq 0xa310 movq $0x0, (%rax) movq %r15, 0x8(%rax) movq 0x50(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x50(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1079c jmp 0x1079c jmp 0x1079c jmp 0x1079c jmp 0x1079c movq %rax, %r14 movq %rbx, %rdi callq 0xc5b2 movq %r14, %rdi callq 0xa5c0 nop
_ZN7lunasvg13SVGSVGElementC2EPNS_8DocumentE: push rbp; Alternative name is 'lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document *)' push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov edx, 14h call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) lea r14, off_58958 mov [rbx], r14 lea rdi, [rbx+98h]; this mov rsi, rbx; lunasvg::SVGElement * call _ZN7lunasvg15SVGFitToViewBoxC2EPNS_10SVGElementE; lunasvg::SVGFitToViewBox::SVGFitToViewBox(lunasvg::SVGElement *) mov [rbx], r14 lea r14, [rbx+0D0h] mov rdi, r14 mov esi, 4Bh ; 'K' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) lea rbp, _ZTVN7lunasvg9SVGLengthE; `vtable for'lunasvg::SVGLength add rbp, 10h mov [rbx+0D0h], rbp mov word ptr [rbx+0D9h], 0 mov dword ptr [rbx+0DCh], 0 mov byte ptr [rbx+0E0h], 0 lea r13, [rbx+0E8h] mov rdi, r13 mov esi, 4Eh ; 'N' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) mov [rbx+0E8h], rbp mov word ptr [rbx+0F1h], 1 mov dword ptr [rbx+0F4h], 0 mov byte ptr [rbx+0F8h], 0 lea r12, [rbx+100h] mov rdi, r12 mov esi, 4Ah ; 'J' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) mov [rbx+100h], rbp mov word ptr [rbx+109h], 100h mov dword ptr [rbx+10Ch], 42C80000h mov byte ptr [rbx+110h], 1 lea r15, [rbx+118h] mov rdi, r15 mov esi, 1Bh call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) mov [rbx+118h], rbp mov word ptr [rbx+121h], 101h mov dword ptr [rbx+124h], 42C80000h mov byte ptr [rbx+128h], 1 mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r14 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r13 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r12 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov qword ptr [rax], 0 mov [rax+8], r15 mov rcx, [rbx+50h] mov [rax], rcx mov [rbx+50h], rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_1079C jmp short loc_1079C jmp short loc_1079C jmp short loc_1079C jmp short $+2 loc_1079C: mov r14, rax mov rdi, rbx; this call _ZN7lunasvg10SVGElementD2Ev; lunasvg::SVGElement::~SVGElement() mov rdi, r14 call __Unwind_Resume
_QWORD * lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::SVGSVGElement *this, lunasvg::Document *a2) { _QWORD *v2; // rax _QWORD *v3; // rax _QWORD *v4; // rax _QWORD *result; // rax lunasvg::SVGGraphicsElement::SVGGraphicsElement((long long)this, (long long)a2, 20); *(_QWORD *)this = off_58958; lunasvg::SVGFitToViewBox::SVGFitToViewBox((lunasvg::SVGSVGElement *)((char *)this + 152), this); *(_QWORD *)this = off_58958; lunasvg::SVGProperty::SVGProperty((char *)this + 208, 75LL); *((_QWORD *)this + 26) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 217) = 0; *((_DWORD *)this + 55) = 0; *((_BYTE *)this + 224) = 0; lunasvg::SVGProperty::SVGProperty((char *)this + 232, 78LL); *((_QWORD *)this + 29) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 241) = 1; *((_DWORD *)this + 61) = 0; *((_BYTE *)this + 248) = 0; lunasvg::SVGProperty::SVGProperty((char *)this + 256, 74LL); *((_QWORD *)this + 32) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 265) = 256; *((_DWORD *)this + 67) = 1120403456; *((_BYTE *)this + 272) = 1; lunasvg::SVGProperty::SVGProperty((char *)this + 280, 27LL); *((_QWORD *)this + 35) = &`vtable for'lunasvg::SVGLength + 2; *(_WORD *)((char *)this + 289) = 257; *((_DWORD *)this + 73) = 1120403456; *((_BYTE *)this + 296) = 1; v2 = (_QWORD *)operator new(0x10uLL); *v2 = 0LL; v2[1] = (char *)this + 208; *v2 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v2; v3 = (_QWORD *)operator new(0x10uLL); *v3 = 0LL; v3[1] = (char *)this + 232; *v3 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v3; v4 = (_QWORD *)operator new(0x10uLL); *v4 = 0LL; v4[1] = (char *)this + 256; *v4 = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v4; result = (_QWORD *)operator new(0x10uLL); *result = 0LL; result[1] = (char *)this + 280; *result = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = result; return result; }
SVGSVGElement: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV EDX,0x14 CALL 0x001102f8 LEA R14,[0x158958] MOV qword ptr [RBX],R14 LEA RDI,[RBX + 0x98] LAB_00110619: MOV RSI,RBX CALL 0x0011007e MOV qword ptr [RBX],R14 LEA R14,[RBX + 0xd0] LAB_0011062b: MOV RDI,R14 MOV ESI,0x4b CALL 0x0011f3bc LEA RBP,[0x15ae10] ADD RBP,0x10 MOV qword ptr [RBX + 0xd0],RBP MOV word ptr [RBX + 0xd9],0x0 MOV dword ptr [RBX + 0xdc],0x0 MOV byte ptr [RBX + 0xe0],0x0 LEA R13,[RBX + 0xe8] LAB_0011066b: MOV RDI,R13 MOV ESI,0x4e CALL 0x0011f3bc MOV qword ptr [RBX + 0xe8],RBP MOV word ptr [RBX + 0xf1],0x1 MOV dword ptr [RBX + 0xf4],0x0 MOV byte ptr [RBX + 0xf8],0x0 LEA R12,[RBX + 0x100] LAB_001106a0: MOV RDI,R12 MOV ESI,0x4a CALL 0x0011f3bc MOV qword ptr [RBX + 0x100],RBP MOV word ptr [RBX + 0x109],0x100 MOV dword ptr [RBX + 0x10c],0x42c80000 MOV byte ptr [RBX + 0x110],0x1 LEA R15,[RBX + 0x118] LAB_001106d5: MOV RDI,R15 MOV ESI,0x1b CALL 0x0011f3bc MOV qword ptr [RBX + 0x118],RBP MOV word ptr [RBX + 0x121],0x101 MOV dword ptr [RBX + 0x124],0x42c80000 MOV byte ptr [RBX + 0x128],0x1 LAB_00110703: MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R14 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R13 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R12 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX MOV EDI,0x10 CALL 0x0010a310 LAB_0011076d: MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],R15 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x50],RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document*) */ void __thiscall lunasvg::SVGSVGElement::SVGSVGElement(SVGSVGElement *this,Document *param_1) { int8 *puVar1; SVGGraphicsElement::SVGGraphicsElement((SVGGraphicsElement *)this,param_1,0x14); *(int ***)this = &PTR__SVGSVGElement_00158958; /* try { // try from 00110619 to 00110620 has its CatchHandler @ 0011079a */ SVGFitToViewBox::SVGFitToViewBox((SVGFitToViewBox *)(this + 0x98),(SVGElement *)this); *(int ***)this = &PTR__SVGSVGElement_00158958; /* try { // try from 0011062b to 00110637 has its CatchHandler @ 00110798 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xd0),0x4b); *(int ***)(this + 0xd0) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0xd9) = 0; *(int4 *)(this + 0xdc) = 0; this[0xe0] = (SVGSVGElement)0x0; /* try { // try from 0011066b to 00110677 has its CatchHandler @ 00110796 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xe8),0x4e); *(int ***)(this + 0xe8) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0xf1) = 1; *(int4 *)(this + 0xf4) = 0; this[0xf8] = (SVGSVGElement)0x0; /* try { // try from 001106a0 to 001106ac has its CatchHandler @ 00110794 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0x100),0x4a); *(int ***)(this + 0x100) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0x109) = 0x100; *(int4 *)(this + 0x10c) = 0x42c80000; this[0x110] = (SVGSVGElement)0x1; /* try { // try from 001106d5 to 001106e1 has its CatchHandler @ 00110792 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0x118),0x1b); *(int ***)(this + 0x118) = &PTR__SVGProperty_0015ae20; *(int2 *)(this + 0x121) = 0x101; *(int4 *)(this + 0x124) = 0x42c80000; this[0x128] = (SVGSVGElement)0x1; /* try { // try from 00110703 to 0011076c has its CatchHandler @ 0011079c */ puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0xd0); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0xe8); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0x100); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; puVar1 = (int8 *)operator_new(0x10); *puVar1 = 0; puVar1[1] = (SVGProperty *)(this + 0x118); *puVar1 = *(int8 *)(this + 0x50); *(int8 **)(this + 0x50) = puVar1; return; }
11,001
list_add
eloqsql/mysys/list.c
LIST *list_add(LIST *root, LIST *element) { DBUG_ENTER("list_add"); DBUG_PRINT("enter",("root: %p element: %p", root, element)); if (root) { if (root->prev) /* If add in mid of list */ root->prev->next= element; element->prev=root->prev; root->prev=element; } else element->prev=0; element->next=root; DBUG_RETURN(element); /* New root */ }
O0
c
list_add: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe122e cmpq $0x0, -0x8(%rbp) je 0xe1269 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0xe124e movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) jmp 0xe1274 movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax popq %rbp retq nop
list_add: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E122E: cmp [rbp+var_8], 0 jz short loc_E1269 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_E124E mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx loc_E124E: mov rax, [rbp+var_8] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx jmp short loc_E1274 loc_E1269: mov rax, [rbp+var_10] mov qword ptr [rax], 0 loc_E1274: mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rax, [rbp+var_18] pop rbp retn
_QWORD * list_add(long long a1, _QWORD *a2) { if ( a1 ) { if ( *(_QWORD *)a1 ) *(_QWORD *)(*(_QWORD *)a1 + 8LL) = a2; *a2 = *(_QWORD *)a1; *(_QWORD *)a1 = a2; } else { *a2 = 0LL; } a2[1] = a1; return a2; }
list_add: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e122e LAB_001e122e: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001e1269 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001e124e MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_001e124e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX JMP 0x001e1274 LAB_001e1269: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_001e1274: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
long * list_add(long *param_1,long *param_2) { if (param_1 == (long *)0x0) { *param_2 = 0; } else { if (*param_1 != 0) { *(long **)(*param_1 + 8) = param_2; } *param_2 = *param_1; *param_1 = (long)param_2; } param_2[1] = (long)param_1; return param_2; }
11,002
my_read
eloqsql/mysys/my_read.c
size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags) { size_t readbytes, save_count= 0; DBUG_ENTER("my_read"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; for (;;) { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #ifdef _WIN32 readbytes= my_win_read(Filedes, Buffer, Count); #else readbytes= read(Filedes, Buffer, Count); #endif DBUG_EXECUTE_IF ("simulate_file_read_error", { errno= ENOSPC; readbytes= (size_t) -1; DBUG_SET("-d,simulate_file_read_error"); DBUG_SET("-d,simulate_my_b_fill_error"); }); if (readbytes != Count) { int got_errno= my_errno= errno; DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d", (int) readbytes, (ulong) Count, Filedes, got_errno)); if (got_errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) my_errno= HA_ERR_FILE_TOO_SHORT; if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR) { DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld", (long) readbytes)); continue; /* Interrupted */ } /* Do a read retry if we didn't get enough data on first read */ if (readbytes != (size_t) -1 && readbytes != 0 && (MyFlags & MY_FULL_IO)) { Buffer+= readbytes; Count-= readbytes; save_count+= readbytes; continue; } if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (readbytes == (size_t) -1) my_error(EE_READ, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes), got_errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes), got_errno); } if (readbytes == (size_t) -1 || ((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO))) DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) readbytes= 0; /* Ok on read */ else readbytes+= save_count; break; } DBUG_RETURN(readbytes); }
O0
c
my_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq $0x0, -0x38(%rbp) jmp 0x2fde1 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax jne 0x2fe01 leaq 0x355f92(%rip), %rax # 0x385d88 movq (%rax), %rax orq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x2fe03 callq 0x24040 movl $0x0, (%rax) movl -0xc(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x24410 movq %rax, -0x30(%rbp) jmp 0x2fe24 movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x2ff99 callq 0x24040 movl (%rax), %eax movl %eax, -0x40(%rbp) callq 0x26ab0 movq %rax, %rcx movl -0x40(%rbp), %eax movl %eax, (%rcx) movl %eax, -0x3c(%rbp) jmp 0x2fe4e cmpl $0x0, -0x3c(%rbp) je 0x2fe69 cmpq $-0x1, -0x30(%rbp) je 0x2fe74 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x2fe74 callq 0x26ab0 movl $0xaf, (%rax) cmpq $0x0, -0x30(%rbp) je 0x2fe84 movq -0x30(%rbp), %rax cmpl $-0x1, %eax jne 0x2fe93 cmpl $0x4, -0x3c(%rbp) jne 0x2fe93 jmp 0x2fe8c jmp 0x2fe8e jmp 0x2fe03 cmpq $-0x1, -0x30(%rbp) je 0x2fedd cmpq $0x0, -0x30(%rbp) je 0x2fedd movq -0x28(%rbp), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax je 0x2fedd movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x2fe03 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0x2ff66 cmpq $-0x1, -0x30(%rbp) jne 0x2ff24 movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x48(%rbp) movl -0xc(%rbp), %edi callq 0x34390 movq -0x48(%rbp), %rsi movq %rax, %rdx movl -0x3c(%rbp), %ecx movl $0x2, %edi movb $0x0, %al callq 0x2e5f0 jmp 0x2ff64 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x2ff62 movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x50(%rbp) movl -0xc(%rbp), %edi callq 0x34390 movq -0x50(%rbp), %rsi movq %rax, %rdx movl -0x3c(%rbp), %ecx movl $0x9, %edi movb $0x0, %al callq 0x2e5f0 jmp 0x2ff64 jmp 0x2ff66 cmpq $-0x1, -0x30(%rbp) je 0x2ff8b movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x2ff97 movq -0x28(%rbp), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax jne 0x2ff97 jmp 0x2ff8d movq $-0x1, -0x8(%rbp) jmp 0x2ffc9 jmp 0x2ff99 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x2ffb1 movq $0x0, -0x30(%rbp) jmp 0x2ffbd movq -0x38(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x2ffbf jmp 0x2ffc1 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_read: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_38], 0 jmp short $+2 loc_2FDE1: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jnz short loc_2FE01 lea rax, my_global_flags mov rax, [rax] or rax, [rbp+var_28] mov [rbp+var_28], rax loc_2FE01: jmp short $+2 loc_2FE03: call ___errno_location mov dword ptr [rax], 0 mov edi, [rbp+var_C] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _read mov [rbp+var_30], rax jmp short $+2 loc_2FE24: mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jz loc_2FF99 call ___errno_location mov eax, [rax] mov [rbp+var_40], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_40] mov [rcx], eax mov [rbp+var_3C], eax jmp short $+2 loc_2FE4E: cmp [rbp+var_3C], 0 jz short loc_2FE69 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_2FE74 mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_2FE74 loc_2FE69: call _my_thread_var mov dword ptr [rax], 0AFh loc_2FE74: cmp [rbp+var_30], 0 jz short loc_2FE84 mov rax, [rbp+var_30] cmp eax, 0FFFFFFFFh jnz short loc_2FE93 loc_2FE84: cmp [rbp+var_3C], 4 jnz short loc_2FE93 jmp short $+2 loc_2FE8C: jmp short $+2 loc_2FE8E: jmp loc_2FE03 loc_2FE93: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_2FEDD cmp [rbp+var_30], 0 jz short loc_2FEDD mov rax, [rbp+var_28] and rax, 200h cmp rax, 0 jz short loc_2FEDD mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax jmp loc_2FE03 loc_2FEDD: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz short loc_2FF66 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jnz short loc_2FF24 mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_48], rax mov edi, [rbp+var_C] call my_filename mov rsi, [rbp+var_48] mov rdx, rax mov ecx, [rbp+var_3C] mov edi, 2 mov al, 0 call my_error jmp short loc_2FF64 loc_2FF24: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_2FF62 mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_50], rax mov edi, [rbp+var_C] call my_filename mov rsi, [rbp+var_50] mov rdx, rax mov ecx, [rbp+var_3C] mov edi, 9 mov al, 0 call my_error loc_2FF62: jmp short $+2 loc_2FF64: jmp short $+2 loc_2FF66: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_2FF8B mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_2FF97 mov rax, [rbp+var_28] and rax, 200h cmp rax, 0 jnz short loc_2FF97 loc_2FF8B: jmp short $+2 loc_2FF8D: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_2FFC9 loc_2FF97: jmp short $+2 loc_2FF99: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_2FFB1 mov [rbp+var_30], 0 jmp short loc_2FFBD loc_2FFB1: mov rax, [rbp+var_38] add rax, [rbp+var_30] mov [rbp+var_30], rax loc_2FFBD: jmp short $+2 loc_2FFBF: jmp short $+2 loc_2FFC1: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_2FFC9: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_read(unsigned int a1, long long a2, long long a3, __int16 a4) { long long v4; // rax long long v5; // rax unsigned int v7; // [rsp+10h] [rbp-40h] long long v8; // [rsp+18h] [rbp-38h] long long v9; // [rsp+20h] [rbp-30h] __int16 v11; // [rsp+28h] [rbp-28h] v11 = a4; v8 = 0LL; if ( (a4 & 0x1A) == 0 ) v11 = a4 | my_global_flags; while ( 1 ) { *(_DWORD *)__errno_location() = 0; v9 = read(a1, a2, a3); if ( v9 == a3 ) break; v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v7; if ( !v7 || v9 != -1 && (v11 & 6) != 0 ) *(_DWORD *)my_thread_var() = 175; if ( v9 && (_DWORD)v9 != -1 || v7 != 4 ) { if ( v9 == -1 || !v9 || (v11 & 0x200) == 0 ) { if ( (v11 & 0x1A) != 0 ) { if ( v9 == -1 ) { v4 = my_filename(a1); my_error(2u, v11 & 0x440 | 4LL, v4, v7); } else if ( (v11 & 6) != 0 ) { v5 = my_filename(a1); my_error(9u, v11 & 0x440 | 4LL, v5, v7); } } if ( v9 == -1 || (v11 & 6) != 0 && (v11 & 0x200) == 0 ) return -1LL; break; } a2 += v9; a3 -= v9; v8 += v9; } } if ( (v11 & 6) != 0 ) return 0LL; else return v9 + v8; }
my_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x38],0x0 JMP 0x0012fde1 LAB_0012fde1: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JNZ 0x0012fe01 LEA RAX,[0x485d88] MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_0012fe01: JMP 0x0012fe03 LAB_0012fe03: CALL 0x00124040 MOV dword ptr [RAX],0x0 MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00124410 MOV qword ptr [RBP + -0x30],RAX JMP 0x0012fe24 LAB_0012fe24: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0012ff99 CALL 0x00124040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX CALL 0x00126ab0 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RCX],EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x0012fe4e LAB_0012fe4e: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0012fe69 CMP qword ptr [RBP + -0x30],-0x1 JZ 0x0012fe74 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x0012fe74 LAB_0012fe69: CALL 0x00126ab0 MOV dword ptr [RAX],0xaf LAB_0012fe74: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0012fe84 MOV RAX,qword ptr [RBP + -0x30] CMP EAX,-0x1 JNZ 0x0012fe93 LAB_0012fe84: CMP dword ptr [RBP + -0x3c],0x4 JNZ 0x0012fe93 JMP 0x0012fe8c LAB_0012fe8c: JMP 0x0012fe8e LAB_0012fe8e: JMP 0x0012fe03 LAB_0012fe93: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x0012fedd CMP qword ptr [RBP + -0x30],0x0 JZ 0x0012fedd MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x200 CMP RAX,0x0 JZ 0x0012fedd MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX JMP 0x0012fe03 LAB_0012fedd: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x0012ff66 CMP qword ptr [RBP + -0x30],-0x1 JNZ 0x0012ff24 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x48],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x00134390 MOV RSI,qword ptr [RBP + -0x48] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EDI,0x2 MOV AL,0x0 CALL 0x0012e5f0 JMP 0x0012ff64 LAB_0012ff24: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x0012ff62 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x50],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x00134390 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EDI,0x9 MOV AL,0x0 CALL 0x0012e5f0 LAB_0012ff62: JMP 0x0012ff64 LAB_0012ff64: JMP 0x0012ff66 LAB_0012ff66: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x0012ff8b MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x0012ff97 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x200 CMP RAX,0x0 JNZ 0x0012ff97 LAB_0012ff8b: JMP 0x0012ff8d LAB_0012ff8d: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0012ffc9 LAB_0012ff97: JMP 0x0012ff99 LAB_0012ff99: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x0012ffb1 MOV qword ptr [RBP + -0x30],0x0 JMP 0x0012ffbd LAB_0012ffb1: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX LAB_0012ffbd: JMP 0x0012ffbf LAB_0012ffbf: JMP 0x0012ffc1 LAB_0012ffc1: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0012ffc9: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; int *piVar2; size_t sVar3; int4 *puVar4; int8 uVar5; long local_40; long local_38; ulong local_30; size_t local_28; void *local_20; local_40 = 0; local_28 = param_3; local_20 = param_2; local_30 = param_4; if ((param_4 & 0x1a) == 0) { local_30 = my_global_flags | param_4; } do { do { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = read(param_1,local_20,local_28); if (sVar3 == local_28) { LAB_0012ff99: if ((local_30 & 6) == 0) { local_38 = local_40 + sVar3; } else { local_38 = 0; } return local_38; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((iVar1 == 0) || ((sVar3 != 0xffffffffffffffff && ((local_30 & 6) != 0)))) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xaf; } } while (((sVar3 == 0) || ((int)sVar3 == -1)) && (iVar1 == 4)); if (((sVar3 == 0xffffffffffffffff) || (sVar3 == 0)) || ((local_30 & 0x200) == 0)) { if ((local_30 & 0x1a) != 0) { if (sVar3 == 0xffffffffffffffff) { uVar5 = my_filename(param_1); my_error(2,local_30 & 0x440 | 4,uVar5,iVar1); } else if ((local_30 & 6) != 0) { uVar5 = my_filename(param_1); my_error(9,local_30 & 0x440 | 4,uVar5,iVar1); } } if ((sVar3 == 0xffffffffffffffff) || (((local_30 & 6) != 0 && ((local_30 & 0x200) == 0)))) { return -1; } goto LAB_0012ff99; } local_20 = (void *)(sVar3 + (long)local_20); local_28 = local_28 - sVar3; local_40 = sVar3 + local_40; } while( true ); }
11,003
blst_scalar_from_uint32
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c
void blst_scalar_from_uint32(pow256 ret, const unsigned int a[8]) { 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 = a[i]; *ret++ = (byte)w; *ret++ = (byte)(w >> 8); *ret++ = (byte)(w >> 16); *ret++ = (byte)(w >> 24); } }
O1
c
blst_scalar_from_uint32: pushq %rbp movq %rsp, %rbp cmpq %rsi, %rdi je 0x69e70 xorl %eax, %eax movl (%rsi,%rax,4), %ecx movl %ecx, (%rdi,%rax,4) incq %rax cmpq $0x8, %rax jne 0x69e61 popq %rbp retq
blst_scalar_from_uint32: push rbp mov rbp, rsp cmp rdi, rsi jz short loc_69E70 xor eax, eax loc_69E61: mov ecx, [rsi+rax*4] mov [rdi+rax*4], ecx inc rax cmp rax, 8 jnz short loc_69E61 loc_69E70: pop rbp retn
void blst_scalar_from_uint32(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_scalar_from_uint32: PUSH RBP MOV RBP,RSP CMP RDI,RSI JZ 0x00169e70 XOR EAX,EAX LAB_00169e61: MOV ECX,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDI + RAX*0x4],ECX INC RAX CMP RAX,0x8 JNZ 0x00169e61 LAB_00169e70: POP RBP RET
void blst_scalar_from_uint32(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; }
11,004
ggml_conv_transpose_2d_p0
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_conv_transpose_2d_p0( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int stride) { GGML_ASSERT(a->ne[3] == b->ne[2]); const int64_t ne[4] = { ggml_calc_conv_transpose_output_size(b->ne[0], a->ne[0], stride, 0 /*p0*/), ggml_calc_conv_transpose_output_size(b->ne[1], a->ne[1], stride, 0 /*p1*/), a->ne[2], b->ne[3], }; struct ggml_tensor* result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); ggml_set_op_params_i32(result, 0, stride); result->op = GGML_OP_CONV_TRANSPOSE_2D; result->src[0] = a; result->src[1] = b; return result; }
O0
c
ggml_conv_transpose_2d_p0: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movq 0x48(%rsp), %rax movq 0x28(%rax), %rax movq 0x40(%rsp), %rcx cmpq 0x20(%rcx), %rax je 0x50fec leaq 0x635e5(%rip), %rdi # 0xb45b7 movl $0x1011, %esi # imm = 0x1011 leaq 0x63624(%rip), %rdx # 0xb4602 leaq 0x63d2d(%rip), %rcx # 0xb4d12 movb $0x0, %al callq 0x46780 movq 0x40(%rsp), %rax movq 0x10(%rax), %rdi movq 0x48(%rsp), %rax movq 0x10(%rax), %rsi movl 0x3c(%rsp), %edx xorl %ecx, %ecx callq 0x510b0 movq %rax, 0x10(%rsp) movq 0x40(%rsp), %rax movq 0x18(%rax), %rdi movq 0x48(%rsp), %rax movq 0x18(%rax), %rsi movl 0x3c(%rsp), %edx xorl %ecx, %ecx callq 0x510b0 movq %rax, 0x18(%rsp) movq 0x48(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x20(%rsp) movq 0x40(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x28(%rsp) movq 0x50(%rsp), %rdi leaq 0x10(%rsp), %rcx xorl %esi, %esi movl $0x4, %edx callq 0x40500 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi movl 0x3c(%rsp), %edx xorl %esi, %esi callq 0x4c120 movq 0x8(%rsp), %rax movl $0x34, 0x50(%rax) movq 0x48(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x40(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0xa0(%rax) movq 0x8(%rsp), %rax addq $0x58, %rsp retq nop
ggml_conv_transpose_2d_p0: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_1C], ecx mov rax, [rsp+58h+var_10] mov rax, [rax+28h] mov rcx, [rsp+58h+var_18] cmp rax, [rcx+20h] jz short loc_50FEC lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 1011h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe3BNe2; "a->ne[3] == b->ne[2]" mov al, 0 call _ggml_abort loc_50FEC: mov rax, [rsp+58h+var_18] mov rdi, [rax+10h] mov rax, [rsp+58h+var_10] mov rsi, [rax+10h] mov edx, [rsp+58h+var_1C] xor ecx, ecx call ggml_calc_conv_transpose_output_size mov [rsp+58h+var_48], rax mov rax, [rsp+58h+var_18] mov rdi, [rax+18h] mov rax, [rsp+58h+var_10] mov rsi, [rax+18h] mov edx, [rsp+58h+var_1C] xor ecx, ecx call ggml_calc_conv_transpose_output_size mov [rsp+58h+var_40], rax mov rax, [rsp+58h+var_10] mov rax, [rax+20h] mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_18] mov rax, [rax+28h] mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_8] lea rcx, [rsp+58h+var_48] xor esi, esi mov edx, 4 call _ggml_new_tensor mov [rsp+58h+var_50], rax mov rdi, [rsp+58h+var_50] mov edx, [rsp+58h+var_1C] xor esi, esi call ggml_set_op_params_i32 mov rax, [rsp+58h+var_50] mov dword ptr [rax+50h], 34h ; '4' mov rcx, [rsp+58h+var_10] mov rax, [rsp+58h+var_50] mov [rax+98h], rcx mov rcx, [rsp+58h+var_18] mov rax, [rsp+58h+var_50] mov [rax+0A0h], rcx mov rax, [rsp+58h+var_50] add rsp, 58h retn
long long ggml_conv_transpose_2d_p0(long long a1, _QWORD *a2, _QWORD *a3, unsigned int a4) { long long v5; // [rsp+8h] [rbp-50h] _QWORD v6[5]; // [rsp+10h] [rbp-48h] BYREF unsigned int v7; // [rsp+3Ch] [rbp-1Ch] _QWORD *v8; // [rsp+40h] [rbp-18h] _QWORD *v9; // [rsp+48h] [rbp-10h] long long v10; // [rsp+50h] [rbp-8h] v10 = a1; v9 = a2; v8 = a3; v7 = a4; if ( a2[5] != a3[4] ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4113, (long long)"GGML_ASSERT(%s) failed", "a->ne[3] == b->ne[2]"); v6[0] = ggml_calc_conv_transpose_output_size(v8[2], v9[2], v7, 0LL); v6[1] = ggml_calc_conv_transpose_output_size(v8[3], v9[3], v7, 0LL); v6[2] = v9[4]; v6[3] = v8[5]; v5 = ggml_new_tensor(v10, 0, 4u, (long long)v6); ggml_set_op_params_i32(v5, 0, v7); *(_DWORD *)(v5 + 80) = 52; *(_QWORD *)(v5 + 152) = v9; *(_QWORD *)(v5 + 160) = v8; return v5; }
ggml_conv_transpose_2d_p0: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV dword ptr [RSP + 0x3c],ECX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [RCX + 0x20] JZ 0x00150fec LEA RDI,[0x1b45b7] MOV ESI,0x1011 LEA RDX,[0x1b4602] LEA RCX,[0x1b4d12] MOV AL,0x0 CALL 0x00146780 LAB_00150fec: MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RAX + 0x10] MOV EDX,dword ptr [RSP + 0x3c] XOR ECX,ECX CALL 0x001510b0 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RAX + 0x18] MOV EDX,dword ptr [RSP + 0x3c] XOR ECX,ECX CALL 0x001510b0 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x50] LEA RCX,[RSP + 0x10] XOR ESI,ESI MOV EDX,0x4 CALL 0x00140500 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x3c] XOR ESI,ESI CALL 0x0014c120 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x50],0x34 MOV RCX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x58 RET
long ggml_conv_transpose_2d_p0(int8 param_1,long param_2,long param_3,int4 param_4) { long lVar1; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int4 local_1c; long local_18; long local_10; int8 local_8; local_1c = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; if (*(long *)(param_2 + 0x28) != *(long *)(param_3 + 0x20)) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x1011, "GGML_ASSERT(%s) failed","a->ne[3] == b->ne[2]"); } local_48 = ggml_calc_conv_transpose_output_size (*(int8 *)(local_18 + 0x10),*(int8 *)(local_10 + 0x10),local_1c,0 ); local_40 = ggml_calc_conv_transpose_output_size (*(int8 *)(local_18 + 0x18),*(int8 *)(local_10 + 0x18),local_1c,0 ); local_38 = *(int8 *)(local_10 + 0x20); local_30 = *(int8 *)(local_18 + 0x28); lVar1 = ggml_new_tensor(local_8,0,4,&local_48); ggml_set_op_params_i32(lVar1,0,local_1c); *(int4 *)(lVar1 + 0x50) = 0x34; *(long *)(lVar1 + 0x98) = local_10; *(long *)(lVar1 + 0xa0) = local_18; return lVar1; }
11,005
ggml_conv_transpose_2d_p0
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_conv_transpose_2d_p0( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int stride) { GGML_ASSERT(a->ne[3] == b->ne[2]); const int64_t ne[4] = { ggml_calc_conv_transpose_output_size(b->ne[0], a->ne[0], stride, 0 /*p0*/), ggml_calc_conv_transpose_output_size(b->ne[1], a->ne[1], stride, 0 /*p1*/), a->ne[2], b->ne[3], }; struct ggml_tensor* result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); ggml_set_op_params_i32(result, 0, stride); result->op = GGML_OP_CONV_TRANSPOSE_2D; result->src[0] = a; result->src[1] = b; return result; }
O2
c
ggml_conv_transpose_2d_p0: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq 0x28(%rsi), %rax cmpq 0x20(%rdx), %rax jne 0x2377b movq %rdx, %rbx movq %rsi, %r14 movq 0x10(%rdx), %rax decq %rax movslq %ecx, %r15 imulq %r15, %rax addq 0x10(%rsi), %rax movq %rsp, %rcx movq %rax, (%rcx) movq 0x18(%rdx), %rax decq %rax imulq %r15, %rax addq 0x18(%rsi), %rax movq %rax, 0x8(%rcx) movq 0x20(%rsi), %rax movq %rax, 0x10(%rcx) movq 0x28(%rdx), %rax movq %rax, 0x18(%rcx) pushq $0x4 popq %rdx xorl %esi, %esi callq 0x1c230 movl %r15d, 0x54(%rax) movl $0x34, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x27e01(%rip), %rdi # 0x4b583 leaq 0x27e45(%rip), %rdx # 0x4b5ce leaq 0x2850f(%rip), %rcx # 0x4bc9f movl $0x1011, %esi # imm = 0x1011 xorl %eax, %eax callq 0x1e770
ggml_conv_transpose_2d_p0: push r15 push r14 push rbx sub rsp, 20h mov rax, [rsi+28h] cmp rax, [rdx+20h] jnz short loc_2377B mov rbx, rdx mov r14, rsi mov rax, [rdx+10h] dec rax movsxd r15, ecx imul rax, r15 add rax, [rsi+10h] mov rcx, rsp mov [rcx], rax mov rax, [rdx+18h] dec rax imul rax, r15 add rax, [rsi+18h] mov [rcx+8], rax mov rax, [rsi+20h] mov [rcx+10h], rax mov rax, [rdx+28h] mov [rcx+18h], rax push 4 pop rdx xor esi, esi call _ggml_new_tensor mov [rax+54h], r15d mov dword ptr [rax+50h], 34h ; '4' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 20h pop rbx pop r14 pop r15 retn loc_2377B: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe3BNe2; "a->ne[3] == b->ne[2]" mov esi, 1011h xor eax, eax call _ggml_abort
long long ggml_conv_transpose_2d_p0( long long a1, _QWORD *a2, _QWORD *a3, int a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long result; // rax _QWORD v17[7]; // [rsp+0h] [rbp-38h] BYREF if ( a2[5] != a3[4] ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4113, (long long)"GGML_ASSERT(%s) failed", (long long)"a->ne[3] == b->ne[2]", a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17[0]); v17[0] = a2[2] + a4 * (a3[2] - 1LL); v17[1] = a2[3] + a4 * (a3[3] - 1LL); v17[2] = a2[4]; v17[3] = a3[5]; result = ggml_new_tensor(a1, 0LL, 4LL, (long long)v17); *(_DWORD *)(result + 84) = a4; *(_DWORD *)(result + 80) = 52; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_conv_transpose_2d_p0: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RAX,qword ptr [RSI + 0x28] CMP RAX,qword ptr [RDX + 0x20] JNZ 0x0012377b MOV RBX,RDX MOV R14,RSI MOV RAX,qword ptr [RDX + 0x10] DEC RAX MOVSXD R15,ECX IMUL RAX,R15 ADD RAX,qword ptr [RSI + 0x10] MOV RCX,RSP MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RDX + 0x18] DEC RAX IMUL RAX,R15 ADD RAX,qword ptr [RSI + 0x18] MOV qword ptr [RCX + 0x8],RAX MOV RAX,qword ptr [RSI + 0x20] MOV qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RDX + 0x28] MOV qword ptr [RCX + 0x18],RAX PUSH 0x4 POP RDX XOR ESI,ESI CALL 0x0011c230 MOV dword ptr [RAX + 0x54],R15D MOV dword ptr [RAX + 0x50],0x34 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_0012377b: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14bc9f] MOV ESI,0x1011 XOR EAX,EAX CALL 0x0011e770
void ggml_conv_transpose_2d_p0(int8 param_1,long param_2,long param_3,int4 param_4) { long lVar1; if (*(long *)(param_2 + 0x28) == *(long *)(param_3 + 0x20)) { lVar1 = ggml_new_tensor(param_1,0,4); *(int4 *)(lVar1 + 0x54) = param_4; *(int4 *)(lVar1 + 0x50) = 0x34; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x1011, "GGML_ASSERT(%s) failed","a->ne[3] == b->ne[2]"); }
11,006
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/clip.hpp
struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) { // x: [N, n_token, hidden_size] int64_t N = x->ne[2]; int64_t n_token = x->ne[1]; int64_t hidden_size = n_head * d_model; struct ggml_tensor* r = x; // layer norm 1 x = ggml_nn_layer_norm(ctx, x, ln1_w, ln1_b); // self-attention { struct ggml_tensor* q = ggml_nn_linear(ctx, x, q_w, q_b); q = ggml_scale_inplace(ctx, q, 1.0f / sqrt((float)d_model)); q = ggml_reshape_4d(ctx, q, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] q = ggml_reshape_3d(ctx, q, d_model, n_token, n_head * N); // [N * n_head, n_token, d_model] struct ggml_tensor* k = ggml_nn_linear(ctx, x, k_w, k_b); k = ggml_reshape_4d(ctx, k, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] k = ggml_reshape_3d(ctx, k, d_model, n_token, n_head); // [N * n_head, n_token, d_model] struct ggml_tensor* v = ggml_nn_linear(ctx, x, v_w, v_b); v = ggml_reshape_4d(ctx, v, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] v = ggml_cont(ctx, ggml_permute(ctx, v, 1, 2, 0, 3)); // [N, n_head, d_model, n_token] v = ggml_reshape_3d(ctx, v, n_token, d_model, n_head * N); // [N * n_head, d_model, n_token] struct ggml_tensor* kq = ggml_mul_mat(ctx, k, q); // [N * n_head, n_token, n_token] kq = ggml_diag_mask_inf_inplace(ctx, kq, 0); kq = ggml_soft_max_inplace(ctx, kq); struct ggml_tensor* kqv = ggml_mul_mat(ctx, v, kq); // [N * n_head, n_token, d_model] kqv = ggml_reshape_4d(ctx, kqv, d_model, n_token, n_head, N); kqv = ggml_cont(ctx, ggml_permute(ctx, kqv, 0, 2, 1, 3)); // [N, n_token, n_head, d_model] x = ggml_reshape_2d(ctx, kqv, d_model * n_head, n_token * N); // // [N * n_token, d_model * n_head] } // attention output x = ggml_nn_linear(ctx, x, out_w, out_b); // residual x = ggml_add(ctx, x, r); r = x; // layer norm 2 x = ggml_nn_layer_norm(ctx, x, ln2_w, ln2_b); // mlp x = ggml_nn_linear(ctx, x, fc1_w, fc1_b); if (hidden_size == 1024 || hidden_size == 1280) { // SD 2.x x = ggml_gelu_inplace(ctx, x); } else { // SD 1.x x = ggml_gelu_quick_inplace(ctx, x); } x = ggml_nn_linear(ctx, x, fc2_w, fc2_b); // residual 2 x = ggml_add(ctx, x, r); return x; }
O0
cpp
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq %rdx, 0x80(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x80(%rsp), %rcx movq 0x20(%rcx), %rcx movq %rcx, 0x78(%rsp) movq 0x80(%rsp), %rcx movq 0x18(%rcx), %rcx movq %rcx, 0x70(%rsp) movl (%rax), %ecx imull 0x4(%rax), %ecx movslq %ecx, %rcx movq %rcx, 0x68(%rsp) movq 0x80(%rsp), %rcx movq %rcx, 0x60(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x50(%rax), %rdx movq 0x58(%rax), %rcx movss 0xfcd1b(%rip), %xmm0 # 0x17f204 callq 0x36370 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x80(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx callq 0x36160 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x58(%rsp) movq 0x88(%rsp), %rcx movq %rcx, (%rsp) movq 0x58(%rsp), %rcx movq %rcx, 0x8(%rsp) cvtsi2ssl 0x4(%rax), %xmm0 cvtss2sd %xmm0, %xmm0 callq 0xb5c0 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movaps %xmm0, %xmm1 movsd 0xfccf8(%rip), %xmm0 # 0x17f258 divsd %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 callq 0x121cb0 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rsi movslq 0x4(%rax), %rdx movslq (%rax), %rcx movq 0x70(%rsp), %r8 movq 0x78(%rsp), %r9 callq 0x122d20 movq %rax, 0x58(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x123250 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x122320 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rsi movslq 0x4(%rax), %rdx movq 0x70(%rsp), %rcx movslq (%rax), %r8 imulq 0x78(%rsp), %r8 callq 0x122b60 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x20(%rax), %rdx movq 0x28(%rax), %rcx callq 0x36160 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x50(%rsp) movq 0x88(%rsp), %rdi movq 0x50(%rsp), %rsi movslq 0x4(%rax), %rdx movslq (%rax), %rcx movq 0x70(%rsp), %r8 movq 0x78(%rsp), %r9 callq 0x122d20 movq %rax, 0x50(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x88(%rsp), %rdi movq 0x50(%rsp), %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x123250 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x122320 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x50(%rsp) movq 0x88(%rsp), %rdi movq 0x50(%rsp), %rsi movslq 0x4(%rax), %rdx movq 0x70(%rsp), %rcx movslq (%rax), %r8 callq 0x122b60 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x50(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x30(%rax), %rdx movq 0x38(%rax), %rcx callq 0x36160 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x48(%rsp) movq 0x88(%rsp), %rdi movq 0x48(%rsp), %rsi movslq 0x4(%rax), %rdx movslq (%rax), %rcx movq 0x70(%rsp), %r8 movq 0x78(%rsp), %r9 callq 0x122d20 movq %rax, 0x48(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x88(%rsp), %rdi movq 0x48(%rsp), %rsi movl $0x1, %edx movl $0x2, %ecx xorl %r8d, %r8d movl $0x3, %r9d callq 0x123250 movq 0x20(%rsp), %rdi movq %rax, %rsi callq 0x122320 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x48(%rsp) movq 0x88(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x70(%rsp), %rdx movslq 0x4(%rax), %rcx movslq (%rax), %r8 imulq 0x78(%rsp), %r8 callq 0x122b60 movq %rax, 0x48(%rsp) movq 0x88(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1211e0 movq %rax, 0x40(%rsp) movq 0x88(%rsp), %rdi movq 0x40(%rsp), %rsi xorl %edx, %edx callq 0x123ea0 movq %rax, 0x40(%rsp) movq 0x88(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x124310 movq %rax, 0x40(%rsp) movq 0x88(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x1211e0 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x38(%rsp) movq 0x88(%rsp), %rdi movq 0x38(%rsp), %rsi movslq 0x4(%rax), %rdx movq 0x70(%rsp), %rcx movslq (%rax), %r8 movq 0x78(%rsp), %r9 callq 0x122d20 movq %rax, 0x38(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x88(%rsp), %rdi movq 0x38(%rsp), %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x123250 movq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x122320 movq 0x30(%rsp), %rcx movq %rax, 0x38(%rsp) movq 0x88(%rsp), %rdi movq 0x38(%rsp), %rsi movl 0x4(%rcx), %eax imull (%rcx), %eax movslq %eax, %rdx movq 0x70(%rsp), %rcx imulq 0x78(%rsp), %rcx callq 0x1229c0 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x80(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x40(%rax), %rdx movq 0x48(%rax), %rcx callq 0x36160 movq %rax, 0x80(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x11ea50 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x80(%rsp) movq 0x80(%rsp), %rcx movq %rcx, 0x60(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x80(%rax), %rdx movq 0x88(%rax), %rcx movss 0xfc8bc(%rip), %xmm0 # 0x17f204 callq 0x36370 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x80(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x60(%rax), %rdx movq 0x68(%rax), %rcx callq 0x36160 movq %rax, 0x80(%rsp) cmpq $0x400, 0x68(%rsp) # imm = 0x400 je 0x82998 cmpq $0x500, 0x68(%rsp) # imm = 0x500 jne 0x829b7 movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi callq 0x120ae0 movq %rax, 0x80(%rsp) jmp 0x829d4 movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi callq 0x120b40 movq %rax, 0x80(%rsp) movq 0x30(%rsp), %rax movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x70(%rax), %rdx movq 0x78(%rax), %rcx callq 0x36160 movq %rax, 0x80(%rsp) movq 0x88(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x11ea50 movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax addq $0x98, %rsp retq
_ZN22ResidualAttentionBlock7forwardEP12ggml_contextP11ggml_tensor: sub rsp, 98h mov [rsp+98h+var_8], rdi mov [rsp+98h+var_10], rsi mov [rsp+98h+var_18], rdx mov rax, [rsp+98h+var_8] mov [rsp+98h+var_68], rax mov rcx, [rsp+98h+var_18] mov rcx, [rcx+20h] mov [rsp+98h+var_20], rcx mov rcx, [rsp+98h+var_18] mov rcx, [rcx+18h] mov [rsp+98h+var_28], rcx mov ecx, [rax] imul ecx, [rax+4] movsxd rcx, ecx mov [rsp+98h+var_30], rcx mov rcx, [rsp+98h+var_18] mov [rsp+98h+var_38], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+50h] mov rcx, [rax+58h] movss xmm0, cs:dword_17F204 call _ZL18ggml_nn_layer_normP12ggml_contextP11ggml_tensorS2_S2_f; ggml_nn_layer_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,float) mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_18], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+10h] mov rcx, [rax+18h] call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_40], rcx mov rcx, [rsp+98h+var_10] mov [rsp+98h+var_98], rcx mov rcx, [rsp+98h+var_40] mov [rsp+98h+var_90], rcx cvtsi2ss xmm0, dword ptr [rax+4] cvtss2sd xmm0, xmm0 call _sqrt mov rdi, [rsp+98h+var_98] mov rsi, [rsp+98h+var_90] movaps xmm1, xmm0 movsd xmm0, cs:qword_17F258 divsd xmm0, xmm1 cvtsd2ss xmm0, xmm0 call ggml_scale_inplace mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_40], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_40] movsxd rdx, dword ptr [rax+4] movsxd rcx, dword ptr [rax] mov r8, [rsp+98h+var_28] mov r9, [rsp+98h+var_20] call ggml_reshape_4d mov [rsp+98h+var_40], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_88], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_40] xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, [rsp+98h+var_88] mov rsi, rax call ggml_cont mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_40], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_40] movsxd rdx, dword ptr [rax+4] mov rcx, [rsp+98h+var_28] movsxd r8, dword ptr [rax] imul r8, [rsp+98h+var_20] call ggml_reshape_3d mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_40], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+20h] mov rcx, [rax+28h] call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_48], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_48] movsxd rdx, dword ptr [rax+4] movsxd rcx, dword ptr [rax] mov r8, [rsp+98h+var_28] mov r9, [rsp+98h+var_20] call ggml_reshape_4d mov [rsp+98h+var_48], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_80], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_48] xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, [rsp+98h+var_80] mov rsi, rax call ggml_cont mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_48], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_48] movsxd rdx, dword ptr [rax+4] mov rcx, [rsp+98h+var_28] movsxd r8, dword ptr [rax] call ggml_reshape_3d mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_48], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+30h] mov rcx, [rax+38h] call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_50], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_50] movsxd rdx, dword ptr [rax+4] movsxd rcx, dword ptr [rax] mov r8, [rsp+98h+var_28] mov r9, [rsp+98h+var_20] call ggml_reshape_4d mov [rsp+98h+var_50], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_78], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_50] mov edx, 1 mov ecx, 2 xor r8d, r8d mov r9d, 3 call ggml_permute mov rdi, [rsp+98h+var_78] mov rsi, rax call ggml_cont mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_50], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_50] mov rdx, [rsp+98h+var_28] movsxd rcx, dword ptr [rax+4] movsxd r8, dword ptr [rax] imul r8, [rsp+98h+var_20] call ggml_reshape_3d mov [rsp+98h+var_50], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_48] mov rdx, [rsp+98h+var_40] call ggml_mul_mat mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_58] xor edx, edx call ggml_diag_mask_inf_inplace mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_58] call ggml_soft_max_inplace mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_50] mov rdx, [rsp+98h+var_58] call ggml_mul_mat mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_60], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_60] movsxd rdx, dword ptr [rax+4] mov rcx, [rsp+98h+var_28] movsxd r8, dword ptr [rax] mov r9, [rsp+98h+var_20] call ggml_reshape_4d mov [rsp+98h+var_60], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_70], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_60] xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, [rsp+98h+var_70] mov rsi, rax call ggml_cont mov rcx, [rsp+98h+var_68] mov [rsp+98h+var_60], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_60] mov eax, [rcx+4] imul eax, [rcx] movsxd rdx, eax mov rcx, [rsp+98h+var_28] imul rcx, [rsp+98h+var_20] call ggml_reshape_2d mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_18], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+40h] mov rcx, [rax+48h] call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov [rsp+98h+var_18], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rsp+98h+var_38] call ggml_add mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_18], rcx mov rcx, [rsp+98h+var_18] mov [rsp+98h+var_38], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+80h] mov rcx, [rax+88h] movss xmm0, cs:dword_17F204 call _ZL18ggml_nn_layer_normP12ggml_contextP11ggml_tensorS2_S2_f; ggml_nn_layer_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,float) mov rcx, rax mov rax, [rsp+98h+var_68] mov [rsp+98h+var_18], rcx mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+60h] mov rcx, [rax+68h] call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov [rsp+98h+var_18], rax cmp [rsp+98h+var_30], 400h jz short loc_82998 cmp [rsp+98h+var_30], 500h jnz short loc_829B7 loc_82998: mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] call ggml_gelu_inplace mov [rsp+98h+var_18], rax jmp short loc_829D4 loc_829B7: mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] call ggml_gelu_quick_inplace mov [rsp+98h+var_18], rax loc_829D4: mov rax, [rsp+98h+var_68] mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rax+70h] mov rcx, [rax+78h] call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov [rsp+98h+var_18], rax mov rdi, [rsp+98h+var_10] mov rsi, [rsp+98h+var_18] mov rdx, [rsp+98h+var_38] call ggml_add mov [rsp+98h+var_18], rax mov rax, [rsp+98h+var_18] add rsp, 98h retn
long long ResidualAttentionBlock::forward(int *a1, long long a2, long long a3) { float v3; // xmm0_4 long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // rax long long v12; // rax long long v13; // rax long long v14; // rax long long v15; // rax long long v16; // rax long long v17; // rax long long v18; // rax long long v19; // rax long long v20; // rax long long v21; // rax long long v22; // rax long long v23; // rax long long v24; // rax long long v26; // [rsp+8h] [rbp-90h] long long v28; // [rsp+38h] [rbp-60h] long long v29; // [rsp+40h] [rbp-58h] long long v30; // [rsp+48h] [rbp-50h] long long v31; // [rsp+50h] [rbp-48h] long long v32; // [rsp+58h] [rbp-40h] long long v34; // [rsp+60h] [rbp-38h] long long v35; // [rsp+68h] [rbp-30h] long long v36; // [rsp+70h] [rbp-28h] long long v37; // [rsp+78h] [rbp-20h] long long v38; // [rsp+80h] [rbp-18h] long long v39; // [rsp+80h] [rbp-18h] long long v40; // [rsp+80h] [rbp-18h] long long v41; // [rsp+80h] [rbp-18h] v37 = *(_QWORD *)(a3 + 32); v36 = *(_QWORD *)(a3 + 24); v35 = a1[1] * *a1; v38 = ggml_nn_layer_norm(a2, a3, *((_QWORD *)a1 + 10), *((_QWORD *)a1 + 11), 0.0000099999997); v26 = ggml_nn_linear(a2, v38, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); v3 = 1.0 / sqrt((float)a1[1]); v4 = ggml_scale_inplace(a2, v26, v3); v5 = ggml_reshape_4d(a2, v4, a1[1], *a1, v36); v6 = ggml_permute(a2, v5, 0LL, 2LL, 1LL, 3LL); v7 = ggml_cont(a2, v6); v32 = ggml_reshape_3d(a2, v7, a1[1], v36, v37 * *a1); v8 = ggml_nn_linear(a2, v38, *((_QWORD *)a1 + 4), *((_QWORD *)a1 + 5)); v9 = ggml_reshape_4d(a2, v8, a1[1], *a1, v36); v10 = ggml_permute(a2, v9, 0LL, 2LL, 1LL, 3LL); v11 = ggml_cont(a2, v10); v31 = ggml_reshape_3d(a2, v11, a1[1], v36, *a1); v12 = ggml_nn_linear(a2, v38, *((_QWORD *)a1 + 6), *((_QWORD *)a1 + 7)); v13 = ggml_reshape_4d(a2, v12, a1[1], *a1, v36); v14 = ggml_permute(a2, v13, 1LL, 2LL, 0LL, 3LL); v15 = ggml_cont(a2, v14); v30 = ggml_reshape_3d(a2, v15, v36, a1[1], v37 * *a1); v16 = ggml_mul_mat(a2, v31, v32); v17 = ggml_diag_mask_inf_inplace(a2, v16, 0LL); v29 = ggml_soft_max_inplace(a2, v17); v18 = ggml_mul_mat(a2, v30, v29); v19 = ggml_reshape_4d(a2, v18, a1[1], v36, *a1); v20 = ggml_permute(a2, v19, 0LL, 2LL, 1LL, 3LL); v28 = ggml_cont(a2, v20); v21 = ggml_reshape_2d(a2, v28, *a1 * a1[1], v37 * v36); v22 = ggml_nn_linear(a2, v21, *((_QWORD *)a1 + 8), *((_QWORD *)a1 + 9)); v34 = ggml_add(a2, v22, a3); v23 = ggml_nn_layer_norm(a2, v34, *((_QWORD *)a1 + 16), *((_QWORD *)a1 + 17), 0.0000099999997); v39 = ggml_nn_linear(a2, v23, *((_QWORD *)a1 + 12), *((_QWORD *)a1 + 13)); if ( v35 == 1024 || v35 == 1280 ) { v40 = ggml_gelu_inplace(a2, v39); v24 = ggml_nn_linear(a2, v40, *((_QWORD *)a1 + 14), *((_QWORD *)a1 + 15)); } else { v41 = ggml_gelu_quick_inplace(a2, v39); v24 = ggml_nn_linear(a2, v41, *((_QWORD *)a1 + 14), *((_QWORD *)a1 + 15)); } return ggml_add(a2, v24, v34); }
forward: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x80],RDX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x30],RAX MOV RCX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RCX + 0x20] MOV qword ptr [RSP + 0x78],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RSP + 0x70],RCX MOV ECX,dword ptr [RAX] IMUL ECX,dword ptr [RAX + 0x4] MOVSXD RCX,ECX MOV qword ptr [RSP + 0x68],RCX MOV RCX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x50] MOV RCX,qword ptr [RAX + 0x58] MOVSS XMM0,dword ptr [0x0027f204] CALL 0x00136370 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] CALL 0x00136160 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RCX MOV RCX,qword ptr [RSP + 0x88] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x8],RCX CVTSI2SS XMM0,dword ptr [RAX + 0x4] CVTSS2SD XMM0,XMM0 CALL 0x0010b5c0 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOVAPS XMM1,XMM0 MOVSD XMM0,qword ptr [0x0027f258] DIVSD XMM0,XMM1 CVTSD2SS XMM0,XMM0 CALL 0x00221cb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x58] MOVSXD RDX,dword ptr [RAX + 0x4] MOVSXD RCX,dword ptr [RAX] MOV R8,qword ptr [RSP + 0x70] MOV R9,qword ptr [RSP + 0x78] CALL 0x00222d20 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x58] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x1 MOV R9D,0x3 CALL 0x00223250 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x00222320 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x58] MOVSXD RDX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RSP + 0x70] MOVSXD R8,dword ptr [RAX] IMUL R8,qword ptr [RSP + 0x78] CALL 0x00222b60 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] CALL 0x00136160 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x50] MOVSXD RDX,dword ptr [RAX + 0x4] MOVSXD RCX,dword ptr [RAX] MOV R8,qword ptr [RSP + 0x70] MOV R9,qword ptr [RSP + 0x78] CALL 0x00222d20 MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x50] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x1 MOV R9D,0x3 CALL 0x00223250 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX CALL 0x00222320 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x50] MOVSXD RDX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RSP + 0x70] MOVSXD R8,dword ptr [RAX] CALL 0x00222b60 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RAX + 0x38] CALL 0x00136160 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x48],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RAX + 0x4] MOVSXD RCX,dword ptr [RAX] MOV R8,qword ptr [RSP + 0x70] MOV R9,qword ptr [RSP + 0x78] CALL 0x00222d20 MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x48] MOV EDX,0x1 MOV ECX,0x2 XOR R8D,R8D MOV R9D,0x3 CALL 0x00223250 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,RAX CALL 0x00222320 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x48],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x70] MOVSXD RCX,dword ptr [RAX + 0x4] MOVSXD R8,dword ptr [RAX] IMUL R8,qword ptr [RSP + 0x78] CALL 0x00222b60 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x002211e0 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x40] XOR EDX,EDX CALL 0x00223ea0 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00224310 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x40] CALL 0x002211e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x38],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RSP + 0x70] MOVSXD R8,dword ptr [RAX] MOV R9,qword ptr [RSP + 0x78] CALL 0x00222d20 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x38] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x1 MOV R9D,0x3 CALL 0x00223250 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,RAX CALL 0x00222320 MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RCX + 0x4] IMUL EAX,dword ptr [RCX] MOVSXD RDX,EAX MOV RCX,qword ptr [RSP + 0x70] IMUL RCX,qword ptr [RSP + 0x78] CALL 0x002229c0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x48] CALL 0x00136160 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x60] CALL 0x0021ea50 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RCX MOV RCX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x80] MOV RCX,qword ptr [RAX + 0x88] MOVSS XMM0,dword ptr [0x0027f204] CALL 0x00136370 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x80],RCX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RAX + 0x68] CALL 0x00136160 MOV qword ptr [RSP + 0x80],RAX CMP qword ptr [RSP + 0x68],0x400 JZ 0x00182998 CMP qword ptr [RSP + 0x68],0x500 JNZ 0x001829b7 LAB_00182998: MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] CALL 0x00220ae0 MOV qword ptr [RSP + 0x80],RAX JMP 0x001829d4 LAB_001829b7: MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] CALL 0x00220b40 MOV qword ptr [RSP + 0x80],RAX LAB_001829d4: MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX + 0x70] MOV RCX,qword ptr [RAX + 0x78] CALL 0x00136160 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x60] CALL 0x0021ea50 MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] ADD RSP,0x98 RET
/* ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*) */ int8 __thiscall ResidualAttentionBlock::forward (ResidualAttentionBlock *this,ggml_context *param_1,ggml_tensor *param_2) { int iVar1; int iVar2; long lVar3; long lVar4; ggml_tensor *pgVar5; int8 uVar6; int8 uVar7; int8 uVar8; ggml_tensor *pgVar9; double dVar10; ggml_tensor *local_18; lVar3 = *(long *)(param_2 + 0x20); lVar4 = *(long *)(param_2 + 0x18); iVar1 = *(int *)this; iVar2 = *(int *)(this + 4); pgVar5 = (ggml_tensor *) ggml_nn_layer_norm(param_1,param_2,*(ggml_tensor **)(this + 0x50), *(ggml_tensor **)(this + 0x58),DAT_0027f204); uVar6 = ggml_nn_linear(param_1,pgVar5,*(ggml_tensor **)(this + 0x10), *(ggml_tensor **)(this + 0x18)); dVar10 = sqrt((double)*(int *)(this + 4)); uVar6 = ggml_scale_inplace(CONCAT44((int)((ulong)(DAT_0027f258 / dVar10) >> 0x20), (float)(DAT_0027f258 / dVar10)),param_1,uVar6); uVar6 = ggml_reshape_4d(param_1,uVar6,(long)*(int *)(this + 4),(long)*(int *)this,lVar4,lVar3); uVar6 = ggml_permute(param_1,uVar6,0,2,1,3); uVar6 = ggml_cont(param_1,uVar6); uVar6 = ggml_reshape_3d(param_1,uVar6,(long)*(int *)(this + 4),lVar4,*(int *)this * lVar3); uVar7 = ggml_nn_linear(param_1,pgVar5,*(ggml_tensor **)(this + 0x20), *(ggml_tensor **)(this + 0x28)); uVar7 = ggml_reshape_4d(param_1,uVar7,(long)*(int *)(this + 4),(long)*(int *)this,lVar4,lVar3); uVar7 = ggml_permute(param_1,uVar7,0,2,1,3); uVar7 = ggml_cont(param_1,uVar7); uVar7 = ggml_reshape_3d(param_1,uVar7,(long)*(int *)(this + 4),lVar4,(long)*(int *)this); uVar8 = ggml_nn_linear(param_1,pgVar5,*(ggml_tensor **)(this + 0x30), *(ggml_tensor **)(this + 0x38)); uVar8 = ggml_reshape_4d(param_1,uVar8,(long)*(int *)(this + 4),(long)*(int *)this,lVar4,lVar3); uVar8 = ggml_permute(param_1,uVar8,1,2,0,3); uVar8 = ggml_cont(param_1,uVar8); uVar8 = ggml_reshape_3d(param_1,uVar8,lVar4,(long)*(int *)(this + 4),*(int *)this * lVar3); uVar6 = ggml_mul_mat(param_1,uVar7,uVar6); uVar6 = ggml_diag_mask_inf_inplace(param_1,uVar6,0); uVar6 = ggml_soft_max_inplace(param_1,uVar6); uVar6 = ggml_mul_mat(param_1,uVar8,uVar6); uVar6 = ggml_reshape_4d(param_1,uVar6,(long)*(int *)(this + 4),lVar4,(long)*(int *)this,lVar3); uVar6 = ggml_permute(param_1,uVar6,0,2,1,3); uVar6 = ggml_cont(param_1,uVar6); pgVar5 = (ggml_tensor *) ggml_reshape_2d(param_1,uVar6,(long)(*(int *)(this + 4) * *(int *)this),lVar4 * lVar3); uVar6 = ggml_nn_linear(param_1,pgVar5,*(ggml_tensor **)(this + 0x40), *(ggml_tensor **)(this + 0x48)); pgVar5 = (ggml_tensor *)ggml_add(param_1,uVar6,param_2); pgVar9 = (ggml_tensor *) ggml_nn_layer_norm(param_1,pgVar5,*(ggml_tensor **)(this + 0x80), *(ggml_tensor **)(this + 0x88),DAT_0027f204); uVar6 = ggml_nn_linear(param_1,pgVar9,*(ggml_tensor **)(this + 0x60), *(ggml_tensor **)(this + 0x68)); if ((iVar1 * iVar2 == 0x400) || (iVar1 * iVar2 == 0x500)) { local_18 = (ggml_tensor *)ggml_gelu_inplace(param_1,uVar6); } else { local_18 = (ggml_tensor *)ggml_gelu_quick_inplace(param_1,uVar6); } uVar6 = ggml_nn_linear(param_1,local_18,*(ggml_tensor **)(this + 0x70), *(ggml_tensor **)(this + 0x78)); uVar6 = ggml_add(param_1,uVar6,pgVar5); return uVar6; }
11,007
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/clip.hpp
struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) { // x: [N, n_token, hidden_size] int64_t N = x->ne[2]; int64_t n_token = x->ne[1]; int64_t hidden_size = n_head * d_model; struct ggml_tensor* r = x; // layer norm 1 x = ggml_nn_layer_norm(ctx, x, ln1_w, ln1_b); // self-attention { struct ggml_tensor* q = ggml_nn_linear(ctx, x, q_w, q_b); q = ggml_scale_inplace(ctx, q, 1.0f / sqrt((float)d_model)); q = ggml_reshape_4d(ctx, q, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] q = ggml_reshape_3d(ctx, q, d_model, n_token, n_head * N); // [N * n_head, n_token, d_model] struct ggml_tensor* k = ggml_nn_linear(ctx, x, k_w, k_b); k = ggml_reshape_4d(ctx, k, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] k = ggml_reshape_3d(ctx, k, d_model, n_token, n_head); // [N * n_head, n_token, d_model] struct ggml_tensor* v = ggml_nn_linear(ctx, x, v_w, v_b); v = ggml_reshape_4d(ctx, v, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] v = ggml_cont(ctx, ggml_permute(ctx, v, 1, 2, 0, 3)); // [N, n_head, d_model, n_token] v = ggml_reshape_3d(ctx, v, n_token, d_model, n_head * N); // [N * n_head, d_model, n_token] struct ggml_tensor* kq = ggml_mul_mat(ctx, k, q); // [N * n_head, n_token, n_token] kq = ggml_diag_mask_inf_inplace(ctx, kq, 0); kq = ggml_soft_max_inplace(ctx, kq); struct ggml_tensor* kqv = ggml_mul_mat(ctx, v, kq); // [N * n_head, n_token, d_model] kqv = ggml_reshape_4d(ctx, kqv, d_model, n_token, n_head, N); kqv = ggml_cont(ctx, ggml_permute(ctx, kqv, 0, 2, 1, 3)); // [N, n_token, n_head, d_model] x = ggml_reshape_2d(ctx, kqv, d_model * n_head, n_token * N); // // [N * n_token, d_model * n_head] } // attention output x = ggml_nn_linear(ctx, x, out_w, out_b); // residual x = ggml_add(ctx, x, r); r = x; // layer norm 2 x = ggml_nn_layer_norm(ctx, x, ln2_w, ln2_b); // mlp x = ggml_nn_linear(ctx, x, fc1_w, fc1_b); if (hidden_size == 1024 || hidden_size == 1280) { // SD 2.x x = ggml_gelu_inplace(ctx, x); } else { // SD 1.x x = ggml_gelu_quick_inplace(ctx, x); } x = ggml_nn_linear(ctx, x, fc2_w, fc2_b); // residual 2 x = ggml_add(ctx, x, r); return x; }
O1
cpp
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0x18(%rdx), %r12 movq 0x20(%rdx), %r13 movl 0x4(%rdi), %eax imull (%rdi), %eax movl %eax, 0x4(%rsp) movq 0x50(%rdi), %r15 movq 0x58(%rdi), %rbp movss 0x6a8be(%rip), %xmm0 # 0xbd908 movq %rsi, %rdi movq %rdx, 0x10(%rsp) movq %rdx, %rsi callq 0x91ff0 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x912d2 movq %rbx, %rdi movq %rax, %rsi movq %rbp, %rdx callq 0x90c8a movq %rax, %rbp movq 0x10(%r14), %rsi movq 0x18(%r14), %r15 movq %rbx, %rdi movq %rax, %rdx callq 0x92319 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x90c8a movq %rax, %r15 xorps %xmm0, %xmm0 cvtsi2ssl 0x4(%r14), %xmm0 cvtss2sd %xmm0, %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jb 0x530ba sqrtsd %xmm0, %xmm0 jmp 0x530bf callq 0xa490 movsd 0x6aa01(%rip), %xmm1 # 0xbdac8 divsd %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtsd2ss %xmm1, %xmm0 movq %rbx, %rdi movq %r15, %rsi callq 0x9283a movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x93083 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x9331a movq %rbx, %rdi movq %rax, %rsi callq 0x92b1c movslq 0x4(%r14), %rdx movslq (%r14), %r8 imulq %r13, %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x92f90 movq %rax, 0x8(%rsp) movq 0x20(%r14), %rsi movq 0x28(%r14), %r15 movq %rbx, %rdi movq %rbp, %rdx callq 0x92319 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x90c8a movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x93083 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x9331a movq %rbx, %rdi movq %rax, %rsi callq 0x92b1c movslq 0x4(%r14), %rdx movslq (%r14), %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x92f90 movq %rax, %r15 movq 0x30(%r14), %rsi movq %rbp, %rdx movq 0x38(%r14), %rbp movq %rbx, %rdi callq 0x92319 movq %rbx, %rdi movq %rax, %rsi movq %rbp, %rdx callq 0x90c8a movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x93083 movq %rbx, %rdi movq %rax, %rsi movl $0x1, %edx movl $0x2, %ecx xorl %r8d, %r8d movl $0x3, %r9d callq 0x9331a movq %rbx, %rdi movq %rax, %rsi callq 0x92b1c movslq 0x4(%r14), %rcx movslq (%r14), %r8 imulq %r13, %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x92f90 movq %rax, %rbp movq %rbx, %rdi movq %r15, %rsi movq 0x8(%rsp), %rdx callq 0x92319 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx callq 0x938ef movq %rbx, %rdi movq %rax, %rsi callq 0x93af3 movq %rbx, %rdi movq %rbp, %rsi movq %rax, %rdx callq 0x92319 movslq 0x4(%r14), %rdx movslq (%r14), %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx movq %r13, %r9 callq 0x93083 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x9331a movq %rbx, %rdi movq %rax, %rsi callq 0x92b1c movslq 0x4(%r14), %rcx movslq (%r14), %rdx imulq %rcx, %rdx imulq %r13, %r12 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x92eaa movq 0x40(%r14), %rsi movq 0x48(%r14), %r15 movq %rbx, %rdi movq %rax, %rdx callq 0x92319 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x90c8a movq %rbx, %rdi movq %rax, %rsi movq 0x10(%rsp), %rdx callq 0x90c8a movq %rax, %r15 movq 0x80(%r14), %r12 movq 0x88(%r14), %r13 movss 0x6a5f6(%rip), %xmm0 # 0xbd908 movq %rbx, %rdi movq %rax, %rsi callq 0x91ff0 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x912d2 movq %rbx, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x90c8a movq 0x60(%r14), %rsi movq 0x68(%r14), %r12 movq %rbx, %rdi movq %rax, %rdx callq 0x92319 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x90c8a movl 0x4(%rsp), %ecx andl $0xfffffeff, %ecx # imm = 0xFFFFFEFF movq %rbx, %rdi movq %rax, %rsi cmpl $0x400, %ecx # imm = 0x400 jne 0x53379 callq 0x91eb1 jmp 0x5337e callq 0x91ee8 movq 0x70(%r14), %rsi movq 0x78(%r14), %r14 movq %rbx, %rdi movq %rax, %rdx callq 0x92319 movq %rbx, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x90c8a movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x90c8a nop
_ZN22ResidualAttentionBlock7forwardEP12ggml_contextP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi mov r12, [rdx+18h] mov r13, [rdx+20h] mov eax, [rdi+4] imul eax, [rdi] mov [rsp+48h+var_44], eax mov r15, [rdi+50h] mov rbp, [rdi+58h] movss xmm0, cs:dword_BD908 mov rdi, rsi mov [rsp+48h+var_38], rdx mov rsi, rdx call ggml_norm mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_mul mov rdi, rbx mov rsi, rax mov rdx, rbp call ggml_add mov rbp, rax mov rsi, [r14+10h] mov r15, [r14+18h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_add mov r15, rax xorps xmm0, xmm0 cvtsi2ss xmm0, dword ptr [r14+4] cvtss2sd xmm0, xmm0 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jb short loc_530BA sqrtsd xmm0, xmm0 jmp short loc_530BF loc_530BA: call _sqrt loc_530BF: movsd xmm1, cs:qword_BDAC8 divsd xmm1, xmm0 xorps xmm0, xmm0 cvtsd2ss xmm0, xmm1 mov rdi, rbx mov rsi, r15 call ggml_scale_inplace movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] imul r8, r13 mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_3d mov [rsp+48h+var_40], rax mov rsi, [r14+20h] mov r15, [r14+28h] mov rdi, rbx mov rdx, rbp call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_add movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_3d mov r15, rax mov rsi, [r14+30h] mov rdx, rbp mov rbp, [r14+38h] mov rdi, rbx call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, rbp call ggml_add movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax mov edx, 1 mov ecx, 2 xor r8d, r8d mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rcx, dword ptr [r14+4] movsxd r8, dword ptr [r14] imul r8, r13 mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_reshape_3d mov rbp, rax mov rdi, rbx mov rsi, r15 mov rdx, [rsp+48h+var_40] call ggml_mul_mat mov rdi, rbx mov rsi, rax xor edx, edx call ggml_diag_mask_inf_inplace mov rdi, rbx mov rsi, rax call ggml_soft_max_inplace mov rdi, rbx mov rsi, rbp mov rdx, rax call ggml_mul_mat movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] mov rdi, rbx mov rsi, rax mov rcx, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rcx, dword ptr [r14+4] movsxd rdx, dword ptr [r14] imul rdx, rcx imul r12, r13 mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_2d mov rsi, [r14+40h] mov r15, [r14+48h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_add mov rdi, rbx mov rsi, rax mov rdx, [rsp+48h+var_38] call ggml_add mov r15, rax mov r12, [r14+80h] mov r13, [r14+88h] movss xmm0, cs:dword_BD908 mov rdi, rbx mov rsi, rax call ggml_norm mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_mul mov rdi, rbx mov rsi, rax mov rdx, r13 call ggml_add mov rsi, [r14+60h] mov r12, [r14+68h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_add mov ecx, [rsp+48h+var_44] and ecx, 0FFFFFEFFh mov rdi, rbx mov rsi, rax cmp ecx, 400h jnz short loc_53379 call ggml_gelu_inplace jmp short loc_5337E loc_53379: call ggml_gelu_quick_inplace loc_5337E: mov rsi, [r14+70h] mov r14, [r14+78h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r14 call ggml_add mov rdi, rbx mov rsi, rax mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ggml_add
long long ResidualAttentionBlock::forward(int *a1, long long a2, long long a3) { long long v4; // r12 long long v5; // r13 long long v6; // r15 long long v7; // rbp long long v8; // rax long long v9; // rax long long v10; // rbp long long v11; // r15 long long v12; // rax long long v13; // r15 double v14; // xmm0_8 double v15; // xmm0_8 float v16; // xmm0_4 long long v17; // rax long long v18; // rax long long v19; // rax long long v20; // rax long long v21; // r15 long long v22; // rax long long v23; // rax long long v24; // rax long long v25; // rax long long v26; // rax long long v27; // r15 long long v28; // rdx long long v29; // rbp long long v30; // rax long long v31; // rax long long v32; // rax long long v33; // rax long long v34; // rax long long v35; // rbp long long v36; // rax long long v37; // rax long long v38; // rax long long v39; // rax long long v40; // rax long long v41; // rax long long v42; // rax long long v43; // rax long long v44; // r15 long long v45; // rax long long v46; // rax long long v47; // r15 long long v48; // r12 long long v49; // r13 long long v50; // rax long long v51; // rax long long v52; // rax long long v53; // r12 long long v54; // rax long long v55; // rsi long long v56; // rax long long v57; // r14 long long v58; // rax long long v59; // rax int v61; // [rsp+4h] [rbp-44h] long long v62; // [rsp+8h] [rbp-40h] v4 = *(_QWORD *)(a3 + 24); v5 = *(_QWORD *)(a3 + 32); v61 = *a1 * a1[1]; v6 = *((_QWORD *)a1 + 10); v7 = *((_QWORD *)a1 + 11); v8 = ggml_norm(a2, a3, 0.0000099999997); v9 = ggml_mul(a2, v8, v6); v10 = ggml_add(a2, v9, v7); v11 = *((_QWORD *)a1 + 3); v12 = ggml_mul_mat(a2, *((_QWORD *)a1 + 2), v10); v13 = ggml_add(a2, v12, v11); v14 = (float)a1[1]; if ( v14 < 0.0 ) v15 = sqrt(v14); else v15 = sqrt(v14); v16 = 1.0 / v15; v17 = ggml_scale_inplace(a2, v13, v16); v18 = ggml_reshape_4d(a2, v17, a1[1], *a1, v4, v5); v19 = ggml_permute(a2, v18, 0LL, 2LL, 1LL, 3LL); v20 = ggml_cont(a2, v19); v62 = ggml_reshape_3d(a2, v20, a1[1], v4, v5 * *a1); v21 = *((_QWORD *)a1 + 5); v22 = ggml_mul_mat(a2, *((_QWORD *)a1 + 4), v10); v23 = ggml_add(a2, v22, v21); v24 = ggml_reshape_4d(a2, v23, a1[1], *a1, v4, v5); v25 = ggml_permute(a2, v24, 0LL, 2LL, 1LL, 3LL); v26 = ggml_cont(a2, v25); v27 = ggml_reshape_3d(a2, v26, a1[1], v4, *a1); v28 = v10; v29 = *((_QWORD *)a1 + 7); v30 = ggml_mul_mat(a2, *((_QWORD *)a1 + 6), v28); v31 = ggml_add(a2, v30, v29); v32 = ggml_reshape_4d(a2, v31, a1[1], *a1, v4, v5); v33 = ggml_permute(a2, v32, 1LL, 2LL, 0LL, 3LL); v34 = ggml_cont(a2, v33); v35 = ggml_reshape_3d(a2, v34, v4, a1[1], v5 * *a1); v36 = ggml_mul_mat(a2, v27, v62); v37 = ggml_diag_mask_inf_inplace(a2, v36, 0LL); v38 = ggml_soft_max_inplace(a2, v37); v39 = ggml_mul_mat(a2, v35, v38); v40 = ggml_reshape_4d(a2, v39, a1[1], v4, *a1, v5); v41 = ggml_permute(a2, v40, 0LL, 2LL, 1LL, 3LL); v42 = ggml_cont(a2, v41); v43 = ggml_reshape_2d(a2, v42, a1[1] * (long long)*a1, v5 * v4); v44 = *((_QWORD *)a1 + 9); v45 = ggml_mul_mat(a2, *((_QWORD *)a1 + 8), v43); v46 = ggml_add(a2, v45, v44); v47 = ggml_add(a2, v46, a3); v48 = *((_QWORD *)a1 + 16); v49 = *((_QWORD *)a1 + 17); v50 = ggml_norm(a2, v47, 0.0000099999997); v51 = ggml_mul(a2, v50, v48); v52 = ggml_add(a2, v51, v49); v53 = *((_QWORD *)a1 + 13); v54 = ggml_mul_mat(a2, *((_QWORD *)a1 + 12), v52); v55 = ggml_add(a2, v54, v53); if ( (v61 & 0xFFFFFEFF) == 0x400 ) v56 = ggml_gelu_inplace(a2, v55); else v56 = ggml_gelu_quick_inplace(a2, v55); v57 = *((_QWORD *)a1 + 15); v58 = ggml_mul_mat(a2, *((_QWORD *)a1 + 14), v56); v59 = ggml_add(a2, v58, v57); return ggml_add(a2, v59, v47); }
11,008
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/clip.hpp
struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) { // x: [N, n_token, hidden_size] int64_t N = x->ne[2]; int64_t n_token = x->ne[1]; int64_t hidden_size = n_head * d_model; struct ggml_tensor* r = x; // layer norm 1 x = ggml_nn_layer_norm(ctx, x, ln1_w, ln1_b); // self-attention { struct ggml_tensor* q = ggml_nn_linear(ctx, x, q_w, q_b); q = ggml_scale_inplace(ctx, q, 1.0f / sqrt((float)d_model)); q = ggml_reshape_4d(ctx, q, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] q = ggml_reshape_3d(ctx, q, d_model, n_token, n_head * N); // [N * n_head, n_token, d_model] struct ggml_tensor* k = ggml_nn_linear(ctx, x, k_w, k_b); k = ggml_reshape_4d(ctx, k, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] k = ggml_reshape_3d(ctx, k, d_model, n_token, n_head); // [N * n_head, n_token, d_model] struct ggml_tensor* v = ggml_nn_linear(ctx, x, v_w, v_b); v = ggml_reshape_4d(ctx, v, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] v = ggml_cont(ctx, ggml_permute(ctx, v, 1, 2, 0, 3)); // [N, n_head, d_model, n_token] v = ggml_reshape_3d(ctx, v, n_token, d_model, n_head * N); // [N * n_head, d_model, n_token] struct ggml_tensor* kq = ggml_mul_mat(ctx, k, q); // [N * n_head, n_token, n_token] kq = ggml_diag_mask_inf_inplace(ctx, kq, 0); kq = ggml_soft_max_inplace(ctx, kq); struct ggml_tensor* kqv = ggml_mul_mat(ctx, v, kq); // [N * n_head, n_token, d_model] kqv = ggml_reshape_4d(ctx, kqv, d_model, n_token, n_head, N); kqv = ggml_cont(ctx, ggml_permute(ctx, kqv, 0, 2, 1, 3)); // [N, n_token, n_head, d_model] x = ggml_reshape_2d(ctx, kqv, d_model * n_head, n_token * N); // // [N * n_token, d_model * n_head] } // attention output x = ggml_nn_linear(ctx, x, out_w, out_b); // residual x = ggml_add(ctx, x, r); r = x; // layer norm 2 x = ggml_nn_layer_norm(ctx, x, ln2_w, ln2_b); // mlp x = ggml_nn_linear(ctx, x, fc1_w, fc1_b); if (hidden_size == 1024 || hidden_size == 1280) { // SD 2.x x = ggml_gelu_inplace(ctx, x); } else { // SD 1.x x = ggml_gelu_quick_inplace(ctx, x); } x = ggml_nn_linear(ctx, x, fc2_w, fc2_b); // residual 2 x = ggml_add(ctx, x, r); return x; }
O2
cpp
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r8 movq %rsi, %rbx movq %rdi, %r14 movq 0x18(%rdx), %r12 movq 0x20(%rdx), %r13 movl 0x4(%rdi), %eax imull (%rdi), %eax movl %eax, 0x4(%rsp) movq 0x50(%rdi), %rdx movq 0x58(%rdi), %rcx movq %rsi, %rdi movq %r8, 0x10(%rsp) movq %r8, %rsi callq 0x1cfa2 movq %rax, %rbp movq 0x10(%r14), %rdx movq 0x18(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x1ce6c movq %rax, %r15 cvtsi2ssl 0x4(%r14), %xmm0 cvtss2sd %xmm0, %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jb 0x359e4 sqrtsd %xmm0, %xmm0 jmp 0x359e9 callq 0xa490 movsd 0x63fff(%rip), %xmm1 # 0x999f0 divsd %xmm0, %xmm1 cvtsd2ss %xmm1, %xmm0 movq %rbx, %rdi movq %r15, %rsi callq 0x6b5d9 movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x6bf70 pushq $0x2 popq %r15 pushq $0x1 popq %r8 pushq $0x3 popq %r9 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl %r15d, %ecx callq 0x6c249 movq %rbx, %rdi movq %rax, %rsi callq 0x6b8ee movslq 0x4(%r14), %rdx movslq (%r14), %r8 imulq %r13, %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x6be1f movq %rax, 0x8(%rsp) movq 0x20(%r14), %rdx movq 0x28(%r14), %rcx movq %rbx, %rdi movq %rbp, %rsi callq 0x1ce6c movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x6bf70 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl %r15d, %ecx pushq $0x1 popq %r8 pushq $0x3 popq %r9 callq 0x6c249 movq %rbx, %rdi movq %rax, %rsi callq 0x6b8ee movslq 0x4(%r14), %rdx movslq (%r14), %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x6be1f movq %rax, %r15 movq 0x30(%r14), %rdx movq 0x38(%r14), %rcx movq %rbx, %rdi movq %rbp, %rsi callq 0x1ce6c movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x6bf70 movq %rbx, %rdi movq %rax, %rsi pushq $0x1 popq %rdx pushq $0x2 popq %rcx xorl %r8d, %r8d pushq $0x3 popq %r9 callq 0x6c249 movq %rbx, %rdi movq %rax, %rsi callq 0x6b8ee movslq 0x4(%r14), %rcx movslq (%r14), %r8 imulq %r13, %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x6be1f movq %rax, %rbp movq %rbx, %rdi movq %r15, %rsi movq 0x8(%rsp), %rdx callq 0x6ae99 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx callq 0x6ca83 movq %rbx, %rdi movq %rax, %rsi callq 0x6cd21 movq %rbx, %rdi movq %rbp, %rsi movq %rax, %rdx callq 0x6ae99 movslq 0x4(%r14), %rdx movslq (%r14), %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx movq %r13, %r9 callq 0x6bf70 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx pushq $0x2 popq %rcx pushq $0x1 popq %r8 pushq $0x3 popq %r9 callq 0x6c249 movq %rbx, %rdi movq %rax, %rsi callq 0x6b8ee movslq 0x4(%r14), %rcx movslq (%r14), %rdx imulq %rcx, %rdx imulq %r13, %r12 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x6bcdb movq 0x40(%r14), %rdx movq 0x48(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x1ce6c movq %rbx, %rdi movq %rax, %rsi movq 0x10(%rsp), %rdx callq 0x69a53 movq %rax, %r15 movq 0x80(%r14), %rdx movq 0x88(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x1cfa2 movq 0x60(%r14), %rdx movq 0x68(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x1ce6c movl 0x4(%rsp), %ecx andl $0xfffffeff, %ecx # imm = 0xFFFFFEFF movq %rbx, %rdi movq %rax, %rsi cmpl $0x400, %ecx # imm = 0x400 jne 0x35c30 callq 0x6ab98 jmp 0x35c35 callq 0x6aba8 movq 0x70(%r14), %rdx movq 0x78(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x1ce6c movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x69a53
_ZN22ResidualAttentionBlock7forwardEP12ggml_contextP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r8, rdx mov rbx, rsi mov r14, rdi mov r12, [rdx+18h] mov r13, [rdx+20h] mov eax, [rdi+4] imul eax, [rdi] mov [rsp+48h+var_44], eax mov rdx, [rdi+50h] mov rcx, [rdi+58h] mov rdi, rsi mov [rsp+48h+var_38], r8 mov rsi, r8 call _ZL18ggml_nn_layer_normP12ggml_contextP11ggml_tensorS2_S2_f; ggml_nn_layer_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,float) mov rbp, rax mov rdx, [r14+10h] mov rcx, [r14+18h] mov rdi, rbx mov rsi, rax call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov r15, rax cvtsi2ss xmm0, dword ptr [r14+4] cvtss2sd xmm0, xmm0 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jb short loc_359E4 sqrtsd xmm0, xmm0 jmp short loc_359E9 loc_359E4: call _sqrt loc_359E9: movsd xmm1, cs:qword_999F0 divsd xmm1, xmm0 cvtsd2ss xmm0, xmm1 mov rdi, rbx mov rsi, r15 call ggml_scale_inplace movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d push 2 pop r15 push 1 pop r8 push 3 pop r9 mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, r15d call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] imul r8, r13 mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_3d mov [rsp+48h+var_40], rax mov rdx, [r14+20h] mov rcx, [r14+28h] mov rdi, rbx mov rsi, rbp call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, r15d push 1 pop r8 push 3 pop r9 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_3d mov r15, rax mov rdx, [r14+30h] mov rcx, [r14+38h] mov rdi, rbx mov rsi, rbp call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax push 1 pop rdx push 2 pop rcx xor r8d, r8d push 3 pop r9 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rcx, dword ptr [r14+4] movsxd r8, dword ptr [r14] imul r8, r13 mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_reshape_3d mov rbp, rax mov rdi, rbx mov rsi, r15 mov rdx, [rsp+48h+var_40] call ggml_mul_mat mov rdi, rbx mov rsi, rax xor edx, edx call ggml_diag_mask_inf_inplace mov rdi, rbx mov rsi, rax call ggml_soft_max_inplace mov rdi, rbx mov rsi, rbp mov rdx, rax call ggml_mul_mat movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] mov rdi, rbx mov rsi, rax mov rcx, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx push 2 pop rcx push 1 pop r8 push 3 pop r9 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rcx, dword ptr [r14+4] movsxd rdx, dword ptr [r14] imul rdx, rcx imul r12, r13 mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_2d mov rdx, [r14+40h] mov rcx, [r14+48h] mov rdi, rbx mov rsi, rax call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov rdi, rbx mov rsi, rax mov rdx, [rsp+48h+var_38] call ggml_add mov r15, rax mov rdx, [r14+80h] mov rcx, [r14+88h] mov rdi, rbx mov rsi, rax call _ZL18ggml_nn_layer_normP12ggml_contextP11ggml_tensorS2_S2_f; ggml_nn_layer_norm(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,float) mov rdx, [r14+60h] mov rcx, [r14+68h] mov rdi, rbx mov rsi, rax call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov ecx, [rsp+48h+var_44] and ecx, 0FFFFFEFFh mov rdi, rbx mov rsi, rax cmp ecx, 400h jnz short loc_35C30 call ggml_gelu_inplace jmp short loc_35C35 loc_35C30: call ggml_gelu_quick_inplace loc_35C35: mov rdx, [r14+70h] mov rcx, [r14+78h] mov rdi, rbx mov rsi, rax call _ZL14ggml_nn_linearP12ggml_contextP11ggml_tensorS2_S2_; ggml_nn_linear(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *) mov rdi, rbx mov rsi, rax mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ggml_add
long long ResidualAttentionBlock::forward(int *a1, long long a2, long long a3) { long long v4; // r12 long long v5; // r13 long long v6; // rbp long long v7; // r15 double v8; // xmm0_8 double v9; // xmm0_8 float v10; // xmm0_4 long long v11; // rax long long v12; // rax long long v13; // rax long long v14; // rax long long v15; // rax long long v16; // rax long long v17; // rax long long v18; // rax long long v19; // r15 long long v20; // rax long long v21; // rax long long v22; // rax long long v23; // rax long long v24; // rbp long long v25; // rax long long v26; // rax long long v27; // rax long long v28; // rax long long v29; // rax long long v30; // rax long long v31; // rax long long v32; // rax long long v33; // rax long long v34; // r15 long long v35; // rax long long v36; // rsi long long v37; // rax long long v38; // rax int v40; // [rsp+4h] [rbp-44h] long long v41; // [rsp+8h] [rbp-40h] v4 = *(_QWORD *)(a3 + 24); v5 = *(_QWORD *)(a3 + 32); v40 = *a1 * a1[1]; v6 = ggml_nn_layer_norm(a2, a3, *((_QWORD *)a1 + 10), *((_QWORD *)a1 + 11)); v7 = ggml_nn_linear(a2, v6, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); v8 = (float)a1[1]; if ( v8 < 0.0 ) v9 = sqrt(v8); else v9 = sqrt(v8); v10 = 1.0 / v9; v11 = ggml_scale_inplace(a2, v7, v10); v12 = ggml_reshape_4d(a2, v11, a1[1], *a1, v4, v5); v13 = ggml_permute(a2, v12, 0LL, 2LL, 1LL, 3LL); v14 = ggml_cont(a2, v13); v41 = ggml_reshape_3d(a2, v14, a1[1], v4, v5 * *a1); v15 = ggml_nn_linear(a2, v6, *((_QWORD *)a1 + 4), *((_QWORD *)a1 + 5)); v16 = ggml_reshape_4d(a2, v15, a1[1], *a1, v4, v5); v17 = ggml_permute(a2, v16, 0LL, 2LL, 1LL, 3LL); v18 = ggml_cont(a2, v17); v19 = ggml_reshape_3d(a2, v18, a1[1], v4, *a1); v20 = ggml_nn_linear(a2, v6, *((_QWORD *)a1 + 6), *((_QWORD *)a1 + 7)); v21 = ggml_reshape_4d(a2, v20, a1[1], *a1, v4, v5); v22 = ggml_permute(a2, v21, 1LL, 2LL, 0LL, 3LL); v23 = ggml_cont(a2, v22); v24 = ggml_reshape_3d(a2, v23, v4, a1[1], v5 * *a1); v25 = ggml_mul_mat(a2, v19, v41); v26 = ggml_diag_mask_inf_inplace(a2, v25, 0LL); v27 = ggml_soft_max_inplace(a2, v26); v28 = ggml_mul_mat(a2, v24, v27); v29 = ggml_reshape_4d(a2, v28, a1[1], v4, *a1, v5); v30 = ggml_permute(a2, v29, 0LL, 2LL, 1LL, 3LL); v31 = ggml_cont(a2, v30); v32 = ggml_reshape_2d(a2, v31, a1[1] * (long long)*a1, v5 * v4); v33 = ggml_nn_linear(a2, v32, *((_QWORD *)a1 + 8), *((_QWORD *)a1 + 9)); v34 = ggml_add(a2, v33, a3); v35 = ggml_nn_layer_norm(a2, v34, *((_QWORD *)a1 + 16), *((_QWORD *)a1 + 17)); v36 = ggml_nn_linear(a2, v35, *((_QWORD *)a1 + 12), *((_QWORD *)a1 + 13)); if ( (v40 & 0xFFFFFEFF) == 0x400 ) v37 = ggml_gelu_inplace(a2, v36); else v37 = ggml_gelu_quick_inplace(a2, v36); v38 = ggml_nn_linear(a2, v37, *((_QWORD *)a1 + 14), *((_QWORD *)a1 + 15)); return ggml_add(a2, v38, v34); }
forward: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R8,RDX MOV RBX,RSI MOV R14,RDI MOV R12,qword ptr [RDX + 0x18] MOV R13,qword ptr [RDX + 0x20] MOV EAX,dword ptr [RDI + 0x4] IMUL EAX,dword ptr [RDI] MOV dword ptr [RSP + 0x4],EAX MOV RDX,qword ptr [RDI + 0x50] MOV RCX,qword ptr [RDI + 0x58] MOV RDI,RSI MOV qword ptr [RSP + 0x10],R8 MOV RSI,R8 CALL 0x0011cfa2 MOV RBP,RAX MOV RDX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x18] MOV RDI,RBX MOV RSI,RAX CALL 0x0011ce6c MOV R15,RAX CVTSI2SS XMM0,dword ptr [R14 + 0x4] CVTSS2SD XMM0,XMM0 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JC 0x001359e4 SQRTSD XMM0,XMM0 JMP 0x001359e9 LAB_001359e4: CALL 0x0010a490 LAB_001359e9: MOVSD XMM1,qword ptr [0x001999f0] DIVSD XMM1,XMM0 CVTSD2SS XMM0,XMM1 MOV RDI,RBX MOV RSI,R15 CALL 0x0016b5d9 MOVSXD RDX,dword ptr [R14 + 0x4] MOVSXD RCX,dword ptr [R14] MOV RDI,RBX MOV RSI,RAX MOV R8,R12 MOV R9,R13 CALL 0x0016bf70 PUSH 0x2 POP R15 PUSH 0x1 POP R8 PUSH 0x3 POP R9 MOV RDI,RBX MOV RSI,RAX XOR EDX,EDX MOV ECX,R15D CALL 0x0016c249 MOV RDI,RBX MOV RSI,RAX CALL 0x0016b8ee MOVSXD RDX,dword ptr [R14 + 0x4] MOVSXD R8,dword ptr [R14] IMUL R8,R13 MOV RDI,RBX MOV RSI,RAX MOV RCX,R12 CALL 0x0016be1f MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x28] MOV RDI,RBX MOV RSI,RBP CALL 0x0011ce6c MOVSXD RDX,dword ptr [R14 + 0x4] MOVSXD RCX,dword ptr [R14] MOV RDI,RBX MOV RSI,RAX MOV R8,R12 MOV R9,R13 CALL 0x0016bf70 MOV RDI,RBX MOV RSI,RAX XOR EDX,EDX MOV ECX,R15D PUSH 0x1 POP R8 PUSH 0x3 POP R9 CALL 0x0016c249 MOV RDI,RBX MOV RSI,RAX CALL 0x0016b8ee MOVSXD RDX,dword ptr [R14 + 0x4] MOVSXD R8,dword ptr [R14] MOV RDI,RBX MOV RSI,RAX MOV RCX,R12 CALL 0x0016be1f MOV R15,RAX MOV RDX,qword ptr [R14 + 0x30] MOV RCX,qword ptr [R14 + 0x38] MOV RDI,RBX MOV RSI,RBP CALL 0x0011ce6c MOVSXD RDX,dword ptr [R14 + 0x4] MOVSXD RCX,dword ptr [R14] MOV RDI,RBX MOV RSI,RAX MOV R8,R12 MOV R9,R13 CALL 0x0016bf70 MOV RDI,RBX MOV RSI,RAX PUSH 0x1 POP RDX PUSH 0x2 POP RCX XOR R8D,R8D PUSH 0x3 POP R9 CALL 0x0016c249 MOV RDI,RBX MOV RSI,RAX CALL 0x0016b8ee MOVSXD RCX,dword ptr [R14 + 0x4] MOVSXD R8,dword ptr [R14] IMUL R8,R13 MOV RDI,RBX MOV RSI,RAX MOV RDX,R12 CALL 0x0016be1f MOV RBP,RAX MOV RDI,RBX MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x8] CALL 0x0016ae99 MOV RDI,RBX MOV RSI,RAX XOR EDX,EDX CALL 0x0016ca83 MOV RDI,RBX MOV RSI,RAX CALL 0x0016cd21 MOV RDI,RBX MOV RSI,RBP MOV RDX,RAX CALL 0x0016ae99 MOVSXD RDX,dword ptr [R14 + 0x4] MOVSXD R8,dword ptr [R14] MOV RDI,RBX MOV RSI,RAX MOV RCX,R12 MOV R9,R13 CALL 0x0016bf70 MOV RDI,RBX MOV RSI,RAX XOR EDX,EDX PUSH 0x2 POP RCX PUSH 0x1 POP R8 PUSH 0x3 POP R9 CALL 0x0016c249 MOV RDI,RBX MOV RSI,RAX CALL 0x0016b8ee MOVSXD RCX,dword ptr [R14 + 0x4] MOVSXD RDX,dword ptr [R14] IMUL RDX,RCX IMUL R12,R13 MOV RDI,RBX MOV RSI,RAX MOV RCX,R12 CALL 0x0016bcdb MOV RDX,qword ptr [R14 + 0x40] MOV RCX,qword ptr [R14 + 0x48] MOV RDI,RBX MOV RSI,RAX CALL 0x0011ce6c MOV RDI,RBX MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x10] CALL 0x00169a53 MOV R15,RAX MOV RDX,qword ptr [R14 + 0x80] MOV RCX,qword ptr [R14 + 0x88] MOV RDI,RBX MOV RSI,RAX CALL 0x0011cfa2 MOV RDX,qword ptr [R14 + 0x60] MOV RCX,qword ptr [R14 + 0x68] MOV RDI,RBX MOV RSI,RAX CALL 0x0011ce6c MOV ECX,dword ptr [RSP + 0x4] AND ECX,0xfffffeff MOV RDI,RBX MOV RSI,RAX CMP ECX,0x400 JNZ 0x00135c30 CALL 0x0016ab98 JMP 0x00135c35 LAB_00135c30: CALL 0x0016aba8 LAB_00135c35: MOV RDX,qword ptr [R14 + 0x70] MOV RCX,qword ptr [R14 + 0x78] MOV RDI,RBX MOV RSI,RAX CALL 0x0011ce6c MOV RDI,RBX MOV RSI,RAX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00169a53
/* ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*) */ void ResidualAttentionBlock::forward(ggml_context *param_1,ggml_tensor *param_2) { int iVar1; int iVar2; long lVar3; long lVar4; ggml_tensor *pgVar5; int8 uVar6; int8 uVar7; int8 uVar8; ggml_tensor *pgVar9; ggml_tensor *in_RDX; float in_XMM0_Da; float extraout_XMM0_Da; double dVar10; lVar3 = *(long *)(in_RDX + 0x18); lVar4 = *(long *)(in_RDX + 0x20); iVar1 = *(int *)(param_1 + 4); iVar2 = *(int *)param_1; pgVar5 = (ggml_tensor *) ggml_nn_layer_norm((ggml_context *)param_2,in_RDX,*(ggml_tensor **)(param_1 + 0x50), *(ggml_tensor **)(param_1 + 0x58),in_XMM0_Da); uVar6 = ggml_nn_linear((ggml_context *)param_2,pgVar5,*(ggml_tensor **)(param_1 + 0x10), *(ggml_tensor **)(param_1 + 0x18)); dVar10 = (double)*(int *)(param_1 + 4); if (dVar10 < 0.0) { dVar10 = sqrt(dVar10); } else { dVar10 = SQRT(dVar10); } uVar6 = ggml_scale_inplace((float)(DAT_001999f0 / dVar10),param_2,uVar6); uVar6 = ggml_reshape_4d(param_2,uVar6,(long)*(int *)(param_1 + 4),(long)*(int *)param_1,lVar3, lVar4); uVar6 = ggml_permute(param_2,uVar6,0,2,1,3); uVar6 = ggml_cont(param_2,uVar6); uVar6 = ggml_reshape_3d(param_2,uVar6,(long)*(int *)(param_1 + 4),lVar3,*(int *)param_1 * lVar4); uVar7 = ggml_nn_linear((ggml_context *)param_2,pgVar5,*(ggml_tensor **)(param_1 + 0x20), *(ggml_tensor **)(param_1 + 0x28)); uVar7 = ggml_reshape_4d(param_2,uVar7,(long)*(int *)(param_1 + 4),(long)*(int *)param_1,lVar3, lVar4); uVar7 = ggml_permute(param_2,uVar7,0,2,1,3); uVar7 = ggml_cont(param_2,uVar7); uVar7 = ggml_reshape_3d(param_2,uVar7,(long)*(int *)(param_1 + 4),lVar3,(long)*(int *)param_1); uVar8 = ggml_nn_linear((ggml_context *)param_2,pgVar5,*(ggml_tensor **)(param_1 + 0x30), *(ggml_tensor **)(param_1 + 0x38)); uVar8 = ggml_reshape_4d(param_2,uVar8,(long)*(int *)(param_1 + 4),(long)*(int *)param_1,lVar3, lVar4); uVar8 = ggml_permute(param_2,uVar8,1,2,0,3); uVar8 = ggml_cont(param_2,uVar8); uVar8 = ggml_reshape_3d(param_2,uVar8,lVar3,(long)*(int *)(param_1 + 4),*(int *)param_1 * lVar4); uVar6 = ggml_mul_mat(param_2,uVar7,uVar6); uVar6 = ggml_diag_mask_inf_inplace(param_2,uVar6,0); uVar6 = ggml_soft_max_inplace(param_2,uVar6); uVar6 = ggml_mul_mat(param_2,uVar8,uVar6); uVar6 = ggml_reshape_4d(param_2,uVar6,(long)*(int *)(param_1 + 4),lVar3,(long)*(int *)param_1, lVar4); uVar6 = ggml_permute(param_2,uVar6,0,2,1,3); uVar6 = ggml_cont(param_2,uVar6); pgVar5 = (ggml_tensor *) ggml_reshape_2d(param_2,uVar6,(long)*(int *)param_1 * (long)*(int *)(param_1 + 4), lVar3 * lVar4); uVar6 = ggml_nn_linear((ggml_context *)param_2,pgVar5,*(ggml_tensor **)(param_1 + 0x40), *(ggml_tensor **)(param_1 + 0x48)); pgVar5 = (ggml_tensor *)ggml_add(param_2,uVar6,in_RDX); pgVar9 = (ggml_tensor *) ggml_nn_layer_norm((ggml_context *)param_2,pgVar5,*(ggml_tensor **)(param_1 + 0x80), *(ggml_tensor **)(param_1 + 0x88),extraout_XMM0_Da); uVar6 = ggml_nn_linear((ggml_context *)param_2,pgVar9,*(ggml_tensor **)(param_1 + 0x60), *(ggml_tensor **)(param_1 + 0x68)); if ((iVar1 * iVar2 & 0xfffffeffU) == 0x400) { pgVar9 = (ggml_tensor *)ggml_gelu_inplace(); } else { pgVar9 = (ggml_tensor *)ggml_gelu_quick_inplace(param_2,uVar6); } uVar6 = ggml_nn_linear((ggml_context *)param_2,pgVar9,*(ggml_tensor **)(param_1 + 0x70), *(ggml_tensor **)(param_1 + 0x78)); ggml_add(param_2,uVar6,pgVar5); return; }
11,009
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/clip.hpp
struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) { // x: [N, n_token, hidden_size] int64_t N = x->ne[2]; int64_t n_token = x->ne[1]; int64_t hidden_size = n_head * d_model; struct ggml_tensor* r = x; // layer norm 1 x = ggml_nn_layer_norm(ctx, x, ln1_w, ln1_b); // self-attention { struct ggml_tensor* q = ggml_nn_linear(ctx, x, q_w, q_b); q = ggml_scale_inplace(ctx, q, 1.0f / sqrt((float)d_model)); q = ggml_reshape_4d(ctx, q, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] q = ggml_cont(ctx, ggml_permute(ctx, q, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] q = ggml_reshape_3d(ctx, q, d_model, n_token, n_head * N); // [N * n_head, n_token, d_model] struct ggml_tensor* k = ggml_nn_linear(ctx, x, k_w, k_b); k = ggml_reshape_4d(ctx, k, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] k = ggml_cont(ctx, ggml_permute(ctx, k, 0, 2, 1, 3)); // [N, n_head, n_token, d_model] k = ggml_reshape_3d(ctx, k, d_model, n_token, n_head); // [N * n_head, n_token, d_model] struct ggml_tensor* v = ggml_nn_linear(ctx, x, v_w, v_b); v = ggml_reshape_4d(ctx, v, d_model, n_head, n_token, N); // [N, n_token, n_head, d_model] v = ggml_cont(ctx, ggml_permute(ctx, v, 1, 2, 0, 3)); // [N, n_head, d_model, n_token] v = ggml_reshape_3d(ctx, v, n_token, d_model, n_head * N); // [N * n_head, d_model, n_token] struct ggml_tensor* kq = ggml_mul_mat(ctx, k, q); // [N * n_head, n_token, n_token] kq = ggml_diag_mask_inf_inplace(ctx, kq, 0); kq = ggml_soft_max_inplace(ctx, kq); struct ggml_tensor* kqv = ggml_mul_mat(ctx, v, kq); // [N * n_head, n_token, d_model] kqv = ggml_reshape_4d(ctx, kqv, d_model, n_token, n_head, N); kqv = ggml_cont(ctx, ggml_permute(ctx, kqv, 0, 2, 1, 3)); // [N, n_token, n_head, d_model] x = ggml_reshape_2d(ctx, kqv, d_model * n_head, n_token * N); // // [N * n_token, d_model * n_head] } // attention output x = ggml_nn_linear(ctx, x, out_w, out_b); // residual x = ggml_add(ctx, x, r); r = x; // layer norm 2 x = ggml_nn_layer_norm(ctx, x, ln2_w, ln2_b); // mlp x = ggml_nn_linear(ctx, x, fc1_w, fc1_b); if (hidden_size == 1024 || hidden_size == 1280) { // SD 2.x x = ggml_gelu_inplace(ctx, x); } else { // SD 1.x x = ggml_gelu_quick_inplace(ctx, x); } x = ggml_nn_linear(ctx, x, fc2_w, fc2_b); // residual 2 x = ggml_add(ctx, x, r); return x; }
O3
cpp
ResidualAttentionBlock::forward(ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0x18(%rdx), %r12 movq 0x20(%rdx), %r13 movl 0x4(%rdi), %eax imull (%rdi), %eax movl %eax, 0x4(%rsp) movq 0x50(%rdi), %r15 movq 0x58(%rdi), %rbp movss 0x6a354(%rip), %xmm0 # 0xbc918 movq %rsi, %rdi movq %rdx, 0x10(%rsp) movq %rdx, %rsi callq 0x90e35 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x900ae movq %rbx, %rdi movq %rax, %rsi movq %rbp, %rdx callq 0x8f9f3 movq %rax, %rbp movq 0x10(%r14), %rsi movq 0x18(%r14), %r15 movq %rbx, %rdi movq %rax, %rdx callq 0x91177 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x8f9f3 movq %rax, %r15 xorps %xmm0, %xmm0 cvtsi2ssl 0x4(%r14), %xmm0 cvtss2sd %xmm0, %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jb 0x52634 sqrtsd %xmm0, %xmm0 jmp 0x52639 callq 0xa480 movsd 0x6a497(%rip), %xmm1 # 0xbcad8 divsd %xmm0, %xmm1 xorps %xmm0, %xmm0 cvtsd2ss %xmm1, %xmm0 movq %rbx, %rdi movq %r15, %rsi callq 0x91688 movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x91eef movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x92186 movq %rbx, %rdi movq %rax, %rsi callq 0x9196a movslq 0x4(%r14), %rdx movslq (%r14), %r8 imulq %r13, %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x91dfc movq %rax, 0x8(%rsp) movq 0x20(%r14), %rsi movq 0x28(%r14), %r15 movq %rbx, %rdi movq %rbp, %rdx callq 0x91177 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x8f9f3 movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x91eef movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x92186 movq %rbx, %rdi movq %rax, %rsi callq 0x9196a movslq 0x4(%r14), %rdx movslq (%r14), %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x91dfc movq %rax, %r15 movq 0x30(%r14), %rsi movq %rbp, %rdx movq 0x38(%r14), %rbp movq %rbx, %rdi callq 0x91177 movq %rbx, %rdi movq %rax, %rsi movq %rbp, %rdx callq 0x8f9f3 movslq 0x4(%r14), %rdx movslq (%r14), %rcx movq %rbx, %rdi movq %rax, %rsi movq %r12, %r8 movq %r13, %r9 callq 0x91eef movq %rbx, %rdi movq %rax, %rsi movl $0x1, %edx movl $0x2, %ecx xorl %r8d, %r8d movl $0x3, %r9d callq 0x92186 movq %rbx, %rdi movq %rax, %rsi callq 0x9196a movslq 0x4(%r14), %rcx movslq (%r14), %r8 imulq %r13, %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x91dfc movq %rax, %rbp movq %rbx, %rdi movq %r15, %rsi movq 0x8(%rsp), %rdx callq 0x91177 movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx callq 0x9275b movq %rbx, %rdi movq %rax, %rsi callq 0x9295f movq %rbx, %rdi movq %rbp, %rsi movq %rax, %rdx callq 0x91177 movslq 0x4(%r14), %rdx movslq (%r14), %r8 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx movq %r13, %r9 callq 0x91eef movq %rbx, %rdi movq %rax, %rsi xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d movl $0x3, %r9d callq 0x92186 movq %rbx, %rdi movq %rax, %rsi callq 0x9196a movslq 0x4(%r14), %rcx movslq (%r14), %rdx imulq %rcx, %rdx imulq %r13, %r12 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx callq 0x91d16 movq 0x40(%r14), %rsi movq 0x48(%r14), %r15 movq %rbx, %rdi movq %rax, %rdx callq 0x91177 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx callq 0x8f9f3 movq %rbx, %rdi movq %rax, %rsi movq 0x10(%rsp), %rdx callq 0x8f9f3 movq %rax, %r15 movq 0x80(%r14), %r12 movq 0x88(%r14), %r13 movss 0x6a08c(%rip), %xmm0 # 0xbc918 movq %rbx, %rdi movq %rax, %rsi callq 0x90e35 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x900ae movq %rbx, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x8f9f3 movq 0x60(%r14), %rsi movq 0x68(%r14), %r12 movq %rbx, %rdi movq %rax, %rdx callq 0x91177 movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx callq 0x8f9f3 movl 0x4(%rsp), %ecx andl $0xfffffeff, %ecx # imm = 0xFFFFFEFF movq %rbx, %rdi movq %rax, %rsi cmpl $0x400, %ecx # imm = 0x400 jne 0x528f3 callq 0x90ce8 jmp 0x528f8 callq 0x90d1f movq 0x70(%r14), %rsi movq 0x78(%r14), %r14 movq %rbx, %rdi movq %rax, %rdx callq 0x91177 movq %rbx, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x8f9f3 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x8f9f3 nop
_ZN22ResidualAttentionBlock7forwardEP12ggml_contextP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi mov r12, [rdx+18h] mov r13, [rdx+20h] mov eax, [rdi+4] imul eax, [rdi] mov [rsp+48h+var_44], eax mov r15, [rdi+50h] mov rbp, [rdi+58h] movss xmm0, cs:dword_BC918 mov rdi, rsi mov [rsp+48h+var_38], rdx mov rsi, rdx call ggml_norm mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_mul mov rdi, rbx mov rsi, rax mov rdx, rbp call ggml_add mov rbp, rax mov rsi, [r14+10h] mov r15, [r14+18h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_add mov r15, rax xorps xmm0, xmm0 cvtsi2ss xmm0, dword ptr [r14+4] cvtss2sd xmm0, xmm0 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jb short loc_52634 sqrtsd xmm0, xmm0 jmp short loc_52639 loc_52634: call _sqrt loc_52639: movsd xmm1, cs:qword_BCAD8 divsd xmm1, xmm0 xorps xmm0, xmm0 cvtsd2ss xmm0, xmm1 mov rdi, rbx mov rsi, r15 call ggml_scale_inplace movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] imul r8, r13 mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_3d mov [rsp+48h+var_40], rax mov rsi, [r14+20h] mov r15, [r14+28h] mov rdi, rbx mov rdx, rbp call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_add movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_3d mov r15, rax mov rsi, [r14+30h] mov rdx, rbp mov rbp, [r14+38h] mov rdi, rbx call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, rbp call ggml_add movsxd rdx, dword ptr [r14+4] movsxd rcx, dword ptr [r14] mov rdi, rbx mov rsi, rax mov r8, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax mov edx, 1 mov ecx, 2 xor r8d, r8d mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rcx, dword ptr [r14+4] movsxd r8, dword ptr [r14] imul r8, r13 mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_reshape_3d mov rbp, rax mov rdi, rbx mov rsi, r15 mov rdx, [rsp+48h+var_40] call ggml_mul_mat mov rdi, rbx mov rsi, rax xor edx, edx call ggml_diag_mask_inf_inplace mov rdi, rbx mov rsi, rax call ggml_soft_max_inplace mov rdi, rbx mov rsi, rbp mov rdx, rax call ggml_mul_mat movsxd rdx, dword ptr [r14+4] movsxd r8, dword ptr [r14] mov rdi, rbx mov rsi, rax mov rcx, r12 mov r9, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, rax xor edx, edx mov ecx, 2 mov r8d, 1 mov r9d, 3 call ggml_permute mov rdi, rbx mov rsi, rax call ggml_cont movsxd rcx, dword ptr [r14+4] movsxd rdx, dword ptr [r14] imul rdx, rcx imul r12, r13 mov rdi, rbx mov rsi, rax mov rcx, r12 call ggml_reshape_2d mov rsi, [r14+40h] mov r15, [r14+48h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r15 call ggml_add mov rdi, rbx mov rsi, rax mov rdx, [rsp+48h+var_38] call ggml_add mov r15, rax mov r12, [r14+80h] mov r13, [r14+88h] movss xmm0, cs:dword_BC918 mov rdi, rbx mov rsi, rax call ggml_norm mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_mul mov rdi, rbx mov rsi, rax mov rdx, r13 call ggml_add mov rsi, [r14+60h] mov r12, [r14+68h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r12 call ggml_add mov ecx, [rsp+48h+var_44] and ecx, 0FFFFFEFFh mov rdi, rbx mov rsi, rax cmp ecx, 400h jnz short loc_528F3 call ggml_gelu_inplace jmp short loc_528F8 loc_528F3: call ggml_gelu_quick_inplace loc_528F8: mov rsi, [r14+70h] mov r14, [r14+78h] mov rdi, rbx mov rdx, rax call ggml_mul_mat mov rdi, rbx mov rsi, rax mov rdx, r14 call ggml_add mov rdi, rbx mov rsi, rax mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ggml_add
long long ResidualAttentionBlock::forward(int *a1, long long a2, long long a3) { long long v4; // r12 long long v5; // r13 long long v6; // r15 long long v7; // rbp long long v8; // rax long long v9; // rax long long v10; // rbp long long v11; // r15 long long v12; // rax long long v13; // r15 double v14; // xmm0_8 double v15; // xmm0_8 float v16; // xmm0_4 long long v17; // rax long long v18; // rax long long v19; // rax long long v20; // rax long long v21; // r15 long long v22; // rax long long v23; // rax long long v24; // rax long long v25; // rax long long v26; // rax long long v27; // r15 long long v28; // rdx long long v29; // rbp long long v30; // rax long long v31; // rax long long v32; // rax long long v33; // rax long long v34; // rax long long v35; // rbp long long v36; // rax long long v37; // rax long long v38; // rax long long v39; // rax long long v40; // rax long long v41; // rax long long v42; // rax long long v43; // rax long long v44; // r15 long long v45; // rax long long v46; // rax long long v47; // r15 long long v48; // r12 long long v49; // r13 long long v50; // rax long long v51; // rax long long v52; // rax long long v53; // r12 long long v54; // rax long long v55; // rsi long long v56; // rax long long v57; // r14 long long v58; // rax long long v59; // rax int v61; // [rsp+4h] [rbp-44h] long long v62; // [rsp+8h] [rbp-40h] v4 = *(_QWORD *)(a3 + 24); v5 = *(_QWORD *)(a3 + 32); v61 = *a1 * a1[1]; v6 = *((_QWORD *)a1 + 10); v7 = *((_QWORD *)a1 + 11); v8 = ggml_norm(a2, a3, 0.0000099999997); v9 = ggml_mul(a2, v8, v6); v10 = ggml_add(a2, v9, v7); v11 = *((_QWORD *)a1 + 3); v12 = ggml_mul_mat(a2, *((_QWORD *)a1 + 2), v10); v13 = ggml_add(a2, v12, v11); v14 = (float)a1[1]; if ( v14 < 0.0 ) v15 = sqrt(v14); else v15 = sqrt(v14); v16 = 1.0 / v15; v17 = ggml_scale_inplace(a2, v13, v16); v18 = ggml_reshape_4d(a2, v17, a1[1], *a1, v4, v5); v19 = ggml_permute(a2, v18, 0LL, 2LL, 1LL, 3LL); v20 = ggml_cont(a2, v19); v62 = ggml_reshape_3d(a2, v20, a1[1], v4, v5 * *a1); v21 = *((_QWORD *)a1 + 5); v22 = ggml_mul_mat(a2, *((_QWORD *)a1 + 4), v10); v23 = ggml_add(a2, v22, v21); v24 = ggml_reshape_4d(a2, v23, a1[1], *a1, v4, v5); v25 = ggml_permute(a2, v24, 0LL, 2LL, 1LL, 3LL); v26 = ggml_cont(a2, v25); v27 = ggml_reshape_3d(a2, v26, a1[1], v4, *a1); v28 = v10; v29 = *((_QWORD *)a1 + 7); v30 = ggml_mul_mat(a2, *((_QWORD *)a1 + 6), v28); v31 = ggml_add(a2, v30, v29); v32 = ggml_reshape_4d(a2, v31, a1[1], *a1, v4, v5); v33 = ggml_permute(a2, v32, 1LL, 2LL, 0LL, 3LL); v34 = ggml_cont(a2, v33); v35 = ggml_reshape_3d(a2, v34, v4, a1[1], v5 * *a1); v36 = ggml_mul_mat(a2, v27, v62); v37 = ggml_diag_mask_inf_inplace(a2, v36, 0LL); v38 = ggml_soft_max_inplace(a2, v37); v39 = ggml_mul_mat(a2, v35, v38); v40 = ggml_reshape_4d(a2, v39, a1[1], v4, *a1, v5); v41 = ggml_permute(a2, v40, 0LL, 2LL, 1LL, 3LL); v42 = ggml_cont(a2, v41); v43 = ggml_reshape_2d(a2, v42, a1[1] * (long long)*a1, v5 * v4); v44 = *((_QWORD *)a1 + 9); v45 = ggml_mul_mat(a2, *((_QWORD *)a1 + 8), v43); v46 = ggml_add(a2, v45, v44); v47 = ggml_add(a2, v46, a3); v48 = *((_QWORD *)a1 + 16); v49 = *((_QWORD *)a1 + 17); v50 = ggml_norm(a2, v47, 0.0000099999997); v51 = ggml_mul(a2, v50, v48); v52 = ggml_add(a2, v51, v49); v53 = *((_QWORD *)a1 + 13); v54 = ggml_mul_mat(a2, *((_QWORD *)a1 + 12), v52); v55 = ggml_add(a2, v54, v53); if ( (v61 & 0xFFFFFEFF) == 0x400 ) v56 = ggml_gelu_inplace(a2, v55); else v56 = ggml_gelu_quick_inplace(a2, v55); v57 = *((_QWORD *)a1 + 15); v58 = ggml_mul_mat(a2, *((_QWORD *)a1 + 14), v56); v59 = ggml_add(a2, v58, v57); return ggml_add(a2, v59, v47); }
11,010
store_page_range
eloqsql/storage/maria/ma_blockrec.c
static uchar *store_page_range(MARIA_SHARE *share, uchar *to, MARIA_BITMAP_BLOCK *block, ulong length, uint *tot_ranges) { uint data_size= FULL_PAGE_SIZE(share); ulong pages_left= (length + data_size -1) / data_size; uint page_count, ranges, empty_space; uchar *to_start; DBUG_ENTER("store_page_range"); to_start= to; to+= SUB_RANGE_SIZE; /* Store number of unused bytes at last page */ empty_space= (uint) (pages_left * data_size - length); int2store(to, empty_space); to+= BLOCK_FILLER_SIZE; ranges= 0; do { pgcache_page_no_t page; page= block->page; page_count= block->page_count; block++; if (page_count > pages_left) page_count= pages_left; page_store(to, page); to+= PAGE_STORE_SIZE; pagerange_store(to, page_count); to+= PAGERANGE_STORE_SIZE; ranges++; } while ((pages_left-= page_count)); /* Store number of ranges for this block */ int2store(to_start, ranges); (*tot_ranges)+= ranges; DBUG_RETURN(to); }
O0
c
store_page_range: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0x7bc(%rax), %eax movq -0x8(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0x8, %ecx subl %ecx, %eax subl $0x4, %eax movl %eax, -0x2c(%rbp) movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax subq $0x1, %rax movl -0x2c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rax movl -0x2c(%rbp), %ecx imulq %rcx, %rax subq -0x20(%rbp), %rax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movl -0x44(%rbp), %eax movw %ax, %cx movq -0x58(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movl $0x0, -0x40(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x18(%rbp) movl -0x3c(%rbp), %eax cmpq -0x38(%rbp), %rax jbe 0x81fb0 movq -0x38(%rbp), %rax movl %eax, -0x3c(%rbp) jmp 0x81fb2 movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movl %eax, %ecx movq -0x68(%rbp), %rax movl %ecx, (%rax) movq -0x60(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x68(%rbp), %rax movb %cl, 0x4(%rax) movq -0x10(%rbp), %rax addq $0x5, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x3c(%rbp), %eax movw %ax, %cx movq -0x70(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movl -0x40(%rbp), %eax addl $0x1, %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax movl %eax, %ecx movq -0x38(%rbp), %rax subq %rcx, %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x81f7f jmp 0x82029 movq -0x50(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x40(%rbp), %eax movw %ax, %cx movq -0x78(%rbp), %rax movw %cx, (%rax) movl -0x40(%rbp), %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
store_page_range: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov eax, [rax+7BCh] mov rcx, [rbp+var_8] mov ecx, [rcx+0C18h] add ecx, 8 sub eax, ecx sub eax, 4 mov [rbp+var_2C], eax mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] add rax, rcx sub rax, 1 mov ecx, [rbp+var_2C] xor edx, edx div rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_50], rax mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov rax, [rbp+var_38] mov ecx, [rbp+var_2C] imul rax, rcx sub rax, [rbp+var_20] mov [rbp+var_44], eax mov rax, [rbp+var_10] mov [rbp+var_58], rax mov eax, [rbp+var_44] mov cx, ax mov rax, [rbp+var_58] mov [rax], cx mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov [rbp+var_40], 0 loc_81F7F: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_18], rax mov eax, [rbp+var_3C] cmp rax, [rbp+var_38] jbe short loc_81FB0 mov rax, [rbp+var_38] mov [rbp+var_3C], eax loc_81FB0: jmp short $+2 loc_81FB2: mov rax, [rbp+var_10] mov [rbp+var_68], rax mov rax, [rbp+var_60] mov ecx, eax mov rax, [rbp+var_68] mov [rax], ecx mov rax, [rbp+var_60] shr rax, 20h mov cl, al mov rax, [rbp+var_68] mov [rax+4], cl mov rax, [rbp+var_10] add rax, 5 mov [rbp+var_10], rax mov rax, [rbp+var_10] mov [rbp+var_70], rax mov eax, [rbp+var_3C] mov cx, ax mov rax, [rbp+var_70] mov [rax], cx mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov eax, [rbp+var_40] add eax, 1 mov [rbp+var_40], eax mov eax, [rbp+var_3C] mov ecx, eax mov rax, [rbp+var_38] sub rax, rcx mov [rbp+var_38], rax cmp rax, 0 jnz loc_81F7F jmp short $+2 loc_82029: mov rax, [rbp+var_50] mov [rbp+var_78], rax mov eax, [rbp+var_40] mov cx, ax mov rax, [rbp+var_78] mov [rax], cx mov ecx, [rbp+var_40] mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_10] mov [rbp+var_80], rax mov rax, [rbp+var_80] pop rbp retn
_WORD * store_page_range(long long a1, _WORD *a2, long long *a3, long long a4, _DWORD *a5) { long long v6; // [rsp+20h] [rbp-60h] int v7; // [rsp+40h] [rbp-40h] unsigned int v8; // [rsp+44h] [rbp-3Ch] unsigned long long v9; // [rsp+48h] [rbp-38h] unsigned int v10; // [rsp+54h] [rbp-2Ch] _WORD *v12; // [rsp+70h] [rbp-10h] v10 = *(_DWORD *)(a1 + 1980) - (*(_DWORD *)(a1 + 3096) + 8) - 4; v9 = ((unsigned long long)v10 + a4 - 1) / v10; a2[1] = v10 * v9 - a4; v12 = a2 + 2; v7 = 0; do { v6 = *a3; v8 = *((_DWORD *)a3 + 2); a3 += 3; if ( v8 > v9 ) v8 = v9; *(_DWORD *)v12 = v6; *((_BYTE *)v12 + 4) = BYTE4(v6); *(_WORD *)((char *)v12 + 5) = v8; v12 = (_WORD *)((char *)v12 + 7); ++v7; v9 -= v8; } while ( v9 ); *a2 = v7; *a5 += v7; return v12; }
store_page_range: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x7bc] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x8 SUB EAX,ECX SUB EAX,0x4 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX SUB RAX,0x1 MOV ECX,dword ptr [RBP + -0x2c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x2c] IMUL RAX,RCX SUB RAX,qword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x44] MOV CX,AX MOV RAX,qword ptr [RBP + -0x58] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x40],0x0 LAB_00181f7f: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x3c] CMP RAX,qword ptr [RBP + -0x38] JBE 0x00181fb0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x3c],EAX LAB_00181fb0: JMP 0x00181fb2 LAB_00181fb2: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x68] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x5 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x70] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV EAX,dword ptr [RBP + -0x40] ADD EAX,0x1 MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x00181f7f JMP 0x00182029 LAB_00182029: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x78],RAX MOV EAX,dword ptr [RBP + -0x40] MOV CX,AX MOV RAX,qword ptr [RBP + -0x78] MOV word ptr [RAX],CX MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] POP RBP RET
int4 * store_page_range(long param_1,int2 *param_2,int8 *param_3,long param_4,int *param_5) { int8 uVar1; uint uVar2; int local_48; uint local_44; ulong local_40; int8 *local_20; int4 *local_18; uVar2 = (*(int *)(param_1 + 0x7bc) - (*(int *)(param_1 + 0xc18) + 8)) - 4; local_40 = ((param_4 + (ulong)uVar2) - 1) / (ulong)uVar2; param_2[1] = (short)local_40 * (short)uVar2 - (short)param_4; local_18 = (int4 *)(param_2 + 2); local_48 = 0; local_20 = param_3; do { uVar1 = *local_20; local_44 = *(uint *)(local_20 + 1); local_20 = local_20 + 3; if (local_40 < local_44) { local_44 = (uint)local_40; } *local_18 = (int)uVar1; *(char *)(local_18 + 1) = (char)((ulong)uVar1 >> 0x20); *(short *)((long)local_18 + 5) = (short)local_44; local_18 = (int4 *)((long)local_18 + 7); local_48 = local_48 + 1; local_40 = local_40 - local_44; } while (local_40 != 0); *param_2 = (short)local_48; *param_5 = local_48 + *param_5; return local_18; }
11,011
pagecache_unpin
eloqsql/storage/maria/ma_pagecache.c
void pagecache_unpin(PAGECACHE *pagecache, PAGECACHE_FILE *file, pgcache_page_no_t pageno, LSN lsn) { PAGECACHE_BLOCK_LINK *block; int page_st; DBUG_ENTER("pagecache_unpin"); DBUG_PRINT("enter", ("fd: %u page: %lu", (uint) file->file, (ulong) pageno)); pagecache_pthread_mutex_lock(&pagecache->cache_lock); /* As soon as we keep lock cache can be used, and we have lock bacause want aunlock. */ DBUG_ASSERT(pagecache->can_be_used); inc_counter_for_resize_op(pagecache); /* See NOTE for pagecache_unlock about registering requests */ block= find_block(pagecache, file, pageno, 0, 0, 0, 0, FALSE, &page_st); DBUG_ASSERT(block != 0); DBUG_ASSERT(page_st == PAGE_READ); /* we can't unpin such page without unlock */ DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0); if (lsn != LSN_IMPOSSIBLE) check_and_set_lsn(pagecache, lsn, block); /* we can just unpin only with keeping read lock because: a) we can't pin without any lock b) we can't unpin keeping write lock */ if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_LEFT_READLOCKED, PAGECACHE_UNPIN, FALSE)) DBUG_ASSERT(0); /* should not happend */ remove_reader(block); /* Link the block into the LRU chain if it's the last submitted request for the block and block will not be pinned. See NOTE for pagecache_unlock about registering requests */ unreg_request(pagecache, block, 1); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_VOID_RETURN; }
O0
c
pagecache_unpin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) jmp 0x5865a movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0xf8f5b(%rip), %rsi # 0x1515c7 movl $0xcef, %edx # imm = 0xCEF callq 0x57500 jmp 0x58678 movq -0x8(%rbp), %rdi callq 0x578b0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx xorl %r9d, %r9d leaq -0x2c(%rbp), %rax movl %r9d, %ecx movl %r9d, %r8d movl $0x0, (%rsp) movl $0x0, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x578d0 movq %rax, -0x28(%rbp) jmp 0x586b9 jmp 0x586bb jmp 0x586bd jmp 0x586bf jmp 0x586c1 cmpq $0x0, -0x20(%rbp) je 0x586d9 movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x58120 movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi movl $0x1, %edx movl $0x3, %ecx xorl %r8d, %r8d callq 0x582c0 cmpb $0x0, %al je 0x586fd jmp 0x586f9 jmp 0x586fb jmp 0x586fd movq -0x28(%rbp), %rdi callq 0x58410 movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi movl $0x1, %edx callq 0x58460 movq -0x8(%rbp), %rdi callq 0x585e0 movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x57570 jmp 0x58733 addq $0x50, %rsp popq %rbp retq nopl (%rax)
pagecache_unpin: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx jmp short $+2 loc_5865A: mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0CEFh call inline_mysql_mutex_lock_8 jmp short $+2 loc_58678: mov rdi, [rbp+var_8] call inc_counter_for_resize_op mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] xor r9d, r9d lea rax, [rbp+var_2C] mov ecx, r9d mov r8d, r9d mov [rsp+50h+var_50], 0 mov [rsp+50h+var_48], 0 mov [rsp+50h+var_40], rax call find_block mov [rbp+var_28], rax jmp short $+2 loc_586B9: jmp short $+2 loc_586BB: jmp short $+2 loc_586BD: jmp short $+2 loc_586BF: jmp short $+2 loc_586C1: cmp [rbp+var_20], 0 jz short loc_586D9 mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call check_and_set_lsn loc_586D9: mov rdi, [rbp+var_8] mov rsi, [rbp+var_28] mov edx, 1 mov ecx, 3 xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_586FD jmp short $+2 loc_586F9: jmp short $+2 loc_586FB: jmp short $+2 loc_586FD: mov rdi, [rbp+var_28] call remove_reader mov rdi, [rbp+var_8] mov rsi, [rbp+var_28] mov edx, 1 call unreg_request mov rdi, [rbp+var_8] call dec_counter_for_resize_op mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_8 jmp short $+2 loc_58733: add rsp, 50h pop rbp retn
long long pagecache_unpin(_QWORD *a1, long long a2, long long a3, long long a4, double a5) { int v6; // [rsp+24h] [rbp-2Ch] BYREF long long block; // [rsp+28h] [rbp-28h] long long v8; // [rsp+30h] [rbp-20h] long long v9; // [rsp+38h] [rbp-18h] long long v10; // [rsp+40h] [rbp-10h] _QWORD *v11; // [rsp+48h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; inline_mysql_mutex_lock_8( (long long)(a1 + 25), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xCEFu); inc_counter_for_resize_op((long long)a1); block = find_block((long long)a1, a2, v9, 0, 0, 0, a5, 0, 0, &v6); if ( v8 ) check_and_set_lsn((long long)v11, v8, block); make_lock_and_pin((long long)v11, block, 1, 3, 0); remove_reader(block); unreg_request(v11, block, 1); dec_counter_for_resize_op((long long)v11); return inline_mysql_mutex_unlock_8((long long)(v11 + 25)); }
pagecache_unpin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX JMP 0x0015865a LAB_0015865a: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x2515c7] MOV EDX,0xcef CALL 0x00157500 JMP 0x00158678 LAB_00158678: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001578b0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] XOR R9D,R9D LEA RAX,[RBP + -0x2c] MOV ECX,R9D MOV R8D,R9D MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],RAX CALL 0x001578d0 MOV qword ptr [RBP + -0x28],RAX JMP 0x001586b9 LAB_001586b9: JMP 0x001586bb LAB_001586bb: JMP 0x001586bd LAB_001586bd: JMP 0x001586bf LAB_001586bf: JMP 0x001586c1 LAB_001586c1: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001586d9 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00158120 LAB_001586d9: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x1 MOV ECX,0x3 XOR R8D,R8D CALL 0x001582c0 CMP AL,0x0 JZ 0x001586fd JMP 0x001586f9 LAB_001586f9: JMP 0x001586fb LAB_001586fb: JMP 0x001586fd LAB_001586fd: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00158410 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x1 CALL 0x00158460 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001585e0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x00157570 JMP 0x00158733 LAB_00158733: ADD RSP,0x50 POP RBP RET
void pagecache_unpin(long param_1,int8 param_2,int8 param_3,long param_4) { int1 local_34 [4]; int8 local_30; long local_28; int8 local_20; int8 local_18; long local_10; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xcef); inc_counter_for_resize_op(local_10); local_30 = find_block(local_10,local_18,local_20,0,0,0,0,0,local_34); if (local_28 != 0) { check_and_set_lsn(local_10,local_28,local_30); } make_lock_and_pin(local_10,local_30,1,3,0); remove_reader(local_30); unreg_request(local_10,local_30,1); dec_counter_for_resize_op(local_10); inline_mysql_mutex_unlock(local_10 + 200); return; }
11,012
safe_hash_set
eloqsql/mysys/my_safehash.c
my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length, uchar *data) { SAFE_HASH_ENTRY *entry; my_bool error= 0; DBUG_ENTER("safe_hash_set"); DBUG_PRINT("enter",("key: %.*s data: %p", length, key, data)); mysql_rwlock_wrlock(&hash->mutex); entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length); if (data == hash->default_value) { /* The key is to be associated with the default entry. In this case we can just delete the entry (if it existed) from the hash as a search will return the default entry */ if (!entry) /* nothing to do */ goto end; /* unlink entry from list */ if ((*entry->prev= entry->next)) entry->next->prev= entry->prev; my_hash_delete(&hash->hash, (uchar*) entry); goto end; } if (entry) { /* Entry existed; Just change the pointer to point at the new data */ entry->data= data; } else { if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(key_memory_SAFE_HASH_ENTRY, sizeof(*entry) + length, MYF(MY_WME)))) { error= 1; goto end; } entry->key= (uchar*) (entry +1); memcpy((char*) entry->key, (char*) key, length); entry->length= length; entry->data= data; /* Link entry to list */ if ((entry->next= hash->root)) entry->next->prev= &entry->next; entry->prev= &hash->root; hash->root= entry; if (my_hash_insert(&hash->hash, (uchar*) entry)) { /* This can only happen if hash got out of memory */ my_free(entry); error= 1; goto end; } } end: mysql_rwlock_unlock(&hash->mutex); DBUG_RETURN(error); }
O3
c
safe_hash_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r12 movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x90(%rdi) jne 0xa6130 movq %rbx, %rdi callq 0xa4445 leaq 0x98(%rbx), %r13 movl %r15d, -0x2c(%rbp) movl %r15d, %r15d movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x93caa cmpq %r12, 0x108(%rbx) je 0xa604e testq %rax, %rax je 0xa60a3 movq %r12, 0x10(%rax) jmp 0xa6076 testq %rax, %rax je 0xa6076 movq 0x18(%rax), %rcx movq 0x20(%rax), %rdx movq %rcx, (%rdx) testq %rcx, %rcx je 0xa606b movq 0x20(%rax), %rdx movq %rdx, 0x20(%rcx) movq %r13, %rdi movq %rax, %rsi callq 0x9420e xorl %r14d, %r14d movq 0x90(%rbx), %rdi testq %rdi, %rdi jne 0xa6149 movq %rbx, %rdi callq 0xa44e6 movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, -0x38(%rbp) leaq 0xb62626(%rip), %rax # 0xc086d4 movl (%rax), %edi leaq 0x28(%r15), %rsi movl $0x10, %edx callq 0x9fdb1 testq %rax, %rax je 0xa6128 movq %rax, %r13 leaq 0x28(%rax), %rdi movq %rdi, (%rax) movq %r14, %rsi movq %r15, %rdx callq 0x29080 movl -0x2c(%rbp), %eax movl %eax, 0x8(%r13) movq %r12, 0x10(%r13) leaq 0x110(%rbx), %rax movq 0x110(%rbx), %rcx movq %rcx, 0x18(%r13) testq %rcx, %rcx je 0xa6105 movq %r13, %rdx addq $0x18, %rdx movq %rdx, 0x20(%rcx) movq %rax, 0x20(%r13) movq %r13, (%rax) movq -0x38(%rbp), %rdi movq %r13, %rsi callq 0x93f0a testb %al, %al je 0xa6076 movq %r13, %rdi callq 0x9ffde movb $0x1, %r14b jmp 0xa6079 leaq 0x367d4(%rip), %rsi # 0xdc90b movq %rbx, %rdi movl $0xcf, %edx callq 0x2ed7b jmp 0xa601e leaq 0x2dfec0(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0xa6089
safe_hash_set: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rcx mov r15d, edx mov r14, rsi mov rbx, rdi cmp qword ptr [rdi+90h], 0 jnz loc_A6130 mov rdi, rbx call my_rw_wrlock loc_A601E: lea r13, [rbx+98h] mov [rbp+var_2C], r15d mov r15d, r15d mov rdi, r13 mov rsi, r14 mov rdx, r15 call my_hash_search cmp [rbx+108h], r12 jz short loc_A604E test rax, rax jz short loc_A60A3 mov [rax+10h], r12 jmp short loc_A6076 loc_A604E: test rax, rax jz short loc_A6076 mov rcx, [rax+18h] mov rdx, [rax+20h] mov [rdx], rcx test rcx, rcx jz short loc_A606B mov rdx, [rax+20h] mov [rcx+20h], rdx loc_A606B: mov rdi, r13 mov rsi, rax call my_hash_delete loc_A6076: xor r14d, r14d loc_A6079: mov rdi, [rbx+90h] test rdi, rdi jnz loc_A6149 loc_A6089: mov rdi, rbx call my_rw_unlock mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A60A3: mov [rbp+var_38], r13 lea rax, key_memory_SAFE_HASH_ENTRY mov edi, [rax] lea rsi, [r15+28h] mov edx, 10h call my_malloc test rax, rax jz short loc_A6128 mov r13, rax lea rdi, [rax+28h] mov [rax], rdi mov rsi, r14 mov rdx, r15 call _memcpy mov eax, [rbp+var_2C] mov [r13+8], eax mov [r13+10h], r12 lea rax, [rbx+110h] mov rcx, [rbx+110h] mov [r13+18h], rcx test rcx, rcx jz short loc_A6105 mov rdx, r13 add rdx, 18h mov [rcx+20h], rdx loc_A6105: mov [r13+20h], rax mov [rax], r13 mov rdi, [rbp+var_38] mov rsi, r13 call my_hash_insert test al, al jz loc_A6076 mov rdi, r13 call my_free loc_A6128: mov r14b, 1 jmp loc_A6079 loc_A6130: lea rsi, aWorkspaceLlm4b_41; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 0CFh call psi_rwlock_wrlock jmp loc_A601E loc_A6149: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_A6089
long long safe_hash_set(_QWORD *a1, long long a2, unsigned int a3, long long a4) { unsigned int v6; // r14d long long v7; // rax long long v8; // rcx _QWORD *v10; // rax long long v11; // r13 long long *v12; // rax long long v13; // rcx v6 = a2; if ( a1[18] ) psi_rwlock_wrlock((long long)a1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 0xCFu); else my_rw_wrlock((long long)a1); v7 = my_hash_search((long long)(a1 + 19), a2, a3); if ( a1[33] == a4 ) { if ( v7 ) { v8 = *(_QWORD *)(v7 + 24); **(_QWORD **)(v7 + 32) = v8; if ( v8 ) *(_QWORD *)(v8 + 32) = *(_QWORD *)(v7 + 32); my_hash_delete((long long)(a1 + 19), v7); } goto LABEL_10; } if ( v7 ) { *(_QWORD *)(v7 + 16) = a4; LABEL_10: v6 = 0; goto LABEL_11; } v10 = (_QWORD *)my_malloc(key_memory_SAFE_HASH_ENTRY, (const char *)(a3 + 40LL), 16); if ( v10 ) { v11 = (long long)v10; *v10 = v10 + 5; memcpy(v10 + 5, a2, a3); *(_DWORD *)(v11 + 8) = a3; *(_QWORD *)(v11 + 16) = a4; v12 = a1 + 34; v13 = a1[34]; *(_QWORD *)(v11 + 24) = v13; if ( v13 ) *(_QWORD *)(v13 + 32) = v11 + 24; *(_QWORD *)(v11 + 32) = v12; *v12 = v11; if ( !my_hash_insert((long long)(a1 + 19), v11) ) goto LABEL_10; my_free(v11); } LOBYTE(v6) = 1; LABEL_11: if ( a1[18] ) PSI_server[45](); my_rw_unlock((long long)a1); return v6; }
safe_hash_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RCX MOV R15D,EDX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RDI + 0x90],0x0 JNZ 0x001a6130 MOV RDI,RBX CALL 0x001a4445 LAB_001a601e: LEA R13,[RBX + 0x98] MOV dword ptr [RBP + -0x2c],R15D MOV R15D,R15D MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 CALL 0x00193caa CMP qword ptr [RBX + 0x108],R12 JZ 0x001a604e TEST RAX,RAX JZ 0x001a60a3 MOV qword ptr [RAX + 0x10],R12 JMP 0x001a6076 LAB_001a604e: TEST RAX,RAX JZ 0x001a6076 MOV RCX,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] MOV qword ptr [RDX],RCX TEST RCX,RCX JZ 0x001a606b MOV RDX,qword ptr [RAX + 0x20] MOV qword ptr [RCX + 0x20],RDX LAB_001a606b: MOV RDI,R13 MOV RSI,RAX CALL 0x0019420e LAB_001a6076: XOR R14D,R14D LAB_001a6079: MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JNZ 0x001a6149 LAB_001a6089: MOV RDI,RBX CALL 0x001a44e6 MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a60a3: MOV qword ptr [RBP + -0x38],R13 LEA RAX,[0xd086d4] MOV EDI,dword ptr [RAX] LEA RSI,[R15 + 0x28] MOV EDX,0x10 CALL 0x0019fdb1 TEST RAX,RAX JZ 0x001a6128 MOV R13,RAX LEA RDI,[RAX + 0x28] MOV qword ptr [RAX],RDI MOV RSI,R14 MOV RDX,R15 CALL 0x00129080 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [R13 + 0x8],EAX MOV qword ptr [R13 + 0x10],R12 LEA RAX,[RBX + 0x110] MOV RCX,qword ptr [RBX + 0x110] MOV qword ptr [R13 + 0x18],RCX TEST RCX,RCX JZ 0x001a6105 MOV RDX,R13 ADD RDX,0x18 MOV qword ptr [RCX + 0x20],RDX LAB_001a6105: MOV qword ptr [R13 + 0x20],RAX MOV qword ptr [RAX],R13 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R13 CALL 0x00193f0a TEST AL,AL JZ 0x001a6076 MOV RDI,R13 CALL 0x0019ffde LAB_001a6128: MOV R14B,0x1 JMP 0x001a6079 LAB_001a6130: LEA RSI,[0x1dc90b] MOV RDI,RBX MOV EDX,0xcf CALL 0x0012ed7b JMP 0x001a601e LAB_001a6149: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x001a6089
ulong safe_hash_set(long param_1,void *param_2,uint param_3,long param_4) { long lVar1; long lVar2; char cVar3; long lVar4; int8 *puVar5; ulong uVar6; if (*(long *)(param_1 + 0x90) == 0) { my_rw_wrlock(param_1); } else { psi_rwlock_wrlock(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xcf); } lVar1 = param_1 + 0x98; uVar6 = (ulong)param_3; lVar4 = my_hash_search(lVar1,param_2,uVar6); if (*(long *)(param_1 + 0x108) == param_4) { if (lVar4 != 0) { lVar2 = *(long *)(lVar4 + 0x18); **(long **)(lVar4 + 0x20) = lVar2; if (lVar2 != 0) { *(int8 *)(lVar2 + 0x20) = *(int8 *)(lVar4 + 0x20); } my_hash_delete(lVar1,lVar4); } } else { if (lVar4 == 0) { puVar5 = (int8 *)my_malloc(key_memory_SAFE_HASH_ENTRY,uVar6 + 0x28,0x10); if (puVar5 != (int8 *)0x0) { *puVar5 = puVar5 + 5; memcpy(puVar5 + 5,param_2,uVar6); *(uint *)(puVar5 + 1) = param_3; puVar5[2] = param_4; lVar4 = *(long *)(param_1 + 0x110); puVar5[3] = lVar4; if (lVar4 != 0) { *(int8 **)(lVar4 + 0x20) = puVar5 + 3; } puVar5[4] = (int8 *)(param_1 + 0x110); *(int8 *)(param_1 + 0x110) = puVar5; cVar3 = my_hash_insert(lVar1,puVar5); if (cVar3 == '\0') goto LAB_001a6076; my_free(puVar5); } uVar6 = CONCAT71((int7)((ulong)param_2 >> 8),1); goto LAB_001a6079; } *(long *)(lVar4 + 0x10) = param_4; } LAB_001a6076: uVar6 = 0; LAB_001a6079: if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(param_1); return uVar6 & 0xffffffff; }
11,013
my_compress_alloc
eloqsql/mysys/my_compress.c
uchar *my_compress_alloc(const uchar *packet, size_t *len, size_t *complen) { uchar *compbuf; int res; *complen= *len * 120 / 100 + 12; if (!(compbuf= (uchar *) my_malloc(key_memory_my_compress_alloc, *complen, MYF(MY_WME)))) return 0; res= my_compress_buffer(compbuf, complen, packet, *len); if (res != Z_OK) { my_free(compbuf); return 0; } if (*complen >= *len) { *complen= 0; my_free(compbuf); DBUG_PRINT("note",("Packet got longer on compression; Not compressed")); return 0; } /* Store length of compressed packet in *len */ swap_variables(size_t, *len, *complen); return compbuf; }
O0
c
my_compress_alloc: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax imulq $0x78, (%rax), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx addq $0xc, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) leaq 0xb96111(%rip), %rax # 0xc4c01c movl (%rax), %edi movq -0x20(%rbp), %rax movq (%rax), %rsi movl $0x10, %edx callq 0xbe600 movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0xb5f35 movq $0x0, -0x8(%rbp) jmp 0xb5fc7 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rax movq (%rax), %rcx callq 0xb6040 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0xb5f69 movq -0x28(%rbp), %rdi callq 0xbe980 movq $0x0, -0x8(%rbp) jmp 0xb5fc7 movq -0x20(%rbp), %rax movq (%rax), %rax movq -0x18(%rbp), %rcx cmpq (%rcx), %rax jb 0xb5f99 movq -0x20(%rbp), %rax movq $0x0, (%rax) movq -0x28(%rbp), %rdi callq 0xbe980 jmp 0xb5f8f movq $0x0, -0x8(%rbp) jmp 0xb5fc7 jmp 0xb5f9b movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_compress_alloc: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] imul rax, [rax], 78h ; 'x' mov ecx, 64h ; 'd' xor edx, edx div rcx mov rcx, rax add rcx, 0Ch mov rax, [rbp+var_20] mov [rax], rcx lea rax, key_memory_my_compress_alloc mov edi, [rax] mov rax, [rbp+var_20] mov rsi, [rax] mov edx, 10h call my_malloc mov [rbp+var_28], rax cmp rax, 0 jnz short loc_B5F35 mov [rbp+var_8], 0 jmp loc_B5FC7 loc_B5F35: mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov rax, [rbp+var_18] mov rcx, [rax] call my_compress_buffer mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_B5F69 mov rdi, [rbp+var_28] call my_free mov [rbp+var_8], 0 jmp short loc_B5FC7 loc_B5F69: mov rax, [rbp+var_20] mov rax, [rax] mov rcx, [rbp+var_18] cmp rax, [rcx] jb short loc_B5F99 mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov rdi, [rbp+var_28] call my_free jmp short $+2 loc_B5F8F: mov [rbp+var_8], 0 jmp short loc_B5FC7 loc_B5F99: jmp short $+2 loc_B5F9B: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_18] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_B5FC7: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long my_compress_alloc(long long a1, _QWORD *a2, _QWORD *a3) { long long v4; // [rsp+8h] [rbp-38h] long long v5; // [rsp+18h] [rbp-28h] *a3 = 120LL * *a2 / 0x64uLL + 12; v5 = my_malloc(key_memory_my_compress_alloc, *a3, 16LL); if ( !v5 ) return 0LL; if ( (unsigned int)my_compress_buffer(v5, a3, a1, *a2) ) { my_free(v5); return 0LL; } else if ( *a3 < *a2 ) { v4 = *a2; *a2 = *a3; *a3 = v4; return v5; } else { *a3 = 0LL; my_free(v5); return 0LL; } }
my_compress_alloc: 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 RAX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RAX],0x78 MOV ECX,0x64 XOR EDX,EDX DIV RCX MOV RCX,RAX ADD RCX,0xc MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LEA RAX,[0xd4c01c] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] MOV EDX,0x10 CALL 0x001be600 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x001b5f35 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b5fc7 LAB_001b5f35: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] CALL 0x001b6040 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001b5f69 MOV RDI,qword ptr [RBP + -0x28] CALL 0x001be980 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b5fc7 LAB_001b5f69: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX] JC 0x001b5f99 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x28] CALL 0x001be980 JMP 0x001b5f8f LAB_001b5f8f: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b5fc7 LAB_001b5f99: JMP 0x001b5f9b LAB_001b5f9b: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_001b5fc7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long my_compress_alloc(int8 param_1,ulong *param_2,ulong *param_3) { ulong uVar1; int iVar2; int8 local_10; *param_3 = (*param_2 * 0x78) / 100 + 0xc; local_10 = my_malloc(key_memory_my_compress_alloc,*param_3,0x10); if (local_10 == 0) { local_10 = 0; } else { iVar2 = my_compress_buffer(local_10,param_3,param_1,*param_2); if (iVar2 == 0) { if (*param_3 < *param_2) { uVar1 = *param_2; *param_2 = *param_3; *param_3 = uVar1; } else { *param_3 = 0; my_free(local_10); local_10 = 0; } } else { my_free(local_10); local_10 = 0; } } return local_10; }
11,014
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): subq $0xd8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xd0(%rsp) movl %esi, 0xcc(%rsp) movq %rdx, 0xc0(%rsp) movq %rcx, 0xb8(%rsp) leaq 0x57(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5b0e0 movq 0x18(%rsp), %rdx leaq 0xb454b(%rip), %rsi # 0x2104c9 leaq 0x58(%rsp), %rdi callq 0x630d0 jmp 0x15bf8a movl 0xcc(%rsp), %edx leaq 0x78(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0xa2cf0 jmp 0x15bfa2 xorl %eax, %eax movl %eax, %esi leaq 0x20(%rsp), %rdi callq 0xa2d90 jmp 0x15bfb2 movq 0xc0(%rsp), %rcx leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0x20(%rsp), %rdx callq 0xa2c30 jmp 0x15bfd3 leaq 0x20(%rsp), %rdi callq 0x5b588 leaq 0x78(%rsp), %rdi callq 0x5b588 leaq 0x58(%rsp), %rdi callq 0x5b588 leaq 0x57(%rsp), %rdi callq 0x5b560 movl 0xcc(%rsp), %eax movl %eax, 0x4(%rsp) leaq 0x98(%rsp), %rdi callq 0x5a1b0 movq 0x8(%rsp), %rdi movl 0x4(%rsp), %esi movq %rax, %rdx callq 0xb7260 jmp 0x15c026 leaq 0x98(%rsp), %rdi callq 0x5b588 movq 0x10(%rsp), %rax addq $0xd8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x15c09c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x15c092 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0x15c088 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x20(%rsp), %rdi callq 0x5b588 leaq 0x78(%rsp), %rdi callq 0x5b588 leaq 0x58(%rsp), %rdi callq 0x5b588 leaq 0x57(%rsp), %rdi callq 0x5b560 jmp 0x15c0c3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x98(%rsp), %rdi callq 0x5b588 movq 0x48(%rsp), %rdi callq 0x5aba0 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: sub rsp, 0D8h mov [rsp+0D8h+var_D0], rdi; int mov rax, rdi mov qword ptr [rsp+0D8h+var_C8], rax; int mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_C], esi mov qword ptr [rsp+0D8h+var_18], rdx mov [rsp+0D8h+var_20], rcx lea rdi, [rsp+0D8h+var_81] mov qword ptr [rsp+0D8h+var_C0], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+0D8h+var_C0] lea rsi, aTypeError; "type_error" lea rdi, [rsp+0D8h+var_81+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_15BF8A: mov edx, [rsp+0D8h+var_C] lea rdi, [rsp+0D8h+var_60]; int lea rsi, [rsp+0D8h+var_81+1] call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_15BFA2: xor eax, eax mov esi, eax lea rdi, [rsp+0D8h+var_B8] call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_15BFB2: mov rcx, qword ptr [rsp+0D8h+var_18]; int lea rdi, [rsp+0D8h+var_40]; int lea rsi, [rsp+0D8h+var_60]; int lea rdx, [rsp+0D8h+var_B8]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) jmp short $+2 loc_15BFD3: lea rdi, [rsp+0D8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_81+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rsp+0D8h+var_C] mov [rsp+0D8h+var_D4], eax lea rdi, [rsp+0D8h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+0D8h+var_D0]; this mov esi, [rsp+0D8h+var_D4]; int mov rdx, rax; char * call _ZN8nlohmann16json_abi_v3_11_36detail10type_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::type_error::type_error(int,char const*) jmp short $+2 loc_15C026: lea rdi, [rsp+0D8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+0D8h+var_C8] add rsp, 0D8h retn mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_15C09C mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_15C092 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_15C088 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15C088: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15C092: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15C09C: lea rdi, [rsp+arg_4F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_15C0C3 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15C0C3: mov rdi, [rsp+arg_40] call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::type_error * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::type_error *a1, int a2, long long a3, long long a4) { const char *v4; // rax int v6; // [rsp+4h] [rbp-D4h] int v7[13]; // [rsp+20h] [rbp-B8h] BYREF int v8[8]; // [rsp+57h] [rbp-81h] BYREF int v9[8]; // [rsp+78h] [rbp-60h] BYREF int v10[8]; // [rsp+98h] [rbp-40h] BYREF long long v11; // [rsp+B8h] [rbp-20h] int v12[2]; // [rsp+C0h] [rbp-18h] int v13; // [rsp+CCh] [rbp-Ch] nlohmann::json_abi_v3_11_3::detail::type_error *v14; // [rsp+D0h] [rbp-8h] v14 = a1; v13 = a2; *(_QWORD *)v12 = a3; v11 = a4; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v8 + 1, (long long)"type_error", (long long)v8); nlohmann::json_abi_v3_11_3::detail::exception::name(v9, (long long)v8 + 1, v13); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v7, 0LL); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (long long)v10, (long long)v9, (long long)v7, *(long long *)v12); std::string::~string(v7); std::string::~string(v9); std::string::~string((char *)v8 + 1); std::allocator<char>::~allocator(v8); v6 = v13; v4 = (const char *)std::string::c_str(v10); nlohmann::json_abi_v3_11_3::detail::type_error::type_error(a1, v6, v4); std::string::~string(v10); return a1; }
11,015
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x8e766(%rip), %rsi # 0xecf03 leaq 0x8e769(%rip), %rdx # 0xecf0d leaq 0x28(%rsp), %rdi callq 0x21af4 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x585f0 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1ada0 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1a270 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x1a270 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1a270 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x5e847 movq 0x78(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e862 movq 0x58(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x5e879 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8f0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x5885e leaq 0xcb6e1(%rip), %rax # 0x129f70 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5e8ad movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5e93b movq 0x18(%rsp), %rsi jmp 0x5e933 movq %rax, %rbx jmp 0x5e924 movq %rax, %rbx jmp 0x5e93b movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x5e8fd movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x1b649 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x5e93b movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rdi callq 0x1afd0
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aTypeError; "type_error" lea rdx, aTypeError+0Ah; "" lea rdi, [rsp+0C8h+var_A0] 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+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_5E847 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E847: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E862 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E862: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_5E879 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E879: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail10type_errorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::type_error add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_5E8AD mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E8AD: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_5E93B mov rsi, [rsp+arg_10] jmp short loc_5E933 mov rbx, rax jmp short loc_5E924 mov rbx, rax jmp short loc_5E93B mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_5E8FD mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E8FD: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1 mov rbx, [r12] loc_5E924: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_5E93B mov rsi, [rsp+arg_30] loc_5E933: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E93B: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "type_error", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *a3, a3[1]); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::type_error + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0015e796: LEA RSI,[0x1ecf03] LEA RDX,[0x1ecf0d] LEA RDI,[RSP + 0x28] CALL 0x00121af4 LAB_0015e7ae: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x001585f0 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0015e7ed: LEA RDI,[RSP + 0x8] CALL 0x0011ada0 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0011a270 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0011a270 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011a270 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0015e847 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0011a8f0 LAB_0015e847: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015e862 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011a8f0 LAB_0015e862: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0015e879 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a8f0 LAB_0015e879: MOV RDX,qword ptr [RSP + 0x8] LAB_0015e87e: MOV RDI,RBX MOV ESI,EBP CALL 0x0015885e LAB_0015e888: LEA RAX,[0x229f70] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0015e8ad MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_0015e8ad: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0015e796 to 0015e7ad has its CatchHandler @ 0015e8db */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error",""); /* try { // try from 0015e7ae to 0015e7be has its CatchHandler @ 0015e8d6 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0015e7ed to 0015e82f has its CatchHandler @ 0015e8e0 */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0015e87e to 0015e887 has its CatchHandler @ 0015e8c2 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_00229f80; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
11,016
nglog::(anonymous namespace)::LogFileObject::~LogFileObject()
ng-log[P]ng-log/src/logging.cc
LogFileObject::~LogFileObject() { std::lock_guard<std::mutex> l{mutex_}; file_ = nullptr; }
O2
cpp
nglog::(anonymous namespace)::LogFileObject::~LogFileObject(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x24799(%rip), %rax # 0x2d830 movq %rax, (%rdi) leaq 0x8(%rdi), %r14 movq %r14, %rdi callq 0x1aabe leaq 0x98(%rbx), %r15 movq %r15, %rdi xorl %esi, %esi callq 0xe7f8 movq %r14, %rdi callq 0x7450 movq %r15, %rdi callq 0xe74a leaq 0x78(%rbx), %rdi callq 0x7b38 leaq 0x58(%rbx), %rdi callq 0x7b38 addq $0x38, %rbx movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x7b38 movq %rax, %rdi callq 0x8d08
_ZN5nglog12_GLOBAL__N_113LogFileObjectD2Ev: push r15 push r14 push rbx mov rbx, rdi lea rax, off_2D830 mov [rdi], rax lea r14, [rdi+8] mov rdi, r14; this call _ZNSt5mutex4lockEv; std::mutex::lock(void) lea r15, [rbx+98h] mov rdi, r15 xor esi, esi call _ZNSt15__uniq_ptr_implI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(_IO_FILE*) mov rdi, r14 call _pthread_mutex_unlock mov rdi, r15 call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EED2Ev; std::unique_ptr<_IO_FILE>::~unique_ptr() lea rdi, [rbx+78h]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbx+58h]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rbx, 38h ; '8' mov rdi, rbx; void * pop rbx pop r14 pop r15 jmp _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rax call __clang_call_terminate
void nglog::`anonymous namespace'::LogFileObject::~LogFileObject( nglog::_anonymous_namespace_::LogFileObject *this) { *(_QWORD *)this = off_2D830; std::mutex::lock((nglog::_anonymous_namespace_::LogFileObject *)((char *)this + 8)); std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset((char *)this + 152, 0LL); pthread_mutex_unlock((char *)this + 8); std::unique_ptr<_IO_FILE>::~unique_ptr((char *)this + 152); std::string::~string((char *)this + 120); std::string::~string((char *)this + 88); std::string::~string((char *)this + 56); }
~LogFileObject: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA RAX,[0x12d830] MOV qword ptr [RDI],RAX LEA R14,[RDI + 0x8] LAB_0010909e: MOV RDI,R14 CALL 0x0011aabe LEA R15,[RBX + 0x98] MOV RDI,R15 XOR ESI,ESI CALL 0x0010e7f8 MOV RDI,R14 CALL 0x00107450 MOV RDI,R15 CALL 0x0010e74a LEA RDI,[RBX + 0x78] CALL 0x00107b38 LEA RDI,[RBX + 0x58] CALL 0x00107b38 ADD RBX,0x38 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x00107b38
/* nglog::(anonymous namespace)::LogFileObject::~LogFileObject() */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::~LogFileObject(LogFileObject *this) { *(int ***)this = &PTR__LogFileObject_0012d830; /* try { // try from 0010909e to 001090a5 has its CatchHandler @ 001090ea */ std::mutex::lock((mutex *)&((pthread_mutex_t *)(this + 8))->__data); std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset ((__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>> *)(this + 0x98), (_IO_FILE *)0x0); pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::~unique_ptr ((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *)(this + 0x98)); std::__cxx11::string::~string((string *)(this + 0x78)); std::__cxx11::string::~string((string *)(this + 0x58)); std::__cxx11::string::~string((string *)(this + 0x38)); return; }
11,017
inline_mysql_rwlock_unlock
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_unlock( mysql_rwlock_t *that) { int result; #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi); #endif result= rw_unlock(&that->m_rwlock); return result; }
O0
c
inline_mysql_rwlock_unlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xb0891 leaq 0x20f9be(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x168(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0xfa0f0 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_rwlock_unlock_6: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_B0891 lea rax, PSI_server mov rax, [rax] mov rax, [rax+168h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax loc_B0891: mov rdi, [rbp+var_8] call my_rw_unlock mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_unlock_6(long long a1) { if ( *(_QWORD *)(a1 + 144) ) ((void ( *)(_QWORD))PSI_server[45])(*(_QWORD *)(a1 + 144)); return (unsigned int)my_rw_unlock(a1); }
inline_mysql_rwlock_unlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],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 0x001b0891 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x168] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x90] CALL RAX LAB_001b0891: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fa0f0 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 inline_mysql_rwlock_unlock(long param_1) { int4 uVar1; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90)); } uVar1 = my_rw_unlock(param_1); return uVar1; }
11,018
uf_varchar1
eloqsql/storage/maria/ma_packrec.c
static void uf_varchar1(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end __attribute__((unused))) { if (get_bit(bit_buff)) to[0]= 0; /* Zero lengths */ else { ulong length=get_bits(bit_buff,rec->space_length_bits); *to= (char) length; decode_bytes(rec,bit_buff,to+1,to+1+length); } }
O0
c
uf_varchar1: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x48c67 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x48c8b jmp 0x48c97 movq -0x10(%rbp), %rdi callq 0x47720 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x48c97 movq -0x18(%rbp), %rax movb $0x0, (%rax) jmp 0x48d23 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x24(%rcx), %eax jb 0x48cda movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x27537e(%rip), %rcx # 0x2be050 andl (%rcx,%rdx,4), %eax movl %eax, -0x2c(%rbp) jmp 0x48ced movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x46ed0 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, %eax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx addq $0x1, %rdx movq -0x18(%rbp), %rcx addq $0x1, %rcx addq -0x28(%rbp), %rcx callq 0x47a60 addq $0x30, %rsp popq %rbp retq nopl (%rax)
uf_varchar1: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_48C67 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_48C8B jmp short loc_48C97 loc_48C67: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_48C97 loc_48C8B: mov rax, [rbp+var_18] mov byte ptr [rax], 0 jmp loc_48D23 loc_48C97: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+24h] jb short loc_48CDA mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_2C], eax jmp short loc_48CED loc_48CDA: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_2C], eax loc_48CED: mov eax, [rbp+var_2C] mov eax, eax mov [rbp+var_28], rax mov rax, [rbp+var_28] mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] add rdx, 1 mov rcx, [rbp+var_18] add rcx, 1 add rcx, [rbp+var_28] call decode_bytes loc_48D23: add rsp, 30h pop rbp retn
long long uf_varchar1(long long a1, int *a2, _BYTE *a3) { int v3; // eax int v4; // ecx long long result; // rax unsigned int v6; // eax int v7; // ecx int bits; // [rsp+4h] [rbp-2Ch] if ( a2[1] ) { v3 = *a2; v4 = a2[1] - 1; a2[1] = v4; if ( ((1 << v4) & v3) == 0 ) goto LABEL_6; LABEL_5: result = (long long)a3; *a3 = 0; return result; } fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) goto LABEL_5; LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v6 = *a2; v7 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v7; bits = mask[*(unsigned int *)(a1 + 36)] & (v6 >> v7); } *a3 = bits; return decode_bytes(a1, (long long)a2, a3 + 1, &a3[bits + 1]); }
uf_varchar1: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x00148c67 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x00148c8b JMP 0x00148c97 LAB_00148c67: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00147720 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x00148c97 LAB_00148c8b: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 JMP 0x00148d23 LAB_00148c97: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x24] JC 0x00148cda MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x24] MOV EDX,ECX LEA RCX,[0x3be050] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x2c],EAX JMP 0x00148ced LAB_00148cda: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x00146ed0 MOV dword ptr [RBP + -0x2c],EAX LAB_00148ced: MOV EAX,dword ptr [RBP + -0x2c] MOV EAX,EAX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] ADD RDX,0x1 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x1 ADD RCX,qword ptr [RBP + -0x28] CALL 0x00147a60 LAB_00148d23: ADD RSP,0x30 POP RBP RET
void uf_varchar1(long param_1,uint *param_2,int1 *param_3) { uint uVar1; uint local_34; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_34 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_34 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } *param_3 = (char)local_34; decode_bytes(param_1,param_2,param_3 + 1,param_3 + (ulong)local_34 + 1); } else { *param_3 = 0; } return; }
11,019
my_default_csname
eloqsql/mysys/charset.c
const char* my_default_csname() { const char* csname = NULL; #ifdef _WIN32 char cpbuf[64]; int cp = GetConsoleCP(); if (cp == 0) cp = GetACP(); snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp); csname = my_os_charset_to_mysql_charset(cpbuf); #elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO) if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET))) csname = my_os_charset_to_mysql_charset(csname); #endif return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME; }
O0
c
my_default_csname: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq $0x0, -0x8(%rbp) xorl %edi, %edi leaq 0x600a6(%rip), %rsi # 0x8a12f callq 0x25260 cmpq $0x0, %rax je 0x2a0b5 movl $0xe, %edi callq 0x252a0 movq %rax, -0x8(%rbp) cmpq $0x0, %rax je 0x2a0b5 movq -0x8(%rbp), %rdi callq 0x2a0e0 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2a0c6 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x2a0d3 leaq 0x6081f(%rip), %rax # 0x8a8ec movq %rax, -0x10(%rbp) jmp 0x2a0d3 movq -0x10(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_default_csname: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], 0 xor edi, edi lea rsi, aNewSection+14h; "" call _setlocale cmp rax, 0 jz short loc_2A0B5 mov edi, 0Eh call _nl_langinfo mov [rbp+var_8], rax cmp rax, 0 jz short loc_2A0B5 mov rdi, [rbp+var_8] call my_os_charset_to_mysql_charset mov [rbp+var_8], rax loc_2A0B5: cmp [rbp+var_8], 0 jz short loc_2A0C6 mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short loc_2A0D3 loc_2A0C6: lea rax, aLatin1; "latin1" mov [rbp+var_10], rax jmp short $+2 loc_2A0D3: mov rax, [rbp+var_10] add rsp, 10h pop rbp retn
const char *my_default_csname() { long long v2; // [rsp+8h] [rbp-8h] v2 = 0LL; if ( setlocale(0LL, "") ) { v2 = nl_langinfo(14LL); if ( v2 ) v2 = my_os_charset_to_mysql_charset(v2); } if ( v2 ) return (const char *)v2; else return "latin1"; }
my_default_csname: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],0x0 XOR EDI,EDI LEA RSI,[0x18a12f] CALL 0x00125260 CMP RAX,0x0 JZ 0x0012a0b5 MOV EDI,0xe CALL 0x001252a0 MOV qword ptr [RBP + -0x8],RAX CMP RAX,0x0 JZ 0x0012a0b5 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a0e0 MOV qword ptr [RBP + -0x8],RAX LAB_0012a0b5: CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012a0c6 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012a0d3 LAB_0012a0c6: LEA RAX,[0x18a8ec] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012a0d3 LAB_0012a0d3: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
char * my_default_csname(void) { char *pcVar1; char *local_18; char *local_10; local_10 = (char *)0x0; pcVar1 = setlocale(0,""); if (pcVar1 != (char *)0x0) { local_10 = nl_langinfo(0xe); if (local_10 != (char *)0x0) { local_10 = (char *)my_os_charset_to_mysql_charset(local_10); } } if (local_10 == (char *)0x0) { local_18 = "latin1"; } else { local_18 = local_10; } return local_18; }
11,020
evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions.hpp
[[nodiscard]] uint256& pop() noexcept { return *m_top--; }
O3
cpp
evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&): movq 0x228(%rsi), %rcx leaq -0x20(%rcx), %rax movq %rax, 0x228(%rsi) movq (%rcx), %rax movq 0x10(%rcx), %rdx movq 0x18(%rcx), %rdi xorl %r8d, %r8d movq %rdi, %r9 orq %rdx, %r9 cmoveq %rax, %rdx cmoveq 0x8(%rcx), %rdi movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmovneq %r8, %rcx cmpq %rdx, %rcx sbbq %rdi, %r8 jb 0x4f459 movq 0x1f8(%rsi), %rcx movq 0x30(%rcx), %rdx movq 0x38(%rcx), %r8 movq %r8, %r9 subq %rdx, %r9 sarq $0x2, %r9 movq %rdx, %rdi testq %r9, %r9 jle 0x4f438 movq %rdx, %rdi movq %r9, %r10 shrq %r10 movq %r10, %r11 notq %r11 addq %r9, %r11 leaq (%rdi,%r10,4), %r9 addq $0x4, %r9 cmpl %eax, -0x4(%r9) cmovlq %r9, %rdi cmovgeq %r10, %r11 movq %r11, %r9 testq %r11, %r11 jg 0x4f40d cmpq %r8, %rdi je 0x4f459 cmpl %eax, (%rdi) jne 0x4f459 subq %rdx, %rdi movq 0x48(%rcx), %rax movslq (%rax,%rdi), %rax testq %rax, %rax js 0x4f459 shlq $0x4, %rax addq (%rcx), %rax retq movl $0x8, 0x78(%rsi) xorl %eax, %eax retq
_ZN6evmone8advanced12_GLOBAL__N_17op_jumpEPKNS0_11InstructionERNS0_22AdvancedExecutionStateE: mov rcx, [rsi+228h] lea rax, [rcx-20h] mov [rsi+228h], rax mov rax, [rcx] mov rdx, [rcx+10h] mov rdi, [rcx+18h] xor r8d, r8d mov r9, rdi or r9, rdx cmovz rdx, rax cmovz rdi, [rcx+8] mov ecx, 7FFFFFFFh cmovnz rcx, r8 cmp rcx, rdx sbb r8, rdi jb short loc_4F459 mov rcx, [rsi+1F8h] mov rdx, [rcx+30h] mov r8, [rcx+38h] mov r9, r8 sub r9, rdx sar r9, 2 mov rdi, rdx test r9, r9 jle short loc_4F438 mov rdi, rdx loc_4F40D: mov r10, r9 shr r10, 1 mov r11, r10 not r11 add r11, r9 lea r9, [rdi+r10*4] add r9, 4 cmp [r9-4], eax cmovl rdi, r9 cmovge r11, r10 mov r9, r11 test r11, r11 jg short loc_4F40D loc_4F438: cmp rdi, r8 jz short loc_4F459 cmp [rdi], eax jnz short loc_4F459 sub rdi, rdx mov rax, [rcx+48h] movsxd rax, dword ptr [rax+rdi] test rax, rax js short loc_4F459 shl rax, 4 add rax, [rcx] retn loc_4F459: mov dword ptr [rsi+78h], 8 xor eax, eax retn
long long evmone::advanced::`anonymous namespace'::op_jump(long long a1, long long a2) { _QWORD *v2; // rcx long long v3; // rax unsigned long long v4; // rdx unsigned long long v5; // rdi bool v6; // zf long long v7; // rcx _QWORD *v8; // rcx char *v9; // rdx unsigned long long v10; // r9 char *v11; // rdi unsigned long long v12; // r10 long long v13; // r11 long long v14; // r9 long long v15; // rax v2 = *(_QWORD **)(a2 + 552); *(_QWORD *)(a2 + 552) = v2 - 4; v3 = *v2; v4 = v2[2]; v5 = v2[3]; v6 = *((_OWORD *)v2 + 1) == 0LL; if ( *((_OWORD *)v2 + 1) == 0LL ) { v4 = *v2; v5 = v2[1]; } v7 = 0x7FFFFFFFLL; if ( !v6 ) v7 = 0LL; if ( (unsigned long long)v7 >= __PAIR128__(v5, v4) ) { v8 = *(_QWORD **)(a2 + 504); v9 = (char *)v8[6]; v10 = (long long)(v8[7] - (_QWORD)v9) >> 2; v11 = v9; if ( (long long)v10 > 0 ) { v11 = (char *)v8[6]; do { v12 = v10 >> 1; v13 = v10 + ~(v10 >> 1); v14 = (long long)&v11[4 * (v10 >> 1) + 4]; if ( *(_DWORD *)(v14 - 4) >= (int)v3 ) v13 = v12; else v11 = (char *)v14; v10 = v13; } while ( v13 > 0 ); } if ( v11 != (char *)v8[7] && *(_DWORD *)v11 == (_DWORD)v3 ) { v15 = *(int *)(v8[9] + v11 - v9); if ( v15 >= 0 ) return *v8 + 16 * v15; } } *(_DWORD *)(a2 + 120) = 8; return 0LL; }
op_jump: MOV RCX,qword ptr [RSI + 0x228] LEA RAX,[RCX + -0x20] MOV qword ptr [RSI + 0x228],RAX MOV RAX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x10] MOV RDI,qword ptr [RCX + 0x18] XOR R8D,R8D MOV R9,RDI OR R9,RDX CMOVZ RDX,RAX CMOVZ RDI,qword ptr [RCX + 0x8] MOV ECX,0x7fffffff CMOVNZ RCX,R8 CMP RCX,RDX SBB R8,RDI JC 0x0014f459 MOV RCX,qword ptr [RSI + 0x1f8] MOV RDX,qword ptr [RCX + 0x30] MOV R8,qword ptr [RCX + 0x38] MOV R9,R8 SUB R9,RDX SAR R9,0x2 MOV RDI,RDX TEST R9,R9 JLE 0x0014f438 MOV RDI,RDX LAB_0014f40d: MOV R10,R9 SHR R10,0x1 MOV R11,R10 NOT R11 ADD R11,R9 LEA R9,[RDI + R10*0x4] ADD R9,0x4 CMP dword ptr [R9 + -0x4],EAX CMOVL RDI,R9 CMOVGE R11,R10 MOV R9,R11 TEST R11,R11 JG 0x0014f40d LAB_0014f438: CMP RDI,R8 JZ 0x0014f459 CMP dword ptr [RDI],EAX JNZ 0x0014f459 SUB RDI,RDX MOV RAX,qword ptr [RCX + 0x48] MOVSXD RAX,dword ptr [RAX + RDI*0x1] TEST RAX,RAX JS 0x0014f459 SHL RAX,0x4 ADD RAX,qword ptr [RCX] RET LAB_0014f459: MOV dword ptr [RSI + 0x78],0x8 XOR EAX,EAX RET
/* evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) */ long evmone::advanced::(anonymous_namespace)::op_jump (Instruction *param_1,AdvancedExecutionState *param_2) { ulong *puVar1; long *plVar2; int *piVar3; bool bVar4; bool bVar5; int *piVar6; int *piVar7; int iVar8; long lVar9; ulong uVar10; ulong uVar11; ulong uVar12; puVar1 = *(ulong **)(param_2 + 0x228); *(ulong **)(param_2 + 0x228) = puVar1 + -4; bVar4 = puVar1[3] == 0; bVar5 = puVar1[2] == 0; uVar12 = puVar1[2]; if (bVar4 && bVar5) { uVar12 = *puVar1; } uVar11 = puVar1[3]; if (bVar4 && bVar5) { uVar11 = puVar1[1]; } uVar10 = 0x7fffffff; if (!bVar4 || !bVar5) { uVar10 = 0; } if (uVar11 == 0 && (ulong)(uVar10 < uVar12) <= -uVar11) { plVar2 = *(long **)(param_2 + 0x1f8); piVar3 = (int *)plVar2[6]; iVar8 = (int)*puVar1; piVar7 = piVar3; uVar12 = plVar2[7] - (long)piVar3 >> 2; while (piVar6 = piVar7, 0 < (long)uVar12) { uVar11 = uVar12 >> 1; uVar12 = ~uVar11 + uVar12; piVar7 = piVar6 + uVar11 + 1; if (iVar8 <= piVar6[uVar11]) { piVar7 = piVar6; uVar12 = uVar11; } } if (((piVar6 != (int *)plVar2[7]) && (*piVar6 == iVar8)) && (lVar9 = (long)*(int *)((long)piVar6 + (plVar2[9] - (long)piVar3)), -1 < lVar9)) { return lVar9 * 0x10 + *plVar2; } } *(int4 *)(param_2 + 0x78) = 8; return 0; }
11,021
common_sampler_type_to_str[abi:cxx11](common_sampler_type)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_type_to_str(enum common_sampler_type cnstr) { switch (cnstr) { case COMMON_SAMPLER_TYPE_DRY: return "dry"; case COMMON_SAMPLER_TYPE_TOP_K: return "top_k"; case COMMON_SAMPLER_TYPE_TYPICAL_P: return "typ_p"; case COMMON_SAMPLER_TYPE_TOP_P: return "top_p"; case COMMON_SAMPLER_TYPE_MIN_P: return "min_p"; case COMMON_SAMPLER_TYPE_TEMPERATURE: return "temperature"; case COMMON_SAMPLER_TYPE_XTC: return "xtc"; case COMMON_SAMPLER_TYPE_INFILL: return "infill"; case COMMON_SAMPLER_TYPE_PENALTIES: return "penalties"; default : return ""; } }
O3
cpp
common_sampler_type_to_str[abi:cxx11](common_sampler_type): pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) decl %esi cmpl $0x9, %esi ja 0xce612 leaq 0x26a0e(%rip), %rax # 0xf4f7c movslq (%rax,%rsi,4), %rcx addq %rax, %rcx jmpq *%rcx leaq 0x26dd5(%rip), %rsi # 0xf5353 leaq 0x26dd1(%rip), %rdx # 0xf5356 jmp 0xce605 leaq 0x26dd5(%rip), %rsi # 0xf5363 leaq 0x26dd3(%rip), %rdx # 0xf5368 jmp 0xce605 leaq 0x26dd1(%rip), %rsi # 0xf536f leaq 0x26dd5(%rip), %rdx # 0xf537a jmp 0xce605 leaq 0x26da9(%rip), %rsi # 0xf5357 leaq 0x26da7(%rip), %rdx # 0xf535c jmp 0xce605 leaq 0x26dbd(%rip), %rsi # 0xf537b leaq 0x26db9(%rip), %rdx # 0xf537e jmp 0xce605 leaq 0x193ab(%rip), %rsi # 0xe7979 leaq 0x193aa(%rip), %rdx # 0xe797f jmp 0xce605 leaq 0x26d8b(%rip), %rsi # 0xf5369 leaq 0x26d89(%rip), %rdx # 0xf536e jmp 0xce605 leaq 0x26d6f(%rip), %rsi # 0xf535d leaq 0x26d6d(%rip), %rdx # 0xf5362 jmp 0xce605 leaq 0x26d81(%rip), %rsi # 0xf537f leaq 0x26d83(%rip), %rdx # 0xf5388 movq %rbx, %rdi callq 0x224a4 movq %rbx, %rax popq %rbx retq leaq 0x1d383(%rip), %rdx # 0xeb99c movq %rbx, %rdi movq %rdx, %rsi jmp 0xce608
_Z26common_sampler_type_to_strB5cxx1119common_sampler_type: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax dec esi; switch 10 cases cmp esi, 9 ja def_CE575; jumptable 00000000000CE575 default case, case 5 lea rax, jpt_CE575 movsxd rcx, ds:(jpt_CE575 - 0F4F7Ch)[rax+rsi*4] add rcx, rax jmp rcx; switch jump loc_CE577: lea rsi, aDry; jumptable 00000000000CE575 case 1 lea rdx, aDry+3; "" jmp short loc_CE605 loc_CE587: lea rsi, aTopP_0; jumptable 00000000000CE575 case 3 lea rdx, aTopP_0+5; "" jmp short loc_CE605 loc_CE597: lea rsi, aTemperature; jumptable 00000000000CE575 case 7 lea rdx, aTemperature+0Bh; "" jmp short loc_CE605 loc_CE5A7: lea rsi, aTopK_0; jumptable 00000000000CE575 case 2 lea rdx, aTopK_0+5; "" jmp short loc_CE605 loc_CE5B7: lea rsi, aXtc; jumptable 00000000000CE575 case 8 lea rdx, aXtc+3; "" jmp short loc_CE605 loc_CE5C7: lea rsi, aSpmInfill+6; jumptable 00000000000CE575 case 9 lea rdx, aSpmInfill+0Ch; "" jmp short loc_CE605 loc_CE5D7: lea rsi, aMinP_0; jumptable 00000000000CE575 case 4 lea rdx, aMinP_0+5; "" jmp short loc_CE605 loc_CE5E7: lea rsi, aTypP; jumptable 00000000000CE575 case 6 lea rdx, aTypP+5; "" jmp short loc_CE605 loc_CE5F7: lea rsi, aPenalties; jumptable 00000000000CE575 case 10 lea rdx, aPenalties+9; "" loc_CE605: mov rdi, rbx loc_CE608: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx pop rbx retn def_CE575: lea rdx, aErrorWhileHand_0+34h; jumptable 00000000000CE575 default case, case 5 mov rdi, rbx mov rsi, rdx jmp short loc_CE608
_QWORD * common_sampler_type_to_str[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx *a1 = a1 + 2; switch ( a2 ) { case 1: v2 = "dry"; v3 = ""; break; case 2: v2 = "top_k"; v3 = ""; break; case 3: v2 = "top_p"; v3 = ""; break; case 4: v2 = "min_p"; v3 = ""; break; case 6: v2 = "typ_p"; v3 = ""; break; case 7: v2 = "temperature"; v3 = ""; break; case 8: v2 = "xtc"; v3 = ""; break; case 9: v2 = "infill"; v3 = ""; break; case 10: v2 = "penalties"; v3 = ""; break; default: v3 = ""; v2 = ""; break; } std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3); return a1; }
common_sampler_type_to_str[abi:cxx11]: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX DEC ESI CMP ESI,0x9 JA 0x001ce612 LEA RAX,[0x1f4f7c] MOVSXD RCX,dword ptr [RAX + RSI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_1: LEA RSI,[0x1f5353] LEA RDX,[0x1f5356] JMP 0x001ce605 caseD_3: LEA RSI,[0x1f5363] LEA RDX,[0x1f5368] JMP 0x001ce605 caseD_7: LEA RSI,[0x1f536f] LEA RDX,[0x1f537a] JMP 0x001ce605 caseD_2: LEA RSI,[0x1f5357] LEA RDX,[0x1f535c] JMP 0x001ce605 caseD_8: LEA RSI,[0x1f537b] LEA RDX,[0x1f537e] JMP 0x001ce605 caseD_9: LEA RSI,[0x1e7979] LEA RDX,[0x1e797f] JMP 0x001ce605 caseD_4: LEA RSI,[0x1f5369] LEA RDX,[0x1f536e] JMP 0x001ce605 caseD_6: LEA RSI,[0x1f535d] LEA RDX,[0x1f5362] JMP 0x001ce605 caseD_a: LEA RSI,[0x1f537f] LEA RDX,[0x1f5388] LAB_001ce605: MOV RDI,RBX LAB_001ce608: CALL 0x001224a4 MOV RAX,RBX POP RBX RET caseD_5: LEA RDX,[0x1eb99c] MOV RDI,RBX MOV RSI,RDX JMP 0x001ce608
/* common_sampler_type_to_str[abi:cxx11](common_sampler_type) */ long * common_sampler_type_to_str_abi_cxx11_(long *param_1,int4 param_2) { char *pcVar1; char *pcVar2; *param_1 = (long)(param_1 + 2); switch(param_2) { case 1: pcVar2 = "dry"; pcVar1 = ""; break; case 2: pcVar2 = "top_k"; pcVar1 = ""; break; case 3: pcVar2 = "top_p"; pcVar1 = ""; break; case 4: pcVar2 = "min_p"; pcVar1 = ""; break; default: pcVar1 = ""; pcVar2 = pcVar1; break; case 6: pcVar2 = "typ_p"; pcVar1 = ""; break; case 7: pcVar2 = "temperature"; pcVar1 = ""; break; case 8: pcVar2 = "xtc"; pcVar1 = ""; break; case 9: pcVar2 = "infill"; pcVar1 = ""; break; case 10: pcVar2 = "penalties"; pcVar1 = ""; } std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1); return param_1; }
11,022
my_hash_sort_utf32_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf32_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_utf32(uni_plane, &wc); MY_HASH_ADD(m1, m2, (uint) (wc >> 24)); MY_HASH_ADD(m1, m2, (uint) (wc >> 16) & 0xFF); MY_HASH_ADD(m1, m2, (uint) (wc >> 8) & 0xFF); MY_HASH_ADD(m1, m2, (uint) (wc & 0xFF)); s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf32_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x5b510 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x60607 movq -0x48(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x60630 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x18, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x60533 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x60574 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x605b5 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x604ca movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf32_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_604CA: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_utf32_uni mov [rbp+var_34], eax cmp eax, 0 jle loc_60607 mov rdi, [rbp+var_48] lea rsi, [rbp+var_30] call my_tosort_utf32 mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 18h mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_60533: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_60574: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 8 and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_605B5: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_604CA loc_60607: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf32_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+10h] [rbp-50h] long long v13; // [rsp+18h] [rbp-48h] long long v14; // [rsp+20h] [rbp-40h] int v15; // [rsp+2Ch] [rbp-34h] unsigned long long v16; // [rsp+30h] [rbp-30h] BYREF _QWORD *v17; // [rsp+38h] [rbp-28h] long long *v18; // [rsp+40h] [rbp-20h] long long v19; // [rsp+48h] [rbp-18h] long long v20; // [rsp+50h] [rbp-10h] long long v21; // [rsp+58h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5; v14 = a3 + a2; v13 = *(_QWORD *)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v15 = my_utf32_uni(v21, (long long)&v16, v20, v14, (long long)a5, a6); if ( v15 <= 0 ) break; my_tosort_utf32(v13, &v16); v10 = v9 ^ ((v9 << 8) + (unsigned int)(v16 >> 24) * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v11 = v10 ^ ((v10 << 8) + BYTE2(v16) * (v8 + (v10 & 0x3F))); v8 += 3LL; v12 = v11 ^ ((v11 << 8) + BYTE1(v16) * (v8 + (v11 & 0x3F))); v8 += 3LL; v9 = v12 ^ ((v12 << 8) + (unsigned __int8)v16 * (v8 + (v12 & 0x3F))); v7 = v8 + 3; v20 += v15; } *v18 = v9; result = v17; *v17 = v7; return result; }
my_hash_sort_utf32_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_001604ca: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x0015b510 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x00160607 MOV RDI,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x30] CALL 0x00160630 MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x18 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00160533 LAB_00160533: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00160574 LAB_00160574: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001605b5 LAB_001605b5: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001604ca LAB_00160607: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf32_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; int iVar2; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar2 = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3); if (iVar2 < 1) break; my_tosort_utf32(uVar1,&local_38); local_58 = ((local_58 & 0x3f) + local_60) * (local_38 >> 0x18 & 0xffffffff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 8) & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 9) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_60 = local_60 + 0xc; local_18 = local_18 + iVar2; } *local_28 = local_58; *local_30 = local_60; return; }
11,023
r3d_framebuffer_load_pingpong_bloom
r3d/src/r3d_state.c
void r3d_framebuffer_load_pingpong_bloom(int width, int height) { struct r3d_fb_pingpong_bloom_t* bloom = &R3D.framebuffer.pingPongBloom; width /= 2, height /= 2; bloom->id = rlLoadFramebuffer(); if (bloom->id == 0) { TraceLog(LOG_WARNING, "Failed to create framebuffer"); } rlEnableFramebuffer(bloom->id); // Generate (color) buffers glGenTextures(1, &bloom->source); glBindTexture(GL_TEXTURE_2D, bloom->source); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glGenTextures(1, &bloom->target); glBindTexture(GL_TEXTURE_2D, bloom->target); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGB, GL_FLOAT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_2D, 0); // Activate the draw buffers for all the attachments rlActiveDrawBuffers(1); // Attach the textures to the framebuffer rlFramebufferAttach(bloom->id, bloom->target, RL_ATTACHMENT_COLOR_CHANNEL0, RL_ATTACHMENT_TEXTURE2D, 0); // Check if the framebuffer is complete if (!rlFramebufferComplete(bloom->id)) { TraceLog(LOG_WARNING, "Framebuffer is not complete"); } }
O3
c
r3d_framebuffer_load_pingpong_bloom: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edi, %ebx shrl $0x1f, %ebx addl %edi, %ebx sarl %ebx movl %esi, %r14d shrl $0x1f, %r14d addl %esi, %r14d sarl %r14d callq 0x1df6b movl %eax, 0xef9e0(%rip) # 0x1afc60 testl %eax, %eax jne 0xc029d leaq 0x51b73(%rip), %rsi # 0x111dfe movl $0x4, %edi xorl %eax, %eax callq 0xa9c29 movl 0xef9c3(%rip), %eax # 0x1afc60 movl %eax, %edi callq 0x1bdc2 leaq 0xc1d85(%rip), %rax # 0x182030 leaq 0xef9b2(%rip), %rsi # 0x1afc64 movl $0x1, %edi callq *(%rax) leaq 0xc1620(%rip), %r15 # 0x1818e0 movl 0xef99e(%rip), %esi # 0x1afc64 movl $0xde1, %edi # imm = 0xDE1 callq *(%r15) leaq 0xc2beb(%rip), %r11 # 0x182ec0 subq $0x8, %rsp xorl %r10d, %r10d movl $0x1406, %r13d # imm = 0x1406 movl $0x1907, %eax # imm = 0x1907 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi movl $0x881b, %edx # imm = 0x881B movl %ebx, %ecx movl %r14d, %r8d xorl %r9d, %r9d pushq %r10 pushq %r13 pushq %rax callq *(%r11) addq $0x20, %rsp leaq 0xc2bf2(%rip), %r12 # 0x182f00 movl $0xde1, %edi # imm = 0xDE1 movl $0x2801, %esi # imm = 0x2801 movl $0x2601, %edx # imm = 0x2601 callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 movl $0x2800, %esi # imm = 0x2800 movl $0x2601, %edx # imm = 0x2601 callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 movl $0x2802, %esi # imm = 0x2802 movl $0x812f, %edx # imm = 0x812F callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 movl $0x2803, %esi # imm = 0x2803 movl $0x812f, %edx # imm = 0x812F callq *(%r12) leaq 0xef907(%rip), %rsi # 0x1afc68 movl $0x1, %edi leaq 0xc1cc3(%rip), %rax # 0x182030 callq *(%rax) movl 0xef8f3(%rip), %esi # 0x1afc68 movl $0xde1, %edi # imm = 0xDE1 callq *(%r15) subq $0x8, %rsp movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi movl $0x881b, %edx # imm = 0x881B movl %ebx, %ecx movl %r14d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rax pushq %r13 movl $0x1907, %eax # imm = 0x1907 pushq %rax leaq 0xc2b19(%rip), %rax # 0x182ec0 callq *(%rax) addq $0x20, %rsp movl $0xde1, %edi # imm = 0xDE1 movl $0x2801, %esi # imm = 0x2801 movl $0x2601, %edx # imm = 0x2601 callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 movl $0x2800, %esi # imm = 0x2800 movl $0x2601, %edx # imm = 0x2601 callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 movl $0x2802, %esi # imm = 0x2802 movl $0x812f, %edx # imm = 0x812F callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 movl $0x2803, %esi # imm = 0x2803 movl $0x812f, %edx # imm = 0x812F callq *(%r12) movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *(%r15) movl $0x1, %edi callq 0x1be46 movl 0xef84d(%rip), %edi # 0x1afc60 movl 0xef84f(%rip), %esi # 0x1afc68 xorl %edx, %edx movl $0x64, %ecx xorl %r8d, %r8d callq 0x1df9f movl 0xef832(%rip), %edi # 0x1afc60 callq 0x1e0b7 testb %al, %al je 0xc0446 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x519ce(%rip), %rsi # 0x111e1b movl $0x4, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa9c29
r3d_framebuffer_load_pingpong_bloom: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, edi shr ebx, 1Fh add ebx, edi sar ebx, 1 mov r14d, esi shr r14d, 1Fh add r14d, esi sar r14d, 1 call rlLoadFramebuffer mov dword ptr cs:qword_1AFC60, eax test eax, eax jnz short loc_C029D lea rsi, aFailedToCreate; "Failed to create framebuffer" mov edi, 4 xor eax, eax call TraceLog mov eax, dword ptr cs:qword_1AFC60 loc_C029D: mov edi, eax call rlEnableFramebuffer lea rax, glad_glGenTextures lea rsi, qword_1AFC60+4 mov edi, 1 call qword ptr [rax] lea r15, glad_glBindTexture mov esi, dword ptr cs:qword_1AFC60+4 mov edi, 0DE1h call qword ptr [r15] lea r11, glad_glTexImage2D sub rsp, 8 xor r10d, r10d mov r13d, 1406h mov eax, 1907h mov edi, 0DE1h xor esi, esi mov edx, 881Bh mov ecx, ebx mov r8d, r14d xor r9d, r9d push r10 push r13 push rax call qword ptr [r11] add rsp, 20h lea r12, glad_glTexParameteri mov edi, 0DE1h mov esi, 2801h mov edx, 2601h call qword ptr [r12] mov edi, 0DE1h mov esi, 2800h mov edx, 2601h call qword ptr [r12] mov edi, 0DE1h mov esi, 2802h mov edx, 812Fh call qword ptr [r12] mov edi, 0DE1h mov esi, 2803h mov edx, 812Fh call qword ptr [r12] lea rsi, dword_1AFC68 mov edi, 1 lea rax, glad_glGenTextures call qword ptr [rax] mov esi, cs:dword_1AFC68 mov edi, 0DE1h call qword ptr [r15] sub rsp, 8 mov edi, 0DE1h xor esi, esi mov edx, 881Bh mov ecx, ebx mov r8d, r14d xor r9d, r9d xor eax, eax push rax push r13 mov eax, 1907h push rax lea rax, glad_glTexImage2D call qword ptr [rax] add rsp, 20h mov edi, 0DE1h mov esi, 2801h mov edx, 2601h call qword ptr [r12] mov edi, 0DE1h mov esi, 2800h mov edx, 2601h call qword ptr [r12] mov edi, 0DE1h mov esi, 2802h mov edx, 812Fh call qword ptr [r12] mov edi, 0DE1h mov esi, 2803h mov edx, 812Fh call qword ptr [r12] mov edi, 0DE1h xor esi, esi call qword ptr [r15] mov edi, 1 call rlActiveDrawBuffers mov edi, dword ptr cs:qword_1AFC60 mov esi, cs:dword_1AFC68 xor edx, edx mov ecx, 64h ; 'd' xor r8d, r8d call rlFramebufferAttach mov edi, dword ptr cs:qword_1AFC60 call rlFramebufferComplete test al, al jz short loc_C0446 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C0446: lea rsi, aFramebufferIsN; "Framebuffer is not complete" mov edi, 4 xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp TraceLog
void r3d_framebuffer_load_pingpong_bloom(long long a1, int a2) { unsigned int v2; // ebx unsigned int v3; // r14d unsigned int Framebuffer; // eax long long v5; // rdx long long v6; // rcx int v7; // r8d int v8; // r9d v2 = (int)a1 / 2; v3 = a2 / 2; Framebuffer = rlLoadFramebuffer(a1); LODWORD(qword_1AFC60) = Framebuffer; if ( !Framebuffer ) { TraceLog(4, (long long)"Failed to create framebuffer"); Framebuffer = qword_1AFC60; } rlEnableFramebuffer(Framebuffer); glad_glGenTextures(1LL, (char *)&qword_1AFC60 + 4); glad_glBindTexture(3553LL, HIDWORD(qword_1AFC60)); glad_glTexImage2D(3553LL, 0LL, 34843LL, v2, v3, 0LL, 6407LL, 5126LL, 0LL); glad_glTexParameteri(3553LL, 10241LL, 9729LL); glad_glTexParameteri(3553LL, 10240LL, 9729LL); glad_glTexParameteri(3553LL, 10242LL, 33071LL); glad_glTexParameteri(3553LL, 10243LL, 33071LL); glad_glGenTextures(1LL, &dword_1AFC68); glad_glBindTexture(3553LL, (unsigned int)dword_1AFC68); glad_glTexImage2D(3553LL, 0LL, 34843LL, v2, v3, 0LL, 6407LL, 5126LL, 0LL); glad_glTexParameteri(3553LL, 10241LL, 9729LL); glad_glTexParameteri(3553LL, 10240LL, 9729LL); glad_glTexParameteri(3553LL, 10242LL, 33071LL); glad_glTexParameteri(3553LL, 10243LL, 33071LL); glad_glBindTexture(3553LL, 0LL); rlActiveDrawBuffers(1LL, 0LL, v5, v6, v7, v8); rlFramebufferAttach(qword_1AFC60, dword_1AFC68, 0, 100, 0); if ( !rlFramebufferComplete(qword_1AFC60) ) TraceLog(4, (long long)"Framebuffer is not complete"); }
r3d_framebuffer_load_pingpong_bloom: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,EDI SHR EBX,0x1f ADD EBX,EDI SAR EBX,0x1 MOV R14D,ESI SHR R14D,0x1f ADD R14D,ESI SAR R14D,0x1 CALL 0x0011df6b MOV dword ptr [0x002afc60],EAX TEST EAX,EAX JNZ 0x001c029d LEA RSI,[0x211dfe] MOV EDI,0x4 XOR EAX,EAX CALL 0x001a9c29 MOV EAX,dword ptr [0x002afc60] LAB_001c029d: MOV EDI,EAX CALL 0x0011bdc2 LEA RAX,[0x282030] LEA RSI,[0x2afc64] MOV EDI,0x1 CALL qword ptr [RAX] LEA R15,[0x2818e0] MOV ESI,dword ptr [0x002afc64] MOV EDI,0xde1 CALL qword ptr [R15] LEA R11,[0x282ec0] SUB RSP,0x8 XOR R10D,R10D MOV R13D,0x1406 MOV EAX,0x1907 MOV EDI,0xde1 XOR ESI,ESI MOV EDX,0x881b MOV ECX,EBX MOV R8D,R14D XOR R9D,R9D PUSH R10 PUSH R13 PUSH RAX CALL qword ptr [R11] ADD RSP,0x20 LEA R12,[0x282f00] MOV EDI,0xde1 MOV ESI,0x2801 MOV EDX,0x2601 CALL qword ptr [R12] MOV EDI,0xde1 MOV ESI,0x2800 MOV EDX,0x2601 CALL qword ptr [R12] MOV EDI,0xde1 MOV ESI,0x2802 MOV EDX,0x812f CALL qword ptr [R12] MOV EDI,0xde1 MOV ESI,0x2803 MOV EDX,0x812f CALL qword ptr [R12] LEA RSI,[0x2afc68] MOV EDI,0x1 LEA RAX,[0x282030] CALL qword ptr [RAX] MOV ESI,dword ptr [0x002afc68] MOV EDI,0xde1 CALL qword ptr [R15] SUB RSP,0x8 MOV EDI,0xde1 XOR ESI,ESI MOV EDX,0x881b MOV ECX,EBX MOV R8D,R14D XOR R9D,R9D XOR EAX,EAX PUSH RAX PUSH R13 MOV EAX,0x1907 PUSH RAX LEA RAX,[0x282ec0] CALL qword ptr [RAX] ADD RSP,0x20 MOV EDI,0xde1 MOV ESI,0x2801 MOV EDX,0x2601 CALL qword ptr [R12] MOV EDI,0xde1 MOV ESI,0x2800 MOV EDX,0x2601 CALL qword ptr [R12] MOV EDI,0xde1 MOV ESI,0x2802 MOV EDX,0x812f CALL qword ptr [R12] MOV EDI,0xde1 MOV ESI,0x2803 MOV EDX,0x812f CALL qword ptr [R12] MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [R15] MOV EDI,0x1 CALL 0x0011be46 MOV EDI,dword ptr [0x002afc60] MOV ESI,dword ptr [0x002afc68] XOR EDX,EDX MOV ECX,0x64 XOR R8D,R8D CALL 0x0011df9f MOV EDI,dword ptr [0x002afc60] CALL 0x0011e0b7 TEST AL,AL JZ 0x001c0446 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c0446: LEA RSI,[0x211e1b] MOV EDI,0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a9c29
void r3d_framebuffer_load_pingpong_bloom(ulong param_1,ulong param_2) { char cVar1; int iVar2; int iVar3; iVar2 = (int)(((uint)(param_1 >> 0x1f) & 1) + (int)param_1) >> 1; iVar3 = (int)(((uint)(param_2 >> 0x1f) & 1) + (int)param_2) >> 1; DAT_002afc60 = rlLoadFramebuffer(); if (DAT_002afc60 == 0) { TraceLog(4,"Failed to create framebuffer"); } rlEnableFramebuffer(DAT_002afc60); (*glad_glGenTextures)(1,&DAT_002afc64); (*glad_glBindTexture)(0xde1,DAT_002afc64); (*glad_glTexImage2D)(0xde1,0,0x881b,iVar2,iVar3,0,0x1907,0x1406,0); (*glad_glTexParameteri)(0xde1,0x2801,0x2601); (*glad_glTexParameteri)(0xde1,0x2800,0x2601); (*glad_glTexParameteri)(0xde1,0x2802,0x812f); (*glad_glTexParameteri)(0xde1,0x2803,0x812f); (*glad_glGenTextures)(1,&DAT_002afc68); (*glad_glBindTexture)(0xde1,DAT_002afc68); (*glad_glTexImage2D)(0xde1,0,0x881b,iVar2,iVar3,0,0x1907,0x1406,0); (*glad_glTexParameteri)(0xde1,0x2801,0x2601); (*glad_glTexParameteri)(0xde1,0x2800,0x2601); (*glad_glTexParameteri)(0xde1,0x2802,0x812f); (*glad_glTexParameteri)(0xde1,0x2803,0x812f); (*glad_glBindTexture)(0xde1,0); rlActiveDrawBuffers(1); rlFramebufferAttach(DAT_002afc60,DAT_002afc68,0,100,0); cVar1 = rlFramebufferComplete(DAT_002afc60); if (cVar1 != '\0') { return; } TraceLog(4,"Framebuffer is not complete"); return; }
11,024
my_pread
eloqsql/mysys/my_pread.c
size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { size_t readbytes, save_count= 0; DBUG_ENTER("my_pread"); DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %lu", Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; for (;;) { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #ifdef _WIN32 readbytes= my_win_pread(Filedes, Buffer, Count, offset); #else readbytes= pread(Filedes, Buffer, Count, offset); #endif if (readbytes != Count) { /* We should never read with wrong file descriptor! */ DBUG_ASSERT(readbytes != (size_t)-1 || errno != EBADF); my_errno= errno; if (errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) my_errno= HA_ERR_FILE_TOO_SHORT; DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d", (int) readbytes, (uint) Count,Filedes,my_errno)); if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR) { DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d", (int) readbytes)); continue; /* Interrupted */ } /* Do a read retry if we didn't get enough data on first read */ if (readbytes != (size_t) -1 && readbytes != 0 && (MyFlags & MY_FULL_IO)) { Buffer+= readbytes; Count-= readbytes; save_count+= readbytes; offset+= readbytes; continue; } if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (readbytes == (size_t) -1) my_error(EE_READ, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP))) DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) readbytes= 0; /* Read went ok; Return 0 */ else readbytes+= save_count; DBUG_RETURN(readbytes); } }
O3
c
my_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, -0x58(%rbp) movq %rdx, -0x38(%rbp) movq %rsi, -0x50(%rbp) movl %edi, -0x2c(%rbp) movq $0x0, -0x40(%rbp) movl $0x0, %r15d testb $0x1a, %r8b jne 0xa6662 leaq 0xb6bdf9(%rip), %rax # 0xc12458 movq (%rax), %r15 orq %r8, %r15 callq 0x29750 movq %rax, %r14 movq %r15, -0x48(%rbp) movl $0x0, (%r14) movl -0x2c(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx movq -0x58(%rbp), %rcx callq 0x295f0 subq %rax, %rbx je 0xa6759 movq %rax, %r12 testb $0x6, %r15b sete %r13b movl (%r14), %r15d callq 0xa7c22 movl %r15d, (%rax) cmpq $-0x1, %r12 sete %al cmpl $0x0, (%r14) je 0xa66c0 orb %r13b, %al jne 0xa66cb callq 0xa7c22 movl $0xaf, (%rax) leaq 0x1(%r12), %rax cmpq $0x1, %rax ja 0xa66e2 cmpl $0x4, (%r14) movq -0x48(%rbp), %r15 je 0xa6671 jmp 0xa670a movq -0x48(%rbp), %r15 btl $0x9, %r15d jae 0xa6702 addq %r12, -0x50(%rbp) addq %r12, -0x40(%rbp) addq %r12, -0x58(%rbp) movq %rbx, -0x38(%rbp) jmp 0xa6671 movq $0x0, -0x40(%rbp) testb $0x1a, %r15b je 0xa6740 cmpq $-0x1, %r12 je 0xa676d testb $0x6, %r15b je 0xa6740 andl $0x440, %r15d # imm = 0x440 orq $0x4, %r15 movl -0x2c(%rbp), %edi callq 0xaf094 movq %rax, %rbx callq 0xa7c22 movl (%rax), %ecx movl $0x9, %edi jmp 0xa678f movq $-0x1, %rax cmpq $-0x1, %r12 je 0xa67a3 movl %r15d, %ecx movq %r12, -0x38(%rbp) andl $0x6, %ecx jne 0xa67a3 movq -0x40(%rbp), %rcx addq -0x38(%rbp), %rcx xorl %eax, %eax testb $0x6, %r15b cmoveq %rcx, %rax jmp 0xa67a3 andl $0x440, %r15d # imm = 0x440 orq $0x4, %r15 movl -0x2c(%rbp), %edi callq 0xaf094 movq %rax, %rbx callq 0xa7c22 movl (%rax), %ecx movl $0x2, %edi movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0xa4207 movq $-0x1, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_58], rcx mov [rbp+var_38], rdx mov [rbp+var_50], rsi mov [rbp+var_2C], edi mov [rbp+var_40], 0 mov r15d, 0 test r8b, 1Ah jnz short loc_A6662 lea rax, my_global_flags mov r15, [rax] loc_A6662: or r15, r8 call ___errno_location mov r14, rax mov [rbp+var_48], r15 loc_A6671: mov dword ptr [r14], 0 mov edi, [rbp+var_2C] mov rsi, [rbp+var_50] mov rbx, [rbp+var_38] mov rdx, rbx mov rcx, [rbp+var_58] call _pread64 sub rbx, rax jz loc_A6759 mov r12, rax test r15b, 6 setz r13b mov r15d, [r14] call _my_thread_var mov [rax], r15d cmp r12, 0FFFFFFFFFFFFFFFFh setz al cmp dword ptr [r14], 0 jz short loc_A66C0 or al, r13b jnz short loc_A66CB loc_A66C0: call _my_thread_var mov dword ptr [rax], 0AFh loc_A66CB: lea rax, [r12+1] cmp rax, 1 ja short loc_A66E2 cmp dword ptr [r14], 4 mov r15, [rbp+var_48] jz short loc_A6671 jmp short loc_A670A loc_A66E2: mov r15, [rbp+var_48] bt r15d, 9 jnb short loc_A6702 add [rbp+var_50], r12 add [rbp+var_40], r12 add [rbp+var_58], r12 mov [rbp+var_38], rbx jmp loc_A6671 loc_A6702: mov [rbp+var_40], 0 loc_A670A: test r15b, 1Ah jz short loc_A6740 cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_A676D test r15b, 6 jz short loc_A6740 and r15d, 440h or r15, 4 mov edi, [rbp+var_2C] call my_filename mov rbx, rax call _my_thread_var mov ecx, [rax] mov edi, 9 jmp short loc_A678F loc_A6740: mov rax, 0FFFFFFFFFFFFFFFFh cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_A67A3 mov ecx, r15d mov [rbp+var_38], r12 and ecx, 6 jnz short loc_A67A3 loc_A6759: mov rcx, [rbp+var_40] add rcx, [rbp+var_38] xor eax, eax test r15b, 6 cmovz rax, rcx jmp short loc_A67A3 loc_A676D: and r15d, 440h or r15, 4 mov edi, [rbp+var_2C] call my_filename mov rbx, rax call _my_thread_var mov ecx, [rax] mov edi, 2 loc_A678F: mov rsi, r15 mov rdx, rbx xor eax, eax call my_error mov rax, 0FFFFFFFFFFFFFFFFh loc_A67A3: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_pread(long long a1, const char *a2, long long a3, long long a4, __int16 a5) { __int16 v5; // r15 __int16 v6; // r15 int *v7; // r14 long long v8; // rax long long v9; // rbx long long v10; // r12 bool v11; // r13 int v12; // r15d long long v13; // r15 long long v14; // rbx long long v15; // rcx unsigned int v16; // edi long long result; // rax __int16 v20; // [rsp+18h] [rbp-48h] long long v21; // [rsp+20h] [rbp-40h] v21 = 0LL; v5 = 0; if ( (a5 & 0x1A) == 0 ) v5 = my_global_flags; v6 = a5 | v5; v7 = (int *)__errno_location(a1); v20 = v6; while ( 1 ) { while ( 1 ) { *v7 = 0; v8 = pread64((unsigned int)a1, a2, a3, a4); v9 = a3 - v8; if ( a3 == v8 ) goto LABEL_20; v10 = v8; v11 = (v6 & 6) == 0; v12 = *v7; *(_DWORD *)my_thread_var((unsigned int)a1, a2) = v12; if ( !*v7 || !v11 && v10 != -1 ) *(_DWORD *)my_thread_var((unsigned int)a1, a2) = 175; if ( (unsigned long long)(v10 + 1) > 1 ) break; v6 = v20; if ( *v7 != 4 ) goto LABEL_14; } v6 = v20; if ( (v20 & 0x200) == 0 ) break; a2 += v10; v21 += v10; a4 += v10; a3 = v9; } v21 = 0LL; LABEL_14: if ( (v6 & 0x1A) != 0 ) { if ( v10 == -1 ) { v13 = v6 & 0x440 | 4LL; v14 = my_filename((unsigned int)a1); v15 = *(unsigned int *)my_thread_var((unsigned int)a1, a2); v16 = 2; goto LABEL_24; } if ( (v6 & 6) != 0 ) { v13 = v6 & 0x440 | 4LL; v14 = my_filename((unsigned int)a1); v15 = *(unsigned int *)my_thread_var((unsigned int)a1, a2); v16 = 9; LABEL_24: my_error(v16, v13, v14, v15); return -1LL; } } result = -1LL; if ( v10 != -1 ) { a3 = v10; if ( (v6 & 6) == 0 ) { LABEL_20: result = 0LL; if ( (v6 & 6) == 0 ) return a3 + v21; } } return result; }
my_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x58],RCX MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x50],RSI MOV dword ptr [RBP + -0x2c],EDI MOV qword ptr [RBP + -0x40],0x0 MOV R15D,0x0 TEST R8B,0x1a JNZ 0x001a6662 LEA RAX,[0xd12458] MOV R15,qword ptr [RAX] LAB_001a6662: OR R15,R8 CALL 0x00129750 MOV R14,RAX MOV qword ptr [RBP + -0x48],R15 LAB_001a6671: MOV dword ptr [R14],0x0 MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x50] MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x58] CALL 0x001295f0 SUB RBX,RAX JZ 0x001a6759 MOV R12,RAX TEST R15B,0x6 SETZ R13B MOV R15D,dword ptr [R14] CALL 0x001a7c22 MOV dword ptr [RAX],R15D CMP R12,-0x1 SETZ AL CMP dword ptr [R14],0x0 JZ 0x001a66c0 OR AL,R13B JNZ 0x001a66cb LAB_001a66c0: CALL 0x001a7c22 MOV dword ptr [RAX],0xaf LAB_001a66cb: LEA RAX,[R12 + 0x1] CMP RAX,0x1 JA 0x001a66e2 CMP dword ptr [R14],0x4 MOV R15,qword ptr [RBP + -0x48] JZ 0x001a6671 JMP 0x001a670a LAB_001a66e2: MOV R15,qword ptr [RBP + -0x48] BT R15D,0x9 JNC 0x001a6702 ADD qword ptr [RBP + -0x50],R12 ADD qword ptr [RBP + -0x40],R12 ADD qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x38],RBX JMP 0x001a6671 LAB_001a6702: MOV qword ptr [RBP + -0x40],0x0 LAB_001a670a: TEST R15B,0x1a JZ 0x001a6740 CMP R12,-0x1 JZ 0x001a676d TEST R15B,0x6 JZ 0x001a6740 AND R15D,0x440 OR R15,0x4 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x001af094 MOV RBX,RAX CALL 0x001a7c22 MOV ECX,dword ptr [RAX] MOV EDI,0x9 JMP 0x001a678f LAB_001a6740: MOV RAX,-0x1 CMP R12,-0x1 JZ 0x001a67a3 MOV ECX,R15D MOV qword ptr [RBP + -0x38],R12 AND ECX,0x6 JNZ 0x001a67a3 LAB_001a6759: MOV RCX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RBP + -0x38] XOR EAX,EAX TEST R15B,0x6 CMOVZ RAX,RCX JMP 0x001a67a3 LAB_001a676d: AND R15D,0x440 OR R15,0x4 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x001af094 MOV RBX,RAX CALL 0x001a7c22 MOV ECX,dword ptr [RAX] MOV EDI,0x2 LAB_001a678f: MOV RSI,R15 MOV RDX,RBX XOR EAX,EAX CALL 0x001a4207 MOV RAX,-0x1 LAB_001a67a3: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_pread(int param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int iVar1; int4 uVar2; int *piVar3; size_t sVar4; int *piVar5; int4 *puVar6; int8 uVar7; long lVar8; int8 uVar9; ulong uVar10; long local_60; void *local_58; long local_48; size_t local_40; local_48 = 0; uVar10 = 0; if ((param_5 & 0x1a) == 0) { uVar10 = my_global_flags; } uVar10 = uVar10 | param_5; piVar3 = __errno_location(); local_60 = param_4; local_58 = param_2; local_40 = param_3; do { while( true ) { *piVar3 = 0; sVar4 = pread64(param_1,local_58,local_40,local_60); if (local_40 - sVar4 == 0) goto LAB_001a6759; iVar1 = *piVar3; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; if ((*piVar3 == 0) || (sVar4 != 0xffffffffffffffff && (uVar10 & 6) != 0)) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0xaf; } if (sVar4 + 1 < 2) break; if (((uint)uVar10 >> 9 & 1) == 0) { local_48 = 0; goto LAB_001a670a; } local_58 = (void *)((long)local_58 + sVar4); local_48 = local_48 + sVar4; local_60 = local_60 + sVar4; local_40 = local_40 - sVar4; } } while (*piVar3 == 4); LAB_001a670a: if ((uVar10 & 0x1a) == 0) { LAB_001a6740: lVar8 = -1; if ((sVar4 != 0xffffffffffffffff) && (local_40 = sVar4, (uVar10 & 6) == 0)) { LAB_001a6759: lVar8 = 0; if ((uVar10 & 6) == 0) { lVar8 = local_48 + local_40; } } } else { if (sVar4 == 0xffffffffffffffff) { uVar7 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); uVar2 = *puVar6; uVar9 = 2; } else { if ((uVar10 & 6) == 0) goto LAB_001a6740; uVar7 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); uVar2 = *puVar6; uVar9 = 9; } my_error(uVar9,(uint)uVar10 & 0x440 | 4,uVar7,uVar2); lVar8 = -1; } return lVar8; }
11,025
bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)
nickolajgrishuk[P]metricz-cpp/build_O2/_deps/httplib-src/httplib.h
bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status, Progress progress, ContentReceiverWithProgress receiver, bool decompress) { return prepare_content_receiver( x, status, std::move(receiver), decompress, [&](const ContentReceiverWithProgress &out) { auto ret = true; auto exceed_payload_max_length = false; if (is_chunked_transfer_encoding(x.headers)) { ret = read_content_chunked(strm, out); } else if (!has_header(x.headers, "Content-Length")) { ret = read_content_without_length(strm, out); } else { auto len = get_header_value<uint64_t>(x.headers, "Content-Length"); if (len > payload_max_length) { exceed_payload_max_length = true; skip_content_with_length(strm, len); ret = false; } else if (len > 0) { ret = read_content_with_length(strm, len, std::move(progress), out); } } if (!ret) { status = exceed_payload_max_length ? 413 : 400; } return ret; }); }
O2
c
bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool): pushq %rbx subq $0x80, %rsp movb 0x90(%rsp), %al movq %rdx, 0x50(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) andq $0x0, 0x40(%rsp) movq 0x18(%r9), %rdx movq %rdx, 0x48(%rsp) movq 0x10(%r9), %rdx testq %rdx, %rdx je 0x228b0 movups (%r9), %xmm1 addq $0x10, %r9 movaps %xmm1, 0x30(%rsp) movq %rdx, 0x40(%rsp) movups %xmm0, (%r9) movq %rsi, 0x58(%rsp) movq %rdi, 0x60(%rsp) leaq 0x50(%rsp), %rdx movq %rdx, 0x68(%rsp) movq %r8, 0x70(%rsp) movq %rcx, 0x78(%rsp) movq 0x78(%rsp), %rdx movq %rdx, 0x20(%rsp) movups 0x58(%rsp), %xmm0 movups 0x68(%rsp), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movzbl %al, %eax leaq 0x30(%rsp), %rdx movq %rsi, %rdi movq %rcx, %rsi movl %eax, %ecx callq 0x23491 movl %eax, %ebx leaq 0x30(%rsp), %rdi callq 0x249a4 movl %ebx, %eax addq $0x80, %rsp popq %rbx retq movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x249a4 movq %rbx, %rdi callq 0x89d0
_ZN7httplib6detail12read_contentINS_7RequestEEEbRNS_6StreamERT_mRiSt8functionIFbmmEES8_IFbPKcmmmEEb: push rbx sub rsp, 80h mov al, [rsp+88h+arg_0] mov [rsp+88h+var_38], rdx xorps xmm0, xmm0 movaps [rsp+88h+var_58], xmm0 and [rsp+88h+var_48], 0 mov rdx, [r9+18h] mov [rsp+88h+var_40], rdx mov rdx, [r9+10h] test rdx, rdx jz short loc_228B0 movups xmm1, xmmword ptr [r9] add r9, 10h movaps [rsp+88h+var_58], xmm1 mov [rsp+88h+var_48], rdx movups xmmword ptr [r9], xmm0 loc_228B0: mov qword ptr [rsp+88h+var_30], rsi mov qword ptr [rsp+88h+var_30+8], rdi lea rdx, [rsp+88h+var_38] mov qword ptr [rsp+88h+var_20], rdx mov qword ptr [rsp+88h+var_20+8], r8 mov [rsp+88h+var_10], rcx mov rdx, [rsp+88h+var_10] mov [rsp+88h+var_68], rdx movups xmm0, [rsp+88h+var_30] movups xmm1, [rsp+88h+var_20] movups [rsp+88h+var_78], xmm1 movups [rsp+88h+var_88], xmm0 movzx eax, al lea rdx, [rsp+88h+var_58] mov rdi, rsi mov rsi, rcx mov ecx, eax call _ZN7httplib6detail24prepare_content_receiverINS_7RequestEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiSt8functionIFbmmEES9_IFbPKcmmmEEbEUlRKSF_E_EEbS7_S8_SF_bT0_; httplib::detail::prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}>(httplib::Request &,int &,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}) mov ebx, eax lea rdi, [rsp+88h+var_58]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov eax, ebx add rsp, 80h pop rbx retn mov rbx, rax lea rdi, [rsp+arg_28]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, rbx call __Unwind_Resume
long long httplib::detail::read_content<httplib::Request>( long long a1, long long a2, long long a3, long long a4, long long a5, __int128 *a6, unsigned __int8 a7) { long long v7; // rdx __int128 v8; // xmm1 unsigned int v9; // ebx __int128 v11; // [rsp+30h] [rbp-58h] BYREF long long v12; // [rsp+40h] [rbp-48h] long long v13; // [rsp+48h] [rbp-40h] _QWORD v14[7]; // [rsp+50h] [rbp-38h] BYREF v14[0] = a3; v11 = 0LL; v12 = 0LL; v13 = *((_QWORD *)a6 + 3); v7 = *((_QWORD *)a6 + 2); if ( v7 ) { v8 = *a6++; v11 = v8; v12 = v7; *a6 = 0LL; } v14[1] = a2; v14[2] = a1; v14[3] = v14; v14[4] = a5; v14[5] = a4; v9 = httplib::detail::prepare_content_receiver<httplib::Request,bool httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,unsigned long,int &,std::function<bool ()(unsigned long,unsigned long)>,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>,bool)::{lambda(std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)> const&)#1}>( a2, a4, (unsigned int)&v11, a7, a5, (_DWORD)a6, a2, a1, (unsigned int)v14, a5, a4); std::_Function_base::~_Function_base((std::_Function_base *)&v11); return v9; }
read_content<httplib::Request>: PUSH RBX SUB RSP,0x80 MOV AL,byte ptr [RSP + 0x90] MOV qword ptr [RSP + 0x50],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 AND qword ptr [RSP + 0x40],0x0 MOV RDX,qword ptr [R9 + 0x18] MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [R9 + 0x10] TEST RDX,RDX JZ 0x001228b0 MOVUPS XMM1,xmmword ptr [R9] ADD R9,0x10 MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOV qword ptr [RSP + 0x40],RDX MOVUPS xmmword ptr [R9],XMM0 LAB_001228b0: MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDI LEA RDX,[RSP + 0x50] MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x70],R8 MOV qword ptr [RSP + 0x78],RCX LAB_001228ce: MOV RDX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x20],RDX MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS XMM1,xmmword ptr [RSP + 0x68] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOVZX EAX,AL LEA RDX,[RSP + 0x30] MOV RDI,RSI MOV RSI,RCX MOV ECX,EAX CALL 0x00123491 LAB_00122900: MOV EBX,EAX LEA RDI,[RSP + 0x30] CALL 0x001249a4 MOV EAX,EBX ADD RSP,0x80 POP RBX RET
/* bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool) */ bool httplib::detail::read_content<httplib::Request> (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 *param_6,int1 param_7) { long lVar1; int4 uVar2; int4 uVar3; int4 uVar4; bool bVar5; int8 *puVar6; int8 local_58; int8 uStack_50; long local_48; int8 local_40; int8 local_38; int8 local_30; int8 uStack_28; int8 *local_20; int8 uStack_18; int8 local_10; local_58 = 0; uStack_50 = 0; local_48 = 0; local_40 = param_6[3]; lVar1 = param_6[2]; puVar6 = param_6; if (lVar1 != 0) { local_58 = *param_6; uStack_50 = param_6[1]; puVar6 = param_6 + 2; *puVar6 = 0; param_6[3] = 0; local_48 = lVar1; } local_20 = &local_38; /* try { // try from 001228ce to 001228ff has its CatchHandler @ 00122917 */ local_30._0_4_ = (int4)param_2; uStack_28._0_4_ = (int4)param_1; uStack_18._0_4_ = (int4)param_5; local_38 = param_3; uVar2 = (int4)local_30; local_30 = param_2; uVar3 = (int4)uStack_28; uStack_28 = param_1; uVar4 = (int4)uStack_18; uStack_18 = param_5; local_10 = param_4; bVar5 = prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::_lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)_1_> (param_2,param_4,&local_58,param_7,param_5,puVar6,uVar2,uVar3,local_20._0_4_, uVar4,param_4); std::_Function_base::~_Function_base((_Function_base *)&local_58); return bVar5; }
11,026
emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)
angrymouse[P]emittra/src/emittra.cpp
void Emittra::notify_associated_cvs(const std::shared_ptr<EventData>& event_data) { std::unique_lock<std::shared_mutex> lock(event_data->mutex); auto& cvs = event_data->associated_cvs; cvs.erase( std::remove_if(cvs.begin(), cvs.end(), [](const std::weak_ptr<std::condition_variable_any>& weak_cv) { if (auto cv = weak_cv.lock()) { cv->notify_all(); return false; } return true; }), cvs.end() ); }
O1
cpp
emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movl $0x280, %eax # imm = 0x280 addq (%rsi), %rax movq %rsp, %r14 movq %rax, (%r14) movb $0x0, 0x8(%r14) movq %r14, %rdi callq 0x78e6 movb $0x1, 0x8(%r14) movq (%rbx), %r12 movq 0x2f8(%r12), %rbx movq 0x300(%r12), %r13 movq %r13, %r15 subq %rbx, %r15 sarq $0x6, %r15 testq %r15, %r15 jle 0x4fce incq %r15 movq %rbx, %rdi callq 0x6328 testb %al, %al jne 0x501b leaq 0x10(%rbx), %r14 movq %r14, %rdi callq 0x6328 testb %al, %al jne 0x501e leaq 0x20(%rbx), %r14 movq %r14, %rdi callq 0x6328 testb %al, %al jne 0x501e leaq 0x30(%rbx), %r14 movq %r14, %rdi callq 0x6328 testb %al, %al jne 0x501e addq $0x40, %rbx decq %r15 cmpq $0x1, %r15 jg 0x4f81 movq %r13, %rax subq %rbx, %rax sarq $0x4, %rax cmpq $0x1, %rax je 0x500d cmpq $0x2, %rax je 0x4ffd movq %r13, %r14 cmpq $0x3, %rax jne 0x501e movq %rbx, %rdi callq 0x6328 testb %al, %al jne 0x501b addq $0x10, %rbx movq %rbx, %rdi callq 0x6328 testb %al, %al jne 0x501b addq $0x10, %rbx movq %rbx, %rdi callq 0x6328 testb %al, %al cmoveq %r13, %rbx movq %rbx, %r14 leaq 0x2f8(%r12), %rbx cmpq %r13, %r14 sete %al leaq 0x10(%r14), %r15 cmpq %r13, %r15 sete %cl orb %al, %cl jne 0x505e movq %r15, %rdi callq 0x6328 testb %al, %al jne 0x5055 movq %r14, %rdi movq %r15, %rsi callq 0xbbb2 addq $0x10, %r14 addq $0x10, %r15 cmpq %r13, %r15 jne 0x503a movq 0x300(%r12), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0xbbfc movq %rsp, %rdi callq 0x656c addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x656c movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS0_9EventDataEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rsi mov eax, 280h add rax, [rsi] mov r14, rsp mov [r14], rax mov byte ptr [r14+8], 0 mov rdi, r14 call _ZNSt11unique_lockISt12shared_mutexE4lockEv; std::unique_lock<std::shared_mutex>::lock(void) mov byte ptr [r14+8], 1 mov r12, [rbx] mov rbx, [r12+2F8h] mov r13, [r12+300h] mov r15, r13 sub r15, rbx sar r15, 6 test r15, r15 jle short loc_4FCE inc r15 loc_4F81: mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz loc_501B lea r14, [rbx+10h] mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_501E lea r14, [rbx+20h] mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_501E lea r14, [rbx+30h] mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_501E add rbx, 40h ; '@' dec r15 cmp r15, 1 jg short loc_4F81 loc_4FCE: mov rax, r13 sub rax, rbx sar rax, 4 cmp rax, 1 jz short loc_500D cmp rax, 2 jz short loc_4FFD mov r14, r13 cmp rax, 3 jnz short loc_501E mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_501B add rbx, 10h loc_4FFD: mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_501B add rbx, 10h loc_500D: mov rdi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al cmovz rbx, r13 loc_501B: mov r14, rbx loc_501E: lea rbx, [r12+2F8h] cmp r14, r13 setz al lea r15, [r14+10h] cmp r15, r13 setz cl or cl, al jnz short loc_505E loc_503A: mov rdi, r15 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_5055 mov rdi, r14 mov rsi, r15 call _ZNSt10__weak_ptrINSt3_V222condition_variable_anyELN9__gnu_cxx12_Lock_policyE2EEaSEOS4_; std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::operator=(std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>&&) add r14, 10h loc_5055: add r15, 10h cmp r15, r13 jnz short loc_503A loc_505E: mov rdx, [r12+300h] mov rdi, rbx mov rsi, r14 call _ZNSt6vectorISt8weak_ptrINSt3_V222condition_variable_anyEESaIS3_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS3_S5_EES9_; std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::_M_erase(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any>*,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>,__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any>*,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) mov rdi, rsp call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax mov rdi, rsp call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() mov rdi, rbx call __Unwind_Resume
long long emittra::Emittra::notify_associated_cvs(long long a1, long long *a2) { long long v2; // r12 long long v3; // rbx long long v4; // r13 long long v5; // r15 long long v6; // r15 long long v7; // r14 long long v8; // rax long long v9; // r15 long long v11; // [rsp+0h] [rbp-38h] BYREF char v12; // [rsp+8h] [rbp-30h] v11 = *a2 + 640; v12 = 0; std::unique_lock<std::shared_mutex>::lock(&v11); v12 = 1; v2 = *a2; v3 = *(_QWORD *)(*a2 + 760); v4 = *(_QWORD *)(*a2 + 768); v5 = (v4 - v3) >> 6; if ( v5 > 0 ) { v6 = v5 + 1; while ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) { v7 = v3 + 16; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3 + 16) ) goto LABEL_18; v7 = v3 + 32; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3 + 32) ) goto LABEL_18; v7 = v3 + 48; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3 + 48) ) goto LABEL_18; v3 += 64LL; if ( --v6 <= 1 ) goto LABEL_8; } goto LABEL_17; } LABEL_8: v8 = (v4 - v3) >> 4; if ( v8 == 1 ) goto LABEL_15; if ( v8 != 2 ) { v7 = v4; if ( v8 != 3 ) goto LABEL_18; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) goto LABEL_17; v3 += 16LL; } if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) { v3 += 16LL; LABEL_15: if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) v3 = v4; } LABEL_17: v7 = v3; LABEL_18: v9 = v7 + 16; if ( v7 != v4 && v7 + 16 != v4 ) { do { if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v9) ) { std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::operator=(v7, v9); v7 += 16LL; } v9 += 16LL; } while ( v9 != v4 ); } std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::_M_erase(v2 + 760, v7, *(_QWORD *)(v2 + 768)); return std::unique_lock<std::shared_mutex>::~unique_lock(&v11); }
notify_associated_cvs: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV EAX,0x280 ADD RAX,qword ptr [RSI] MOV R14,RSP MOV qword ptr [R14],RAX MOV byte ptr [R14 + 0x8],0x0 MOV RDI,R14 CALL 0x001078e6 MOV byte ptr [R14 + 0x8],0x1 MOV R12,qword ptr [RBX] MOV RBX,qword ptr [R12 + 0x2f8] MOV R13,qword ptr [R12 + 0x300] MOV R15,R13 SUB R15,RBX SAR R15,0x6 TEST R15,R15 JLE 0x00104fce INC R15 LAB_00104f81: MOV RDI,RBX CALL 0x00106328 TEST AL,AL JNZ 0x0010501b LEA R14,[RBX + 0x10] MOV RDI,R14 CALL 0x00106328 TEST AL,AL JNZ 0x0010501e LEA R14,[RBX + 0x20] MOV RDI,R14 CALL 0x00106328 TEST AL,AL JNZ 0x0010501e LEA R14,[RBX + 0x30] MOV RDI,R14 CALL 0x00106328 TEST AL,AL JNZ 0x0010501e ADD RBX,0x40 DEC R15 CMP R15,0x1 JG 0x00104f81 LAB_00104fce: MOV RAX,R13 SUB RAX,RBX SAR RAX,0x4 CMP RAX,0x1 JZ 0x0010500d CMP RAX,0x2 JZ 0x00104ffd MOV R14,R13 CMP RAX,0x3 JNZ 0x0010501e MOV RDI,RBX CALL 0x00106328 TEST AL,AL JNZ 0x0010501b ADD RBX,0x10 LAB_00104ffd: MOV RDI,RBX CALL 0x00106328 TEST AL,AL JNZ 0x0010501b ADD RBX,0x10 LAB_0010500d: MOV RDI,RBX CALL 0x00106328 TEST AL,AL CMOVZ RBX,R13 LAB_0010501b: MOV R14,RBX LAB_0010501e: LEA RBX,[R12 + 0x2f8] CMP R14,R13 SETZ AL LEA R15,[R14 + 0x10] CMP R15,R13 SETZ CL OR CL,AL JNZ 0x0010505e LAB_0010503a: MOV RDI,R15 CALL 0x00106328 TEST AL,AL JNZ 0x00105055 MOV RDI,R14 MOV RSI,R15 CALL 0x0010bbb2 ADD R14,0x10 LAB_00105055: ADD R15,0x10 CMP R15,R13 JNZ 0x0010503a LAB_0010505e: MOV RDX,qword ptr [R12 + 0x300] LAB_00105066: MOV RDI,RBX MOV RSI,R14 CALL 0x0010bbfc LAB_00105071: MOV RDI,RSP CALL 0x0010656c ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&) */ void __thiscall emittra::Emittra::notify_associated_cvs(Emittra *this,shared_ptr *param_1) { long lVar1; _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *p_Var2; bool bVar3; _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *p_Var4; _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *this_00; long lVar5; long local_38; int1 local_30; local_38 = *(long *)param_1 + 0x280; local_30 = 0; std::unique_lock<std::shared_mutex>::lock((unique_lock<std::shared_mutex> *)&local_38); local_30 = 1; lVar1 = *(long *)param_1; p_Var4 = *(_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> **)(lVar1 + 0x2f8); p_Var2 = *(_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> **)(lVar1 + 0x300); lVar5 = (long)p_Var2 - (long)p_Var4 >> 6; if (0 < lVar5) { lVar5 = lVar5 + 1; do { bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4); this_00 = p_Var4; if (bVar3) goto LAB_0010501e; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4 + 0x10); this_00 = p_Var4 + 0x10; if (bVar3) goto LAB_0010501e; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4 + 0x20); this_00 = p_Var4 + 0x20; if (bVar3) goto LAB_0010501e; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4 + 0x30); this_00 = p_Var4 + 0x30; if (bVar3) goto LAB_0010501e; p_Var4 = p_Var4 + 0x40; lVar5 = lVar5 + -1; } while (1 < lVar5); } lVar5 = (long)p_Var2 - (long)p_Var4 >> 4; if (lVar5 != 1) { if (lVar5 != 2) { this_00 = p_Var2; if ((lVar5 != 3) || (bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4), this_00 = p_Var4, bVar3)) goto LAB_0010501e; p_Var4 = p_Var4 + 0x10; } bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4); this_00 = p_Var4; if (bVar3) goto LAB_0010501e; p_Var4 = p_Var4 + 0x10; } bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4); this_00 = p_Var4; if (!bVar3) { this_00 = p_Var2; } LAB_0010501e: p_Var4 = this_00 + 0x10; if (p_Var4 != p_Var2 && this_00 != p_Var2) { do { bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var4); if (!bVar3) { std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::operator= ((__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2> *) this_00,(__weak_ptr *)p_Var4); this_00 = (_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *)((__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2> *) this_00 + 0x10); } p_Var4 = (_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *)((__weak_ptr *)p_Var4 + 0x10); } while (p_Var4 != p_Var2); } /* try { // try from 00105066 to 00105070 has its CatchHandler @ 00105087 */ std:: vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> ::_M_erase((vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> *)(lVar1 + 0x2f8),this_00,*(int8 *)(lVar1 + 0x300)); std::unique_lock<std::shared_mutex>::~unique_lock((unique_lock<std::shared_mutex> *)&local_38); return; }
11,027
emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)
angrymouse[P]emittra/src/emittra.cpp
void Emittra::notify_associated_cvs(const std::shared_ptr<EventData>& event_data) { std::unique_lock<std::shared_mutex> lock(event_data->mutex); auto& cvs = event_data->associated_cvs; cvs.erase( std::remove_if(cvs.begin(), cvs.end(), [](const std::weak_ptr<std::condition_variable_any>& weak_cv) { if (auto cv = weak_cv.lock()) { cv->notify_all(); return false; } return true; }), cvs.end() ); }
O3
cpp
emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movl $0x280, %eax # imm = 0x280 addq (%rsi), %rax leaq 0x8(%rsp), %r14 movq %rax, (%r14) movb $0x0, 0x8(%r14) movq %r14, %rdi callq 0x787e movb $0x1, 0x8(%r14) movq (%rbx), %r12 leaq 0x2f8(%r12), %rax movq %rax, (%rsp) movq 0x2f8(%r12), %r14 movq 0x300(%r12), %rbx movq %rbx, %r13 subq %r14, %r13 movq %r13, %rbp sarq $0x6, %rbp testq %rbp, %rbp jle 0x4fba incq %rbp movq %r14, %rdi callq 0x6314 testb %al, %al jne 0x4fea leaq 0x10(%r14), %r15 movq %r15, %rdi callq 0x6314 testb %al, %al jne 0x4fed leaq 0x20(%r14), %r15 movq %r15, %rdi callq 0x6314 testb %al, %al jne 0x4fed leaq 0x30(%r14), %r15 movq %r15, %rdi callq 0x6314 testb %al, %al jne 0x4fed addq $0x40, %r14 decq %rbp addq $-0x40, %r13 cmpq $0x1, %rbp jg 0x4f6d sarq $0x4, %r13 cmpq $0x1, %r13 je 0x5009 cmpq $0x2, %r13 je 0x4ff3 cmpq $0x3, %r13 jne 0x5058 movq %r14, %rdi callq 0x6314 testb %al, %al movq (%rsp), %r13 jne 0x501b addq $0x10, %r14 jmp 0x4ff7 movq %r14, %r15 movq (%rsp), %r13 jmp 0x501e movq (%rsp), %r13 movq %r14, %rdi callq 0x6314 testb %al, %al jne 0x501b addq $0x10, %r14 jmp 0x500d movq (%rsp), %r13 movq %r14, %rdi callq 0x6314 testb %al, %al cmoveq %rbx, %r14 movq %r14, %r15 cmpq %rbx, %r15 sete %al leaq 0x10(%r15), %r14 cmpq %rbx, %r14 sete %cl orb %al, %cl jne 0x505f movq %r14, %rdi callq 0x6314 testb %al, %al jne 0x504d movq %r15, %rdi movq %r14, %rsi callq 0xb9ea addq $0x10, %r15 addq $0x10, %r14 cmpq %rbx, %r14 jne 0x5032 jmp 0x505f movq %rbx, %r15 movq (%rsp), %r13 movq 0x300(%r12), %rdx movq %r13, %rdi movq %r15, %rsi callq 0xba34 leaq 0x8(%rsp), %rdi callq 0x654a addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x654a movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS0_9EventDataEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov eax, 280h add rax, [rsi] lea r14, [rsp+48h+var_40] mov [r14], rax mov byte ptr [r14+8], 0 mov rdi, r14 call _ZNSt11unique_lockISt12shared_mutexE4lockEv; std::unique_lock<std::shared_mutex>::lock(void) mov byte ptr [r14+8], 1 mov r12, [rbx] lea rax, [r12+2F8h] mov [rsp+48h+var_48], rax mov r14, [r12+2F8h] mov rbx, [r12+300h] mov r13, rbx sub r13, r14 mov rbp, r13 sar rbp, 6 test rbp, rbp jle short loc_4FBA inc rbp loc_4F6D: mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_4FEA lea r15, [r14+10h] mov rdi, r15 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_4FED lea r15, [r14+20h] mov rdi, r15 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_4FED lea r15, [r14+30h] mov rdi, r15 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_4FED add r14, 40h ; '@' dec rbp add r13, 0FFFFFFFFFFFFFFC0h cmp rbp, 1 jg short loc_4F6D loc_4FBA: sar r13, 4 cmp r13, 1 jz short loc_5009 cmp r13, 2 jz short loc_4FF3 cmp r13, 3 jnz loc_5058 mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al mov r13, [rsp+48h+var_48] jnz short loc_501B add r14, 10h jmp short loc_4FF7 loc_4FEA: mov r15, r14 loc_4FED: mov r13, [rsp+48h+var_48] jmp short loc_501E loc_4FF3: mov r13, [rsp+48h+var_48] loc_4FF7: mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_501B add r14, 10h jmp short loc_500D loc_5009: mov r13, [rsp+48h+var_48] loc_500D: mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al cmovz r14, rbx loc_501B: mov r15, r14 loc_501E: cmp r15, rbx setz al lea r14, [r15+10h] cmp r14, rbx setz cl or cl, al jnz short loc_505F loc_5032: mov rdi, r14 call _ZN9__gnu_cxx5__ops10_Iter_predIZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS3_9EventDataEEE3$_0EclINS_17__normal_iteratorIPSt8weak_ptrINSt3_V222condition_variable_anyEESt6vectorISG_SaISG_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) test al, al jnz short loc_504D mov rdi, r15 mov rsi, r14 call _ZNSt10__weak_ptrINSt3_V222condition_variable_anyELN9__gnu_cxx12_Lock_policyE2EEaSEOS4_; std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::operator=(std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>&&) add r15, 10h loc_504D: add r14, 10h cmp r14, rbx jnz short loc_5032 jmp short loc_505F loc_5058: mov r15, rbx mov r13, [rsp+48h+var_48] loc_505F: mov rdx, [r12+300h] mov rdi, r13 mov rsi, r15 call _ZNSt6vectorISt8weak_ptrINSt3_V222condition_variable_anyEESaIS3_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS3_S5_EES9_; std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::_M_erase(__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any>*,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>,__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any>*,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>) lea rdi, [rsp+48h+var_40] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() mov rdi, rbx call __Unwind_Resume
long long emittra::Emittra::notify_associated_cvs(_DWORD a1, long long *a2) { long long v2; // r12 long long v3; // r14 long long v4; // rbx long long v5; // r13 long long v6; // rbp long long v7; // r15 long long v8; // r13 _QWORD *v9; // r13 long long v10; // r14 _QWORD *v12; // [rsp+0h] [rbp-48h] long long v13; // [rsp+8h] [rbp-40h] BYREF char v14; // [rsp+10h] [rbp-38h] v13 = *a2 + 640; v14 = 0; std::unique_lock<std::shared_mutex>::lock(&v13); v14 = 1; v2 = *a2; v12 = (_QWORD *)(*a2 + 760); v3 = *v12; v4 = *(_QWORD *)(*a2 + 768); v5 = v4 - *v12; if ( v5 >> 6 > 0 ) { v6 = (v5 >> 6) + 1; while ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) { v7 = v3 + 16; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3 + 16) ) goto LABEL_14; v7 = v3 + 32; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3 + 32) ) goto LABEL_14; v7 = v3 + 48; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3 + 48) ) goto LABEL_14; v3 += 64LL; --v6; v5 -= 64LL; if ( v6 <= 1 ) goto LABEL_8; } v7 = v3; LABEL_14: v9 = v12; goto LABEL_22; } LABEL_8: v8 = v5 >> 4; switch ( v8 ) { case 1LL: v9 = v12; LABEL_19: if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) v3 = v4; goto LABEL_21; case 2LL: v9 = v12; break; case 3LL: v9 = v12; if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) goto LABEL_21; v3 += 16LL; break; default: v7 = v4; v9 = v12; goto LABEL_28; } if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v3) ) { v3 += 16LL; goto LABEL_19; } LABEL_21: v7 = v3; LABEL_22: v10 = v7 + 16; if ( v7 != v4 && v7 + 16 != v4 ) { do { if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&)::$_0>::operator()<__gnu_cxx::__normal_iterator<std::weak_ptr<std::_V2::condition_variable_any> *,std::vector<std::weak_ptr<std::_V2::condition_variable_any>>>>(v10) ) { std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::operator=(v7, v10); v7 += 16LL; } v10 += 16LL; } while ( v10 != v4 ); } LABEL_28: std::vector<std::weak_ptr<std::_V2::condition_variable_any>>::_M_erase(v9, v7, *(_QWORD *)(v2 + 768)); return std::unique_lock<std::shared_mutex>::~unique_lock(&v13); }
notify_associated_cvs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV EAX,0x280 ADD RAX,qword ptr [RSI] LEA R14,[RSP + 0x8] MOV qword ptr [R14],RAX MOV byte ptr [R14 + 0x8],0x0 MOV RDI,R14 CALL 0x0010787e MOV byte ptr [R14 + 0x8],0x1 MOV R12,qword ptr [RBX] LEA RAX,[R12 + 0x2f8] MOV qword ptr [RSP],RAX MOV R14,qword ptr [R12 + 0x2f8] MOV RBX,qword ptr [R12 + 0x300] MOV R13,RBX SUB R13,R14 MOV RBP,R13 SAR RBP,0x6 TEST RBP,RBP JLE 0x00104fba INC RBP LAB_00104f6d: MOV RDI,R14 CALL 0x00106314 TEST AL,AL JNZ 0x00104fea LEA R15,[R14 + 0x10] MOV RDI,R15 CALL 0x00106314 TEST AL,AL JNZ 0x00104fed LEA R15,[R14 + 0x20] MOV RDI,R15 CALL 0x00106314 TEST AL,AL JNZ 0x00104fed LEA R15,[R14 + 0x30] MOV RDI,R15 CALL 0x00106314 TEST AL,AL JNZ 0x00104fed ADD R14,0x40 DEC RBP ADD R13,-0x40 CMP RBP,0x1 JG 0x00104f6d LAB_00104fba: SAR R13,0x4 CMP R13,0x1 JZ 0x00105009 CMP R13,0x2 JZ 0x00104ff3 CMP R13,0x3 JNZ 0x00105058 MOV RDI,R14 CALL 0x00106314 TEST AL,AL MOV R13,qword ptr [RSP] JNZ 0x0010501b ADD R14,0x10 JMP 0x00104ff7 LAB_00104fea: MOV R15,R14 LAB_00104fed: MOV R13,qword ptr [RSP] JMP 0x0010501e LAB_00104ff3: MOV R13,qword ptr [RSP] LAB_00104ff7: MOV RDI,R14 CALL 0x00106314 TEST AL,AL JNZ 0x0010501b ADD R14,0x10 JMP 0x0010500d LAB_00105009: MOV R13,qword ptr [RSP] LAB_0010500d: MOV RDI,R14 CALL 0x00106314 TEST AL,AL CMOVZ R14,RBX LAB_0010501b: MOV R15,R14 LAB_0010501e: CMP R15,RBX SETZ AL LEA R14,[R15 + 0x10] CMP R14,RBX SETZ CL OR CL,AL JNZ 0x0010505f LAB_00105032: MOV RDI,R14 CALL 0x00106314 TEST AL,AL JNZ 0x0010504d MOV RDI,R15 MOV RSI,R14 CALL 0x0010b9ea ADD R15,0x10 LAB_0010504d: ADD R14,0x10 CMP R14,RBX JNZ 0x00105032 JMP 0x0010505f LAB_00105058: MOV R15,RBX MOV R13,qword ptr [RSP] LAB_0010505f: MOV RDX,qword ptr [R12 + 0x300] LAB_00105067: MOV RDI,R13 MOV RSI,R15 CALL 0x0010ba34 LAB_00105072: LEA RDI,[RSP + 0x8] CALL 0x0010654a ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&) */ void __thiscall emittra::Emittra::notify_associated_cvs(Emittra *this,shared_ptr *param_1) { long lVar1; _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *p_Var2; bool bVar3; long lVar4; long lVar5; _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *p_Var6; _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *this_00; long local_40; int1 local_38; local_40 = *(long *)param_1 + 0x280; local_38 = 0; std::unique_lock<std::shared_mutex>::lock((unique_lock<std::shared_mutex> *)&local_40); local_38 = 1; lVar1 = *(long *)param_1; p_Var6 = *(_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> **)(lVar1 + 0x2f8); p_Var2 = *(_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> **)(lVar1 + 0x300); lVar5 = (long)p_Var2 - (long)p_Var6; if (0 < lVar5 >> 6) { lVar4 = (lVar5 >> 6) + 1; do { bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6); this_00 = p_Var6; if (bVar3) goto LAB_0010501e; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6 + 0x10); this_00 = p_Var6 + 0x10; if (bVar3) goto LAB_0010501e; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6 + 0x20); this_00 = p_Var6 + 0x20; if (bVar3) goto LAB_0010501e; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6 + 0x30); this_00 = p_Var6 + 0x30; if (bVar3) goto LAB_0010501e; p_Var6 = p_Var6 + 0x40; lVar4 = lVar4 + -1; lVar5 = lVar5 + -0x40; } while (1 < lVar4); } lVar5 = lVar5 >> 4; if (lVar5 == 1) { LAB_0010500d: bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6); this_00 = p_Var6; if (!bVar3) { this_00 = p_Var2; } } else if (lVar5 == 2) { LAB_00104ff7: bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6); this_00 = p_Var6; if (!bVar3) { p_Var6 = p_Var6 + 0x10; goto LAB_0010500d; } } else { this_00 = p_Var2; if (lVar5 != 3) goto LAB_0010505f; bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6); this_00 = p_Var6; if (!bVar3) { p_Var6 = p_Var6 + 0x10; goto LAB_00104ff7; } } LAB_0010501e: p_Var6 = this_00 + 0x10; if (p_Var6 != p_Var2 && this_00 != p_Var2) { do { bVar3 = __gnu_cxx::__ops:: _Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::$_0> ::operator()(p_Var6); if (!bVar3) { std::__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2>::operator= ((__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2> *) this_00,(__weak_ptr *)p_Var6); this_00 = (_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *)((__weak_ptr<std::_V2::condition_variable_any,(__gnu_cxx::_Lock_policy)2> *) this_00 + 0x10); } p_Var6 = (_Iter_pred<emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData>const&)::__0> *)((__weak_ptr *)p_Var6 + 0x10); } while (p_Var6 != p_Var2); } LAB_0010505f: /* try { // try from 00105067 to 00105071 has its CatchHandler @ 0010508b */ std:: vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> ::_M_erase((vector<std::weak_ptr<std::_V2::condition_variable_any>,std::allocator<std::weak_ptr<std::_V2::condition_variable_any>>> *)(lVar1 + 0x2f8),this_00,*(int8 *)(lVar1 + 0x300)); std::unique_lock<std::shared_mutex>::~unique_lock((unique_lock<std::shared_mutex> *)&local_40); return; }
11,028
LefDefParser::lefiVia::addLayer(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
void lefiVia::addLayer(const char *name) { lefiViaLayer *newl; if (numLayers_ == layersAllocated_) { int i; lefiViaLayer **l; if (layersAllocated_ == 0) layersAllocated_ = 2; else layersAllocated_ *= 2; l = (lefiViaLayer**) lefMalloc(sizeof(lefiViaLayer*) * layersAllocated_); for (i = 0; i < numLayers_; i++) { l[i] = layers_[i]; } lefFree((char*) (layers_)); layers_ = l; } newl = (lefiViaLayer*) lefMalloc(sizeof(lefiViaLayer)); newl->Init(); layers_[numLayers_] = newl; newl->setName(name); numLayers_ += 1; }
O3
cpp
LefDefParser::lefiVia::addLayer(char const*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movl 0x48(%rdi), %eax cmpl 0x4c(%rdi), %eax jne 0x146b8 leal (%rax,%rax), %ecx testl %eax, %eax movl $0x2, %eax cmovnel %ecx, %eax movl %eax, 0x4c(%rbx) movslq %eax, %rdi shlq $0x3, %rdi callq 0x24985 movq %rax, %r15 movslq 0x48(%rbx), %rax testq %rax, %rax jle 0x146ab xorl %ecx, %ecx movq 0x50(%rbx), %rdx movq (%rdx,%rcx,8), %rdx movq %rdx, (%r15,%rcx,8) incq %rcx cmpq %rcx, %rax jne 0x14697 movq 0x50(%rbx), %rdi callq 0x26040 movq %r15, 0x50(%rbx) movl $0x50, %edi callq 0x24985 movq %rax, %r15 movq %rax, %rdi callq 0x13420 movq 0x50(%rbx), %rax movslq 0x48(%rbx), %rcx movq %r15, (%rax,%rcx,8) movq %r15, %rdi movq %r14, %rsi callq 0x13568 incl 0x48(%rbx) popq %rbx popq %r14 popq %r15 retq nop
_ZN12LefDefParser7lefiVia8addLayerEPKc: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov eax, [rdi+48h] cmp eax, [rdi+4Ch] jnz short loc_146B8 lea ecx, [rax+rax] test eax, eax mov eax, 2 cmovnz eax, ecx mov [rbx+4Ch], eax movsxd rdi, eax shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r15, rax movsxd rax, dword ptr [rbx+48h] test rax, rax jle short loc_146AB xor ecx, ecx loc_14697: mov rdx, [rbx+50h] mov rdx, [rdx+rcx*8] mov [r15+rcx*8], rdx inc rcx cmp rax, rcx jnz short loc_14697 loc_146AB: mov rdi, [rbx+50h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov [rbx+50h], r15 loc_146B8: mov edi, offset off_50; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov r15, rax mov rdi, rax; this call _ZN12LefDefParser12lefiViaLayer4InitEv; LefDefParser::lefiViaLayer::Init(void) mov rax, [rbx+50h] movsxd rcx, dword ptr [rbx+48h] mov [rax+rcx*8], r15 mov rdi, r15; this mov rsi, r14; char * call _ZN12LefDefParser12lefiViaLayer7setNameEPKc; LefDefParser::lefiViaLayer::setName(char const*) inc dword ptr [rbx+48h] pop rbx pop r14 pop r15 retn
long long LefDefParser::lefiVia::addLayer(LefDefParser::lefiVia *this, char *a2) { int v2; // eax int v3; // ecx bool v4; // zf int v5; // eax long long v6; // r15 long long v7; // rax long long i; // rcx LefDefParser::lefiViaLayer *v9; // r15 long long result; // rax v2 = *((_DWORD *)this + 18); if ( v2 == *((_DWORD *)this + 19) ) { v3 = 2 * v2; v4 = v2 == 0; v5 = 2; if ( !v4 ) v5 = v3; *((_DWORD *)this + 19) = v5; v6 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v5), (unsigned long long)a2); v7 = *((int *)this + 18); if ( v7 > 0 ) { for ( i = 0LL; i != v7; ++i ) *(_QWORD *)(v6 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 10) + 8 * i); } LefDefParser::lefFree(*((LefDefParser **)this + 10), a2); *((_QWORD *)this + 10) = v6; } v9 = (LefDefParser::lefiViaLayer *)LefDefParser::lefMalloc((LefDefParser *)off_50, (unsigned long long)a2); LefDefParser::lefiViaLayer::Init(v9, (unsigned long long)a2); *(_QWORD *)(*((_QWORD *)this + 10) + 8LL * *((int *)this + 18)) = v9; result = LefDefParser::lefiViaLayer::setName(v9, (LefDefParser *)a2); ++*((_DWORD *)this + 18); return result; }
addLayer: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x48] CMP EAX,dword ptr [RDI + 0x4c] JNZ 0x001146b8 LEA ECX,[RAX + RAX*0x1] TEST EAX,EAX MOV EAX,0x2 CMOVNZ EAX,ECX MOV dword ptr [RBX + 0x4c],EAX MOVSXD RDI,EAX SHL RDI,0x3 CALL 0x00124985 MOV R15,RAX MOVSXD RAX,dword ptr [RBX + 0x48] TEST RAX,RAX JLE 0x001146ab XOR ECX,ECX LAB_00114697: MOV RDX,qword ptr [RBX + 0x50] MOV RDX,qword ptr [RDX + RCX*0x8] MOV qword ptr [R15 + RCX*0x8],RDX INC RCX CMP RAX,RCX JNZ 0x00114697 LAB_001146ab: MOV RDI,qword ptr [RBX + 0x50] CALL 0x00126040 MOV qword ptr [RBX + 0x50],R15 LAB_001146b8: MOV EDI,0x50 CALL 0x00124985 MOV R15,RAX MOV RDI,RAX CALL 0x00113420 MOV RAX,qword ptr [RBX + 0x50] MOVSXD RCX,dword ptr [RBX + 0x48] MOV qword ptr [RAX + RCX*0x8],R15 MOV RDI,R15 MOV RSI,R14 CALL 0x00113568 INC dword ptr [RBX + 0x48] POP RBX POP R14 POP R15 RET
/* LefDefParser::lefiVia::addLayer(char const*) */ void __thiscall LefDefParser::lefiVia::addLayer(lefiVia *this,char *param_1) { int iVar1; int iVar2; long lVar3; lefiViaLayer *this_00; long lVar4; char *pcVar5; iVar1 = *(int *)(this + 0x48); pcVar5 = param_1; if (iVar1 == *(int *)(this + 0x4c)) { iVar2 = 2; if (iVar1 != 0) { iVar2 = iVar1 * 2; } *(int *)(this + 0x4c) = iVar2; lVar3 = lefMalloc((LefDefParser *)((long)iVar2 << 3),(ulong)param_1); iVar1 = *(int *)(this + 0x48); if (0 < (long)iVar1) { lVar4 = 0; do { *(int8 *)(lVar3 + lVar4 * 8) = *(int8 *)(*(long *)(this + 0x50) + lVar4 * 8); lVar4 = lVar4 + 1; } while (iVar1 != lVar4); } lefFree(*(void **)(this + 0x50)); *(long *)(this + 0x50) = lVar3; } this_00 = (lefiViaLayer *)lefMalloc((LefDefParser *)0x50,(ulong)pcVar5); lefiViaLayer::Init(); *(lefiViaLayer **)(*(long *)(this + 0x50) + (long)*(int *)(this + 0x48) * 8) = this_00; lefiViaLayer::setName(this_00,param_1); *(int *)(this + 0x48) = *(int *)(this + 0x48) + 1; return; }
11,029
func_uni_ksc5601_onechar
eloqsql/strings/ctype-euc_kr.c
static int func_uni_ksc5601_onechar(int code){ if ((code>=0x00A1)&&(code<=0x0167)) return(tab_uni_ksc56010[code-0x00A1]); if ((code>=0x02C7)&&(code<=0x0451)) return(tab_uni_ksc56011[code-0x02C7]); if ((code>=0x2015)&&(code<=0x2312)) return(tab_uni_ksc56012[code-0x2015]); if ((code>=0x2460)&&(code<=0x266D)) return(tab_uni_ksc56013[code-0x2460]); if ((code>=0x3000)&&(code<=0x327F)) return(tab_uni_ksc56014[code-0x3000]); if ((code>=0x3380)&&(code<=0x33DD)) return(tab_uni_ksc56015[code-0x3380]); if ((code>=0x4E00)&&(code<=0x947F)) return(tab_uni_ksc56016[code-0x4E00]); if ((code>=0x9577)&&(code<=0x9F9C)) return(tab_uni_ksc56017[code-0x9577]); if ((code>=0xAC00)&&(code<=0xD7A3)) return(tab_uni_ksc56018[code-0xAC00]); if ((code>=0xF900)&&(code<=0xFA0B)) return(tab_uni_ksc56019[code-0xF900]); if ((code>=0xFF01)&&(code<=0xFFE6)) return(tab_uni_ksc560110[code-0xFF01]); return(0); }
O0
c
func_uni_ksc5601_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0xa1, -0x8(%rbp) jl 0x3b4e7 cmpl $0x167, -0x8(%rbp) # imm = 0x167 jg 0x3b4e7 movl -0x8(%rbp), %eax subl $0xa1, %eax movslq %eax, %rcx leaq 0xabaf5(%rip), %rax # 0xe6fd0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7 jl 0x3b517 cmpl $0x451, -0x8(%rbp) # imm = 0x451 jg 0x3b517 movl -0x8(%rbp), %eax subl $0x2c7, %eax # imm = 0x2C7 movslq %eax, %rcx leaq 0xabc55(%rip), %rax # 0xe7160 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x2015, -0x8(%rbp) # imm = 0x2015 jl 0x3b547 cmpl $0x2312, -0x8(%rbp) # imm = 0x2312 jg 0x3b547 movl -0x8(%rbp), %eax subl $0x2015, %eax # imm = 0x2015 movslq %eax, %rcx leaq 0xabf45(%rip), %rax # 0xe7480 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x2460, -0x8(%rbp) # imm = 0x2460 jl 0x3b577 cmpl $0x266d, -0x8(%rbp) # imm = 0x266D jg 0x3b577 movl -0x8(%rbp), %eax subl $0x2460, %eax # imm = 0x2460 movslq %eax, %rcx leaq 0xac515(%rip), %rax # 0xe7a80 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x3000, -0x8(%rbp) # imm = 0x3000 jl 0x3b5a7 cmpl $0x327f, -0x8(%rbp) # imm = 0x327F jg 0x3b5a7 movl -0x8(%rbp), %eax subl $0x3000, %eax # imm = 0x3000 movslq %eax, %rcx leaq 0xac905(%rip), %rax # 0xe7ea0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x3380, -0x8(%rbp) # imm = 0x3380 jl 0x3b5d7 cmpl $0x33dd, -0x8(%rbp) # imm = 0x33DD jg 0x3b5d7 movl -0x8(%rbp), %eax subl $0x3380, %eax # imm = 0x3380 movslq %eax, %rcx leaq 0xacdd5(%rip), %rax # 0xe83a0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00 jl 0x3b607 cmpl $0x947f, -0x8(%rbp) # imm = 0x947F jg 0x3b607 movl -0x8(%rbp), %eax subl $0x4e00, %eax # imm = 0x4E00 movslq %eax, %rcx leaq 0xace65(%rip), %rax # 0xe8460 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0x9577, -0x8(%rbp) # imm = 0x9577 jl 0x3b637 cmpl $0x9f9c, -0x8(%rbp) # imm = 0x9F9C jg 0x3b637 movl -0x8(%rbp), %eax subl $0x9577, %eax # imm = 0x9577 movslq %eax, %rcx leaq 0xb5b35(%rip), %rax # 0xf1160 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0xac00, -0x8(%rbp) # imm = 0xAC00 jl 0x3b664 cmpl $0xd7a3, -0x8(%rbp) # imm = 0xD7A3 jg 0x3b664 movl -0x8(%rbp), %eax subl $0xac00, %eax # imm = 0xAC00 movslq %eax, %rcx leaq 0xb6f55(%rip), %rax # 0xf25b0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0xf900, -0x8(%rbp) # imm = 0xF900 jl 0x3b691 cmpl $0xfa0b, -0x8(%rbp) # imm = 0xFA0B jg 0x3b691 movl -0x8(%rbp), %eax subl $0xf900, %eax # imm = 0xF900 movslq %eax, %rcx leaq 0xbc678(%rip), %rax # 0xf7d00 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 cmpl $0xff01, -0x8(%rbp) # imm = 0xFF01 jl 0x3b6be cmpl $0xffe6, -0x8(%rbp) # imm = 0xFFE6 jg 0x3b6be movl -0x8(%rbp), %eax subl $0xff01, %eax # imm = 0xFF01 movslq %eax, %rcx leaq 0xbc86b(%rip), %rax # 0xf7f20 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0x3b6c5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_uni_ksc5601_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 0A1h jl short loc_3B4E7 cmp [rbp+var_8], 167h jg short loc_3B4E7 mov eax, [rbp+var_8] sub eax, 0A1h movsxd rcx, eax lea rax, tab_uni_ksc56010 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B4E7: cmp [rbp+var_8], 2C7h jl short loc_3B517 cmp [rbp+var_8], 451h jg short loc_3B517 mov eax, [rbp+var_8] sub eax, 2C7h movsxd rcx, eax lea rax, tab_uni_ksc56011 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B517: cmp [rbp+var_8], 2015h jl short loc_3B547 cmp [rbp+var_8], 2312h jg short loc_3B547 mov eax, [rbp+var_8] sub eax, 2015h movsxd rcx, eax lea rax, tab_uni_ksc56012 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B547: cmp [rbp+var_8], 2460h jl short loc_3B577 cmp [rbp+var_8], 266Dh jg short loc_3B577 mov eax, [rbp+var_8] sub eax, 2460h movsxd rcx, eax lea rax, tab_uni_ksc56013 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B577: cmp [rbp+var_8], 3000h jl short loc_3B5A7 cmp [rbp+var_8], 327Fh jg short loc_3B5A7 mov eax, [rbp+var_8] sub eax, 3000h movsxd rcx, eax lea rax, tab_uni_ksc56014 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B5A7: cmp [rbp+var_8], 3380h jl short loc_3B5D7 cmp [rbp+var_8], 33DDh jg short loc_3B5D7 mov eax, [rbp+var_8] sub eax, 3380h movsxd rcx, eax lea rax, tab_uni_ksc56015 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B5D7: cmp [rbp+var_8], 4E00h jl short loc_3B607 cmp [rbp+var_8], 947Fh jg short loc_3B607 mov eax, [rbp+var_8] sub eax, 4E00h movsxd rcx, eax lea rax, tab_uni_ksc56016 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B607: cmp [rbp+var_8], 9577h jl short loc_3B637 cmp [rbp+var_8], 9F9Ch jg short loc_3B637 mov eax, [rbp+var_8] sub eax, 9577h movsxd rcx, eax lea rax, tab_uni_ksc56017 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_3B6C5 loc_3B637: cmp [rbp+var_8], 0AC00h jl short loc_3B664 cmp [rbp+var_8], 0D7A3h jg short loc_3B664 mov eax, [rbp+var_8] sub eax, 0AC00h movsxd rcx, eax lea rax, tab_uni_ksc56018 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_3B6C5 loc_3B664: cmp [rbp+var_8], 0F900h jl short loc_3B691 cmp [rbp+var_8], 0FA0Bh jg short loc_3B691 mov eax, [rbp+var_8] sub eax, 0F900h movsxd rcx, eax lea rax, tab_uni_ksc56019 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_3B6C5 loc_3B691: cmp [rbp+var_8], 0FF01h jl short loc_3B6BE cmp [rbp+var_8], 0FFE6h jg short loc_3B6BE mov eax, [rbp+var_8] sub eax, 0FF01h movsxd rcx, eax lea rax, tab_uni_ksc560110 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_3B6C5 loc_3B6BE: mov [rbp+var_4], 0 loc_3B6C5: mov eax, [rbp+var_4] pop rbp retn
long long func_uni_ksc5601_onechar(int a1) { if ( a1 < 161 || a1 > 359 ) { if ( a1 < 711 || a1 > 1105 ) { if ( a1 < 8213 || a1 > 8978 ) { if ( a1 < 9312 || a1 > 9837 ) { if ( a1 < 12288 || a1 > 12927 ) { if ( a1 < 13184 || a1 > 13277 ) { if ( a1 < 19968 || a1 > 38015 ) { if ( a1 < 38263 || a1 > 40860 ) { if ( a1 < 44032 || a1 > 55203 ) { if ( a1 < 63744 || a1 > 64011 ) { if ( a1 < 65281 || a1 > 65510 ) return 0; else return tab_uni_ksc560110[a1 - 65281]; } else { return tab_uni_ksc56019[a1 - 63744]; } } else { return tab_uni_ksc56018[a1 - 44032]; } } else { return tab_uni_ksc56017[a1 - 38263]; } } else { return tab_uni_ksc56016[a1 - 19968]; } } else { return tab_uni_ksc56015[a1 - 13184]; } } else { return tab_uni_ksc56014[a1 - 12288]; } } else { return tab_uni_ksc56013[a1 - 9312]; } } else { return tab_uni_ksc56012[a1 - 8213]; } } else { return tab_uni_ksc56011[a1 - 711]; } } else { return tab_uni_ksc56010[a1 - 161]; } }
func_uni_ksc5601_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0xa1 JL 0x0013b4e7 CMP dword ptr [RBP + -0x8],0x167 JG 0x0013b4e7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xa1 MOVSXD RCX,EAX LEA RAX,[0x1e6fd0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b4e7: CMP dword ptr [RBP + -0x8],0x2c7 JL 0x0013b517 CMP dword ptr [RBP + -0x8],0x451 JG 0x0013b517 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2c7 MOVSXD RCX,EAX LEA RAX,[0x1e7160] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b517: CMP dword ptr [RBP + -0x8],0x2015 JL 0x0013b547 CMP dword ptr [RBP + -0x8],0x2312 JG 0x0013b547 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2015 MOVSXD RCX,EAX LEA RAX,[0x1e7480] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b547: CMP dword ptr [RBP + -0x8],0x2460 JL 0x0013b577 CMP dword ptr [RBP + -0x8],0x266d JG 0x0013b577 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2460 MOVSXD RCX,EAX LEA RAX,[0x1e7a80] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b577: CMP dword ptr [RBP + -0x8],0x3000 JL 0x0013b5a7 CMP dword ptr [RBP + -0x8],0x327f JG 0x0013b5a7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3000 MOVSXD RCX,EAX LEA RAX,[0x1e7ea0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b5a7: CMP dword ptr [RBP + -0x8],0x3380 JL 0x0013b5d7 CMP dword ptr [RBP + -0x8],0x33dd JG 0x0013b5d7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3380 MOVSXD RCX,EAX LEA RAX,[0x1e83a0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b5d7: CMP dword ptr [RBP + -0x8],0x4e00 JL 0x0013b607 CMP dword ptr [RBP + -0x8],0x947f JG 0x0013b607 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x4e00 MOVSXD RCX,EAX LEA RAX,[0x1e8460] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b607: CMP dword ptr [RBP + -0x8],0x9577 JL 0x0013b637 CMP dword ptr [RBP + -0x8],0x9f9c JG 0x0013b637 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x9577 MOVSXD RCX,EAX LEA RAX,[0x1f1160] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b637: CMP dword ptr [RBP + -0x8],0xac00 JL 0x0013b664 CMP dword ptr [RBP + -0x8],0xd7a3 JG 0x0013b664 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xac00 MOVSXD RCX,EAX LEA RAX,[0x1f25b0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b664: CMP dword ptr [RBP + -0x8],0xf900 JL 0x0013b691 CMP dword ptr [RBP + -0x8],0xfa0b JG 0x0013b691 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xf900 MOVSXD RCX,EAX LEA RAX,[0x1f7d00] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b691: CMP dword ptr [RBP + -0x8],0xff01 JL 0x0013b6be CMP dword ptr [RBP + -0x8],0xffe6 JG 0x0013b6be MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xff01 MOVSXD RCX,EAX LEA RAX,[0x1f7f20] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b6c5 LAB_0013b6be: MOV dword ptr [RBP + -0x4],0x0 LAB_0013b6c5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_uni_ksc5601_onechar(int param_1) { int2 uVar1; if ((param_1 < 0xa1) || (0x167 < param_1)) { if ((param_1 < 0x2c7) || (0x451 < param_1)) { if ((param_1 < 0x2015) || (0x2312 < param_1)) { if ((param_1 < 0x2460) || (0x266d < param_1)) { if ((param_1 < 0x3000) || (0x327f < param_1)) { if ((param_1 < 0x3380) || (0x33dd < param_1)) { if ((param_1 < 0x4e00) || (0x947f < param_1)) { if ((param_1 < 0x9577) || (0x9f9c < param_1)) { if ((param_1 < 0xac00) || (0xd7a3 < param_1)) { if ((param_1 < 0xf900) || (0xfa0b < param_1)) { if ((param_1 < 0xff01) || (0xffe6 < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_uni_ksc560110 + (long)(param_1 + -0xff01) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56019 + (long)(param_1 + -0xf900) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56018 + (long)(param_1 + -0xac00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56017 + (long)(param_1 + -0x9577) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56016 + (long)(param_1 + -0x4e00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56015 + (long)(param_1 + -0x3380) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56014 + (long)(param_1 + -0x3000) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56013 + (long)(param_1 + -0x2460) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56012 + (long)(param_1 + -0x2015) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56011 + (long)(param_1 + -0x2c7) * 2); } } else { uVar1 = *(int2 *)(tab_uni_ksc56010 + (long)(param_1 + -0xa1) * 2); } return uVar1; }
11,030
find_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool find_head(MARIA_HA *info, uint length, uint position) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; MARIA_BITMAP_BLOCK *block; /* There is always place for the head block in bitmap_blocks as these are preallocated at _ma_init_block_record(). */ block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *); if (info->s->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER) { if (bitmap->page != info->s->last_insert_bitmap && _ma_change_bitmap_page(info, bitmap, info->s->last_insert_bitmap)) return 1; /* Don't allocate any blocks from earlier pages */ info->s->state.first_bitmap_with_space= info->s->last_insert_bitmap; } /* We need to have DIRENTRY_SIZE here to take into account that we may need an extra directory entry for the row */ while (allocate_head(bitmap, length + DIR_ENTRY_SIZE, block)) if (move_to_next_bitmap(info, bitmap)) return 1; return 0; }
O0
c
find_head: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax movl -0x18(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x428(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x42bce movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx cmpq 0xc30(%rcx), %rax je 0x42bb2 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xc30(%rax), %rdx callq 0x43160 movsbl %al, %eax cmpl $0x0, %eax je 0x42bb2 movb $0x1, -0x1(%rbp) jmp 0x42c04 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xc30(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0xd0(%rax) jmp 0x42bd0 movq -0x20(%rbp), %rdi movl -0x14(%rbp), %esi addl $0x4, %esi movq -0x28(%rbp), %rdx callq 0x446c0 cmpb $0x0, %al je 0x42c00 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x44a00 cmpb $0x0, %al je 0x42bfe movb $0x1, -0x1(%rbp) jmp 0x42c04 jmp 0x42bd0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
find_head: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+2C0h] mov ecx, [rbp+var_18] imul rcx, 18h add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+428h] and eax, 2 cmp eax, 0 jz short loc_42BCE mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rcx, [rcx] cmp rax, [rcx+0C30h] jz short loc_42BB2 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rax+0C30h] call _ma_change_bitmap_page movsx eax, al cmp eax, 0 jz short loc_42BB2 mov [rbp+var_1], 1 jmp short loc_42C04 loc_42BB2: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rax+0C30h] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+0D0h], rcx loc_42BCE: jmp short $+2 loc_42BD0: mov rdi, [rbp+var_20] mov esi, [rbp+var_14] add esi, 4 mov rdx, [rbp+var_28] call allocate_head cmp al, 0 jz short loc_42C00 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call move_to_next_bitmap cmp al, 0 jz short loc_42BFE mov [rbp+var_1], 1 jmp short loc_42C04 loc_42BFE: jmp short loc_42BD0 loc_42C00: mov [rbp+var_1], 0 loc_42C04: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char find_head(_QWORD *a1, int a2, unsigned int a3) { long long v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v5 = *a1 + 2576LL; v4 = 24LL * a3 + a1[88]; if ( (*(_DWORD *)(*a1 + 1064LL) & 2) != 0 ) { if ( *(_QWORD *)(*a1 + 2592LL) == *(_QWORD *)(*a1 + 3120LL) || !(unsigned __int8)ma_change_bitmap_page(a1, v5, *(_QWORD *)(*a1 + 3120LL)) ) { *(_QWORD *)(*a1 + 208LL) = *(_QWORD *)(*a1 + 3120LL); goto LABEL_6; } return 1; } else { LABEL_6: while ( (unsigned __int8)allocate_head(v5, (unsigned int)(a2 + 4), v4) ) { if ( (unsigned __int8)move_to_next_bitmap(a1, v5) ) return 1; } return 0; } }
find_head: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] MOV ECX,dword ptr [RBP + -0x18] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x428] AND EAX,0x2 CMP EAX,0x0 JZ 0x00142bce MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0xc30] JZ 0x00142bb2 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0xc30] CALL 0x00143160 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00142bb2 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00142c04 LAB_00142bb2: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc30] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xd0],RCX LAB_00142bce: JMP 0x00142bd0 LAB_00142bd0: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x14] ADD ESI,0x4 MOV RDX,qword ptr [RBP + -0x28] CALL 0x001446c0 CMP AL,0x0 JZ 0x00142c00 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00144a00 CMP AL,0x0 JZ 0x00142bfe MOV byte ptr [RBP + -0x1],0x1 JMP 0x00142c04 LAB_00142bfe: JMP 0x00142bd0 LAB_00142c00: MOV byte ptr [RBP + -0x1],0x0 LAB_00142c04: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 find_head(long *param_1,int param_2,uint param_3) { long lVar1; char cVar2; long lVar3; lVar3 = *param_1 + 0xa10; lVar1 = param_1[0x58]; if ((*(uint *)(*param_1 + 0x428) & 2) != 0) { if ((*(long *)(*param_1 + 0xa20) != *(long *)(*param_1 + 0xc30)) && (cVar2 = _ma_change_bitmap_page(param_1,lVar3,*(int8 *)(*param_1 + 0xc30)), cVar2 != '\0')) { return 1; } *(int8 *)(*param_1 + 0xd0) = *(int8 *)(*param_1 + 0xc30); } do { cVar2 = allocate_head(lVar3,param_2 + 4,lVar1 + (ulong)param_3 * 0x18); if (cVar2 == '\0') { return 0; } cVar2 = move_to_next_bitmap(param_1,lVar3); } while (cVar2 == '\0'); return 1; }
11,031
minja::DictExpr::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::object(); for (const auto& [key, value] : elements) { if (!key) throw std::runtime_error("Dict key is null"); if (!value) throw std::runtime_error("Dict value is null"); result.set(key->evaluate(context), value->evaluate(context)); } return result; }
O1
cpp
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 xorl %ebx, %ebx leaq 0xa8(%rsp), %r12 movq %rbx, (%r12) movl $0x30, %edi callq 0x196a0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x796f5(%rip), %rcx # 0xed5b8 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq %rbx, 0x20(%rax) movq %rax, 0x8(%r12) movq %rcx, (%r12) movq %r13, (%rsp) movq %r13, %rdi movq %r12, %rsi callq 0x74378 movq 0x8(%r12), %rdi testq %rdi, %rdi je 0x73f00 callq 0x42d00 movq 0x20(%r15), %rbx movq 0x28(%r15), %r15 cmpq %r15, %rbx je 0x74066 leaq 0x58(%rsp), %r13 leaq 0x8(%rsp), %rbp cmpq $0x0, (%rbx) je 0x7407c cmpq $0x0, 0x10(%rbx) je 0x7409a movq (%rbx), %rsi movq %r13, %rdi movq %r14, %rdx callq 0x6c37a movq 0x10(%rbx), %rsi movq %rbp, %rdi movq %r14, %rdx callq 0x6c37a movq (%rsp), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x74190 leaq 0x48(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x28fd0 movq %r12, %rdi callq 0x2e790 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x73f82 callq 0x42d00 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x73f91 callq 0x42d00 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x73fa0 callq 0x42d00 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x73fd6 movq 0x7afdf(%rip), %rax # 0xeef90 cmpb $0x0, (%rax) je 0x73fc1 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x73fcb movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x73fd6 movq (%rdi), %rax callq *0x18(%rax) leaq 0x98(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x28fd0 movq %r12, %rdi callq 0x2e790 movq 0x90(%rsp), %rdi testq %rdi, %rdi je 0x74002 callq 0x42d00 movq 0x80(%rsp), %rdi testq %rdi, %rdi je 0x74014 callq 0x42d00 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x74023 callq 0x42d00 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x74059 movq 0x7af5c(%rip), %rax # 0xeef90 cmpb $0x0, (%rax) je 0x74044 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7404e movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x74059 movq (%rdi), %rax callq *0x18(%rax) addq $0x20, %rbx cmpq %r15, %rbx jne 0x73f1b movq (%rsp), %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %r15 leaq 0x4a429(%rip), %rsi # 0xbe4b9 movq %rax, %rdi callq 0x19270 jmp 0x740b6 movl $0x10, %edi callq 0x19370 movq %rax, %r15 leaq 0x4a41c(%rip), %rsi # 0xbe4ca movq %rax, %rdi callq 0x19270 movq 0x7af2b(%rip), %rsi # 0xeefe8 movq 0x7aea4(%rip), %rdx # 0xeef68 movq %r15, %rdi callq 0x19b70 jmp 0x740ce movq %rax, %r14 movq %r15, %rdi callq 0x19510 jmp 0x740fe jmp 0x740fb movq %rax, %r14 jmp 0x740ef movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x6c670 leaq 0x58(%rsp), %rdi callq 0x6c670 jmp 0x740fe movq %rax, %r14 movq (%rsp), %rdi callq 0x6c670 movq %r14, %rdi callq 0x19be0 nop
_ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rdx mov r15, rsi mov r13, rdi xor ebx, ebx lea r12, [rsp+0E8h+var_40] mov [r12], rbx mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov [rax+20h], rbx mov [r12+8], rax mov [r12], rcx mov [rsp+0E8h+var_E8], r13 mov rdi, r13 mov rsi, r12 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) mov rdi, [r12+8] test rdi, rdi jz short loc_73F00 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73F00: mov rbx, [r15+20h] mov r15, [r15+28h] cmp rbx, r15 jz loc_74066 lea r13, [rsp+0E8h+var_90] lea rbp, [rsp+0E8h+var_E0] loc_73F1B: cmp qword ptr [rbx], 0 jz loc_7407C cmp qword ptr [rbx+10h], 0 jz loc_7409A mov rsi, [rbx] mov rdi, r13 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rsi, [rbx+10h] mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, [rsp+0E8h+var_E8]; this mov rsi, r13; minja::Value * mov rdx, rbp; minja::Value * call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&) lea r12, [rsp+0E8h+var_A0] mov rdi, r12 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, r12 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+0E8h+var_A8] test rdi, rdi jz short loc_73F82 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73F82: mov rdi, [rsp+0E8h+var_B8] test rdi, rdi jz short loc_73F91 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73F91: mov rdi, [rsp+0E8h+var_C8] test rdi, rdi jz short loc_73FA0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_73FA0: mov rdi, [rsp+0E8h+var_D8] test rdi, rdi jz short loc_73FD6 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_73FC1 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_73FCB loc_73FC1: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_73FCB: cmp eax, 1 jnz short loc_73FD6 mov rax, [rdi] call qword ptr [rax+18h] loc_73FD6: lea r12, [rsp+0E8h+var_50] mov rdi, r12 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, r12 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+0E8h+var_58] test rdi, rdi jz short loc_74002 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_74002: mov rdi, [rsp+0E8h+var_68] test rdi, rdi jz short loc_74014 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_74014: mov rdi, [rsp+0E8h+var_78] test rdi, rdi jz short loc_74023 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_74023: mov rdi, [rsp+0E8h+var_88] test rdi, rdi jz short loc_74059 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_74044 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7404E loc_74044: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7404E: cmp eax, 1 jnz short loc_74059 mov rax, [rdi] call qword ptr [rax+18h] loc_74059: add rbx, 20h ; ' ' cmp rbx, r15 jnz loc_73F1B loc_74066: mov rax, [rsp+0E8h+var_E8] add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7407C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictKeyIsNull; "Dict key is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_740B6 loc_7409A: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictValueIsNul; "Dict value is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_740B6: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short $+2 loc_740CE: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_740FE jmp short loc_740FB mov r14, rax jmp short loc_740EF mov r14, rax lea rdi, [rsp+0E8h+var_E0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_740EF: lea rdi, [rsp+0E8h+var_90]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_740FE loc_740FB: mov r14, rax loc_740FE: mov rdi, [rsp+0E8h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, r14 call __Unwind_Resume
minja::Value * minja::DictExpr::do_evaluate(minja::Value *a1, long long a2) { long long v2; // rax void (****v3)(void); // rbx void (****v4)(void); // r15 long long v5; // rdi signed __int32 v6; // eax long long v7; // rdi signed __int32 v8; // eax std::runtime_error *exception; // r15 _BYTE v12[8]; // [rsp+8h] [rbp-E0h] BYREF long long v13; // [rsp+10h] [rbp-D8h] volatile signed __int32 *v14; // [rsp+20h] [rbp-C8h] volatile signed __int32 *v15; // [rsp+30h] [rbp-B8h] volatile signed __int32 *v16; // [rsp+40h] [rbp-A8h] char v17[16]; // [rsp+48h] [rbp-A0h] BYREF _BYTE v18[8]; // [rsp+58h] [rbp-90h] BYREF long long v19; // [rsp+60h] [rbp-88h] volatile signed __int32 *v20; // [rsp+70h] [rbp-78h] volatile signed __int32 *v21; // [rsp+80h] [rbp-68h] volatile signed __int32 *v22; // [rsp+90h] [rbp-58h] char v23[16]; // [rsp+98h] [rbp-50h] BYREF long long v24; // [rsp+A8h] [rbp-40h] BYREF volatile signed __int32 *v25; // [rsp+B0h] [rbp-38h] v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; v25 = (volatile signed __int32 *)v2; v24 = v2 + 16; minja::Value::Value(a1, &v24); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); v3 = *(void (*****)(void))(a2 + 32); v4 = *(void (*****)(void))(a2 + 40); if ( v3 != v4 ) { while ( *v3 ) { if ( !v3[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict value is null"); LABEL_34: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v18, *v3); minja::Expression::evaluate((long long)v12, v3[2]); minja::Value::set(a1, (const minja::Value *)v18, (const minja::Value *)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>::assert_invariant(v17); 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(v17); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); v5 = v13; if ( v13 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v13 + 12); *(_DWORD *)(v13 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v23); 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(v23); if ( v22 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); v7 = v19; if ( v19 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v19 + 12); *(_DWORD *)(v19 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v19 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } v3 += 4; if ( v3 == v4 ) return a1; } exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict key is null"); goto LABEL_34; } return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RDX MOV R15,RSI MOV R13,RDI XOR EBX,EBX LEA R12,[RSP + 0xa8] MOV qword ptr [R12],RBX MOV EDI,0x30 CALL 0x001196a0 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1ed5b8] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],RBX MOV qword ptr [R12 + 0x8],RAX MOV qword ptr [R12],RCX MOV qword ptr [RSP],R13 MOV RDI,R13 MOV RSI,R12 CALL 0x00174378 MOV RDI,qword ptr [R12 + 0x8] TEST RDI,RDI JZ 0x00173f00 CALL 0x00142d00 LAB_00173f00: MOV RBX,qword ptr [R15 + 0x20] MOV R15,qword ptr [R15 + 0x28] CMP RBX,R15 JZ 0x00174066 LEA R13,[RSP + 0x58] LEA RBP,[RSP + 0x8] LAB_00173f1b: CMP qword ptr [RBX],0x0 JZ 0x0017407c CMP qword ptr [RBX + 0x10],0x0 JZ 0x0017409a MOV RSI,qword ptr [RBX] LAB_00173f33: MOV RDI,R13 MOV RDX,R14 CALL 0x0016c37a MOV RSI,qword ptr [RBX + 0x10] LAB_00173f42: MOV RDI,RBP MOV RDX,R14 CALL 0x0016c37a LAB_00173f4d: MOV RDI,qword ptr [RSP] MOV RSI,R13 MOV RDX,RBP CALL 0x00174190 LAB_00173f5c: LEA R12,[RSP + 0x48] MOV RDI,R12 XOR ESI,ESI CALL 0x00128fd0 MOV RDI,R12 CALL 0x0012e790 MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00173f82 CALL 0x00142d00 LAB_00173f82: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00173f91 CALL 0x00142d00 LAB_00173f91: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x00173fa0 CALL 0x00142d00 LAB_00173fa0: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00173fd6 MOV RAX,qword ptr [0x001eef90] CMP byte ptr [RAX],0x0 JZ 0x00173fc1 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00173fcb LAB_00173fc1: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00173fcb: CMP EAX,0x1 JNZ 0x00173fd6 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00173fd6: LEA R12,[RSP + 0x98] MOV RDI,R12 XOR ESI,ESI CALL 0x00128fd0 MOV RDI,R12 CALL 0x0012e790 MOV RDI,qword ptr [RSP + 0x90] TEST RDI,RDI JZ 0x00174002 CALL 0x00142d00 LAB_00174002: MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI JZ 0x00174014 CALL 0x00142d00 LAB_00174014: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x00174023 CALL 0x00142d00 LAB_00174023: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x00174059 MOV RAX,qword ptr [0x001eef90] CMP byte ptr [RAX],0x0 JZ 0x00174044 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017404e LAB_00174044: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017404e: CMP EAX,0x1 JNZ 0x00174059 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00174059: ADD RBX,0x20 CMP RBX,R15 JNZ 0x00173f1b LAB_00174066: MOV RAX,qword ptr [RSP] ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017407c: MOV EDI,0x10 CALL 0x00119370 MOV R15,RAX LAB_00174089: LEA RSI,[0x1be4b9] MOV RDI,RAX CALL 0x00119270 LAB_00174098: JMP 0x001740b6 LAB_0017409a: MOV EDI,0x10 CALL 0x00119370 MOV R15,RAX LAB_001740a7: LEA RSI,[0x1be4ca] MOV RDI,RAX CALL 0x00119270 LAB_001740b6: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,R15 CALL 0x00119b70
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1) { int *piVar1; long *plVar2; int iVar3; runtime_error *this_00; long *plVar4; Expression local_e0 [8]; long *local_d8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8; data local_a0 [16]; Expression local_90 [8]; long *local_88; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; data local_50 [16]; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x30); *(int8 *)(local_38 + 8) = 0x100000001; *(int ***)local_38 = &PTR___Sp_counted_ptr_inplace_001ed5c8; local_40 = local_38 + 0x10; *(int8 *)(local_38 + 0x10) = 0; *(int8 *)(local_38 + 0x18) = 0; *(int8 *)(local_38 + 0x20) = 0; Value::Value((Value *)this,(shared_ptr *)&local_40); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } 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 00174089 to 00174097 has its CatchHandler @ 001740ce */ std::runtime_error::runtime_error(this_00,"Dict key is null"); LAB_001740b6: /* try { // try from 001740b6 to 001740cb has its CatchHandler @ 001740fb */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); } if (plVar4[2] == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001740a7 to 001740b5 has its CatchHandler @ 001740cc */ std::runtime_error::runtime_error(this_00,"Dict value is null"); goto LAB_001740b6; } /* try { // try from 00173f33 to 00173f3d has its CatchHandler @ 001740db */ Expression::evaluate(local_90,(shared_ptr *)*plVar4); /* try { // try from 00173f42 to 00173f4c has its CatchHandler @ 001740dd */ Expression::evaluate(local_e0,(shared_ptr *)plVar4[2]); /* try { // try from 00173f4d to 00173f5b has its CatchHandler @ 001740e2 */ Value::set((Value *)this,(Value *)local_90,(Value *)local_e0); 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_a0,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_a0); if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8); } if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8); } if (local_c8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c8); } if (local_d8 != (long *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); piVar1 = (int *)((long)local_d8 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_d8 + 0xc); *(int *)((long)local_d8 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_d8 + 0x18))(); } } 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_50,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_50); 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 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_78); } if (local_88 != (long *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); piVar1 = (int *)((long)local_88 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_88 + 0xc); *(int *)((long)local_88 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_88 + 0x18))(); } } plVar4 = plVar4 + 4; } while (plVar4 != plVar2); } return this; }
11,032
pfs_malloc_array(PFS_builtin_memory_class*, unsigned long, unsigned long, unsigned long)
eloqsql/storage/perfschema/pfs_global.cc
void *pfs_malloc_array(PFS_builtin_memory_class *klass, size_t n, size_t size, myf flags) { assert(klass != NULL); assert(n > 0); assert(size > 0); void *ptr= NULL; size_t array_size= n * size; /* Check for overflow before allocating. */ if (is_overflow(array_size, n, size)) { sql_print_warning("Failed to allocate memory for %zu chunks each of size " "%zu for buffer '%s' due to overflow", n, size, klass->m_class.m_name); return NULL; } if(NULL == (ptr= pfs_malloc(klass, array_size, flags))) { sql_print_warning("Failed to allocate %zu bytes for buffer '%s' due to " "out-of-memory", array_size, klass->m_class.m_name); } return ptr; }
O0
cpp
pfs_malloc_array(PFS_builtin_memory_class*, unsigned long, unsigned long, unsigned long): 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 $0x0, -0x30(%rbp) movq -0x18(%rbp), %rax imulq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x39340 testb $0x1, %al jne 0x392b4 jmp 0x392e8 movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x10(%rbp), %r9 addq $0x14, %r9 leaq 0x7871c(%rip), %rdi # 0xb19e7 movl $0x6c, %esi leaq 0x7875a(%rip), %rdx # 0xb1a31 movb $0x0, %al callq 0x6b040 movq $0x0, -0x8(%rbp) jmp 0x39335 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x39190 movq %rax, %rcx movq %rcx, -0x30(%rbp) xorl %eax, %eax cmpq %rcx, %rax jne 0x3932d movq -0x38(%rbp), %rcx movq -0x10(%rbp), %r8 addq $0x14, %r8 leaq 0x786cd(%rip), %rdi # 0xb19e7 movl $0x73, %esi leaq 0x78765(%rip), %rdx # 0xb1a8b movb $0x0, %al callq 0x6b040 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
_Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm: 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 [rbp+var_30], 0 mov rax, [rbp+var_18] imul rax, [rbp+var_20] mov [rbp+var_38], rax mov rdi, [rbp+var_38]; unsigned __int64 mov rsi, [rbp+var_18]; unsigned __int64 mov rdx, [rbp+var_20]; unsigned __int64 call _Z11is_overflowmmm; is_overflow(ulong,ulong,ulong) test al, 1 jnz short loc_392B4 jmp short loc_392E8 loc_392B4: mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9, [rbp+var_10] add r9, 14h lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 6Ch ; 'l'; int lea rdx, aFailedToAlloca; "Failed to allocate memory for %zu chunk"... mov al, 0 call _Z18glog_print_warningPKciS0_z; glog_print_warning(char const*,int,char const*,...) mov [rbp+var_8], 0 jmp short loc_39335 loc_392E8: mov rdi, [rbp+var_10]; PFS_builtin_memory_class * mov rsi, [rbp+var_38]; unsigned __int64 mov rdx, [rbp+var_28]; unsigned __int64 call _Z10pfs_mallocP24PFS_builtin_memory_classmm; pfs_malloc(PFS_builtin_memory_class *,ulong,ulong) mov rcx, rax mov [rbp+var_30], rcx xor eax, eax cmp rax, rcx jnz short loc_3932D mov rcx, [rbp+var_38] mov r8, [rbp+var_10] add r8, 14h lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 73h ; 's'; int lea rdx, aFailedToAlloca_0; "Failed to allocate %zu bytes for buffer"... mov al, 0 call _Z18glog_print_warningPKciS0_z; glog_print_warning(char const*,int,char const*,...) loc_3932D: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_39335: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long pfs_malloc_array(PFS_builtin_memory_class *a1, unsigned long long a2, unsigned long long a3, char a4) { unsigned long long v5; // [rsp+8h] [rbp-38h] long long v6; // [rsp+10h] [rbp-30h] v5 = a3 * a2; if ( (is_overflow(a3 * a2, a2, a3) & 1) != 0 ) { glog_print_warning( "/workspace/llm4binary/github2025/eloqsql/storage/perfschema/pfs_global.cc", 108, "Failed to allocate memory for %zu chunks each of size %zu for buffer '%s' due to overflow", a2, a3, (const char *)a1 + 20); return 0LL; } else { v6 = pfs_malloc(a1, v5, a4); if ( !v6 ) glog_print_warning( "/workspace/llm4binary/github2025/eloqsql/storage/perfschema/pfs_global.cc", 115, "Failed to allocate %zu bytes for buffer '%s' due to out-of-memory", v5, (const char *)a1 + 20); return v6; } }
pfs_malloc_array: 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 qword ptr [RBP + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00139340 TEST AL,0x1 JNZ 0x001392b4 JMP 0x001392e8 LAB_001392b4: MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x10] ADD R9,0x14 LEA RDI,[0x1b19e7] MOV ESI,0x6c LEA RDX,[0x1b1a31] MOV AL,0x0 CALL 0x0016b040 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00139335 LAB_001392e8: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00139190 MOV RCX,RAX MOV qword ptr [RBP + -0x30],RCX XOR EAX,EAX CMP RAX,RCX JNZ 0x0013932d MOV RCX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x10] ADD R8,0x14 LEA RDI,[0x1b19e7] MOV ESI,0x73 LEA RDX,[0x1b1a8b] MOV AL,0x0 CALL 0x0016b040 LAB_0013932d: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00139335: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* pfs_malloc_array(PFS_builtin_memory_class*, unsigned long, unsigned long, unsigned long) */ long pfs_malloc_array(PFS_builtin_memory_class *param_1,ulong param_2,ulong param_3,ulong param_4) { ulong uVar1; ulong uVar2; long local_10; uVar1 = param_2 * param_3; uVar2 = is_overflow(uVar1,param_2,param_3); if ((uVar2 & 1) == 0) { local_10 = pfs_malloc(param_1,uVar1,param_4); if (local_10 == 0) { glog_print_warning("/workspace/llm4binary/github2025/eloqsql/storage/perfschema/pfs_global.cc" ,0x73,"Failed to allocate %zu bytes for buffer \'%s\' due to out-of-memory" ,uVar1,param_1 + 0x14); } } else { glog_print_warning("/workspace/llm4binary/github2025/eloqsql/storage/perfschema/pfs_global.cc", 0x6c, "Failed to allocate memory for %zu chunks each of size %zu for buffer \'%s\' due to overflow" ,param_2,param_3,param_1 + 0x14); local_10 = 0; } return local_10; }
11,033
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_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 (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r13 movq %rsi, %rbx movl 0x10(%rbp), %r12d leaq -0x2c(%rbp), %rax movl %ecx, (%rax) leaq (%rsi,%rdx), %r14 addq %r8, %r9 movq %r14, %rdx movq %rax, %rcx callq 0x7025b leaq (%rbx,%rax), %r15 testb $0x40, %r12b je 0x70468 subq %rax, %r13 jle 0x70468 movl -0x2c(%rbp), %eax testl %eax, %eax je 0x70468 leal (%rax,%rax,2), %r12d cmpq %r12, %r13 cmovbq %r13, %r12 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x261c0 addq %r12, %r15 movl 0x10(%rbp), %r12d movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx xorl %ecx, %ecx callq 0x5b202 testb %r12b, %r12b jns 0x70495 cmpq %r14, %r15 jae 0x70495 movq %r14, %rdx subq %r15, %rdx movq %r15, %rdi xorl %esi, %esi callq 0x261c0 movq %r14, %r15 subq %rbx, %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, rdx mov rbx, rsi mov r12d, [rbp+arg_0] lea rax, [rbp+var_2C] mov [rax], ecx lea r14, [rsi+rdx] add r9, r8 mov rdx, r14 mov rcx, rax call my_strnxfrm_unicode_full_bin_internal lea r15, [rbx+rax] test r12b, 40h jz short loc_70468 sub r13, rax jle short loc_70468 mov eax, [rbp+var_2C] test eax, eax jz short loc_70468 lea r12d, [rax+rax*2] cmp r13, r12 cmovb r12, r13 mov rdi, r15 xor esi, esi mov rdx, r12 call _memset add r15, r12 mov r12d, [rbp+arg_0] loc_70468: mov rdi, rbx mov rsi, r15 mov edx, r12d xor ecx, ecx call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_70495 cmp r15, r14 jnb short loc_70495 mov rdx, r14 sub rdx, r15 mov rdi, r15 xor esi, esi call _memset mov r15, r14 loc_70495: sub r15, rbx mov rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { unsigned int v8; // r12d _BYTE *v9; // r14 long long v10; // rax _BYTE *v11; // r15 bool v12; // cc unsigned long long v13; // r13 unsigned long long v14; // r12 int v16[11]; // [rsp+0h] [rbp-2Ch] BYREF v8 = a7; v16[0] = a4; v9 = &a2[a3]; v10 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v16, a5, a5 + a6); v11 = &a2[v10]; if ( (a7 & 0x40) != 0 ) { v12 = a3 <= v10; v13 = a3 - v10; if ( !v12 ) { if ( v16[0] ) { v14 = (unsigned int)(3 * v16[0]); if ( v13 < v14 ) v14 = v13; memset(v11, 0LL, v14); v11 += v14; v8 = a7; } } } my_strxfrm_desc_and_reverse(a2, v11, v8, 0); if ( (v8 & 0x80u) != 0 && v11 < v9 ) { memset(v11, 0LL, v9 - v11); v11 = v9; } return v11 - a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,RDX MOV RBX,RSI MOV R12D,dword ptr [RBP + 0x10] LEA RAX,[RBP + -0x2c] MOV dword ptr [RAX],ECX LEA R14,[RSI + RDX*0x1] ADD R9,R8 MOV RDX,R14 MOV RCX,RAX CALL 0x0017025b LEA R15,[RBX + RAX*0x1] TEST R12B,0x40 JZ 0x00170468 SUB R13,RAX JLE 0x00170468 MOV EAX,dword ptr [RBP + -0x2c] TEST EAX,EAX JZ 0x00170468 LEA R12D,[RAX + RAX*0x2] CMP R13,R12 CMOVC R12,R13 MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 CALL 0x001261c0 ADD R15,R12 MOV R12D,dword ptr [RBP + 0x10] LAB_00170468: MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D XOR ECX,ECX CALL 0x0015b202 TEST R12B,R12B JNS 0x00170495 CMP R15,R14 JNC 0x00170495 MOV RDX,R14 SUB RDX,R15 MOV RDI,R15 XOR ESI,ESI CALL 0x001261c0 MOV R15,R14 LAB_00170495: SUB R15,RBX MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; ulong __n; ulong uVar3; void *__s; int local_34; pvVar1 = (void *)(param_2 + param_3); local_34 = param_4; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_34,param_5,param_6 + param_5); __s = (void *)(param_2 + lVar2); if ((((param_7 & 0x40) != 0) && (uVar3 = param_3 - lVar2, uVar3 != 0 && lVar2 <= param_3)) && (local_34 != 0)) { __n = (ulong)(uint)(local_34 * 3); if (uVar3 < (uint)(local_34 * 3)) { __n = uVar3; } memset(__s,0,__n); __s = (void *)((long)__s + __n); } my_strxfrm_desc_and_reverse(param_2,__s,param_7,0); if (((char)param_7 < '\0') && (__s < pvVar1)) { memset(__s,0,(long)pvVar1 - (long)__s); __s = pvVar1; } return (long)__s - param_2; }
11,034
my_wc_mb_eucjpms
eloqsql/strings/ctype-eucjpms.c
static int my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; if ((int) wc < 0x80) /* ASCII [00-7F] */ { if (s >= e) return MY_CS_TOOSMALL; *s= (uchar) wc; return 1; } if (wc > 0xFFFF) return MY_CS_ILUNI; if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */ { if (s + 3 > e) return MY_CS_TOOSMALL3; s[0]= 0x8F; MY_PUT_MB2(s + 1, jp); return 3; } if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */ { if (s + 2 > e) return MY_CS_TOOSMALL2; s[0]= 0x8E; s[1]= (uchar) (wc - 0xFEC0); return 2; } return MY_CS_ILUNI; }
O0
c
my_wc_mb_eucjpms: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x4117d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x41165 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x412a5 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x412a5 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jbe 0x41193 movl $0x0, -0x4(%rbp) jmp 0x412a5 movq -0x18(%rbp), %rcx leaq 0x1ed3c2(%rip), %rax # 0x22e560 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x411ef movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x411c4 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x412a5 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) jmp 0x412a5 movq -0x18(%rbp), %rcx leaq 0x20d366(%rip), %rax # 0x24e560 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x41250 movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x41220 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x412a5 movq -0x20(%rbp), %rax movb $-0x71, (%rax) movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) movl $0x3, -0x4(%rbp) jmp 0x412a5 cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61 jb 0x4129e cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F ja 0x4129e movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x4127b movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x412a5 movq -0x20(%rbp), %rax movb $-0x72, (%rax) movq -0x18(%rbp), %rax subq $0xfec0, %rax # imm = 0xFEC0 movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) jmp 0x412a5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_wc_mb_eucjpms: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_4117D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_41165 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_412A5 loc_41165: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_412A5 loc_4117D: cmp [rbp+var_18], 0FFFFh jbe short loc_41193 mov [rbp+var_4], 0 jmp loc_412A5 loc_41193: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0208_eucjpms movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_411EF mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_411C4 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_412A5 loc_411C4: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 jmp loc_412A5 loc_411EF: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0212_eucjpms movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_41250 mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_41220 mov [rbp+var_4], 0FFFFFF99h jmp loc_412A5 loc_41220: mov rax, [rbp+var_20] mov byte ptr [rax], 8Fh mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl mov [rbp+var_4], 3 jmp short loc_412A5 loc_41250: cmp [rbp+var_18], 0FF61h jb short loc_4129E cmp [rbp+var_18], 0FF9Fh ja short loc_4129E mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_4127B mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_412A5 loc_4127B: mov rax, [rbp+var_20] mov byte ptr [rax], 8Eh mov rax, [rbp+var_18] sub rax, 0FEC0h mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 jmp short loc_412A5 loc_4129E: mov [rbp+var_4], 0 loc_412A5: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { __int16 v5; // [rsp+0h] [rbp-2Ch] __int16 v6; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjpms[a2]; if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else { v6 = unicode_to_jisx0212_eucjpms[a2]; if ( v6 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { *a3 = -113; a3[1] = HIBYTE(v6); a3[2] = v6; return 3; } else { return (unsigned int)-103; } } else if ( a2 < 0xFF61 || a2 > 0xFF9F ) { return 0; } else if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = -114; a3[1] = a2 + 64; return 2; } else { return (unsigned int)-102; } } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_eucjpms: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x0014117d MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00141165 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001412a5 LAB_00141165: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x001412a5 LAB_0014117d: CMP qword ptr [RBP + -0x18],0xffff JBE 0x00141193 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001412a5 LAB_00141193: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x32e560] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x001411ef MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001411c4 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001412a5 LAB_001411c4: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x001412a5 LAB_001411ef: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x34e560] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x00141250 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00141220 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x001412a5 LAB_00141220: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x8f MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL MOV dword ptr [RBP + -0x4],0x3 JMP 0x001412a5 LAB_00141250: CMP qword ptr [RBP + -0x18],0xff61 JC 0x0014129e CMP qword ptr [RBP + -0x18],0xff9f JA 0x0014129e MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0014127b MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001412a5 LAB_0014127b: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x8e MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0xfec0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x001412a5 LAB_0014129e: MOV dword ptr [RBP + -0x4],0x0 LAB_001412a5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_eucjpms(int8 param_1,ulong param_2,char *param_3,char *param_4) { short sVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_2 < 0x10000) { sVar1 = *(short *)(unicode_to_jisx0208_eucjpms + param_2 * 2); if (sVar1 == 0) { sVar1 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2); if (sVar1 == 0) { if ((param_2 < 0xff61) || (0xff9f < param_2)) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = -0x72; param_3[1] = (char)param_2 + '@'; local_c = 2; } } else if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { *param_3 = -0x71; param_3[1] = (char)((ushort)sVar1 >> 8); param_3[2] = (char)sVar1; local_c = 3; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)((ushort)sVar1 >> 8); param_3[1] = (char)sVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
11,035
my_wc_mb_eucjpms
eloqsql/strings/ctype-eucjpms.c
static int my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; if ((int) wc < 0x80) /* ASCII [00-7F] */ { if (s >= e) return MY_CS_TOOSMALL; *s= (uchar) wc; return 1; } if (wc > 0xFFFF) return MY_CS_ILUNI; if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */ { if (s + 3 > e) return MY_CS_TOOSMALL3; s[0]= 0x8F; MY_PUT_MB2(s + 1, jp); return 3; } if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */ { if (s + 2 > e) return MY_CS_TOOSMALL2; s[0]= 0x8E; s[1]= (uchar) (wc - 0xFEC0); return 2; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_eucjpms: cmpl $0x7f, %esi jg 0x362e1 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x36316 movb %sil, (%rdx) movl $0x1, %eax retq xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x36316 leaq 0xe728d(%rip), %rdi # 0x11d580 movzwl (%rdi,%rsi,2), %edi testw %di, %di je 0x36317 leaq 0x2(%rdx), %rsi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rsi ja 0x36316 rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx leaq 0x10725d(%rip), %rdi # 0x13d580 movzwl (%rdi,%rsi,2), %ebx testw %bx, %bx je 0x3634a leaq 0x3(%rdx), %rsi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rsi ja 0x36375 movb $-0x71, (%rdx) movb %bh, 0x1(%rdx) movb %bl, 0x2(%rdx) movl $0x3, %eax jmp 0x36375 leaq -0xff61(%rsi), %rdi cmpq $0x3e, %rdi ja 0x36375 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x36375 movb $-0x72, (%rdx) addb $0x40, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax popq %rbx popq %rbp retq
my_wc_mb_eucjpms: cmp esi, 7Fh jg short loc_362E1 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_36316 mov [rdx], sil mov eax, 1 retn loc_362E1: xor eax, eax cmp rsi, 0FFFFh ja short locret_36316 lea rdi, unicode_to_jisx0208_eucjpms movzx edi, word ptr [rdi+rsi*2] test di, di jz short loc_36317 lea rsi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rsi, rcx ja short locret_36316 rol di, 8 mov [rdx], di mov eax, 2 locret_36316: retn loc_36317: push rbp mov rbp, rsp push rbx lea rdi, unicode_to_jisx0212_eucjpms movzx ebx, word ptr [rdi+rsi*2] test bx, bx jz short loc_3634A lea rsi, [rdx+3] mov eax, 0FFFFFF99h cmp rsi, rcx ja short loc_36375 mov byte ptr [rdx], 8Fh mov [rdx+1], bh mov [rdx+2], bl mov eax, 3 jmp short loc_36375 loc_3634A: lea rdi, [rsi-0FF61h] cmp rdi, 3Eh ; '>' ja short loc_36375 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_36375 mov byte ptr [rdx], 8Eh add sil, 40h ; '@' mov [rdx+1], sil mov eax, 2 loc_36375: pop rbx pop rbp retn
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4) { long long result; // rax __int16 v5; // di __int16 v6; // bx if ( (int)a2 > 127 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjpms[a2]; if ( v5 ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { v6 = unicode_to_jisx0212_eucjpms[a2]; if ( v6 ) { result = 4294967193LL; if ( a3 + 3 <= a4 ) { *(_BYTE *)a3 = -113; *(_BYTE *)(a3 + 1) = HIBYTE(v6); *(_BYTE *)(a3 + 2) = v6; return 3LL; } } else if ( a2 - 65377 <= 0x3E ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_BYTE *)a3 = -114; *(_BYTE *)(a3 + 1) = a2 + 64; return 2LL; } } } } } else { result = 4294967195LL; if ( a3 < a4 ) { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_eucjpms: CMP ESI,0x7f JG 0x001362e1 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00136316 MOV byte ptr [RDX],SIL MOV EAX,0x1 RET LAB_001362e1: XOR EAX,EAX CMP RSI,0xffff JA 0x00136316 LEA RDI,[0x21d580] MOVZX EDI,word ptr [RDI + RSI*0x2] TEST DI,DI JZ 0x00136317 LEA RSI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RSI,RCX JA 0x00136316 ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 LAB_00136316: RET LAB_00136317: PUSH RBP MOV RBP,RSP PUSH RBX LEA RDI,[0x23d580] MOVZX EBX,word ptr [RDI + RSI*0x2] TEST BX,BX JZ 0x0013634a LEA RSI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RSI,RCX JA 0x00136375 MOV byte ptr [RDX],0x8f MOV byte ptr [RDX + 0x1],BH MOV byte ptr [RDX + 0x2],BL MOV EAX,0x3 JMP 0x00136375 LAB_0013634a: LEA RDI,[RSI + -0xff61] CMP RDI,0x3e JA 0x00136375 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x00136375 MOV byte ptr [RDX],0x8e ADD SIL,0x40 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 LAB_00136375: POP RBX POP RBP RET
int8 my_wc_mb_eucjpms(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; short sVar2; int8 uVar3; if ((int)param_2 < 0x80) { uVar3 = 0xffffff9b; if (param_3 < param_4) { *(char *)param_3 = (char)param_2; return 1; } } else { uVar3 = 0; if (param_2 < 0x10000) { uVar1 = *(ushort *)(unicode_to_jisx0208_eucjpms + param_2 * 2); if (uVar1 == 0) { sVar2 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2); if (sVar2 == 0) { if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) { *(char *)param_3 = -0x72; *(char *)((long)param_3 + 1) = (char)param_2 + '@'; uVar3 = 2; } } else { uVar3 = 0xffffff99; if ((ushort *)((long)param_3 + 3) <= param_4) { *(char *)param_3 = -0x71; *(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8); *(char *)(param_3 + 1) = (char)sVar2; uVar3 = 3; } } return uVar3; } uVar3 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar3 = 2; } } } return uVar3; }
11,036
llm_graph_context::build_copy_mask_state(ggml_cgraph*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int) const
llama.cpp/src/llama-graph.cpp
ggml_tensor * llm_graph_context::build_copy_mask_state( ggml_cgraph * gf, ggml_tensor * s, ggml_tensor * state_copy, ggml_tensor * state_mask, int32_t n_state, int32_t n_seqs) const { const llama_kv_cache_unified * kv_self = static_cast<const llama_kv_cache_unified *>(memory); const auto n_kv = kv_self->n; const auto kv_head = kv_self->head; ggml_tensor * states = ggml_reshape_2d(ctx0, s, n_state, kv_self->size); // copy states // NOTE: assuming the copy destinations are ALL contained between kv_head and kv_head + n_kv // this shrinks the tensors's ne[1] to n_kv states = ggml_get_rows(ctx0, states, state_copy); // clear states of sequences which are starting at the beginning of this batch // FIXME: zero-out NANs? states = ggml_mul(ctx0, states, state_mask); // copy states which won't be changed further (between n_seqs and n_kv) ggml_build_forward_expand(gf, ggml_cpy(ctx0, ggml_view_1d(ctx0, states, n_state*(n_kv - n_seqs), (n_seqs )*n_state*ggml_element_size(states)), ggml_view_1d(ctx0, s, n_state*(n_kv - n_seqs), (kv_head + n_seqs)*n_state*ggml_element_size(s)))); // the part of the states that will be used and modified return ggml_view_2d(ctx0, states, n_state, n_seqs, states->nb[1], 0); }
O3
cpp
llm_graph_context::build_copy_mask_state(ggml_cgraph*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, (%rsp) movq %rcx, %r13 movq %rdx, 0x20(%rsp) movq %rsi, 0x30(%rsp) movq %rdi, %rcx movslq 0x70(%rsp), %rbx movq 0xc0(%rdi), %rdi movq 0xe8(%rcx), %rax movq %rcx, %r14 movq %rcx, 0x10(%rsp) movl 0x6c(%rax), %ecx movl 0x74(%rax), %ebp movslq %r9d, %r15 movl 0x68(%rax), %r12d addl %ebx, %r12d movq %rdx, %rsi movq %r15, %rdx callq 0x7bb10 movq 0xc0(%r14), %rdi movq %rax, %rsi movq %r13, %rdx callq 0x75890 movq 0xc0(%r14), %rdi movq %rax, %rsi movq (%rsp), %rdx callq 0x7a710 movq %rax, %rdi movq 0xc0(%r14), %r13 movq %rbx, 0x28(%rsp) subl %ebx, %ebp imull %r15d, %ebp movl %ebx, %eax imull %r15d, %eax movq %r15, 0x18(%rsp) movslq %eax, %rbx movq %rdi, %r14 movq %rdi, (%rsp) callq 0x78c80 imulq %rax, %rbx movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx movq %rbx, %rcx callq 0x7aa80 movq %rax, 0x8(%rsp) movq 0x10(%rsp), %r14 movq 0xc0(%r14), %rbx imull %r15d, %r12d movq 0x20(%rsp), %r15 movq %r15, %rdi callq 0x78c80 imulq %rax, %r12 movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx movq %r12, %rcx callq 0x7aa80 movq %r13, %rdi movq 0x8(%rsp), %rsi movq %rax, %rdx callq 0x7a430 movq 0x30(%rsp), %rdi movq %rax, %rsi callq 0x75b50 movq 0xc0(%r14), %rdi movq (%rsp), %rsi movq 0x38(%rsi), %r8 movq 0x18(%rsp), %rdx movq 0x28(%rsp), %rcx xorl %r9d, %r9d addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x79e10
_ZNK17llm_graph_context21build_copy_mask_stateEP11ggml_cgraphP11ggml_tensorS3_S3_ii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rsp+68h+var_68], r8 mov r13, rcx mov [rsp+68h+var_48], rdx mov [rsp+68h+var_38], rsi mov rcx, rdi movsxd rbx, [rsp+68h+arg_0] mov rdi, [rdi+0C0h] mov rax, [rcx+0E8h] mov r14, rcx mov [rsp+68h+var_58], rcx mov ecx, [rax+6Ch] mov ebp, [rax+74h] movsxd r15, r9d mov r12d, [rax+68h] add r12d, ebx mov rsi, rdx mov rdx, r15 call _ggml_reshape_2d mov rdi, [r14+0C0h] mov rsi, rax mov rdx, r13 call _ggml_get_rows mov rdi, [r14+0C0h] mov rsi, rax mov rdx, [rsp+68h+var_68] call _ggml_mul mov rdi, rax mov r13, [r14+0C0h] mov [rsp+68h+var_40], rbx sub ebp, ebx imul ebp, r15d mov eax, ebx imul eax, r15d mov [rsp+68h+var_50], r15 movsxd rbx, eax mov r14, rdi mov [rsp+68h+var_68], rdi call _ggml_element_size imul rbx, rax mov rdi, r13 mov rsi, r14 mov rdx, rbp mov rcx, rbx call _ggml_view_1d mov [rsp+68h+var_60], rax mov r14, [rsp+68h+var_58] mov rbx, [r14+0C0h] imul r12d, r15d mov r15, [rsp+68h+var_48] mov rdi, r15 call _ggml_element_size imul r12, rax mov rdi, rbx mov rsi, r15 mov rdx, rbp mov rcx, r12 call _ggml_view_1d mov rdi, r13 mov rsi, [rsp+68h+var_60] mov rdx, rax call _ggml_cpy mov rdi, [rsp+68h+var_38] mov rsi, rax call _ggml_build_forward_expand mov rdi, [r14+0C0h] mov rsi, [rsp+68h+var_68] mov r8, [rsi+38h] mov rdx, [rsp+68h+var_50] mov rcx, [rsp+68h+var_40] xor r9d, r9d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ggml_view_2d
long long llm_graph_context::build_copy_mask_state( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, int a7) { _DWORD *v8; // rax int v9; // ebp long long v10; // r15 int v11; // r12d long long v12; // rax long long rows; // rax long long v14; // rax long long v15; // r13 long long v16; // rbp long long v17; // r14 long long v18; // rax long long v19; // rbx long long v20; // rax long long v21; // rax long long v22; // rax long long v25; // [rsp+0h] [rbp-68h] long long v26; // [rsp+8h] [rbp-60h] v8 = *(_DWORD **)(a1 + 232); v9 = v8[29]; v10 = a6; v11 = a7 + v8[26]; v12 = ggml_reshape_2d(*(_QWORD *)(a1 + 192), a3, a6, (unsigned int)v8[27]); rows = ggml_get_rows(*(_QWORD *)(a1 + 192), v12, a4); v14 = ggml_mul(*(_QWORD *)(a1 + 192), rows, a5); v15 = *(_QWORD *)(a1 + 192); v16 = (unsigned int)(v10 * (v9 - a7)); v17 = v14; v25 = v14; v18 = ggml_element_size(v14); v26 = ggml_view_1d(v15, v17, v16, v18 * (int)v10 * a7); v19 = *(_QWORD *)(a1 + 192); v20 = ggml_element_size(a3); v21 = ggml_view_1d(v19, a3, v16, v20 * (unsigned int)(v10 * v11)); v22 = ggml_cpy(v15, v26, v21); ggml_build_forward_expand(a2, v22); return ggml_view_2d(*(_QWORD *)(a1 + 192), v25, v10, a7, *(_QWORD *)(v25 + 56), 0LL); }
build_copy_mask_state: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RSP],R8 MOV R13,RCX MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x30],RSI MOV RCX,RDI MOVSXD RBX,dword ptr [RSP + 0x70] MOV RDI,qword ptr [RDI + 0xc0] MOV RAX,qword ptr [RCX + 0xe8] MOV R14,RCX MOV qword ptr [RSP + 0x10],RCX MOV ECX,dword ptr [RAX + 0x6c] MOV EBP,dword ptr [RAX + 0x74] MOVSXD R15,R9D MOV R12D,dword ptr [RAX + 0x68] ADD R12D,EBX MOV RSI,RDX MOV RDX,R15 CALL 0x0017bb10 MOV RDI,qword ptr [R14 + 0xc0] MOV RSI,RAX MOV RDX,R13 CALL 0x00175890 MOV RDI,qword ptr [R14 + 0xc0] MOV RSI,RAX MOV RDX,qword ptr [RSP] CALL 0x0017a710 MOV RDI,RAX MOV R13,qword ptr [R14 + 0xc0] MOV qword ptr [RSP + 0x28],RBX SUB EBP,EBX IMUL EBP,R15D MOV EAX,EBX IMUL EAX,R15D MOV qword ptr [RSP + 0x18],R15 MOVSXD RBX,EAX MOV R14,RDI MOV qword ptr [RSP],RDI CALL 0x00178c80 IMUL RBX,RAX MOV RDI,R13 MOV RSI,R14 MOV RDX,RBP MOV RCX,RBX CALL 0x0017aa80 MOV qword ptr [RSP + 0x8],RAX MOV R14,qword ptr [RSP + 0x10] MOV RBX,qword ptr [R14 + 0xc0] IMUL R12D,R15D MOV R15,qword ptr [RSP + 0x20] MOV RDI,R15 CALL 0x00178c80 IMUL R12,RAX MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP MOV RCX,R12 CALL 0x0017aa80 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RAX CALL 0x0017a430 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RAX CALL 0x00175b50 MOV RDI,qword ptr [R14 + 0xc0] MOV RSI,qword ptr [RSP] MOV R8,qword ptr [RSI + 0x38] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x28] XOR R9D,R9D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00179e10
/* llm_graph_context::build_copy_mask_state(ggml_cgraph*, ggml_tensor*, ggml_tensor*, ggml_tensor*, int, int) const */ void __thiscall llm_graph_context::build_copy_mask_state (llm_graph_context *this,ggml_cgraph *param_1,ggml_tensor *param_2,ggml_tensor *param_3, ggml_tensor *param_4,int param_5,int param_6) { int iVar1; int8 uVar2; long lVar3; long lVar4; int8 uVar5; int8 uVar6; int iVar7; lVar3 = *(long *)(this + 0xe8); iVar7 = *(int *)(lVar3 + 0x74); iVar1 = *(int *)(lVar3 + 0x68); uVar2 = ggml_reshape_2d(*(int8 *)(this + 0xc0),param_2,(long)param_5, *(int4 *)(lVar3 + 0x6c)); uVar2 = ggml_get_rows(*(int8 *)(this + 0xc0),uVar2,param_3); lVar3 = ggml_mul(*(int8 *)(this + 0xc0),uVar2,param_4); uVar2 = *(int8 *)(this + 0xc0); iVar7 = (iVar7 - param_6) * param_5; lVar4 = ggml_element_size(); uVar5 = ggml_view_1d(uVar2,lVar3,iVar7,(param_6 * param_5) * lVar4); uVar6 = *(int8 *)(this + 0xc0); lVar4 = ggml_element_size(param_2); uVar6 = ggml_view_1d(uVar6,param_2,iVar7,(ulong)(uint)((iVar1 + param_6) * param_5) * lVar4); uVar2 = ggml_cpy(uVar2,uVar5,uVar6); ggml_build_forward_expand(param_1,uVar2); ggml_view_2d(*(int8 *)(this + 0xc0),lVar3,(long)param_5,(long)param_6, *(int8 *)(lVar3 + 0x38),0); return; }
11,037
mlog_itertor_last
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/common/mlog.c
void* mlog_itertor_last (MLOG_TYPE_T log, uint16_t type) { if (!_memlog_started) return 0 ; CBUFFER_QUEUE_T * queue ; CBUFFER_ITEM_T* it = 0 ; queue = get_cqueue (log) ; if (queue) { os_mutex_lock (&_mlog_mutex) ; it = cqueue_back (queue) ; while (it) { if (! cqueue_validate_item(queue, it)) { it = 0 ; break ; } if (!type || ((((QORAAL_LOG_MSG_T *)it->data)->type) & type)) { break ; } it = cqueue_forwards (queue, it) ; } os_mutex_unlock (&_mlog_mutex) ; } return (void*) it ; }
O3
c
mlog_itertor_last: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpb $0x1, 0x26744(%rip) # 0x412d0 jne 0x1abf2 movl %edi, %eax leaq 0x26749(%rip), %rcx # 0x412e0 movq (%rcx,%rax,8), %r15 testq %r15, %r15 je 0x1abf2 movl %esi, %r14d leaq 0x2404e(%rip), %rdi # 0x3ebf8 callq 0x14ff0 movq %r15, %rdi callq 0x1c846 testq %rax, %rax je 0x1abee movq %rax, %rbx movq %r15, %rdi movq %rbx, %rsi callq 0x1c889 testl %eax, %eax je 0x1abf6 testw %r14w, %r14w je 0x1abf6 testw %r14w, 0x20(%rbx) jne 0x1abfe movq %r15, %rdi movq %rbx, %rsi callq 0x1c864 movq %rax, %rbx testq %rax, %rax jne 0x1abbf xorl %ebx, %ebx jmp 0x1abfe xorl %ebx, %ebx jmp 0x1ac0a xorl %ecx, %ecx testl %eax, %eax cmoveq %rcx, %rbx leaq 0x23ff3(%rip), %rdi # 0x3ebf8 callq 0x15015 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mlog_itertor_last: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp cs:_memlog_started, 1 jnz short loc_1ABF2 mov eax, edi lea rcx, _mlog_inst mov r15, [rcx+rax*8] test r15, r15 jz short loc_1ABF2 mov r14d, esi lea rdi, _mlog_mutex call os_mutex_lock mov rdi, r15 call cqueue_back test rax, rax jz short loc_1ABEE mov rbx, rax loc_1ABBF: mov rdi, r15 mov rsi, rbx call cqueue_validate_item test eax, eax jz short loc_1ABF6 test r14w, r14w jz short loc_1ABF6 test [rbx+20h], r14w jnz short loc_1ABFE mov rdi, r15 mov rsi, rbx call cqueue_forwards mov rbx, rax test rax, rax jnz short loc_1ABBF loc_1ABEE: xor ebx, ebx jmp short loc_1ABFE loc_1ABF2: xor ebx, ebx jmp short loc_1AC0A loc_1ABF6: xor ecx, ecx test eax, eax cmovz rbx, rcx loc_1ABFE: lea rdi, _mlog_mutex call os_mutex_unlock loc_1AC0A: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mlog_itertor_last(int a1, unsigned __int16 a2) { long long v2; // r15 long long v3; // rax long long v4; // rbx int v5; // eax if ( memlog_started != 1 ) return 0LL; v2 = mlog_inst[a1]; if ( !v2 ) return 0LL; os_mutex_lock((long long *)&mlog_mutex); v3 = cqueue_back(v2); if ( v3 ) { v4 = v3; while ( 1 ) { v5 = cqueue_validate_item(v2, v4); if ( !v5 || !a2 ) break; if ( (a2 & *(_WORD *)(v4 + 32)) != 0 ) goto LABEL_13; v4 = cqueue_forwards(v2, v4); if ( !v4 ) goto LABEL_9; } if ( !v5 ) v4 = 0LL; } else { LABEL_9: v4 = 0LL; } LABEL_13: os_mutex_unlock((long long *)&mlog_mutex); return v4; }
mlog_itertor_last: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP byte ptr [0x001412d0],0x1 JNZ 0x0011abf2 MOV EAX,EDI LEA RCX,[0x1412e0] MOV R15,qword ptr [RCX + RAX*0x8] TEST R15,R15 JZ 0x0011abf2 MOV R14D,ESI LEA RDI,[0x13ebf8] CALL 0x00114ff0 MOV RDI,R15 CALL 0x0011c846 TEST RAX,RAX JZ 0x0011abee MOV RBX,RAX LAB_0011abbf: MOV RDI,R15 MOV RSI,RBX CALL 0x0011c889 TEST EAX,EAX JZ 0x0011abf6 TEST R14W,R14W JZ 0x0011abf6 TEST word ptr [RBX + 0x20],R14W JNZ 0x0011abfe MOV RDI,R15 MOV RSI,RBX CALL 0x0011c864 MOV RBX,RAX TEST RAX,RAX JNZ 0x0011abbf LAB_0011abee: XOR EBX,EBX JMP 0x0011abfe LAB_0011abf2: XOR EBX,EBX JMP 0x0011ac0a LAB_0011abf6: XOR ECX,ECX TEST EAX,EAX CMOVZ RBX,RCX LAB_0011abfe: LEA RDI,[0x13ebf8] CALL 0x00115015 LAB_0011ac0a: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
long mlog_itertor_last(ulong param_1,ushort param_2) { long lVar1; int iVar2; long lVar3; if ((_memlog_started == '\x01') && (lVar1 = (&_mlog_inst)[param_1 & 0xffffffff], lVar1 != 0)) { os_mutex_lock(&_mlog_mutex); for (lVar3 = cqueue_back(lVar1); lVar3 != 0; lVar3 = cqueue_forwards(lVar1,lVar3)) { iVar2 = cqueue_validate_item(lVar1,lVar3); if ((iVar2 == 0) || (param_2 == 0)) { if (iVar2 == 0) { lVar3 = 0; } goto LAB_0011abfe; } if ((*(ushort *)(lVar3 + 0x20) & param_2) != 0) goto LAB_0011abfe; } lVar3 = 0; LAB_0011abfe: os_mutex_unlock(&_mlog_mutex); } else { lVar3 = 0; } return lVar3; }
11,038
ggml_threadpool_free
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_threadpool_free(struct ggml_threadpool* threadpool) { if (!threadpool) return; const int n_threads = threadpool->n_threads_max; #ifndef GGML_USE_OPENMP struct ggml_compute_state* workers = threadpool->workers; ggml_mutex_lock(&threadpool->mutex); threadpool->stop = true; threadpool->pause = false; ggml_cond_broadcast(&threadpool->cond); ggml_mutex_unlock(&threadpool->mutex); for (int j = 1; j < n_threads; j++) { int32_t rc = ggml_thread_join(workers[j].thrd, NULL); GGML_ASSERT(rc == GGML_EXIT_SUCCESS || rc == GGML_EXIT_ABORTED); UNUSED(rc); } ggml_mutex_destroy(&threadpool->mutex); ggml_cond_destroy(&threadpool->cond); #endif // GGML_USE_OPENMP const size_t workers_size = sizeof(struct ggml_compute_state) * n_threads; ggml_aligned_free(threadpool->workers, workers_size); ggml_aligned_free(threadpool, sizeof(struct ggml_threadpool)); }
O0
c
ggml_threadpool_free: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x104e8 jmp 0x105ea movq -0x8(%rbp), %rax movl 0xd8(%rax), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movq 0xd0(%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rdi callq 0xdfa0 movq -0x8(%rbp), %rcx movb $0x1, %al xchgb %al, 0xc8(%rcx) movq -0x8(%rbp), %rcx xorl %eax, %eax xchgb %al, 0xc9(%rcx) movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0xd2d0 movq -0x8(%rbp), %rdi callq 0xd7a0 movl $0x1, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0xc(%rbp), %eax jge 0x105a3 movq -0x18(%rbp), %rax movslq -0x1c(%rbp), %rcx imulq $0x220, %rcx, %rcx # imm = 0x220 addq %rcx, %rax movq (%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0xd990 movl %eax, -0x20(%rbp) cmpl $0x0, -0x20(%rbp) je 0x10598 cmpl $0x1, -0x20(%rbp) je 0x10598 leaq 0x635e4(%rip), %rdi # 0x73b62 movl $0x34da, %esi # imm = 0x34DA leaq 0x63637(%rip), %rdx # 0x73bc1 leaq 0x6389b(%rip), %rcx # 0x73e2c movb $0x0, %al callq 0xe270 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x10542 movq -0x8(%rbp), %rdi callq 0xdc60 movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0xe610 movslq -0xc(%rbp), %rax imulq $0x220, %rax, %rax # imm = 0x220 movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0xd0(%rax), %rdi movq -0x28(%rbp), %rsi callq 0xd5c0 movq -0x8(%rbp), %rdi movl $0x100, %esi # imm = 0x100 callq 0xd5c0 addq $0x30, %rsp popq %rbp retq
ggml_threadpool_free: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jnz short loc_104E8 jmp loc_105EA loc_104E8: mov rax, [rbp+var_8] mov eax, [rax+0D8h] mov [rbp+var_C], eax mov rax, [rbp+var_8] mov rax, [rax+0D0h] mov [rbp+var_18], rax mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rcx, [rbp+var_8] mov al, 1 xchg al, [rcx+0C8h] mov rcx, [rbp+var_8] xor eax, eax xchg al, [rcx+0C9h] mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_broadcast mov rdi, [rbp+var_8] call _pthread_mutex_unlock mov [rbp+var_1C], 1 loc_10542: mov eax, [rbp+var_1C] cmp eax, [rbp+var_C] jge short loc_105A3 mov rax, [rbp+var_18] movsxd rcx, [rbp+var_1C] imul rcx, 220h add rax, rcx mov rdi, [rax] xor eax, eax mov esi, eax call _pthread_join mov [rbp+var_20], eax cmp [rbp+var_20], 0 jz short loc_10598 cmp [rbp+var_20], 1 jz short loc_10598 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 34DAh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRcGgmlExitSucc; "rc == GGML_EXIT_SUCCESS || rc == GGML_E"... mov al, 0 call _ggml_abort loc_10598: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_10542 loc_105A3: mov rdi, [rbp+var_8] call _pthread_mutex_destroy mov rdi, [rbp+var_8] add rdi, 28h ; '(' call _pthread_cond_destroy movsxd rax, [rbp+var_C] imul rax, 220h mov [rbp+var_28], rax mov rax, [rbp+var_8] mov rdi, [rax+0D0h] mov rsi, [rbp+var_28] call _ggml_aligned_free mov rdi, [rbp+var_8] mov esi, 100h call _ggml_aligned_free loc_105EA: add rsp, 30h pop rbp retn
void ggml_threadpool_free(long long a1) { int i; // [rsp+14h] [rbp-1Ch] long long v2; // [rsp+18h] [rbp-18h] int v3; // [rsp+24h] [rbp-Ch] if ( a1 ) { v3 = *(_DWORD *)(a1 + 216); v2 = *(_QWORD *)(a1 + 208); pthread_mutex_lock(a1); *(_BYTE *)(a1 + 200) = 1; *(_BYTE *)(a1 + 201) = 0; pthread_cond_broadcast(a1 + 40); pthread_mutex_unlock(a1); for ( i = 1; i < v3; ++i ) { if ( (unsigned int)pthread_join(*(_QWORD *)(544LL * i + v2), 0LL) >= 2 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 13530LL, "GGML_ASSERT(%s) failed", "rc == GGML_EXIT_SUCCESS || rc == GGML_EXIT_ABORTED"); } pthread_mutex_destroy(a1); pthread_cond_destroy(a1 + 40); ggml_aligned_free(*(_QWORD *)(a1 + 208), 544LL * v3); ggml_aligned_free(a1, 256LL); } }
ggml_threadpool_free: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x001104e8 JMP 0x001105ea LAB_001104e8: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xd8] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010dfa0 MOV RCX,qword ptr [RBP + -0x8] MOV AL,0x1 XCHG byte ptr [RCX + 0xc8],AL MOV RCX,qword ptr [RBP + -0x8] XOR EAX,EAX XCHG byte ptr [RCX + 0xc9],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0010d2d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010d7a0 MOV dword ptr [RBP + -0x1c],0x1 LAB_00110542: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0xc] JGE 0x001105a3 MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x220 ADD RAX,RCX MOV RDI,qword ptr [RAX] XOR EAX,EAX MOV ESI,EAX CALL 0x0010d990 MOV dword ptr [RBP + -0x20],EAX CMP dword ptr [RBP + -0x20],0x0 JZ 0x00110598 CMP dword ptr [RBP + -0x20],0x1 JZ 0x00110598 LEA RDI,[0x173b62] MOV ESI,0x34da LEA RDX,[0x173bc1] LEA RCX,[0x173e2c] MOV AL,0x0 CALL 0x0010e270 LAB_00110598: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00110542 LAB_001105a3: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010dc60 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0010e610 MOVSXD RAX,dword ptr [RBP + -0xc] IMUL RAX,RAX,0x220 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xd0] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0010d5c0 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x100 CALL 0x0010d5c0 LAB_001105ea: ADD RSP,0x30 POP RBP RET
void ggml_threadpool_free(pthread_mutex_t *param_1) { int iVar1; long lVar2; int iVar3; int local_24; if (param_1 != (pthread_mutex_t *)0x0) { iVar1 = *(int *)((long)param_1 + 0xd8); lVar2 = *(long *)((long)param_1 + 0xd0); pthread_mutex_lock(param_1); LOCK(); param_1[5].__size[0] = '\x01'; UNLOCK(); LOCK(); *(int1 *)((long)param_1 + 0xc9) = 0; UNLOCK(); pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1)); pthread_mutex_unlock(param_1); for (local_24 = 1; local_24 < iVar1; local_24 = local_24 + 1) { iVar3 = pthread_join(*(pthread_t *)(lVar2 + (long)local_24 * 0x220),(void **)0x0); if ((iVar3 != 0) && (iVar3 != 1)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x34da,"GGML_ASSERT(%s) failed", "rc == GGML_EXIT_SUCCESS || rc == GGML_EXIT_ABORTED"); } } pthread_mutex_destroy(param_1); pthread_cond_destroy((pthread_cond_t *)(param_1 + 1)); ggml_aligned_free(*(int8 *)((long)param_1 + 0xd0),(long)iVar1 * 0x220); ggml_aligned_free(param_1,0x100); } return; }
11,039
ggml_threadpool_free
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_threadpool_free(struct ggml_threadpool* threadpool) { if (!threadpool) return; const int n_threads = threadpool->n_threads_max; #ifndef GGML_USE_OPENMP struct ggml_compute_state* workers = threadpool->workers; ggml_mutex_lock(&threadpool->mutex); threadpool->stop = true; threadpool->pause = false; ggml_cond_broadcast(&threadpool->cond); ggml_mutex_unlock(&threadpool->mutex); for (int j = 1; j < n_threads; j++) { int32_t rc = ggml_thread_join(workers[j].thrd, NULL); GGML_ASSERT(rc == GGML_EXIT_SUCCESS || rc == GGML_EXIT_ABORTED); UNUSED(rc); } ggml_mutex_destroy(&threadpool->mutex); ggml_cond_destroy(&threadpool->cond); #endif // GGML_USE_OPENMP const size_t workers_size = sizeof(struct ggml_compute_state) * n_threads; ggml_aligned_free(threadpool->workers, workers_size); ggml_aligned_free(threadpool, sizeof(struct ggml_threadpool)); }
O3
c
ggml_threadpool_free: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0xa932 movq %rdi, %rbx movslq 0xd8(%rdi), %r15 movq 0xd0(%rdi), %r12 callq 0x8850 movb $0x1, %al xchgb %al, 0xc8(%rbx) xorl %eax, %eax xchgb %al, 0xc9(%rbx) leaq 0x28(%rbx), %r14 movq %r14, %rdi callq 0x81e0 movq %rbx, %rdi callq 0x8430 cmpq $0x2, %r15 jl 0xa8f4 imulq $0x220, %r15, %r13 # imm = 0x220 movl $0x220, %ebp # imm = 0x220 movq (%r12,%rbp), %rdi xorl %esi, %esi callq 0x8580 cmpl $0x2, %eax jae 0xa941 addq $0x220, %rbp # imm = 0x220 cmpq %rbp, %r13 jne 0xa8d8 movq %rbx, %rdi callq 0x86f0 movq %r14, %rdi callq 0x8bb0 imulq $0x220, %r15, %rsi # imm = 0x220 movq 0xd0(%rbx), %rdi callq 0x8360 movl $0x100, %esi # imm = 0x100 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x8360 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2bf22(%rip), %rdi # 0x3686a leaq 0x2bf7a(%rip), %rdx # 0x368c9 leaq 0x2c1de(%rip), %rcx # 0x36b34 movl $0x34da, %esi # imm = 0x34DA xorl %eax, %eax callq 0x89c0
ggml_threadpool_free: push rbp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_A932 mov rbx, rdi movsxd r15, dword ptr [rdi+0D8h] mov r12, [rdi+0D0h] call _pthread_mutex_lock mov al, 1 xchg al, [rbx+0C8h] xor eax, eax xchg al, [rbx+0C9h] lea r14, [rbx+28h] mov rdi, r14 call _pthread_cond_broadcast mov rdi, rbx call _pthread_mutex_unlock cmp r15, 2 jl short loc_A8F4 imul r13, r15, 220h mov ebp, 220h loc_A8D8: mov rdi, [r12+rbp] xor esi, esi call _pthread_join cmp eax, 2 jnb short loc_A941 add rbp, 220h cmp r13, rbp jnz short loc_A8D8 loc_A8F4: mov rdi, rbx call _pthread_mutex_destroy mov rdi, r14 call _pthread_cond_destroy imul rsi, r15, 220h mov rdi, [rbx+0D0h] call _ggml_aligned_free mov esi, 100h mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ggml_aligned_free loc_A932: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A941: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRcGgmlExitSucc; "rc == GGML_EXIT_SUCCESS || rc == GGML_E"... mov esi, 34DAh xor eax, eax call _ggml_abort
long long ggml_threadpool_free(long long a1) { long long v1; // r15 long long v2; // r12 long long v3; // rbp long long result; // rax if ( a1 ) { v1 = *(int *)(a1 + 216); v2 = *(_QWORD *)(a1 + 208); pthread_mutex_lock(a1); *(_BYTE *)(a1 + 200) = 1; *(_BYTE *)(a1 + 201) = 0; pthread_cond_broadcast(a1 + 40); pthread_mutex_unlock(a1); if ( v1 < 2 ) { LABEL_6: pthread_mutex_destroy(a1); pthread_cond_destroy(a1 + 40); ggml_aligned_free(*(_QWORD *)(a1 + 208), 544 * v1); return ggml_aligned_free(a1, 256LL); } else { v3 = 544LL; while ( (unsigned int)pthread_join(*(_QWORD *)(v2 + v3), 0LL) < 2 ) { v3 += 544LL; if ( 544 * v1 == v3 ) goto LABEL_6; } ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 13530LL, "GGML_ASSERT(%s) failed", "rc == GGML_EXIT_SUCCESS || rc == GGML_EXIT_ABORTED"); return ggml_threadpool_pause(); } } return result; }
ggml_threadpool_free: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x0010a932 MOV RBX,RDI MOVSXD R15,dword ptr [RDI + 0xd8] MOV R12,qword ptr [RDI + 0xd0] CALL 0x00108850 MOV AL,0x1 XCHG byte ptr [RBX + 0xc8],AL XOR EAX,EAX XCHG byte ptr [RBX + 0xc9],AL LEA R14,[RBX + 0x28] MOV RDI,R14 CALL 0x001081e0 MOV RDI,RBX CALL 0x00108430 CMP R15,0x2 JL 0x0010a8f4 IMUL R13,R15,0x220 MOV EBP,0x220 LAB_0010a8d8: MOV RDI,qword ptr [R12 + RBP*0x1] XOR ESI,ESI CALL 0x00108580 CMP EAX,0x2 JNC 0x0010a941 ADD RBP,0x220 CMP R13,RBP JNZ 0x0010a8d8 LAB_0010a8f4: MOV RDI,RBX CALL 0x001086f0 MOV RDI,R14 CALL 0x00108bb0 IMUL RSI,R15,0x220 MOV RDI,qword ptr [RBX + 0xd0] CALL 0x00108360 MOV ESI,0x100 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00108360 LAB_0010a932: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010a941: LEA RDI,[0x13686a] LEA RDX,[0x1368c9] LEA RCX,[0x136b34] MOV ESI,0x34da XOR EAX,EAX CALL 0x001089c0
void ggml_threadpool_free(pthread_mutex_t *param_1) { long lVar1; uint uVar2; long lVar3; long lVar4; if (param_1 == (pthread_mutex_t *)0x0) { return; } lVar4 = (long)*(int *)((long)param_1 + 0xd8); lVar1 = *(long *)((long)param_1 + 0xd0); pthread_mutex_lock(param_1); LOCK(); param_1[5].__size[0] = '\x01'; UNLOCK(); LOCK(); *(int1 *)((long)param_1 + 0xc9) = 0; UNLOCK(); pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1)); pthread_mutex_unlock(param_1); if (1 < lVar4) { lVar3 = 0x220; do { uVar2 = pthread_join(*(pthread_t *)(lVar1 + lVar3),(void **)0x0); if (1 < uVar2) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x34da,"GGML_ASSERT(%s) failed", "rc == GGML_EXIT_SUCCESS || rc == GGML_EXIT_ABORTED"); } lVar3 = lVar3 + 0x220; } while (lVar4 * 0x220 - lVar3 != 0); } pthread_mutex_destroy(param_1); pthread_cond_destroy((pthread_cond_t *)(param_1 + 1)); ggml_aligned_free(*(int8 *)((long)param_1 + 0xd0),lVar4 * 0x220); ggml_aligned_free(param_1,0x100); return; }
11,040
my_hash_delete
eloqsql/mysys/hash.c
my_bool my_hash_delete(HASH *hash, uchar *record) { uint pos2,idx,empty_index; my_hash_value_type pos_hashnr, lastpos_hashnr; size_t blength; HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; DBUG_ENTER("my_hash_delete"); if (!hash->records) DBUG_RETURN(1); blength=hash->blength; data=dynamic_element(&hash->array,0,HASH_LINK*); /* Search after record with key */ pos= data + my_hash_mask(rec_hashnr(hash, record), blength, hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) DBUG_RETURN(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos[0]= empty[0]; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr= lastpos->hash_nr; /* pos is where lastpos should be */ pos= data + my_hash_mask(lastpos_hashnr, hash->blength, hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr= pos->hash_nr; /* pos3 is where the pos should be */ pos3= data + my_hash_mask(pos_hashnr, hash->blength, hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= my_hash_mask(lastpos_hashnr, blength, hash->records + 1); if (pos2 == my_hash_mask(pos_hashnr, blength, hash->records + 1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: (void) pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); DBUG_RETURN(0); }
O0
c
my_hash_delete: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x2afc9 jmp 0x2afc0 movb $0x1, -0x1(%rbp) jmp 0x2b342 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2b350 movl %eax, %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x2a7d0 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq $0x0, -0x50(%rbp) movq -0x58(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax je 0x2b065 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax cmpl $-0x1, (%rax) jne 0x2b04e jmp 0x2b045 movb $0x1, -0x1(%rbp) jmp 0x2b342 movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) jmp 0x2b024 movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rax addq $-0x1, %rax movq %rax, 0x18(%rcx) movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx shrq %rcx cmpq %rcx, %rax jae 0x2b094 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx shrq %rcx movq %rcx, 0x10(%rax) movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x24(%rbp) cmpq $0x0, -0x50(%rbp) je 0x2b0da movq -0x58(%rbp), %rax movl (%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x2b115 movq -0x58(%rbp), %rax cmpl $-0x1, (%rax) je 0x2b113 movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movl (%rcx), %ecx movl %ecx, -0x24(%rbp) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x58(%rbp), %rax movq -0x68(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x2b115 movq -0x68(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x2b124 jmp 0x2b316 movq -0x48(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x2c(%rbp), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x2a7d0 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x2b186 movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x2b316 movq -0x58(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x28(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x28(%rbp), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx callq 0x2a7d0 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax cmpq -0x60(%rbp), %rax je 0x2b22c movq -0x68(%rbp), %rax movq -0x58(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x24(%rbp), %ecx callq 0x2af60 jmp 0x2b316 movl -0x2c(%rbp), %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx addq $0x1, %rdx callq 0x2a7d0 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x28(%rbp), %edi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx addq $0x1, %rdx callq 0x2a7d0 movl %eax, %ecx movl -0x84(%rbp), %eax cmpl %ecx, %eax jne 0x2b2db movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax je 0x2b2c7 movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x24(%rbp), %ecx callq 0x2af60 jmp 0x2b316 movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x20(%rbp) jmp 0x2b2e2 movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x40(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movq -0x58(%rbp), %rax movl (%rax), %ecx callq 0x2af60 movl -0x24(%rbp), %ecx movq -0x58(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rdi addq $0x28, %rdi callq 0x2f090 movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x2b33c movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax jmp 0x2b33e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x90, %rsp popq %rbp retq nop
my_hash_delete: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jnz short loc_2AFC9 jmp short $+2 loc_2AFC0: mov [rbp+var_1], 1 jmp loc_2B342 loc_2AFC9: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_70], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov [rbp+var_50], 0 loc_2B024: mov rax, [rbp+var_58] mov rax, [rax+8] cmp rax, [rbp+var_18] jz short loc_2B065 mov rax, [rbp+var_58] mov [rbp+var_50], rax mov rax, [rbp+var_58] cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_2B04E jmp short $+2 loc_2B045: mov [rbp+var_1], 1 jmp loc_2B342 loc_2B04E: mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov [rbp+var_58], rax jmp short loc_2B024 loc_2B065: mov rcx, [rbp+var_10] mov rax, [rcx+18h] add rax, 0FFFFFFFFFFFFFFFFh mov [rcx+18h], rax mov rcx, [rbp+var_10] mov rcx, [rcx+10h] shr rcx, 1 cmp rax, rcx jnb short loc_2B094 mov rax, [rbp+var_10] mov rcx, [rax+10h] shr rcx, 1 mov [rax+10h], rcx loc_2B094: mov rax, [rbp+var_40] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] shl rcx, 4 add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_58] mov [rbp+var_68], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov [rbp+var_24], eax cmp [rbp+var_50], 0 jz short loc_2B0DA mov rax, [rbp+var_58] mov ecx, [rax] mov rax, [rbp+var_50] mov [rax], ecx jmp short loc_2B115 loc_2B0DA: mov rax, [rbp+var_58] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_2B113 mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov ecx, [rcx] mov [rbp+var_24], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_58] mov rcx, [rbp+var_68] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx loc_2B113: jmp short $+2 loc_2B115: mov rax, [rbp+var_68] cmp rax, [rbp+var_48] jnz short loc_2B124 jmp loc_2B316 loc_2B124: mov rax, [rbp+var_48] mov eax, [rax+4] mov [rbp+var_2C], eax mov rax, [rbp+var_40] mov [rbp+var_78], rax mov edi, [rbp+var_2C] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_78] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_58] cmp rax, [rbp+var_68] jnz short loc_2B186 mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx jmp loc_2B316 loc_2B186: mov rax, [rbp+var_58] mov eax, [rax+4] mov [rbp+var_28], eax mov rax, [rbp+var_40] mov [rbp+var_80], rax mov edi, [rbp+var_28] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+18h] call my_hash_mask mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_58] cmp rax, [rbp+var_60] jz short loc_2B22C mov rax, [rbp+var_68] mov rcx, [rbp+var_58] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_58] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_60] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_24] call movelink jmp loc_2B316 loc_2B22C: mov edi, [rbp+var_2C] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] add rdx, 1 call my_hash_mask mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov [rbp+var_84], eax mov edi, [rbp+var_28] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov rdx, [rax+18h] add rdx, 1 call my_hash_mask mov ecx, eax mov eax, [rbp+var_84] cmp eax, ecx jnz short loc_2B2DB mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jz short loc_2B2C7 mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_24] call movelink jmp short loc_2B316 loc_2B2C7: mov rax, [rbp+var_58] mov rcx, [rbp+var_40] sub rax, rcx sar rax, 4 mov [rbp+var_20], eax jmp short loc_2B2E2 loc_2B2DB: mov [rbp+var_20], 0FFFFFFFFh loc_2B2E2: mov rax, [rbp+var_68] mov rcx, [rbp+var_48] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_40] mov esi, [rbp+var_20] mov edx, [rbp+var_24] mov rax, [rbp+var_58] mov ecx, [rax] call movelink mov ecx, [rbp+var_24] mov rax, [rbp+var_58] mov [rax], ecx loc_2B316: mov rdi, [rbp+var_10] add rdi, 28h ; '(' call pop_dynamic mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_2B33C mov rax, [rbp+var_10] mov rax, [rax+60h] mov rdi, [rbp+var_18] call rax loc_2B33C: jmp short $+2 loc_2B33E: mov [rbp+var_1], 0 loc_2B342: mov al, [rbp+var_1] add rsp, 90h pop rbp retn
char my_hash_delete(long long a1, long long a2) { unsigned int v2; // eax unsigned long long v3; // rax _QWORD *v5; // [rsp+28h] [rbp-68h] long long v6; // [rsp+30h] [rbp-60h] unsigned int *v7; // [rsp+38h] [rbp-58h] long long v8; // [rsp+38h] [rbp-58h] _DWORD *v9; // [rsp+40h] [rbp-50h] long long v10; // [rsp+48h] [rbp-48h] long long v11; // [rsp+50h] [rbp-40h] unsigned long long v12; // [rsp+58h] [rbp-38h] unsigned int v13; // [rsp+64h] [rbp-2Ch] unsigned int v14; // [rsp+68h] [rbp-28h] unsigned int v15; // [rsp+6Ch] [rbp-24h] int v16; // [rsp+70h] [rbp-20h] int v17; // [rsp+74h] [rbp-1Ch] if ( !*(_QWORD *)(a1 + 24) ) return 1; v12 = *(_QWORD *)(a1 + 16); v11 = *(_QWORD *)(a1 + 40); v2 = rec_hashnr(a1, a2); v7 = (unsigned int *)(16LL * (unsigned int)my_hash_mask(v2, v12, *(_QWORD *)(a1 + 24)) + v11); v9 = 0LL; while ( *((_QWORD *)v7 + 1) != a2 ) { v9 = v7; if ( *v7 == -1 ) return 1; v7 = (unsigned int *)(16LL * *v7 + v11); } v3 = *(_QWORD *)(a1 + 24) - 1LL; *(_QWORD *)(a1 + 24) = v3; if ( v3 < *(_QWORD *)(a1 + 16) >> 1 ) *(_QWORD *)(a1 + 16) >>= 1; v10 = 16LL * *(_QWORD *)(a1 + 24) + v11; v5 = v7; v15 = ((long long)v7 - v11) >> 4; if ( v9 ) { *v9 = *v7; } else if ( *v7 != -1 ) { v15 = *v7; v5 = (_QWORD *)(16LL * *v7 + v11); *(_QWORD *)v7 = *v5; *((_QWORD *)v7 + 1) = v5[1]; } if ( v5 != (_QWORD *)v10 ) { v13 = *(_DWORD *)(v10 + 4); v8 = 16LL * (unsigned int)my_hash_mask(v13, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11; if ( (_QWORD *)v8 == v5 ) { *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); } else { v14 = *(_DWORD *)(v8 + 4); v6 = 16LL * (unsigned int)my_hash_mask(v14, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) + v11; if ( v8 == v6 ) { v17 = my_hash_mask(v13, v12, *(_QWORD *)(a1 + 24) + 1LL); if ( v17 == (unsigned int)my_hash_mask(v14, v12, *(_QWORD *)(a1 + 24) + 1LL) ) { if ( v17 != *(_QWORD *)(a1 + 24) ) { *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); movelink(v11, (v10 - v11) >> 4, (v8 - v11) >> 4, v15); goto LABEL_25; } v16 = (v8 - v11) >> 4; } else { v16 = -1; } *v5 = *(_QWORD *)v10; v5[1] = *(_QWORD *)(v10 + 8); movelink(v11, v16, v15, *(_DWORD *)v8); *(_DWORD *)v8 = v15; goto LABEL_25; } *v5 = *(_QWORD *)v8; v5[1] = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = *(_QWORD *)v10; *(_QWORD *)(v8 + 8) = *(_QWORD *)(v10 + 8); movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v15); } } LABEL_25: pop_dynamic(a1 + 40); if ( *(_QWORD *)(a1 + 96) ) (*(void ( **)(long long))(a1 + 96))(a2); return 0; }
my_hash_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0012afc9 JMP 0x0012afc0 LAB_0012afc0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b342 LAB_0012afc9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX 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 qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012b350 MOV EDI,EAX MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012a7d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x50],0x0 LAB_0012b024: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JZ 0x0012b065 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX],-0x1 JNZ 0x0012b04e JMP 0x0012b045 LAB_0012b045: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b342 LAB_0012b04e: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX JMP 0x0012b024 LAB_0012b065: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RCX + 0x18] ADD RAX,-0x1 MOV qword ptr [RCX + 0x18],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SHR RCX,0x1 CMP RAX,RCX JNC 0x0012b094 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] SHR RCX,0x1 MOV qword ptr [RAX + 0x10],RCX LAB_0012b094: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x24],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0012b0da MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX JMP 0x0012b115 LAB_0012b0da: MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX],-0x1 JZ 0x0012b113 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX] MOV dword ptr [RBP + -0x24],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_0012b113: JMP 0x0012b115 LAB_0012b115: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x0012b124 JMP 0x0012b316 LAB_0012b124: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV EDI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012a7d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x0012b186 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x0012b316 LAB_0012b186: MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x80],RAX MOV EDI,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012a7d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x60] JZ 0x0012b22c MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x24] CALL 0x0012af60 JMP 0x0012b316 LAB_0012b22c: MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RDX,0x1 CALL 0x0012a7d0 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x84],EAX MOV EDI,dword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] ADD RDX,0x1 CALL 0x0012a7d0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x84] CMP EAX,ECX JNZ 0x0012b2db MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JZ 0x0012b2c7 MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x24] CALL 0x0012af60 JMP 0x0012b316 LAB_0012b2c7: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x20],EAX JMP 0x0012b2e2 LAB_0012b2db: MOV dword ptr [RBP + -0x20],0xffffffff LAB_0012b2e2: MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX] CALL 0x0012af60 MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX],ECX LAB_0012b316: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 CALL 0x0012f090 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x0012b33c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_0012b33c: JMP 0x0012b33e LAB_0012b33e: MOV byte ptr [RBP + -0x1],0x0 LAB_0012b342: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x90 POP RBP RET
int1 my_hash_delete(long param_1,long param_2) { int8 uVar1; long lVar2; int4 uVar3; uint uVar4; uint uVar5; uint uVar6; ulong uVar7; uint *puVar8; uint *puVar9; uint *puVar10; uint *local_70; uint *local_60; uint *local_58; uint local_2c; int4 local_28; if (*(long *)(param_1 + 0x18) == 0) { return 1; } uVar1 = *(int8 *)(param_1 + 0x10); lVar2 = *(long *)(param_1 + 0x28); uVar3 = rec_hashnr(param_1,param_2); uVar4 = my_hash_mask(uVar3,uVar1,*(int8 *)(param_1 + 0x18)); local_58 = (uint *)0x0; while (local_60 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_60 + 2) != param_2) { local_58 = local_60; if (*local_60 == 0xffffffff) { return 1; } uVar4 = *local_60; } uVar7 = *(long *)(param_1 + 0x18) - 1; *(ulong *)(param_1 + 0x18) = uVar7; if (uVar7 < *(ulong *)(param_1 + 0x10) >> 1) { *(ulong *)(param_1 + 0x10) = *(ulong *)(param_1 + 0x10) >> 1; } puVar8 = (uint *)(lVar2 + *(long *)(param_1 + 0x18) * 0x10); local_70 = local_60; local_2c = (uint)((long)local_60 - lVar2 >> 4); if (local_58 == (uint *)0x0) { if (*local_60 != 0xffffffff) { local_2c = *local_60; local_70 = (uint *)(lVar2 + (ulong)local_2c * 0x10); *(int8 *)local_60 = *(int8 *)local_70; *(int8 *)(local_60 + 2) = *(int8 *)(local_70 + 2); } } else { *local_58 = *local_60; } if (local_70 != puVar8) { uVar4 = puVar8[1]; uVar5 = my_hash_mask(uVar4,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); puVar9 = (uint *)(lVar2 + (ulong)uVar5 * 0x10); if (puVar9 == local_70) { *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); } else { uVar5 = puVar9[1]; uVar6 = my_hash_mask(uVar5,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); puVar10 = (uint *)(lVar2 + (ulong)uVar6 * 0x10); if (puVar9 == puVar10) { uVar4 = my_hash_mask(uVar4,uVar1,*(long *)(param_1 + 0x18) + 1); uVar5 = my_hash_mask(uVar5,uVar1,*(long *)(param_1 + 0x18) + 1); if (uVar4 == uVar5) { if ((ulong)uVar4 != *(ulong *)(param_1 + 0x18)) { *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff, (long)puVar9 - lVar2 >> 4 & 0xffffffff,local_2c); goto LAB_0012b316; } local_28 = (int4)((long)puVar9 - lVar2 >> 4); } else { local_28 = 0xffffffff; } *(int8 *)local_70 = *(int8 *)puVar8; *(int8 *)(local_70 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,local_28,local_2c,*puVar9); *puVar9 = local_2c; } else { *(int8 *)local_70 = *(int8 *)puVar9; *(int8 *)(local_70 + 2) = *(int8 *)(puVar9 + 2); *(int8 *)puVar9 = *(int8 *)puVar8; *(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff, (long)puVar10 - lVar2 >> 4 & 0xffffffff,local_2c); } } } LAB_0012b316: pop_dynamic(param_1 + 0x28); if (*(long *)(param_1 + 0x60) != 0) { (**(code **)(param_1 + 0x60))(param_2); } return 0; }
11,041
codegen_generate_tail_call
eshkol/src/backend/codegen/calls.c
bool codegen_generate_tail_call(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_CALL); assert(node->is_tail_position); // Get output file FILE* output = codegen_context_get_output(context); // Get binding system from context BindingSystem* binding_system = codegen_context_get_binding_system(context); if (!binding_system) { DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); diagnostic_error(diagnostics, node->line, node->column, "Binding system not available"); return false; } // Get diagnostics context DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); // Check if this is a self-recursive tail call if (node->is_self_tail_call) { // For self-recursive tail calls, we generate a loop instead of a function call diagnostic_debug(diagnostics, node->line, node->column, "Generating self-recursive tail call optimization"); // First, we need to generate code to update the parameters fprintf(output, "{\n"); codegen_context_increment_indent(context); // Generate temporary variables for the arguments for (size_t i = 0; i < node->as.call.arg_count; i++) { codegen_context_write_indent(context); fprintf(output, "// Evaluate argument %zu\n", i + 1); codegen_context_write_indent(context); fprintf(output, "auto temp_arg_%zu = ", i + 1); if (!codegen_generate_expression(context, node->as.call.args[i])) { return false; } fprintf(output, ";\n"); // Add validation for arguments codegen_context_write_indent(context); fprintf(output, "if (temp_arg_%zu == NULL) {\n", i + 1); codegen_context_increment_indent(context); codegen_context_write_indent(context); fprintf(output, "fprintf(stderr, \"Warning: NULL argument %zu in self-recursive call at line %d\\n\", %zu, %d);\n", i + 1, node->line, i + 1, node->line); codegen_context_decrement_indent(context); codegen_context_write_indent(context); fprintf(output, "}\n"); } // Update the parameters with the temporary variables for (size_t i = 0; i < node->as.call.arg_count; i++) { codegen_context_write_indent(context); // We assume the parameter names follow the pattern p1, p2, etc. fprintf(output, "p%zu = temp_arg_%zu;\n", i + 1, i + 1); } // Continue the loop codegen_context_write_indent(context); fprintf(output, "continue;\n"); // Close the block codegen_context_decrement_indent(context); codegen_context_write_indent(context); fprintf(output, "}\n"); return true; } // Check if this is a mutual recursive call else if (node->as.call.callee->type == AST_IDENTIFIER && node->as.call.callee->binding_id != 0) { uint64_t callee_binding_id = node->as.call.callee->binding_id; uint64_t callee_scope_id = binding_system_get_binding_scope(binding_system, callee_binding_id); // Get the current scope ID uint64_t current_scope_id = binding_system->current_scope_id; // Get the parent scope ID uint64_t parent_scope_id = binding_system_get_parent_scope(binding_system, current_scope_id); // Check if this is a mutual recursive call (sibling functions) if (parent_scope_id != 0 && binding_system_get_parent_scope(binding_system, callee_scope_id) == parent_scope_id) { diagnostic_debug(diagnostics, node->line, node->column, "Detected mutual recursive tail call"); } } // For non-self-recursive tail calls, we generate a return statement fprintf(output, "return "); // Generate the function call if (node->as.call.callee->type == AST_IDENTIFIER) { // Replace hyphens with underscores in function names char* function_name = strdup(node->as.call.callee->as.identifier.name); if (function_name) { for (char* p = function_name; *p; p++) { if (*p == '-') { *p = '_'; } } fprintf(output, "%s", function_name); free(function_name); } else { if (!codegen_generate_expression(context, node->as.call.callee)) { return false; } } } else { if (!codegen_generate_expression(context, node->as.call.callee)) { return false; } } // Generate arguments fprintf(output, "("); for (size_t i = 0; i < node->as.call.arg_count; i++) { if (i > 0) { fprintf(output, ", "); } if (!codegen_generate_expression(context, node->as.call.args[i])) { return false; } } fprintf(output, ")"); return true; }
O3
c
codegen_generate_tail_call: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x6351 movq %rsi, %r15 testq %rsi, %rsi je 0x6370 cmpl $0x19, (%r15) jne 0x638f cmpb $0x0, 0x38(%r15) je 0x63ae movq %rdi, %rbx callq 0x3c55 movq %rax, %r14 movq %rbx, %rdi callq 0x3e52 movq %rax, %r13 movq %rbx, %rdi callq 0x3bfb movq %rax, %r12 testq %r13, %r13 je 0x61ef cmpb $0x1, 0x39(%r15) jne 0x620b movl 0x8(%r15), %esi movl 0x10(%r15), %edx leaq 0xab23(%rip), %rcx # 0x10b53 movq %r12, %rdi callq 0x2b2f leaq 0xa3ed(%rip), %rdi # 0x1042c movl $0x2, %esi movl $0x1, %edx movq %r14, %rcx callq 0x1220 movq %rbx, %rdi callq 0x3d07 cmpq $0x0, 0x58(%r15) je 0x61a0 xorl %r12d, %r12d movq %r15, -0x30(%rbp) xorl %r13d, %r13d movq %rbx, %rdi callq 0x3dc1 leaq 0x1(%r12), %r15 movq %r14, %rdi leaq 0xc2a4(%rip), %rsi # 0x12329 movq %r15, %rdx xorl %eax, %eax callq 0x1190 movq %rbx, %rdi callq 0x3dc1 movq %r14, %rdi leaq 0xaae3(%rip), %rsi # 0x10b84 movq %r15, %rdx xorl %eax, %eax callq 0x1190 movq -0x30(%rbp), %rax movq 0x50(%rax), %rax movq (%rax,%r12,8), %rsi movq %rbx, %rdi callq 0x56c0 testb %al, %al je 0x633f movl $0x2, %esi movl $0x1, %edx leaq 0xa26e(%rip), %rdi # 0x10346 movq %r14, %rcx callq 0x1220 movq %rbx, %rdi callq 0x3dc1 movq %r14, %rdi leaq 0xaaa7(%rip), %rsi # 0x10b99 movq %r15, %rdx xorl %eax, %eax callq 0x1190 movq %rbx, %rdi callq 0x3d07 movq %rbx, %rdi callq 0x3dc1 movq -0x30(%rbp), %r12 movq 0x8(%r12), %rcx movq %r14, %rdi leaq 0xaa97(%rip), %rsi # 0x10bb6 movq %r15, %rdx movq %r15, %r8 movq %rcx, %r9 xorl %eax, %eax callq 0x1190 movq %rbx, %rdi callq 0x3d33 movq %rbx, %rdi callq 0x3dc1 movl $0x2, %esi movl $0x1, %edx leaq 0xbf01(%rip), %rdi # 0x12051 movq %r14, %rcx callq 0x1220 movq 0x58(%r12), %rax movq %r15, %r12 cmpq %rax, %r15 jb 0x606e testq %rax, %rax movq -0x30(%rbp), %r15 je 0x61a0 leaq 0xaa9a(%rip), %r12 # 0x10c13 xorl %r13d, %r13d movq %rbx, %rdi callq 0x3dc1 incq %r13 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movq %r13, %rcx xorl %eax, %eax callq 0x1190 cmpq 0x58(%r15), %r13 jb 0x617c movq %rbx, %rdi callq 0x3dc1 leaq 0xc1e5(%rip), %rdi # 0x12394 movl $0xa, %esi movl $0x1, %edx movq %r14, %rcx callq 0x1220 movq %rbx, %rdi callq 0x3d33 movq %rbx, %rdi callq 0x3dc1 leaq 0xbe79(%rip), %rdi # 0x12051 movl $0x2, %esi movl $0x1, %edx movq %r14, %rcx callq 0x1220 jmp 0x633c movl 0x8(%r15), %esi movl 0x10(%r15), %edx leaq 0xa938(%rip), %rcx # 0x10b36 movq %r12, %rdi callq 0x29be jmp 0x62c2 movq 0x48(%r15), %rax cmpl $0x6, (%rax) jne 0x6268 movq 0x28(%rax), %rsi testq %rsi, %rsi je 0x6268 movq %r13, %rdi callq 0xb722 movq %rax, -0x30(%rbp) movq 0xe8(%r13), %rsi movq %r13, %rdi callq 0xb35b testq %rax, %rax je 0x6268 movq %r13, %rdi movq -0x30(%rbp), %rsi movq %rax, %r13 callq 0xb35b cmpq %r13, %rax jne 0x6268 movl 0x8(%r15), %esi movl 0x10(%r15), %edx leaq 0xa9c9(%rip), %rcx # 0x10c29 movq %r12, %rdi callq 0x2b2f leaq 0xb6d7(%rip), %rdi # 0x11946 movl $0x7, %esi movl $0x1, %edx movq %r14, %rcx callq 0x1220 movq 0x48(%r15), %r13 cmpl $0x6, (%r13) jne 0x62b3 movq 0x48(%r13), %rdi callq 0x1230 testq %rax, %rax je 0x62b3 movq %rax, %r12 movzbl (%rax), %ecx cmpl $0x2d, %ecx je 0x62ab testl %ecx, %ecx jne 0x62ae jmp 0x62c7 movb $0x5f, (%rax) incq %rax jmp 0x629d movq %rbx, %rdi movq %r13, %rsi callq 0x56c0 testb %al, %al jne 0x62da xorl %r13d, %r13d jmp 0x633f movq %r12, %rdi movq %r14, %rsi callq 0x1140 movq %r12, %rdi callq 0x1030 movl $0x28, %edi movq %r14, %rsi callq 0x1170 cmpq $0x0, 0x58(%r15) je 0x632f xorl %r13d, %r13d leaq 0xab7f(%rip), %r12 # 0x10e77 testq %r13, %r13 je 0x6312 movl $0x2, %esi movl $0x1, %edx movq %r12, %rdi movq %r14, %rcx callq 0x1220 movq 0x50(%r15), %rax movq (%rax,%r13,8), %rsi movq %rbx, %rdi callq 0x56c0 testb %al, %al je 0x62c2 incq %r13 cmpq 0x58(%r15), %r13 jb 0x62f8 movl $0x29, %edi movq %r14, %rsi callq 0x1170 movb $0x1, %r13b movl %r13d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x7d41(%rip), %rdi # 0xe099 leaq 0xa721(%rip), %rsi # 0x10a80 leaq 0xa75e(%rip), %rcx # 0x10ac4 movl $0x19, %edx callq 0x1130 leaq 0x8a95(%rip), %rdi # 0xee0c leaq 0xa702(%rip), %rsi # 0x10a80 leaq 0xa73f(%rip), %rcx # 0x10ac4 movl $0x1a, %edx callq 0x1130 leaq 0xa772(%rip), %rdi # 0x10b08 leaq 0xa6e3(%rip), %rsi # 0x10a80 leaq 0xa720(%rip), %rcx # 0x10ac4 movl $0x1b, %edx callq 0x1130 leaq 0xa76a(%rip), %rdi # 0x10b1f leaq 0xa6c4(%rip), %rsi # 0x10a80 leaq 0xa701(%rip), %rcx # 0x10ac4 movl $0x1c, %edx callq 0x1130
codegen_generate_tail_call: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_6351 mov r15, rsi test rsi, rsi jz loc_6370 cmp dword ptr [r15], 19h jnz loc_638F cmp byte ptr [r15+38h], 0 jz loc_63AE mov rbx, rdi call codegen_context_get_output mov r14, rax mov rdi, rbx call codegen_context_get_binding_system mov r13, rax mov rdi, rbx call codegen_context_get_diagnostics mov r12, rax test r13, r13 jz loc_61EF cmp byte ptr [r15+39h], 1 jnz loc_620B mov esi, [r15+8] mov edx, [r15+10h] lea rcx, aGeneratingSelf; "Generating self-recursive tail call opt"... mov rdi, r12 call diagnostic_debug lea rdi, aStaticVoidAttr_0+38h; "{\n" mov esi, 2 mov edx, 1 mov rcx, r14 call _fwrite mov rdi, rbx call codegen_context_increment_indent cmp qword ptr [r15+58h], 0 jz loc_61A0 xor r12d, r12d mov [rbp+var_30], r15 xor r13d, r13d loc_606E: mov rdi, rbx call codegen_context_write_indent lea r15, [r12+1] mov rdi, r14 lea rsi, aEvaluateArgume+8; "// Evaluate argument %zu\n" mov rdx, r15 xor eax, eax call _fprintf mov rdi, rbx call codegen_context_write_indent mov rdi, r14 lea rsi, aAutoTempArgZu; "auto temp_arg_%zu = " mov rdx, r15 xor eax, eax call _fprintf mov rax, [rbp+var_30] mov rax, [rax+50h] mov rsi, [rax+r12*8] mov rdi, rbx call codegen_generate_expression test al, al jz loc_633F mov esi, 2 mov edx, 1 lea rdi, aFprintfStderrF+3Ah; ";\n" mov rcx, r14 call _fwrite mov rdi, rbx call codegen_context_write_indent mov rdi, r14 lea rsi, aIfTempArgZuNul; "if (temp_arg_%zu == NULL) {\n" mov rdx, r15 xor eax, eax call _fprintf mov rdi, rbx call codegen_context_increment_indent mov rdi, rbx call codegen_context_write_indent mov r12, [rbp+var_30] mov rcx, [r12+8] mov rdi, r14 lea rsi, aFprintfStderrW; "fprintf(stderr, \"Warning: NULL argumen"... mov rdx, r15 mov r8, r15 mov r9, rcx xor eax, eax call _fprintf mov rdi, rbx call codegen_context_decrement_indent mov rdi, rbx call codegen_context_write_indent mov esi, 2 mov edx, 1 lea rdi, asc_12049+8; "}\n" mov rcx, r14 call _fwrite mov rax, [r12+58h] mov r12, r15 cmp r15, rax jb loc_606E test rax, rax mov r15, [rbp+var_30] jz short loc_61A0 lea r12, aPZuTempArgZu; "p%zu = temp_arg_%zu;\n" xor r13d, r13d loc_617C: mov rdi, rbx call codegen_context_write_indent inc r13 mov rdi, r14 mov rsi, r12 mov rdx, r13 mov rcx, r13 xor eax, eax call _fprintf cmp r13, [r15+58h] jb short loc_617C loc_61A0: mov rdi, rbx call codegen_context_write_indent lea rdi, aContinue+8; "continue;\n" mov esi, 0Ah mov edx, 1 mov rcx, r14 call _fwrite mov rdi, rbx call codegen_context_decrement_indent mov rdi, rbx call codegen_context_write_indent lea rdi, asc_12049+8; "}\n" mov esi, 2 mov edx, 1 mov rcx, r14 call _fwrite jmp loc_633C loc_61EF: mov esi, [r15+8] mov edx, [r15+10h] lea rcx, aBindingSystemN; "Binding system not available" mov rdi, r12 call diagnostic_error jmp loc_62C2 loc_620B: mov rax, [r15+48h] cmp dword ptr [rax], 6 jnz short loc_6268 mov rsi, [rax+28h] test rsi, rsi jz short loc_6268 mov rdi, r13 call binding_system_get_binding_scope mov [rbp+var_30], rax mov rsi, [r13+0E8h] mov rdi, r13 call binding_system_get_parent_scope test rax, rax jz short loc_6268 mov rdi, r13 mov rsi, [rbp+var_30] mov r13, rax call binding_system_get_parent_scope cmp rax, r13 jnz short loc_6268 mov esi, [r15+8] mov edx, [r15+10h] lea rcx, aDetectedMutual; "Detected mutual recursive tail call" mov rdi, r12 call diagnostic_debug loc_6268: lea rdi, aReturn+8; "return " mov esi, 7 mov edx, 1 mov rcx, r14 call _fwrite mov r13, [r15+48h] cmp dword ptr [r13+0], 6 jnz short loc_62B3 mov rdi, [r13+48h] call _strdup test rax, rax jz short loc_62B3 mov r12, rax loc_629D: movzx ecx, byte ptr [rax] cmp ecx, 2Dh ; '-' jz short loc_62AB test ecx, ecx jnz short loc_62AE jmp short loc_62C7 loc_62AB: mov byte ptr [rax], 5Fh ; '_' loc_62AE: inc rax jmp short loc_629D loc_62B3: mov rdi, rbx mov rsi, r13 call codegen_generate_expression test al, al jnz short loc_62DA loc_62C2: xor r13d, r13d jmp short loc_633F loc_62C7: mov rdi, r12 mov rsi, r14 call _fputs mov rdi, r12 call _free loc_62DA: mov edi, 28h ; '(' mov rsi, r14 call _fputc cmp qword ptr [r15+58h], 0 jz short loc_632F xor r13d, r13d lea r12, aCharBuffer64Sn+3Ah; ", " loc_62F8: test r13, r13 jz short loc_6312 mov esi, 2 mov edx, 1 mov rdi, r12 mov rcx, r14 call _fwrite loc_6312: mov rax, [r15+50h] mov rsi, [rax+r13*8] mov rdi, rbx call codegen_generate_expression test al, al jz short loc_62C2 inc r13 cmp r13, [r15+58h] jb short loc_62F8 loc_632F: mov edi, 29h ; ')' mov rsi, r14 call _fputc loc_633C: mov r13b, 1 loc_633F: mov eax, r13d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6351: lea rdi, aTypeContextNul+5; "context != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_12; "_Bool codegen_generate_tail_call(Codege"... mov edx, 19h call ___assert_fail loc_6370: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_12; "_Bool codegen_generate_tail_call(Codege"... mov edx, 1Ah call ___assert_fail loc_638F: lea rdi, aNodeTypeAstCal; "node->type == AST_CALL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_12; "_Bool codegen_generate_tail_call(Codege"... mov edx, 1Bh call ___assert_fail loc_63AE: lea rdi, aNodeIsTailPosi; "node->is_tail_position" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_12; "_Bool codegen_generate_tail_call(Codege"... mov edx, 1Ch call ___assert_fail
long long codegen_generate_tail_call(long long a1, long long a2) { long long output; // r14 unsigned long long binding_system; // r13 long long *diagnostics; // rax long long v5; // r8 long long v6; // r9 long long v7; // r12 long long v8; // r12 unsigned long long v9; // r15 unsigned long long v10; // rax long long v11; // rax long long parent_scope; // rax long long v13; // r8 long long v14; // r9 _BYTE *v15; // rax _BYTE *v16; // r12 long long binding_scope; // [rsp+0h] [rbp-30h] if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c", 25LL, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c", 26LL, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); if ( *(_DWORD *)a2 != 25 ) __assert_fail( "node->type == AST_CALL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c", 27LL, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); if ( !*(_BYTE *)(a2 + 56) ) __assert_fail( "node->is_tail_position", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c", 28LL, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); output = codegen_context_get_output(a1); binding_system = codegen_context_get_binding_system(a1); diagnostics = (long long *)codegen_context_get_diagnostics(a1); v7 = (long long)diagnostics; if ( !binding_system ) { diagnostic_error( diagnostics, *(_DWORD *)(a2 + 8), *(_DWORD *)(a2 + 16), (long long)"Binding system not available", v5, v6); goto LABEL_30; } if ( *(_BYTE *)(a2 + 57) != 1 ) { v11 = *(_QWORD *)(a2 + 72); if ( *(_DWORD *)v11 == 6 ) { if ( *(_QWORD *)(v11 + 40) ) { binding_scope = binding_system_get_binding_scope(binding_system); parent_scope = binding_system_get_parent_scope(binding_system, *(_QWORD *)(binding_system + 232)); if ( parent_scope ) { if ( binding_system_get_parent_scope(binding_system, binding_scope) == parent_scope ) diagnostic_debug( v7, *(_DWORD *)(a2 + 8), *(_DWORD *)(a2 + 16), (long long)"Detected mutual recursive tail call", v13, v14); } } } fwrite("return ", 7LL, 1LL, output); binding_system = *(_QWORD *)(a2 + 72); if ( *(_DWORD *)binding_system == 6 ) { v15 = (_BYTE *)strdup(*(_QWORD *)(binding_system + 72)); if ( v15 ) { v16 = v15; while ( 1 ) { if ( *v15 == 45 ) { *v15 = 95; } else if ( !*v15 ) { fputs(v16, output); free(v16); goto LABEL_31; } ++v15; } } } if ( (unsigned __int8)codegen_generate_expression(a1, (_DWORD *)binding_system) ) { LABEL_31: fputc(40LL, output); if ( !*(_QWORD *)(a2 + 88) ) { LABEL_37: fputc(41LL, output); goto LABEL_38; } binding_system = 0LL; while ( 1 ) { if ( binding_system ) fwrite(", ", 2LL, 1LL, output); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_DWORD **)(*(_QWORD *)(a2 + 80) + 8 * binding_system)) ) break; if ( ++binding_system >= *(_QWORD *)(a2 + 88) ) goto LABEL_37; } } LABEL_30: LODWORD(binding_system) = 0; return (unsigned int)binding_system; } diagnostic_debug( (long long)diagnostics, *(_DWORD *)(a2 + 8), *(_DWORD *)(a2 + 16), (long long)"Generating self-recursive tail call optimization", v5, v6); fwrite("{\n", 2LL, 1LL, output); codegen_context_increment_indent(a1); if ( !*(_QWORD *)(a2 + 88) ) { LABEL_14: codegen_context_write_indent(a1); fwrite("continue;\n", 10LL, 1LL, output); codegen_context_decrement_indent(a1); codegen_context_write_indent(a1); fwrite("}\n", 2LL, 1LL, output); LABEL_38: LOBYTE(binding_system) = 1; return (unsigned int)binding_system; } v8 = 0LL; LODWORD(binding_system) = 0; while ( 1 ) { codegen_context_write_indent(a1); v9 = v8 + 1; fprintf(output, "// Evaluate argument %zu\n", v8 + 1); codegen_context_write_indent(a1); fprintf(output, "auto temp_arg_%zu = ", v8 + 1); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_DWORD **)(*(_QWORD *)(a2 + 80) + 8 * v8)) ) return (unsigned int)binding_system; fwrite(";\n", 2LL, 1LL, output); codegen_context_write_indent(a1); fprintf(output, "if (temp_arg_%zu == NULL) {\n", v8 + 1); codegen_context_increment_indent(a1); codegen_context_write_indent(a1); fprintf( output, "fprintf(stderr, \"Warning: NULL argument %zu in self-recursive call at line %d\\n\", %zu, %d);\n", v9, *(_QWORD *)(a2 + 8), v9, *(_QWORD *)(a2 + 8)); codegen_context_decrement_indent(a1); codegen_context_write_indent(a1); fwrite("}\n", 2LL, 1LL, output); v10 = *(_QWORD *)(a2 + 88); ++v8; if ( v9 >= v10 ) { if ( v10 ) { binding_system = 0LL; do { codegen_context_write_indent(a1); ++binding_system; fprintf(output, "p%zu = temp_arg_%zu;\n", binding_system, binding_system); } while ( binding_system < *(_QWORD *)(a2 + 88) ); } goto LABEL_14; } } }
codegen_generate_tail_call: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00106351 MOV R15,RSI TEST RSI,RSI JZ 0x00106370 CMP dword ptr [R15],0x19 JNZ 0x0010638f CMP byte ptr [R15 + 0x38],0x0 JZ 0x001063ae MOV RBX,RDI CALL 0x00103c55 MOV R14,RAX MOV RDI,RBX CALL 0x00103e52 MOV R13,RAX MOV RDI,RBX CALL 0x00103bfb MOV R12,RAX TEST R13,R13 JZ 0x001061ef CMP byte ptr [R15 + 0x39],0x1 JNZ 0x0010620b MOV ESI,dword ptr [R15 + 0x8] MOV EDX,dword ptr [R15 + 0x10] LEA RCX,[0x110b53] MOV RDI,R12 CALL 0x00102b2f LEA RDI,[0x11042c] MOV ESI,0x2 MOV EDX,0x1 MOV RCX,R14 CALL 0x00101220 MOV RDI,RBX CALL 0x00103d07 CMP qword ptr [R15 + 0x58],0x0 JZ 0x001061a0 XOR R12D,R12D MOV qword ptr [RBP + -0x30],R15 XOR R13D,R13D LAB_0010606e: MOV RDI,RBX CALL 0x00103dc1 LEA R15,[R12 + 0x1] MOV RDI,R14 LEA RSI,[0x112329] MOV RDX,R15 XOR EAX,EAX CALL 0x00101190 MOV RDI,RBX CALL 0x00103dc1 MOV RDI,R14 LEA RSI,[0x110b84] MOV RDX,R15 XOR EAX,EAX CALL 0x00101190 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x50] MOV RSI,qword ptr [RAX + R12*0x8] MOV RDI,RBX CALL 0x001056c0 TEST AL,AL JZ 0x0010633f MOV ESI,0x2 MOV EDX,0x1 LEA RDI,[0x110346] MOV RCX,R14 CALL 0x00101220 MOV RDI,RBX CALL 0x00103dc1 MOV RDI,R14 LEA RSI,[0x110b99] MOV RDX,R15 XOR EAX,EAX CALL 0x00101190 MOV RDI,RBX CALL 0x00103d07 MOV RDI,RBX CALL 0x00103dc1 MOV R12,qword ptr [RBP + -0x30] MOV RCX,qword ptr [R12 + 0x8] MOV RDI,R14 LEA RSI,[0x110bb6] MOV RDX,R15 MOV R8,R15 MOV R9,RCX XOR EAX,EAX CALL 0x00101190 MOV RDI,RBX CALL 0x00103d33 MOV RDI,RBX CALL 0x00103dc1 MOV ESI,0x2 MOV EDX,0x1 LEA RDI,[0x112051] MOV RCX,R14 CALL 0x00101220 MOV RAX,qword ptr [R12 + 0x58] MOV R12,R15 CMP R15,RAX JC 0x0010606e TEST RAX,RAX MOV R15,qword ptr [RBP + -0x30] JZ 0x001061a0 LEA R12,[0x110c13] XOR R13D,R13D LAB_0010617c: MOV RDI,RBX CALL 0x00103dc1 INC R13 MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 MOV RCX,R13 XOR EAX,EAX CALL 0x00101190 CMP R13,qword ptr [R15 + 0x58] JC 0x0010617c LAB_001061a0: MOV RDI,RBX CALL 0x00103dc1 LEA RDI,[0x112394] MOV ESI,0xa MOV EDX,0x1 MOV RCX,R14 CALL 0x00101220 MOV RDI,RBX CALL 0x00103d33 MOV RDI,RBX CALL 0x00103dc1 LEA RDI,[0x112051] MOV ESI,0x2 MOV EDX,0x1 MOV RCX,R14 CALL 0x00101220 JMP 0x0010633c LAB_001061ef: MOV ESI,dword ptr [R15 + 0x8] MOV EDX,dword ptr [R15 + 0x10] LEA RCX,[0x110b36] MOV RDI,R12 CALL 0x001029be JMP 0x001062c2 LAB_0010620b: MOV RAX,qword ptr [R15 + 0x48] CMP dword ptr [RAX],0x6 JNZ 0x00106268 MOV RSI,qword ptr [RAX + 0x28] TEST RSI,RSI JZ 0x00106268 MOV RDI,R13 CALL 0x0010b722 MOV qword ptr [RBP + -0x30],RAX MOV RSI,qword ptr [R13 + 0xe8] MOV RDI,R13 CALL 0x0010b35b TEST RAX,RAX JZ 0x00106268 MOV RDI,R13 MOV RSI,qword ptr [RBP + -0x30] MOV R13,RAX CALL 0x0010b35b CMP RAX,R13 JNZ 0x00106268 MOV ESI,dword ptr [R15 + 0x8] MOV EDX,dword ptr [R15 + 0x10] LEA RCX,[0x110c29] MOV RDI,R12 CALL 0x00102b2f LAB_00106268: LEA RDI,[0x111946] MOV ESI,0x7 MOV EDX,0x1 MOV RCX,R14 CALL 0x00101220 MOV R13,qword ptr [R15 + 0x48] CMP dword ptr [R13],0x6 JNZ 0x001062b3 MOV RDI,qword ptr [R13 + 0x48] CALL 0x00101230 TEST RAX,RAX JZ 0x001062b3 MOV R12,RAX LAB_0010629d: MOVZX ECX,byte ptr [RAX] CMP ECX,0x2d JZ 0x001062ab TEST ECX,ECX JNZ 0x001062ae JMP 0x001062c7 LAB_001062ab: MOV byte ptr [RAX],0x5f LAB_001062ae: INC RAX JMP 0x0010629d LAB_001062b3: MOV RDI,RBX MOV RSI,R13 CALL 0x001056c0 TEST AL,AL JNZ 0x001062da LAB_001062c2: XOR R13D,R13D JMP 0x0010633f LAB_001062c7: MOV RDI,R12 MOV RSI,R14 CALL 0x00101140 MOV RDI,R12 CALL 0x00101030 LAB_001062da: MOV EDI,0x28 MOV RSI,R14 CALL 0x00101170 CMP qword ptr [R15 + 0x58],0x0 JZ 0x0010632f XOR R13D,R13D LEA R12,[0x110e77] LAB_001062f8: TEST R13,R13 JZ 0x00106312 MOV ESI,0x2 MOV EDX,0x1 MOV RDI,R12 MOV RCX,R14 CALL 0x00101220 LAB_00106312: MOV RAX,qword ptr [R15 + 0x50] MOV RSI,qword ptr [RAX + R13*0x8] MOV RDI,RBX CALL 0x001056c0 TEST AL,AL JZ 0x001062c2 INC R13 CMP R13,qword ptr [R15 + 0x58] JC 0x001062f8 LAB_0010632f: MOV EDI,0x29 MOV RSI,R14 CALL 0x00101170 LAB_0010633c: MOV R13B,0x1 LAB_0010633f: MOV EAX,R13D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00106351: LEA RDI,[0x10e099] LEA RSI,[0x110a80] LEA RCX,[0x110ac4] MOV EDX,0x19 CALL 0x00101130 LAB_00106370: LEA RDI,[0x10ee0c] LEA RSI,[0x110a80] LEA RCX,[0x110ac4] MOV EDX,0x1a CALL 0x00101130 LAB_0010638f: LEA RDI,[0x110b08] LEA RSI,[0x110a80] LEA RCX,[0x110ac4] MOV EDX,0x1b CALL 0x00101130 LAB_001063ae: LEA RDI,[0x110b1f] LEA RSI,[0x110a80] LEA RCX,[0x110ac4] MOV EDX,0x1c CALL 0x00101130
ulong codegen_generate_tail_call(long param_1,int *param_2) { ulong uVar1; char cVar2; FILE *__s; int *piVar3; int8 uVar4; int8 uVar5; long lVar6; long lVar7; char *__s_00; char *pcVar8; ulong uVar9; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c",0x19, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c",0x1a, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); } if (*param_2 != 0x19) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_CALL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c",0x1b, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); } if ((char)param_2[0xe] == '\0') { /* WARNING: Subroutine does not return */ __assert_fail("node->is_tail_position", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/calls.c",0x1c, "_Bool codegen_generate_tail_call(CodegenContext *, const AstNode *)"); } __s = (FILE *)codegen_context_get_output(); piVar3 = (int *)codegen_context_get_binding_system(param_1); uVar4 = codegen_context_get_diagnostics(param_1); if (piVar3 == (int *)0x0) { diagnostic_error(uVar4,param_2[2],param_2[4],"Binding system not available"); } else { if (*(char *)((long)param_2 + 0x39) == '\x01') { diagnostic_debug(uVar4,param_2[2],param_2[4], "Generating self-recursive tail call optimization"); fwrite("{\n",2,1,__s); codegen_context_increment_indent(param_1); if (*(long *)(param_2 + 0x16) != 0) { piVar3 = (int *)0x0; uVar9 = 0; do { codegen_context_write_indent(param_1); uVar1 = uVar9 + 1; fprintf(__s,"// Evaluate argument %zu\n",uVar1); codegen_context_write_indent(param_1); fprintf(__s,"auto temp_arg_%zu = ",uVar1); cVar2 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(param_2 + 0x14) + uVar9 * 8)); if (cVar2 == '\0') goto LAB_0010633f; fwrite(";\n",2,1,__s); codegen_context_write_indent(param_1); fprintf(__s,"if (temp_arg_%zu == NULL) {\n",uVar1); codegen_context_increment_indent(param_1); codegen_context_write_indent(param_1); fprintf(__s, "fprintf(stderr, \"Warning: NULL argument %zu in self-recursive call at line %d\\n\", %zu, %d);\n" ,uVar1,*(int8 *)(param_2 + 2),uVar1,*(int8 *)(param_2 + 2)); codegen_context_decrement_indent(param_1); codegen_context_write_indent(param_1); fwrite(&DAT_00112051,2,1,__s); uVar9 = uVar1; } while (uVar1 < *(ulong *)(param_2 + 0x16)); if (*(ulong *)(param_2 + 0x16) != 0) { piVar3 = (int *)0x0; do { codegen_context_write_indent(param_1); piVar3 = (int *)((long)piVar3 + 1); fprintf(__s,"p%zu = temp_arg_%zu;\n",piVar3,piVar3); } while (piVar3 < *(int **)(param_2 + 0x16)); } } codegen_context_write_indent(param_1); fwrite("continue;\n",10,1,__s); codegen_context_decrement_indent(param_1); codegen_context_write_indent(param_1); fwrite(&DAT_00112051,2,1,__s); goto LAB_0010633c; } if ((**(int **)(param_2 + 0x12) == 6) && (*(long *)(*(int **)(param_2 + 0x12) + 10) != 0)) { uVar5 = binding_system_get_binding_scope(piVar3); lVar6 = binding_system_get_parent_scope(piVar3,*(int8 *)(piVar3 + 0x3a)); if ((lVar6 != 0) && (lVar7 = binding_system_get_parent_scope(piVar3,uVar5), lVar7 == lVar6)) { diagnostic_debug(uVar4,param_2[2],param_2[4],"Detected mutual recursive tail call"); } } fwrite("return ",7,1,__s); piVar3 = *(int **)(param_2 + 0x12); if ((*piVar3 == 6) && (__s_00 = strdup(*(char **)(piVar3 + 0x12)), pcVar8 = __s_00, __s_00 != (char *)0x0)) { do { if (*pcVar8 == '-') { *pcVar8 = '_'; } else if (*pcVar8 == '\0') goto LAB_001062c7; pcVar8 = pcVar8 + 1; } while( true ); } cVar2 = codegen_generate_expression(param_1,piVar3); if (cVar2 != '\0') goto LAB_001062da; } LAB_001062c2: piVar3 = (int *)0x0; LAB_0010633f: return (ulong)piVar3 & 0xffffffff; LAB_001062c7: fputs(__s_00,__s); free(__s_00); LAB_001062da: fputc(0x28,__s); if (*(long *)(param_2 + 0x16) != 0) { piVar3 = (int *)0x0; do { if (piVar3 != (int *)0x0) { fwrite(", ",2,1,__s); } cVar2 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(param_2 + 0x14) + (long)piVar3 * 8)); if (cVar2 == '\0') goto LAB_001062c2; piVar3 = (int *)((long)piVar3 + 1); } while (piVar3 < *(int **)(param_2 + 0x16)); } fputc(0x29,__s); LAB_0010633c: piVar3 = (int *)CONCAT71((int7)((ulong)piVar3 >> 8),1); goto LAB_0010633f; }
11,042
string_buffer_putc_slow
bluesky950520[P]quickjs/quickjs.c
static no_inline int string_buffer_putc_slow(StringBuffer *s, uint32_t c) { if (unlikely(s->len >= s->size)) { if (string_buffer_realloc(s, s->len + 1, c)) return -1; } if (s->is_wide_char) { s->str->u.str16[s->len++] = c; } else if (c < 0x100) { s->str->u.str8[s->len++] = c; } else { if (string_buffer_widen(s, s->size)) return -1; s->str->u.str16[s->len++] = c; } return 0; }
O2
c
string_buffer_putc_slow: pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebx movq %rdi, %r14 movl 0x10(%rdi), %esi pushq $-0x1 popq %rbp cmpl 0x14(%rdi), %esi jge 0x41947 cmpl $0x0, 0x18(%r14) je 0x41911 movq 0x8(%r14), %rax movslq 0x10(%r14), %rcx leal 0x1(%rcx), %edx movl %edx, 0x10(%r14) movw %bx, 0x18(%rax,%rcx,2) jmp 0x4192c cmpl $0xff, %ebx ja 0x41935 movq 0x8(%r14), %rax movslq 0x10(%r14), %rcx leal 0x1(%rcx), %edx movl %edx, 0x10(%r14) movb %bl, 0x18(%rax,%rcx) xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq movl 0x14(%r14), %esi movq %r14, %rdi callq 0x3db3a testl %eax, %eax jne 0x4192e jmp 0x418fb incl %esi movq %r14, %rdi movl %ebx, %edx callq 0x3da4d testl %eax, %eax jne 0x4192e jmp 0x418f4
string_buffer_putc_slow: push rbp push r14 push rbx mov ebx, esi mov r14, rdi mov esi, [rdi+10h] push 0FFFFFFFFFFFFFFFFh pop rbp cmp esi, [rdi+14h] jge short loc_41947 loc_418F4: cmp dword ptr [r14+18h], 0 jz short loc_41911 loc_418FB: mov rax, [r14+8] movsxd rcx, dword ptr [r14+10h] lea edx, [rcx+1] mov [r14+10h], edx mov [rax+rcx*2+18h], bx jmp short loc_4192C loc_41911: cmp ebx, 0FFh ja short loc_41935 mov rax, [r14+8] movsxd rcx, dword ptr [r14+10h] lea edx, [rcx+1] mov [r14+10h], edx mov [rax+rcx+18h], bl loc_4192C: xor ebp, ebp loc_4192E: mov eax, ebp pop rbx pop r14 pop rbp retn loc_41935: mov esi, [r14+14h] mov rdi, r14 call string_buffer_widen test eax, eax jnz short loc_4192E jmp short loc_418FB loc_41947: inc esi mov rdi, r14 mov edx, ebx call string_buffer_realloc test eax, eax jnz short loc_4192E jmp short loc_418F4
long long string_buffer_putc_slow( long long a1, unsigned int a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, long long a14) { int v15; // esi unsigned int v16; // ebp long long v17; // rax long long v18; // rcx long long v19; // rax long long v20; // rcx v15 = *(_DWORD *)(a1 + 16); v16 = -1; if ( v15 < *(_DWORD *)(a1 + 20) || !(unsigned int)string_buffer_realloc(a1, v15 + 1, a2, a12, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10) ) { if ( !*(_DWORD *)(a1 + 24) ) { if ( a2 <= 0xFF ) { v19 = *(_QWORD *)(a1 + 8); v20 = *(int *)(a1 + 16); *(_DWORD *)(a1 + 16) = v20 + 1; *(_BYTE *)(v19 + v20 + 24) = a2; return 0; } if ( (unsigned int)string_buffer_widen(a1, *(_DWORD *)(a1 + 20)) ) return v16; } v17 = *(_QWORD *)(a1 + 8); v18 = *(int *)(a1 + 16); *(_DWORD *)(a1 + 16) = v18 + 1; *(_WORD *)(v17 + 2 * v18 + 24) = a2; return 0; } return v16; }
string_buffer_putc_slow: PUSH RBP PUSH R14 PUSH RBX MOV EBX,ESI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x10] PUSH -0x1 POP RBP CMP ESI,dword ptr [RDI + 0x14] JGE 0x00141947 LAB_001418f4: CMP dword ptr [R14 + 0x18],0x0 JZ 0x00141911 LAB_001418fb: MOV RAX,qword ptr [R14 + 0x8] MOVSXD RCX,dword ptr [R14 + 0x10] LEA EDX,[RCX + 0x1] MOV dword ptr [R14 + 0x10],EDX MOV word ptr [RAX + RCX*0x2 + 0x18],BX JMP 0x0014192c LAB_00141911: CMP EBX,0xff JA 0x00141935 MOV RAX,qword ptr [R14 + 0x8] MOVSXD RCX,dword ptr [R14 + 0x10] LEA EDX,[RCX + 0x1] MOV dword ptr [R14 + 0x10],EDX MOV byte ptr [RAX + RCX*0x1 + 0x18],BL LAB_0014192c: XOR EBP,EBP LAB_0014192e: MOV EAX,EBP POP RBX POP R14 POP RBP RET LAB_00141935: MOV ESI,dword ptr [R14 + 0x14] MOV RDI,R14 CALL 0x0013db3a TEST EAX,EAX JNZ 0x0014192e JMP 0x001418fb LAB_00141947: INC ESI MOV RDI,R14 MOV EDX,EBX CALL 0x0013da4d TEST EAX,EAX JNZ 0x0014192e JMP 0x001418f4
int4 string_buffer_putc_slow(long param_1,uint param_2) { int iVar1; if ((*(int *)(param_1 + 0x14) <= *(int *)(param_1 + 0x10)) && (iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 != 0)) { return 0xffffffff; } if (*(int *)(param_1 + 0x18) == 0) { if (param_2 < 0x100) { iVar1 = *(int *)(param_1 + 0x10); *(int *)(param_1 + 0x10) = iVar1 + 1; *(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2; return 0; } iVar1 = string_buffer_widen(param_1,*(int4 *)(param_1 + 0x14)); if (iVar1 != 0) { return 0xffffffff; } } iVar1 = *(int *)(param_1 + 0x10); *(int *)(param_1 + 0x10) = iVar1 + 1; *(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2; return 0; }
11,043
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)
monkey531[P]llama/common/json.hpp
basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
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>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<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&): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x751f8 movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x5099a movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x5099a movq %r14, %rdi xorl %esi, %esi callq 0x5099a movq %r14, %rdi callq 0x5d0d4 addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: push r14 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rsp+28h+var_20] mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void) movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx], xmm0 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 byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 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() add rsp, 18h pop rbx pop r14 retn
char * ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_( char *a1, long long a2) { char *result; // rax _OWORD v3[2]; // [rsp+8h] [rbp-20h] BYREF result = nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied( (char *)v3, a2); *(_OWORD *)a1 = v3[0]; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3); LOBYTE(v3[0]) = 0; *((_QWORD *)&v3[0] + 1) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); 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 *)v3); 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((void ***)v3); return result; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001751f8 MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x0015099a MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x0015099a MOV RDI,R14 XOR ESI,ESI CALL 0x0015099a MOV RDI,R14 CALL 0x0015d0d4 ADD RSP,0x18 POP RBX POP R14 RET
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_ (int8 *param_1) { bool bVar1; data local_20; int7 uStack_1f; int8 uStack_18; nlohmann::json_abi_v3_11_3::detail:: json_ref<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>> ::moved_or_copied(); *param_1 = CONCAT71(uStack_1f,local_20); param_1[1] = uStack_18; bVar1 = SUB81(&local_20,0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); local_20 = (data)0x0; uStack_18 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar1); 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_20); return; }
11,044
run_plugin_auth
eloqsql/libmariadb/plugins/auth/my_auth.c
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len, const char *data_plugin, const char *db) { const char *auth_plugin_name= NULL; auth_plugin_t *auth_plugin; MCPVIO_EXT mpvio; ulong pkt_length; int res; /* determine the default/initial plugin to use */ if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH) { if (mysql->options.extension && mysql->options.extension->default_auth) auth_plugin_name= mysql->options.extension->default_auth; else if (data_plugin) auth_plugin_name= data_plugin; } if (!auth_plugin_name) { if (mysql->server_capabilities & CLIENT_PROTOCOL_41) auth_plugin_name= native_password_plugin_name; else auth_plugin_name= "mysql_old_password"; } if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; mysql->net.last_errno= 0; /* just in case */ if (data_plugin && strcmp(data_plugin, auth_plugin_name)) { /* data was prepared for a different plugin, so we don't send any data */ data= 0; data_len= 0; } mpvio.mysql_change_user= data_plugin == 0; mpvio.cached_server_reply.pkt= (uchar*)data; mpvio.cached_server_reply.pkt_len= data_len; mpvio.read_packet= client_mpvio_read_packet; mpvio.write_packet= client_mpvio_write_packet; mpvio.info= client_mpvio_info; mpvio.mysql= mysql; mpvio.packets_read= mpvio.packets_written= 0; mpvio.db= db; retry: mpvio.plugin= auth_plugin; if (auth_plugin_name && mysql->options.extension && mysql->options.extension->restricted_auth) { if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name)) { my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin); return 1; } } mysql->net.read_pos[0]= 0; res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql); if ((res == CR_ERROR && !mysql->net.buff) || (res > CR_OK && mysql->net.read_pos[0] != 254)) { /* the plugin returned an error. write it down in mysql, unless the error code is CR_ERROR and mysql->net.last_errno is already set (the plugin has done it) */ if (res > CR_ERROR) my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0); else if (!mysql->net.last_errno) { my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); } return 1; } /* read the OK packet (or use the cached value in mysql->net.read_pos */ if (res == CR_OK) pkt_length= ma_net_safe_read(mysql); else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */ pkt_length= mpvio.last_read_packet_len; if (pkt_length == packet_error) { if (mysql->net.last_errno == CR_SERVER_LOST) my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN, ER(CR_SERVER_LOST_EXTENDED), "reading authorization packet", errno); return 1; } if (mysql->net.read_pos[0] == 254) { /* The server asked to use a different authentication plugin */ if (pkt_length == 1) { /* old "use short scramble" packet */ auth_plugin_name= old_password_plugin_name; mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff; mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1; } else { /* new "use different plugin" packet */ uint len; auth_plugin_name= (char*)mysql->net.read_pos + 1; len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */ mpvio.cached_server_reply.pkt_len= pkt_length - len - 2; mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2; } if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; goto retry; } /* net->read_pos[0] should always be 0 here if the server implements the protocol correctly */ if (mysql->net.read_pos[0] == 0) return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length); return 1; }
O0
c
run_plugin_auth: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x370(%rax), %rax andq $0x80000, %rax # imm = 0x80000 cmpq $0x0, %rax je 0x9a615 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x9a602 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x8(%rax) je 0x9a602 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x9a613 cmpq $0x0, -0x28(%rbp) je 0x9a611 movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x9a613 jmp 0x9a615 cmpq $0x0, -0x38(%rbp) jne 0x9a64d movq -0x10(%rbp), %rax movq 0x370(%rax), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax je 0x9a640 leaq 0x7af65(%rip), %rax # 0x11559f movq %rax, -0x38(%rbp) jmp 0x9a64b leaq 0x7af45(%rip), %rax # 0x11558c movq %rax, -0x38(%rbp) jmp 0x9a64d movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x2, %edx callq 0x90f20 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x9a674 leaq 0x1f24a8(%rip), %rax # 0x28cb18 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movl $0x0, 0x90(%rax) cmpq $0x0, -0x28(%rbp) je 0x9a6aa movq -0x28(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x3b990 cmpl $0x0, %eax je 0x9a6aa movq $0x0, -0x18(%rbp) movl $0x0, -0x1c(%rbp) cmpq $0x0, -0x28(%rbp) sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x48(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x58(%rbp) leaq 0x331(%rip), %rax # 0x9aa00 movq %rax, -0x90(%rbp) leaq 0x463(%rip), %rax # 0x9ab40 movq %rax, -0x88(%rbp) leaq 0x5a5(%rip), %rax # 0x9ac90 movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) movl $0x0, -0x4c(%rbp) movl $0x0, -0x50(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x70(%rbp) cmpq $0x0, -0x38(%rbp) je 0x9a790 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x9a790 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x150(%rax) je 0x9a790 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x150(%rax), %rdi movq -0x38(%rbp), %rsi callq 0x3b540 cmpq $0x0, %rax jne 0x9a78e movq -0x10(%rbp), %rdi leaq 0x1f1385(%rip), %rax # 0x28baf0 movq (%rax), %rdx movq -0x28(%rbp), %r8 movl $0x1392, %esi # imm = 0x1392 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x70ce0 movl $0x1, -0x4(%rbp) jmp 0x9a9ee jmp 0x9a790 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movb $0x0, (%rax) movq -0x40(%rbp), %rax movq 0x58(%rax), %rax movq -0x10(%rbp), %rsi leaq -0x90(%rbp), %rdi callq *%rax movl %eax, -0x9c(%rbp) cmpl $0x0, -0x9c(%rbp) jne 0x9a7ca movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x9a7e5 cmpl $-0x1, -0x9c(%rbp) jle 0x9a848 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax je 0x9a848 cmpl $0x0, -0x9c(%rbp) jle 0x9a80f movq -0x10(%rbp), %rdi movl -0x9c(%rbp), %esi leaq 0x1f12f1(%rip), %rax # 0x28baf0 movq (%rax), %rdx xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x70ce0 jmp 0x9a83c movq -0x10(%rbp), %rax cmpl $0x0, 0x90(%rax) jne 0x9a83a movq -0x10(%rbp), %rdi leaq 0x1f12c9(%rip), %rax # 0x28baf0 movq (%rax), %rdx movl $0x7d0, %esi # imm = 0x7D0 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x70ce0 jmp 0x9a83c movl $0x1, -0x4(%rbp) jmp 0x9a9ee cmpl $-0x1, -0x9c(%rbp) jne 0x9a863 movq -0x10(%rbp), %rdi callq 0x709d0 movq %rax, -0x98(%rbp) jmp 0x9a86e movslq -0x44(%rbp), %rax movq %rax, -0x98(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x98(%rbp) jne 0x9a8f9 movq -0x10(%rbp), %rax cmpl $0x7dd, 0x90(%rax) # imm = 0x7DD jne 0x9a8ed movq -0x10(%rbp), %rax movq %rax, -0xb8(%rbp) leaq 0x1f1252(%rip), %rax # 0x28baf0 movq (%rax), %rax movq %rax, -0xb0(%rbp) leaq 0x1f1251(%rip), %rax # 0x28bb00 movq 0x1b8(%rax), %rax movq %rax, -0xa8(%rbp) callq 0x3bb30 movq -0xb8(%rbp), %rdi movq -0xb0(%rbp), %rdx movq -0xa8(%rbp), %rcx movl (%rax), %r9d movl $0x7dd, %esi # imm = 0x7DD leaq 0x7b1be(%rip), %r8 # 0x115aa4 movb $0x0, %al callq 0x70ce0 movl $0x1, -0x4(%rbp) jmp 0x9a9ee movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jne 0x9a9b6 cmpq $0x1, -0x98(%rbp) jne 0x9a93b leaq 0x7ac6c(%rip), %rax # 0x11558c movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq $0x48e, %rax # imm = 0x48E movq %rax, -0x60(%rbp) movl $0x15, -0x58(%rbp) jmp 0x9a98a movq -0x10(%rbp), %rax movq 0x20(%rax), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi callq 0x3b4b0 movl %eax, -0xa0(%rbp) movq -0x98(%rbp), %rax movl -0xa0(%rbp), %ecx subq %rcx, %rax subq $0x2, %rax movl %eax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movl -0xa0(%rbp), %ecx addq %rcx, %rax addq $0x2, %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x2, %edx callq 0x90f20 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x9a9b1 leaq 0x1f216b(%rip), %rax # 0x28cb18 movq %rax, -0x40(%rbp) jmp 0x9a70d movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0x0, %eax jne 0x9a9e7 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rsi addq $0x1, %rsi movq -0x98(%rbp), %rdx callq 0x79400 movl %eax, -0x4(%rbp) jmp 0x9a9ee movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xc0, %rsp popq %rbp retq nopw (%rax,%rax)
run_plugin_auth: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], 0 mov rax, [rbp+var_10] mov rax, [rax+370h] and rax, 80000h cmp rax, 0 jz short loc_9A615 mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_9A602 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+8], 0 jz short loc_9A602 mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+8] mov [rbp+var_38], rax jmp short loc_9A613 loc_9A602: cmp [rbp+var_28], 0 jz short loc_9A611 mov rax, [rbp+var_28] mov [rbp+var_38], rax loc_9A611: jmp short $+2 loc_9A613: jmp short $+2 loc_9A615: cmp [rbp+var_38], 0 jnz short loc_9A64D mov rax, [rbp+var_10] mov rax, [rax+370h] and rax, 200h cmp rax, 0 jz short loc_9A640 lea rax, aMysqlNativePas; "mysql_native_password" mov [rbp+var_38], rax jmp short loc_9A64B loc_9A640: lea rax, aMysqlOldPasswo; "mysql_old_password" mov [rbp+var_38], rax loc_9A64B: jmp short $+2 loc_9A64D: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 2 call mysql_client_find_plugin mov [rbp+var_40], rax cmp rax, 0 jnz short loc_9A674 lea rax, dummy_fallback_client_plugin mov [rbp+var_40], rax loc_9A674: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 0 cmp [rbp+var_28], 0 jz short loc_9A6AA mov rdi, [rbp+var_28] mov rsi, [rbp+var_38] call _strcmp cmp eax, 0 jz short loc_9A6AA mov [rbp+var_18], 0 mov [rbp+var_1C], 0 loc_9A6AA: cmp [rbp+var_28], 0 setz al and al, 1 movzx eax, al mov [rbp+var_48], al mov rax, [rbp+var_18] mov [rbp+var_60], rax mov eax, [rbp+var_1C] mov [rbp+var_58], eax lea rax, client_mpvio_read_packet mov [rbp+var_90], rax lea rax, client_mpvio_write_packet mov [rbp+var_88], rax lea rax, client_mpvio_info mov [rbp+var_80], rax mov rax, [rbp+var_10] mov [rbp+var_78], rax mov [rbp+var_4C], 0 mov [rbp+var_50], 0 mov rax, [rbp+var_30] mov [rbp+var_68], rax loc_9A70D: mov rax, [rbp+var_40] mov [rbp+var_70], rax cmp [rbp+var_38], 0 jz short loc_9A790 mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_9A790 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+150h], 0 jz short loc_9A790 mov rax, [rbp+var_10] mov rax, [rax+480h] mov rdi, [rax+150h] mov rsi, [rbp+var_38] call _strstr cmp rax, 0 jnz short loc_9A78E mov rdi, [rbp+var_10] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov r8, [rbp+var_28] mov esi, 1392h xor eax, eax mov ecx, eax mov al, 0 call my_set_error mov [rbp+var_4], 1 jmp loc_9A9EE loc_9A78E: jmp short $+2 loc_9A790: mov rax, [rbp+var_10] mov rax, [rax+20h] mov byte ptr [rax], 0 mov rax, [rbp+var_40] mov rax, [rax+58h] mov rsi, [rbp+var_10] lea rdi, [rbp+var_90] call rax mov [rbp+var_9C], eax cmp [rbp+var_9C], 0 jnz short loc_9A7CA mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_9A7E5 loc_9A7CA: cmp [rbp+var_9C], 0FFFFFFFFh jle short loc_9A848 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0FEh jz short loc_9A848 loc_9A7E5: cmp [rbp+var_9C], 0 jle short loc_9A80F mov rdi, [rbp+var_10] mov esi, [rbp+var_9C] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] xor eax, eax mov ecx, eax mov al, 0 call my_set_error jmp short loc_9A83C loc_9A80F: mov rax, [rbp+var_10] cmp dword ptr [rax+90h], 0 jnz short loc_9A83A mov rdi, [rbp+var_10] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D0h xor eax, eax mov ecx, eax mov al, 0 call my_set_error loc_9A83A: jmp short $+2 loc_9A83C: mov [rbp+var_4], 1 jmp loc_9A9EE loc_9A848: cmp [rbp+var_9C], 0FFFFFFFFh jnz short loc_9A863 mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_98], rax jmp short loc_9A86E loc_9A863: movsxd rax, [rbp+var_44] mov [rbp+var_98], rax loc_9A86E: mov eax, 0FFFFFFFFh cmp [rbp+var_98], rax jnz short loc_9A8F9 mov rax, [rbp+var_10] cmp dword ptr [rax+90h], 7DDh jnz short loc_9A8ED mov rax, [rbp+var_10] mov [rbp+var_B8], rax lea rax, SQLSTATE_UNKNOWN mov rax, [rax] mov [rbp+var_B0], rax lea rax, client_errors mov rax, [rax+1B8h] mov [rbp+var_A8], rax call ___errno_location mov rdi, [rbp+var_B8] mov rdx, [rbp+var_B0] mov rcx, [rbp+var_A8] mov r9d, [rax] mov esi, 7DDh lea r8, aReadingAuthori; "reading authorization packet" mov al, 0 call my_set_error loc_9A8ED: mov [rbp+var_4], 1 jmp loc_9A9EE loc_9A8F9: mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0FEh jnz loc_9A9B6 cmp [rbp+var_98], 1 jnz short loc_9A93B lea rax, aMysqlOldPasswo; "mysql_old_password" mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, 48Eh mov [rbp+var_60], rax mov [rbp+var_58], 15h jmp short loc_9A98A loc_9A93B: mov rax, [rbp+var_10] mov rax, [rax+20h] add rax, 1 mov [rbp+var_38], rax mov rdi, [rbp+var_38] call _strlen mov [rbp+var_A0], eax mov rax, [rbp+var_98] mov ecx, [rbp+var_A0] sub rax, rcx sub rax, 2 mov [rbp+var_58], eax mov rax, [rbp+var_10] mov rax, [rax+20h] mov ecx, [rbp+var_A0] add rax, rcx add rax, 2 mov [rbp+var_60], rax loc_9A98A: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 2 call mysql_client_find_plugin mov [rbp+var_40], rax cmp rax, 0 jnz short loc_9A9B1 lea rax, dummy_fallback_client_plugin mov [rbp+var_40], rax loc_9A9B1: jmp loc_9A70D loc_9A9B6: mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0 jnz short loc_9A9E7 mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax+20h] add rsi, 1 mov rdx, [rbp+var_98] call ma_read_ok_packet mov [rbp+var_4], eax jmp short loc_9A9EE loc_9A9E7: mov [rbp+var_4], 1 loc_9A9EE: mov eax, [rbp+var_4] add rsp, 0C0h pop rbp retn
long long run_plugin_auth(long long a1, long long a2, int a3, const char *a4, long long a5) { long long v5; // rsi long long v6; // rdx long long v7; // rcx int v8; // r8d int v9; // r9d unsigned int *v10; // rax long long v12; // [rsp+8h] [rbp-B8h] char *v13; // [rsp+10h] [rbp-B0h] char *v14; // [rsp+18h] [rbp-A8h] unsigned int v15; // [rsp+20h] [rbp-A0h] signed int v16; // [rsp+24h] [rbp-9Ch] long long v17; // [rsp+28h] [rbp-98h] _QWORD v18[6]; // [rsp+30h] [rbp-90h] BYREF long long v19; // [rsp+60h] [rbp-60h] int v20; // [rsp+68h] [rbp-58h] int v21; // [rsp+70h] [rbp-50h] int v22; // [rsp+74h] [rbp-4Ch] bool v23; // [rsp+78h] [rbp-48h] int v24; // [rsp+7Ch] [rbp-44h] void (**plugin)(void); // [rsp+80h] [rbp-40h] const char *v26; // [rsp+88h] [rbp-38h] long long v27; // [rsp+90h] [rbp-30h] const char *v28; // [rsp+98h] [rbp-28h] int v29; // [rsp+A4h] [rbp-1Ch] long long v30; // [rsp+A8h] [rbp-18h] long long v31; // [rsp+B0h] [rbp-10h] v31 = a1; v30 = a2; v29 = a3; v28 = a4; v27 = a5; v26 = 0LL; if ( (*(_QWORD *)(a1 + 880) & 0x80000LL) != 0 ) { if ( *(_QWORD *)(v31 + 1152) && *(_QWORD *)(*(_QWORD *)(v31 + 1152) + 8LL) ) { v26 = *(const char **)(*(_QWORD *)(v31 + 1152) + 8LL); } else if ( v28 ) { v26 = v28; } } if ( !v26 ) { if ( (*(_QWORD *)(v31 + 880) & 0x200LL) != 0 ) v26 = "mysql_native_password"; else v26 = "mysql_old_password"; } plugin = mysql_client_find_plugin(v31, v26, 2u); if ( !plugin ) plugin = (void (**)(void))&dummy_fallback_client_plugin; *(_DWORD *)(v31 + 144) = 0; if ( v28 && (unsigned int)strcmp(v28, v26) ) { v30 = 0LL; v29 = 0; } v23 = v28 == 0LL; v19 = v30; v20 = v29; v18[0] = client_mpvio_read_packet; v18[1] = client_mpvio_write_packet; v18[2] = client_mpvio_info; v18[3] = v31; v22 = 0; v21 = 0; v18[5] = v27; while ( 1 ) { v18[4] = plugin; if ( v26 && *(_QWORD *)(v31 + 1152) && *(_QWORD *)(*(_QWORD *)(v31 + 1152) + 336LL) && !strstr(*(_QWORD *)(*(_QWORD *)(v31 + 1152) + 336LL), v26) ) { my_set_error(v31, 0x1392u, (long long)SQLSTATE_UNKNOWN, 0LL, v28); return 1; } **(_BYTE **)(v31 + 32) = 0; v5 = v31; v16 = ((long long ( *)(_QWORD *, long long))plugin[11])(v18, v31); if ( !v16 && !*(_QWORD *)(v31 + 8) || v16 > -1 && **(unsigned __int8 **)(v31 + 32) != 254 ) { if ( v16 <= 0 ) { if ( !*(_DWORD *)(v31 + 144) ) my_set_error(v31, 0x7D0u, (long long)SQLSTATE_UNKNOWN, 0LL); } else { my_set_error(v31, v16, (long long)SQLSTATE_UNKNOWN, 0LL); } return 1; } v17 = v16 == -1 ? ma_net_safe_read(v31, v5, v6, v7, v8, v9) : v24; if ( v17 == 0xFFFFFFFFLL ) break; if ( **(unsigned __int8 **)(v31 + 32) != 254 ) { if ( **(_BYTE **)(v31 + 32) ) return 1; else return (unsigned int)ma_read_ok_packet(v31, (unsigned __int8 *)(*(_QWORD *)(v31 + 32) + 1LL), v17); } if ( v17 == 1 ) { v26 = "mysql_old_password"; v19 = v31 + 1166; v20 = 21; } else { v26 = (const char *)(*(_QWORD *)(v31 + 32) + 1LL); v15 = strlen(v26); v20 = v17 - v15 - 2; v19 = v15 + *(_QWORD *)(v31 + 32) + 2LL; } plugin = mysql_client_find_plugin(v31, v26, 2u); if ( !plugin ) plugin = (void (**)(void))&dummy_fallback_client_plugin; } if ( *(_DWORD *)(v31 + 144) == 2013 ) { v12 = v31; v13 = SQLSTATE_UNKNOWN; v14 = client_errors[55]; v10 = (unsigned int *)__errno_location(); my_set_error(v12, 0x7DDu, (long long)v13, (long long)v14, "reading authorization packet", *v10); } return 1; }
run_plugin_auth: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x370] AND RAX,0x80000 CMP RAX,0x0 JZ 0x0019a615 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0019a602 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0019a602 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX JMP 0x0019a613 LAB_0019a602: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0019a611 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX LAB_0019a611: JMP 0x0019a613 LAB_0019a613: JMP 0x0019a615 LAB_0019a615: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0019a64d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x370] AND RAX,0x200 CMP RAX,0x0 JZ 0x0019a640 LEA RAX,[0x21559f] MOV qword ptr [RBP + -0x38],RAX JMP 0x0019a64b LAB_0019a640: LEA RAX,[0x21558c] MOV qword ptr [RBP + -0x38],RAX LAB_0019a64b: JMP 0x0019a64d LAB_0019a64d: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x2 CALL 0x00190f20 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x0019a674 LEA RAX,[0x38cb18] MOV qword ptr [RBP + -0x40],RAX LAB_0019a674: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x0 CMP qword ptr [RBP + -0x28],0x0 JZ 0x0019a6aa MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0013b990 CMP EAX,0x0 JZ 0x0019a6aa MOV qword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x1c],0x0 LAB_0019a6aa: CMP qword ptr [RBP + -0x28],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x48],AL MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x58],EAX LEA RAX,[0x19aa00] MOV qword ptr [RBP + -0x90],RAX LEA RAX,[0x19ab40] MOV qword ptr [RBP + -0x88],RAX LEA RAX,[0x19ac90] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0x4c],0x0 MOV dword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x68],RAX LAB_0019a70d: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x70],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x0019a790 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0019a790 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x150],0x0 JZ 0x0019a790 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RDI,qword ptr [RAX + 0x150] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0013b540 CMP RAX,0x0 JNZ 0x0019a78e MOV RDI,qword ptr [RBP + -0x10] LEA RAX,[0x38baf0] MOV RDX,qword ptr [RAX] MOV R8,qword ptr [RBP + -0x28] MOV ESI,0x1392 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x00170ce0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019a9ee LAB_0019a78e: JMP 0x0019a790 LAB_0019a790: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x58] MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x90] CALL RAX MOV dword ptr [RBP + -0x9c],EAX CMP dword ptr [RBP + -0x9c],0x0 JNZ 0x0019a7ca MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0019a7e5 LAB_0019a7ca: CMP dword ptr [RBP + -0x9c],-0x1 JLE 0x0019a848 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JZ 0x0019a848 LAB_0019a7e5: CMP dword ptr [RBP + -0x9c],0x0 JLE 0x0019a80f MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x9c] LEA RAX,[0x38baf0] MOV RDX,qword ptr [RAX] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x00170ce0 JMP 0x0019a83c LAB_0019a80f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x90],0x0 JNZ 0x0019a83a MOV RDI,qword ptr [RBP + -0x10] LEA RAX,[0x38baf0] MOV RDX,qword ptr [RAX] MOV ESI,0x7d0 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x00170ce0 LAB_0019a83a: JMP 0x0019a83c LAB_0019a83c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019a9ee LAB_0019a848: CMP dword ptr [RBP + -0x9c],-0x1 JNZ 0x0019a863 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001709d0 MOV qword ptr [RBP + -0x98],RAX JMP 0x0019a86e LAB_0019a863: MOVSXD RAX,dword ptr [RBP + -0x44] MOV qword ptr [RBP + -0x98],RAX LAB_0019a86e: MOV EAX,0xffffffff CMP qword ptr [RBP + -0x98],RAX JNZ 0x0019a8f9 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x90],0x7dd JNZ 0x0019a8ed MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xb8],RAX LEA RAX,[0x38baf0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xb0],RAX LEA RAX,[0x38bb00] MOV RAX,qword ptr [RAX + 0x1b8] MOV qword ptr [RBP + -0xa8],RAX CALL 0x0013bb30 MOV RDI,qword ptr [RBP + -0xb8] MOV RDX,qword ptr [RBP + -0xb0] MOV RCX,qword ptr [RBP + -0xa8] MOV R9D,dword ptr [RAX] MOV ESI,0x7dd LEA R8,[0x215aa4] MOV AL,0x0 CALL 0x00170ce0 LAB_0019a8ed: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019a9ee LAB_0019a8f9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JNZ 0x0019a9b6 CMP qword ptr [RBP + -0x98],0x1 JNZ 0x0019a93b LEA RAX,[0x21558c] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x48e MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x58],0x15 JMP 0x0019a98a LAB_0019a93b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x0013b4b0 MOV dword ptr [RBP + -0xa0],EAX MOV RAX,qword ptr [RBP + -0x98] MOV ECX,dword ptr [RBP + -0xa0] SUB RAX,RCX SUB RAX,0x2 MOV dword ptr [RBP + -0x58],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RBP + -0xa0] ADD RAX,RCX ADD RAX,0x2 MOV qword ptr [RBP + -0x60],RAX LAB_0019a98a: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x2 CALL 0x00190f20 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x0019a9b1 LEA RAX,[0x38cb18] MOV qword ptr [RBP + -0x40],RAX LAB_0019a9b1: JMP 0x0019a70d LAB_0019a9b6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0019a9e7 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x20] ADD RSI,0x1 MOV RDX,qword ptr [RBP + -0x98] CALL 0x00179400 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019a9ee LAB_0019a9e7: MOV dword ptr [RBP + -0x4],0x1 LAB_0019a9ee: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xc0 POP RBP RET
int4 run_plugin_auth(long param_1,long param_2,int param_3,char *param_4,int8 param_5) { int *puVar1; int *puVar2; long lVar3; int iVar4; char *pcVar5; int *piVar6; size_t sVar7; long local_a0; code *local_98; code *local_90; code *local_88; long local_80; int1 *local_78; int8 local_70; long local_68; int local_60; int4 local_58; int4 local_54; int1 local_50; int local_4c; int1 *local_48; char *local_40; int8 local_38; char *local_30; int local_24; long local_20; long local_18; int4 local_c; local_40 = (char *)0x0; if ((*(ulong *)(param_1 + 0x370) & 0x80000) != 0) { if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 8) == 0)) { if (param_4 != (char *)0x0) { local_40 = param_4; } } else { local_40 = *(char **)(*(long *)(param_1 + 0x480) + 8); } } if (local_40 == (char *)0x0) { if ((*(ulong *)(param_1 + 0x370) & 0x200) == 0) { local_40 = "mysql_old_password"; } else { local_40 = "mysql_native_password"; } } local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_48 = (int1 *)mysql_client_find_plugin(param_1,local_40,2); if (local_48 == (int1 *)0x0) { local_48 = dummy_fallback_client_plugin; } *(int4 *)(local_18 + 0x90) = 0; if ((local_30 != (char *)0x0) && (iVar4 = strcmp(local_30,local_40), iVar4 != 0)) { local_20 = 0; local_24 = 0; } local_50 = local_30 == (char *)0x0; local_68 = local_20; local_60 = local_24; local_98 = client_mpvio_read_packet; local_90 = client_mpvio_write_packet; local_88 = client_mpvio_info; local_80 = local_18; local_54 = 0; local_58 = 0; local_70 = local_38; while( true ) { local_78 = local_48; if ((((local_40 != (char *)0x0) && (*(long *)(local_18 + 0x480) != 0)) && (*(long *)(*(long *)(local_18 + 0x480) + 0x150) != 0)) && (pcVar5 = strstr(*(char **)(*(long *)(local_18 + 0x480) + 0x150),local_40), pcVar5 == (char *)0x0)) { my_set_error(local_18,0x1392,SQLSTATE_UNKNOWN,0,local_30); return 1; } **(int1 **)(local_18 + 0x20) = 0; iVar4 = (**(code **)(local_48 + 0x58))(&local_98,local_18); if (((iVar4 == 0) && (*(long *)(local_18 + 8) == 0)) || ((-1 < iVar4 && (**(char **)(local_18 + 0x20) != -2)))) { if (iVar4 < 1) { if (*(int *)(local_18 + 0x90) == 0) { my_set_error(local_18,2000,SQLSTATE_UNKNOWN,0); } } else { my_set_error(local_18,iVar4,SQLSTATE_UNKNOWN,0); } return 1; } if (iVar4 == -1) { local_a0 = ma_net_safe_read(local_18); } else { local_a0 = (long)local_4c; } lVar3 = local_18; puVar2 = PTR_s_Lost_connection_to_server_at___s_0038bcb8; puVar1 = SQLSTATE_UNKNOWN; if (local_a0 == 0xffffffff) break; if (**(char **)(local_18 + 0x20) != -2) { if (**(char **)(local_18 + 0x20) == '\0') { local_c = ma_read_ok_packet(local_18,*(long *)(local_18 + 0x20) + 1,local_a0); } else { local_c = 1; } return local_c; } if (local_a0 == 1) { local_40 = "mysql_old_password"; local_68 = local_18 + 0x48e; local_60 = 0x15; } else { local_40 = (char *)(*(long *)(local_18 + 0x20) + 1); sVar7 = strlen(local_40); local_60 = ((int)local_a0 - (int)sVar7) + -2; local_68 = *(long *)(local_18 + 0x20) + (sVar7 & 0xffffffff) + 2; } local_48 = (int1 *)mysql_client_find_plugin(local_18,local_40,2); if (local_48 == (int1 *)0x0) { local_48 = dummy_fallback_client_plugin; } } if (*(int *)(local_18 + 0x90) == 0x7dd) { piVar6 = __errno_location(); my_set_error(lVar3,0x7dd,puVar1,puVar2,"reading authorization packet",*piVar6); } return 1; }
11,045
JS_DefinePropertyValueValue
bluesky950520[P]quickjs/quickjs.c
int JS_DefinePropertyValueValue(JSContext *ctx, JSValue this_obj, JSValue prop, JSValue val, int flags) { JSAtom atom; int ret; atom = JS_ValueToAtom(ctx, prop); JS_FreeValue(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) { JS_FreeValue(ctx, val); return -1; } ret = JS_DefinePropertyValue(ctx, this_obj, atom, val, flags); JS_FreeAtom(ctx, atom); return ret; }
O0
c
JS_DefinePropertyValueValue: subq $0x58, %rsp leaq 0x60(%rsp), %rax movq %rax, 0x10(%rsp) movq %rsi, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq %rcx, 0x30(%rsp) movq %r8, 0x38(%rsp) movq %rdi, 0x28(%rsp) movl %r9d, 0x24(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x2ff40 movl %eax, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x229d0 cmpl $0x0, 0x20(%rsp) sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x36061 movq 0x10(%rsp), %rax movq 0x28(%rsp), %rdi movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x229d0 movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x360a6 movq 0x10(%rsp), %r9 movq 0x28(%rsp), %rdi movl 0x20(%rsp), %ecx movl 0x24(%rsp), %eax movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq (%r9), %r8 movq 0x8(%r9), %r9 movl %eax, (%rsp) callq 0x35ef0 movl %eax, 0x1c(%rsp) movq 0x28(%rsp), %rdi movl 0x20(%rsp), %esi callq 0x27d80 movl 0x1c(%rsp), %eax movl %eax, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nop
JS_DefinePropertyValueValue: sub rsp, 58h lea rax, [rsp+58h+arg_0] mov [rsp+58h+var_48], rax mov [rsp+58h+var_18], rsi mov [rsp+58h+var_10], rdx mov [rsp+58h+var_28], rcx mov [rsp+58h+var_20], r8 mov [rsp+58h+var_30], rdi mov [rsp+58h+var_34], r9d mov rdi, [rsp+58h+var_30] mov rsi, [rsp+58h+var_28] mov rdx, [rsp+58h+var_20] call JS_ValueToAtom mov [rsp+58h+var_38], eax mov rdi, [rsp+58h+var_30] mov rsi, [rsp+58h+var_28] mov rdx, [rsp+58h+var_20] call JS_FreeValue cmp [rsp+58h+var_38], 0 setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_36061 mov rax, [rsp+58h+var_48] mov rdi, [rsp+58h+var_30] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov [rsp+58h+var_4], 0FFFFFFFFh jmp short loc_360A6 loc_36061: mov r9, [rsp+58h+var_48] mov rdi, [rsp+58h+var_30] mov ecx, [rsp+58h+var_38] mov eax, [rsp+58h+var_34] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] mov r8, [r9] mov r9, [r9+8] mov [rsp+58h+var_58], eax call JS_DefinePropertyValue mov [rsp+58h+var_3C], eax mov rdi, [rsp+58h+var_30] mov esi, [rsp+58h+var_38] call JS_FreeAtom mov eax, [rsp+58h+var_3C] mov [rsp+58h+var_4], eax loc_360A6: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long JS_DefinePropertyValueValue( long long a1, long long a2, long long a3, long long a4, long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, _DWORD *a15, long long a16) { __m128 v16; // xmm4 __m128 v17; // xmm5 unsigned int v19; // [rsp+1Ch] [rbp-3Ch] unsigned int v20; // [rsp+20h] [rbp-38h] v20 = JS_ValueToAtom(a1, a4, a5); JS_FreeValue(a1, a4, a5); if ( v20 ) { v19 = JS_DefinePropertyValue(a1, a2, a3, v20, a15, a16, a7, a8, a9, a10, v16, v17, a13, a14, a6); JS_FreeAtom(a1, v20); return v19; } else { JS_FreeValue(a1, (long long)a15, a16); return (unsigned int)-1; } }
JS_DefinePropertyValueValue: SUB RSP,0x58 LEA RAX,[RSP + 0x60] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x40],RSI MOV qword ptr [RSP + 0x48],RDX MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x38],R8 MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],R9D MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x0012ff40 MOV dword ptr [RSP + 0x20],EAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x001229d0 CMP dword ptr [RSP + 0x20],0x0 SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00136061 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001229d0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x001360a6 LAB_00136061: MOV R9,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x24] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV R8,qword ptr [R9] MOV R9,qword ptr [R9 + 0x8] MOV dword ptr [RSP],EAX CALL 0x00135ef0 MOV dword ptr [RSP + 0x1c],EAX MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x20] CALL 0x00127d80 MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x54],EAX LAB_001360a6: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
int4 JS_DefinePropertyValueValue (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int4 param_6,int8 param_7,int8 param_8) { int iVar1; int4 local_4; iVar1 = JS_ValueToAtom(param_1,param_4,param_5); JS_FreeValue(param_1,param_4,param_5); if (iVar1 == 0) { JS_FreeValue(param_1,param_7,param_8); local_4 = 0xffffffff; } else { local_4 = JS_DefinePropertyValue(param_1,param_2,param_3,iVar1,param_7,param_8,param_6); JS_FreeAtom(param_1,iVar1); } return local_4; }
11,046
bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
hkr04[P]cpp-mcp/common/httplib.h
inline bool parse_header(const char *beg, const char *end, T fn) { // Skip trailing spaces and tabs. while (beg < end && is_space_or_tab(end[-1])) { end--; } auto p = beg; while (p < end && *p != ':') { p++; } if (p == end) { return false; } auto key_end = p; if (*p++ != ':') { return false; } while (p < end && is_space_or_tab(*p)) { p++; } if (p <= end) { auto key_len = key_end - beg; if (!key_len) { return false; } auto key = std::string(beg, key_end); // auto val = (case_ignore::equal(key, "Location") || // case_ignore::equal(key, "Referer")) // ? std::string(p, end) // : decode_url(std::string(p, end), false); auto val = std::string(p, end); if (!detail::fields::is_field_value(val)) { return false; } if (case_ignore::equal(key, "Location") || case_ignore::equal(key, "Referer")) { fn(key, val); } else { fn(key, decode_url(val, false)); } return true; } return false; }
O0
c
bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): subq $0x168, %rsp # imm = 0x168 movq %rdi, 0x158(%rsp) movq %rsi, 0x150(%rsp) movq 0x158(%rsp), %rcx xorl %eax, %eax cmpq 0x150(%rsp), %rcx movb %al, 0x67(%rsp) jae 0x37a04 movq 0x150(%rsp), %rax movsbl -0x1(%rax), %edi callq 0x1cd70 movb %al, 0x67(%rsp) movb 0x67(%rsp), %al testb $0x1, %al jne 0x37a0e jmp 0x37a24 movq 0x150(%rsp), %rax addq $-0x1, %rax movq %rax, 0x150(%rsp) jmp 0x379d7 movq 0x158(%rsp), %rax movq %rax, 0x148(%rsp) movq 0x148(%rsp), %rcx xorl %eax, %eax cmpq 0x150(%rsp), %rcx movb %al, 0x66(%rsp) jae 0x37a61 movq 0x148(%rsp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax setne %al movb %al, 0x66(%rsp) movb 0x66(%rsp), %al testb $0x1, %al jne 0x37a6b jmp 0x37a81 movq 0x148(%rsp), %rax addq $0x1, %rax movq %rax, 0x148(%rsp) jmp 0x37a34 movq 0x148(%rsp), %rax cmpq 0x150(%rsp), %rax jne 0x37aa0 movb $0x0, 0x167(%rsp) jmp 0x37f6a movq 0x148(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x148(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x148(%rsp) movsbl (%rax), %eax cmpl $0x3a, %eax je 0x37adc movb $0x0, 0x167(%rsp) jmp 0x37f6a jmp 0x37ade movq 0x148(%rsp), %rcx xorl %eax, %eax cmpq 0x150(%rsp), %rcx movb %al, 0x65(%rsp) jae 0x37b0a movq 0x148(%rsp), %rax movsbl (%rax), %edi callq 0x1cd70 movb %al, 0x65(%rsp) movb 0x65(%rsp), %al testb $0x1, %al jne 0x37b14 jmp 0x37b2a movq 0x148(%rsp), %rax addq $0x1, %rax movq %rax, 0x148(%rsp) jmp 0x37ade movq 0x148(%rsp), %rax cmpq 0x150(%rsp), %rax ja 0x37f62 movq 0x140(%rsp), %rax movq 0x158(%rsp), %rcx subq %rcx, %rax movq %rax, 0x138(%rsp) cmpq $0x0, 0x138(%rsp) jne 0x37b73 movb $0x0, 0x167(%rsp) jmp 0x37f6a movq 0x158(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x140(%rsp), %rax movq %rax, 0x50(%rsp) leaq 0x117(%rsp), %rdi movq %rdi, 0x58(%rsp) callq 0xbe20 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x58(%rsp), %rcx leaq 0x118(%rsp), %rdi callq 0x1cda0 jmp 0x37bbd leaq 0x117(%rsp), %rdi callq 0xb8e0 movq 0x148(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x150(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0xdf(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0xbe20 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq 0x40(%rsp), %rcx leaq 0xe0(%rsp), %rdi callq 0x1cda0 jmp 0x37c14 leaq 0xdf(%rsp), %rdi callq 0xb8e0 leaq 0xe0(%rsp), %rdi callq 0x1ce20 movb %al, 0x2f(%rsp) jmp 0x37c34 movb 0x2f(%rsp), %al testb $0x1, %al jne 0x37cbb jmp 0x37c3e movb $0x0, 0x167(%rsp) movl $0x1, 0xd8(%rsp) jmp 0x37f2a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) leaq 0x117(%rsp), %rdi callq 0xb8e0 jmp 0x37f7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) leaq 0xdf(%rsp), %rdi callq 0xb8e0 jmp 0x37f53 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) jmp 0x37f46 leaq 0xb7(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xbe20 movq 0x20(%rsp), %rdx movb $0x0, 0x8e(%rsp) movb $0x0, 0x8d(%rsp) leaq 0x961ff(%rip), %rsi # 0xcdee8 leaq 0xb8(%rsp), %rdi callq 0xf160 jmp 0x37cf8 leaq 0x118(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x1ce40 movb %al, 0x1f(%rsp) jmp 0x37d13 movb 0x1f(%rsp), %cl movb $0x1, %al testb $0x1, %cl movb %al, 0x1e(%rsp) jne 0x37d86 jmp 0x37d24 leaq 0x8f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xbe20 movq 0x10(%rsp), %rdx movb $0x1, 0x8e(%rsp) leaq 0x961a7(%rip), %rsi # 0xcdef1 leaq 0x90(%rsp), %rdi callq 0xf160 jmp 0x37d59 movb $0x1, 0x8d(%rsp) leaq 0x118(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x1ce40 movb %al, 0xf(%rsp) jmp 0x37d7c movb 0xf(%rsp), %al movb %al, 0x1e(%rsp) jmp 0x37d86 movb 0x1e(%rsp), %al movb %al, 0xe(%rsp) testb $0x1, 0x8d(%rsp) jne 0x37d9a jmp 0x37da7 leaq 0x90(%rsp), %rdi callq 0xbfb0 testb $0x1, 0x8e(%rsp) jne 0x37db3 jmp 0x37dc0 leaq 0x8f(%rsp), %rdi callq 0xb8e0 leaq 0xb8(%rsp), %rdi callq 0xbfb0 leaq 0xb7(%rsp), %rdi callq 0xb8e0 movb 0xe(%rsp), %al testb $0x1, %al jne 0x37de7 jmp 0x37eb9 leaq 0x166(%rsp), %rdi leaq 0x118(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x38520 jmp 0x37e06 jmp 0x37f17 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) jmp 0x37ea7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) jmp 0x37e9a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) jmp 0x37e7f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) testb $0x1, 0x8d(%rsp) jne 0x37e70 jmp 0x37e7d leaq 0x90(%rsp), %rdi callq 0xbfb0 jmp 0x37e7f testb $0x1, 0x8e(%rsp) jne 0x37e8b jmp 0x37e98 leaq 0x8f(%rsp), %rdi callq 0xb8e0 jmp 0x37e9a leaq 0xb8(%rsp), %rdi callq 0xbfb0 leaq 0xb7(%rsp), %rdi callq 0xb8e0 jmp 0x37f46 leaq 0x68(%rsp), %rdi leaq 0xe0(%rsp), %rsi xorl %edx, %edx callq 0x1cf10 jmp 0x37ecf leaq 0x166(%rsp), %rdi leaq 0x118(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0x38520 jmp 0x37eeb leaq 0x68(%rsp), %rdi callq 0xbfb0 jmp 0x37f17 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x108(%rsp) movl %eax, 0x104(%rsp) leaq 0x68(%rsp), %rdi callq 0xbfb0 jmp 0x37f46 movb $0x1, 0x167(%rsp) movl $0x1, 0xd8(%rsp) leaq 0xe0(%rsp), %rdi callq 0xbfb0 leaq 0x118(%rsp), %rdi callq 0xbfb0 jmp 0x37f6a leaq 0xe0(%rsp), %rdi callq 0xbfb0 leaq 0x118(%rsp), %rdi callq 0xbfb0 jmp 0x37f7b movb $0x0, 0x167(%rsp) movb 0x167(%rsp), %al andb $0x1, %al addq $0x168, %rsp # imm = 0x168 retq movq 0x108(%rsp), %rdi callq 0xbe10 nopl (%rax,%rax)
_ZN7httplib6detail12parse_headerIZNS0_23MultipartFormDataParser5parseEPKcmRKSt8functionIFbS4_mEERKS5_IFbRKNS_17MultipartFormDataEEEEUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESO_E_EEbS4_S4_T_: sub rsp, 168h mov qword ptr [rsp+168h+var_10], rdi mov qword ptr [rsp+168h+var_18], rsi loc_379D7: mov rcx, qword ptr [rsp+168h+var_10] xor eax, eax cmp rcx, qword ptr [rsp+168h+var_18] mov [rsp+168h+var_101], al jnb short loc_37A04 mov rax, qword ptr [rsp+168h+var_18] movsx edi, byte ptr [rax-1]; this call _ZN7httplib6detail15is_space_or_tabEc; httplib::detail::is_space_or_tab(char) mov [rsp+168h+var_101], al loc_37A04: mov al, [rsp+168h+var_101] test al, 1 jnz short loc_37A0E jmp short loc_37A24 loc_37A0E: mov rax, qword ptr [rsp+168h+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov qword ptr [rsp+168h+var_18], rax jmp short loc_379D7 loc_37A24: mov rax, qword ptr [rsp+168h+var_10] mov qword ptr [rsp+168h+var_20], rax loc_37A34: mov rcx, qword ptr [rsp+168h+var_20] xor eax, eax cmp rcx, qword ptr [rsp+168h+var_18] mov [rsp+168h+var_102], al jnb short loc_37A61 mov rax, qword ptr [rsp+168h+var_20] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' setnz al mov [rsp+168h+var_102], al loc_37A61: mov al, [rsp+168h+var_102] test al, 1 jnz short loc_37A6B jmp short loc_37A81 loc_37A6B: mov rax, qword ptr [rsp+168h+var_20] add rax, 1 mov qword ptr [rsp+168h+var_20], rax jmp short loc_37A34 loc_37A81: mov rax, qword ptr [rsp+168h+var_20] cmp rax, qword ptr [rsp+168h+var_18] jnz short loc_37AA0 mov [rsp+168h+var_1], 0 jmp loc_37F6A loc_37AA0: mov rax, qword ptr [rsp+168h+var_20] mov [rsp+168h+var_28], rax mov rax, qword ptr [rsp+168h+var_20] mov rcx, rax add rcx, 1 mov qword ptr [rsp+168h+var_20], rcx movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_37ADC mov [rsp+168h+var_1], 0 jmp loc_37F6A loc_37ADC: jmp short $+2 loc_37ADE: mov rcx, qword ptr [rsp+168h+var_20] xor eax, eax cmp rcx, qword ptr [rsp+168h+var_18] mov [rsp+168h+var_103], al jnb short loc_37B0A mov rax, qword ptr [rsp+168h+var_20] movsx edi, byte ptr [rax]; this call _ZN7httplib6detail15is_space_or_tabEc; httplib::detail::is_space_or_tab(char) mov [rsp+168h+var_103], al loc_37B0A: mov al, [rsp+168h+var_103] test al, 1 jnz short loc_37B14 jmp short loc_37B2A loc_37B14: mov rax, qword ptr [rsp+168h+var_20] add rax, 1 mov qword ptr [rsp+168h+var_20], rax jmp short loc_37ADE loc_37B2A: mov rax, qword ptr [rsp+168h+var_20] cmp rax, qword ptr [rsp+168h+var_18] ja loc_37F62 mov rax, [rsp+168h+var_28] mov rcx, qword ptr [rsp+168h+var_10] sub rax, rcx mov [rsp+168h+var_30], rax cmp [rsp+168h+var_30], 0 jnz short loc_37B73 mov [rsp+168h+var_1], 0 jmp loc_37F6A loc_37B73: mov rax, qword ptr [rsp+168h+var_10] mov qword ptr [rsp+168h+var_120], rax; int mov rax, [rsp+168h+var_28] mov [rsp+168h+var_118], rax; __int64 lea rdi, [rsp+168h+var_51] mov [rsp+168h+var_110], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+168h+var_120] mov rdx, [rsp+168h+var_118] mov rcx, [rsp+168h+var_110] lea rdi, [rsp+168h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_37BBD: lea rdi, [rsp+168h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, qword ptr [rsp+168h+var_20] mov qword ptr [rsp+168h+var_138], rax; int mov rax, qword ptr [rsp+168h+var_18] mov qword ptr [rsp+168h+var_130], rax; int lea rdi, [rsp+168h+var_89] mov qword ptr [rsp+168h+var_128], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+168h+var_138] mov rdx, qword ptr [rsp+168h+var_130] mov rcx, qword ptr [rsp+168h+var_128] lea rdi, [rsp+168h+var_89+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_37C14: lea rdi, [rsp+168h+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+168h+var_89+1] call _ZN7httplib6detail6fields14is_field_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::fields::is_field_value(std::string const&) mov [rsp+168h+var_139], al jmp short $+2 loc_37C34: mov al, [rsp+168h+var_139] test al, 1 jnz short loc_37CBB jmp short $+2 loc_37C3E: mov [rsp+168h+var_1], 0 mov [rsp+168h+var_90], 1 jmp loc_37F2A mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax lea rdi, [rsp+arg_10F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_37F7B mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax lea rdi, [rsp+arg_D7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_37F53 mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax jmp loc_37F46 loc_37CBB: lea rdi, [rsp+168h+var_B1] mov qword ptr [rsp+168h+var_148], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+168h+var_148] mov [rsp+168h+var_DA], 0 mov [rsp+168h+var_DB], 0 lea rsi, aLocation; "Location" lea rdi, [rsp+168h+var_B1+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_37CF8: lea rdi, [rsp+168h+var_50] lea rsi, [rsp+168h+var_B1+1] call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&) mov [rsp+168h+var_149], al jmp short $+2 loc_37D13: mov cl, [rsp+168h+var_149] mov al, 1 test cl, 1 mov [rsp+168h+var_14A], al jnz short loc_37D86 jmp short $+2 loc_37D24: lea rdi, [rsp+168h+var_D9] mov [rsp+168h+var_158], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+168h+var_158] mov [rsp+168h+var_DA], 1 lea rsi, aReferer; "Referer" lea rdi, [rsp+168h+var_D8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_37D59: mov [rsp+168h+var_DB], 1 lea rdi, [rsp+168h+var_50] lea rsi, [rsp+168h+var_D8] call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&) mov [rsp+168h+var_159], al jmp short $+2 loc_37D7C: mov al, [rsp+168h+var_159] mov [rsp+168h+var_14A], al jmp short $+2 loc_37D86: mov al, [rsp+168h+var_14A] mov [rsp+168h+var_15A], al test [rsp+168h+var_DB], 1 jnz short loc_37D9A jmp short loc_37DA7 loc_37D9A: lea rdi, [rsp+168h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_37DA7: test [rsp+168h+var_DA], 1 jnz short loc_37DB3 jmp short loc_37DC0 loc_37DB3: lea rdi, [rsp+168h+var_D9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_37DC0: lea rdi, [rsp+168h+var_B1+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov al, [rsp+168h+var_15A] test al, 1 jnz short loc_37DE7 jmp loc_37EB9 loc_37DE7: lea rdi, [rsp+168h+var_2] lea rsi, [rsp+168h+var_50] lea rdx, [rsp+168h+var_89+1] call _ZZN7httplib6detail23MultipartFormDataParser5parseEPKcmRKSt8functionIFbS3_mEERKS4_IFbRKNS_17MultipartFormDataEEEENKUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESN_E_clESN_SN_; httplib::detail::MultipartFormDataParser::parse(char const*,ulong,std::function<bool ()(char const*,ulong)> const&,std::function const&<bool ()(httplib::MultipartFormData const&)>)::{lambda(std::string const&,std::string const&)#1}::operator()(std::string const&,std::string const&) jmp short $+2 loc_37E06: jmp loc_37F17 mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax jmp loc_37EA7 mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax jmp short loc_37E9A mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax jmp short loc_37E7F mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax test [rsp+arg_85], 1 jnz short loc_37E70 jmp short loc_37E7D loc_37E70: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_37E7D: jmp short $+2 loc_37E7F: test [rsp+arg_86], 1 jnz short loc_37E8B jmp short loc_37E98 loc_37E8B: lea rdi, [rsp+arg_87] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_37E98: jmp short $+2 loc_37E9A: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_37EA7: lea rdi, [rsp+arg_AF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_37F46 loc_37EB9: lea rdi, [rsp+168h+var_100]; int lea rsi, [rsp+168h+var_89+1]; int xor edx, edx; int call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool) jmp short $+2 loc_37ECF: lea rdi, [rsp+168h+var_2] lea rsi, [rsp+168h+var_50] lea rdx, [rsp+168h+var_100] call _ZZN7httplib6detail23MultipartFormDataParser5parseEPKcmRKSt8functionIFbS3_mEERKS4_IFbRKNS_17MultipartFormDataEEEENKUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESN_E_clESN_SN_; httplib::detail::MultipartFormDataParser::parse(char const*,ulong,std::function<bool ()(char const*,ulong)> const&,std::function const&<bool ()(httplib::MultipartFormData const&)>)::{lambda(std::string const&,std::string const&)#1}::operator()(std::string const&,std::string const&) jmp short $+2 loc_37EEB: lea rdi, [rsp+168h+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_37F17 mov rcx, rax mov eax, edx mov [rsp+arg_100], rcx mov [rsp+arg_FC], eax lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_37F46 loc_37F17: mov [rsp+168h+var_1], 1 mov [rsp+168h+var_90], 1 loc_37F2A: lea rdi, [rsp+168h+var_89+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_37F6A loc_37F46: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_37F53: lea rdi, [rsp+arg_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_37F7B loc_37F62: mov [rsp+168h+var_1], 0 loc_37F6A: mov al, [rsp+168h+var_1] and al, 1 add rsp, 168h retn loc_37F7B: mov rdi, [rsp+arg_100] call __Unwind_Resume
char httplib::detail::parse_header<httplib::detail::MultipartFormDataParser::parse(char const*,unsigned long,std::function<bool ()(char const*,unsigned long)> const&,std::function const&<bool ()(httplib::MultipartFormData const&)>)::{lambda(std::string const&,std::string const&)#1}>( long long a1, long long a2, long long a3) { _BYTE *v3; // rax long long v4; // rdx long long v5; // rdx long long v6; // rdx char v8; // [rsp+1Eh] [rbp-14Ah] long long v9; // [rsp+30h] [rbp-138h] long long v10; // [rsp+38h] [rbp-130h] long long v11; // [rsp+48h] [rbp-120h] long long v12; // [rsp+50h] [rbp-118h] bool v13; // [rsp+65h] [rbp-103h] bool v14; // [rsp+66h] [rbp-102h] bool is_space_or_tab; // [rsp+67h] [rbp-101h] int v16[9]; // [rsp+68h] [rbp-100h] BYREF char v17; // [rsp+8Dh] [rbp-DBh] char v18; // [rsp+8Eh] [rbp-DAh] char v19; // [rsp+8Fh] [rbp-D9h] BYREF _BYTE v20[39]; // [rsp+90h] [rbp-D8h] BYREF int v21[8]; // [rsp+B7h] [rbp-B1h] BYREF int v22; // [rsp+D8h] [rbp-90h] int v23[14]; // [rsp+DFh] [rbp-89h] BYREF char v24; // [rsp+117h] [rbp-51h] BYREF _BYTE v25[32]; // [rsp+118h] [rbp-50h] BYREF long long v26; // [rsp+138h] [rbp-30h] long long v27; // [rsp+140h] [rbp-28h] int v28[2]; // [rsp+148h] [rbp-20h] int v29[2]; // [rsp+150h] [rbp-18h] int v30[2]; // [rsp+158h] [rbp-10h] char v31; // [rsp+166h] [rbp-2h] BYREF char v32; // [rsp+167h] [rbp-1h] *(_QWORD *)v30 = a1; for ( *(_QWORD *)v29 = a2; ; --*(_QWORD *)v29 ) { is_space_or_tab = 0; if ( *(_QWORD *)v30 < *(_QWORD *)v29 ) is_space_or_tab = httplib::detail::is_space_or_tab((httplib::detail *)(unsigned int)*(char *)(*(_QWORD *)v29 - 1LL)); if ( !is_space_or_tab ) break; } for ( *(_QWORD *)v28 = *(_QWORD *)v30; ; ++*(_QWORD *)v28 ) { v14 = 0; if ( *(_QWORD *)v28 < *(_QWORD *)v29 ) v14 = **(_BYTE **)v28 != 58; if ( !v14 ) break; } if ( *(_QWORD *)v28 == *(_QWORD *)v29 ) { v32 = 0; } else { v27 = *(_QWORD *)v28; v3 = (_BYTE *)(*(_QWORD *)v28)++; if ( *v3 == 58 ) { while ( 1 ) { v13 = 0; if ( *(_QWORD *)v28 < *(_QWORD *)v29 ) v13 = httplib::detail::is_space_or_tab((httplib::detail *)(unsigned int)(char)**(_BYTE **)v28); if ( !v13 ) break; ++*(_QWORD *)v28; } if ( *(_QWORD *)v28 > *(_QWORD *)v29 ) { v32 = 0; } else { v26 = v27 - *(_QWORD *)v30; if ( v27 == *(_QWORD *)v30 ) { v32 = 0; } else { v11 = *(_QWORD *)v30; v12 = v27; std::allocator<char>::allocator(&v24, a2, a3); std::string::basic_string<char const*,void>((long long)v25, v11, v12, (long long)&v24); std::allocator<char>::~allocator(&v24); v9 = *(_QWORD *)v28; v10 = *(_QWORD *)v29; std::allocator<char>::allocator(v23, v11, v4); std::string::basic_string<char const*,void>((long long)v23 + 1, v9, v10, (long long)v23); std::allocator<char>::~allocator(v23); if ( (httplib::detail::fields::is_field_value((long long)v23 + 1) & 1) != 0 ) { std::allocator<char>::allocator(v21, v9, v5); v18 = 0; v17 = 0; std::string::basic_string<std::allocator<char>>((long long)v21 + 1, (long long)"Location", (long long)v21); v8 = 1; if ( (httplib::detail::case_ignore::equal((long long)v25, (long long)v21 + 1) & 1) == 0 ) { std::allocator<char>::allocator(&v19, (char *)v21 + 1, v6); v18 = 1; std::string::basic_string<std::allocator<char>>((long long)v20, (long long)"Referer", (long long)&v19); v17 = 1; v8 = httplib::detail::case_ignore::equal((long long)v25, (long long)v20); } if ( (v17 & 1) != 0 ) std::string::~string(v20); if ( (v18 & 1) != 0 ) std::allocator<char>::~allocator(&v19); std::string::~string((char *)v21 + 1); std::allocator<char>::~allocator(v21); if ( (v8 & 1) != 0 ) { httplib::detail::MultipartFormDataParser::parse(char const*,unsigned long,std::function<bool ()(char const*,unsigned long)> const&,std::function const&<bool ()(httplib::MultipartFormData const&)>)::{lambda(std::string const&,std::string const&)#1}::operator()( &v31, v25, (char *)v23 + 1); } else { httplib::detail::decode_url((long long)v16, (long long)v23 + 1, 0); httplib::detail::MultipartFormDataParser::parse(char const*,unsigned long,std::function<bool ()(char const*,unsigned long)> const&,std::function const&<bool ()(httplib::MultipartFormData const&)>)::{lambda(std::string const&,std::string const&)#1}::operator()( &v31, v25, v16); std::string::~string(v16); } v32 = 1; v22 = 1; } else { v32 = 0; v22 = 1; } std::string::~string((char *)v23 + 1); std::string::~string(v25); } } } else { v32 = 0; } } return v32 & 1; }
parse_header<httplib::detail::MultipartFormDataParser::parse(char_const*,unsigned_long,std::function<bool(char_const*,unsigned_long)>const&,std::function<bool(httplib::MultipartFormData_const&)>const&)::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}>: SUB RSP,0x168 MOV qword ptr [RSP + 0x158],RDI MOV qword ptr [RSP + 0x150],RSI LAB_001379d7: MOV RCX,qword ptr [RSP + 0x158] XOR EAX,EAX CMP RCX,qword ptr [RSP + 0x150] MOV byte ptr [RSP + 0x67],AL JNC 0x00137a04 MOV RAX,qword ptr [RSP + 0x150] MOVSX EDI,byte ptr [RAX + -0x1] CALL 0x0011cd70 MOV byte ptr [RSP + 0x67],AL LAB_00137a04: MOV AL,byte ptr [RSP + 0x67] TEST AL,0x1 JNZ 0x00137a0e JMP 0x00137a24 LAB_00137a0e: MOV RAX,qword ptr [RSP + 0x150] ADD RAX,-0x1 MOV qword ptr [RSP + 0x150],RAX JMP 0x001379d7 LAB_00137a24: MOV RAX,qword ptr [RSP + 0x158] MOV qword ptr [RSP + 0x148],RAX LAB_00137a34: MOV RCX,qword ptr [RSP + 0x148] XOR EAX,EAX CMP RCX,qword ptr [RSP + 0x150] MOV byte ptr [RSP + 0x66],AL JNC 0x00137a61 MOV RAX,qword ptr [RSP + 0x148] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a SETNZ AL MOV byte ptr [RSP + 0x66],AL LAB_00137a61: MOV AL,byte ptr [RSP + 0x66] TEST AL,0x1 JNZ 0x00137a6b JMP 0x00137a81 LAB_00137a6b: MOV RAX,qword ptr [RSP + 0x148] ADD RAX,0x1 MOV qword ptr [RSP + 0x148],RAX JMP 0x00137a34 LAB_00137a81: MOV RAX,qword ptr [RSP + 0x148] CMP RAX,qword ptr [RSP + 0x150] JNZ 0x00137aa0 MOV byte ptr [RSP + 0x167],0x0 JMP 0x00137f6a LAB_00137aa0: MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x140],RAX MOV RAX,qword ptr [RSP + 0x148] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + 0x148],RCX MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x00137adc MOV byte ptr [RSP + 0x167],0x0 JMP 0x00137f6a LAB_00137adc: JMP 0x00137ade LAB_00137ade: MOV RCX,qword ptr [RSP + 0x148] XOR EAX,EAX CMP RCX,qword ptr [RSP + 0x150] MOV byte ptr [RSP + 0x65],AL JNC 0x00137b0a MOV RAX,qword ptr [RSP + 0x148] MOVSX EDI,byte ptr [RAX] CALL 0x0011cd70 MOV byte ptr [RSP + 0x65],AL LAB_00137b0a: MOV AL,byte ptr [RSP + 0x65] TEST AL,0x1 JNZ 0x00137b14 JMP 0x00137b2a LAB_00137b14: MOV RAX,qword ptr [RSP + 0x148] ADD RAX,0x1 MOV qword ptr [RSP + 0x148],RAX JMP 0x00137ade LAB_00137b2a: MOV RAX,qword ptr [RSP + 0x148] CMP RAX,qword ptr [RSP + 0x150] JA 0x00137f62 MOV RAX,qword ptr [RSP + 0x140] MOV RCX,qword ptr [RSP + 0x158] SUB RAX,RCX MOV qword ptr [RSP + 0x138],RAX CMP qword ptr [RSP + 0x138],0x0 JNZ 0x00137b73 MOV byte ptr [RSP + 0x167],0x0 JMP 0x00137f6a LAB_00137b73: MOV RAX,qword ptr [RSP + 0x158] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x140] MOV qword ptr [RSP + 0x50],RAX LEA RDI,[RSP + 0x117] MOV qword ptr [RSP + 0x58],RDI CALL 0x0010be20 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] LAB_00137bae: LEA RDI,[RSP + 0x118] CALL 0x0011cda0 JMP 0x00137bbd LAB_00137bbd: LEA RDI,[RSP + 0x117] CALL 0x0010b8e0 MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0xdf] MOV qword ptr [RSP + 0x40],RDI CALL 0x0010be20 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x40] LAB_00137c05: LEA RDI,[RSP + 0xe0] CALL 0x0011cda0 JMP 0x00137c14 LAB_00137c14: LEA RDI,[RSP + 0xdf] CALL 0x0010b8e0 LAB_00137c21: LEA RDI,[RSP + 0xe0] CALL 0x0011ce20 MOV byte ptr [RSP + 0x2f],AL JMP 0x00137c34 LAB_00137c34: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x00137cbb JMP 0x00137c3e LAB_00137c3e: MOV byte ptr [RSP + 0x167],0x0 MOV dword ptr [RSP + 0xd8],0x1 JMP 0x00137f2a LAB_00137cbb: LEA RDI,[RSP + 0xb7] MOV qword ptr [RSP + 0x20],RDI CALL 0x0010be20 MOV RDX,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0x8e],0x0 MOV byte ptr [RSP + 0x8d],0x0 LAB_00137ce2: LEA RSI,[0x1cdee8] LEA RDI,[RSP + 0xb8] CALL 0x0010f160 JMP 0x00137cf8 LAB_00137cf8: LEA RDI,[RSP + 0x118] LEA RSI,[RSP + 0xb8] CALL 0x0011ce40 MOV byte ptr [RSP + 0x1f],AL JMP 0x00137d13 LAB_00137d13: MOV CL,byte ptr [RSP + 0x1f] MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RSP + 0x1e],AL JNZ 0x00137d86 JMP 0x00137d24 LAB_00137d24: LEA RDI,[RSP + 0x8f] MOV qword ptr [RSP + 0x10],RDI CALL 0x0010be20 MOV RDX,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x8e],0x1 LAB_00137d43: LEA RSI,[0x1cdef1] LEA RDI,[RSP + 0x90] CALL 0x0010f160 JMP 0x00137d59 LAB_00137d59: MOV byte ptr [RSP + 0x8d],0x1 LAB_00137d61: LEA RDI,[RSP + 0x118] LEA RSI,[RSP + 0x90] CALL 0x0011ce40 MOV byte ptr [RSP + 0xf],AL JMP 0x00137d7c LAB_00137d7c: MOV AL,byte ptr [RSP + 0xf] MOV byte ptr [RSP + 0x1e],AL JMP 0x00137d86 LAB_00137d86: MOV AL,byte ptr [RSP + 0x1e] MOV byte ptr [RSP + 0xe],AL TEST byte ptr [RSP + 0x8d],0x1 JNZ 0x00137d9a JMP 0x00137da7 LAB_00137d9a: LEA RDI,[RSP + 0x90] CALL 0x0010bfb0 LAB_00137da7: TEST byte ptr [RSP + 0x8e],0x1 JNZ 0x00137db3 JMP 0x00137dc0 LAB_00137db3: LEA RDI,[RSP + 0x8f] CALL 0x0010b8e0 LAB_00137dc0: LEA RDI,[RSP + 0xb8] CALL 0x0010bfb0 LEA RDI,[RSP + 0xb7] CALL 0x0010b8e0 MOV AL,byte ptr [RSP + 0xe] TEST AL,0x1 JNZ 0x00137de7 JMP 0x00137eb9 LAB_00137de7: LEA RDI,[RSP + 0x166] LEA RSI,[RSP + 0x118] LEA RDX,[RSP + 0xe0] CALL 0x00138520 JMP 0x00137e06 LAB_00137e06: JMP 0x00137f17 LAB_00137eb9: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0xe0] XOR EDX,EDX CALL 0x0011cf10 JMP 0x00137ecf LAB_00137ecf: LEA RDI,[RSP + 0x166] LEA RSI,[RSP + 0x118] LEA RDX,[RSP + 0x68] CALL 0x00138520 LAB_00137ee9: JMP 0x00137eeb LAB_00137eeb: LEA RDI,[RSP + 0x68] CALL 0x0010bfb0 JMP 0x00137f17 LAB_00137f17: MOV byte ptr [RSP + 0x167],0x1 MOV dword ptr [RSP + 0xd8],0x1 LAB_00137f2a: LEA RDI,[RSP + 0xe0] CALL 0x0010bfb0 LEA RDI,[RSP + 0x118] CALL 0x0010bfb0 JMP 0x00137f6a LAB_00137f62: MOV byte ptr [RSP + 0x167],0x0 LAB_00137f6a: MOV AL,byte ptr [RSP + 0x167] AND AL,0x1 ADD RSP,0x168 RET
/* bool httplib::detail::parse_header<httplib::detail::MultipartFormDataParser::parse(char const*, unsigned long, std::function<bool (char const*, unsigned long)> const&, std::function<bool (httplib::MultipartFormData const&)> const&)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}>(char const*, char const*, httplib::detail::MultipartFormDataParser::parse(char const*, unsigned long, std::function<bool (char const*, unsigned long)> const&, std::function<bool (httplib::MultipartFormData const&)> const&)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}) */ bool httplib::detail:: parse_header<httplib::detail::MultipartFormDataParser::parse(char_const*,unsigned_long,std::function<bool(char_const*,unsigned_long)>const&,std::function<bool(httplib::MultipartFormData_const&)>const&)::_lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)_1_> (char *param_1,char *param_2) { char *pcVar1; char *pcVar2; byte bVar3; bool bVar4; byte local_14a; byte local_103; byte local_101; detail local_100 [37]; byte local_db; byte local_da; allocator local_d9; string local_d8 [39]; allocator local_b1; string local_b0 [32]; int4 local_90; allocator local_89; string local_88 [55]; allocator local_51; string local_50 [32]; long local_30; char *local_28; char *local_20; char *local_18; char *local_10; string local_2; byte local_1; local_18 = param_2; local_10 = param_1; while( true ) { local_101 = 0; if (local_10 < local_18) { local_101 = is_space_or_tab(local_18[-1]); } if ((local_101 & 1) == 0) break; local_18 = local_18 + -1; } local_20 = local_10; while( true ) { bVar4 = false; if (local_20 < local_18) { bVar4 = *local_20 != ':'; } if (!bVar4) break; local_20 = local_20 + 1; } if (local_20 == local_18) { local_1 = 0; } else { local_28 = local_20; if (*local_20 == ':') { do { local_20 = local_20 + 1; local_103 = 0; if (local_20 < local_18) { local_103 = is_space_or_tab(*local_20); } pcVar2 = local_10; pcVar1 = local_28; } while ((local_103 & 1) != 0); if (local_18 < local_20) { local_1 = 0; } else { local_30 = (long)local_28 - (long)local_10; if (local_30 == 0) { local_1 = 0; } else { std::allocator<char>::allocator(); /* try { // try from 00137bae to 00137bba has its CatchHandler @ 00137c56 */ std::__cxx11::string::string<char_const*,void>(local_50,pcVar2,pcVar1,&local_51); std::allocator<char>::~allocator((allocator<char> *)&local_51); pcVar2 = local_18; pcVar1 = local_20; std::allocator<char>::allocator(); /* try { // try from 00137c05 to 00137c11 has its CatchHandler @ 00137c7c */ std::__cxx11::string::string<char_const*,void>(local_88,pcVar1,pcVar2,&local_89); std::allocator<char>::~allocator((allocator<char> *)&local_89); /* try { // try from 00137c21 to 00137c2d has its CatchHandler @ 00137ca2 */ bVar3 = fields::is_field_value(local_88); if ((bVar3 & 1) == 0) { local_1 = 0; } else { std::allocator<char>::allocator(); local_da = 0; local_db = 0; /* try { // try from 00137ce2 to 00137cf5 has its CatchHandler @ 00137e0b */ std::__cxx11::string::string<std::allocator<char>>(local_b0,"Location",&local_b1); /* try { // try from 00137cf8 to 00137d0c has its CatchHandler @ 00137e24 */ bVar3 = case_ignore::equal(local_50,local_b0); local_14a = 1; if ((bVar3 & 1) == 0) { std::allocator<char>::allocator(); local_da = 1; /* try { // try from 00137d43 to 00137d56 has its CatchHandler @ 00137e3a */ std::__cxx11::string::string<std::allocator<char>>(local_d8,"Referer",&local_d9); local_db = 1; /* try { // try from 00137d61 to 00137d75 has its CatchHandler @ 00137e50 */ local_14a = case_ignore::equal(local_50,local_d8); } if ((local_db & 1) != 0) { std::__cxx11::string::~string(local_d8); } if ((local_da & 1) != 0) { std::allocator<char>::~allocator((allocator<char> *)&local_d9); } std::__cxx11::string::~string(local_b0); std::allocator<char>::~allocator((allocator<char> *)&local_b1); if ((local_14a & 1) == 0) { decode_url(local_100,local_88,false); /* try { // try from 00137ecf to 00137ee8 has its CatchHandler @ 00137ef7 */ MultipartFormDataParser:: parse(char_const*,unsigned_long,std::function<bool(char_const*,unsigned_long)>const&,std::function<bool(httplib::MultipartFormData_const&)>const&) ::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}::operator() (&local_2,local_50); std::__cxx11::string::~string((string *)local_100); } else { /* try { // try from 00137de7 to 00137ecc has its CatchHandler @ 00137ca2 */ MultipartFormDataParser:: parse(char_const*,unsigned_long,std::function<bool(char_const*,unsigned_long)>const&,std::function<bool(httplib::MultipartFormData_const&)>const&) ::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}::operator() (&local_2,local_50); } local_1 = 1; } local_90 = 1; std::__cxx11::string::~string(local_88); std::__cxx11::string::~string(local_50); } } } else { local_1 = 0; } } return (bool)(local_1 & 1); }
11,047
bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
hkr04[P]cpp-mcp/common/httplib.h
inline bool parse_header(const char *beg, const char *end, T fn) { // Skip trailing spaces and tabs. while (beg < end && is_space_or_tab(end[-1])) { end--; } auto p = beg; while (p < end && *p != ':') { p++; } if (p == end) { return false; } auto key_end = p; if (*p++ != ':') { return false; } while (p < end && is_space_or_tab(*p)) { p++; } if (p <= end) { auto key_len = key_end - beg; if (!key_len) { return false; } auto key = std::string(beg, key_end); // auto val = (case_ignore::equal(key, "Location") || // case_ignore::equal(key, "Referer")) // ? std::string(p, end) // : decode_url(std::string(p, end), false); auto val = std::string(p, end); if (!detail::fields::is_field_value(val)) { return false; } if (case_ignore::equal(key, "Location") || case_ignore::equal(key, "Referer")) { fn(key, val); } else { fn(key, decode_url(val, false)); } return true; } return false; }
O3
c
bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %rsi cmpq %rdi, %r14 jbe 0x2e471 movzbl -0x1(%r14), %eax cmpl $0x20, %eax je 0x2e466 cmpl $0x9, %eax jne 0x2e471 decq %r14 cmpq %rsi, %r14 ja 0x2e457 movq %rsi, %r14 movq %rsi, %rdx cmpq %rsi, %r14 jbe 0x2e492 movq %r14, %rax subq %rsi, %rax movq %rsi, %rdx cmpb $0x3a, (%rdx) je 0x2e492 incq %rdx decq %rax jne 0x2e482 movq %r14, %rdx cmpq %r14, %rdx je 0x2e530 cmpb $0x3a, (%rdx) jne 0x2e530 leaq 0x1(%rdx), %r15 cmpq %r14, %r15 jae 0x2e4d3 movq %r14, %rax subq %rdx, %rax leaq (%rdx,%rax), %rcx decq %rax movzbl (%r15), %edi cmpl $0x20, %edi je 0x2e4c8 cmpl $0x9, %edi jne 0x2e4d3 incq %r15 decq %rax jne 0x2e4ba movq %rcx, %r15 xorl %ebp, %ebp cmpq %rsi, %rdx je 0x2e532 cmpq %r14, %r15 ja 0x2e532 leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x48(%rsp), %rdi callq 0xb820 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x28(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xb820 movq 0x30(%rsp), %rcx testq %rcx, %rcx je 0x2e5dc cmpq $0x2, %rcx je 0x2e546 cmpq $0x1, %rcx jne 0x2e568 movq 0x28(%rsp), %rax jmp 0x2e5c8 xorl %ebp, %ebp movl %ebp, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x28(%rsp), %rax movb (%rax), %cl leal -0x21(%rcx), %edx cmpb $0x5e, %dl setae %dl testb %cl, %cl setns %cl testb %dl, %cl jne 0x2e649 incq %rax jmp 0x2e5c8 movq 0x28(%rsp), %rax movb (%rax), %dl leal -0x21(%rdx), %esi cmpb $0x5e, %sil setae %sil testb %dl, %dl setns %dl testb %sil, %dl jne 0x2e649 leaq -0x1(%rcx), %rdx addq $-0x2, %rcx xorl %esi, %esi movzbl 0x1(%rax,%rsi), %edi cmpl $0x9, %edi je 0x2e5bd cmpl $0x20, %edi je 0x2e5bd leal -0x21(%rdi), %r8d cmpb $0x5e, %r8b setae %r8b testb %dil, %dil setns %dil testb %r8b, %dil jne 0x2e649 incq %rsi cmpq %rsi, %rcx jne 0x2e592 addq %rdx, %rax movb (%rax), %al leal -0x21(%rax), %ecx cmpb $0x5e, %cl setb %cl testb %al, %al sets %al orb %cl, %al je 0x2e649 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x162e3(%rip), %rsi # 0x448cf leaq 0x162e4(%rip), %rdx # 0x448d7 leaq 0x8(%rsp), %rdi callq 0xb820 movq 0x50(%rsp), %rax cmpq 0x10(%rsp), %rax jne 0x2e650 movb $0x1, %bpl movq 0x8(%rsp), %rdi testq %rax, %rax je 0x2e6e1 movq 0x48(%rsp), %rcx xorl %edx, %edx leaq 0x178f8(%rip), %rsi # 0x45f20 movzbl (%rcx,%rdx), %r8d movzbl (%rdi,%rdx), %r9d movb (%r8,%rsi), %r8b cmpb (%r9,%rsi), %r8b jne 0x2e650 incq %rdx cmpq %rdx, %rax jne 0x2e628 jmp 0x2e6e1 xorl %ebp, %ebp jmp 0x2e750 leaq 0x78(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x16278(%rip), %rsi # 0x448d8 leaq 0x16278(%rip), %rdx # 0x448df leaq 0x68(%rsp), %rdi callq 0xb820 movq 0x50(%rsp), %rax cmpq 0x70(%rsp), %rax jne 0x2e6be movq 0x68(%rsp), %rdi testq %rax, %rax je 0x2e6c7 movq 0x48(%rsp), %rcx decq %rax xorl %edx, %edx leaq 0x17888(%rip), %rsi # 0x45f20 movzbl (%rcx,%rdx), %r8d movzbl (%rdi,%rdx), %r9d movb (%r8,%rsi), %r8b cmpb (%r9,%rsi), %r8b sete %bpl jne 0x2e6ca leaq 0x1(%rdx), %r8 cmpq %rdx, %rax movq %r8, %rdx jne 0x2e698 jmp 0x2e6ca movq 0x68(%rsp), %rdi xorl %ebp, %ebp jmp 0x2e6ca movb $0x1, %bpl cmpq %r15, %rdi je 0x2e6dc movq 0x78(%rsp), %rsi incq %rsi callq 0x8580 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x2e6f3 movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 testb %bpl, %bpl je 0x2e711 movb $0x1, %bpl leaq 0x48(%rsp), %rdx leaq 0x28(%rsp), %rcx movq %rbx, %rdi xorl %esi, %esi callq 0x33016 jmp 0x2e750 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi xorl %edx, %edx callq 0x2e7e7 leaq 0x48(%rsp), %rdx leaq 0x8(%rsp), %rcx movq %rbx, %rdi xorl %esi, %esi callq 0x33016 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x2e74d movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 movb $0x1, %bpl movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x2e767 movq 0x38(%rsp), %rsi incq %rsi callq 0x8580 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x2e532 movq 0x58(%rsp), %rsi incq %rsi callq 0x8580 jmp 0x2e532 jmp 0x2e78d jmp 0x2e7a9 jmp 0x2e7a9 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x2e7ac movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 jmp 0x2e7ac movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x2e7c8 movq 0x38(%rsp), %rsi incq %rsi callq 0x8580 jmp 0x2e7c8 movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x2e7df movq 0x58(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rdi callq 0x8960
_ZN7httplib6detail12parse_headerIZNS0_12read_headersERNS_6StreamERSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_NS0_11case_ignore4hashENSB_8equal_toESaISt4pairIKSA_SA_EEEEUlRSF_SK_E_EEbPKcSN_T_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r14, rsi mov rsi, rdi cmp r14, rdi jbe short loc_2E471 loc_2E457: movzx eax, byte ptr [r14-1] cmp eax, 20h ; ' ' jz short loc_2E466 cmp eax, 9 jnz short loc_2E471 loc_2E466: dec r14 cmp r14, rsi ja short loc_2E457 mov r14, rsi loc_2E471: mov rdx, rsi cmp r14, rsi jbe short loc_2E492 mov rax, r14 sub rax, rsi mov rdx, rsi loc_2E482: cmp byte ptr [rdx], 3Ah ; ':' jz short loc_2E492 inc rdx dec rax jnz short loc_2E482 mov rdx, r14 loc_2E492: cmp rdx, r14 jz loc_2E530 cmp byte ptr [rdx], 3Ah ; ':' jnz loc_2E530 lea r15, [rdx+1] cmp r15, r14 jnb short loc_2E4D3 mov rax, r14 sub rax, rdx lea rcx, [rdx+rax] dec rax loc_2E4BA: movzx edi, byte ptr [r15] cmp edi, 20h ; ' ' jz short loc_2E4C8 cmp edi, 9 jnz short loc_2E4D3 loc_2E4C8: inc r15 dec rax jnz short loc_2E4BA mov r15, rcx loc_2E4D3: xor ebp, ebp cmp rdx, rsi jz short loc_2E532 cmp r15, r14 ja short loc_2E532 lea r12, [rsp+0B8h+var_60] mov [r12-10h], r12 lea rdi, [rsp+0B8h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+0B8h+var_80] mov [r13-10h], r13 lea rdi, [rsp+0B8h+var_90] mov rsi, r15 mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [rsp+0B8h+var_88] test rcx, rcx jz loc_2E5DC cmp rcx, 2 jz short loc_2E546 cmp rcx, 1 jnz short loc_2E568 mov rax, [rsp+0B8h+var_90] jmp loc_2E5C8 loc_2E530: xor ebp, ebp loc_2E532: mov eax, ebp add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2E546: mov rax, [rsp+0B8h+var_90] mov cl, [rax] lea edx, [rcx-21h] cmp dl, 5Eh ; '^' setnb dl test cl, cl setns cl test cl, dl jnz loc_2E649 inc rax jmp short loc_2E5C8 loc_2E568: mov rax, [rsp+0B8h+var_90] mov dl, [rax] lea esi, [rdx-21h] cmp sil, 5Eh ; '^' setnb sil test dl, dl setns dl test dl, sil jnz loc_2E649 lea rdx, [rcx-1] add rcx, 0FFFFFFFFFFFFFFFEh xor esi, esi loc_2E592: movzx edi, byte ptr [rax+rsi+1] cmp edi, 9 jz short loc_2E5BD cmp edi, 20h ; ' ' jz short loc_2E5BD lea r8d, [rdi-21h] cmp r8b, 5Eh ; '^' setnb r8b test dil, dil setns dil test dil, r8b jnz loc_2E649 loc_2E5BD: inc rsi cmp rcx, rsi jnz short loc_2E592 add rax, rdx loc_2E5C8: mov al, [rax] lea ecx, [rax-21h] cmp cl, 5Eh ; '^' setb cl test al, al sets al or al, cl jz short loc_2E649 loc_2E5DC: lea r14, [rsp+0B8h+var_A0] mov [r14-10h], r14 lea rsi, aLocation_0; "Location" lea rdx, aLocation_0+8; "" lea rdi, [rsp+0B8h+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, [rsp+0B8h+var_68] cmp rax, [rsp+0B8h+var_A8] jnz short loc_2E650 mov bpl, 1 mov rdi, [rsp+0B8h+var_B0] test rax, rax jz loc_2E6E1 mov rcx, [rsp+0B8h+var_70] xor edx, edx lea rsi, _ZZN7httplib6detail11case_ignore8to_lowerEiE5table; httplib::detail::case_ignore::to_lower(int)::table loc_2E628: movzx r8d, byte ptr [rcx+rdx] movzx r9d, byte ptr [rdi+rdx] mov r8b, [r8+rsi] cmp r8b, [r9+rsi] jnz short loc_2E650 inc rdx cmp rax, rdx jnz short loc_2E628 jmp loc_2E6E1 loc_2E649: xor ebp, ebp jmp loc_2E750 loc_2E650: lea r15, [rsp+0B8h+var_40] mov [r15-10h], r15 lea rsi, aReferer; "Referer" lea rdx, aReferer+7; "" lea rdi, [rsp+0B8h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, [rsp+0B8h+var_68] cmp rax, [rsp+0B8h+var_48] jnz short loc_2E6BE mov rdi, [rsp+0B8h+var_50]; void * test rax, rax jz short loc_2E6C7 mov rcx, [rsp+0B8h+var_70] dec rax xor edx, edx lea rsi, _ZZN7httplib6detail11case_ignore8to_lowerEiE5table; httplib::detail::case_ignore::to_lower(int)::table loc_2E698: movzx r8d, byte ptr [rcx+rdx] movzx r9d, byte ptr [rdi+rdx] mov r8b, [r8+rsi] cmp r8b, [r9+rsi] setz bpl jnz short loc_2E6CA lea r8, [rdx+1] cmp rax, rdx mov rdx, r8 jnz short loc_2E698 jmp short loc_2E6CA loc_2E6BE: mov rdi, [rsp+0B8h+var_50] xor ebp, ebp jmp short loc_2E6CA loc_2E6C7: mov bpl, 1 loc_2E6CA: cmp rdi, r15 jz short loc_2E6DC mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E6DC: mov rdi, [rsp+0B8h+var_B0]; void * loc_2E6E1: cmp rdi, r14 jz short loc_2E6F3 mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E6F3: test bpl, bpl jz short loc_2E711 mov bpl, 1 lea rdx, [rsp+0B8h+var_70] lea rcx, [rsp+0B8h+var_90] mov rdi, rbx xor esi, esi call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEENSA_20_Node_const_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,std::integral_constant<bool,false>,std::string const&,std::string const&) jmp short loc_2E750 loc_2E711: lea rdi, [rsp+0B8h+var_B0] lea rsi, [rsp+0B8h+var_90] xor edx, edx call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool) lea rdx, [rsp+0B8h+var_70] lea rcx, [rsp+0B8h+var_B0] mov rdi, rbx xor esi, esi call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEENSA_20_Node_const_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,std::integral_constant<bool,false>,std::string const&,std::string const&) mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, r14 jz short loc_2E74D mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E74D: mov bpl, 1 loc_2E750: mov rdi, [rsp+0B8h+var_90]; void * cmp rdi, r13 jz short loc_2E767 mov rsi, [rsp+0B8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E767: mov rdi, [rsp+0B8h+var_70]; void * cmp rdi, r12 jz loc_2E532 mov rsi, [rsp+0B8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_2E532 jmp short loc_2E78D jmp short loc_2E7A9 jmp short loc_2E7A9 loc_2E78D: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_2E7AC mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2E7AC loc_2E7A9: mov rbx, rax loc_2E7AC: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_2E7C8 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2E7C8 mov rbx, rax loc_2E7C8: mov rdi, [rsp+arg_40]; void * cmp rdi, r12 jz short loc_2E7DF mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E7DF: mov rdi, rbx call __Unwind_Resume
long long httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream &,std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string const&,std::string const&)#1}>( _BYTE *a1, unsigned long long a2, int a3) { int v6; // eax _BYTE *v7; // rdx unsigned long long v8; // rax _BYTE *v9; // r15 long long v10; // rax int v11; // edi unsigned int v12; // ebp char *v13; // rax long long v15; // rsi int v16; // edi long long v17; // r8 long long v18; // r9 _QWORD *v19; // rdi long long v20; // rdx _QWORD *v21; // rdi char *v22; // rdx int v24; // r8d int v25; // r9d void *v26[2]; // [rsp+8h] [rbp-B0h] BYREF _QWORD v27[2]; // [rsp+18h] [rbp-A0h] BYREF void *v28; // [rsp+28h] [rbp-90h] BYREF long long v29; // [rsp+30h] [rbp-88h] _QWORD v30[2]; // [rsp+38h] [rbp-80h] BYREF void *v31; // [rsp+48h] [rbp-70h] BYREF char *v32; // [rsp+50h] [rbp-68h] _QWORD v33[2]; // [rsp+58h] [rbp-60h] BYREF void *v34[2]; // [rsp+68h] [rbp-50h] BYREF _QWORD v35[8]; // [rsp+78h] [rbp-40h] BYREF if ( a2 > (unsigned long long)a1 ) { while ( 1 ) { v6 = *(unsigned __int8 *)(a2 - 1); if ( v6 != 32 && v6 != 9 ) break; if ( --a2 <= (unsigned long long)a1 ) { a2 = (unsigned long long)a1; break; } } } v7 = a1; if ( a2 > (unsigned long long)a1 ) { v8 = a2 - (_QWORD)a1; v7 = a1; while ( *v7 != 58 ) { ++v7; if ( !--v8 ) { v7 = (_BYTE *)a2; break; } } } if ( v7 == (_BYTE *)a2 || *v7 != 58 ) return 0; v9 = v7 + 1; if ( (unsigned long long)(v7 + 1) < a2 ) { v10 = a2 - (_QWORD)v7 - 1; while ( 1 ) { v11 = (unsigned __int8)*v9; if ( v11 != 32 && v11 != 9 ) break; ++v9; if ( !--v10 ) { v9 = (_BYTE *)a2; break; } } } v12 = 0; if ( v7 != a1 && (unsigned long long)v9 <= a2 ) { v31 = v33; std::string::_M_construct<char const*>((long long)&v31, a1, (long long)v7); v28 = v30; std::string::_M_construct<char const*>((long long)&v28, v9, a2); switch ( v29 ) { case 0LL: goto LABEL_37; case 2LL: if ( (unsigned __int8)(*(_BYTE *)v28 - 33) >= 0x5Eu && *(_BYTE *)v28 >= 0 ) goto LABEL_43; v13 = (char *)v28 + 1; break; case 1LL: v13 = (char *)v28; break; default: if ( (unsigned __int8)(*(_BYTE *)v28 - 33) < 0x5Eu || *(_BYTE *)v28 < 0 ) { v15 = 0LL; while ( 1 ) { v16 = *((unsigned __int8 *)v28 + v15 + 1); if ( v16 != 9 && v16 != 32 && (unsigned __int8)(v16 - 33) >= 0x5Eu && (v16 & 0x80u) == 0 ) break; if ( v29 - 2 == ++v15 ) { v13 = (char *)v28 + v29 - 1; goto LABEL_36; } } } goto LABEL_43; } LABEL_36: if ( (unsigned __int8)(*v13 - 33) < 0x5Eu || *v13 < 0 ) { LABEL_37: v26[0] = v27; std::string::_M_construct<char const*>((long long)v26, "Location", (long long)""); if ( v32 == v26[1] ) { LOBYTE(v12) = 1; v19 = v26[0]; if ( !v32 ) { LABEL_55: if ( v19 != v27 ) operator delete(v19, v27[0] + 1LL); if ( (_BYTE)v12 ) { LOBYTE(v12) = 1; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>( a3, 0, (unsigned int)&v31, (unsigned int)&v28, v17, v18); } else { httplib::detail::decode_url(v26, &v28, 0LL); std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>( a3, 0, (unsigned int)&v31, (unsigned int)v26, v24, v25); if ( v26[0] != v27 ) operator delete(v26[0], v27[0] + 1LL); LOBYTE(v12) = 1; } goto LABEL_62; } v20 = 0LL; while ( 1 ) { v17 = *((unsigned __int8 *)v31 + v20); v18 = *((unsigned __int8 *)v26[0] + v20); LOBYTE(v17) = httplib::detail::case_ignore::to_lower(int)::table[v17]; if ( (_BYTE)v17 != httplib::detail::case_ignore::to_lower(int)::table[v18] ) break; if ( v32 == (char *)++v20 ) goto LABEL_55; } } v34[0] = v35; std::string::_M_construct<char const*>((long long)v34, "Referer", (long long)""); if ( v32 == v34[1] ) { v21 = v34[0]; if ( v32 ) { v22 = 0LL; do { v17 = (unsigned __int8)v22[(_QWORD)v31]; v18 = *((unsigned __int8 *)v34[0] + (unsigned long long)v22); LOBYTE(v17) = httplib::detail::case_ignore::to_lower(int)::table[v17]; LOBYTE(v12) = (_BYTE)v17 == httplib::detail::case_ignore::to_lower(int)::table[v18]; if ( (_BYTE)v17 != httplib::detail::case_ignore::to_lower(int)::table[v18] ) break; LODWORD(v17) = (_DWORD)v22 + 1; } while ( v32 - 1 != v22++ ); } else { LOBYTE(v12) = 1; } } else { v21 = v34[0]; v12 = 0; } if ( v21 != v35 ) operator delete(v21, v35[0] + 1LL); v19 = v26[0]; goto LABEL_55; } LABEL_43: v12 = 0; LABEL_62: if ( v28 != v30 ) operator delete(v28, v30[0] + 1LL); if ( v31 != v33 ) operator delete(v31, v33[0] + 1LL); } return v12; }
parse_header<httplib::detail::read_headers(httplib::Stream&,std::unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R14,RSI MOV RSI,RDI CMP R14,RDI JBE 0x0012e471 LAB_0012e457: MOVZX EAX,byte ptr [R14 + -0x1] CMP EAX,0x20 JZ 0x0012e466 CMP EAX,0x9 JNZ 0x0012e471 LAB_0012e466: DEC R14 CMP R14,RSI JA 0x0012e457 MOV R14,RSI LAB_0012e471: MOV RDX,RSI CMP R14,RSI JBE 0x0012e492 MOV RAX,R14 SUB RAX,RSI MOV RDX,RSI LAB_0012e482: CMP byte ptr [RDX],0x3a JZ 0x0012e492 INC RDX DEC RAX JNZ 0x0012e482 MOV RDX,R14 LAB_0012e492: CMP RDX,R14 JZ 0x0012e530 CMP byte ptr [RDX],0x3a JNZ 0x0012e530 LEA R15,[RDX + 0x1] CMP R15,R14 JNC 0x0012e4d3 MOV RAX,R14 SUB RAX,RDX LEA RCX,[RDX + RAX*0x1] DEC RAX LAB_0012e4ba: MOVZX EDI,byte ptr [R15] CMP EDI,0x20 JZ 0x0012e4c8 CMP EDI,0x9 JNZ 0x0012e4d3 LAB_0012e4c8: INC R15 DEC RAX JNZ 0x0012e4ba MOV R15,RCX LAB_0012e4d3: XOR EBP,EBP CMP RDX,RSI JZ 0x0012e532 CMP R15,R14 JA 0x0012e532 LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 LEA RDI,[RSP + 0x48] CALL 0x0010b820 LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0012e4fc: LEA RDI,[RSP + 0x28] MOV RSI,R15 MOV RDX,R14 CALL 0x0010b820 MOV RCX,qword ptr [RSP + 0x30] TEST RCX,RCX JZ 0x0012e5dc CMP RCX,0x2 JZ 0x0012e546 CMP RCX,0x1 JNZ 0x0012e568 MOV RAX,qword ptr [RSP + 0x28] JMP 0x0012e5c8 LAB_0012e530: XOR EBP,EBP LAB_0012e532: MOV EAX,EBP ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012e546: MOV RAX,qword ptr [RSP + 0x28] MOV CL,byte ptr [RAX] LEA EDX,[RCX + -0x21] CMP DL,0x5e SETNC DL TEST CL,CL SETNS CL TEST CL,DL JNZ 0x0012e649 INC RAX JMP 0x0012e5c8 LAB_0012e568: MOV RAX,qword ptr [RSP + 0x28] MOV DL,byte ptr [RAX] LEA ESI,[RDX + -0x21] CMP SIL,0x5e SETNC SIL TEST DL,DL SETNS DL TEST DL,SIL JNZ 0x0012e649 LEA RDX,[RCX + -0x1] ADD RCX,-0x2 XOR ESI,ESI LAB_0012e592: MOVZX EDI,byte ptr [RAX + RSI*0x1 + 0x1] CMP EDI,0x9 JZ 0x0012e5bd CMP EDI,0x20 JZ 0x0012e5bd LEA R8D,[RDI + -0x21] CMP R8B,0x5e SETNC R8B TEST DIL,DIL SETNS DIL TEST DIL,R8B JNZ 0x0012e649 LAB_0012e5bd: INC RSI CMP RCX,RSI JNZ 0x0012e592 ADD RAX,RDX LAB_0012e5c8: MOV AL,byte ptr [RAX] LEA ECX,[RAX + -0x21] CMP CL,0x5e SETC CL TEST AL,AL SETS AL OR AL,CL JZ 0x0012e649 LAB_0012e5dc: LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LAB_0012e5e5: LEA RSI,[0x1448cf] LEA RDX,[0x1448d7] LEA RDI,[RSP + 0x8] CALL 0x0010b820 MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x10] JNZ 0x0012e650 MOV BPL,0x1 MOV RDI,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x0012e6e1 MOV RCX,qword ptr [RSP + 0x48] XOR EDX,EDX LEA RSI,[0x145f20] LAB_0012e628: MOVZX R8D,byte ptr [RCX + RDX*0x1] MOVZX R9D,byte ptr [RDI + RDX*0x1] MOV R8B,byte ptr [R8 + RSI*0x1] CMP R8B,byte ptr [R9 + RSI*0x1] JNZ 0x0012e650 INC RDX CMP RAX,RDX JNZ 0x0012e628 JMP 0x0012e6e1 LAB_0012e649: XOR EBP,EBP JMP 0x0012e750 LAB_0012e650: LEA R15,[RSP + 0x78] MOV qword ptr [R15 + -0x10],R15 LAB_0012e659: LEA RSI,[0x1448d8] LEA RDX,[0x1448df] LEA RDI,[RSP + 0x68] CALL 0x0010b820 MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x70] JNZ 0x0012e6be MOV RDI,qword ptr [RSP + 0x68] TEST RAX,RAX JZ 0x0012e6c7 MOV RCX,qword ptr [RSP + 0x48] DEC RAX XOR EDX,EDX LEA RSI,[0x145f20] LAB_0012e698: MOVZX R8D,byte ptr [RCX + RDX*0x1] MOVZX R9D,byte ptr [RDI + RDX*0x1] MOV R8B,byte ptr [R8 + RSI*0x1] CMP R8B,byte ptr [R9 + RSI*0x1] SETZ BPL JNZ 0x0012e6ca LEA R8,[RDX + 0x1] CMP RAX,RDX MOV RDX,R8 JNZ 0x0012e698 JMP 0x0012e6ca LAB_0012e6be: MOV RDI,qword ptr [RSP + 0x68] XOR EBP,EBP JMP 0x0012e6ca LAB_0012e6c7: MOV BPL,0x1 LAB_0012e6ca: CMP RDI,R15 JZ 0x0012e6dc MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00108580 LAB_0012e6dc: MOV RDI,qword ptr [RSP + 0x8] LAB_0012e6e1: CMP RDI,R14 JZ 0x0012e6f3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108580 LAB_0012e6f3: TEST BPL,BPL JZ 0x0012e711 MOV BPL,0x1 LAB_0012e6fb: LEA RDX,[RSP + 0x48] LEA RCX,[RSP + 0x28] MOV RDI,RBX XOR ESI,ESI CALL 0x00133016 JMP 0x0012e750 LAB_0012e711: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] XOR EDX,EDX CALL 0x0012e7e7 LAB_0012e722: LEA RDX,[RSP + 0x48] LEA RCX,[RSP + 0x8] MOV RDI,RBX XOR ESI,ESI CALL 0x00133016 LAB_0012e736: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0012e74d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108580 LAB_0012e74d: MOV BPL,0x1 LAB_0012e750: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0012e767 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00108580 LAB_0012e767: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x0012e532 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00108580 JMP 0x0012e532
/* bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >&)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >&)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}) */ bool httplib::detail:: parse_header<httplib::detail::read_headers(httplib::Stream&,std::unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::_lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)_1_> (char *param_1,char *param_2,int8 param_3) { char cVar1; long lVar2; long *plVar3; char *pcVar4; char *pcVar5; char *pcVar6; char *pcVar7; bool bVar8; bool bVar9; long *local_b0; long local_a8; long local_a0 [2]; long *local_90; long local_88; long local_80 [2]; long *local_70; long local_68; long local_60 [2]; long *local_50; long local_48; long local_40 [2]; pcVar6 = param_2; if (param_1 < param_2) { do { if ((param_2[-1] != ' ') && (pcVar6 = param_2, param_2[-1] != '\t')) break; param_2 = param_2 + -1; pcVar6 = param_1; } while (param_1 < param_2); } pcVar5 = param_1; if (param_1 < pcVar6) { lVar2 = (long)pcVar6 - (long)param_1; pcVar4 = param_1; do { pcVar5 = pcVar4; if (*pcVar4 == ':') break; pcVar4 = pcVar4 + 1; lVar2 = lVar2 + -1; pcVar5 = pcVar6; } while (lVar2 != 0); } if ((pcVar5 == pcVar6) || (*pcVar5 != ':')) { return false; } pcVar4 = pcVar5 + 1; pcVar7 = pcVar4; if (pcVar4 < pcVar6) { lVar2 = ((long)pcVar6 - (long)pcVar5) + -1; do { if ((*pcVar4 != ' ') && (pcVar7 = pcVar4, *pcVar4 != '\t')) break; pcVar4 = pcVar4 + 1; lVar2 = lVar2 + -1; pcVar7 = pcVar5 + ((long)pcVar6 - (long)pcVar5); } while (lVar2 != 0); } if (pcVar5 == param_1) { return false; } if (pcVar6 < pcVar7) { return false; } local_70 = local_60; std::__cxx11::string::_M_construct<char_const*>(&local_70); /* try { // try from 0012e4fc to 0012e50b has its CatchHandler @ 0012e7c5 */ local_90 = local_80; std::__cxx11::string::_M_construct<char_const*>(&local_90,pcVar7,pcVar6); if (local_88 == 0) { LAB_0012e5dc: /* try { // try from 0012e5e5 to 0012e5fc has its CatchHandler @ 0012e7a9 */ local_b0 = local_a0; std::__cxx11::string::_M_construct<char_const*>(&local_b0,"Location",""); if (local_68 == local_a8) { bVar8 = true; if (local_68 != 0) { lVar2 = 0; do { if (case_ignore::to_lower(int)::table[*(byte *)((long)local_70 + lVar2)] != case_ignore::to_lower(int)::table[*(byte *)((long)local_b0 + lVar2)]) goto LAB_0012e650; lVar2 = lVar2 + 1; } while (local_68 != lVar2); } } else { LAB_0012e650: /* try { // try from 0012e659 to 0012e670 has its CatchHandler @ 0012e78d */ local_50 = local_40; std::__cxx11::string::_M_construct<char_const*>(&local_50,"Referer",""); if (local_68 == local_48) { if (local_68 == 0) { bVar8 = true; } else { lVar2 = 0; do { bVar8 = case_ignore::to_lower(int)::table[*(byte *)((long)local_70 + lVar2)] == case_ignore::to_lower(int)::table[*(byte *)((long)local_50 + lVar2)]; if (!bVar8) break; bVar9 = local_68 + -1 != lVar2; lVar2 = lVar2 + 1; } while (bVar9); } } else { bVar8 = false; } if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } if (bVar8) { bVar8 = true; /* try { // try from 0012e6fb to 0012e70e has its CatchHandler @ 0012e78b */ std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> ::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&> (param_3,0,&local_70,&local_90); } else { /* try { // try from 0012e711 to 0012e721 has its CatchHandler @ 0012e789 */ decode_url((string *)&local_b0,SUB81(&local_90,0)); /* try { // try from 0012e722 to 0012e735 has its CatchHandler @ 0012e787 */ std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> ::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&> (param_3,0,&local_70,&local_b0); if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } bVar8 = true; } } else { if (local_88 == 2) { if ((char)*local_90 < '\0' || (byte)((char)*local_90 - 0x21U) < 0x5e) { plVar3 = (long *)((long)local_90 + 1); goto LAB_0012e5c8; } } else { plVar3 = local_90; if (local_88 != 1) { if (-1 < (char)*local_90 && 0x5d < (byte)((char)*local_90 - 0x21U)) goto LAB_0012e649; lVar2 = 0; do { cVar1 = *(char *)((long)local_90 + lVar2 + 1); if (((cVar1 != '\t') && (cVar1 != ' ')) && (-1 < cVar1 && 0x5d < (byte)(cVar1 - 0x21U))) goto LAB_0012e649; lVar2 = lVar2 + 1; } while (local_88 + -2 != lVar2); plVar3 = (long *)((long)local_90 + local_88 + -1); } LAB_0012e5c8: if ((char)*plVar3 < '\0' || (byte)((char)*plVar3 - 0x21U) < 0x5e) goto LAB_0012e5dc; } LAB_0012e649: bVar8 = false; } if (local_90 != local_80) { operator_delete(local_90,local_80[0] + 1); } if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } return bVar8; }
11,048
ma_real_read
eloqsql/libmariadb/libmariadb/ma_net.c
static ulong ma_real_read(NET *net, size_t *complen) { uchar *pos; ssize_t length; uint i; ulong len=packet_error; size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE : NET_HEADER_SIZE); *complen = 0; net->reading_or_writing=1; pos = net->buff + net->where_b; /* net->packet -4 */ for (i=0 ; i < 2 ; i++) { while (remain > 0) { /* First read is done with non blocking mode */ if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L) { len= packet_error; net->error=2; /* Close socket */ goto end; } remain -= (ulong) length; pos+= (ulong) length; } if (i == 0) { /* First parts is packet length */ ulong helping; net->pkt_nr= net->buff[net->where_b + 3]; net->compress_pkt_nr= ++net->pkt_nr; #ifdef HAVE_COMPRESS if (net->compress) { /* complen is > 0 if package is really compressed */ *complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE])); } #endif len=uint3korr(net->buff+net->where_b); if (!len) goto end; helping = max(len,(ulong)*complen) + net->where_b; /* The necessary size of net->buff */ if (helping >= net->max_packet) { if (net_realloc(net, helping)) { len= packet_error; /* Return error */ goto end; } } pos=net->buff + net->where_b; remain = len; } } end: net->reading_or_writing=0; return(len); }
O0
c
ma_real_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movsbl 0x84(%rax), %edx movl $0x4, %eax movl $0x7, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax cltq movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movb $0x1, 0x80(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x2, -0x24(%rbp) jae 0x6be31 jmp 0x6bc57 cmpq $0x0, -0x38(%rbp) jbe 0x6bcb2 movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x48a00 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jg 0x6bc95 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movb $0x2, 0x94(%rax) jmp 0x6be33 movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x6bc57 cmpl $0x0, -0x24(%rbp) jne 0x6be21 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl 0x3(%rax,%rcx), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x8(%rbp), %rax movl 0x60(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x60(%rax) movq -0x8(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x8(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x6bd4d movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl 0x4(%rax,%rcx), %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x5(%rcx,%rdx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x6(%rcx,%rdx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl (%rax,%rcx), %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x1(%rcx,%rdx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x2(%rcx,%rdx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x6bda7 jmp 0x6be33 movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jbe 0x6bdbe movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x6bdc9 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x50(%rcx), %rax jb 0x6be05 movq -0x8(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x6bed0 cmpb $0x0, %al je 0x6be03 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) jmp 0x6be33 jmp 0x6be05 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x6be23 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x6bc4b jmp 0x6be33 movq -0x8(%rbp), %rax movb $0x0, 0x80(%rax) movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
ma_real_read: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov eax, 0FFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_8] movsx edx, byte ptr [rax+84h] mov eax, 4 mov ecx, 7 cmp edx, 0 cmovnz eax, ecx cdqe mov [rbp+var_38], rax mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov byte ptr [rax+80h], 1 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_18], rax mov [rbp+var_24], 0 loc_6BC4B: cmp [rbp+var_24], 2 jnb loc_6BE31 jmp short $+2 loc_6BC57: cmp [rbp+var_38], 0 jbe short loc_6BCB2 mov rax, [rbp+var_8] mov rdi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_38] call ma_pvio_cache_read mov [rbp+var_20], rax cmp rax, 0 jg short loc_6BC95 mov eax, 0FFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_8] mov byte ptr [rax+94h], 2 jmp loc_6BE33 loc_6BC95: mov rcx, [rbp+var_20] mov rax, [rbp+var_38] sub rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, [rbp+var_18] mov [rbp+var_18], rax jmp short loc_6BC57 loc_6BCB2: cmp [rbp+var_24], 0 jnz loc_6BE21 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx ecx, byte ptr [rax+rcx+3] mov rax, [rbp+var_8] mov [rax+60h], ecx mov rax, [rbp+var_8] mov ecx, [rax+60h] add ecx, 1 mov [rax+60h], ecx mov rax, [rbp+var_8] mov [rax+64h], ecx mov rax, [rbp+var_8] cmp byte ptr [rax+84h], 0 jz short loc_6BD4D mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx eax, byte ptr [rax+rcx+4] mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+5] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+6] shl ecx, 10h add eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx loc_6BD4D: mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+2] shl ecx, 10h add eax, ecx mov eax, eax mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_6BDA7 jmp loc_6BE33 loc_6BDA7: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] cmp rax, [rcx] jbe short loc_6BDBE mov rax, [rbp+var_30] mov [rbp+var_48], rax jmp short loc_6BDC9 loc_6BDBE: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax loc_6BDC9: mov rax, [rbp+var_48] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_8] cmp rax, [rcx+50h] jb short loc_6BE05 mov rdi, [rbp+var_8] mov rsi, [rbp+var_40] call net_realloc cmp al, 0 jz short loc_6BE03 mov eax, 0FFFFFFFFh mov [rbp+var_30], rax jmp short loc_6BE33 loc_6BE03: jmp short $+2 loc_6BE05: mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_18], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_6BE21: jmp short $+2 loc_6BE23: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_6BC4B loc_6BE31: jmp short $+2 loc_6BE33: mov rax, [rbp+var_8] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_30] add rsp, 50h pop rbp retn
unsigned long long ma_real_read(long long a1, unsigned long long *a2) { int v2; // eax int v3; // ecx long long v4; // rdx unsigned long long v6; // [rsp+8h] [rbp-48h] unsigned long long v7; // [rsp+10h] [rbp-40h] unsigned long long v8; // [rsp+18h] [rbp-38h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned int i; // [rsp+2Ch] [rbp-24h] long long v11; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] v9 = 0xFFFFFFFFLL; v2 = 4; if ( *(_BYTE *)(a1 + 132) ) v2 = 7; v8 = v2; *a2 = 0LL; *(_BYTE *)(a1 + 128) = 1; v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); for ( i = 0; i < 2; ++i ) { while ( v8 ) { v11 = ma_pvio_cache_read(*(_QWORD **)a1, v12, v8); if ( v11 <= 0 ) { v9 = 0xFFFFFFFFLL; *(_BYTE *)(a1 + 148) = 2; goto LABEL_21; } v8 -= v11; v12 += v11; } if ( !i ) { *(_DWORD *)(a1 + 96) = *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 3LL); v3 = *(_DWORD *)(a1 + 96) + 1; *(_DWORD *)(a1 + 96) = v3; *(_DWORD *)(a1 + 100) = v3; if ( *(_BYTE *)(a1 + 132) ) *a2 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 6LL) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 5LL) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 4LL); v4 = *(_QWORD *)(a1 + 72); v9 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4); if ( !((*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4)) ) break; if ( v9 <= *a2 ) v6 = *a2; else v6 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 1LL) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72)); v7 = *(_QWORD *)(a1 + 72) + v6; if ( v7 >= *(_QWORD *)(a1 + 80) && (unsigned __int8)net_realloc(a1, v7) ) { v9 = 0xFFFFFFFFLL; break; } v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); v8 = v9; } } LABEL_21: *(_BYTE *)(a1 + 128) = 0; return v9; }
ma_real_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x84] MOV EAX,0x4 MOV ECX,0x7 CMP EDX,0x0 CMOVNZ EAX,ECX CDQE MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x80],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_0016bc4b: CMP dword ptr [RBP + -0x24],0x2 JNC 0x0016be31 JMP 0x0016bc57 LAB_0016bc57: CMP qword ptr [RBP + -0x38],0x0 JBE 0x0016bcb2 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00148a00 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JG 0x0016bc95 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x94],0x2 JMP 0x0016be33 LAB_0016bc95: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX JMP 0x0016bc57 LAB_0016bcb2: CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0016be21 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX ECX,byte ptr [RAX + RCX*0x1 + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x60] ADD ECX,0x1 MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x84],0x0 JZ 0x0016bd4d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x4] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x5] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x6] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_0016bd4d: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0016bda7 JMP 0x0016be33 LAB_0016bda7: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JBE 0x0016bdbe MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX JMP 0x0016bdc9 LAB_0016bdbe: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_0016bdc9: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x50] JC 0x0016be05 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x40] CALL 0x0016bed0 CMP AL,0x0 JZ 0x0016be03 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX JMP 0x0016be33 LAB_0016be03: JMP 0x0016be05 LAB_0016be05: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0016be21: JMP 0x0016be23 LAB_0016be23: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0016bc4b LAB_0016be31: JMP 0x0016be33 LAB_0016be33: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
ulong ma_real_read(int8 *param_1,ulong *param_2) { char cVar1; int iVar2; long lVar3; ulong local_50; ulong local_40; ulong local_38; uint local_2c; long local_20; local_38 = 0xffffffff; iVar2 = 4; if (*(char *)((long)param_1 + 0x84) != '\0') { iVar2 = 7; } local_40 = (ulong)iVar2; *param_2 = 0; *(int1 *)(param_1 + 0x10) = 1; local_20 = param_1[1] + param_1[9]; local_2c = 0; do { if (1 < local_2c) { LAB_0016be33: *(int1 *)(param_1 + 0x10) = 0; return local_38; } for (; local_40 != 0; local_40 = local_40 - lVar3) { lVar3 = ma_pvio_cache_read(*param_1,local_20,local_40); if (lVar3 < 1) { local_38 = 0xffffffff; *(int1 *)((long)param_1 + 0x94) = 2; goto LAB_0016be33; } local_20 = lVar3 + local_20; } if (local_2c == 0) { *(uint *)(param_1 + 0xc) = (uint)*(byte *)(param_1[1] + 3 + param_1[9]); iVar2 = *(int *)(param_1 + 0xc); *(int *)(param_1 + 0xc) = iVar2 + 1; *(int *)((long)param_1 + 100) = iVar2 + 1; if (*(char *)((long)param_1 + 0x84) != '\0') { *param_2 = (ulong)((uint)*(byte *)(param_1[1] + 4 + param_1[9]) + (uint)*(byte *)(param_1[1] + 5 + param_1[9]) * 0x100 + (uint)*(byte *)(param_1[1] + 6 + param_1[9]) * 0x10000); } local_40 = (ulong)((uint)*(byte *)(param_1[1] + param_1[9]) + (uint)*(byte *)(param_1[1] + 1 + param_1[9]) * 0x100 + (uint)*(byte *)(param_1[1] + 2 + param_1[9]) * 0x10000); local_38 = local_40; if (local_40 == 0) goto LAB_0016be33; local_50 = local_40; if (local_40 <= *param_2) { local_50 = *param_2; } if (((ulong)param_1[10] <= local_50 + param_1[9]) && (cVar1 = net_realloc(param_1,local_50 + param_1[9]), cVar1 != '\0')) { local_38 = 0xffffffff; goto LAB_0016be33; } local_20 = param_1[1] + param_1[9]; } local_2c = local_2c + 1; } while( true ); }
11,049
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O3
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rsi, %r14 movq %rdi, %rbx leaq 0xaea72(%rip), %rax # 0xe1fd0 movb (%rax), %al testb %al, %al je 0x336cd xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0xaea31(%rip), %rdx # 0xe1fb0 leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x32efe leaq 0x20(%rsp), %r14 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x60(%rsp), %rdi xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movaps %xmm0, (%r14) movq %rax, 0x10(%r14) callq 0x1f160 movq (%rsp), %r15 movq 0x8(%rsp), %r12 movq %r14, %rdi callq 0x1f160 cmpq %r12, %r15 je 0x33724 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi movl $0x8, %edx callq 0x18b60 leaq 0x30(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) leaq 0x50(%rsp), %rbp leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl $0x2c, %edx callq 0x18cd0 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x3367b movq %r12, %rdi movq %r15, %rsi callq 0x274bb movq %rbx, %rdi movq %r12, %rsi callq 0x7f6e2 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x3362e movq 0x50(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x3362e movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x33692 movq 0x30(%rsp), %rsi incq %rsi callq 0x186e0 movq 0xad8cf(%rip), %rsi # 0xe0f68 leaq 0x60(%rsp), %rdi callq 0x189e0 leaq 0xd8(%rsp), %rdi callq 0x18210 movq %rsp, %rdi callq 0x1f160 movq %rbx, %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xae8fc(%rip), %rdi # 0xe1fd0 callq 0x18c60 testl %eax, %eax je 0x33568 leaq 0xae8c8(%rip), %rdi # 0xe1fb0 leaq 0x7bdb2(%rip), %rsi # 0xaf4a1 movl $0x10, %edx callq 0x32e76 leaq -0x822(%rip), %rdi # 0x32ede leaq 0xae8a9(%rip), %rsi # 0xe1fb0 leaq 0xadfda(%rip), %rdx # 0xe16e8 callq 0x18600 leaq 0xae8b6(%rip), %rdi # 0xe1fd0 callq 0x18470 jmp 0x33568 movl $0x10, %edi callq 0x18380 movq %rax, %rbx leaq 0x7bd9b(%rip), %rsi # 0xaf4d3 movq %rax, %rdi callq 0x18280 movq 0xad8a9(%rip), %rsi # 0xe0ff0 movq 0xad822(%rip), %rdx # 0xe0f70 movq %rbx, %rdi callq 0x18bb0 movq %rax, %r14 leaq 0xae870(%rip), %rdi # 0xe1fd0 callq 0x18460 jmp 0x337e6 jmp 0x3377b movq %rax, %r14 movq %rbx, %rdi callq 0x18520 jmp 0x337de movq %rax, %r14 jmp 0x337d6 movq %rax, %r14 jmp 0x337de movq %rax, %r14 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x337a1 movq 0x50(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x337a1 jmp 0x3379e movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x337b8 movq 0x30(%rsp), %rsi incq %rsi callq 0x186e0 movq 0xad7a9(%rip), %rsi # 0xe0f68 leaq 0x60(%rsp), %rdi callq 0x189e0 leaq 0xd8(%rsp), %rdi callq 0x18210 movq %rbx, %rdi callq 0x1f160 movq %rsp, %rdi callq 0x1f160 movq %r14, %rdi callq 0x18c10
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_336CD loc_33568: xorps xmm0, xmm0 movaps xmmword ptr [rsp+218h+var_218], xmm0; int mov qword ptr [rsp+218h+var_208], 0; int lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int lea rdi, [rsp+218h+var_1F8]; int mov rsi, r14; int mov ecx, 1; int call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea r14, [rsp+218h+var_1F8] movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+218h+var_218], xmm0 mov rax, [r14+10h] mov qword ptr [rsp+218h+var_208], rax lea rdi, [rsp+218h+var_1B8] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 xor eax, eax mov [rdi+10h], rax movaps xmmword ptr [r14], xmm0 mov [r14+10h], rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov r15, qword ptr [rsp+218h+var_218] mov r12, qword ptr [rsp+218h+var_218+8] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r15, r12 jz loc_33724 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov rsi, qword ptr [rsp+218h+var_218] add rsi, 20h ; ' ' lea rdi, [rsp+218h+var_1B8] mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea r13, [rsp+218h+var_1E8] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 lea rbp, [rsp+218h+var_1C8] lea r14, [rsp+218h+var_1B8] lea r15, [rsp+218h+var_1F8] lea r12, [rsp+218h+var_1D8] loc_3362E: mov rdi, r14 mov rsi, r15 mov edx, 2Ch ; ',' call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_3367B mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_3362E mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3362E loc_3367B: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_33692 mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33692: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_336CD: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_33568 lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... 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, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_33568 loc_33724: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_337E6 jmp short loc_3377B mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_337DE mov r14, rax jmp short loc_337D6 loc_3377B: mov r14, rax jmp short loc_337DE mov r14, rax mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_337A1 mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_337A1 jmp short $+2 loc_3379E: mov r14, rax loc_337A1: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_337B8 mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_337B8: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_337D6: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_337DE: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_337E6: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { _QWORD *v2; // rax std::runtime_error *exception; // rbx int v5[4]; // [rsp+0h] [rbp-218h] BYREF int v6[2]; // [rsp+10h] [rbp-208h] __int128 v7; // [rsp+20h] [rbp-1F8h] BYREF _QWORD v8[2]; // [rsp+30h] [rbp-1E8h] BYREF void *v9[2]; // [rsp+40h] [rbp-1D8h] BYREF long long v10; // [rsp+50h] [rbp-1C8h] BYREF __int128 v11; // [rsp+60h] [rbp-1B8h] BYREF long long v12; // [rsp+70h] [rbp-1A8h] _BYTE v13[320]; // [rsp+D8h] [rbp-140h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } minja::Parser::consumeTokenGroups( (long long)&v7, a2, (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); *(_OWORD *)v5 = v7; *(_QWORD *)v6 = v8[0]; v11 = 0LL; v12 = 0LL; v7 = 0LL; v8[0] = 0LL; std::vector<std::string>::~vector((long long)&v11); std::vector<std::string>::~vector((long long)&v7); if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::istringstream::basic_istringstream(&v11, *(_QWORD *)v5 + 32LL, 8LL); *(_QWORD *)&v7 = v8; *((_QWORD *)&v7 + 1) = 0LL; LOBYTE(v8[0]) = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v11, &v7, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v9, (long long)&v7); std::vector<std::string>::emplace_back<std::string>(a1, v9); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); } if ( (_QWORD *)v7 != v8 ) operator delete((void *)v7, v8[0] + 1LL); std::istringstream::~istringstream(&v11, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v13); std::vector<std::string>::~vector((long long)v5); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x1e1fd0] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x001336cd LAB_00133568: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_00133578: LEA RDX,[0x1e1fb0] LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV ECX,0x1 CALL 0x00132efe LEA R14,[RSP + 0x20] MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x60] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI],XMM0 XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOVAPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],RAX CALL 0x0011f160 MOV R15,qword ptr [RSP] MOV R12,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x0011f160 CMP R15,R12 JZ 0x00133724 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_001335f5: LEA RDI,[RSP + 0x60] MOV EDX,0x8 CALL 0x00118b60 LEA R13,[RSP + 0x30] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 LEA RBP,[RSP + 0x50] LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] LEA R12,[RSP + 0x40] LAB_0013362e: MOV RDI,R14 MOV RSI,R15 MOV EDX,0x2c CALL 0x00118cd0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0013367b LAB_0013364c: MOV RDI,R12 MOV RSI,R15 CALL 0x001274bb LAB_00133657: MOV RDI,RBX MOV RSI,R12 CALL 0x0017f6e2 MOV RDI,qword ptr [RSP + 0x40] CMP RDI,RBP JZ 0x0013362e MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001186e0 JMP 0x0013362e LAB_0013367b: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x00133692 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001186e0 LAB_00133692: MOV RSI,qword ptr [0x001e0f68] LEA RDI,[RSP + 0x60] CALL 0x001189e0 LEA RDI,[RSP + 0xd8] CALL 0x00118210 MOV RDI,RSP CALL 0x0011f160 MOV RAX,RBX ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001336cd: LEA RDI,[0x1e1fd0] CALL 0x00118c60 TEST EAX,EAX JZ 0x00133568 LAB_001336e1: LEA RDI,[0x1e1fb0] LEA RSI,[0x1af4a1] MOV EDX,0x10 CALL 0x00132e76 LAB_001336f9: LEA RDI,[0x132ede] LEA RSI,[0x1e1fb0] LEA RDX,[0x1e16e8] CALL 0x00118600 LEA RDI,[0x1e1fd0] CALL 0x00118470 JMP 0x00133568 LAB_00133724: MOV EDI,0x10 CALL 0x00118380 MOV RBX,RAX LAB_00133731: LEA RSI,[0x1af4d3] MOV RDI,RAX CALL 0x00118280 LAB_00133740: MOV RSI,qword ptr [0x001e0ff0] MOV RDX,qword ptr [0x001e0f70] MOV RDI,RBX CALL 0x00118bb0
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { ulong *puVar1; ulong *puVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; ulong *local_218; ulong *puStack_210; ulong local_208; ulong *local_1f8; ulong *puStack_1f0; ulong local_1e8 [2]; long *local_1d8 [2]; long local_1c8 [2]; int8 local_1b8; int8 uStack_1b0; int8 local_1a8; ios_base local_140 [272]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 001336e1 to 001336f8 has its CatchHandler @ 00133756 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_218 = (ulong *)0x0; puStack_210 = (ulong *)0x0; local_208 = 0; /* try { // try from 00133578 to 00133590 has its CatchHandler @ 0013377b */ consumeTokenGroups(&local_1f8); local_218 = local_1f8; puStack_210 = puStack_1f0; local_208 = local_1e8[0]; local_1b8 = 0; uStack_1b0 = 0; local_1a8 = 0; local_1f8 = (ulong *)0x0; puStack_1f0 = (ulong *)0x0; local_1e8[0] = 0; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8); puVar2 = puStack_210; puVar1 = local_218; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1f8); if (puVar1 != puVar2) { *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; *(int8 *)(in_RDI + 0x10) = 0; /* try { // try from 001335f5 to 00133603 has its CatchHandler @ 00133776 */ std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_218 + 4,8); puStack_1f0 = (ulong *)0x0; local_1e8[0] = local_1e8[0] & 0xffffffffffffff00; local_1f8 = local_1e8; while( true ) { /* try { // try from 0013362e to 0013363d has its CatchHandler @ 0013379e */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)&local_1b8,(string *)&local_1f8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 0013364c to 00133656 has its CatchHandler @ 0013379c */ strip((minja *)local_1d8,(string *)&local_1f8); /* try { // try from 00133657 to 00133661 has its CatchHandler @ 00133780 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8); if (local_1d8[0] != local_1c8) { operator_delete(local_1d8[0],local_1c8[0] + 1); } } if (local_1f8 != local_1e8) { operator_delete(local_1f8,local_1e8[0] + 1); } std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8); std::ios_base::~ios_base(local_140); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00133731 to 0013373f has its CatchHandler @ 00133769 */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 00133740 to 00133755 has its CatchHandler @ 00133767 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70); }
11,050
flush_cached_blocks
eloqsql/storage/maria/ma_pagecache.c
static int flush_cached_blocks(PAGECACHE *pagecache, PAGECACHE_FILE *file, PAGECACHE_BLOCK_LINK **cache, PAGECACHE_BLOCK_LINK **end, enum flush_type type, int *first_errno) { int rc= PCFLUSH_OK; my_bool error; uint count= (uint) (end-cache); DBUG_ENTER("flush_cached_blocks"); *first_errno= 0; /* Don't lock the cache during the flush */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); /* As all blocks referred in 'cache' are marked by PCBLOCK_IN_FLUSH we are guaranteed that no thread will change them */ qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link); pagecache_pthread_mutex_lock(&pagecache->cache_lock); for (; cache != end; cache++) { PAGECACHE_BLOCK_LINK *block= *cache; /* In the case of non_transactional tables we want to flush also block pinned with reads. This is becasue we may have other threads reading the block during flush, as non transactional tables can have many readers while the one writer is doing the flush. We don't want to do flush pinned blocks during checkpoint. We detect the checkpoint case by checking if type is LAZY. */ if ((type == FLUSH_KEEP_LAZY && block->pins) || block->wlocks) { KEYCACHE_DBUG_PRINT("flush_cached_blocks", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /* undo the mark put by flush_pagecache_blocks_int(): */ block->status&= ~PCBLOCK_IN_FLUSH; rc|= PCFLUSH_PINNED; DBUG_PRINT("warning", ("Page pinned")); unreg_request(pagecache, block, 1); if (!*first_errno) *first_errno= HA_ERR_INTERNAL_ERROR; continue; } if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ, PAGECACHE_PIN, FALSE)) DBUG_ASSERT(0); KEYCACHE_PRINT("flush_cached_blocks", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /** @todo IO If page is contiguous with next page to flush, group flushes in one single my_pwrite(). */ /** It is important to use block->hash_link->file below and not 'file', as the first one is right and the second may have different out-of-date content (see StaleFilePointersInFlush in ma_checkpoint.c). @todo change argument of functions to be File. */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); error= pagecache_fwrite(pagecache, &block->hash_link->file, block->buffer, block->hash_link->pageno, block->type, pagecache->readwrite_flags); pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, FALSE)) DBUG_ASSERT(0); pagecache->global_cache_write++; if (error) { block->status|= PCBLOCK_ERROR; block->error= (int16) my_errno; my_debug_put_break_here(); if (!*first_errno) *first_errno= my_errno ? my_errno : -1; rc|= PCFLUSH_ERROR; } /* Let to proceed for possible waiting requests to write to the block page. It might happen only during an operation to resize the key cache. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); /* type will never be FLUSH_IGNORE_CHANGED here */ if (! (type == FLUSH_KEEP || type == FLUSH_KEEP_LAZY || type == FLUSH_FORCE_WRITE)) { if (!free_block(pagecache, block, 1)) { pagecache->blocks_changed--; pagecache->global_blocks_changed--; } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); } } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); unreg_request(pagecache, block, 1); } } DBUG_RETURN(rc); }
O3
c
flush_cached_blocks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %r14 movl %r8d, -0x2c(%rbp) movq %rdx, %r12 movq %rsi, -0x38(%rbp) movq %rdi, %r13 movq %rcx, -0x48(%rbp) movq %rcx, %rbx subq %rdx, %rbx shrq $0x3, %rbx movl $0x0, (%r9) leaq 0xc8(%rdi), %r15 movq 0x108(%rdi), %rdi testq %rdi, %rdi jne 0x35451 movq %r15, %rdi callq 0x291e0 movl %ebx, %esi leaq 0x258(%rip), %rcx # 0x3547f movl $0x8, %edx movq %r12, %rdi callq 0x295d0 cmpq $0x0, 0x108(%r13) jne 0x35466 movq %r15, %rdi callq 0x29220 cmpq -0x48(%rbp), %r12 movl -0x2c(%rbp), %eax je 0x3543c movq %r15, -0x50(%rbp) xorl %r15d, %r15d movq %r14, -0x40(%rbp) movq (%r12), %rbx cmpl $0x4, %eax jne 0x35271 cmpl $0x0, 0x64(%rbx) jne 0x35277 cmpl $0x0, 0x68(%rbx) je 0x352a5 andb $-0x11, 0x74(%rbx) orl $0x2, %r15d movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x320f7 cmpl $0x0, (%r14) jne 0x353c0 movl $0x7a, (%r14) jmp 0x353c0 movl %r15d, -0x30(%rbp) movq %r13, %rdi movq %rbx, %rsi movl $0x3, %edx movl $0x2, %ecx callq 0x31f87 movq 0x108(%r13), %rdi testq %rdi, %rdi jne 0x3540e movq -0x50(%rbp), %r15 movq %r15, %rdi callq 0x291e0 movq 0x20(%rbx), %rsi movq 0x30(%rbx), %rdx movq 0x60(%rsi), %rcx addq $0x18, %rsi movq 0x198(%r13), %r8 movq %r13, %rdi callq 0x34108 movl %eax, %r14d cmpq $0x0, 0x108(%r13) jne 0x35423 movq %r15, %rdi callq 0x29220 movq %r13, %rdi movq %rbx, %rsi movl $0x5, %edx movl $0x3, %ecx callq 0x31f87 incq 0x178(%r13) testb %r14b, %r14b movl -0x30(%rbp), %r15d je 0x35364 orb $0x1, 0x74(%rbx) callq 0xa1b22 movzwl (%rax), %eax movw %ax, 0x76(%rbx) movq -0x40(%rbp), %r14 cmpl $0x0, (%r14) jne 0x35372 callq 0xa1b22 cmpl $0x0, (%rax) je 0x3536a callq 0xa1b22 movl (%rax), %eax jmp 0x3536f movq -0x40(%rbp), %r14 jmp 0x35376 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, (%r14) orl $0x1, %r15d cmpq $0x0, 0x50(%rbx) je 0x35386 leaq 0x50(%rbx), %rdi callq 0xa674f movl -0x2c(%rbp), %eax cmpl $0x4, %eax ja 0x353d3 movl $0x19, %ecx btl %eax, %ecx jae 0x353d3 andb $-0x11, 0x74(%rbx) movq %r13, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movl $0x1, %ecx callq 0x34e82 movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x320f7 movl -0x2c(%rbp), %eax addq $0x8, %r12 cmpq -0x48(%rbp), %r12 jne 0x35262 jmp 0x3543f movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x34ca9 testb %al, %al je 0x35401 andb $-0x11, 0x74(%rbx) movq %r13, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movl $0x1, %ecx callq 0x34e82 jmp 0x353c0 decq 0x58(%r13) decq 0x168(%r13) jmp 0x353c0 leaq 0x350bfb(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x352ce movq %r15, %rdi leaq 0xa4185(%rip), %rsi # 0xd95b2 movl $0x12dd, %edx # imm = 0x12DD callq 0x2eb8f jmp 0x35312 xorl %r15d, %r15d movl %r15d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x350bb8(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x35216 leaq 0xa4145(%rip), %rsi # 0xd95b2 movq %r15, %rdi movl $0x12a3, %edx # imm = 0x12A3 callq 0x2eb8f jmp 0x3524a
flush_cached_blocks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r9 mov [rbp+var_2C], r8d mov r12, rdx mov [rbp+var_38], rsi mov r13, rdi mov [rbp+var_48], rcx mov rbx, rcx sub rbx, rdx shr rbx, 3 mov dword ptr [r9], 0 lea r15, [rdi+0C8h] mov rdi, [rdi+108h] test rdi, rdi jnz loc_35451 loc_35216: mov rdi, r15 call _pthread_mutex_unlock mov esi, ebx lea rcx, cmp_sec_link mov edx, 8 mov rdi, r12 call _qsort cmp qword ptr [r13+108h], 0 jnz loc_35466 mov rdi, r15 call _pthread_mutex_lock loc_3524A: cmp r12, [rbp+var_48] mov eax, [rbp+var_2C] jz loc_3543C mov [rbp+var_50], r15 xor r15d, r15d mov [rbp+var_40], r14 loc_35262: mov rbx, [r12] cmp eax, 4 jnz short loc_35271 cmp dword ptr [rbx+64h], 0 jnz short loc_35277 loc_35271: cmp dword ptr [rbx+68h], 0 jz short loc_352A5 loc_35277: and byte ptr [rbx+74h], 0EFh or r15d, 2 mov rdi, r13 mov rsi, rbx mov edx, 1 call unreg_request cmp dword ptr [r14], 0 jnz loc_353C0 mov dword ptr [r14], 7Ah ; 'z' jmp loc_353C0 loc_352A5: mov [rbp+var_30], r15d mov rdi, r13 mov rsi, rbx mov edx, 3 mov ecx, 2 call make_lock_and_pin mov rdi, [r13+108h] test rdi, rdi jnz loc_3540E loc_352CE: mov r15, [rbp+var_50] mov rdi, r15 call _pthread_mutex_unlock mov rsi, [rbx+20h] mov rdx, [rbx+30h] mov rcx, [rsi+60h] add rsi, 18h mov r8, [r13+198h] mov rdi, r13 call pagecache_fwrite mov r14d, eax cmp qword ptr [r13+108h], 0 jnz loc_35423 mov rdi, r15 call _pthread_mutex_lock loc_35312: mov rdi, r13 mov rsi, rbx mov edx, 5 mov ecx, 3 call make_lock_and_pin inc qword ptr [r13+178h] test r14b, r14b mov r15d, [rbp+var_30] jz short loc_35364 or byte ptr [rbx+74h], 1 call _my_thread_var movzx eax, word ptr [rax] mov [rbx+76h], ax mov r14, [rbp+var_40] cmp dword ptr [r14], 0 jnz short loc_35372 call _my_thread_var cmp dword ptr [rax], 0 jz short loc_3536A call _my_thread_var mov eax, [rax] jmp short loc_3536F loc_35364: mov r14, [rbp+var_40] jmp short loc_35376 loc_3536A: mov eax, 0FFFFFFFFh loc_3536F: mov [r14], eax loc_35372: or r15d, 1 loc_35376: cmp qword ptr [rbx+50h], 0 jz short loc_35386 lea rdi, [rbx+50h] call wqueue_release_queue loc_35386: mov eax, [rbp+var_2C] cmp eax, 4 ja short loc_353D3 mov ecx, 19h bt ecx, eax jnb short loc_353D3 and byte ptr [rbx+74h], 0EFh mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_38] mov ecx, 1 call link_to_file_list mov rdi, r13 mov rsi, rbx mov edx, 1 call unreg_request loc_353C0: mov eax, [rbp+var_2C] add r12, 8 cmp r12, [rbp+var_48] jnz loc_35262 jmp short loc_3543F loc_353D3: mov rdi, r13 mov rsi, rbx mov edx, 1 call free_block test al, al jz short loc_35401 and byte ptr [rbx+74h], 0EFh mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_38] mov ecx, 1 call link_to_file_list jmp short loc_353C0 loc_35401: dec qword ptr [r13+58h] dec qword ptr [r13+168h] jmp short loc_353C0 loc_3540E: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_352CE loc_35423: mov rdi, r15 lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12DDh call psi_mutex_lock jmp loc_35312 loc_3543C: xor r15d, r15d loc_3543F: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_35451: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_35216 loc_35466: lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 12A3h call psi_mutex_lock jmp loc_3524A
long long flush_cached_blocks(_QWORD *a1, long long a2, long long *a3, long long *a4, unsigned int a5, int *a6) { int *v6; // r14 long long *v7; // r12 unsigned long long v8; // rbx long long v9; // r15 unsigned int v10; // eax unsigned int v11; // r15d long long v12; // rbx char v13; // r14 long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // rdx long long v18; // rdx int v19; // eax long long v21; // [rsp+0h] [rbp-50h] int *v23; // [rsp+10h] [rbp-40h] v6 = a6; v7 = a3; v8 = (unsigned long long)((char *)a4 - (char *)a3) >> 3; *a6 = 0; v9 = (long long)(a1 + 25); if ( a1[33] ) PSI_server[44](); pthread_mutex_unlock(v9); qsort(v7, (unsigned int)v8, 8LL, cmp_sec_link); if ( a1[33] ) psi_mutex_lock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12A3u); else pthread_mutex_lock(v9); v10 = a5; if ( v7 == a4 ) { return 0; } else { v21 = (long long)(a1 + 25); v11 = 0; v23 = v6; do { v12 = *v7; if ( v10 == 4 && *(_DWORD *)(v12 + 100) || *(_DWORD *)(v12 + 104) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; v11 |= 2u; unreg_request(a1, v12, 1); if ( !*v6 ) *v6 = 122; } else { make_lock_and_pin((long long)a1, v12, 3, 2); if ( a1[33] ) PSI_server[44](); pthread_mutex_unlock(v21); v13 = pagecache_fwrite( (long long)a1, *(_QWORD *)(v12 + 32) + 24LL, *(_QWORD *)(v12 + 48), *(_QWORD *)(*(_QWORD *)(v12 + 32) + 96LL), a1[51]); if ( a1[33] ) psi_mutex_lock(v21, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12DDu); else pthread_mutex_lock(v21); make_lock_and_pin((long long)a1, v12, 5, 3); ++a1[47]; if ( v13 ) { *(_BYTE *)(v12 + 116) |= 1u; *(_WORD *)(v12 + 118) = *(_WORD *)my_thread_var(a1, v12, v14, v15, v16); v6 = v23; if ( !*v23 ) { if ( *(_DWORD *)my_thread_var(a1, v12, v17, v15, v16) ) v19 = *(_DWORD *)my_thread_var(a1, v12, v18, v15, v16); else v19 = -1; *v23 = v19; } v11 |= 1u; } else { v6 = v23; } if ( *(_QWORD *)(v12 + 80) ) wqueue_release_queue(v12 + 80); if ( a5 <= 4 && (v15 = 25LL, _bittest((const int *)&v15, a5)) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; link_to_file_list((long long)a1, v12, a2, 1); unreg_request(a1, v12, 1); } else if ( (unsigned __int8)free_block(a1, v12, 1LL, v15, v16) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; link_to_file_list((long long)a1, v12, a2, 1); } else { --a1[11]; --a1[45]; } } v10 = a5; ++v7; } while ( v7 != a4 ); } return v11; }
flush_cached_blocks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R9 MOV dword ptr [RBP + -0x2c],R8D MOV R12,RDX MOV qword ptr [RBP + -0x38],RSI MOV R13,RDI MOV qword ptr [RBP + -0x48],RCX MOV RBX,RCX SUB RBX,RDX SHR RBX,0x3 MOV dword ptr [R9],0x0 LEA R15,[RDI + 0xc8] MOV RDI,qword ptr [RDI + 0x108] TEST RDI,RDI JNZ 0x00135451 LAB_00135216: MOV RDI,R15 CALL 0x001291e0 MOV ESI,EBX LEA RCX,[0x13547f] MOV EDX,0x8 MOV RDI,R12 CALL 0x001295d0 CMP qword ptr [R13 + 0x108],0x0 JNZ 0x00135466 MOV RDI,R15 CALL 0x00129220 LAB_0013524a: CMP R12,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x2c] JZ 0x0013543c MOV qword ptr [RBP + -0x50],R15 XOR R15D,R15D MOV qword ptr [RBP + -0x40],R14 LAB_00135262: MOV RBX,qword ptr [R12] CMP EAX,0x4 JNZ 0x00135271 CMP dword ptr [RBX + 0x64],0x0 JNZ 0x00135277 LAB_00135271: CMP dword ptr [RBX + 0x68],0x0 JZ 0x001352a5 LAB_00135277: AND byte ptr [RBX + 0x74],0xef OR R15D,0x2 MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x001320f7 CMP dword ptr [R14],0x0 JNZ 0x001353c0 MOV dword ptr [R14],0x7a JMP 0x001353c0 LAB_001352a5: MOV dword ptr [RBP + -0x30],R15D MOV RDI,R13 MOV RSI,RBX MOV EDX,0x3 MOV ECX,0x2 CALL 0x00131f87 MOV RDI,qword ptr [R13 + 0x108] TEST RDI,RDI JNZ 0x0013540e LAB_001352ce: MOV R15,qword ptr [RBP + -0x50] MOV RDI,R15 CALL 0x001291e0 MOV RSI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RSI + 0x60] ADD RSI,0x18 MOV R8,qword ptr [R13 + 0x198] MOV RDI,R13 CALL 0x00134108 MOV R14D,EAX CMP qword ptr [R13 + 0x108],0x0 JNZ 0x00135423 MOV RDI,R15 CALL 0x00129220 LAB_00135312: MOV RDI,R13 MOV RSI,RBX MOV EDX,0x5 MOV ECX,0x3 CALL 0x00131f87 INC qword ptr [R13 + 0x178] TEST R14B,R14B MOV R15D,dword ptr [RBP + -0x30] JZ 0x00135364 OR byte ptr [RBX + 0x74],0x1 CALL 0x001a1b22 MOVZX EAX,word ptr [RAX] MOV word ptr [RBX + 0x76],AX MOV R14,qword ptr [RBP + -0x40] CMP dword ptr [R14],0x0 JNZ 0x00135372 CALL 0x001a1b22 CMP dword ptr [RAX],0x0 JZ 0x0013536a CALL 0x001a1b22 MOV EAX,dword ptr [RAX] JMP 0x0013536f LAB_00135364: MOV R14,qword ptr [RBP + -0x40] JMP 0x00135376 LAB_0013536a: MOV EAX,0xffffffff LAB_0013536f: MOV dword ptr [R14],EAX LAB_00135372: OR R15D,0x1 LAB_00135376: CMP qword ptr [RBX + 0x50],0x0 JZ 0x00135386 LEA RDI,[RBX + 0x50] CALL 0x001a674f LAB_00135386: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,0x4 JA 0x001353d3 MOV ECX,0x19 BT ECX,EAX JNC 0x001353d3 AND byte ptr [RBX + 0x74],0xef MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x00134e82 MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x001320f7 LAB_001353c0: MOV EAX,dword ptr [RBP + -0x2c] ADD R12,0x8 CMP R12,qword ptr [RBP + -0x48] JNZ 0x00135262 JMP 0x0013543f LAB_001353d3: MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x00134ca9 TEST AL,AL JZ 0x00135401 AND byte ptr [RBX + 0x74],0xef MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x00134e82 JMP 0x001353c0 LAB_00135401: DEC qword ptr [R13 + 0x58] DEC qword ptr [R13 + 0x168] JMP 0x001353c0 LAB_0013540e: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001352ce LAB_00135423: MOV RDI,R15 LEA RSI,[0x1d95b2] MOV EDX,0x12dd CALL 0x0012eb8f JMP 0x00135312 LAB_0013543c: XOR R15D,R15D LAB_0013543f: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00135451: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00135216 LAB_00135466: LEA RSI,[0x1d95b2] MOV RDI,R15 MOV EDX,0x12a3 CALL 0x0012eb8f JMP 0x0013524a
uint flush_cached_blocks(long param_1,int8 param_2,long *param_3,long *param_4,uint param_5, int *param_6) { pthread_mutex_t *__mutex; long lVar1; char cVar2; int iVar3; int2 *puVar4; int *piVar5; uint uVar6; *param_6 = 0; __mutex = (pthread_mutex_t *)(param_1 + 200); if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); qsort(param_3,(ulong)((long)param_4 - (long)param_3) >> 3 & 0xffffffff,8,cmp_sec_link); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12a3); } if (param_3 == param_4) { uVar6 = 0; } else { uVar6 = 0; do { lVar1 = *param_3; if (((param_5 == 4) && (*(int *)(lVar1 + 100) != 0)) || (*(int *)(lVar1 + 0x68) != 0)) { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; uVar6 = uVar6 | 2; unreg_request(param_1,lVar1,1); if (*param_6 == 0) { *param_6 = 0x7a; } } else { make_lock_and_pin(param_1,lVar1,3,2); if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); cVar2 = pagecache_fwrite(param_1,*(long *)(lVar1 + 0x20) + 0x18, *(int8 *)(lVar1 + 0x30), *(int8 *)(*(long *)(lVar1 + 0x20) + 0x60), *(int8 *)(param_1 + 0x198)); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12dd); } make_lock_and_pin(param_1,lVar1,5,3); *(long *)(param_1 + 0x178) = *(long *)(param_1 + 0x178) + 1; if (cVar2 != '\0') { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) | 1; puVar4 = (int2 *)_my_thread_var(); *(int2 *)(lVar1 + 0x76) = *puVar4; if (*param_6 == 0) { piVar5 = (int *)_my_thread_var(); if (*piVar5 == 0) { iVar3 = -1; } else { piVar5 = (int *)_my_thread_var(); iVar3 = *piVar5; } *param_6 = iVar3; } uVar6 = uVar6 | 1; } if (*(long *)(lVar1 + 0x50) != 0) { wqueue_release_queue(lVar1 + 0x50); } if ((param_5 < 5) && ((0x19U >> (param_5 & 0x1f) & 1) != 0)) { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; link_to_file_list(param_1,lVar1,param_2,1); unreg_request(param_1,lVar1,1); } else { cVar2 = free_block(param_1,lVar1,1); if (cVar2 == '\0') { *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + -1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + -1; } else { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; link_to_file_list(param_1,lVar1,param_2,1); } } } param_3 = param_3 + 1; } while (param_3 != param_4); } return uVar6; }
11,051
ma_bitmap_reset_full_page_bits
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page, uint page_count) { ulonglong bitmap_page; uint offset, bit_start, bit_count, tmp, byte_offset; uchar *data; DBUG_ENTER("_ma_bitmap_reset_full_page_bits"); DBUG_PRINT("enter", ("page: %lu page_count: %u", (ulong) page, page_count)); mysql_mutex_assert_owner(&info->s->bitmap.bitmap_lock); bitmap_page= page - page % bitmap->pages_covered; DBUG_ASSERT(page != bitmap_page); if (bitmap_page != bitmap->page && _ma_change_bitmap_page(info, bitmap, bitmap_page)) DBUG_RETURN(1); /* Find page number from start of bitmap */ offset= (uint) (page - bitmap->page - 1); /* Clear bits from 'page * 3' -> '(page + page_count) * 3' */ bit_start= offset * 3; bit_count= page_count * 3; byte_offset= bit_start/8; data= bitmap->map + byte_offset; offset= bit_start & 7; tmp= (255 << offset); /* Bits to keep */ if (bit_count + offset < 8) { /* Only clear bits between 'offset' and 'offset+bit_count-1' */ tmp^= (255 << (offset + bit_count)); } *data&= ~tmp; set_if_smaller(bitmap->full_head_size, byte_offset); set_if_smaller(bitmap->full_tail_size, byte_offset); if ((int) (bit_count-= (8 - offset)) > 0) { uint fill; data++; /* -1 is here to avoid one 'if' statement and to let the following code handle the last byte */ if ((fill= (bit_count - 1) / 8)) { bzero(data, fill); data+= fill; } bit_count-= fill * 8; /* Bits left to clear */ tmp= (1 << bit_count) - 1; *data&= ~tmp; } set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page); bitmap->changed= 1; DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap);); DBUG_RETURN(0); }
O3
c
ma_bitmap_reset_full_page_bits: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %ecx, %r13d movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r8 xorl %r14d, %r14d movq %rdx, %rax xorl %edx, %edx divq 0x138(%rsi) movq %r12, %r15 subq %rdx, %r15 movq %r15, %rax cmpq 0x10(%rsi), %r15 je 0x562ab movq %r8, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r8, -0x30(%rbp) callq 0x55e11 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x56369 movq 0x10(%rbx), %rax movq -0x30(%rbp), %r8 notl %eax addl %eax, %r12d leal (%r12,%r12,2), %r12d leal (%r13,%r13,2), %edx movl %r12d, %eax shrl $0x3, %eax movq 0x8(%rbx), %r13 movl %r12d, %ecx andl $0x7, %ecx movl $0xff, %esi movl $0xff, %edi shll %cl, %edi addl %edx, %ecx shll %cl, %esi cmpl $0x8, %ecx cmovbl %esi, %r14d xorl %edi, %r14d notb %r14b andb %r14b, (%r13,%rax) cmpl %eax, 0x28(%rbx) jbe 0x562f3 movl %eax, 0x28(%rbx) cmpl %eax, 0x2c(%rbx) jbe 0x562fb movl %eax, 0x2c(%rbx) orl $-0x8, %r12d addl %edx, %r12d testl %r12d, %r12d jle 0x56350 addq %rax, %r13 incq %r13 leal -0x1(%r12), %r14d cmpl $0x9, %r12d jb 0x56338 movl %r14d, %edx shrl $0x3, %edx movq %rdx, -0x38(%rbp) movq %r13, %rdi xorl %esi, %esi movq %r8, -0x30(%rbp) callq 0x2b2f0 movq -0x30(%rbp), %r8 addq -0x38(%rbp), %r13 andl $0xf8, %r14d subl %r14d, %r12d movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %r12d, %ecx shll %cl, %eax andb %al, (%r13) movq (%r8), %rax cmpq %r15, 0xd0(%rax) jbe 0x56363 movq %r15, 0xd0(%rax) movb $0x1, 0x20(%rbx) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_bitmap_reset_full_page_bits: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13d, ecx mov r12, rdx mov rbx, rsi mov r8, rdi xor r14d, r14d mov rax, rdx xor edx, edx div qword ptr [rsi+138h] mov r15, r12 sub r15, rdx mov rax, r15 cmp r15, [rsi+10h] jz short loc_562AB mov rdi, r8 mov rsi, rbx mov rdx, r15 mov [rbp+var_30], r8 call _ma_change_bitmap_page mov ecx, eax mov al, 1 test cl, cl jnz loc_56369 mov rax, [rbx+10h] mov r8, [rbp+var_30] loc_562AB: not eax add r12d, eax lea r12d, [r12+r12*2] lea edx, [r13+r13*2+0] mov eax, r12d shr eax, 3 mov r13, [rbx+8] mov ecx, r12d and ecx, 7 mov esi, 0FFh mov edi, 0FFh shl edi, cl add ecx, edx shl esi, cl cmp ecx, 8 cmovb r14d, esi xor r14d, edi not r14b and [r13+rax+0], r14b cmp [rbx+28h], eax jbe short loc_562F3 mov [rbx+28h], eax loc_562F3: cmp [rbx+2Ch], eax jbe short loc_562FB mov [rbx+2Ch], eax loc_562FB: or r12d, 0FFFFFFF8h add r12d, edx test r12d, r12d jle short loc_56350 add r13, rax inc r13 lea r14d, [r12-1] cmp r12d, 9 jb short loc_56338 mov edx, r14d shr edx, 3 mov [rbp+var_38], rdx mov rdi, r13 xor esi, esi mov [rbp+var_30], r8 call _memset mov r8, [rbp+var_30] add r13, [rbp+var_38] loc_56338: and r14d, 0F8h sub r12d, r14d mov eax, 0FFFFFFFFh mov ecx, r12d shl eax, cl and [r13+0], al loc_56350: mov rax, [r8] cmp [rax+0D0h], r15 jbe short loc_56363 mov [rax+0D0h], r15 loc_56363: mov byte ptr [rbx+20h], 1 xor eax, eax loc_56369: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char ma_bitmap_reset_full_page_bits(long long *a1, long long a2, unsigned long long a3, int a4) { int v5; // r12d long long *v6; // r8 char v7; // r14 unsigned long long v8; // r15 long long v9; // rax char v10; // cl char result; // al unsigned int v12; // r12d int v13; // edx long long v14; // rax long long v15; // r13 int v16; // ecx int v17; // edi unsigned int v18; // ecx int v19; // r12d _BYTE *v20; // r13 unsigned int v21; // r14d long long *v22; // [rsp+10h] [rbp-30h] v5 = a3; v6 = a1; v7 = 0; v8 = a3 - a3 % *(_QWORD *)(a2 + 312); LODWORD(v9) = a3 - a3 % *(_QWORD *)(a2 + 312); if ( v8 != *(_QWORD *)(a2 + 16) ) { v10 = ma_change_bitmap_page(a1, a2, a3 - a3 % *(_QWORD *)(a2 + 312)); result = 1; if ( v10 ) return result; v9 = *(_QWORD *)(a2 + 16); v6 = a1; } v12 = 3 * (~(_DWORD)v9 + v5); v13 = 3 * a4; v14 = v12 >> 3; v15 = *(_QWORD *)(a2 + 8); v16 = v12 & 7; v17 = 255 << v16; v18 = v13 + v16; if ( v18 < 8 ) v7 = 255 << v18; *(_BYTE *)(v15 + v14) &= ~(v17 ^ v7); if ( *(_DWORD *)(a2 + 40) > (unsigned int)v14 ) *(_DWORD *)(a2 + 40) = v14; if ( *(_DWORD *)(a2 + 44) > (unsigned int)v14 ) *(_DWORD *)(a2 + 44) = v14; v19 = v13 + (v12 | 0xFFFFFFF8); if ( v19 > 0 ) { v20 = (_BYTE *)(v14 + v15 + 1); v21 = v19 - 1; if ( (unsigned int)v19 >= 9 ) { v22 = v6; memset(v20, 0LL, v21 >> 3); v6 = v22; v20 += v21 >> 3; } *v20 &= -1 << (v19 - (v21 & 0xF8)); } if ( *(_QWORD *)(*v6 + 208) > v8 ) *(_QWORD *)(*v6 + 208) = v8; *(_BYTE *)(a2 + 32) = 1; return 0; }
_ma_bitmap_reset_full_page_bits: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13D,ECX MOV R12,RDX MOV RBX,RSI MOV R8,RDI XOR R14D,R14D MOV RAX,RDX XOR EDX,EDX DIV qword ptr [RSI + 0x138] MOV R15,R12 SUB R15,RDX MOV RAX,R15 CMP R15,qword ptr [RSI + 0x10] JZ 0x001562ab MOV RDI,R8 MOV RSI,RBX MOV RDX,R15 MOV qword ptr [RBP + -0x30],R8 CALL 0x00155e11 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00156369 MOV RAX,qword ptr [RBX + 0x10] MOV R8,qword ptr [RBP + -0x30] LAB_001562ab: NOT EAX ADD R12D,EAX LEA R12D,[R12 + R12*0x2] LEA EDX,[R13 + R13*0x2] MOV EAX,R12D SHR EAX,0x3 MOV R13,qword ptr [RBX + 0x8] MOV ECX,R12D AND ECX,0x7 MOV ESI,0xff MOV EDI,0xff SHL EDI,CL ADD ECX,EDX SHL ESI,CL CMP ECX,0x8 CMOVC R14D,ESI XOR R14D,EDI NOT R14B AND byte ptr [R13 + RAX*0x1],R14B CMP dword ptr [RBX + 0x28],EAX JBE 0x001562f3 MOV dword ptr [RBX + 0x28],EAX LAB_001562f3: CMP dword ptr [RBX + 0x2c],EAX JBE 0x001562fb MOV dword ptr [RBX + 0x2c],EAX LAB_001562fb: OR R12D,0xfffffff8 ADD R12D,EDX TEST R12D,R12D JLE 0x00156350 ADD R13,RAX INC R13 LEA R14D,[R12 + -0x1] CMP R12D,0x9 JC 0x00156338 MOV EDX,R14D SHR EDX,0x3 MOV qword ptr [RBP + -0x38],RDX MOV RDI,R13 XOR ESI,ESI MOV qword ptr [RBP + -0x30],R8 CALL 0x0012b2f0 MOV R8,qword ptr [RBP + -0x30] ADD R13,qword ptr [RBP + -0x38] LAB_00156338: AND R14D,0xf8 SUB R12D,R14D MOV EAX,0xffffffff MOV ECX,R12D SHL EAX,CL AND byte ptr [R13],AL LAB_00156350: MOV RAX,qword ptr [R8] CMP qword ptr [RAX + 0xd0],R15 JBE 0x00156363 MOV qword ptr [RAX + 0xd0],R15 LAB_00156363: MOV byte ptr [RBX + 0x20],0x1 XOR EAX,EAX LAB_00156369: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_bitmap_reset_full_page_bits(long *param_1,long param_2,ulong param_3,int param_4) { long lVar1; ulong __n; uint uVar2; char cVar3; uint uVar4; uint uVar5; byte *pbVar6; byte bVar7; ulong uVar8; uVar8 = param_3 - param_3 % *(ulong *)(param_2 + 0x138); uVar5 = (uint)uVar8; if (uVar8 != *(ulong *)(param_2 + 0x10)) { cVar3 = _ma_change_bitmap_page(param_1,param_2,uVar8); if (cVar3 != '\0') { return 1; } uVar5 = (uint)*(int8 *)(param_2 + 0x10); } uVar5 = ((int)param_3 + ~uVar5) * 3; uVar2 = uVar5 >> 3; lVar1 = *(long *)(param_2 + 8); uVar4 = (uVar5 & 7) + param_4 * 3; bVar7 = 0; if (uVar4 < 8) { bVar7 = (byte)(0xff << ((byte)uVar4 & 0x1f)); } pbVar6 = (byte *)(lVar1 + (ulong)uVar2); *pbVar6 = *pbVar6 & ~(bVar7 ^ (byte)(0xff << (sbyte)(uVar5 & 7))); if (uVar2 < *(uint *)(param_2 + 0x28)) { *(uint *)(param_2 + 0x28) = uVar2; } if (uVar2 < *(uint *)(param_2 + 0x2c)) { *(uint *)(param_2 + 0x2c) = uVar2; } uVar5 = (uVar5 | 0xfffffff8) + param_4 * 3; if (0 < (int)uVar5) { pbVar6 = (byte *)(lVar1 + (ulong)uVar2 + 1); if (8 < uVar5) { __n = (ulong)(uVar5 - 1 >> 3); memset(pbVar6,0,__n); pbVar6 = pbVar6 + __n; } *pbVar6 = *pbVar6 & (byte)(-1 << ((char)uVar5 - ((byte)(uVar5 - 1) & 0xf8) & 0x1f)); } if (uVar8 < *(ulong *)(*param_1 + 0xd0)) { *(ulong *)(*param_1 + 0xd0) = uVar8; } *(int1 *)(param_2 + 0x20) = 1; return 0; }
11,052
my_convert
eloqsql/strings/ctype.c
uint32 my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, CHARSET_INFO *from_cs, uint *errors) { uint32 length, length2; /* If any of the character sets is not ASCII compatible, immediately switch to slow mb_wc->wc_mb method. */ if ((to_cs->state | from_cs->state) & MY_CS_NONASCII) return my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); length= length2= MY_MIN(to_length, from_length); #if defined(__i386__) || defined(__x86_64__) /* Special loop for i386, it allows to refer to a non-aligned memory block as UINT32, which makes it possible to copy four bytes at once. This gives about 10% performance improvement comparing to byte-by-byte loop. */ for ( ; length >= 4; length-= 4, from+= 4, to+= 4) { if ((*(uint32*)from) & 0x80808080) break; *((uint32*) to)= *((const uint32*) from); } #endif /* __i386__ */ for (; ; *to++= *from++, length--) { if (!length) { *errors= 0; return length2; } if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */ { uint32 copied_length= length2 - length; to_length-= copied_length; from_length-= copied_length; return copied_length + my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); } } DBUG_ASSERT(FALSE); // Should never get to here return 0; // Make compiler happy }
O3
c
my_convert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r9, %rax movl %r8d, %r9d movq %rcx, %r8 movq 0x10(%rbp), %r10 movl 0xc(%rax), %ecx orl 0xc(%rdx), %ecx btl $0xd, %ecx jb 0xd1dd4 cmpl %r9d, %esi movl %r9d, %ebx cmovbl %esi, %ebx movl %ebx, %ecx cmpl $0x4, %ebx jb 0xd1dad movl (%r8), %r11d testl $0x80808080, %r11d # imm = 0x80808080 jne 0xd1db1 movl %r11d, (%rdi) addl $-0x4, %ecx addq $0x4, %r8 addq $0x4, %rdi cmpl $0x3, %ecx ja 0xd1d8e testl %ecx, %ecx je 0xd1dcb movl %ecx, %r14d xorl %r15d, %r15d movb (%r8,%r15), %cl testb %cl, %cl js 0xd1e01 movb %cl, (%rdi,%r15) incq %r15 cmpl %r15d, %r14d jne 0xd1db7 movl $0x0, (%r10) jmp 0xd1e46 movl %esi, %esi movq 0xb8(%rdx), %rcx movq 0x30(%rcx), %rcx movl %r9d, %r9d movq 0xb8(%rax), %r11 subq $0x8, %rsp pushq %r10 pushq 0x28(%r11) pushq %rax callq 0xd1c63 addq $0x28, %rsp jmp 0xd1e4c addl %r14d, %esi subl %ebx, %esi subl %r15d, %esi addl %r14d, %r9d subl %ebx, %r9d subl %r15d, %r9d movq 0xb8(%rdx), %rcx movq 0x30(%rcx), %rcx movq 0xb8(%rax), %r11 addq %r15, %rdi addq %r15, %r8 subq $0x8, %rsp pushq %r10 pushq 0x28(%r11) pushq %rax callq 0xd1c63 addq $0x20, %rsp subl %r14d, %ebx addl %r15d, %ebx addl %eax, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_convert: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rax, r9 mov r9d, r8d mov r8, rcx mov r10, [rbp+arg_0] mov ecx, [rax+0Ch] or ecx, [rdx+0Ch] bt ecx, 0Dh jb short loc_D1DD4 cmp esi, r9d mov ebx, r9d cmovb ebx, esi mov ecx, ebx cmp ebx, 4 jb short loc_D1DAD loc_D1D8E: mov r11d, [r8] test r11d, 80808080h jnz short loc_D1DB1 mov [rdi], r11d add ecx, 0FFFFFFFCh add r8, 4 add rdi, 4 cmp ecx, 3 ja short loc_D1D8E loc_D1DAD: test ecx, ecx jz short loc_D1DCB loc_D1DB1: mov r14d, ecx xor r15d, r15d loc_D1DB7: mov cl, [r8+r15] test cl, cl js short loc_D1E01 mov [rdi+r15], cl inc r15 cmp r14d, r15d jnz short loc_D1DB7 loc_D1DCB: mov dword ptr [r10], 0 jmp short loc_D1E46 loc_D1DD4: mov esi, esi mov rcx, [rdx+0B8h] mov rcx, [rcx+30h] mov r9d, r9d mov r11, [rax+0B8h] sub rsp, 8 push r10 push qword ptr [r11+28h] push rax call my_convert_using_func add rsp, 28h jmp short loc_D1E4C loc_D1E01: add esi, r14d sub esi, ebx sub esi, r15d add r9d, r14d sub r9d, ebx sub r9d, r15d mov rcx, [rdx+0B8h] mov rcx, [rcx+30h] mov r11, [rax+0B8h] add rdi, r15 add r8, r15 sub rsp, 8 push r10 push qword ptr [r11+28h] push rax call my_convert_using_func add rsp, 20h sub ebx, r14d add ebx, r15d add ebx, eax loc_D1E46: mov eax, ebx add rsp, 8 loc_D1E4C: pop rbx pop r14 pop r15 pop rbp retn
long long my_convert( _DWORD *a1, unsigned int a2, long long a3, long long a4, unsigned int a5, long long a6, _DWORD *a7) { _DWORD *v9; // r8 unsigned int v10; // ebx unsigned int v11; // ecx unsigned int v12; // r14d long long v13; // r15 char v14; // cl v9 = (_DWORD *)a4; if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 ) return my_convert_using_func( (long long)a1, a2, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), a4, a5, a6, *(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7); v10 = a5; if ( a2 < a5 ) v10 = a2; v11 = v10; if ( v10 >= 4 ) { while ( (*v9 & 0x80808080) == 0 ) { *a1 = *v9; v11 -= 4; ++v9; ++a1; if ( v11 <= 3 ) goto LABEL_7; } goto LABEL_8; } LABEL_7: if ( v11 ) { LABEL_8: v12 = v11; v13 = 0LL; do { v14 = *((_BYTE *)v9 + v13); if ( v14 < 0 ) return (unsigned int)my_convert_using_func( (long long)a1 + v13, v12 + a2 - v10 - (unsigned int)v13, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), (long long)v9 + v13, v12 + a5 - v10 - (unsigned int)v13, a6, *(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7) + (_DWORD)v13 + v10 - v12; *((_BYTE *)a1 + v13++) = v14; } while ( v12 != (_DWORD)v13 ); } *a7 = 0; return v10; }
my_convert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RAX,R9 MOV R9D,R8D MOV R8,RCX MOV R10,qword ptr [RBP + 0x10] MOV ECX,dword ptr [RAX + 0xc] OR ECX,dword ptr [RDX + 0xc] BT ECX,0xd JC 0x001d1dd4 CMP ESI,R9D MOV EBX,R9D CMOVC EBX,ESI MOV ECX,EBX CMP EBX,0x4 JC 0x001d1dad LAB_001d1d8e: MOV R11D,dword ptr [R8] TEST R11D,0x80808080 JNZ 0x001d1db1 MOV dword ptr [RDI],R11D ADD ECX,-0x4 ADD R8,0x4 ADD RDI,0x4 CMP ECX,0x3 JA 0x001d1d8e LAB_001d1dad: TEST ECX,ECX JZ 0x001d1dcb LAB_001d1db1: MOV R14D,ECX XOR R15D,R15D LAB_001d1db7: MOV CL,byte ptr [R8 + R15*0x1] TEST CL,CL JS 0x001d1e01 MOV byte ptr [RDI + R15*0x1],CL INC R15 CMP R14D,R15D JNZ 0x001d1db7 LAB_001d1dcb: MOV dword ptr [R10],0x0 JMP 0x001d1e46 LAB_001d1dd4: MOV ESI,ESI MOV RCX,qword ptr [RDX + 0xb8] MOV RCX,qword ptr [RCX + 0x30] MOV R9D,R9D MOV R11,qword ptr [RAX + 0xb8] SUB RSP,0x8 PUSH R10 PUSH qword ptr [R11 + 0x28] PUSH RAX CALL 0x001d1c63 ADD RSP,0x28 JMP 0x001d1e4c LAB_001d1e01: ADD ESI,R14D SUB ESI,EBX SUB ESI,R15D ADD R9D,R14D SUB R9D,EBX SUB R9D,R15D MOV RCX,qword ptr [RDX + 0xb8] MOV RCX,qword ptr [RCX + 0x30] MOV R11,qword ptr [RAX + 0xb8] ADD RDI,R15 ADD R8,R15 SUB RSP,0x8 PUSH R10 PUSH qword ptr [R11 + 0x28] PUSH RAX CALL 0x001d1c63 ADD RSP,0x20 SUB EBX,R14D ADD EBX,R15D ADD EBX,EAX LAB_001d1e46: MOV EAX,EBX ADD RSP,0x8 LAB_001d1e4c: POP RBX POP R14 POP R15 POP RBP RET
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6, int4 *param_7) { int iVar1; ulong uVar2; uint uVar3; uint uVar5; int iVar6; long lVar7; ulong uVar4; uVar2 = (ulong)param_5; if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) { if (param_2 < param_5) { uVar2 = (ulong)param_2; } uVar5 = (uint)uVar2; uVar3 = uVar5; uVar4 = uVar2; while (3 < uVar3) { uVar3 = (uint)uVar4; if ((*param_4 & 0x80808080) != 0) goto LAB_001d1db1; *param_1 = *param_4; uVar3 = uVar3 - 4; uVar4 = (ulong)uVar3; param_4 = param_4 + 1; param_1 = param_1 + 1; } if (uVar3 != 0) { LAB_001d1db1: lVar7 = 0; do { if (*(char *)((long)param_4 + lVar7) < '\0') { iVar6 = (int)lVar7; iVar1 = my_convert_using_func ((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3, *(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7 ,((param_5 + uVar3) - uVar5) - iVar6,param_6, *(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7); return (ulong)((uVar5 - uVar3) + iVar6 + iVar1); } *(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7); lVar7 = lVar7 + 1; } while (uVar3 != (uint)lVar7); } *param_7 = 0; } else { uVar2 = my_convert_using_func (param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30), param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28), param_7); } return uVar2; }
11,053
ftxui::ScreenInteractive::ResetCursorPosition()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
void ScreenInteractive::ResetCursorPosition() { std::cout << reset_cursor_position; reset_cursor_position = ""; }
O1
cpp
ftxui::ScreenInteractive::ResetCursorPosition(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x98(%rdi), %r14 movq 0x98(%rdi), %rsi movq 0xa0(%rdi), %rdx movq 0x2bf57(%rip), %rdi # 0x59fb8 callq 0xb490 movq 0xa0(%rbx), %rdx leaq 0xfb6d(%rip), %rcx # 0x3dbe1 movq %r14, %rdi xorl %esi, %esi xorl %r8d, %r8d addq $0x8, %rsp popq %rbx popq %r14 jmp 0xb680
_ZN5ftxui17ScreenInteractive19ResetCursorPositionEv: push r14 push rbx push rax mov rbx, rdi lea r14, [rdi+98h] mov rsi, [rdi+98h] mov rdx, [rdi+0A0h] mov rdi, cs:_ZSt4cout_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdx, [rbx+0A0h] lea rcx, asc_3DBDF+2; "" mov rdi, r14 xor esi, esi xor r8d, r8d add rsp, 8 pop rbx pop r14 jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
long long ftxui::ScreenInteractive::ResetCursorPosition(ftxui::ScreenInteractive *this) { std::__ostream_insert<char,std::char_traits<char>>(&std::cout, *((_QWORD *)this + 19), *((_QWORD *)this + 20)); return std::string::_M_replace((char *)this + 152, 0LL, *((_QWORD *)this + 20), "", 0LL); }
ResetCursorPosition: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0x98] MOV RSI,qword ptr [RDI + 0x98] MOV RDX,qword ptr [RDI + 0xa0] MOV RDI,qword ptr [0x00159fb8] CALL 0x0010b490 MOV RDX,qword ptr [RBX + 0xa0] LEA RCX,[0x13dbe1] MOV RDI,R14 XOR ESI,ESI XOR R8D,R8D ADD RSP,0x8 POP RBX POP R14 JMP 0x0010b680
/* ftxui::ScreenInteractive::ResetCursorPosition() */ void __thiscall ftxui::ScreenInteractive::ResetCursorPosition(ScreenInteractive *this) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00159fb8,*(char **)(this + 0x98),*(long *)(this + 0xa0)); std::__cxx11::string::_M_replace((ulong)(this + 0x98),0,*(char **)(this + 0xa0),0x13dbe1); return; }
11,054
gguf_get_val_str
ngxson[P]ggml-easy/ggml/src/gguf.cpp
const char * gguf_get_val_str(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); GGML_ASSERT(ctx->kv[key_id].get_ne() == 1); return ctx->kv[key_id].get_val<std::string>().c_str(); }
O3
cpp
gguf_get_val_str: pushq %r14 pushq %rbx pushq %rax testq %rsi, %rsi js 0x3dba2 movq %rdi, %rbx movq 0x8(%rdi), %rdi movq 0x10(%rbx), %rax subq %rdi, %rax sarq $0x3, %rax movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3 imulq %rax, %rcx cmpq %rsi, %rcx jle 0x3dba2 imulq $0x58, %rsi, %r14 addq %r14, %rdi callq 0x16620 cmpq $0x1, %rax jne 0x3dbbe addq 0x8(%rbx), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x17310 movq (%rax), %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x1c23c(%rip), %rdi # 0x59de5 leaq 0xcaae(%rip), %rdx # 0x4a65e leaq 0x1c6ba(%rip), %rcx # 0x5a271 movl $0x365, %esi # imm = 0x365 jmp 0x3dbd8 leaq 0x1c220(%rip), %rdi # 0x59de5 leaq 0xca92(%rip), %rdx # 0x4a65e leaq 0x1c76d(%rip), %rcx # 0x5a340 movl $0x366, %esi # imm = 0x366 xorl %eax, %eax callq 0x17c60
gguf_get_val_str: push r14 push rbx push rax test rsi, rsi js short loc_3DBA2 mov rbx, rdi mov rdi, [rdi+8] mov rax, [rbx+10h] sub rax, rdi sar rax, 3 mov rcx, 2E8BA2E8BA2E8BA3h imul rcx, rax cmp rcx, rsi jle short loc_3DBA2 imul r14, rsi, 58h ; 'X' add rdi, r14; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) cmp rax, 1 jnz short loc_3DBBE add r14, [rbx+8] mov rdi, r14 xor esi, esi call __ZNK7gguf_kv7get_valINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_m; gguf_kv::get_val<std::string>(ulong) mov rax, [rax] add rsp, 8 pop rbx pop r14 retn loc_3DBA2: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 365h jmp short loc_3DBD8 loc_3DBBE: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1" mov esi, 366h loc_3DBD8: xor eax, eax call _ggml_abort
long long gguf_get_val_str(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v7; // rdi const char *v9; // rcx int v10; // esi if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) ) { v9 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; v10 = 869; goto LABEL_7; } if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 ) { v9 = "ctx->kv[key_id].get_ne() == 1"; v10 = 870; LABEL_7: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, a5, a6); } return *(_QWORD *)gguf_kv::get_val<std::string>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL); }
gguf_get_val_str: PUSH R14 PUSH RBX PUSH RAX TEST RSI,RSI JS 0x0013dba2 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RBX + 0x10] SUB RAX,RDI SAR RAX,0x3 MOV RCX,0x2e8ba2e8ba2e8ba3 IMUL RCX,RAX CMP RCX,RSI JLE 0x0013dba2 IMUL R14,RSI,0x58 ADD RDI,R14 CALL 0x00116620 CMP RAX,0x1 JNZ 0x0013dbbe ADD R14,qword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00117310 MOV RAX,qword ptr [RAX] ADD RSP,0x8 POP RBX POP R14 RET LAB_0013dba2: LEA RDI,[0x159de5] LEA RDX,[0x14a65e] LEA RCX,[0x15a271] MOV ESI,0x365 JMP 0x0013dbd8 LAB_0013dbbe: LEA RDI,[0x159de5] LEA RDX,[0x14a65e] LEA RCX,[0x15a340] MOV ESI,0x366 LAB_0013dbd8: XOR EAX,EAX CALL 0x00117c60
int8 gguf_get_val_str(long param_1,long param_2) { string *psVar1; long lVar2; char *pcVar3; int8 uVar4; if ((param_2 < 0) || (lVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3, lVar2 - param_2 == 0 || lVar2 < param_2)) { pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; uVar4 = 0x365; } else { lVar2 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58)); if (lVar2 == 1) { psVar1 = gguf_kv::get_val<std::__cxx11::string> ((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0); return *(int8 *)psVar1; } pcVar3 = "ctx->kv[key_id].get_ne() == 1"; uVar4 = 0x366; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }
11,055
bfdec_set_ui
bluesky950520[P]quickjs/libbf.c
int bfdec_set_ui(bfdec_t *r, uint64_t v) { #if LIMB_BITS == 32 if (v >= BF_DEC_BASE * BF_DEC_BASE) { if (bfdec_resize(r, 3)) goto fail; r->tab[0] = v % BF_DEC_BASE; v /= BF_DEC_BASE; r->tab[1] = v % BF_DEC_BASE; r->tab[2] = v / BF_DEC_BASE; r->expn = 3 * LIMB_DIGITS; } else #endif if (v >= BF_DEC_BASE) { if (bfdec_resize(r, 2)) goto fail; r->tab[0] = v % BF_DEC_BASE; r->tab[1] = v / BF_DEC_BASE; r->expn = 2 * LIMB_DIGITS; } else { if (bfdec_resize(r, 1)) goto fail; r->tab[0] = v; r->expn = LIMB_DIGITS; } r->sign = 0; return bfdec_normalize_and_round(r, BF_PREC_INF, 0); fail: bfdec_set_nan(r); return BF_ST_MEM_ERROR; }
O1
c
bfdec_set_ui: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movabsq $-0x7538dcfb76180000, %rcx # imm = 0x8AC7230489E80000 movq 0x18(%rdi), %rax cmpq %rcx, %rsi jb 0x8e118 cmpq $0x2, %rax je 0x8e0f5 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi movl $0x10, %edx callq *0x8(%rax) testq %rax, %rax je 0x8e173 movq %rax, 0x20(%rbx) movq $0x2, 0x18(%rbx) movabsq $0x7538dcfb76180000, %rax # imm = 0x7538DCFB76180000 addq %rax, %r14 movq 0x20(%rbx), %rax movq %r14, (%rax) movq $0x1, 0x8(%rax) movl $0x26, %eax jmp 0x8e14d cmpq $0x1, %rax je 0x8e141 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi movl $0x8, %edx callq *0x8(%rax) testq %rax, %rax je 0x8e173 movq %rax, 0x20(%rbx) movq $0x1, 0x18(%rbx) movq 0x20(%rbx), %rax movq %r14, (%rax) movl $0x13, %eax movq %rax, 0x10(%rbx) movl $0x0, 0x8(%rbx) movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movq %rbx, %rdi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8dd39 cmpq $0x0, 0x18(%rbx) je 0x8e195 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x20, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
bfdec_set_ui: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rcx, 8AC7230489E80000h mov rax, [rdi+18h] cmp rsi, rcx jb short loc_8E118 cmp rax, 2 jz short loc_8E0F5 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] mov edx, 10h call qword ptr [rax+8] test rax, rax jz loc_8E173 mov [rbx+20h], rax mov qword ptr [rbx+18h], 2 loc_8E0F5: mov rax, 7538DCFB76180000h add r14, rax mov rax, [rbx+20h] mov [rax], r14 mov qword ptr [rax+8], 1 mov eax, 26h ; '&' jmp short loc_8E14D loc_8E118: cmp rax, 1 jz short loc_8E141 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] mov edx, 8 call qword ptr [rax+8] test rax, rax jz short loc_8E173 mov [rbx+20h], rax mov qword ptr [rbx+18h], 1 loc_8E141: mov rax, [rbx+20h] mov [rax], r14 mov eax, 13h loc_8E14D: mov [rbx+10h], rax mov dword ptr [rbx+8], 0 mov rsi, 3FFFFFFFFFFFFFFFh mov rdi, rbx xor edx, edx add rsp, 8 pop rbx pop r14 jmp bfdec_normalize_and_round loc_8E173: cmp qword ptr [rbx+18h], 0 jz short loc_8E195 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8E195: mov rax, 7FFFFFFFFFFFFFFFh mov [rbx+10h], rax mov dword ptr [rbx+8], 0 mov eax, 20h ; ' ' add rsp, 8 pop rbx pop r14 retn
long long bfdec_set_ui(_QWORD **a1, unsigned long long a2) { _QWORD *v2; // rax long long v3; // rax _QWORD *v4; // rax long long v5; // rax long long v6; // rax v2 = a1[3]; if ( a2 < 0x8AC7230489E80000LL ) { if ( v2 != (_QWORD *)((char *)&dword_0 + 1) ) { v6 = ((long long ( *)(_QWORD, _QWORD *, long long))(*a1)[1])(**a1, a1[4], 8LL); if ( !v6 ) goto LABEL_11; a1[4] = (_QWORD *)v6; a1[3] = (_QWORD *)(&dword_0 + 1); } *a1[4] = a2; v5 = 19LL; goto LABEL_10; } if ( v2 == (_QWORD *)((char *)&dword_0 + 2) ) { LABEL_5: v4 = a1[4]; *v4 = a2 + 0x7538DCFB76180000LL; v4[1] = 1LL; v5 = 38LL; LABEL_10: a1[2] = (_QWORD *)v5; *((_DWORD *)a1 + 2) = 0; return bfdec_normalize_and_round(a1, 0x3FFFFFFFFFFFFFFFLL, 0); } v3 = ((long long ( *)(_QWORD, _QWORD *, long long))(*a1)[1])(**a1, a1[4], 16LL); if ( v3 ) { a1[4] = (_QWORD *)v3; a1[3] = (_QWORD *)(&dword_0 + 2); goto LABEL_5; } LABEL_11: if ( a1[3] ) { a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; return 32LL; }
bfdec_set_ui: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RCX,-0x7538dcfb76180000 MOV RAX,qword ptr [RDI + 0x18] CMP RSI,RCX JC 0x0018e118 CMP RAX,0x2 JZ 0x0018e0f5 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] MOV EDX,0x10 CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x0018e173 MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x2 LAB_0018e0f5: MOV RAX,0x7538dcfb76180000 ADD R14,RAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RAX],R14 MOV qword ptr [RAX + 0x8],0x1 MOV EAX,0x26 JMP 0x0018e14d LAB_0018e118: CMP RAX,0x1 JZ 0x0018e141 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] MOV EDX,0x8 CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x0018e173 MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x1 LAB_0018e141: MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RAX],R14 MOV EAX,0x13 LAB_0018e14d: MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],0x0 MOV RSI,0x3fffffffffffffff MOV RDI,RBX XOR EDX,EDX ADD RSP,0x8 POP RBX POP R14 JMP 0x0018dd39 LAB_0018e173: CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018e195 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_0018e195: MOV RAX,0x7fffffffffffffff MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],0x0 MOV EAX,0x20 ADD RSP,0x8 POP RBX POP R14 RET
int8 bfdec_set_ui(long *param_1,ulong param_2) { long *plVar1; long lVar2; int8 uVar3; if (param_2 < 10000000000000000000) { if (param_1[3] != 1) { lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],8); if (lVar2 == 0) goto LAB_0018e173; param_1[4] = lVar2; param_1[3] = 1; } *(ulong *)param_1[4] = param_2; lVar2 = 0x13; } else { if (param_1[3] != 2) { lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0x10); if (lVar2 == 0) { LAB_0018e173: if (param_1[3] != 0) { lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar2; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; return 0x20; } param_1[4] = lVar2; param_1[3] = 2; } plVar1 = (long *)param_1[4]; *plVar1 = param_2 + 0x7538dcfb76180000; plVar1[1] = 1; lVar2 = 0x26; } param_1[2] = lVar2; *(int4 *)(param_1 + 1) = 0; uVar3 = bfdec_normalize_and_round(param_1,0x3fffffffffffffff,0); return uVar3; }
11,056
bfdec_set_ui
bluesky950520[P]quickjs/libbf.c
int bfdec_set_ui(bfdec_t *r, uint64_t v) { #if LIMB_BITS == 32 if (v >= BF_DEC_BASE * BF_DEC_BASE) { if (bfdec_resize(r, 3)) goto fail; r->tab[0] = v % BF_DEC_BASE; v /= BF_DEC_BASE; r->tab[1] = v % BF_DEC_BASE; r->tab[2] = v / BF_DEC_BASE; r->expn = 3 * LIMB_DIGITS; } else #endif if (v >= BF_DEC_BASE) { if (bfdec_resize(r, 2)) goto fail; r->tab[0] = v % BF_DEC_BASE; r->tab[1] = v / BF_DEC_BASE; r->expn = 2 * LIMB_DIGITS; } else { if (bfdec_resize(r, 1)) goto fail; r->tab[0] = v; r->expn = LIMB_DIGITS; } r->sign = 0; return bfdec_normalize_and_round(r, BF_PREC_INF, 0); fail: bfdec_set_nan(r); return BF_ST_MEM_ERROR; }
O3
c
bfdec_set_ui: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movabsq $-0x7538dcfb76180000, %rcx # imm = 0x8AC7230489E80000 movq 0x18(%rdi), %rax cmpq %rcx, %rsi jb 0x90bc7 cmpq $0x2, %rax jne 0x90bd3 movq 0x20(%rbx), %rax jmp 0x90bf6 cmpq $0x1, %rax jne 0x90c15 movq 0x20(%rbx), %rax jmp 0x90c38 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi movl $0x10, %edx callq *0x8(%rax) testq %rax, %rax je 0x90c66 movq %rax, 0x20(%rbx) movq $0x2, 0x18(%rbx) movabsq $0x7538dcfb76180000, %rcx # imm = 0x7538DCFB76180000 addq %rcx, %r14 movq %r14, (%rax) movq $0x1, 0x8(%rax) movl $0x26, %eax jmp 0x90c40 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi movl $0x8, %edx callq *0x8(%rax) testq %rax, %rax je 0x90c66 movq %rax, 0x20(%rbx) movq $0x1, 0x18(%rbx) movq %r14, (%rax) movl $0x13, %eax movq %rax, 0x10(%rbx) movl $0x0, 0x8(%rbx) movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movq %rbx, %rdi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x907d2 cmpq $0x0, 0x18(%rbx) je 0x90c88 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq %rax, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x20, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
bfdec_set_ui: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rcx, 8AC7230489E80000h mov rax, [rdi+18h] cmp rsi, rcx jb short loc_90BC7 cmp rax, 2 jnz short loc_90BD3 mov rax, [rbx+20h] jmp short loc_90BF6 loc_90BC7: cmp rax, 1 jnz short loc_90C15 mov rax, [rbx+20h] jmp short loc_90C38 loc_90BD3: mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] mov edx, 10h call qword ptr [rax+8] test rax, rax jz short loc_90C66 mov [rbx+20h], rax mov qword ptr [rbx+18h], 2 loc_90BF6: mov rcx, 7538DCFB76180000h add r14, rcx mov [rax], r14 mov qword ptr [rax+8], 1 mov eax, 26h ; '&' jmp short loc_90C40 loc_90C15: mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] mov edx, 8 call qword ptr [rax+8] test rax, rax jz short loc_90C66 mov [rbx+20h], rax mov qword ptr [rbx+18h], 1 loc_90C38: mov [rax], r14 mov eax, 13h loc_90C40: mov [rbx+10h], rax mov dword ptr [rbx+8], 0 mov rsi, 3FFFFFFFFFFFFFFFh mov rdi, rbx xor edx, edx add rsp, 8 pop rbx pop r14 jmp bfdec_normalize_and_round loc_90C66: cmp qword ptr [rbx+18h], 0 jz short loc_90C88 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_90C88: mov rax, 7FFFFFFFFFFFFFFFh mov [rbx+10h], rax mov dword ptr [rbx+8], 0 mov eax, 20h ; ' ' add rsp, 8 pop rbx pop r14 retn
long long bfdec_set_ui(_QWORD **a1, unsigned long long a2) { _QWORD *v2; // rax _QWORD *v3; // rax unsigned long long *v4; // rax long long v5; // rax v2 = a1[3]; if ( a2 < 0x8AC7230489E80000LL ) { if ( v2 == (_QWORD *)((char *)&dword_0 + 1) ) { v4 = a1[4]; } else { v4 = (unsigned long long *)((long long ( *)(_QWORD, _QWORD *, long long))(*a1)[1])(**a1, a1[4], 8LL); if ( !v4 ) goto LABEL_13; a1[4] = v4; a1[3] = (_QWORD *)(&dword_0 + 1); } *v4 = a2; v5 = 19LL; goto LABEL_12; } if ( v2 == (_QWORD *)((char *)&dword_0 + 2) ) { v3 = a1[4]; LABEL_8: *v3 = a2 + 0x7538DCFB76180000LL; v3[1] = 1LL; v5 = 38LL; LABEL_12: a1[2] = (_QWORD *)v5; *((_DWORD *)a1 + 2) = 0; return bfdec_normalize_and_round(a1, 0x3FFFFFFFFFFFFFFFLL, 0); } v3 = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, long long))(*a1)[1])(**a1, a1[4], 16LL); if ( v3 ) { a1[4] = v3; a1[3] = (_QWORD *)(&dword_0 + 2); goto LABEL_8; } LABEL_13: if ( a1[3] ) { a1[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a1)[1])(**a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = (_QWORD *)0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; return 32LL; }
bfdec_set_ui: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RCX,-0x7538dcfb76180000 MOV RAX,qword ptr [RDI + 0x18] CMP RSI,RCX JC 0x00190bc7 CMP RAX,0x2 JNZ 0x00190bd3 MOV RAX,qword ptr [RBX + 0x20] JMP 0x00190bf6 LAB_00190bc7: CMP RAX,0x1 JNZ 0x00190c15 MOV RAX,qword ptr [RBX + 0x20] JMP 0x00190c38 LAB_00190bd3: MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] MOV EDX,0x10 CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00190c66 MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x2 LAB_00190bf6: MOV RCX,0x7538dcfb76180000 ADD R14,RCX MOV qword ptr [RAX],R14 MOV qword ptr [RAX + 0x8],0x1 MOV EAX,0x26 JMP 0x00190c40 LAB_00190c15: MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] MOV EDX,0x8 CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00190c66 MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x1 LAB_00190c38: MOV qword ptr [RAX],R14 MOV EAX,0x13 LAB_00190c40: MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],0x0 MOV RSI,0x3fffffffffffffff MOV RDI,RBX XOR EDX,EDX ADD RSP,0x8 POP RBX POP R14 JMP 0x001907d2 LAB_00190c66: CMP qword ptr [RBX + 0x18],0x0 JZ 0x00190c88 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_00190c88: MOV RAX,0x7fffffffffffffff MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],0x0 MOV EAX,0x20 ADD RSP,0x8 POP RBX POP R14 RET
int8 bfdec_set_ui(long *param_1,ulong param_2) { long *plVar1; long lVar2; ulong *puVar3; int8 uVar4; if (param_2 < 10000000000000000000) { if (param_1[3] == 1) { puVar3 = (ulong *)param_1[4]; } else { puVar3 = (ulong *)(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],8) ; if (puVar3 == (ulong *)0x0) goto LAB_00190c66; param_1[4] = (long)puVar3; param_1[3] = 1; } *puVar3 = param_2; lVar2 = 0x13; } else { if (param_1[3] == 2) { plVar1 = (long *)param_1[4]; } else { plVar1 = (long *)(*(code *)((int8 *)*param_1)[1]) (*(int8 *)*param_1,param_1[4],0x10); if (plVar1 == (long *)0x0) { LAB_00190c66: if (param_1[3] != 0) { lVar2 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar2; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; return 0x20; } param_1[4] = (long)plVar1; param_1[3] = 2; } *plVar1 = param_2 + 0x7538dcfb76180000; plVar1[1] = 1; lVar2 = 0x26; } param_1[2] = lVar2; *(int4 *)(param_1 + 1) = 0; uVar4 = bfdec_normalize_and_round(param_1,0x3fffffffffffffff,0); return uVar4; }
11,057
my_hash_reset
eloqsql/mysys/hash.c
void my_hash_reset(HASH *hash) { DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash:%p", hash)); my_hash_free_elements(hash); reset_dynamic(&hash->array); /* Set row pointers so that the hash can be reused at once */ hash->blength= 1; DBUG_VOID_RETURN; }
O3
c
my_hash_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x300f4 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x300f4 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x300e4 movl $0x0, 0x30(%rbx) movq $0x1, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_300F4 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_300F4 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_300E4: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_300E4 loc_300F4: mov dword ptr [rbx+30h], 0 mov qword ptr [rbx+10h], 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_reset(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; result = (*(long long ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 16) = 1LL; return result; }
my_hash_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x001300f4 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x001300f4 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_001300e4: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x001300e4 LAB_001300f4: MOV dword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x10],0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_reset(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int4 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x10) = 1; return; }
11,058
inline_mysql_cond_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_destroy( mysql_cond_t *that) { #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_COND_CALL(destroy_cond)(that->m_psi); that->m_psi= NULL; } #endif return pthread_cond_destroy(&that->m_cond); }
O0
c
inline_mysql_cond_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x5feb4 leaq 0x1b8829(%rip), %rax # 0x2186c0 movq (%rax), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rdi callq 0x25550 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_cond_destroy: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_5FEB4 lea rax, PSI_server mov rax, [rax] mov rax, [rax+68h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 loc_5FEB4: mov rdi, [rbp+var_8] call _pthread_cond_destroy add rsp, 10h pop rbp retn
long long inline_mysql_cond_destroy(long long a1) { if ( *(_QWORD *)(a1 + 48) ) { ((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a1 + 48) = 0LL; } return pthread_cond_destroy(a1); }
inline_mysql_cond_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0015feb4 LEA RAX,[0x3186c0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 LAB_0015feb4: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00125550 ADD RSP,0x10 POP RBP RET
void inline_mysql_cond_destroy(pthread_cond_t *param_1) { if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x68))(param_1[1].__align); param_1[1].__align = 0; } pthread_cond_destroy(param_1); return; }
11,059
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O0
c
my_printv_error: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x214(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movq %rcx, -0x230(%rbp) jmp 0x691c5 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rdx movq -0x230(%rbp), %rcx movl $0x200, %esi # imm = 0x200 callq 0xaf8f0 leaq 0x1aec45(%rip), %rax # 0x217e30 movq (%rax), %rax movl -0x214(%rbp), %edi leaq -0x210(%rbp), %rsi movq -0x228(%rbp), %rdx callq *%rax jmp 0x69206 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x69221 addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax)
my_printv_error: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_214], edi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_230], rcx jmp short $+2 loc_691C5: lea rdi, [rbp+var_210] mov rdx, [rbp+var_220] mov rcx, [rbp+var_230] mov esi, 200h call my_vsnprintf lea rax, error_handler_hook mov rax, [rax] mov edi, [rbp+var_214] lea rsi, [rbp+var_210] mov rdx, [rbp+var_228] call rax jmp short $+2 loc_69206: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_69221 add rsp, 230h pop rbp retn loc_69221: call ___stack_chk_fail
unsigned long long my_printv_error(unsigned int a1, long long a2, __int16 a3, long long a4) { _BYTE v6[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v7; // [rsp+228h] [rbp-8h] v7 = __readfsqword(0x28u); my_vsnprintf(v6, 512LL, a2, a4); ((void ( *)(long long, long long, __int16))error_handler_hook[0])(a1, (long long)v6, a3); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x214],EDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV qword ptr [RBP + -0x230],RCX JMP 0x001691c5 LAB_001691c5: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] MOV ESI,0x200 CALL 0x001af8f0 LEA RAX,[0x317e30] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x214] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] CALL RAX JMP 0x00169206 LAB_00169206: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00169221 ADD RSP,0x230 POP RBP RET LAB_00169221: CALL 0x00126360
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4) { long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_218,0x200,param_2,param_4); (*(code *)error_handler_hook)(param_1,local_218,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,060
minja::VariableExpr::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 { if (!context->contains(name)) { return Value(); } return context->at(name); }
O3
cpp
minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq (%rdx), %r12 addq $0x20, %r14 leaq 0x8(%rsp), %r13 movq %r13, %rdi movq %r14, %rsi callq 0x8cf0a movq (%r12), %rax movq %r12, %rdi movq %r13, %rsi callq *0x20(%rax) movl %eax, %ebp leaq 0x48(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x5b4ca movq %r12, %rdi callq 0x60938 movq -0x8(%r12), %rdi testq %rdi, %rdi je 0x9b30d callq 0x70324 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x9b31c callq 0x70324 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9b32b callq 0x70324 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x9b361 movq 0x92c44(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x9b34c movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9b356 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9b361 movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x9b3f8 movq (%r15), %r15 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x8cf0a movq (%r15), %rax movq %r15, %rdi movq %r12, %rsi callq *0x18(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x90558 leaq 0x48(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5b4ca movq %r14, %rdi callq 0x60938 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x9b3b9 callq 0x70324 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x9b3c8 callq 0x70324 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x9b3d7 callq 0x70324 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x9b44b movq 0x92b98(%rip), %rax # 0x12df80 cmpb $0x0, (%rax) je 0x9b436 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9b440 leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x5b4ca movq %r14, %rdi movl $0x1, %esi callq 0x5b4ca jmp 0x9b44b movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9b44b movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9b45f movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x88eac movq %rbx, %rdi callq 0x1c1e0
_ZNK5minja12VariableExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rdx] add r14, 20h ; ' ' lea r13, [rsp+88h+var_80] mov rdi, r13 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rax, [r12] mov rdi, r12 mov rsi, r13 call qword ptr [rax+20h] mov ebp, eax lea r12, [rsp+88h+var_40] mov rdi, r12 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, r12 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, [r12-8] test rdi, rdi jz short loc_9B30D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B30D: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_9B31C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B31C: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_9B32B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B32B: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_9B361 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9B34C mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9B356 loc_9B34C: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9B356: cmp eax, 1 jnz short loc_9B361 mov rax, [rdi] call qword ptr [rax+18h] loc_9B361: test bpl, bpl jz loc_9B3F8 mov r15, [r15] lea r12, [rsp+88h+var_80] mov rdi, r12 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rax, [r15] mov rdi, r15 mov rsi, r12 call qword ptr [rax+18h] mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) lea r14, [rsp+88h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_9B3B9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B3B9: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_9B3C8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B3C8: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_9B3D7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9B3D7: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_9B44B mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9B436 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9B440 loc_9B3F8: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_9B44B loc_9B436: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9B440: cmp eax, 1 jnz short loc_9B44B mov rax, [rdi] call qword ptr [rax+18h] loc_9B44B: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_9B45F: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
minja::Value * minja::VariableExpr::do_evaluate(minja::Value *this, long long a2, long long *a3) { long long v5; // r12 char v6; // bp long long v7; // rdi signed __int32 v8; // eax long long v9; // r15 const minja::Value *v10; // rax long long v11; // rdi signed __int32 v12; // eax _BYTE v14[8]; // [rsp+8h] [rbp-80h] BYREF long long v15; // [rsp+10h] [rbp-78h] volatile signed __int32 *v16; // [rsp+20h] [rbp-68h] volatile signed __int32 *v17; // [rsp+30h] [rbp-58h] volatile signed __int32 *v18; // [rsp+40h] [rbp-48h] char v19[64]; // [rsp+48h] [rbp-40h] BYREF v5 = *a3; minja::Value::Value((long long)v14, a2 + 32); v6 = (*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v5 + 32LL))(v5, v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); 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); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); v7 = v15; if ( v15 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v15 + 12); *(_DWORD *)(v15 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } if ( v6 ) { v9 = *a3; minja::Value::Value((long long)v14, a2 + 32); v10 = (const minja::Value *)(*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v9 + 24LL))(v9, v14); minja::Value::Value(this, v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); 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); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); v11 = v15; if ( v15 ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(v15 + 12); *(_DWORD *)(v15 + 12) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RDX] ADD R14,0x20 LEA R13,[RSP + 0x8] MOV RDI,R13 MOV RSI,R14 CALL 0x0018cf0a MOV RAX,qword ptr [R12] LAB_0019b2dc: MOV RDI,R12 MOV RSI,R13 CALL qword ptr [RAX + 0x20] LAB_0019b2e5: MOV EBP,EAX LEA R12,[RSP + 0x48] MOV RDI,R12 XOR ESI,ESI CALL 0x0015b4ca MOV RDI,R12 CALL 0x00160938 MOV RDI,qword ptr [R12 + -0x8] TEST RDI,RDI JZ 0x0019b30d CALL 0x00170324 LAB_0019b30d: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0019b31c CALL 0x00170324 LAB_0019b31c: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0019b32b CALL 0x00170324 LAB_0019b32b: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0019b361 MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x0019b34c MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019b356 LAB_0019b34c: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019b356: CMP EAX,0x1 JNZ 0x0019b361 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019b361: TEST BPL,BPL JZ 0x0019b3f8 MOV R15,qword ptr [R15] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R14 CALL 0x0018cf0a MOV RAX,qword ptr [R15] LAB_0019b380: MOV RDI,R15 MOV RSI,R12 CALL qword ptr [RAX + 0x18] MOV RDI,RBX MOV RSI,RAX CALL 0x00190558 LAB_0019b394: LEA R14,[RSP + 0x48] MOV RDI,R14 XOR ESI,ESI CALL 0x0015b4ca MOV RDI,R14 CALL 0x00160938 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0019b3b9 CALL 0x00170324 LAB_0019b3b9: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0019b3c8 CALL 0x00170324 LAB_0019b3c8: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0019b3d7 CALL 0x00170324 LAB_0019b3d7: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0019b44b MOV RAX,qword ptr [0x0022df80] CMP byte ptr [RAX],0x0 JZ 0x0019b436 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019b440 LAB_0019b3f8: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015b4ca MOV RDI,R14 MOV ESI,0x1 CALL 0x0015b4ca JMP 0x0019b44b LAB_0019b436: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019b440: CMP EAX,0x1 JNZ 0x0019b44b MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019b44b: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::VariableExpr::do_evaluate(shared_ptr *param_1) { int *piVar1; long *plVar2; char cVar3; int iVar4; Value *pVVar5; int8 *in_RDX; long in_RSI; bool bVar6; Value 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]; plVar2 = (long *)*in_RDX; Value::Value(local_80,(string *)(in_RSI + 0x20)); /* try { // try from 0019b2dc to 0019b2e4 has its CatchHandler @ 0019b45f */ cVar3 = (**(code **)(*plVar2 + 0x20))(plVar2,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_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_78 + 0x18))(); } } if (cVar3 == '\0') { bVar6 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (shared_ptr)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar6); 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(bVar6); } else { plVar2 = (long *)*in_RDX; Value::Value(local_80,(string *)(in_RSI + 0x20)); /* try { // try from 0019b380 to 0019b393 has its CatchHandler @ 0019b45d */ pVVar5 = (Value *)(**(code **)(*plVar2 + 0x18))(plVar2,local_80); Value::Value((Value *)param_1,pVVar5); 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_0022df80 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_78 + 0x18))(); } } } return param_1; }
11,061
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
monkey531[P]llama/common/./minja.hpp
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
O2
cpp
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx addq $0x20, %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) callq 0x3b9a1 leaq 0x30(%rbx), %rdi movq %r14, %rsi callq 0x3d2e6 addq $0x40, %rbx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2c9ae movq %rax, %r14 leaq 0x18(%rbx), %rdi callq 0x341e0 addq $0x8, %rbx movq %rbx, %rdi callq 0x3ca5c movq %r14, %rdi callq 0x21e50
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi add rdi, 20h ; ' ' xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>() lea rdi, [rbx+30h] mov rsi, r14 call _ZNSt12__shared_ptrISt8functionIFN5minja5ValueERKSt10shared_ptrINS1_7ContextEERNS1_14ArgumentsValueEEELN9__gnu_cxx12_Lock_policyE2EEC2ERKSE_; std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2> const&) add rbx, 40h ; '@' mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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(decltype(nullptr)) mov r14, rax lea rdi, [rbx+18h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rbx, 8 mov rdi, rbx call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() mov rdi, r14 call __Unwind_Resume
long long minja::Value::Value(long long a1, _QWORD *a2) { long long result; // rax *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>(a1 + 32); result = std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::__shared_ptr( (_QWORD *)(a1 + 48), a2); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(a1 + 64); return result; }
Value: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI ADD RDI,0x20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_0014071c: CALL 0x0013b9a1 LAB_00140721: LEA RDI,[RBX + 0x30] MOV RSI,R14 CALL 0x0013d2e6 ADD RBX,0x40 MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 JMP 0x0012c9ae
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> > const&) */ void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1) { *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 0014071c to 00140720 has its CatchHandler @ 00140742 */ std:: make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> (); std:: __shared_ptr<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,(__gnu_cxx::_Lock_policy)2> ::__shared_ptr((__shared_ptr<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,(__gnu_cxx::_Lock_policy)2> *)(this + 0x30),(__shared_ptr *)param_1); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((_func_decltype_nullptr *)(this + 0x40)); return; }
11,062
aria_read_data
eloqsql/storage/maria/ma_backup.c
int aria_read_data(File dfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block, uchar *buffer, size_t *bytes_read) { MARIA_SHARE share; int retry= 0; DBUG_ENTER("aria_read_data"); share.keypage_header= cap->keypage_header; share.block_size= cap->block_size; if (!cap->online_backup_safe) { *bytes_read= my_pread(dfile, buffer, cap->block_size, block * cap->block_size, MY_WME); if (*bytes_read == 0) DBUG_RETURN(HA_ERR_END_OF_FILE); DBUG_RETURN(*bytes_read > 0 ? 0 : (my_errno ? my_errno : -1)); } *bytes_read= cap->block_size; do { int error; size_t length; if ((length= my_pread(dfile, buffer, cap->block_size, block * cap->block_size, MYF(0))) != cap->block_size) { if (length == 0) DBUG_RETURN(HA_ERR_END_OF_FILE); if (length == (size_t) -1) DBUG_RETURN(my_errno ? my_errno : -1); } /* If not transactional or key file header, there are no checksums */ if (!cap->online_backup_safe) DBUG_RETURN(length == cap->block_size ? 0 : HA_ERR_CRASHED); if (length == cap->block_size) { error= maria_page_crc_check(buffer, block, &share, ((block % cap->bitmap_pages_covered) == 0 ? MARIA_NO_CRC_BITMAP_PAGE : MARIA_NO_CRC_NORMAL_PAGE), share.block_size - CRC_SIZE); if (error != HA_ERR_WRONG_CRC) DBUG_RETURN(error); } my_sleep(100000); /* Sleep 0.1 seconds */ } while (retry < MAX_RETRY); DBUG_RETURN(HA_ERR_WRONG_CRC); }
O3
c
aria_read_data: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc48, %rsp # imm = 0xC48 movq %r8, %r15 movq %rcx, %r14 movq %rdx, %rbx movl %edi, %r12d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x14(%rsi), %eax movl %eax, -0x524(%rbp) movl 0x10(%rsi), %edx movl %edx, -0x4ac(%rbp) cmpb $0x0, 0x1f(%rsi) je 0x710eb movq %rsi, %r13 movq %rdx, -0xc70(%rbp) movq %rdx, (%r15) movl 0x10(%rsi), %edx movq %rdx, %rcx imulq %rbx, %rcx xorl %r15d, %r15d movl %r12d, %edi movq %r14, %rsi xorl %r8d, %r8d callq 0xa022c movl 0x10(%r13), %ecx cmpq %rcx, %rax je 0x710ac testq %rax, %rax je 0x7114d cmpq $-0x1, %rax je 0x71139 cmpb $0x0, 0x1f(%r13) je 0x71155 movl $0x186a0, %edi # imm = 0x186A0 callq 0xa0840 movl 0x10(%r13), %edx movq %rdx, %rcx imulq %rbx, %rcx jmp 0x71060 cmpb $0x0, 0x1f(%r13) je 0x71115 movq %rbx, %rax xorl %edx, %edx divq 0x8(%r13) cmpq $0x1, %rdx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF sbbl $0x0, %ecx movq -0xc70(%rbp), %r8 addl $-0x4, %r8d leaq -0xc68(%rbp), %rdx movq %r14, %rdi movq %rbx, %rsi callq 0x4ff88 movsbl %al, %r15d jmp 0x71115 imulq %rdx, %rbx movl $0x10, %r8d movl %r12d, %edi movq %r14, %rsi movq %rbx, %rcx callq 0xa022c movq %rax, (%r15) xorl %ecx, %ecx testq %rax, %rax movl $0x89, %r15d cmovnel %ecx, %r15d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x71165 movl %r15d, %eax addq $0xc48, %rsp # imm = 0xC48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa16ee cmpl $0x0, (%rax) je 0x7115d callq 0xa16ee movl (%rax), %r15d jmp 0x71115 movl $0x89, %r15d jmp 0x71115 movl $0x7e, %r15d jmp 0x71115 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF jmp 0x71115 callq 0x29270 nop
aria_read_data: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C48h mov r15, r8 mov r14, rcx mov rbx, rdx mov r12d, edi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rsi+14h] mov [rbp+var_524], eax mov edx, [rsi+10h] mov [rbp+var_4AC], edx cmp byte ptr [rsi+1Fh], 0 jz loc_710EB mov r13, rsi mov [rbp+var_C70], rdx mov [r15], rdx mov edx, [rsi+10h] mov rcx, rdx imul rcx, rbx xor r15d, r15d loc_71060: mov edi, r12d mov rsi, r14 xor r8d, r8d call my_pread mov ecx, [r13+10h] cmp rax, rcx jz short loc_710AC test rax, rax jz loc_7114D cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_71139 cmp byte ptr [r13+1Fh], 0 jz loc_71155 mov edi, offset stru_186A0 call my_sleep mov edx, [r13+10h] mov rcx, rdx imul rcx, rbx jmp short loc_71060 loc_710AC: cmp byte ptr [r13+1Fh], 0 jz short loc_71115 mov rax, rbx xor edx, edx div qword ptr [r13+8] cmp rdx, 1 mov ecx, 0FFFFFFFFh sbb ecx, 0 mov r8, [rbp+var_C70] add r8d, 0FFFFFFFCh lea rdx, [rbp+var_C68] mov rdi, r14 mov rsi, rbx call maria_page_crc_check movsx r15d, al jmp short loc_71115 loc_710EB: imul rbx, rdx mov r8d, 10h mov edi, r12d mov rsi, r14 mov rcx, rbx call my_pread mov [r15], rax xor ecx, ecx test rax, rax mov r15d, 89h cmovnz r15d, ecx loc_71115: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_71165 mov eax, r15d add rsp, 0C48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_71139: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_7115D call _my_thread_var mov r15d, [rax] jmp short loc_71115 loc_7114D: mov r15d, 89h jmp short loc_71115 loc_71155: mov r15d, 7Eh ; '~' jmp short loc_71115 loc_7115D: mov r15d, 0FFFFFFFFh jmp short loc_71115 loc_71165: call ___stack_chk_fail
long long aria_read_data(unsigned int a1, long long a2, unsigned long long a3, const char *a4, long long *a5) { long long v8; // rdx long long v9; // rdx unsigned long long v10; // rcx unsigned int v11; // r15d long long v12; // rax long long v13; // rax int v15; // [rsp+0h] [rbp-C70h] char v16[1860]; // [rsp+8h] [rbp-C68h] BYREF int v17; // [rsp+74Ch] [rbp-524h] int v18; // [rsp+7C4h] [rbp-4ACh] unsigned long long v19; // [rsp+C40h] [rbp-30h] v19 = __readfsqword(0x28u); v17 = *(_DWORD *)(a2 + 20); v8 = *(unsigned int *)(a2 + 16); v18 = *(_DWORD *)(a2 + 16); if ( *(_BYTE *)(a2 + 31) ) { v15 = v8; *a5 = v8; v9 = *(unsigned int *)(a2 + 16); v10 = a3 * v9; v11 = 0; while ( 1 ) { v12 = my_pread(a1, a4, v9, v10, 0LL); if ( v12 == *(_DWORD *)(a2 + 16) ) break; if ( !v12 ) return 137; if ( v12 == -1 ) { if ( *(_DWORD *)my_thread_var(a1, a4) ) return *(unsigned int *)my_thread_var(a1, a4); else return (unsigned int)-1; } if ( !*(_BYTE *)(a2 + 31) ) return 126; my_sleep(&stru_186A0); v9 = *(unsigned int *)(a2 + 16); v10 = a3 * v9; } if ( *(_BYTE *)(a2 + 31) ) return (unsigned int)maria_page_crc_check( (long long)a4, a3, (long long)v16, -1 - (a3 % *(_QWORD *)(a2 + 8) == 0), v15 - 4); } else { v13 = my_pread(a1, a4, v8, v8 * a3, 16LL); *a5 = v13; v11 = 137; if ( v13 ) return 0; } return v11; }
aria_read_data: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc48 MOV R15,R8 MOV R14,RCX MOV RBX,RDX MOV R12D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RSI + 0x14] MOV dword ptr [RBP + -0x524],EAX MOV EDX,dword ptr [RSI + 0x10] MOV dword ptr [RBP + -0x4ac],EDX CMP byte ptr [RSI + 0x1f],0x0 JZ 0x001710eb MOV R13,RSI MOV qword ptr [RBP + -0xc70],RDX MOV qword ptr [R15],RDX MOV EDX,dword ptr [RSI + 0x10] MOV RCX,RDX IMUL RCX,RBX XOR R15D,R15D LAB_00171060: MOV EDI,R12D MOV RSI,R14 XOR R8D,R8D CALL 0x001a022c MOV ECX,dword ptr [R13 + 0x10] CMP RAX,RCX JZ 0x001710ac TEST RAX,RAX JZ 0x0017114d CMP RAX,-0x1 JZ 0x00171139 CMP byte ptr [R13 + 0x1f],0x0 JZ 0x00171155 MOV EDI,0x186a0 CALL 0x001a0840 MOV EDX,dword ptr [R13 + 0x10] MOV RCX,RDX IMUL RCX,RBX JMP 0x00171060 LAB_001710ac: CMP byte ptr [R13 + 0x1f],0x0 JZ 0x00171115 MOV RAX,RBX XOR EDX,EDX DIV qword ptr [R13 + 0x8] CMP RDX,0x1 MOV ECX,0xffffffff SBB ECX,0x0 MOV R8,qword ptr [RBP + -0xc70] ADD R8D,-0x4 LEA RDX,[RBP + -0xc68] MOV RDI,R14 MOV RSI,RBX CALL 0x0014ff88 MOVSX R15D,AL JMP 0x00171115 LAB_001710eb: IMUL RBX,RDX MOV R8D,0x10 MOV EDI,R12D MOV RSI,R14 MOV RCX,RBX CALL 0x001a022c MOV qword ptr [R15],RAX XOR ECX,ECX TEST RAX,RAX MOV R15D,0x89 CMOVNZ R15D,ECX LAB_00171115: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00171165 MOV EAX,R15D ADD RSP,0xc48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00171139: CALL 0x001a16ee CMP dword ptr [RAX],0x0 JZ 0x0017115d CALL 0x001a16ee MOV R15D,dword ptr [RAX] JMP 0x00171115 LAB_0017114d: MOV R15D,0x89 JMP 0x00171115 LAB_00171155: MOV R15D,0x7e JMP 0x00171115 LAB_0017115d: MOV R15D,0xffffffff JMP 0x00171115 LAB_00171165: CALL 0x00129270
int aria_read_data(int4 param_1,long param_2,ulong param_3,int8 param_4,ulong *param_5) { uint uVar1; uint uVar2; char cVar3; ulong uVar4; int *piVar5; int iVar6; long in_FS_OFFSET; int1 local_c70 [1860]; int4 local_52c; uint local_4b4; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_52c = *(int4 *)(param_2 + 0x14); uVar1 = *(uint *)(param_2 + 0x10); uVar4 = (ulong)uVar1; local_4b4 = uVar1; if (*(char *)(param_2 + 0x1f) == '\0') { uVar4 = my_pread(param_1,param_4,uVar4,param_3 * uVar4,0x10); *param_5 = uVar4; iVar6 = 0x89; if (uVar4 != 0) { iVar6 = 0; } } else { *param_5 = uVar4; uVar2 = *(uint *)(param_2 + 0x10); iVar6 = 0; while( true ) { uVar4 = my_pread(param_1,param_4,(ulong)uVar2,uVar2 * param_3,0); if (uVar4 == *(uint *)(param_2 + 0x10)) break; if (uVar4 == 0) { iVar6 = 0x89; goto LAB_00171115; } if (uVar4 == 0xffffffffffffffff) { piVar5 = (int *)_my_thread_var(); if (*piVar5 == 0) { iVar6 = -1; } else { piVar5 = (int *)_my_thread_var(); iVar6 = *piVar5; } goto LAB_00171115; } if (*(char *)(param_2 + 0x1f) == '\0') { iVar6 = 0x7e; goto LAB_00171115; } my_sleep(100000); uVar2 = *(uint *)(param_2 + 0x10); } if (*(char *)(param_2 + 0x1f) != '\0') { cVar3 = maria_page_crc_check (param_4,param_3,local_c70, -1 - (uint)(param_3 % *(ulong *)(param_2 + 8) == 0),uVar1 - 4); iVar6 = (int)cVar3; } } LAB_00171115: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar6; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,063
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O0
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x213380(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x8, %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 0xade73 leaq 0x21333a(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf6020 movq %rax, -0x38(%rbp) leaq 0x213303(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xade92 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xf6020 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
inline_mysql_file_seek_3: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 8 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_ADE73 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_ADE92 loc_ADE73: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_ADE92: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long inline_mysql_file_seek_3( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] long long v9; // [rsp+58h] [rbp-38h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL); if ( !v8 ) return my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14); v9 = my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL); return v9; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x8 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 0x001ade73 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6020 MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001ade92 LAB_001ade73: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6020 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001ade92: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
int8 inline_mysql_file_seek (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int8 local_40; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_38 = param_6; local_2c = 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,8); if (local_48 == 0) { local_10 = my_seek(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c); local_40 = my_seek(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,0); local_10 = local_40; } return local_10; }
11,064
Json::Reader::pushError(Json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Json::Value const&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
bool Reader::pushError(const Value& value, const String& message, const Value& extra) { ptrdiff_t const length = end_ - begin_; if (value.getOffsetStart() > length || value.getOffsetLimit() > length || extra.getOffsetLimit() > length) return false; Token token; token.type_ = tokenError; token.start_ = begin_ + value.getOffsetStart(); token.end_ = begin_ + value.getOffsetLimit(); ErrorInfo info; info.token_ = token; info.message_ = message; info.extra_ = begin_ + extra.getOffsetStart(); errors_.push_back(info); return true; }
O3
cpp
Json::Reader::pushError(Json::Value const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Json::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0xc8(%rdi), %r13 subq 0xc0(%rdi), %r13 movq %rsi, %rdi callq 0x79ac6 cmpq %r13, %rax jg 0x6fafd movq %r12, %rdi callq 0x79acc cmpq %r13, %rax jg 0x6fafd movq %r14, %rdi callq 0x79acc cmpq %r13, %rax jle 0x6fb0e xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0xc0(%rbx), %rbp movq %r12, %rdi callq 0x79ac6 movq %rax, %r13 addq %rbp, %r13 movq 0xc0(%rbx), %rbp movq %r12, %rdi callq 0x79acc addq %rbp, %rax leaq 0x20(%rsp), %rdi leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) movq $0x0, -0x8(%r12) movb $0x0, (%r12) movl $0xd, -0x28(%r12) movq %r13, -0x20(%r12) movq %rax, -0x18(%r12) movq %r15, %rsi callq 0x1f200 movq 0xc0(%rbx), %r15 movq %r14, %rdi callq 0x79ac6 addq %rax, %r15 leaq 0x8(%rsp), %rsi movq %r15, 0x38(%rsi) addq $0x50, %rbx movq %rbx, %rdi callq 0x739a4 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0x6fba3 callq 0x1f0e0 movb $0x1, %al jmp 0x6faff movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0x6fbbc callq 0x1f0e0 movq %rbx, %rdi callq 0x1ffd0
_ZN4Json6Reader9pushErrorERKNS_5ValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov r13, [rdi+0C8h] sub r13, [rdi+0C0h] mov rdi, rsi; this call _ZNK4Json5Value14getOffsetStartEv; Json::Value::getOffsetStart(void) cmp rax, r13 jg short loc_6FAFD mov rdi, r12; this call _ZNK4Json5Value14getOffsetLimitEv; Json::Value::getOffsetLimit(void) cmp rax, r13 jg short loc_6FAFD mov rdi, r14; this call _ZNK4Json5Value14getOffsetLimitEv; Json::Value::getOffsetLimit(void) cmp rax, r13 jle short loc_6FB0E loc_6FAFD: xor eax, eax loc_6FAFF: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6FB0E: mov rbp, [rbx+0C0h] mov rdi, r12; this call _ZNK4Json5Value14getOffsetStartEv; Json::Value::getOffsetStart(void) mov r13, rax add r13, rbp mov rbp, [rbx+0C0h] mov rdi, r12; this call _ZNK4Json5Value14getOffsetLimitEv; Json::Value::getOffsetLimit(void) add rax, rbp lea rdi, [rsp+78h+var_58] lea r12, [rsp+78h+var_48] mov [r12-10h], r12 mov qword ptr [r12-8], 0 mov byte ptr [r12], 0 mov dword ptr [r12-28h], 0Dh mov [r12-20h], r13 mov [r12-18h], rax mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov r15, [rbx+0C0h] mov rdi, r14; this call _ZNK4Json5Value14getOffsetStartEv; Json::Value::getOffsetStart(void) add r15, rax lea rsi, [rsp+78h+var_70] mov [rsi+38h], r15 add rbx, 50h ; 'P' mov rdi, rbx call _ZNSt5dequeIN4Json6Reader9ErrorInfoESaIS2_EE9push_backERKS2_; std::deque<Json::Reader::ErrorInfo>::push_back(Json::Reader::ErrorInfo const&) mov rdi, [rsp+78h+var_58]; void * cmp rdi, r12 jz short loc_6FBA3 call __ZdlPv; operator delete(void *) loc_6FBA3: mov al, 1 jmp loc_6FAFF mov rbx, rax mov rdi, [rsp+arg_18]; void * cmp rdi, r12 jz short loc_6FBBC call __ZdlPv; operator delete(void *) loc_6FBBC: mov rdi, rbx call __Unwind_Resume
char Json::Reader::pushError(long long a1, Json::Value *a2, long long a3, Json::Value *a4) { long long v6; // r13 long long v8; // rbp long long v9; // r13 long long v10; // rbp long long v11; // r15 long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 int v16; // [rsp+8h] [rbp-70h] BYREF long long v17; // [rsp+10h] [rbp-68h] long long v18; // [rsp+18h] [rbp-60h] void *v19[2]; // [rsp+20h] [rbp-58h] BYREF _BYTE v20[16]; // [rsp+30h] [rbp-48h] BYREF long long v21; // [rsp+40h] [rbp-38h] v6 = *(_QWORD *)(a1 + 200) - *(_QWORD *)(a1 + 192); if ( Json::Value::getOffsetStart(a2) > v6 || Json::Value::getOffsetLimit(a2) > v6 || Json::Value::getOffsetLimit(a4) > v6 ) { return 0; } v8 = *(_QWORD *)(a1 + 192); v9 = v8 + Json::Value::getOffsetStart(a2); v10 = *(_QWORD *)(a1 + 192); v19[0] = v20; v19[1] = 0LL; v20[0] = 0; v16 = 13; v17 = v9; v18 = v10 + Json::Value::getOffsetLimit(a2); std::string::_M_assign(v19, a3); v11 = *(_QWORD *)(a1 + 192); v21 = Json::Value::getOffsetStart(a4) + v11; std::deque<Json::Reader::ErrorInfo>::push_back(a1 + 80, &v16, v12, v13, v14, v15); if ( v19[0] != v20 ) operator delete(v19[0]); return 1; }
pushError: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R13,qword ptr [RDI + 0xc8] SUB R13,qword ptr [RDI + 0xc0] MOV RDI,RSI CALL 0x00179ac6 CMP RAX,R13 JG 0x0016fafd MOV RDI,R12 CALL 0x00179acc CMP RAX,R13 JG 0x0016fafd MOV RDI,R14 CALL 0x00179acc CMP RAX,R13 JLE 0x0016fb0e LAB_0016fafd: XOR EAX,EAX LAB_0016faff: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016fb0e: MOV RBP,qword ptr [RBX + 0xc0] MOV RDI,R12 CALL 0x00179ac6 MOV R13,RAX ADD R13,RBP MOV RBP,qword ptr [RBX + 0xc0] MOV RDI,R12 CALL 0x00179acc ADD RAX,RBP LEA RDI,[RSP + 0x20] LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],0x0 MOV byte ptr [R12],0x0 MOV dword ptr [R12 + -0x28],0xd MOV qword ptr [R12 + -0x20],R13 MOV qword ptr [R12 + -0x18],RAX LAB_0016fb65: MOV RSI,R15 CALL 0x0011f200 MOV R15,qword ptr [RBX + 0xc0] MOV RDI,R14 CALL 0x00179ac6 ADD R15,RAX LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x38],R15 ADD RBX,0x50 MOV RDI,RBX CALL 0x001739a4 LAB_0016fb94: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R12 JZ 0x0016fba3 CALL 0x0011f0e0 LAB_0016fba3: MOV AL,0x1 JMP 0x0016faff
/* Json::Reader::pushError(Json::Value const&, std::__cxx11::string const&, Json::Value const&) */ int8 __thiscall Json::Reader::pushError(Reader *this,Value *param_1,string *param_2,Value *param_3) { long lVar1; long lVar2; long lVar3; int4 local_70 [2]; long local_68; long local_60; int1 *local_58; int8 local_50; int1 local_48 [16]; long local_38; lVar3 = *(long *)(this + 200) - *(long *)(this + 0xc0); lVar1 = Value::getOffsetStart(param_1); if (((lVar1 <= lVar3) && (lVar1 = Value::getOffsetLimit(param_1), lVar1 <= lVar3)) && (lVar1 = Value::getOffsetLimit(param_3), lVar1 <= lVar3)) { lVar1 = *(long *)(this + 0xc0); lVar2 = Value::getOffsetStart(param_1); lVar3 = *(long *)(this + 0xc0); local_60 = Value::getOffsetLimit(param_1); local_60 = local_60 + lVar3; local_50 = 0; local_48[0] = 0; local_70[0] = 0xd; local_68 = lVar2 + lVar1; local_58 = local_48; /* try { // try from 0016fb65 to 0016fb93 has its CatchHandler @ 0016fbaa */ std::__cxx11::string::_M_assign((string *)&local_58,param_2); lVar1 = *(long *)(this + 0xc0); local_38 = Value::getOffsetStart(param_3); local_38 = lVar1 + local_38; std::deque<Json::Reader::ErrorInfo,std::allocator<Json::Reader::ErrorInfo>>::push_back ((deque<Json::Reader::ErrorInfo,std::allocator<Json::Reader::ErrorInfo>> *) (this + 0x50),(ErrorInfo *)local_70); if (local_58 != local_48) { operator_delete(local_58); } return 1; } return 0; }
11,065
evmone::StackSpace::Deleter::operator()(void*)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp
void operator()(void* p) noexcept { #ifdef _MSC_VER // For MSVC the _aligned_malloc() must be paired with _aligned_free(). _aligned_free(p); #else std::free(p); #endif }
O0
cpp
evmone::StackSpace::Deleter::operator()(void*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x23290 addq $0x10, %rsp popq %rbp retq nop
_ZN6evmone10StackSpace7DeleterclEPv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call _free add rsp, 10h pop rbp retn
long long evmone::StackSpace::Deleter::operator()(long long a1, long long a2) { return free(a2); }
operator(): PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00123290 ADD RSP,0x10 POP RBP RET
/* evmone::StackSpace::Deleter::TEMPNAMEPLACEHOLDERVALUE(void*) */ void __thiscall evmone::StackSpace::Deleter::operator()(Deleter *this,void *param_1) { free(param_1); return; }
11,066
fmt::v8::appender fmt::v8::detail::format_uint<4u, char, fmt::v8::appender, unsigned int>(fmt::v8::appender, unsigned int, int, bool)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format.h
inline auto format_uint(It out, UInt value, int num_digits, bool upper = false) -> It { if (auto ptr = to_pointer<Char>(out, to_unsigned(num_digits))) { format_uint<BASE_BITS>(ptr, value, num_digits, upper); return out; } // Buffer should be large enough to hold all digits (digits / BASE_BITS + 1). char buffer[num_bits<UInt>() / BASE_BITS + 1]; format_uint<BASE_BITS>(buffer, value, num_digits, upper); return detail::copy_str_noinline<Char>(buffer, buffer + num_digits, out); }
O0
c
fmt::v8::appender fmt::v8::detail::format_uint<4u, char, fmt::v8::appender, unsigned int>(fmt::v8::appender, unsigned int, int, bool): subq $0x118, %rsp # imm = 0x118 movb %r8b, %al movq %rdi, 0x108(%rsp) movq %rsi, 0xf0(%rsp) movq %rdx, 0xf8(%rsp) movq 0xf0(%rsp), %rdx movq 0xf8(%rsp), %rsi movq %rsi, 0xe8(%rsp) movq %rdx, 0xe0(%rsp) movl %ecx, 0xdc(%rsp) andb $0x1, %al movb %al, 0xdb(%rsp) movq 0x108(%rsp), %rax movq %rax, 0xc8(%rsp) movl 0xdc(%rsp), %edi callq 0x9d680 movl %eax, %eax movl %eax, %esi movq 0xc8(%rsp), %rdi callq 0x9a250 movq %rax, 0xd0(%rsp) cmpq $0x0, 0xd0(%rsp) je 0xb1b45 movq 0xd0(%rsp), %rdi movq 0xe0(%rsp), %rdx movq 0xe8(%rsp), %rsi movl 0xdc(%rsp), %ecx movb 0xdb(%rsp), %al movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx andb $0x1, %al movzbl %al, %r8d callq 0xb1bd0 movq 0x108(%rsp), %rax movq %rax, 0x110(%rsp) jmp 0xb1bbb leaq 0x20(%rsp), %rdi movq 0xe0(%rsp), %rdx movq 0xe8(%rsp), %rsi movl 0xdc(%rsp), %ecx movb 0xdb(%rsp), %al movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx andb $0x1, %al movzbl %al, %r8d callq 0xb1bd0 leaq 0x20(%rsp), %rdi leaq 0x20(%rsp), %rsi movslq 0xdc(%rsp), %rax addq %rax, %rsi movq 0x108(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdx callq 0x9a6f0 movq %rax, 0x110(%rsp) movq 0x110(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq nopl (%rax,%rax)
_ZN3fmt2v86detail11format_uintILj1EcNS0_8appenderEoEET1_S4_T2_ib: sub rsp, 118h mov al, r8b mov [rsp+118h+var_10], rdi mov [rsp+118h+var_28], rsi mov [rsp+118h+var_20], rdx mov rdx, [rsp+118h+var_28] mov rsi, [rsp+118h+var_20] mov [rsp+118h+var_30], rsi mov [rsp+118h+var_38], rdx mov [rsp+118h+var_3C], ecx and al, 1 mov [rsp+118h+var_3D], al mov rax, [rsp+118h+var_10] mov [rsp+118h+var_50], rax mov edi, [rsp+118h+var_3C] call _ZN3fmt2v86detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v8::detail::to_unsigned<int>(int) mov eax, eax mov esi, eax mov rdi, [rsp+118h+var_50] call _ZN3fmt2v86detail10to_pointerIcEEPT_NSt11conditionalIXsr3std7is_sameIS3_cEE5valueENS0_8appenderESt20back_insert_iteratorINS1_6bufferIS3_EEEE4typeEm mov [rsp+118h+var_48], rax cmp [rsp+118h+var_48], 0 jz short loc_B1B45 mov rdi, [rsp+118h+var_48] mov rdx, [rsp+118h+var_38] mov rsi, [rsp+118h+var_30] mov ecx, [rsp+118h+var_3C] mov al, [rsp+118h+var_3D] mov [rsp+118h+var_60], rsi mov [rsp+118h+var_68], rdx mov rsi, [rsp+118h+var_68] mov rdx, [rsp+118h+var_60] and al, 1 movzx r8d, al call _ZN3fmt2v86detail11format_uintILj1EcoEEPT0_S4_T1_ib; fmt::v8::detail::format_uint<1u,char,unsigned __int128>(char *,unsigned __int128,int,bool) mov rax, [rsp+118h+var_10] mov [rsp+118h+var_8], rax jmp short loc_B1BBB loc_B1B45: lea rdi, [rsp+118h+var_F8] mov rdx, [rsp+118h+var_38] mov rsi, [rsp+118h+var_30] mov ecx, [rsp+118h+var_3C] mov al, [rsp+118h+var_3D] mov [rsp+118h+var_100], rsi mov [rsp+118h+var_108], rdx mov rsi, [rsp+118h+var_108] mov rdx, [rsp+118h+var_100] and al, 1 movzx r8d, al call _ZN3fmt2v86detail11format_uintILj1EcoEEPT0_S4_T1_ib; fmt::v8::detail::format_uint<1u,char,unsigned __int128>(char *,unsigned __int128,int,bool) lea rdi, [rsp+118h+var_F8] lea rsi, [rsp+118h+var_F8] movsxd rax, [rsp+118h+var_3C] add rsi, rax mov rax, [rsp+118h+var_10] mov [rsp+118h+var_110], rax mov rdx, [rsp+118h+var_110] call _ZN3fmt2v86detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v8::detail::copy_str_noinline<char,char *,fmt::v8::appender>(char *,char *,fmt::v8::appender) mov [rsp+118h+var_8], rax loc_B1BBB: mov rax, [rsp+118h+var_8] add rsp, 118h retn
long long fmt::v8::detail::format_uint<1u,char,fmt::v8::appender,unsigned __int128>( long long a1, long long a2, long long a3, unsigned int a4, char a5) { unsigned int v5; // eax long long v6; // rcx long long v7; // r8 long long v8; // r9 _BYTE v10[144]; // [rsp+20h] [rbp-F8h] BYREF long long v11; // [rsp+B0h] [rbp-68h] long long v12; // [rsp+B8h] [rbp-60h] long long v13; // [rsp+C8h] [rbp-50h] long long v14; // [rsp+D0h] [rbp-48h] char v15; // [rsp+DBh] [rbp-3Dh] unsigned int v16; // [rsp+DCh] [rbp-3Ch] long long v17; // [rsp+E0h] [rbp-38h] long long v18; // [rsp+E8h] [rbp-30h] long long v19; // [rsp+F0h] [rbp-28h] long long v20; // [rsp+F8h] [rbp-20h] long long v21; // [rsp+108h] [rbp-10h] v21 = a1; v19 = a2; v20 = a3; v18 = a3; v17 = a2; v16 = a4; v15 = a5 & 1; v13 = a1; v5 = fmt::v8::detail::to_unsigned<int>(a4); v14 = fmt::v8::detail::to_pointer<char>(a1, v5); if ( v14 ) { v12 = v18; v11 = v17; fmt::v8::detail::format_uint<1u,char,unsigned __int128>(v14, v17, v18, v16, v15 & 1); return v21; } else { fmt::v8::detail::format_uint<1u,char,unsigned __int128>(v10, v17, v18, v16, v15 & 1); return fmt::v8::detail::copy_str_noinline<char,char *,fmt::v8::appender>( (long long)v10, (long long)&v10[v16], v21, v6, v7, v8); } }
format_uint<1u,char,fmt::v8::appender,unsigned__int128>: SUB RSP,0x118 MOV AL,R8B MOV qword ptr [RSP + 0x108],RDI MOV qword ptr [RSP + 0xf0],RSI MOV qword ptr [RSP + 0xf8],RDX MOV RDX,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0xe8],RSI MOV qword ptr [RSP + 0xe0],RDX MOV dword ptr [RSP + 0xdc],ECX AND AL,0x1 MOV byte ptr [RSP + 0xdb],AL MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0xc8],RAX MOV EDI,dword ptr [RSP + 0xdc] CALL 0x0019d680 MOV EAX,EAX MOV ESI,EAX MOV RDI,qword ptr [RSP + 0xc8] CALL 0x0019a250 MOV qword ptr [RSP + 0xd0],RAX CMP qword ptr [RSP + 0xd0],0x0 JZ 0x001b1b45 MOV RDI,qword ptr [RSP + 0xd0] MOV RDX,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] MOV ECX,dword ptr [RSP + 0xdc] MOV AL,byte ptr [RSP + 0xdb] MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] AND AL,0x1 MOVZX R8D,AL CALL 0x001b1bd0 MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x110],RAX JMP 0x001b1bbb LAB_001b1b45: LEA RDI,[RSP + 0x20] MOV RDX,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] MOV ECX,dword ptr [RSP + 0xdc] MOV AL,byte ptr [RSP + 0xdb] MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] AND AL,0x1 MOVZX R8D,AL CALL 0x001b1bd0 LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x20] MOVSXD RAX,dword ptr [RSP + 0xdc] ADD RSI,RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [RSP + 0x8] CALL 0x0019a6f0 MOV qword ptr [RSP + 0x110],RAX LAB_001b1bbb: MOV RAX,qword ptr [RSP + 0x110] ADD RSP,0x118 RET
/* fmt::v8::appender fmt::v8::detail::format_uint<1u, char, fmt::v8::appender, unsigned __int128>(fmt::v8::appender, unsigned __int128, int, bool) */ detail * __thiscall fmt::v8::detail::format_uint<1u,char,fmt::v8::appender,unsigned__int128> (detail *this,int8 param_2,int8 param_3,int param_4,byte param_5) { int4 uVar1; char local_f8 [144]; int8 local_68; int8 local_60; detail *local_50; char *local_48; byte local_3d; int local_3c; int8 local_38; int8 local_30; int8 local_28; int8 local_20; detail *local_10; detail *local_8; local_3d = param_5 & 1; local_50 = this; local_3c = param_4; local_38 = param_2; local_30 = param_3; local_28 = param_2; local_20 = param_3; local_10 = this; uVar1 = to_unsigned<int>(param_4); local_48 = to_pointer<char>(local_50,uVar1); if (local_48 == (char *)0x0) { format_uint<1u,char,unsigned__int128>(local_f8,(uint)local_38,(int)local_30,SUB41(local_3c,0)); local_8 = (detail *) copy_str_noinline<char,char*,fmt::v8::appender>(local_f8,local_f8 + local_3c,local_10) ; } else { local_60 = local_30; local_68 = local_38; format_uint<1u,char,unsigned__int128>(local_48,(uint)local_38,(int)local_30,SUB41(local_3c,0)); local_8 = local_10; } return local_8; }
11,067
ma_print_error
eloqsql/storage/maria/ma_info.c
void _ma_print_error(MARIA_HA *info, int error, my_bool write_to_log) { DBUG_ENTER("_ma_print_error"); DBUG_PRINT("error", ("error: %d log: %d", error, write_to_log)); if (!info->error_count++ || !maria_in_ha_maria || write_to_log) { MARIA_SHARE *share= info->s; _ma_report_error(error, (share->index_file_name.length ? &share->index_file_name : &share->unique_file_name), MYF(write_to_log ? ME_ERROR_LOG : 0)); } DBUG_VOID_RETURN; }
O0
c
ma_print_error: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movb %al, -0xd(%rbp) jmp 0x389a6 movq -0x8(%rbp), %rcx movl 0x628(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x628(%rcx) cmpl $0x0, %eax je 0x389d5 leaq 0x4078b5(%rip), %rax # 0x44027c cmpb $0x0, (%rax) je 0x389d5 movsbl -0xd(%rbp), %eax cmpl $0x0, %eax je 0x38a32 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x5d8(%rax) je 0x38a04 movq -0x18(%rbp), %rax addq $0x5d0, %rax # imm = 0x5D0 movq %rax, -0x28(%rbp) jmp 0x38a12 movq -0x18(%rbp), %rax addq $0x5b0, %rax # imm = 0x5B0 movq %rax, -0x28(%rbp) movl -0x1c(%rbp), %edi movq -0x28(%rbp), %rsi movsbl -0xd(%rbp), %edx xorl %eax, %eax movl $0x40, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movslq %eax, %rdx callq 0x388f0 jmp 0x38a34 jmp 0x38a36 addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ma_print_error: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_D], al jmp short $+2 loc_389A6: mov rcx, [rbp+var_8] mov eax, [rcx+628h] mov edx, eax add edx, 1 mov [rcx+628h], edx cmp eax, 0 jz short loc_389D5 lea rax, maria_in_ha_maria cmp byte ptr [rax], 0 jz short loc_389D5 movsx eax, [rbp+var_D] cmp eax, 0 jz short loc_38A32 loc_389D5: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov eax, [rbp+var_C] mov [rbp+var_1C], eax mov rax, [rbp+var_18] cmp qword ptr [rax+5D8h], 0 jz short loc_38A04 mov rax, [rbp+var_18] add rax, 5D0h mov [rbp+var_28], rax jmp short loc_38A12 loc_38A04: mov rax, [rbp+var_18] add rax, 5B0h mov [rbp+var_28], rax loc_38A12: mov edi, [rbp+var_1C] mov rsi, [rbp+var_28] movsx edx, [rbp+var_D] xor eax, eax mov ecx, 40h ; '@' cmp edx, 0 cmovnz eax, ecx movsxd rdx, eax call _ma_report_error loc_38A32: jmp short $+2 loc_38A34: jmp short $+2 loc_38A36: add rsp, 30h pop rbp retn
long long ma_print_error(_DWORD *a1, int a2, char a3, long long a4, long long a5, int a6) { int v6; // eax long long result; // rax int v8; // eax long long *v9; // [rsp+8h] [rbp-28h] long long v10; // [rsp+18h] [rbp-18h] v6 = a1[394]; a1[394] = v6 + 1; if ( !v6 || !maria_in_ha_maria || (result = (unsigned int)a3, a3) ) { v10 = *(_QWORD *)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 1496LL) ) v9 = (long long *)(v10 + 1488); else v9 = (long long *)(v10 + 1456); v8 = 0; if ( a3 ) v8 = 64; return ma_report_error(a2, v9, v8, 64LL, a5, a6); } return result; }
_ma_print_error: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV byte ptr [RBP + -0xd],AL JMP 0x001389a6 LAB_001389a6: MOV RCX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RCX + 0x628] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x628],EDX CMP EAX,0x0 JZ 0x001389d5 LEA RAX,[0x54027c] CMP byte ptr [RAX],0x0 JZ 0x001389d5 MOVSX EAX,byte ptr [RBP + -0xd] CMP EAX,0x0 JZ 0x00138a32 LAB_001389d5: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x5d8],0x0 JZ 0x00138a04 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x5d0 MOV qword ptr [RBP + -0x28],RAX JMP 0x00138a12 LAB_00138a04: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x5b0 MOV qword ptr [RBP + -0x28],RAX LAB_00138a12: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x28] MOVSX EDX,byte ptr [RBP + -0xd] XOR EAX,EAX MOV ECX,0x40 CMP EDX,0x0 CMOVNZ EAX,ECX MOVSXD RDX,EAX CALL 0x001388f0 LAB_00138a32: JMP 0x00138a34 LAB_00138a34: JMP 0x00138a36 LAB_00138a36: ADD RSP,0x30 POP RBP RET
void _ma_print_error(long *param_1,int4 param_2,char param_3) { long lVar1; int4 uVar2; long local_30; lVar1 = param_1[0xc5]; *(int *)(param_1 + 0xc5) = (int)lVar1 + 1; if ((((int)lVar1 == 0) || (maria_in_ha_maria == '\0')) || (param_3 != '\0')) { local_30 = *param_1; if (*(long *)(local_30 + 0x5d8) == 0) { local_30 = local_30 + 0x5b0; } else { local_30 = local_30 + 0x5d0; } uVar2 = 0; if (param_3 != '\0') { uVar2 = 0x40; } _ma_report_error(param_2,local_30,uVar2); } return; }
11,068
my_sync_dir_by_file
eloqsql/mysys/my_sync.c
int my_sync_dir_by_file(const char *file_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR char dir_name[FN_REFLEN]; size_t dir_name_length; dirname_part(dir_name, file_name, &dir_name_length); return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS); #else return 0; #endif }
O0
c
my_sync_dir_by_file: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x218(%rbp), %rsi leaq -0x210(%rbp), %rdi movq %rdi, -0x238(%rbp) leaq -0x228(%rbp), %rdx callq 0x334e0 movq -0x238(%rbp), %rdi movq -0x220(%rbp), %rax andl $0xfffffdff, %eax # imm = 0xFFFFFDFF movl %eax, %esi callq 0x367d0 movl %eax, -0x22c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x36908 movl -0x22c(%rbp), %eax addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x242e0 nopl (%rax)
my_sync_dir_by_file: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rsi, [rbp+var_218] lea rdi, [rbp+var_210] mov [rbp+var_238], rdi lea rdx, [rbp+var_228] call dirname_part mov rdi, [rbp+var_238] mov rax, [rbp+var_220] and eax, 0FFFFFDFFh mov esi, eax call my_sync_dir mov [rbp+var_22C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_36908 mov eax, [rbp+var_22C] add rsp, 240h pop rbp retn loc_36908: call ___stack_chk_fail
long long my_sync_dir_by_file(_BYTE *a1, long long a2) { long long v3; // [rsp+18h] [rbp-228h] BYREF long long v4; // [rsp+20h] [rbp-220h] _BYTE *v5; // [rsp+28h] [rbp-218h] _BYTE v6[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v7; // [rsp+238h] [rbp-8h] v7 = __readfsqword(0x28u); v5 = a1; v4 = a2; dirname_part((long long)v6, a1, &v3); return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF); }
my_sync_dir_by_file: PUSH RBP MOV RBP,RSP SUB RSP,0x240 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RSI,qword ptr [RBP + -0x218] LEA RDI,[RBP + -0x210] MOV qword ptr [RBP + -0x238],RDI LEA RDX,[RBP + -0x228] CALL 0x001334e0 MOV RDI,qword ptr [RBP + -0x238] MOV RAX,qword ptr [RBP + -0x220] AND EAX,0xfffffdff MOV ESI,EAX CALL 0x001367d0 MOV dword ptr [RBP + -0x22c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00136908 MOV EAX,dword ptr [RBP + -0x22c] ADD RSP,0x240 POP RBP RET LAB_00136908: CALL 0x001242e0
int4 my_sync_dir_by_file(int8 param_1,int8 param_2) { int4 uVar1; long in_FS_OFFSET; int1 local_230 [8]; int8 local_228; int8 local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; dirname_part(local_218,param_1,local_230); uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return uVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,069
google::protobuf::internal::MapFieldBase::SyncRepeatedFieldWithMap() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.cc
void MapFieldBase::SyncRepeatedFieldWithMap() const { ConstAccess(); // acquire here matches with release below to ensure that we can only see a // value of CLEAN after all previous changes have been synced. switch (state_.load(std::memory_order_acquire)) { case STATE_MODIFIED_MAP: mutex_.Lock(); // Double check state, because another thread may have seen the same // state and done the synchronization before the current thread. if (state_.load(std::memory_order_relaxed) == STATE_MODIFIED_MAP) { SyncRepeatedFieldWithMapNoLock(); state_.store(CLEAN, std::memory_order_release); } mutex_.Unlock(); ConstAccess(); break; case CLEAN: mutex_.Lock(); // Double check state if (state_.load(std::memory_order_relaxed) == CLEAN) { if (repeated_field_ == nullptr) { repeated_field_ = Arena::CreateMessage<RepeatedPtrField<Message> >(arena_); } state_.store(CLEAN, std::memory_order_release); } mutex_.Unlock(); ConstAccess(); break; default: break; } }
O3
cpp
google::protobuf::internal::MapFieldBase::SyncRepeatedFieldWithMap() const: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movl 0x40(%rdi), %eax cmpl $0x2, %eax je 0x99c26 testl %eax, %eax jne 0x99c7c leaq 0x18(%rbx), %r14 movq %r14, %rdi callq 0x2db90 testl %eax, %eax jne 0x99cb2 movl 0x40(%rbx), %eax testl %eax, %eax jne 0x99ca5 movq (%rbx), %rax movq %rbx, %rdi callq *0x68(%rax) jmp 0x99c9e leaq 0x18(%rbx), %r14 movq %r14, %rdi callq 0x2db90 testl %eax, %eax jne 0x99cb2 movl 0x40(%rbx), %eax cmpl $0x2, %eax jne 0x99ca5 cmpq $0x0, 0x10(%rbx) jne 0x99c9e movq 0x8(%rbx), %r15 testq %r15, %r15 je 0x99c82 leaq 0x170d3b(%rip), %rdx # 0x20a990 movl $0x18, %esi movq %r15, %rdi callq 0x78480 movq %rax, (%rdx) leaq 0x3833(%rip), %rcx # 0x9d49f movq %rcx, 0x8(%rdx) movq %r15, (%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rax) jmp 0x99c9a popq %rbx popq %r14 popq %r15 retq movl $0x18, %edi callq 0x2d270 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x10(%rbx) movl $0x2, 0x40(%rbx) movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0x2cd50 movl %eax, %edi callq 0x2cb90 nop
_ZNK6google8protobuf8internal12MapFieldBase24SyncRepeatedFieldWithMapEv: push r15 push r14 push rbx mov rbx, rdi mov eax, [rdi+40h] cmp eax, 2 jz short loc_99C26 test eax, eax jnz loc_99C7C lea r14, [rbx+18h] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz loc_99CB2 mov eax, [rbx+40h] test eax, eax jnz loc_99CA5 mov rax, [rbx] mov rdi, rbx call qword ptr [rax+68h] jmp short loc_99C9E loc_99C26: lea r14, [rbx+18h] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz short loc_99CB2 mov eax, [rbx+40h] cmp eax, 2 jnz short loc_99CA5 cmp qword ptr [rbx+10h], 0 jnz short loc_99C9E mov r15, [rbx+8] test r15, r15 jz short loc_99C82 lea rdx, _ZTIN6google8protobuf16RepeatedPtrFieldINS0_7MessageEEE; type_info * mov esi, 18h; unsigned __int64 mov rdi, r15; this call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rdx], rax lea rcx, _ZN6google8protobuf8internal21arena_destruct_objectINS0_16RepeatedPtrFieldINS0_7MessageEEEEEvPv; google::protobuf::internal::arena_destruct_object<google::protobuf::RepeatedPtrField<google::protobuf::Message>>(void *) mov [rdx+8], rcx mov [rax], r15 xorps xmm0, xmm0 movups xmmword ptr [rax+8], xmm0 jmp short loc_99C9A loc_99C7C: pop rbx pop r14 pop r15 retn loc_99C82: mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 loc_99C9A: mov [rbx+10h], rax loc_99C9E: mov dword ptr [rbx+40h], 2 loc_99CA5: mov rdi, r14 pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock loc_99CB2: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long google::protobuf::internal::MapFieldBase::SyncRepeatedFieldWithMap( google::protobuf::internal::MapFieldBase *this) { long long result; // rax char *v2; // r14 int v3; // eax long long v4; // r15 long long AlignedWithCleanup; // rax long long *v6; // rdx result = *((unsigned int *)this + 16); if ( (_DWORD)result == 2 ) { v2 = (char *)this + 24; v3 = pthread_mutex_lock((char *)this + 24); if ( !v3 ) { if ( *((_DWORD *)this + 16) == 2 ) { if ( !*((_QWORD *)this + 2) ) { v4 = *((_QWORD *)this + 1); if ( v4 ) { AlignedWithCleanup = google::protobuf::Arena::AllocateAlignedWithCleanup( *((google::protobuf::Arena **)this + 1), 0x18uLL, (const type_info *)&`typeinfo for'google::protobuf::RepeatedPtrField<google::protobuf::Message>); *v6 = AlignedWithCleanup; v6[1] = (long long)google::protobuf::internal::arena_destruct_object<google::protobuf::RepeatedPtrField<google::protobuf::Message>>; *(_QWORD *)AlignedWithCleanup = v4; *(_OWORD *)(AlignedWithCleanup + 8) = 0LL; } else { AlignedWithCleanup = operator new(0x18uLL); *(_OWORD *)AlignedWithCleanup = 0LL; *(_QWORD *)(AlignedWithCleanup + 16) = 0LL; } *((_QWORD *)this + 2) = AlignedWithCleanup; } goto LABEL_14; } return pthread_mutex_unlock(v2); } LABEL_16: std::__throw_system_error(v3); } if ( !(_DWORD)result ) { v2 = (char *)this + 24; v3 = pthread_mutex_lock((char *)this + 24); if ( !v3 ) { if ( !*((_DWORD *)this + 16) ) { (*(void ( **)(google::protobuf::internal::MapFieldBase *))(*(_QWORD *)this + 104LL))(this); LABEL_14: *((_DWORD *)this + 16) = 2; return pthread_mutex_unlock(v2); } return pthread_mutex_unlock(v2); } goto LABEL_16; } return result; }
SyncRepeatedFieldWithMap: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x40] CMP EAX,0x2 JZ 0x00199c26 TEST EAX,EAX JNZ 0x00199c7c LEA R14,[RBX + 0x18] MOV RDI,R14 CALL 0x0012db90 TEST EAX,EAX JNZ 0x00199cb2 MOV EAX,dword ptr [RBX + 0x40] TEST EAX,EAX JNZ 0x00199ca5 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x68] JMP 0x00199c9e LAB_00199c26: LEA R14,[RBX + 0x18] MOV RDI,R14 CALL 0x0012db90 TEST EAX,EAX JNZ 0x00199cb2 MOV EAX,dword ptr [RBX + 0x40] CMP EAX,0x2 JNZ 0x00199ca5 CMP qword ptr [RBX + 0x10],0x0 JNZ 0x00199c9e MOV R15,qword ptr [RBX + 0x8] TEST R15,R15 JZ 0x00199c82 LEA RDX,[0x30a990] MOV ESI,0x18 MOV RDI,R15 CALL 0x00178480 MOV qword ptr [RDX],RAX LEA RCX,[0x19d49f] MOV qword ptr [RDX + 0x8],RCX MOV qword ptr [RAX],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x8],XMM0 JMP 0x00199c9a LAB_00199c7c: POP RBX POP R14 POP R15 RET LAB_00199c82: MOV EDI,0x18 CALL 0x0012d270 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 LAB_00199c9a: MOV qword ptr [RBX + 0x10],RAX LAB_00199c9e: MOV dword ptr [RBX + 0x40],0x2 LAB_00199ca5: MOV RDI,R14 POP RBX POP R14 POP R15 JMP 0x0012cd50 LAB_00199cb2: MOV EDI,EAX CALL 0x0012cb90
/* google::protobuf::internal::MapFieldBase::SyncRepeatedFieldWithMap() const */ void __thiscall google::protobuf::internal::MapFieldBase::SyncRepeatedFieldWithMap(MapFieldBase *this) { ulong uVar1; int iVar2; ulong *puVar3; int1 auVar4 [16]; if (*(int *)(this + 0x40) == 2) { iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x18)); if (iVar2 != 0) goto LAB_00199cb2; if (*(int *)(this + 0x40) != 2) goto LAB_00199ca5; if (*(long *)(this + 0x10) == 0) { uVar1 = *(ulong *)(this + 8); if (uVar1 == 0) { puVar3 = (ulong *)operator_new(0x18); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; } else { auVar4 = Arena::AllocateAlignedWithCleanup(uVar1,(type_info *)0x18); puVar3 = auVar4._0_8_; *auVar4._8_8_ = puVar3; auVar4._8_8_[1] = arena_destruct_object<google::protobuf::RepeatedPtrField<google::protobuf::Message>>; *puVar3 = uVar1; puVar3[1] = 0; puVar3[2] = 0; } *(ulong **)(this + 0x10) = puVar3; } } else { if (*(int *)(this + 0x40) != 0) { return; } iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x18)); if (iVar2 != 0) { LAB_00199cb2: /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); } if (*(int *)(this + 0x40) != 0) goto LAB_00199ca5; (**(code **)(*(long *)this + 0x68))(this); } *(int4 *)(this + 0x40) = 2; LAB_00199ca5: pthread_mutex_unlock((pthread_mutex_t *)(this + 0x18)); return; }
11,070
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { for (const auto& child : children) child->render(out, context); }
O2
cpp
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq 0x20(%rdi), %r15 movq 0x28(%rdi), %r12 cmpq %r12, %r15 je 0x78223 movq (%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x7332e addq $0x10, %r15 jmp 0x7820a addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK5minja12SequenceNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, [rdi+20h] mov r12, [rdi+28h] loc_7820A: cmp r15, r12 jz short loc_78223 mov rdi, [r15] mov rsi, r14 mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) add r15, 10h jmp short loc_7820A loc_78223: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long minja::SequenceNode::do_render(long long a1) { long long ( ****v1)(_QWORD); // r15 long long ( ****v2)(_QWORD); // r12 long long result; // rax v1 = *(long long ( *****)(_QWORD))(a1 + 32); v2 = *(long long ( *****)(_QWORD))(a1 + 40); while ( v1 != v2 ) { result = minja::TemplateNode::render(*v1); v1 += 2; } return result; }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,qword ptr [RDI + 0x20] MOV R12,qword ptr [RDI + 0x28] LAB_0017820a: CMP R15,R12 JZ 0x00178223 MOV RDI,qword ptr [R15] MOV RSI,R14 MOV RDX,RBX CALL 0x0017332e ADD R15,0x10 JMP 0x0017820a LAB_00178223: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::SequenceNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::SequenceNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int8 *puVar1; int8 *puVar2; puVar1 = *(int8 **)(param_1 + 0x28); for (puVar2 = *(int8 **)(param_1 + 0x20); puVar2 != puVar1; puVar2 = puVar2 + 2) { TemplateNode::render((ostringstream *)*puVar2,param_2); } return; }
11,071
translog_stop_writing
eloqsql/storage/maria/ma_loghandler.c
void translog_stop_writing() { DBUG_ENTER("translog_stop_writing"); DBUG_PRINT("error", ("errno: %d my_errno: %d", errno, my_errno)); translog_status= (translog_status == TRANSLOG_SHUTDOWN ? TRANSLOG_UNINITED : TRANSLOG_READONLY); log_descriptor.is_everything_flushed= 1; log_descriptor.open_flags= O_BINARY | O_RDONLY; DBUG_ASSERT(0); DBUG_VOID_RETURN; }
O0
c
translog_stop_writing: pushq %rbp movq %rsp, %rbp jmp 0x4f7b6 jmp 0x4f7b8 movl 0x4289f2(%rip), %edx # 0x4781b0 movl $0x2, %eax xorl %ecx, %ecx cmpl $0x3, %edx cmovel %ecx, %eax movl %eax, 0x4289df(%rip) # 0x4781b0 movb $0x1, 0xc2aab8(%rip) # 0xc7a290 movl $0x0, 0x429bea(%rip) # 0x4793cc jmp 0x4f7e4 jmp 0x4f7e6 jmp 0x4f7e8 popq %rbp retq nopw (%rax,%rax)
translog_stop_writing: push rbp mov rbp, rsp jmp short $+2 loc_4F7B6: jmp short $+2 loc_4F7B8: mov edx, cs:translog_status mov eax, 2 xor ecx, ecx cmp edx, 3 cmovz eax, ecx mov cs:translog_status, eax mov cs:byte_C7A290, 1 mov cs:dword_4793CC, 0 jmp short $+2 loc_4F7E4: jmp short $+2 loc_4F7E6: jmp short $+2 loc_4F7E8: pop rbp retn
long long translog_stop_writing() { long long result; // rax result = 2LL; if ( translog_status == 3 ) result = 0LL; translog_status = result; byte_C7A290 = 1; dword_4793CC = 0; return result; }
translog_stop_writing: PUSH RBP MOV RBP,RSP JMP 0x0014f7b6 LAB_0014f7b6: JMP 0x0014f7b8 LAB_0014f7b8: MOV EDX,dword ptr [0x005781b0] MOV EAX,0x2 XOR ECX,ECX CMP EDX,0x3 CMOVZ EAX,ECX MOV dword ptr [0x005781b0],EAX MOV byte ptr [0x00d7a290],0x1 MOV dword ptr [0x005793cc],0x0 JMP 0x0014f7e4 LAB_0014f7e4: JMP 0x0014f7e6 LAB_0014f7e6: JMP 0x0014f7e8 LAB_0014f7e8: POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void translog_stop_writing(void) { int4 uVar1; uVar1 = 2; if (translog_status == 3) { uVar1 = 0; } translog_status = uVar1; DAT_00d7a290 = 1; _DAT_005793cc = 0; return; }
11,072
mysql_close_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
MK_ASYNC_CONT_BODY_VOID_RETURN(sock) } int STDCALL mysql_close_start(MYSQL *sock) { int res; /* It is legitimate to have NULL sock argument, which will do nothing. */ if (sock && sock->net.pvio) { res= mysql_close_slow_part_start(sock); /* If we need to block, return now and do the rest in mysql_close_cont(). */ if (res) return res; } mysql_close(sock); return 0; }
O3
c
mysql_close_start: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx testq %rdi, %rdi je 0x2caee cmpq $0x0, (%rbx) je 0x2caee movq %rbx, %rdi callq 0x2c912 testl %eax, %eax jne 0x2caf8 movq %rbx, %rdi callq 0x1ccb8 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_close_start: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi test rdi, rdi jz short loc_2CAEE cmp qword ptr [rbx], 0 jz short loc_2CAEE mov rdi, rbx call mysql_close_slow_part_start test eax, eax jnz short loc_2CAF8 loc_2CAEE: mov rdi, rbx call mysql_close xor eax, eax loc_2CAF8: add rsp, 8 pop rbx pop rbp retn
long long mysql_close_start(_QWORD *a1) { long long result; // rax if ( !a1 || !*a1 || (result = mysql_close_slow_part_start((long long)a1), !(_DWORD)result) ) { mysql_close((long long)a1); return 0LL; } return result; }
mysql_close_start: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI TEST RDI,RDI JZ 0x0012caee CMP qword ptr [RBX],0x0 JZ 0x0012caee MOV RDI,RBX CALL 0x0012c912 TEST EAX,EAX JNZ 0x0012caf8 LAB_0012caee: MOV RDI,RBX CALL 0x0011ccb8 XOR EAX,EAX LAB_0012caf8: ADD RSP,0x8 POP RBX POP RBP RET
int8 mysql_close_start(long *param_1) { int8 uVar1; if (((param_1 != (long *)0x0) && (*param_1 != 0)) && (uVar1 = mysql_close_slow_part_start(param_1), (int)uVar1 != 0)) { return uVar1; } mysql_close(param_1); return 0; }
11,073
Balloc
eloqsql/strings/dtoa.c
static Bigint *Balloc(int k, Stack_alloc *alloc) { Bigint *rv; DBUG_ASSERT(k <= Kmax); if (k <= Kmax && alloc->freelist[k]) { rv= alloc->freelist[k]; alloc->freelist[k]= rv->p.next; } else { int x, len; x= 1 << k; len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); if (alloc->free + len <= alloc->end) { rv= (Bigint*) alloc->free; alloc->free+= len; } else rv= (Bigint*) malloc(len); rv->k= k; rv->maxwds= x; } rv->sign= rv->wds= 0; rv->p.x= (ULong*) (rv + 1); return rv; }
O0
c
Balloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) jmp 0xdc431 cmpl $0xf, -0x4(%rbp) jg 0xdc471 movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx cmpq $0x0, 0x18(%rax,%rcx,8) je 0xdc471 movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq 0x18(%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq %rdx, 0x18(%rax,%rcx,8) jmp 0xdc4f6 movl -0x4(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x1c(%rbp) movslq -0x1c(%rbp), %rax shlq $0x2, %rax addq $0x18, %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x20(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0xdc4d5 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x20(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0xdc4e2 movslq -0x20(%rbp), %rdi callq 0x29520 movq %rax, -0x18(%rbp) movl -0x4(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x10(%rax) movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
Balloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi jmp short $+2 loc_DC431: cmp [rbp+var_4], 0Fh jg short loc_DC471 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] cmp qword ptr [rax+rcx*8+18h], 0 jz short loc_DC471 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov rax, [rax+rcx*8+18h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdx, [rax] mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov [rax+rcx*8+18h], rdx jmp loc_DC4F6 loc_DC471: mov ecx, [rbp+var_4] mov eax, 1 shl eax, cl mov [rbp+var_1C], eax movsxd rax, [rbp+var_1C] shl rax, 2 add rax, 18h add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_20], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_20] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_DC4D5 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_20] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_DC4E2 loc_DC4D5: movsxd rdi, [rbp+var_20] call _malloc mov [rbp+var_18], rax loc_DC4E2: mov ecx, [rbp+var_4] mov rax, [rbp+var_18] mov [rax+8], ecx mov ecx, [rbp+var_1C] mov rax, [rbp+var_18] mov [rax+0Ch], ecx loc_DC4F6: mov rax, [rbp+var_18] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+10h], 0 mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long Balloc(int a1, long long a2) { signed int v3; // [rsp+0h] [rbp-20h] long long v4; // [rsp+8h] [rbp-18h] if ( a1 <= 15 && *(_QWORD *)(a2 + 8LL * a1 + 24) ) { v4 = *(_QWORD *)(a2 + 8LL * a1 + 24); *(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)v4; } else { v3 = (4 * (1 << a1) + 31) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) { v4 = malloc(v3); } else { v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; } *(_DWORD *)(v4 + 8) = a1; *(_DWORD *)(v4 + 12) = 1 << a1; } *(_DWORD *)(v4 + 20) = 0; *(_DWORD *)(v4 + 16) = 0; *(_QWORD *)v4 = v4 + 24; return v4; }
Balloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001dc431 LAB_001dc431: CMP dword ptr [RBP + -0x4],0xf JG 0x001dc471 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] CMP qword ptr [RAX + RCX*0x8 + 0x18],0x0 JZ 0x001dc471 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX JMP 0x001dc4f6 LAB_001dc471: MOV ECX,dword ptr [RBP + -0x4] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x1c],EAX MOVSXD RAX,dword ptr [RBP + -0x1c] SHL RAX,0x2 ADD RAX,0x18 ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x20] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x001dc4d5 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x001dc4e2 LAB_001dc4d5: MOVSXD RDI,dword ptr [RBP + -0x20] CALL 0x00129520 MOV qword ptr [RBP + -0x18],RAX LAB_001dc4e2: MOV ECX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],ECX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xc],ECX LAB_001dc4f6: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int8 * Balloc(int param_1,long param_2) { int iVar1; uint uVar2; int8 *local_20; if ((param_1 < 0x10) && (*(long *)(param_2 + 0x18 + (long)param_1 * 8) != 0)) { local_20 = *(int8 **)(param_2 + 0x18 + (long)param_1 * 8); *(int8 *)(param_2 + 0x18 + (long)param_1 * 8) = *local_20; } else { iVar1 = 1 << ((byte)param_1 & 0x1f); uVar2 = iVar1 * 4 + 0x1fU & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar2)) { local_20 = (int8 *)malloc((long)(int)uVar2); } else { local_20 = *(int8 **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar2; } *(int *)(local_20 + 1) = param_1; *(int *)((long)local_20 + 0xc) = iVar1; } *(int4 *)((long)local_20 + 0x14) = 0; *(int4 *)(local_20 + 2) = 0; *local_20 = local_20 + 3; return local_20; }
11,074
my_fill_ucs2
eloqsql/strings/ctype-ucs2.c
static void my_fill_ucs2(CHARSET_INFO *cs __attribute__((unused)), char *s, size_t l, int fill) { DBUG_ASSERT(fill <= 0xFFFF); #ifdef WAITING_FOR_GCC_VECTORIZATION_BUG_TO_BE_FIXED /* This code with int2store() is known to be faster on some processors, but crashes on other processors due to a possible bug in GCC's -ftree-vectorization (which is enabled in -O3) in case of a non-aligned memory. See here for details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58039 */ char *last= s + l - 2; uint16 tmp= (fill >> 8) + ((fill & 0xFF) << 8); /* swap bytes */ DBUG_ASSERT(fill <= 0xFFFF); for ( ; s <= last; s+= 2) int2store(s, tmp); /* store little-endian */ #else for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2); #endif }
O3
c
my_fill_ucs2: cmpq $0x2, %rdx jb 0x48eba pushq %rbp movq %rsp, %rbp movl %ecx, %eax shrl $0x8, %eax movb %al, (%rsi) movb %cl, 0x1(%rsi) addq $0x2, %rsi addq $-0x2, %rdx cmpq $0x1, %rdx ja 0x48ea6 popq %rbp retq
my_fill_ucs2: cmp rdx, 2 jb short locret_48EBA push rbp mov rbp, rsp mov eax, ecx shr eax, 8 loc_48EA6: mov [rsi], al mov [rsi+1], cl add rsi, 2 add rdx, 0FFFFFFFFFFFFFFFEh cmp rdx, 1 ja short loc_48EA6 pop rbp locret_48EBA: retn
void my_fill_ucs2(long long a1, _BYTE *a2, unsigned long long a3, __int16 a4) { bool v4; // cf if ( a3 >= 2 ) { do { *a2 = HIBYTE(a4); a2[1] = a4; a2 += 2; v4 = a3 == 2; a3 -= 2LL; } while ( !v4 && a3 != 1 ); } }
my_fill_ucs2: CMP RDX,0x2 JC 0x00148eba PUSH RBP MOV RBP,RSP MOV EAX,ECX SHR EAX,0x8 LAB_00148ea6: MOV byte ptr [RSI],AL MOV byte ptr [RSI + 0x1],CL ADD RSI,0x2 ADD RDX,-0x2 CMP RDX,0x1 JA 0x00148ea6 POP RBP LAB_00148eba: RET
void my_fill_ucs2(int8 param_1,int1 *param_2,ulong param_3,int4 param_4) { if (1 < param_3) { do { *param_2 = (char)((uint)param_4 >> 8); param_2[1] = (char)param_4; param_2 = param_2 + 2; param_3 = param_3 - 2; } while (1 < param_3); } return; }
11,075
my_hash_sort_simple_nopad
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple_nopad(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end= key + len; register ulong m1= *nr1, m2= *nr2; for (; key < (uchar*) end ; key++) { MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_simple_nopad: movq (%rcx), %rax movq (%r8), %r9 testq %rdx, %rdx jle 0x6e798 pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi addq %rsi, %rdx movl %eax, %r10d andl $0x3f, %r10d addq %r9, %r10 movzbl (%rsi), %r11d movzbl (%rdi,%r11), %r11d imulq %r10, %r11 movq %rax, %r10 shlq $0x8, %r10 addq %r11, %r10 xorq %r10, %rax addq $0x3, %r9 incq %rsi cmpq %rdx, %rsi jb 0x6e767 popq %rbp movq %rax, (%rcx) movq %r9, (%r8) retq
my_hash_sort_simple_nopad: mov rax, [rcx] mov r9, [r8] test rdx, rdx jle short loc_6E798 push rbp mov rbp, rsp mov rdi, [rdi+58h] add rdx, rsi loc_6E767: mov r10d, eax and r10d, 3Fh add r10, r9 movzx r11d, byte ptr [rsi] movzx r11d, byte ptr [rdi+r11] imul r11, r10 mov r10, rax shl r10, 8 add r10, r11 xor rax, r10 add r9, 3 inc rsi cmp rsi, rdx jb short loc_6E767 pop rbp loc_6E798: mov [rcx], rax mov [r8], r9 retn
long long my_hash_sort_simple_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // r9 long long v7; // rdi unsigned __int8 *v8; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = *(_QWORD *)(a1 + 88); v8 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *(unsigned __int8 *)(v7 + *a2) + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v8 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_simple_nopad: MOV RAX,qword ptr [RCX] MOV R9,qword ptr [R8] TEST RDX,RDX JLE 0x0016e798 PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] ADD RDX,RSI LAB_0016e767: MOV R10D,EAX AND R10D,0x3f ADD R10,R9 MOVZX R11D,byte ptr [RSI] MOVZX R11D,byte ptr [RDI + R11*0x1] IMUL R11,R10 MOV R10,RAX SHL R10,0x8 ADD R10,R11 XOR RAX,R10 ADD R9,0x3 INC RSI CMP RSI,RDX JC 0x0016e767 POP RBP LAB_0016e798: MOV qword ptr [RCX],RAX MOV qword ptr [R8],R9 RET
void my_hash_sort_simple_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*(byte *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
11,076
CLI::Config::Config()
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/ConfigFwd.hpp
class Config { protected: std::vector<ConfigItem> items{}; public: /// Convert an app into a configuration virtual std::string to_config(const App *, bool, bool, std::string) const = 0; /// Convert a configuration into an app virtual std::vector<ConfigItem> from_config(std::istream &) const = 0; /// Get a flag value CLI11_NODISCARD virtual std::string to_flag(const ConfigItem &item) const { if(item.inputs.size() == 1) { return item.inputs.at(0); } if(item.inputs.empty()) { return "{}"; } throw ConversionError::TooManyInputsFlag(item.fullname()); // LCOV_EXCL_LINE } /// Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure CLI11_NODISCARD std::vector<ConfigItem> from_file(const std::string &name) const { std::ifstream input{name}; if(!input.good()) throw FileError::Missing(name); return from_config(input); }
O0
cpp
CLI::Config::Config(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi leaq 0x79b91(%rip), %rax # 0xa13b8 addq $0x10, %rax movq %rax, (%rdi) addq $0x8, %rdi movq %rdi, -0x10(%rbp) xorl %esi, %esi movl $0x18, %edx callq 0x9310 movq -0x10(%rbp), %rdi callq 0x27860 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN3CLI6ConfigC2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] lea rax, _ZTVN3CLI6ConfigE; `vtable for'CLI::Config add rax, 10h mov [rdi], rax add rdi, 8 mov [rbp+var_10], rdi xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_10] call _ZNSt6vectorIN3CLI10ConfigItemESaIS1_EEC2Ev; std::vector<CLI::ConfigItem>::vector(void) add rsp, 10h pop rbp retn
long long CLI::Config::Config(CLI::Config *this) { *(_QWORD *)this = &`vtable for'CLI::Config + 2; memset((char *)this + 8, 0LL, 24LL); return std::vector<CLI::ConfigItem>::vector((char *)this + 8); }
Config: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] LEA RAX,[0x1a13b8] ADD RAX,0x10 MOV qword ptr [RDI],RAX ADD RDI,0x8 MOV qword ptr [RBP + -0x10],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x00109310 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00127860 ADD RSP,0x10 POP RBP RET
/* CLI::Config::Config() */ void __thiscall CLI::Config::Config(Config *this) { *(int ***)this = &PTR___cxa_pure_virtual_001a13c8; memset((vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *)(this + 8),0,0x18); std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>::vector ((vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *)(this + 8)); return; }
11,077
walk_and_copy
eloqsql/storage/maria/ma_ft_parser.c
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat) { word->weight=LWS_IN_USE; docstat->sum+=word->weight; memcpy((docstat->list)++, word, sizeof(FT_WORD)); return 0; }
O3
c
walk_and_copy: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi je 0x5f361 movl %esi, %eax cvtsi2sd %rax, %xmm0 callq 0x29130 addsd 0x81ba9(%rip), %xmm0 # 0xe0f08 jmp 0x5f365 xorpd %xmm0, %xmm0 movsd %xmm0, 0x10(%rbx) addsd 0x10(%r14), %xmm0 movsd %xmm0, 0x10(%r14) movq (%r14), %rax leaq 0x18(%rax), %rcx movq %rcx, (%r14) movq 0x10(%rbx), %rcx movq %rcx, 0x10(%rax) movups (%rbx), %xmm0 movups %xmm0, (%rax) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
walk_and_copy: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rdi test esi, esi jz short loc_5F361 mov eax, esi cvtsi2sd xmm0, rax call _log addsd xmm0, cs:qword_E0F08 jmp short loc_5F365 loc_5F361: xorpd xmm0, xmm0 loc_5F365: movsd qword ptr [rbx+10h], xmm0 addsd xmm0, qword ptr [r14+10h] movsd qword ptr [r14+10h], xmm0 mov rax, [r14] lea rcx, [rax+18h] mov [r14], rcx mov rcx, [rbx+10h] mov [rax+10h], rcx movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rax], xmm0 xor eax, eax pop rbx pop r14 pop rbp retn
long long walk_and_copy(long long a1, int a2, double *a3) { double v4; // xmm0_8 double v5; // rax if ( a2 ) v4 = log((double)a2) + 1.0; else v4 = 0.0; *(double *)(a1 + 16) = v4; a3[2] = v4 + a3[2]; v5 = *a3; *(_QWORD *)a3 += 24LL; *(_QWORD *)(*(_QWORD *)&v5 + 16LL) = *(_QWORD *)(a1 + 16); **(_OWORD **)&v5 = *(_OWORD *)a1; return 0LL; }
walk_and_copy: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JZ 0x0015f361 MOV EAX,ESI CVTSI2SD XMM0,RAX CALL 0x00129130 ADDSD XMM0,qword ptr [0x001e0f08] JMP 0x0015f365 LAB_0015f361: XORPD XMM0,XMM0 LAB_0015f365: MOVSD qword ptr [RBX + 0x10],XMM0 ADDSD XMM0,qword ptr [R14 + 0x10] MOVSD qword ptr [R14 + 0x10],XMM0 MOV RAX,qword ptr [R14] LEA RCX,[RAX + 0x18] MOV qword ptr [R14],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x10],RCX MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RAX],XMM0 XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 walk_and_copy(int8 *param_1,uint param_2,long *param_3) { int8 *puVar1; double dVar2; int8 uVar3; if (param_2 == 0) { dVar2 = 0.0; } else { dVar2 = log((double)param_2); dVar2 = dVar2 + DAT_001e0f08; } param_1[2] = dVar2; param_3[2] = (long)(dVar2 + (double)param_3[2]); puVar1 = (int8 *)*param_3; *param_3 = (long)(puVar1 + 3); puVar1[2] = param_1[2]; uVar3 = param_1[1]; *puVar1 = *param_1; puVar1[1] = uVar3; return 0; }
11,078
ma_read_rnd_pack_record
eloqsql/storage/maria/ma_packrec.c
int _ma_read_rnd_pack_record(MARIA_HA *info, uchar *buf, register MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks) { File file; MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_read_rnd_pack_record"); if (filepos >= info->state->data_file_length) { my_errno= HA_ERR_END_OF_FILE; goto err; } file= info->dfile.file; if (info->opt_flag & READ_CACHE_USED) { if (_ma_read_cache(info, &info->rec_cache, block_info.header, filepos, share->pack.ref_length, skip_deleted_blocks ? READING_NEXT : 0)) goto err; file= -1; } if (_ma_pack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, file, filepos)) goto err; /* Error code is already set */ #ifndef DBUG_OFF if (block_info.rec_len > share->max_pack_length) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } #endif if (info->opt_flag & READ_CACHE_USED) { if (_ma_read_cache(info, &info->rec_cache, info->rec_buff, block_info.filepos, block_info.rec_len, skip_deleted_blocks ? READING_NEXT : 0)) goto err; } else { if (mysql_file_read(info->dfile.file, info->rec_buff + block_info.offset, block_info.rec_len-block_info.offset, MYF(MY_NABP))) goto err; } info->packed_length= block_info.rec_len; info->cur_row.lastpos= filepos; info->cur_row.nextpos= block_info.filepos+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; info->rec_buff[block_info.rec_len]= 0; /* Keep valgrind happy */ DBUG_RETURN(_ma_pack_rec_unpack(info, &info->bit_buff, buf, info->rec_buff, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O0
c
ma_read_rnd_pack_record: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movb %al, -0x81(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x80(%rbp), %rax movq -0x70(%rbp), %rcx movq 0x20(%rcx), %rcx cmpq 0x28(%rcx), %rax jb 0x384ec callq 0xf6090 movl $0x89, (%rax) jmp 0x386d7 movq -0x70(%rbp), %rax movl 0x480(%rax), %eax movl %eax, -0x88(%rbp) movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x38565 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x4b8, %rsi # imm = 0x4B8 leaq -0x60(%rbp), %rdx movq -0x80(%rbp), %rcx movq -0x90(%rbp), %rax movl 0x598(%rax), %eax movl %eax, %r8d movsbl -0x81(%rbp), %r10d xorl %r9d, %r9d movl $0x1, %eax cmpl $0x0, %r10d cmovnel %eax, %r9d callq 0x72c30 cmpb $0x0, %al je 0x3855b jmp 0x386d7 movl $0xffffffff, -0x88(%rbp) # imm = 0xFFFFFFFF movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x70(%rbp), %rcx addq $0x3a0, %rcx # imm = 0x3A0 movq -0x70(%rbp), %r8 addq $0x460, %r8 # imm = 0x460 movl -0x88(%rbp), %r9d movq -0x80(%rbp), %rax leaq -0x60(%rbp), %rdx movq %rax, (%rsp) callq 0x37f00 cmpl $0x0, %eax je 0x385ac jmp 0x386d7 movq -0x70(%rbp), %rax movl 0x61c(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x38608 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x4b8, %rsi # imm = 0x4B8 movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rdx movq -0x28(%rbp), %rcx movq -0x48(%rbp), %r8 movsbl -0x81(%rbp), %r10d xorl %r9d, %r9d movl $0x1, %eax cmpl $0x0, %r10d cmovnel %eax, %r9d callq 0x72c30 cmpb $0x0, %al je 0x38606 jmp 0x386d7 jmp 0x38651 movq -0x70(%rbp), %rax movl 0x480(%rax), %edx movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rcx movl -0xc(%rbp), %eax addq %rax, %rcx movq -0x48(%rbp), %r8 movl -0xc(%rbp), %eax subq %rax, %r8 leaq 0x118f6b(%rip), %rdi # 0x15159f movl $0x572, %esi # imm = 0x572 movl $0x4, %r9d callq 0x38130 cmpq $0x0, %rax je 0x3864f jmp 0x386d7 jmp 0x38651 movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x450(%rax) movq -0x80(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x28(%rbp), %rcx addq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x82, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rax movq -0x48(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x78(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x3a0(%rax), %rcx movq -0x48(%rbp), %r8 callq 0x382a0 movl %eax, -0x64(%rbp) jmp 0x386e3 jmp 0x386d9 callq 0xf6090 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x94(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3870d movl -0x94(%rbp), %eax addq $0xa0, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_ma_read_rnd_pack_record: push rbp mov rbp, rsp sub rsp, 0A0h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_81], al mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_70] mov rcx, [rcx+20h] cmp rax, [rcx+28h] jb short loc_384EC call _my_thread_var mov dword ptr [rax], 89h jmp loc_386D7 loc_384EC: mov rax, [rbp+var_70] mov eax, [rax+480h] mov [rbp+var_88], eax mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 2 cmp eax, 0 jz short loc_38565 mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 4B8h lea rdx, [rbp+var_60] mov rcx, [rbp+var_80] mov rax, [rbp+var_90] mov eax, [rax+598h] mov r8d, eax movsx r10d, [rbp+var_81] xor r9d, r9d mov eax, 1 cmp r10d, 0 cmovnz r9d, eax call _ma_read_cache cmp al, 0 jz short loc_3855B jmp loc_386D7 loc_3855B: mov [rbp+var_88], 0FFFFFFFFh loc_38565: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rcx, [rbp+var_70] add rcx, 3A0h mov r8, [rbp+var_70] add r8, 460h mov r9d, [rbp+var_88] mov rax, [rbp+var_80] lea rdx, [rbp+var_60] mov [rsp+0A0h+var_A0], rax call _ma_pack_get_block_info cmp eax, 0 jz short loc_385AC jmp loc_386D7 loc_385AC: mov rax, [rbp+var_70] mov eax, [rax+61Ch] and eax, 2 cmp eax, 0 jz short loc_38608 mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 4B8h mov rax, [rbp+var_70] mov rdx, [rax+3A0h] mov rcx, [rbp+var_28] mov r8, [rbp+var_48] movsx r10d, [rbp+var_81] xor r9d, r9d mov eax, 1 cmp r10d, 0 cmovnz r9d, eax call _ma_read_cache cmp al, 0 jz short loc_38606 jmp loc_386D7 loc_38606: jmp short loc_38651 loc_38608: mov rax, [rbp+var_70] mov edx, [rax+480h] mov rax, [rbp+var_70] mov rcx, [rax+3A0h] mov eax, [rbp+var_C] add rcx, rax mov r8, [rbp+var_48] mov eax, [rbp+var_C] sub r8, rax lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 572h mov r9d, 4 call inline_mysql_file_read cmp rax, 0 jz short loc_3864F jmp loc_386D7 loc_3864F: jmp short $+2 loc_38651: mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+450h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_70] mov [rax+98h], rcx mov rcx, [rbp+var_28] add rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+0A0h], rcx mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 82h mov [rax+624h], ecx mov rax, [rbp+var_70] mov rax, [rax+3A0h] mov rcx, [rbp+var_48] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rdx, [rbp+var_78] mov rax, [rbp+var_70] mov rcx, [rax+3A0h] mov r8, [rbp+var_48] call _ma_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_386E3 loc_386D7: jmp short $+2 loc_386D9: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_386E3: mov eax, [rbp+var_64] mov [rbp+var_94], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3870D mov eax, [rbp+var_94] add rsp, 0A0h pop rbp retn loc_3870D: call ___stack_chk_fail
long long ma_read_rnd_pack_record(long long a1, long long a2, unsigned long long a3, char a4) { int v5; // [rsp+18h] [rbp-88h] _BYTE v9[24]; // [rsp+40h] [rbp-60h] BYREF long long v10; // [rsp+58h] [rbp-48h] long long v11; // [rsp+78h] [rbp-28h] unsigned int v12; // [rsp+94h] [rbp-Ch] unsigned long long v13; // [rsp+98h] [rbp-8h] v13 = __readfsqword(0x28u); if ( a3 >= *(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL) ) { *(_DWORD *)my_thread_var() = 137; return *(unsigned int *)my_thread_var(); } v5 = *(_DWORD *)(a1 + 1152); if ( (*(_DWORD *)(a1 + 1564) & 2) != 0 ) { if ( (unsigned __int8)ma_read_cache(a1, a1 + 1208, v9, a3, *(unsigned int *)(*(_QWORD *)a1 + 1432LL), a4 != 0) ) return *(unsigned int *)my_thread_var(); v5 = -1; } if ( (unsigned int)ma_pack_get_block_info( (_QWORD *)a1, a1 + 656, (long long)v9, (_QWORD *)(a1 + 928), a1 + 1120, v5, a3) ) return *(unsigned int *)my_thread_var(); if ( (*(_DWORD *)(a1 + 1564) & 2) != 0 ) { if ( (unsigned __int8)ma_read_cache(a1, a1 + 1208, *(_QWORD *)(a1 + 928), v11, v10, a4 != 0) ) return *(unsigned int *)my_thread_var(); } else if ( inline_mysql_file_read( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 0x572u, *(_DWORD *)(a1 + 1152), v12 + *(_QWORD *)(a1 + 928), v10 - v12, 4LL) ) { return *(unsigned int *)my_thread_var(); } *(_QWORD *)(a1 + 1104) = v10; *(_QWORD *)(a1 + 152) = a3; *(_QWORD *)(a1 + 160) = v10 + v11; *(_DWORD *)(a1 + 1572) |= 0x82u; *(_BYTE *)(*(_QWORD *)(a1 + 928) + v10) = 0; return (unsigned int)ma_pack_rec_unpack((_DWORD *)a1, a1 + 656, a2, *(_QWORD *)(a1 + 928), v10); }
_ma_read_rnd_pack_record: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX + 0x20] CMP RAX,qword ptr [RCX + 0x28] JC 0x001384ec CALL 0x001f6090 MOV dword ptr [RAX],0x89 JMP 0x001386d7 LAB_001384ec: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x480] MOV dword ptr [RBP + -0x88],EAX MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x2 CMP EAX,0x0 JZ 0x00138565 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x4b8 LEA RDX,[RBP + -0x60] MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x90] MOV EAX,dword ptr [RAX + 0x598] MOV R8D,EAX MOVSX R10D,byte ptr [RBP + -0x81] XOR R9D,R9D MOV EAX,0x1 CMP R10D,0x0 CMOVNZ R9D,EAX CALL 0x00172c30 CMP AL,0x0 JZ 0x0013855b JMP 0x001386d7 LAB_0013855b: MOV dword ptr [RBP + -0x88],0xffffffff LAB_00138565: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x3a0 MOV R8,qword ptr [RBP + -0x70] ADD R8,0x460 MOV R9D,dword ptr [RBP + -0x88] MOV RAX,qword ptr [RBP + -0x80] LEA RDX,[RBP + -0x60] MOV qword ptr [RSP],RAX CALL 0x00137f00 CMP EAX,0x0 JZ 0x001385ac JMP 0x001386d7 LAB_001385ac: MOV RAX,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x2 CMP EAX,0x0 JZ 0x00138608 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x4b8 MOV RAX,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x48] MOVSX R10D,byte ptr [RBP + -0x81] XOR R9D,R9D MOV EAX,0x1 CMP R10D,0x0 CMOVNZ R9D,EAX CALL 0x00172c30 CMP AL,0x0 JZ 0x00138606 JMP 0x001386d7 LAB_00138606: JMP 0x00138651 LAB_00138608: MOV RAX,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RAX + 0x480] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x3a0] MOV EAX,dword ptr [RBP + -0xc] ADD RCX,RAX MOV R8,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0xc] SUB R8,RAX LEA RDI,[0x25159f] MOV ESI,0x572 MOV R9D,0x4 CALL 0x00138130 CMP RAX,0x0 JZ 0x0013864f JMP 0x001386d7 LAB_0013864f: JMP 0x00138651 LAB_00138651: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x450],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x82 MOV dword ptr [RAX + 0x624],ECX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x48] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RDX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RAX + 0x3a0] MOV R8,qword ptr [RBP + -0x48] CALL 0x001382a0 MOV dword ptr [RBP + -0x64],EAX JMP 0x001386e3 LAB_001386d7: JMP 0x001386d9 LAB_001386d9: CALL 0x001f6090 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_001386e3: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013870d MOV EAX,dword ptr [RBP + -0x94] ADD RSP,0xa0 POP RBP RET LAB_0013870d: CALL 0x0012a270
int4 _ma_read_rnd_pack_record(long *param_1,int8 param_2,ulong param_3,char param_4) { char cVar1; int iVar2; int4 *puVar3; long lVar4; long in_FS_OFFSET; int4 local_90; int4 local_6c; int1 local_68 [24]; long local_50; long local_30; uint local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 < *(ulong *)(param_1[4] + 0x28)) { local_90 = (int4)param_1[0x90]; if ((*(uint *)((long)param_1 + 0x61c) & 2) != 0) { cVar1 = _ma_read_cache(param_1,param_1 + 0x97,local_68,param_3, *(int4 *)(*param_1 + 0x598),param_4 != '\0'); if (cVar1 != '\0') goto LAB_001386d7; local_90 = 0xffffffff; } iVar2 = _ma_pack_get_block_info (param_1,param_1 + 0x52,local_68,param_1 + 0x74,param_1 + 0x8c,local_90, param_3); if (iVar2 == 0) { if ((*(uint *)((long)param_1 + 0x61c) & 2) == 0) { lVar4 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 0x572,(int)param_1[0x90],param_1[0x74] + (ulong)local_14, local_50 - (ulong)local_14,4); if (lVar4 == 0) goto LAB_00138651; } else { cVar1 = _ma_read_cache(param_1,param_1 + 0x97,param_1[0x74],local_30,local_50, param_4 != '\0'); if (cVar1 == '\0') { LAB_00138651: param_1[0x8a] = local_50; param_1[0x13] = param_3; param_1[0x14] = local_30 + local_50; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x82; *(int1 *)(param_1[0x74] + local_50) = 0; local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,param_1[0x74],local_50); goto LAB_001386e3; } } } } else { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } LAB_001386d7: puVar3 = (int4 *)_my_thread_var(); local_6c = *puVar3; LAB_001386e3: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_6c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,079
find_closure_var
bluesky950520[P]quickjs/quickjs.c
static int find_closure_var(JSContext *ctx, JSFunctionDef *s, JSAtom var_name) { int i; for(i = 0; i < s->closure_var_count; i++) { JSClosureVar *cv = &s->closure_var[i]; if (cv->var_name == var_name) return i; } return -1; }
O0
c
find_closure_var: movq %rdi, -0x10(%rsp) movq %rsi, -0x18(%rsp) movl %edx, -0x1c(%rsp) movl $0x0, -0x20(%rsp) movl -0x20(%rsp), %eax movq -0x18(%rsp), %rcx cmpl 0x198(%rcx), %eax jge 0xb8deb movq -0x18(%rsp), %rax movq 0x1a0(%rax), %rax movslq -0x20(%rsp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rsp) movq -0x28(%rsp), %rax movl 0x4(%rax), %eax cmpl -0x1c(%rsp), %eax jne 0xb8ddc movl -0x20(%rsp), %eax movl %eax, -0x4(%rsp) jmp 0xb8df3 jmp 0xb8dde movl -0x20(%rsp), %eax addl $0x1, %eax movl %eax, -0x20(%rsp) jmp 0xb8d96 movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF movl -0x4(%rsp), %eax retq nopl (%rax,%rax)
find_closure_var: mov [rsp+var_10], rdi mov [rsp+var_18], rsi mov [rsp+var_1C], edx mov [rsp+var_20], 0 loc_B8D96: mov eax, [rsp+var_20] mov rcx, [rsp+var_18] cmp eax, [rcx+198h] jge short loc_B8DEB mov rax, [rsp+var_18] mov rax, [rax+1A0h] movsxd rcx, [rsp+var_20] shl rcx, 3 add rax, rcx mov [rsp+var_28], rax mov rax, [rsp+var_28] mov eax, [rax+4] cmp eax, [rsp+var_1C] jnz short loc_B8DDC mov eax, [rsp+var_20] mov [rsp+var_4], eax jmp short loc_B8DF3 loc_B8DDC: jmp short $+2 loc_B8DDE: mov eax, [rsp+var_20] add eax, 1 mov [rsp+var_20], eax jmp short loc_B8D96 loc_B8DEB: mov [rsp+var_4], 0FFFFFFFFh loc_B8DF3: mov eax, [rsp+var_4] retn
long long find_closure_var(long long a1, long long a2, int a3) { unsigned int i; // [rsp+8h] [rbp-20h] for ( i = 0; (signed int)i < *(_DWORD *)(a2 + 408); ++i ) { if ( *(_DWORD *)(8LL * (int)i + *(_QWORD *)(a2 + 416) + 4) == a3 ) return i; } return (unsigned int)-1; }
find_closure_var: MOV qword ptr [RSP + -0x10],RDI MOV qword ptr [RSP + -0x18],RSI MOV dword ptr [RSP + -0x1c],EDX MOV dword ptr [RSP + -0x20],0x0 LAB_001b8d96: MOV EAX,dword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x18] CMP EAX,dword ptr [RCX + 0x198] JGE 0x001b8deb MOV RAX,qword ptr [RSP + -0x18] MOV RAX,qword ptr [RAX + 0x1a0] MOVSXD RCX,dword ptr [RSP + -0x20] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + -0x28],RAX MOV RAX,qword ptr [RSP + -0x28] MOV EAX,dword ptr [RAX + 0x4] CMP EAX,dword ptr [RSP + -0x1c] JNZ 0x001b8ddc MOV EAX,dword ptr [RSP + -0x20] MOV dword ptr [RSP + -0x4],EAX JMP 0x001b8df3 LAB_001b8ddc: JMP 0x001b8dde LAB_001b8dde: MOV EAX,dword ptr [RSP + -0x20] ADD EAX,0x1 MOV dword ptr [RSP + -0x20],EAX JMP 0x001b8d96 LAB_001b8deb: MOV dword ptr [RSP + -0x4],0xffffffff LAB_001b8df3: MOV EAX,dword ptr [RSP + -0x4] RET
int find_closure_var(int8 param_1,long param_2,int param_3) { int local_20; local_20 = 0; while( true ) { if (*(int *)(param_2 + 0x198) <= local_20) { return -1; } if (*(int *)(*(long *)(param_2 + 0x1a0) + (long)local_20 * 8 + 4) == param_3) break; local_20 = local_20 + 1; } return local_20; }
11,080
rlLoadDrawQuad
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void rlLoadDrawQuad(void) { #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) unsigned int quadVAO = 0; unsigned int quadVBO = 0; float vertices[] = { // Positions Texcoords -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, 0.0f, 1.0f, 0.0f, }; // Gen VAO to contain VBO glGenVertexArrays(1, &quadVAO); glBindVertexArray(quadVAO); // Gen and fill vertex buffer (VBO) glGenBuffers(1, &quadVBO); glBindBuffer(GL_ARRAY_BUFFER, quadVBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), &vertices, GL_STATIC_DRAW); // Bind vertex attributes (position, texcoords) glEnableVertexAttribArray(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION); glVertexAttribPointer(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION, 3, GL_FLOAT, GL_FALSE, 5*sizeof(float), (void *)0); // Positions glEnableVertexAttribArray(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD); glVertexAttribPointer(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD, 2, GL_FLOAT, GL_FALSE, 5*sizeof(float), (void *)(3*sizeof(float))); // Texcoords // Draw quad glBindVertexArray(quadVAO); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glBindVertexArray(0); // Delete buffers (VBO and VAO) glDeleteBuffers(1, &quadVBO); glDeleteVertexArrays(1, &quadVAO); #endif }
O1
c
rlLoadDrawQuad: pushq %r15 pushq %r14 pushq %rbx subq $0x60, %rsp xorl %eax, %eax leaq 0xc(%rsp), %rbx movl %eax, (%rbx) leaq 0x8(%rsp), %r14 movl %eax, (%r14) leaq 0x7c246(%rip), %rsi # 0xe3680 leaq 0x10(%rsp), %r15 movl $0xa, %ecx movq %r15, %rdi rep movsq (%rsi), %es:(%rdi) movl $0x1, %edi movq %rbx, %rsi callq *0xd8598(%rip) # 0x13f9f0 movl (%rbx), %edi callq *0xd7e50(%rip) # 0x13f2b0 movl $0x1, %edi movq %r14, %rsi callq *0xd851a(%rip) # 0x13f988 movl (%r14), %esi movl $0x8892, %edi # imm = 0x8892 callq *0xd7d84(%rip) # 0x13f200 movl $0x50, %esi movl $0x8892, %edi # imm = 0x8892 movq %r15, %rdx movl $0x88e4, %ecx # imm = 0x88E4 callq *0xd7ec4(%rip) # 0x13f358 xorl %edi, %edi callq *0xd8394(%rip) # 0x13f830 xorl %edi, %edi movl $0x3, %esi movl $0x1406, %edx # imm = 0x1406 xorl %ecx, %ecx movl $0x14, %r8d xorl %r9d, %r9d callq *0xd9c0f(%rip) # 0x1410c8 movl $0x1, %edi callq *0xd836c(%rip) # 0x13f830 movl $0xc, %r9d movl $0x1, %edi movl $0x2, %esi movl $0x1406, %edx # imm = 0x1406 xorl %ecx, %ecx movl $0x14, %r8d callq *0xd9be1(%rip) # 0x1410c8 movl (%rbx), %edi callq *0xd7dc1(%rip) # 0x13f2b0 movl $0x5, %edi xorl %esi, %esi movl $0x4, %edx callq *0xd825f(%rip) # 0x13f760 xorl %edi, %edi callq *0xd7da7(%rip) # 0x13f2b0 movl $0x1, %edi movq %r14, %rsi callq *0xd8129(%rip) # 0x13f640 movl $0x1, %edi movq %rbx, %rsi callq *0xd81ab(%rip) # 0x13f6d0 addq $0x60, %rsp popq %rbx popq %r14 popq %r15 retq
rlLoadDrawQuad: push r15 push r14 push rbx sub rsp, 60h xor eax, eax lea rbx, [rsp+78h+var_6C] mov [rbx], eax lea r14, [rsp+78h+var_70] mov [r14], eax lea rsi, unk_E3680 lea r15, [rsp+78h+var_68] mov ecx, 0Ah mov rdi, r15 rep movsq mov edi, 1 mov rsi, rbx call cs:glad_glGenVertexArrays mov edi, [rbx] call cs:glad_glBindVertexArray mov edi, 1 mov rsi, r14 call cs:glad_glGenBuffers mov esi, [r14] mov edi, 8892h call cs:glad_glBindBuffer mov esi, 50h ; 'P' mov edi, 8892h mov rdx, r15 mov ecx, 88E4h call cs:glad_glBufferData xor edi, edi call cs:glad_glEnableVertexAttribArray xor edi, edi mov esi, 3 mov edx, 1406h xor ecx, ecx mov r8d, 14h xor r9d, r9d call cs:glad_glVertexAttribPointer mov edi, 1 call cs:glad_glEnableVertexAttribArray mov r9d, 0Ch mov edi, 1 mov esi, 2 mov edx, 1406h xor ecx, ecx mov r8d, 14h call cs:glad_glVertexAttribPointer mov edi, [rbx] call cs:glad_glBindVertexArray mov edi, 5 xor esi, esi mov edx, 4 call cs:glad_glDrawArrays xor edi, edi call cs:glad_glBindVertexArray mov edi, 1 mov rsi, r14 call cs:glad_glDeleteBuffers mov edi, 1 mov rsi, rbx call cs:glad_glDeleteVertexArrays add rsp, 60h pop rbx pop r14 pop r15 retn
long long rlLoadDrawQuad() { unsigned int v1; // [rsp+8h] [rbp-70h] BYREF unsigned int v2; // [rsp+Ch] [rbp-6Ch] BYREF _BYTE v3[104]; // [rsp+10h] [rbp-68h] BYREF v2 = 0; v1 = 0; qmemcpy(v3, &unk_E3680, 0x50uLL); glad_glGenVertexArrays(1LL, &v2); glad_glBindVertexArray(v2); glad_glGenBuffers(1LL, &v1); glad_glBindBuffer(34962LL, v1); glad_glBufferData(34962LL, 80LL, v3, 35044LL); glad_glEnableVertexAttribArray(0LL); glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 20LL, 0LL); glad_glEnableVertexAttribArray(1LL); glad_glVertexAttribPointer(1LL, 2LL, 5126LL, 0LL, 20LL, 12LL); glad_glBindVertexArray(v2); glad_glDrawArrays(5LL, 0LL, 4LL); glad_glBindVertexArray(0LL); glad_glDeleteBuffers(1LL, &v1); return glad_glDeleteVertexArrays(1LL, &v2); }
rlLoadDrawQuad: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x60 XOR EAX,EAX LEA RBX,[RSP + 0xc] MOV dword ptr [RBX],EAX LEA R14,[RSP + 0x8] MOV dword ptr [R14],EAX LEA RSI,[0x1e3680] LEA R15,[RSP + 0x10] MOV ECX,0xa MOV RDI,R15 MOVSQ.REP RDI,RSI MOV EDI,0x1 MOV RSI,RBX CALL qword ptr [0x0023f9f0] MOV EDI,dword ptr [RBX] CALL qword ptr [0x0023f2b0] MOV EDI,0x1 MOV RSI,R14 CALL qword ptr [0x0023f988] MOV ESI,dword ptr [R14] MOV EDI,0x8892 CALL qword ptr [0x0023f200] MOV ESI,0x50 MOV EDI,0x8892 MOV RDX,R15 MOV ECX,0x88e4 CALL qword ptr [0x0023f358] XOR EDI,EDI CALL qword ptr [0x0023f830] XOR EDI,EDI MOV ESI,0x3 MOV EDX,0x1406 XOR ECX,ECX MOV R8D,0x14 XOR R9D,R9D CALL qword ptr [0x002410c8] MOV EDI,0x1 CALL qword ptr [0x0023f830] MOV R9D,0xc MOV EDI,0x1 MOV ESI,0x2 MOV EDX,0x1406 XOR ECX,ECX MOV R8D,0x14 CALL qword ptr [0x002410c8] MOV EDI,dword ptr [RBX] CALL qword ptr [0x0023f2b0] MOV EDI,0x5 XOR ESI,ESI MOV EDX,0x4 CALL qword ptr [0x0023f760] XOR EDI,EDI CALL qword ptr [0x0023f2b0] MOV EDI,0x1 MOV RSI,R14 CALL qword ptr [0x0023f640] MOV EDI,0x1 MOV RSI,RBX CALL qword ptr [0x0023f6d0] ADD RSP,0x60 POP RBX POP R14 POP R15 RET
void rlLoadDrawQuad(void) { long lVar1; int8 *puVar2; int8 *puVar3; int4 local_70; int4 local_6c; int8 local_68 [10]; local_6c = 0; local_70 = 0; puVar2 = &DAT_001e3680; puVar3 = local_68; for (lVar1 = 10; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar3 = *puVar2; puVar2 = puVar2 + 1; puVar3 = puVar3 + 1; } (*glad_glGenVertexArrays)(1,&local_6c); (*glad_glBindVertexArray)(local_6c); (*glad_glGenBuffers)(1,&local_70); (*glad_glBindBuffer)(0x8892,local_70); (*glad_glBufferData)(0x8892,0x50,local_68,0x88e4); (*glad_glEnableVertexAttribArray)(0); (*glad_glVertexAttribPointer)(0,3,0x1406,0,0x14,0); (*glad_glEnableVertexAttribArray)(1); (*glad_glVertexAttribPointer)(1,2,0x1406,0,0x14,0xc); (*glad_glBindVertexArray)(local_6c); (*glad_glDrawArrays)(5,0,4); (*glad_glBindVertexArray)(0); (*glad_glDeleteBuffers)(1,&local_70); (*glad_glDeleteVertexArrays)(1,&local_6c); return; }
11,081
update_rwlock_derived_flags()
eloqsql/storage/perfschema/pfs_instr.cc
void update_rwlock_derived_flags() { global_rwlock_container.apply_all(fct_update_rwlock_derived_flags); }
O3
cpp
update_rwlock_derived_flags(): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax xorl %ebx, %ebx leaq 0x35afc6(%rip), %r14 # 0x393378 leaq 0x39a047(%rip), %r15 # 0x3d2400 movq 0xa8(%r14,%rbx,8), %rax testq %rax, %rax je 0x38415 movq 0x50(%rax), %r12 testq %r12, %r12 jle 0x38415 movq 0x48(%rax), %r13 shlq $0x7, %r12 addq %r13, %r12 movq 0x18(%r13), %rdi callq 0x3babc testq %rax, %rax je 0x3840c cmpb $0x0, 0x4(%rax) jne 0x383f2 xorl %ecx, %ecx jmp 0x383f6 movzbl (%r15), %ecx movb %cl, 0x4(%r13) movb 0x5(%rax), %al movb %al, 0x5(%r13) subq $-0x80, %r13 cmpq %r12, %r13 jb 0x383da jmp 0x38415 movb $0x0, 0x4(%r13) xorl %eax, %eax jmp 0x383fd incq %rbx cmpq $0x400, %rbx # imm = 0x400 jne 0x383b9 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z27update_rwlock_derived_flagsv: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax xor ebx, ebx lea r14, global_rwlock_container lea r15, flag_global_instrumentation loc_383B9: mov rax, [r14+rbx*8+0A8h] test rax, rax jz short loc_38415 mov r12, [rax+50h] test r12, r12 jle short loc_38415 mov r13, [rax+48h] shl r12, 7 add r12, r13 loc_383DA: mov rdi, [r13+18h] call _Z21sanitize_rwlock_classP16PFS_rwlock_class; sanitize_rwlock_class(PFS_rwlock_class *) test rax, rax jz short loc_3840C cmp byte ptr [rax+4], 0 jnz short loc_383F2 xor ecx, ecx jmp short loc_383F6 loc_383F2: movzx ecx, byte ptr [r15] loc_383F6: mov [r13+4], cl mov al, [rax+5] loc_383FD: mov [r13+5], al sub r13, 0FFFFFFFFFFFFFF80h cmp r13, r12 jb short loc_383DA jmp short loc_38415 loc_3840C: mov byte ptr [r13+4], 0 xor eax, eax jmp short loc_383FD loc_38415: inc rbx cmp rbx, 400h jnz short loc_383B9 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char update_rwlock_derived_flags(void) { long long i; // rbx long long v1; // rax long long v2; // r12 unsigned long long v3; // r13 unsigned long long v4; // r12 char v5; // cl for ( i = 0LL; i != 1024; ++i ) { v1 = global_rwlock_container[i + 21]; if ( v1 ) { v2 = *(_QWORD *)(v1 + 80); if ( v2 > 0 ) { v3 = *(_QWORD *)(v1 + 72); v4 = v3 + (v2 << 7); do { v1 = sanitize_rwlock_class(*(_QWORD *)(v3 + 24)); if ( v1 ) { if ( *(_BYTE *)(v1 + 4) ) v5 = flag_global_instrumentation[0]; else v5 = 0; *(_BYTE *)(v3 + 4) = v5; LOBYTE(v1) = *(_BYTE *)(v1 + 5); } else { *(_BYTE *)(v3 + 4) = 0; LOBYTE(v1) = 0; } *(_BYTE *)(v3 + 5) = v1; v3 += 128LL; } while ( v3 < v4 ); } } } return v1; }
update_rwlock_derived_flags: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX XOR EBX,EBX LEA R14,[0x493378] LEA R15,[0x4d2400] LAB_001383b9: MOV RAX,qword ptr [R14 + RBX*0x8 + 0xa8] TEST RAX,RAX JZ 0x00138415 MOV R12,qword ptr [RAX + 0x50] TEST R12,R12 JLE 0x00138415 MOV R13,qword ptr [RAX + 0x48] SHL R12,0x7 ADD R12,R13 LAB_001383da: MOV RDI,qword ptr [R13 + 0x18] CALL 0x0013babc TEST RAX,RAX JZ 0x0013840c CMP byte ptr [RAX + 0x4],0x0 JNZ 0x001383f2 XOR ECX,ECX JMP 0x001383f6 LAB_001383f2: MOVZX ECX,byte ptr [R15] LAB_001383f6: MOV byte ptr [R13 + 0x4],CL MOV AL,byte ptr [RAX + 0x5] LAB_001383fd: MOV byte ptr [R13 + 0x5],AL SUB R13,-0x80 CMP R13,R12 JC 0x001383da JMP 0x00138415 LAB_0013840c: MOV byte ptr [R13 + 0x4],0x0 XOR EAX,EAX JMP 0x001383fd LAB_00138415: INC RBX CMP RBX,0x400 JNZ 0x001383b9 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* update_rwlock_derived_flags() */ void update_rwlock_derived_flags(void) { int1 uVar1; long lVar2; long lVar3; ulong uVar4; ulong uVar5; lVar3 = 0; do { lVar2 = *(long *)(global_rwlock_container + lVar3 * 8 + 0xa8); if ((lVar2 != 0) && (0 < *(long *)(lVar2 + 0x50))) { uVar5 = *(ulong *)(lVar2 + 0x48); uVar4 = *(long *)(lVar2 + 0x50) * 0x80 + uVar5; do { lVar2 = sanitize_rwlock_class(*(PFS_rwlock_class **)(uVar5 + 0x18)); if (lVar2 == 0) { *(int1 *)(uVar5 + 4) = 0; uVar1 = 0; } else { uVar1 = flag_global_instrumentation; if (*(char *)(lVar2 + 4) == '\0') { uVar1 = 0; } *(int1 *)(uVar5 + 4) = uVar1; uVar1 = *(int1 *)(lVar2 + 5); } *(int1 *)(uVar5 + 5) = uVar1; uVar5 = uVar5 + 0x80; } while (uVar5 < uVar4); } lVar3 = lVar3 + 1; } while (lVar3 != 0x400); return; }
11,082
js_typed_array___speciesCreate
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array___speciesCreate(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj; JSObject *p; JSValue ctor, ret; int argc1; obj = argv[0]; p = get_typed_array(ctx, obj); if (!p) return JS_EXCEPTION; ctor = JS_SpeciesConstructor(ctx, obj, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; argc1 = max_int(argc - 1, 0); if (JS_IsUndefined(ctor)) { ret = js_typed_array_constructor(ctx, JS_UNDEFINED, argc1, argv + 1, p->class_id); } else { ret = js_typed_array_create(ctx, ctor, argc1, argv + 1); JS_FreeValue(ctx, ctor); } return ret; }
O0
c
js_typed_array___speciesCreate: subq $0xc8, %rsp movq %rsi, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) movq %rdi, 0xa0(%rsp) movl %ecx, 0x9c(%rsp) movq %r8, 0x90(%rsp) movq 0x90(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x80(%rsp) movq 0x8(%rax), %rax movq %rax, 0x88(%rsp) movq 0xa0(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x58940 movq %rax, 0x78(%rsp) cmpq $0x0, 0x78(%rsp) jne 0xce453 movl $0x0, 0xb8(%rsp) movq $0x6, 0xc0(%rsp) jmp 0xce5db movq 0xa0(%rsp), %rdi movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r8 callq 0x74810 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xce4dc movq 0x68(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x70(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0xce5db movl 0x9c(%rsp), %edi subl $0x1, %edi xorl %esi, %esi callq 0x5d310 movl %eax, 0x54(%rsp) movq 0x68(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax je 0xce567 movq 0xa0(%rsp), %rdi movl $0x0, 0x10(%rsp) movq $0x3, 0x18(%rsp) movl 0x54(%rsp), %ecx movq 0x90(%rsp), %r8 addq $0x10, %r8 movq 0x78(%rsp), %rax movzwl 0x6(%rax), %r9d movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x58220 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0xce5c1 movq 0xa0(%rsp), %rdi movl 0x54(%rsp), %ecx movq 0x90(%rsp), %r8 addq $0x10, %r8 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0xce600 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x58(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x60(%rsp) movq 0xa0(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x23c90 movq 0x58(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xb8(%rsp), %rax movq 0xc0(%rsp), %rdx addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
js_typed_array___speciesCreate: sub rsp, 0C8h mov [rsp+0C8h+var_20], rsi mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_28], rdi mov [rsp+0C8h+var_2C], ecx mov [rsp+0C8h+var_38], r8 mov rax, [rsp+0C8h+var_38] mov rcx, [rax] mov [rsp+0C8h+var_48], rcx mov rax, [rax+8] mov [rsp+0C8h+var_40], rax mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_48] mov rdx, [rsp+0C8h+var_40] call get_typed_array mov [rsp+0C8h+var_50], rax cmp [rsp+0C8h+var_50], 0 jnz short loc_CE453 mov dword ptr [rsp+0C8h+var_10], 0 mov [rsp+0C8h+var_8], 6 jmp loc_CE5DB loc_CE453: mov rdi, [rsp+0C8h+var_28] mov dword ptr [rsp+0C8h+var_98], 0 mov [rsp+0C8h+var_90], 3 mov rsi, [rsp+0C8h+var_48] mov rdx, [rsp+0C8h+var_40] mov rcx, [rsp+0C8h+var_98] mov r8, [rsp+0C8h+var_90] call JS_SpeciesConstructor mov [rsp+0C8h+var_88], rax mov [rsp+0C8h+var_80], rdx mov rax, [rsp+0C8h+var_88] mov [rsp+0C8h+var_60], rax mov rax, [rsp+0C8h+var_80] mov [rsp+0C8h+var_58], rax mov rdi, [rsp+0C8h+var_60] mov rsi, [rsp+0C8h+var_58] call JS_IsException_1 cmp eax, 0 jz short loc_CE4DC mov rax, [rsp+0C8h+var_60] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_58] mov [rsp+0C8h+var_8], rax jmp loc_CE5DB loc_CE4DC: mov edi, [rsp+0C8h+var_2C] sub edi, 1 xor esi, esi call max_int_0 mov [rsp+0C8h+var_74], eax mov rdi, [rsp+0C8h+var_60] mov rsi, [rsp+0C8h+var_58] call JS_IsUndefined_0 cmp eax, 0 jz short loc_CE567 mov rdi, [rsp+0C8h+var_28] mov dword ptr [rsp+0C8h+var_B8], 0 mov [rsp+0C8h+var_B0], 3 mov ecx, [rsp+0C8h+var_74] mov r8, [rsp+0C8h+var_38] add r8, 10h mov rax, [rsp+0C8h+var_50] movzx r9d, word ptr [rax+6] mov rsi, [rsp+0C8h+var_B8] mov rdx, [rsp+0C8h+var_B0] call js_typed_array_constructor mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], rdx mov rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_68], rax jmp short loc_CE5C1 loc_CE567: mov rdi, [rsp+0C8h+var_28] mov ecx, [rsp+0C8h+var_74] mov r8, [rsp+0C8h+var_38] add r8, 10h mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] call js_typed_array_create mov [rsp+0C8h+var_C8], rax mov [rsp+0C8h+var_C0], rdx mov rax, [rsp+0C8h+var_C8] mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_68], rax mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] call JS_FreeValue loc_CE5C1: mov rax, [rsp+0C8h+var_70] mov [rsp+0C8h+var_10], rax mov rax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_8], rax loc_CE5DB: mov rax, [rsp+0C8h+var_10] mov rdx, [rsp+0C8h+var_8] add rsp, 0C8h retn
long long js_typed_array___speciesCreate( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, long long *a13, long long a14) { double v14; // xmm4_8 double v15; // xmm5_8 long long v16; // rdx double v17; // xmm4_8 double v18; // xmm5_8 long long v20; // [rsp+10h] [rbp-B8h] _DWORD *v21; // [rsp+30h] [rbp-98h] _DWORD *v22; // [rsp+40h] [rbp-88h] unsigned int v23; // [rsp+54h] [rbp-74h] long long v24; // [rsp+58h] [rbp-70h] long long v25; // [rsp+70h] [rbp-58h] long long typed_array; // [rsp+78h] [rbp-50h] long long v27; // [rsp+80h] [rbp-48h] long long v28; // [rsp+88h] [rbp-40h] long long v31; // [rsp+B8h] [rbp-10h] v27 = *a13; v28 = a13[1]; typed_array = get_typed_array(a1, *a13, v28, *a13, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); if ( typed_array ) { LODWORD(v21) = 0; v22 = JS_SpeciesConstructor(a1, v27, v28, v21, 3u, a2, a3, a4, a5, v14, v15, a8, a9); v25 = v16; if ( JS_IsException_1((long long)v22, v16) ) { return (long long)v22; } else { v23 = max_int_0(a12 - 1, 0); if ( JS_IsUndefined_0((long long)v22, v25) ) { LODWORD(v20) = 0; return js_typed_array_constructor( a1, v20, 3LL, v23, a13 + 2, *(unsigned __int16 *)(typed_array + 6), a2, a3, a4, a5, v17, v18, a8, a9); } else { v24 = js_typed_array_create(a1, v22, v25, v23, a13 + 2); JS_FreeValue(a1, (long long)v22, v25); } return v24; } } else { LODWORD(v31) = 0; } return v31; }
js_typed_array___speciesCreate: SUB RSP,0xc8 MOV qword ptr [RSP + 0xa8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa0],RDI MOV dword ptr [RSP + 0x9c],ECX MOV qword ptr [RSP + 0x90],R8 MOV RAX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x80],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x00158940 MOV qword ptr [RSP + 0x78],RAX CMP qword ptr [RSP + 0x78],0x0 JNZ 0x001ce453 MOV dword ptr [RSP + 0xb8],0x0 MOV qword ptr [RSP + 0xc0],0x6 JMP 0x001ce5db LAB_001ce453: MOV RDI,qword ptr [RSP + 0xa0] MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x38] CALL 0x00174810 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x70] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001ce4dc MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001ce5db LAB_001ce4dc: MOV EDI,dword ptr [RSP + 0x9c] SUB EDI,0x1 XOR ESI,ESI CALL 0x0015d310 MOV dword ptr [RSP + 0x54],EAX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x70] CALL 0x0012e260 CMP EAX,0x0 JZ 0x001ce567 MOV RDI,qword ptr [RSP + 0xa0] MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x3 MOV ECX,dword ptr [RSP + 0x54] MOV R8,qword ptr [RSP + 0x90] ADD R8,0x10 MOV RAX,qword ptr [RSP + 0x78] MOVZX R9D,word ptr [RAX + 0x6] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00158220 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX JMP 0x001ce5c1 LAB_001ce567: MOV RDI,qword ptr [RSP + 0xa0] MOV ECX,dword ptr [RSP + 0x54] MOV R8,qword ptr [RSP + 0x90] ADD R8,0x10 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x001ce600 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00123c90 LAB_001ce5c1: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xc0],RAX LAB_001ce5db: MOV RAX,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
int1 [16] js_typed_array___speciesCreate (int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int8 uVar1; int iVar2; int4 uVar3; long lVar4; int1 auVar6 [16]; uint uStack_b4; uint uStack_94; int8 local_68; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar5; uVar5 = *param_5; uVar1 = param_5[1]; lVar4 = get_typed_array(param_1,uVar5,uVar1); if (lVar4 == 0) { local_10 = 0; local_8 = 6; } else { auVar6 = JS_SpeciesConstructor(param_1,uVar5,uVar1,(ulong)uStack_94 << 0x20,3); local_8 = auVar6._8_8_; uVar5 = auVar6._0_8_; iVar2 = JS_IsException(uVar5,local_8); if (iVar2 == 0) { uVar3 = max_int(param_4 + -1,0); iVar2 = JS_IsUndefined(uVar5,local_8); if (iVar2 == 0) { auVar6 = js_typed_array_create(param_1,uVar5,local_8,uVar3,param_5 + 2); JS_FreeValue(param_1,uVar5,local_8); } else { auVar6 = js_typed_array_constructor (param_1,(ulong)uStack_b4 << 0x20,3,uVar3,param_5 + 2, *(int2 *)(lVar4 + 6)); } local_68 = auVar6._8_8_; local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; local_8 = local_68; } else { local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; } } auVar6._4_4_ = uStack_c; auVar6._0_4_ = local_10; auVar6._8_8_ = local_8; return auVar6; }
11,083
js_typed_array___speciesCreate
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array___speciesCreate(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj; JSObject *p; JSValue ctor, ret; int argc1; obj = argv[0]; p = get_typed_array(ctx, obj); if (!p) return JS_EXCEPTION; ctor = JS_SpeciesConstructor(ctx, obj, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; argc1 = max_int(argc - 1, 0); if (JS_IsUndefined(ctor)) { ret = js_typed_array_constructor(ctx, JS_UNDEFINED, argc1, argv + 1, p->class_id); } else { ret = js_typed_array_create(ctx, ctor, argc1, argv + 1); JS_FreeValue(ctx, ctor); } return ret; }
O1
c
js_typed_array___speciesCreate: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movl %esi, %r13d movq %rdi, %rbx movq (%rdx), %r15 movq 0x8(%rdx), %r12 movq %r15, 0x10(%rsp) cmpl $-0x1, %r12d jne 0x77fdc movq 0x10(%rsp), %rbp movzwl 0x6(%rbp), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x77fef leaq 0x2a42e(%rip), %rsi # 0xa2411 xorl %ebp, %ebp movq %rbx, %rdi xorl %eax, %eax callq 0x22567 testq %rbp, %rbp je 0x7806e movl %r13d, 0xc(%rsp) movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000 movl $0x3, %r8d movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x440b7 movq %rdx, %r15 cmpl $0x3, %r15d je 0x7807c movq %rax, %r12 cmpl $0x6, %r15d je 0x7809d movl 0xc(%rsp), %eax cmpl $0x2, %eax movl $0x1, %ecx cmovgel %eax, %ecx decl %ecx addq $0x10, %r14 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %r8 callq 0x780b8 movq %rax, %r14 movq %rdx, %rbp movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1d8c6 movq %r14, %r12 movq %rbp, %r15 jmp 0x7809d movl $0x6, %r15d xorl %r12d, %r12d xorl %r13d, %r13d jmp 0x780a0 addq $0x10, %r14 movzwl 0x6(%rbp), %r9d movl $0x3, %edx movq %rbx, %rdi xorl %esi, %esi movq %r14, %r8 callq 0x39038 movq %rax, %r12 movq %rdx, %r15 andq %r12, %r13 movl %r12d, %eax orq %r13, %rax movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_typed_array___speciesCreate: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdx mov r13d, esi mov rbx, rdi mov r15, [rdx] mov r12, [rdx+8] mov [rsp+48h+var_38], r15 cmp r12d, 0FFFFFFFFh jnz short loc_77FDC mov rbp, [rsp+48h+var_38] movzx eax, word ptr [rbp+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jb short loc_77FEF loc_77FDC: lea rsi, aNotATypedarray; "not a TypedArray" xor ebp, ebp mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_77FEF: test rbp, rbp jz short loc_7806E mov [rsp+48h+var_3C], r13d mov r13, 0FFFFFFFF00000000h mov r8d, 3 mov rdi, rbx mov rsi, r15 mov rdx, r12 xor ecx, ecx call JS_SpeciesConstructor mov r15, rdx cmp r15d, 3 jz short loc_7807C mov r12, rax cmp r15d, 6 jz short loc_7809D mov eax, [rsp+48h+var_3C] cmp eax, 2 mov ecx, 1 cmovge ecx, eax dec ecx add r14, 10h mov rdi, rbx mov rsi, r12 mov rdx, r15 mov r8, r14 call js_typed_array_create mov r14, rax mov rbp, rdx mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT mov r12, r14 mov r15, rbp jmp short loc_7809D loc_7806E: mov r15d, 6 xor r12d, r12d xor r13d, r13d jmp short loc_780A0 loc_7807C: add r14, 10h movzx r9d, word ptr [rbp+6] mov edx, 3 mov rdi, rbx xor esi, esi mov r8, r14 call js_typed_array_constructor mov r12, rax mov r15, rdx loc_7809D: and r13, r12 loc_780A0: mov eax, r12d or rax, r13 mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_typed_array___speciesCreate( long long a1, int a2, long long *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // r15 long long v16; // r12 long long v17; // rbp _DWORD *v18; // rax long long v19; // rdx long long v20; // rcx double v21; // xmm4_8 double v22; // xmm5_8 long long v23; // r15 unsigned long long v24; // r12 int v25; // ecx long long v26; // r14 unsigned long long v27; // r13 char v29; // [rsp+0h] [rbp-48h] v15 = *a3; v16 = a3[1]; if ( (_DWORD)v16 != -1 || (v17 = *a3, (unsigned __int16)(*(_WORD *)(*a3 + 6) - 21) >= 0xCu) ) { v17 = 0LL; JS_ThrowTypeError( a1, (long long)"not a TypedArray", (long long)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v29); } if ( v17 ) { v18 = JS_SpeciesConstructor(a1, v15, v16, 0LL, 3LL, a6, a7, a8, a9, a10, a11, a12, a13, a14); v23 = v19; if ( (_DWORD)v19 == 3 ) { v24 = js_typed_array_constructor( a1, 0LL, 3LL, a7, a8, a9, a10, v21, v22, a13, a14, v20, a3 + 2, *(unsigned __int16 *)(v17 + 6)); } else { v24 = (unsigned long long)v18; if ( (_DWORD)v19 != 6 ) { v25 = 1; if ( a2 >= 2 ) v25 = a2; v26 = js_typed_array_create(a1, v18, v19, (unsigned int)(v25 - 1), a3 + 2); JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v24, v23); v24 = v26; } } v27 = v24 & 0xFFFFFFFF00000000LL; } else { LODWORD(v24) = 0; v27 = 0LL; } return v27 | (unsigned int)v24; }
js_typed_array___speciesCreate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDX MOV R13D,ESI MOV RBX,RDI MOV R15,qword ptr [RDX] MOV R12,qword ptr [RDX + 0x8] MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x1 JNZ 0x00177fdc MOV RBP,qword ptr [RSP + 0x10] MOVZX EAX,word ptr [RBP + 0x6] ADD EAX,-0x15 CMP AX,0xc JC 0x00177fef LAB_00177fdc: LEA RSI,[0x1a2411] XOR EBP,EBP MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 LAB_00177fef: TEST RBP,RBP JZ 0x0017806e MOV dword ptr [RSP + 0xc],R13D MOV R13,-0x100000000 MOV R8D,0x3 MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 XOR ECX,ECX CALL 0x001440b7 MOV R15,RDX CMP R15D,0x3 JZ 0x0017807c MOV R12,RAX CMP R15D,0x6 JZ 0x0017809d MOV EAX,dword ptr [RSP + 0xc] CMP EAX,0x2 MOV ECX,0x1 CMOVGE ECX,EAX DEC ECX ADD R14,0x10 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV R8,R14 CALL 0x001780b8 MOV R14,RAX MOV RBP,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011d8c6 MOV R12,R14 MOV R15,RBP JMP 0x0017809d LAB_0017806e: MOV R15D,0x6 XOR R12D,R12D XOR R13D,R13D JMP 0x001780a0 LAB_0017807c: ADD R14,0x10 MOVZX R9D,word ptr [RBP + 0x6] MOV EDX,0x3 MOV RDI,RBX XOR ESI,ESI MOV R8,R14 CALL 0x00139038 MOV R12,RAX MOV R15,RDX LAB_0017809d: AND R13,R12 LAB_001780a0: MOV EAX,R12D OR RAX,R13 MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_typed_array___speciesCreate(long param_1,int param_2,long *param_3) { long lVar1; long lVar2; int8 uVar3; int iVar4; int8 uVar5; long lVar6; ulong uVar7; int1 auVar8 [16]; int1 auVar9 [16]; lVar1 = *param_3; lVar2 = param_3[1]; if (((int)lVar2 != -1) || (lVar6 = lVar1, 0xb < (ushort)(*(short *)(lVar1 + 6) - 0x15U))) { lVar6 = 0; JS_ThrowTypeError(param_1,"not a TypedArray"); } if (lVar6 == 0) { auVar8 = ZEXT816(6) << 0x40; uVar7 = 0; } else { auVar8 = JS_SpeciesConstructor(param_1,lVar1,lVar2,0,3); uVar5 = auVar8._8_8_; uVar3 = auVar8._0_8_; if (auVar8._8_4_ == 3) { auVar8 = js_typed_array_constructor(param_1,0,3); } else if (auVar8._8_4_ != 6) { iVar4 = 1; if (1 < param_2) { iVar4 = param_2; } auVar8 = js_typed_array_create(param_1,uVar3,uVar5,iVar4 + -1,param_3 + 2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar5); } uVar7 = auVar8._0_8_ & 0xffffffff00000000; } auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar7; auVar9._8_8_ = auVar8._8_8_; return auVar9; }
11,084
js_typed_array___speciesCreate
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array___speciesCreate(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj; JSObject *p; JSValue ctor, ret; int argc1; obj = argv[0]; p = get_typed_array(ctx, obj); if (!p) return JS_EXCEPTION; ctor = JS_SpeciesConstructor(ctx, obj, JS_UNDEFINED); if (JS_IsException(ctor)) return ctor; argc1 = max_int(argc - 1, 0); if (JS_IsUndefined(ctor)) { ret = js_typed_array_constructor(ctx, JS_UNDEFINED, argc1, argv + 1, p->class_id); } else { ret = js_typed_array_create(ctx, ctor, argc1, argv + 1); JS_FreeValue(ctx, ctor); } return ret; }
O2
c
js_typed_array___speciesCreate: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movl %esi, %ebp movq %rdi, %r15 movq (%rdx), %rbx movq 0x8(%rdx), %r14 movq %rbx, %rsi movq %r14, %rdx callq 0x3280b testq %rax, %rax je 0x64f1d movq %rax, %r13 movl %ebp, 0x4(%rsp) movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000 pushq $0x3 popq %r8 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x3bad8 movq %rax, %r14 movq %rdx, %rbx movl %ebx, %eax cmpq $0x6, %rax je 0x64f61 addq $0x10, %r12 cmpl $0x3, %eax jne 0x64f27 movzwl 0x6(%r13), %r9d pushq $0x3 popq %rdx movq %r15, %rdi xorl %esi, %esi movq %r12, %r8 callq 0x32165 movq %rax, %r14 movq %rdx, %rbx jmp 0x64f61 pushq $0x6 popq %rbx xorl %r14d, %r14d xorl %ebp, %ebp jmp 0x64f64 movl 0x4(%rsp), %eax cmpl $0x2, %eax pushq $0x1 popq %rcx cmovgel %eax, %ecx decl %ecx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r12, %r8 callq 0x64f7c movq %rax, %r12 movq %rdx, %r13 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e movq %r12, %r14 movq %r13, %rbx andq %r14, %rbp movl %r14d, %eax orq %rbp, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_typed_array___speciesCreate: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov ebp, esi mov r15, rdi mov rbx, [rdx] mov r14, [rdx+8] mov rsi, rbx mov rdx, r14 call get_typed_array test rax, rax jz short loc_64F1D mov r13, rax mov [rsp+38h+var_34], ebp mov rbp, 0FFFFFFFF00000000h push 3 pop r8 mov rdi, r15 mov rsi, rbx mov rdx, r14 xor ecx, ecx call JS_SpeciesConstructor mov r14, rax mov rbx, rdx mov eax, ebx cmp rax, 6 jz short loc_64F61 add r12, 10h cmp eax, 3 jnz short loc_64F27 movzx r9d, word ptr [r13+6] push 3 pop rdx mov rdi, r15 xor esi, esi mov r8, r12 call js_typed_array_constructor mov r14, rax mov rbx, rdx jmp short loc_64F61 loc_64F1D: push 6 pop rbx xor r14d, r14d xor ebp, ebp jmp short loc_64F64 loc_64F27: mov eax, [rsp+38h+var_34] cmp eax, 2 push 1 pop rcx cmovge ecx, eax dec ecx mov rdi, r15 mov rsi, r14 mov rdx, rbx mov r8, r12 call js_typed_array_create mov r12, rax mov r13, rdx mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue mov r14, r12 mov rbx, r13 loc_64F61: and rbp, r14 loc_64F64: mov eax, r14d or rax, rbp mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_typed_array___speciesCreate( long long a1, int a2, long long *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // rbx long long v16; // r14 long long typed_array; // rax long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // r13 long long v22; // rdx long long v23; // rcx long long v24; // r14 double v25; // xmm4_8 double v26; // xmm5_8 long long v27; // rbx long long v28; // r12 unsigned long long v29; // rbp int v30; // ecx long long v31; // r12 v15 = *a3; v16 = a3[1]; typed_array = get_typed_array(a1, *a3, v16, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( typed_array ) { v21 = typed_array; v24 = (long long)JS_SpeciesConstructor(a1, v15, v16, 0LL, 3LL, v18, a7, a8, a9, a10, v19, v20, a13, a14); v27 = v22; if ( (unsigned int)v22 != 6LL ) { v28 = (long long)(a3 + 2); if ( (_DWORD)v22 == 3 ) { v24 = js_typed_array_constructor( a1, 0LL, 3LL, a7, a8, a9, a10, v25, v26, a13, a14, v23, v28, *(unsigned __int16 *)(v21 + 6)); } else { v30 = 1; if ( a2 >= 2 ) v30 = a2; v31 = js_typed_array_create(a1, v24, v22, (unsigned int)(v30 - 1), v28); JS_FreeValue(a1, v24, v27); v24 = v31; } } v29 = v24 & 0xFFFFFFFF00000000LL; } else { LODWORD(v24) = 0; v29 = 0LL; } return v29 | (unsigned int)v24; }
js_typed_array___speciesCreate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV EBP,ESI MOV R15,RDI MOV RBX,qword ptr [RDX] MOV R14,qword ptr [RDX + 0x8] MOV RSI,RBX MOV RDX,R14 CALL 0x0013280b TEST RAX,RAX JZ 0x00164f1d MOV R13,RAX MOV dword ptr [RSP + 0x4],EBP MOV RBP,-0x100000000 PUSH 0x3 POP R8 MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 XOR ECX,ECX CALL 0x0013bad8 MOV R14,RAX MOV RBX,RDX MOV EAX,EBX CMP RAX,0x6 JZ 0x00164f61 ADD R12,0x10 CMP EAX,0x3 JNZ 0x00164f27 MOVZX R9D,word ptr [R13 + 0x6] PUSH 0x3 POP RDX MOV RDI,R15 XOR ESI,ESI MOV R8,R12 CALL 0x00132165 MOV R14,RAX MOV RBX,RDX JMP 0x00164f61 LAB_00164f1d: PUSH 0x6 POP RBX XOR R14D,R14D XOR EBP,EBP JMP 0x00164f64 LAB_00164f27: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,0x2 PUSH 0x1 POP RCX CMOVGE ECX,EAX DEC ECX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV R8,R12 CALL 0x00164f7c MOV R12,RAX MOV R13,RDX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e MOV R14,R12 MOV RBX,R13 LAB_00164f61: AND RBP,R14 LAB_00164f64: MOV EAX,R14D OR RAX,RBP MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_typed_array___speciesCreate(int8 param_1,int param_2,int8 *param_3) { int8 uVar1; long lVar2; int8 uVar3; int iVar4; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; uVar3 = *param_3; uVar1 = param_3[1]; lVar2 = get_typed_array(param_1,uVar3,uVar1); if (lVar2 == 0) { auVar6 = ZEXT816(6) << 0x40; uVar5 = 0; } else { auVar6 = JS_SpeciesConstructor(param_1,uVar3,uVar1,0,3); uVar5 = auVar6._8_8_; uVar3 = auVar6._0_8_; if ((uVar5 & 0xffffffff) != 6) { if (auVar6._8_4_ == 3) { auVar6 = js_typed_array_constructor(param_1,0,3); } else { iVar4 = 1; if (1 < param_2) { iVar4 = param_2; } auVar6 = js_typed_array_create(param_1,uVar3,uVar5,iVar4 + -1,param_3 + 2); JS_FreeValue(param_1,uVar3,uVar5); } } uVar5 = auVar6._0_8_ & 0xffffffff00000000; } auVar7._0_8_ = auVar6._0_8_ & 0xffffffff | uVar5; auVar7._8_8_ = auVar6._8_8_; return auVar7; }
11,085
my_hrtime
eloqsql/mysys/my_getsystime.c
my_hrtime_t my_hrtime() { my_hrtime_t hrtime; #if defined(_WIN32) ulonglong newtime; GetSystemTimePreciseAsFileTime((FILETIME*)&newtime); hrtime.val= (newtime - OFFSET_TO_EPOC)/10; #elif defined(HAVE_CLOCK_GETTIME) struct timespec tp; clock_gettime(CLOCK_REALTIME, &tp); hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL; #else struct timeval t; /* The following loop is here because gettimeofday may fail */ while (gettimeofday(&t, NULL) != 0) {} hrtime.val= t.tv_sec*1000000ULL + t.tv_usec; #endif DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;); DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;); return hrtime; }
O3
c
my_hrtime: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp leaq -0x18(%rbp), %rbx xorl %edi, %edi movq %rbx, %rsi callq 0x24290 imulq $0xf4240, (%rbx), %rcx # imm = 0xF4240 movq 0x8(%rbx), %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF mulq %rdx shrq $0x4, %rdx addq %rdx, %rcx movq %rcx, %rax addq $0x18, %rsp popq %rbx popq %rbp retq
my_hrtime: push rbp mov rbp, rsp push rbx sub rsp, 18h lea rbx, [rbp+var_18] xor edi, edi mov rsi, rbx call _clock_gettime imul rcx, [rbx], 0F4240h mov rax, [rbx+8] shr rax, 3 mov rdx, 20C49BA5E353F7CFh mul rdx shr rdx, 4 add rcx, rdx mov rax, rcx add rsp, 18h pop rbx pop rbp retn
unsigned long long my_hrtime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] clock_gettime(0LL, &v1); return v2 / 0x3E8 + 1000000 * v1; }
my_hrtime: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 LEA RBX,[RBP + -0x18] XOR EDI,EDI MOV RSI,RBX CALL 0x00124290 IMUL RCX,qword ptr [RBX],0xf4240 MOV RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV RDX,0x20c49ba5e353f7cf MUL RDX SHR RDX,0x4 ADD RCX,RDX MOV RAX,RCX ADD RSP,0x18 POP RBX POP RBP RET
long my_hrtime(void) { timespec local_20; clock_gettime(0,&local_20); return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000; }
11,086
httplib::detail::is_hex(char, int&)
nickolajgrishuk[P]metricz-cpp/build_O0/_deps/httplib-src/httplib.h
inline bool is_hex(char c, int &v) { if (0x20 <= c && isdigit(c)) { v = c - '0'; return true; } else if ('A' <= c && c <= 'F') { v = c - 'A' + 10; return true; } else if ('a' <= c && c <= 'f') { v = c - 'a' + 10; return true; } return false; }
O0
c
httplib::detail::is_hex(char, int&): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb %dil, %al movb %al, -0x2(%rbp) movq %rsi, -0x10(%rbp) movsbl -0x2(%rbp), %ecx movl $0x20, %eax cmpl %ecx, %eax jg 0x3e930 movsbl -0x2(%rbp), %edi callq 0xa600 cmpl $0x0, %eax je 0x3e930 movsbl -0x2(%rbp), %ecx subl $0x30, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x3e990 movsbl -0x2(%rbp), %ecx movl $0x41, %eax cmpl %ecx, %eax jg 0x3e95c movsbl -0x2(%rbp), %eax cmpl $0x46, %eax jg 0x3e95c movsbl -0x2(%rbp), %ecx subl $0x41, %ecx addl $0xa, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x3e990 movsbl -0x2(%rbp), %ecx movl $0x61, %eax cmpl %ecx, %eax jg 0x3e988 movsbl -0x2(%rbp), %eax cmpl $0x66, %eax jg 0x3e988 movsbl -0x2(%rbp), %ecx subl $0x61, %ecx addl $0xa, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x3e990 jmp 0x3e98a jmp 0x3e98c movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN7httplib6detail6is_hexEcRi: push rbp mov rbp, rsp sub rsp, 10h mov al, dil mov [rbp+var_2], al mov [rbp+var_10], rsi movsx ecx, [rbp+var_2] mov eax, 20h ; ' ' cmp eax, ecx jg short loc_3E930 movsx edi, [rbp+var_2] call _isdigit cmp eax, 0 jz short loc_3E930 movsx ecx, [rbp+var_2] sub ecx, 30h ; '0' mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_1], 1 jmp short loc_3E990 loc_3E930: movsx ecx, [rbp+var_2] mov eax, 41h ; 'A' cmp eax, ecx jg short loc_3E95C movsx eax, [rbp+var_2] cmp eax, 46h ; 'F' jg short loc_3E95C movsx ecx, [rbp+var_2] sub ecx, 41h ; 'A' add ecx, 0Ah mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_1], 1 jmp short loc_3E990 loc_3E95C: movsx ecx, [rbp+var_2] mov eax, 61h ; 'a' cmp eax, ecx jg short loc_3E988 movsx eax, [rbp+var_2] cmp eax, 66h ; 'f' jg short loc_3E988 movsx ecx, [rbp+var_2] sub ecx, 61h ; 'a' add ecx, 0Ah mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_1], 1 jmp short loc_3E990 loc_3E988: jmp short $+2 loc_3E98A: jmp short $+2 loc_3E98C: mov [rbp+var_1], 0 loc_3E990: mov al, [rbp+var_1] and al, 1 add rsp, 10h pop rbp retn
char httplib::detail::is_hex(httplib::detail *this, _DWORD *a2, int *a3) { if ( (char)this >= 32 && (unsigned int)isdigit((unsigned int)(char)this, a2, a3) ) { *a2 = (char)this - 48; return 1; } else if ( (char)this < 65 || (char)this > 70 ) { if ( (char)this < 97 || (char)this > 102 ) { return 0; } else { *a2 = (char)this - 97 + 10; return 1; } } else { *a2 = (char)this - 65 + 10; return 1; } }
is_hex: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV AL,DIL MOV byte ptr [RBP + -0x2],AL MOV qword ptr [RBP + -0x10],RSI MOVSX ECX,byte ptr [RBP + -0x2] MOV EAX,0x20 CMP EAX,ECX JG 0x0013e930 MOVSX EDI,byte ptr [RBP + -0x2] CALL 0x0010a600 CMP EAX,0x0 JZ 0x0013e930 MOVSX ECX,byte ptr [RBP + -0x2] SUB ECX,0x30 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013e990 LAB_0013e930: MOVSX ECX,byte ptr [RBP + -0x2] MOV EAX,0x41 CMP EAX,ECX JG 0x0013e95c MOVSX EAX,byte ptr [RBP + -0x2] CMP EAX,0x46 JG 0x0013e95c MOVSX ECX,byte ptr [RBP + -0x2] SUB ECX,0x41 ADD ECX,0xa MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013e990 LAB_0013e95c: MOVSX ECX,byte ptr [RBP + -0x2] MOV EAX,0x61 CMP EAX,ECX JG 0x0013e988 MOVSX EAX,byte ptr [RBP + -0x2] CMP EAX,0x66 JG 0x0013e988 MOVSX ECX,byte ptr [RBP + -0x2] SUB ECX,0x61 ADD ECX,0xa MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013e990 LAB_0013e988: JMP 0x0013e98a LAB_0013e98a: JMP 0x0013e98c LAB_0013e98c: MOV byte ptr [RBP + -0x1],0x0 LAB_0013e990: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x10 POP RBP RET
/* httplib::detail::is_hex(char, int&) */ int1 httplib::detail::is_hex(char param_1,int *param_2) { int iVar1; int1 local_9; if (('\x1f' < param_1) && (iVar1 = isdigit((int)param_1), iVar1 != 0)) { *param_2 = param_1 + -0x30; return 1; } if ((param_1 < 'A') || ('F' < param_1)) { if ((param_1 < 'a') || ('f' < param_1)) { local_9 = 0; } else { *param_2 = param_1 + -0x57; local_9 = 1; } } else { *param_2 = param_1 + -0x37; local_9 = 1; } return local_9; }
11,087
google::protobuf::internal::EpsCopyInputStream::Next()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.cc
const char* EpsCopyInputStream::Next() { GOOGLE_DCHECK(limit_ > kSlopBytes); auto p = NextBuffer(0 /* immaterial */, -1); if (p == nullptr) { limit_end_ = buffer_end_; // Distinguish ending on a pushed limit or ending on end-of-stream. SetEndOfStream(); return nullptr; } limit_ -= buffer_end_ - p; // Adjust limit_ relative to new anchor limit_end_ = buffer_end_ + std::min(0, limit_); return p; }
O3
cpp
google::protobuf::internal::EpsCopyInputStream::Next(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x10(%rdi), %rbp testq %rbp, %rbp je 0xfe54f leaq 0x28(%rbx), %r14 cmpq %r14, %rbp je 0xfe565 movslq 0x18(%rbx), %rax leaq (%rax,%rbp), %r15 addq $-0x10, %r15 movq %r15, 0x8(%rbx) movq %r14, 0x10(%rbx) cmpq $0x1, 0x48(%rbx) jne 0xfe547 movq $0x2, 0x48(%rbx) movq %rbp, %r14 jmp 0xfe623 movq 0x8(%rbx), %rax movq %rax, (%rbx) movl $0x1, 0x50(%rbx) xorl %r14d, %r14d jmp 0xfe63f movq 0x8(%rbx), %rax movups (%rax), %xmm0 movups %xmm0, (%r14) cmpl $0x0, 0x54(%rbx) jle 0xfe5cf leaq 0x18(%rbx), %r12 movq %rsp, %r13 movq 0x20(%rbx), %rdi movq (%rdi), %rax movq %r13, %rsi movq %r12, %rdx callq *0x10(%rax) testb %al, %al je 0xfe5c8 movslq 0x18(%rbx), %r15 subl %r15d, 0x54(%rbx) cmpq $0x11, %r15 jge 0xfe5fa testl %r15d, %r15d jle 0xfe57d leaq 0x38(%rbx), %rdi movq (%rsp), %rsi movq %r15, %rdx callq 0x1f400 movq %r14, 0x10(%rbx) addq %r14, %r15 movq %r15, 0x8(%rbx) cmpq $0x2, 0x48(%rbx) jae 0xfe618 jmp 0xfe623 movl $0x0, 0x54(%rbx) cmpq $0x2, 0x48(%rbx) jne 0xfe5e1 movq 0x8(%rbx), %rax subq %rbp, %rax movq %rax, 0x48(%rbx) movq $0x0, 0x10(%rbx) leaq 0x38(%rbx), %r15 movq %r15, 0x8(%rbx) movl $0x0, 0x18(%rbx) jmp 0xfe623 leaq 0x38(%rbx), %r15 movq (%rsp), %rax movups (%rax), %xmm0 movups %xmm0, 0x38(%rbx) movq %rax, 0x10(%rbx) movq %r15, 0x8(%rbx) cmpq $0x1, 0x48(%rbx) jbe 0xfe623 leaq 0x48(%rbx), %rax movq $0x1, (%rax) movl %r14d, %eax subl %r15d, %eax addl 0x1c(%rbx), %eax movl %eax, 0x1c(%rbx) movl %eax, %ecx sarl $0x1f, %ecx andl %eax, %ecx movslq %ecx, %rax addq %r15, %rax movq %rax, (%rbx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN6google8protobuf8internal18EpsCopyInputStream4NextEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rbp, [rdi+10h] test rbp, rbp jz short loc_FE54F lea r14, [rbx+28h] cmp rbp, r14 jz short loc_FE565 movsxd rax, dword ptr [rbx+18h] lea r15, [rax+rbp] add r15, 0FFFFFFFFFFFFFFF0h mov [rbx+8], r15 mov [rbx+10h], r14 cmp qword ptr [rbx+48h], 1 jnz short loc_FE547 mov qword ptr [rbx+48h], 2 loc_FE547: mov r14, rbp jmp loc_FE623 loc_FE54F: mov rax, [rbx+8] mov [rbx], rax mov dword ptr [rbx+50h], 1 xor r14d, r14d jmp loc_FE63F loc_FE565: mov rax, [rbx+8] movups xmm0, xmmword ptr [rax] movups xmmword ptr [r14], xmm0 cmp dword ptr [rbx+54h], 0 jle short loc_FE5CF lea r12, [rbx+18h] mov r13, rsp loc_FE57D: mov rdi, [rbx+20h] mov rax, [rdi] mov rsi, r13 mov rdx, r12 call qword ptr [rax+10h] test al, al jz short loc_FE5C8 movsxd r15, dword ptr [rbx+18h] sub [rbx+54h], r15d cmp r15, 11h jge short loc_FE5FA test r15d, r15d jle short loc_FE57D lea rdi, [rbx+38h] mov rsi, [rsp+38h+var_38] mov rdx, r15 call _memcpy mov [rbx+10h], r14 add r15, r14 mov [rbx+8], r15 cmp qword ptr [rbx+48h], 2 jnb short loc_FE618 jmp short loc_FE623 loc_FE5C8: mov dword ptr [rbx+54h], 0 loc_FE5CF: cmp qword ptr [rbx+48h], 2 jnz short loc_FE5E1 mov rax, [rbx+8] sub rax, rbp mov [rbx+48h], rax loc_FE5E1: mov qword ptr [rbx+10h], 0 lea r15, [rbx+38h] mov [rbx+8], r15 mov dword ptr [rbx+18h], 0 jmp short loc_FE623 loc_FE5FA: lea r15, [rbx+38h] mov rax, [rsp+38h+var_38] movups xmm0, xmmword ptr [rax] movups xmmword ptr [rbx+38h], xmm0 mov [rbx+10h], rax mov [rbx+8], r15 cmp qword ptr [rbx+48h], 1 jbe short loc_FE623 loc_FE618: lea rax, [rbx+48h] mov qword ptr [rax], 1 loc_FE623: mov eax, r14d sub eax, r15d add eax, [rbx+1Ch] mov [rbx+1Ch], eax mov ecx, eax sar ecx, 1Fh and ecx, eax movsxd rax, ecx add rax, r15 mov [rbx], rax loc_FE63F: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
google::protobuf::internal::EpsCopyInputStream * google::protobuf::internal::EpsCopyInputStream::Next( google::protobuf::internal::EpsCopyInputStream *this) { _OWORD *v1; // rax google::protobuf::internal::EpsCopyInputStream *v2; // rbp google::protobuf::internal::EpsCopyInputStream *v3; // r14 char *v4; // r15 long long v5; // r15 _OWORD *v6; // rax int v7; // eax _OWORD *v9; // [rsp+0h] [rbp-38h] BYREF v9 = v1; v2 = (google::protobuf::internal::EpsCopyInputStream *)*((_QWORD *)this + 2); if ( v2 ) { v3 = (google::protobuf::internal::EpsCopyInputStream *)((char *)this + 40); if ( v2 == (google::protobuf::internal::EpsCopyInputStream *)((char *)this + 40) ) { *(_OWORD *)v3 = *(_OWORD *)*((_QWORD *)this + 1); if ( *((int *)this + 21) <= 0 ) { LABEL_14: if ( *((_QWORD *)this + 9) == 2LL ) *((_QWORD *)this + 9) = *((_QWORD *)this + 1) - (_QWORD)v2; *((_QWORD *)this + 2) = 0LL; v4 = (char *)this + 56; *((_QWORD *)this + 1) = (char *)this + 56; *((_DWORD *)this + 6) = 0; } else { while ( 1 ) { if ( !(*(unsigned __int8 ( **)(_QWORD, _OWORD **, char *))(**((_QWORD **)this + 4) + 16LL))( *((_QWORD *)this + 4), &v9, (char *)this + 24) ) { *((_DWORD *)this + 21) = 0; goto LABEL_14; } v5 = *((int *)this + 6); *((_DWORD *)this + 21) -= v5; if ( v5 >= 17 ) break; if ( (int)v5 > 0 ) { memcpy((char *)this + 56, v9, v5); *((_QWORD *)this + 2) = v3; v4 = (char *)v3 + v5; *((_QWORD *)this + 1) = v4; if ( *((_QWORD *)this + 9) < 2uLL ) goto LABEL_19; goto LABEL_18; } } v4 = (char *)this + 56; v6 = v9; *(_OWORD *)((char *)this + 56) = *v9; *((_QWORD *)this + 2) = v6; *((_QWORD *)this + 1) = (char *)this + 56; if ( *((_QWORD *)this + 9) <= 1uLL ) goto LABEL_19; LABEL_18: *((_QWORD *)this + 9) = 1LL; } } else { v4 = (char *)v2 + *((int *)this + 6) - 16; *((_QWORD *)this + 1) = v4; *((_QWORD *)this + 2) = v3; if ( *((_QWORD *)this + 9) == 1LL ) *((_QWORD *)this + 9) = 2LL; v3 = v2; } LABEL_19: v7 = *((_DWORD *)this + 7) + (_DWORD)v3 - (_DWORD)v4; *((_DWORD *)this + 7) = v7; *(_QWORD *)this = &v4[v7 & (v7 >> 31)]; } else { *(_QWORD *)this = *((_QWORD *)this + 1); *((_DWORD *)this + 20) = 1; return 0LL; } return v3; }
Next: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RBP,qword ptr [RDI + 0x10] TEST RBP,RBP JZ 0x001fe54f LEA R14,[RBX + 0x28] CMP RBP,R14 JZ 0x001fe565 MOVSXD RAX,dword ptr [RBX + 0x18] LEA R15,[RAX + RBP*0x1] ADD R15,-0x10 MOV qword ptr [RBX + 0x8],R15 MOV qword ptr [RBX + 0x10],R14 CMP qword ptr [RBX + 0x48],0x1 JNZ 0x001fe547 MOV qword ptr [RBX + 0x48],0x2 LAB_001fe547: MOV R14,RBP JMP 0x001fe623 LAB_001fe54f: MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x50],0x1 XOR R14D,R14D JMP 0x001fe63f LAB_001fe565: MOV RAX,qword ptr [RBX + 0x8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R14],XMM0 CMP dword ptr [RBX + 0x54],0x0 JLE 0x001fe5cf LEA R12,[RBX + 0x18] MOV R13,RSP LAB_001fe57d: MOV RDI,qword ptr [RBX + 0x20] MOV RAX,qword ptr [RDI] MOV RSI,R13 MOV RDX,R12 CALL qword ptr [RAX + 0x10] TEST AL,AL JZ 0x001fe5c8 MOVSXD R15,dword ptr [RBX + 0x18] SUB dword ptr [RBX + 0x54],R15D CMP R15,0x11 JGE 0x001fe5fa TEST R15D,R15D JLE 0x001fe57d LEA RDI,[RBX + 0x38] MOV RSI,qword ptr [RSP] MOV RDX,R15 CALL 0x0011f400 MOV qword ptr [RBX + 0x10],R14 ADD R15,R14 MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RBX + 0x48],0x2 JNC 0x001fe618 JMP 0x001fe623 LAB_001fe5c8: MOV dword ptr [RBX + 0x54],0x0 LAB_001fe5cf: CMP qword ptr [RBX + 0x48],0x2 JNZ 0x001fe5e1 MOV RAX,qword ptr [RBX + 0x8] SUB RAX,RBP MOV qword ptr [RBX + 0x48],RAX LAB_001fe5e1: MOV qword ptr [RBX + 0x10],0x0 LEA R15,[RBX + 0x38] MOV qword ptr [RBX + 0x8],R15 MOV dword ptr [RBX + 0x18],0x0 JMP 0x001fe623 LAB_001fe5fa: LEA R15,[RBX + 0x38] MOV RAX,qword ptr [RSP] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RBX + 0x38],XMM0 MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RBX + 0x48],0x1 JBE 0x001fe623 LAB_001fe618: LEA RAX,[RBX + 0x48] MOV qword ptr [RAX],0x1 LAB_001fe623: MOV EAX,R14D SUB EAX,R15D ADD EAX,dword ptr [RBX + 0x1c] MOV dword ptr [RBX + 0x1c],EAX MOV ECX,EAX SAR ECX,0x1f AND ECX,EAX MOVSXD RAX,ECX ADD RAX,R15 MOV qword ptr [RBX],RAX LAB_001fe63f: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::internal::EpsCopyInputStream::Next() */ EpsCopyInputStream * __thiscall google::protobuf::internal::EpsCopyInputStream::Next(EpsCopyInputStream *this) { EpsCopyInputStream *pEVar1; int iVar2; int4 *puVar3; int4 uVar4; int4 uVar5; int4 uVar6; int8 uVar7; char cVar8; uint uVar9; int8 *in_RAX; EpsCopyInputStream *pEVar10; EpsCopyInputStream *pEVar11; size_t __n; int8 *local_38; pEVar10 = *(EpsCopyInputStream **)(this + 0x10); if (pEVar10 == (EpsCopyInputStream *)0x0) { *(int8 *)this = *(int8 *)(this + 8); *(int4 *)(this + 0x50) = 1; pEVar10 = (EpsCopyInputStream *)0x0; } else { pEVar1 = this + 0x28; if (pEVar10 == pEVar1) { puVar3 = *(int4 **)(this + 8); uVar4 = puVar3[1]; uVar5 = puVar3[2]; uVar6 = puVar3[3]; *(int4 *)pEVar1 = *puVar3; *(int4 *)(this + 0x2c) = uVar4; *(int4 *)(this + 0x30) = uVar5; *(int4 *)(this + 0x34) = uVar6; if (*(int *)(this + 0x54) < 1) { LAB_001fe5cf: if (*(long *)(this + 0x48) == 2) { *(long *)(this + 0x48) = *(long *)(this + 8) - (long)pEVar10; } *(int8 *)(this + 0x10) = 0; pEVar11 = this + 0x38; *(EpsCopyInputStream **)(this + 8) = pEVar11; *(int4 *)(this + 0x18) = 0; pEVar10 = pEVar1; } else { local_38 = in_RAX; do { cVar8 = (**(code **)(**(long **)(this + 0x20) + 0x10)) (*(long **)(this + 0x20),&local_38,this + 0x18); if (cVar8 == '\0') { *(int4 *)(this + 0x54) = 0; goto LAB_001fe5cf; } iVar2 = *(int *)(this + 0x18); __n = (size_t)iVar2; *(int *)(this + 0x54) = *(int *)(this + 0x54) - iVar2; if (0x10 < (long)__n) { pEVar11 = this + 0x38; uVar7 = local_38[1]; *(int8 *)(this + 0x38) = *local_38; *(int8 *)(this + 0x40) = uVar7; *(int8 **)(this + 0x10) = local_38; *(EpsCopyInputStream **)(this + 8) = pEVar11; pEVar10 = pEVar1; if (*(ulong *)(this + 0x48) < 2) goto LAB_001fe623; goto LAB_001fe618; } } while (iVar2 < 1); memcpy(this + 0x38,local_38,__n); *(EpsCopyInputStream **)(this + 0x10) = pEVar1; pEVar11 = pEVar1 + __n; *(EpsCopyInputStream **)(this + 8) = pEVar11; pEVar10 = pEVar1; if (1 < *(ulong *)(this + 0x48)) { LAB_001fe618: *(int8 *)(this + 0x48) = 1; pEVar10 = pEVar1; } } } else { pEVar11 = pEVar10 + (long)*(int *)(this + 0x18) + -0x10; *(EpsCopyInputStream **)(this + 8) = pEVar11; *(EpsCopyInputStream **)(this + 0x10) = pEVar1; if (*(long *)(this + 0x48) == 1) { *(int8 *)(this + 0x48) = 2; } } LAB_001fe623: uVar9 = ((int)pEVar10 - (int)pEVar11) + *(int *)(this + 0x1c); *(uint *)(this + 0x1c) = uVar9; *(EpsCopyInputStream **)this = pEVar11 + (int)((int)uVar9 >> 0x1f & uVar9); } return pEVar10; }
11,088
testing::internal::ReportInvalidTestSuiteType(char const*, testing::internal::CodeLocation const&)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
void ReportInvalidTestSuiteType(const char* test_suite_name, const CodeLocation& code_location) { Message errors; errors << "Attempted redefinition of test suite " << test_suite_name << ".\n" << "All tests in the same test suite must use the same test fixture\n" << "class. However, in test suite " << test_suite_name << ", you tried\n" << "to define a test using a fixture class different from the one\n" << "used earlier. This can happen if the two fixture classes are\n" << "from different namespaces and have the same name. You should\n" << "probably rename one of the classes to put the tests into different\n" << "test suites."; GTEST_LOG_(ERROR) << FormatFileLocation(code_location.file.c_str(), code_location.line) << " " << errors.GetString(); }
O3
cpp
testing::internal::ReportInvalidTestSuiteType(char const*, testing::internal::CodeLocation const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %r12 leaq 0x50(%rsp), %rbx movq %rbx, %rdi callq 0x1c968 movq (%rbx), %rbx leaq 0x10(%rbx), %r15 leaq 0x22174(%rip), %rsi # 0x4302b movl $0x25, %edx movq %r15, %rdi callq 0x85b0 testq %r12, %r12 je 0x20ed9 movq %r12, %rdi callq 0x8200 movq %rax, %rdx movq %r12, %rsi jmp 0x20ee5 movl $0x6, %edx leaq 0x1f774(%rip), %rsi # 0x40659 movq %r15, %rdi callq 0x85b0 leaq 0x223d0(%rip), %rsi # 0x432c4 movl $0x2, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21ea7(%rip), %rsi # 0x42daf movl $0x40, %edx movq %r15, %rdi callq 0x85b0 leaq 0x21fb9(%rip), %rsi # 0x42ed5 movl $0x1f, %edx movq %r15, %rdi callq 0x85b0 testq %r12, %r12 je 0x20f3b movq %r12, %rdi callq 0x8200 movq %rax, %rdx jmp 0x20f47 movl $0x6, %edx leaq 0x1f712(%rip), %r12 # 0x40659 movq %r15, %rdi movq %r12, %rsi callq 0x85b0 leaq 0x220f8(%rip), %rsi # 0x43051 movl $0xc, %edx movq %r15, %rdi callq 0x85b0 leaq 0x220f1(%rip), %rsi # 0x4305e movl $0x3e, %edx movq %r15, %rdi callq 0x85b0 leaq 0x2211c(%rip), %rsi # 0x4309d movl $0x3d, %edx movq %r15, %rdi callq 0x85b0 leaq 0x22146(%rip), %rsi # 0x430db movl $0x3d, %edx movq %r15, %rdi callq 0x85b0 leaq 0x22170(%rip), %rsi # 0x43119 movl $0x43, %edx movq %r15, %rdi callq 0x85b0 leaq 0x22040(%rip), %rsi # 0x42ffd movl $0xc, %edx movq %r15, %rdi callq 0x85b0 leaq 0x217dc(%rip), %rdx # 0x427ad leaq 0xc(%rsp), %rdi movl $0x2, %esi movl $0xb0b, %ecx # imm = 0xB0B callq 0x16b08 movq (%r14), %rsi movl 0x20(%r14), %edx leaq 0x30(%rsp), %rdi callq 0x1663e movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq 0x37fe1(%rip), %rdi # 0x58fe8 callq 0x85b0 movq %rax, %r14 leaq 0x21bcf(%rip), %rsi # 0x42be5 movl $0x1, %edx movq %rax, %rdi callq 0x85b0 leaq 0x10(%rsp), %rdi movq %rbx, %rsi callq 0x1cbbf movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r14, %rdi callq 0x85b0 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2105d movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x21078 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0xc(%rsp), %rdi callq 0x16c4a testq %rbx, %rbx je 0x21090 movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x210c8 movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x210c8 jmp 0x210c5 movq %rax, %r14 jmp 0x210e3 jmp 0x210ef movq %rax, %r14 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x210e3 movq 0x40(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0xc(%rsp), %rdi callq 0x16c4a jmp 0x210f2 movq %rax, %r14 testq %rbx, %rbx je 0x21100 movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) movq %r14, %rdi callq 0x8990
_ZN7testing8internal26ReportInvalidTestSuiteTypeEPKcRKNS0_12CodeLocationE: push r15; __int64 push r14; int push r12; void * push rbx; int sub rsp, 58h mov r14, rsi mov r12, rdi lea rbx, [rsp+78h+var_28] mov rdi, rbx; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rbx, [rbx] lea r15, [rbx+10h] lea rsi, aAttemptedRedef; "Attempted redefinition of test suite " mov edx, 25h ; '%' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jz short loc_20ED9 mov rdi, r12 call _strlen mov rdx, rax mov rsi, r12 jmp short loc_20EE5 loc_20ED9: mov edx, 6 lea rsi, aNull; "(null)" loc_20EE5: mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aNoteRandomizin+32h; ".\n" mov edx, 2 mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aAllTestsInTheS; "All tests in the same test suite must u"... mov edx, 40h ; '@' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aClassHoweverIn; "class. However, in test suite " mov edx, 1Fh mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jz short loc_20F3B mov rdi, r12 call _strlen mov rdx, rax jmp short loc_20F47 loc_20F3B: mov edx, 6 lea r12, aNull; "(null)" loc_20F47: mov rdi, r15 mov rsi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aYouTried; ", you tried\n" mov edx, 0Ch mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aToDefineATestU; "to define a test using a fixture class "... mov edx, 3Eh ; '>' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aUsedEarlierThi; "used earlier. This can happen if the tw"... mov edx, 3Dh ; '=' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aFromDifferentN; "from different namespaces and have the "... mov edx, 3Dh ; '=' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aProbablyRename; "probably rename one of the classes to p"... mov edx, 43h ; 'C' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aOfTheClassesTo+2Fh; "test suites." mov edx, 0Ch mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+78h+var_6C] mov esi, 2 mov ecx, 0B0Bh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rsi, [r14]; int mov edx, [r14+20h]; int lea rdi, [rsp+78h+var_48]; int call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int) mov rsi, qword ptr [rsp+78h+var_48] mov rdx, [rsp+78h+var_40] mov rdi, cs:_ZSt4cerr_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, asc_42BE3+2; " " mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+78h+var_68] mov rsi, rbx call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rsi, [rsp+78h+var_68] mov rdx, [rsp+78h+var_60] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+78h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2105D mov rsi, [rsp+78h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2105D: lea rax, [rsp+78h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_21078 mov rsi, [rsp+78h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_21078: lea rdi, [rsp+78h+var_6C]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() test rbx, rbx jz short loc_21090 mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] loc_21090: add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn mov r14, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_210C8 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_210C8 jmp short loc_210C5 mov r14, rax jmp short loc_210E3 jmp short loc_210EF loc_210C5: mov r14, rax loc_210C8: lea rax, [rsp+arg_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_210E3 mov rsi, [rsp+arg_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_210E3: lea rdi, [rsp+arg_4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_210F2 loc_210EF: mov r14, rax loc_210F2: test rbx, rbx jz short loc_21100 mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] loc_21100: mov rdi, r14 call __Unwind_Resume
void testing::internal::ReportInvalidTestSuiteType(const char *a1, long long a2) { const char *v3; // r12 long long v4; // rbx long long v5; // rdx const char *v6; // rsi long long v7; // rdx long long v8; // r14 void *v9; // rsi long long v10; // rdx long long v11; // rcx int v12; // [rsp+Ch] [rbp-6Ch] BYREF void *v13[2]; // [rsp+10h] [rbp-68h] BYREF long long v14; // [rsp+20h] [rbp-58h] BYREF int v15[2]; // [rsp+30h] [rbp-48h] BYREF long long v16; // [rsp+38h] [rbp-40h] long long v17; // [rsp+40h] [rbp-38h] BYREF long long v18[5]; // [rsp+50h] [rbp-28h] BYREF v3 = a1; testing::Message::Message((testing::Message *)v18); v4 = v18[0]; std::__ostream_insert<char,std::char_traits<char>>(v18[0] + 16, "Attempted redefinition of test suite ", 37LL); if ( a1 ) { v5 = strlen(a1); v6 = a1; } else { v5 = 6LL; v6 = "(null)"; } std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, v6, v5); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, ".\n", 2LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "All tests in the same test suite must use the same test fixture\n", 64LL); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, "class. However, in test suite ", 31LL); if ( a1 ) { v7 = strlen(a1); } else { v7 = 6LL; v3 = "(null)"; } std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, v3, v7); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, ", you tried\n", 12LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "to define a test using a fixture class different from the one\n", 62LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "used earlier. This can happen if the two fixture classes are\n", 61LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "from different namespaces and have the same name. You should\n", 61LL); std::__ostream_insert<char,std::char_traits<char>>( v4 + 16, "probably rename one of the classes to put the tests into different\n", 67LL); std::__ostream_insert<char,std::char_traits<char>>(v4 + 16, "test suites.", 12LL); testing::internal::GTestLog::GTestLog( &v12, 2, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc", 2827); testing::internal::FormatFileLocation[abi:cxx11]((long long)v15, *(const char **)a2, *(_DWORD *)(a2 + 32)); v8 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *(_QWORD *)v15, v16); std::__ostream_insert<char,std::char_traits<char>>(v8, " ", 1LL); testing::internal::StringStreamToString((long long)v13, v4); v9 = v13[0]; std::__ostream_insert<char,std::char_traits<char>>(v8, v13[0], v13[1]); if ( v13[0] != &v14 ) { v9 = (void *)(v14 + 1); operator delete(v13[0], v14 + 1); } if ( *(long long **)v15 != &v17 ) { v9 = (void *)(v17 + 1); operator delete(*(void **)v15, v17 + 1); } testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v12, (long long)v9, v10, v11); if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); }
ReportInvalidTestSuiteType: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV R12,RDI LEA RBX,[RSP + 0x50] MOV RDI,RBX CALL 0x0011c968 MOV RBX,qword ptr [RBX] LEA R15,[RBX + 0x10] LAB_00120eb0: LEA RSI,[0x14302b] MOV EDX,0x25 MOV RDI,R15 CALL 0x001085b0 TEST R12,R12 JZ 0x00120ed9 MOV RDI,R12 CALL 0x00108200 MOV RDX,RAX MOV RSI,R12 JMP 0x00120ee5 LAB_00120ed9: MOV EDX,0x6 LEA RSI,[0x140659] LAB_00120ee5: MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x1432c4] MOV EDX,0x2 MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142daf] MOV EDX,0x40 MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142ed5] MOV EDX,0x1f MOV RDI,R15 CALL 0x001085b0 TEST R12,R12 JZ 0x00120f3b MOV RDI,R12 CALL 0x00108200 MOV RDX,RAX JMP 0x00120f47 LAB_00120f3b: MOV EDX,0x6 LEA R12,[0x140659] LAB_00120f47: MOV RDI,R15 MOV RSI,R12 CALL 0x001085b0 LEA RSI,[0x143051] MOV EDX,0xc MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x14305e] MOV EDX,0x3e MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x14309d] MOV EDX,0x3d MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x1430db] MOV EDX,0x3d MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x143119] MOV EDX,0x43 MOV RDI,R15 CALL 0x001085b0 LEA RSI,[0x142ffd] MOV EDX,0xc MOV RDI,R15 CALL 0x001085b0 LAB_00120fca: LEA RDX,[0x1427ad] LEA RDI,[RSP + 0xc] MOV ESI,0x2 MOV ECX,0xb0b CALL 0x00116b08 MOV RSI,qword ptr [R14] MOV EDX,dword ptr [R14 + 0x20] LAB_00120fec: LEA RDI,[RSP + 0x30] CALL 0x0011663e MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_00121000: MOV RDI,qword ptr [0x00158fe8] CALL 0x001085b0 MOV R14,RAX LEA RSI,[0x142be5] MOV EDX,0x1 MOV RDI,RAX CALL 0x001085b0 LAB_00121023: LEA RDI,[RSP + 0x10] MOV RSI,RBX CALL 0x0011cbbf MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_0012103a: MOV RDI,R14 CALL 0x001085b0 LAB_00121042: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012105d MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001084e0 LAB_0012105d: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00121078 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x001084e0 LAB_00121078: LEA RDI,[RSP + 0xc] CALL 0x00116c4a TEST RBX,RBX JZ 0x00121090 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x8] LAB_00121090: ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET
/* testing::internal::ReportInvalidTestSuiteType(char const*, testing::internal::CodeLocation const&) */ void testing::internal::ReportInvalidTestSuiteType(char *param_1,CodeLocation *param_2) { size_t sVar1; ostream *poVar2; char *pcVar3; GTestLog local_6c [4]; long *local_68; long local_60; long local_58 [2]; long *local_48; long local_40; long local_38 [2]; long *local_28; Message::Message((Message *)&local_28); poVar2 = (ostream *)(local_28 + 2); /* try { // try from 00120eb0 to 00120fc9 has its CatchHandler @ 001210ef */ std::__ostream_insert<char,std::char_traits<char>> (poVar2,"Attempted redefinition of test suite ",0x25); if (param_1 == (char *)0x0) { sVar1 = 6; pcVar3 = "(null)"; } else { sVar1 = strlen(param_1); pcVar3 = param_1; } std::__ostream_insert<char,std::char_traits<char>>(poVar2,pcVar3,sVar1); std::__ostream_insert<char,std::char_traits<char>>(poVar2,".\n",2); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"All tests in the same test suite must use the same test fixture\n",0x40); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"class. However, in test suite ",0x1f); if (param_1 == (char *)0x0) { sVar1 = 6; param_1 = "(null)"; } else { sVar1 = strlen(param_1); } std::__ostream_insert<char,std::char_traits<char>>(poVar2,param_1,sVar1); std::__ostream_insert<char,std::char_traits<char>>(poVar2,", you tried\n",0xc); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"to define a test using a fixture class different from the one\n",0x3e); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"used earlier. This can happen if the two fixture classes are\n",0x3d); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"from different namespaces and have the same name. You should\n",0x3d); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"probably rename one of the classes to put the tests into different\n",0x43); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"test suites.",0xc); /* try { // try from 00120fca to 00120fe4 has its CatchHandler @ 001210c3 */ GTestLog::GTestLog(local_6c,2, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc" ,0xb0b); /* try { // try from 00120fec to 00120ff5 has its CatchHandler @ 001210be */ FormatFileLocation_abi_cxx11_((internal *)&local_48,*(char **)param_2,*(int *)(param_2 + 0x20)); /* try { // try from 00121000 to 00121022 has its CatchHandler @ 001210c5 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,(char *)local_48,local_40); std::__ostream_insert<char,std::char_traits<char>>(poVar2," ",1); /* try { // try from 00121023 to 0012102f has its CatchHandler @ 001210bc */ StringStreamToString((stringstream *)&local_68); /* try { // try from 0012103a to 00121041 has its CatchHandler @ 0012109c */ std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_68,local_60); if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } GTestLog::~GTestLog(local_6c); if (local_28 != (long *)0x0) { (**(code **)(*local_28 + 8))(local_28); } return; }
11,089
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(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&, int&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::boolean: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(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&, int&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax addl $-0x4, %eax cmpl $0x3, %eax ja 0x52557 leaq 0x403c8(%rip), %rcx # 0x928f8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x8(%r14), %eax jmp 0x5254c movzbl 0x8(%r14), %eax jmp 0x5254c cvttsd2si 0x8(%r14), %eax movl %eax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x223c0 movq %rax, %rbx movq %r14, %rdi callq 0x41dd0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x420be(%rip), %rsi # 0x94637 leaq 0x10(%rsp), %rdi callq 0x41d71 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x41c84 xorl %ebp, %ebp leaq 0x82d34(%rip), %rsi # 0xd52d8 leaq -0x5279(%rip), %rdx # 0x4d332 movq %rbx, %rdi callq 0x22cd0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x22f48 testb %bpl, %bpl jne 0x525ca jmp 0x525d2 movq %rax, %r14 movq %rbx, %rdi callq 0x22550 movq %r14, %rdi callq 0x22d30
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] add eax, 0FFFFFFFCh; switch 4 cases cmp eax, 3 ja short def_52537; jumptable 0000000000052537 default case lea rcx, jpt_52537 movsxd rax, ds:(jpt_52537 - 928F8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_52539: mov eax, [r14+8]; jumptable 0000000000052537 cases 5,6 jmp short loc_5254C loc_5253F: movzx eax, byte ptr [r14+8]; jumptable 0000000000052537 case 4 jmp short loc_5254C loc_52546: cvttsd2si eax, qword ptr [r14+8]; jumptable 0000000000052537 case 7 loc_5254C: mov [rsi], eax add rsp, 30h pop rbx pop r14 pop rbp retn def_52537: push 20h ; ' '; jumptable 0000000000052537 default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_525CA jmp short loc_525D2 mov r14, rax loc_525CA: mov rdi, rbx; void * call ___cxa_free_exception loc_525D2: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( unsigned __int8 *a1, _DWORD *a2) { long long result; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF switch ( *a1 ) { case 4u: result = a1[8]; break; case 5u: case 6u: result = *((unsigned int *)a1 + 2); break; case 7u: result = (unsigned int)(int)*((double *)a1 + 1); break; default: exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be number, but is ", (long long)&v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x12Eu, (long long)v5, (long long)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); } *a2 = result; return result; }
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOVZX EAX,byte ptr [RDI] ADD EAX,-0x4 CMP EAX,0x3 JA 0x00152557 LEA RCX,[0x1928f8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV EAX,dword ptr [R14 + 0x8] JMP 0x0015254c caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x0015254c caseD_7: CVTTSD2SI EAX,qword ptr [R14 + 0x8] LAB_0015254c: MOV dword ptr [RSI],EAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET default: PUSH 0x20 POP RDI CALL 0x001223c0 MOV RBX,RAX MOV RDI,R14 CALL 0x00141dd0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00152572: LEA RSI,[0x194637] LEA RDI,[RSP + 0x10] CALL 0x00141d71 MOV BPL,0x1 LAB_00152586: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00141c84 XOR EBP,EBP LEA RSI,[0x1d52d8] LEA RDX,[0x14d332] MOV RDI,RBX CALL 0x00122cd0
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (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,uint *param_2) { uint uVar1; int8 uVar2; char *local_40; detail local_38 [32]; switch(*param_1) { case (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> )0x4: uVar1 = (uint)(byte)param_1[8]; break; case (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> )0x5: case (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> )0x6: uVar1 = *(uint *)(param_1 + 8); break; case (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> )0x7: uVar1 = (uint)*(double *)(param_1 + 8); break; default: uVar2 = __cxa_allocate_exception(0x20); local_40 = (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 00152572 to 00152582 has its CatchHandler @ 001525c7 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 00152586 to 001525b2 has its CatchHandler @ 001525b3 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_38,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); } *param_2 = uVar1; return; }
11,090
js_object_set___proto__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_set___proto__(JSContext *ctx, JSValue this_val, JSValue proto) { if (JS_IsUndefined(this_val) || JS_IsNull(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); if (!JS_IsObject(proto) && !JS_IsNull(proto)) return JS_UNDEFINED; if (JS_SetPrototypeInternal(ctx, this_val, proto, TRUE) < 0) return JS_EXCEPTION; else return JS_UNDEFINED; }
O0
c
js_object_set___proto__: subq $0x38, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rcx, 0x8(%rsp) movq %r8, 0x10(%rsp) movq %rdi, (%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax jne 0xc16e4 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x2e240 cmpl $0x0, %eax je 0xc16fc movq (%rsp), %rdi callq 0x2f5a0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) jmp 0xc1783 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x2af70 cmpl $0x0, %eax jne 0xc1737 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x2e240 cmpl $0x0, %eax jne 0xc1737 movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) jmp 0xc1783 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x8(%rsp), %rcx movq 0x10(%rsp), %r8 movl $0x1, %r9d callq 0x2d620 cmpl $0x0, %eax jge 0xc1772 movl $0x0, 0x28(%rsp) movq $0x6, 0x30(%rsp) jmp 0xc1783 movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rdx addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
js_object_set___proto__: sub rsp, 38h mov [rsp+38h+var_20], rsi mov [rsp+38h+var_18], rdx mov [rsp+38h+var_30], rcx mov [rsp+38h+var_28], r8 mov [rsp+38h+var_38], rdi mov rdi, [rsp+38h+var_20] mov rsi, [rsp+38h+var_18] call JS_IsUndefined_0 cmp eax, 0 jnz short loc_C16E4 mov rdi, [rsp+38h+var_20] mov rsi, [rsp+38h+var_18] call JS_IsNull_0 cmp eax, 0 jz short loc_C16FC loc_C16E4: mov rdi, [rsp+38h+var_38] call JS_ThrowTypeErrorNotAnObject mov [rsp+38h+var_10], rax mov [rsp+38h+var_8], rdx jmp loc_C1783 loc_C16FC: mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_28] call JS_IsObject cmp eax, 0 jnz short loc_C1737 mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_28] call JS_IsNull_0 cmp eax, 0 jnz short loc_C1737 mov dword ptr [rsp+38h+var_10], 0 mov [rsp+38h+var_8], 3 jmp short loc_C1783 loc_C1737: mov rdi, [rsp+38h+var_38] mov rsi, [rsp+38h+var_20] mov rdx, [rsp+38h+var_18] mov rcx, [rsp+38h+var_30] mov r8, [rsp+38h+var_28] mov r9d, 1 call JS_SetPrototypeInternal cmp eax, 0 jge short loc_C1772 mov dword ptr [rsp+38h+var_10], 0 mov [rsp+38h+var_8], 6 jmp short loc_C1783 loc_C1772: mov dword ptr [rsp+38h+var_10], 0 mov [rsp+38h+var_8], 3 loc_C1783: mov rax, [rsp+38h+var_10] mov rdx, [rsp+38h+var_8] add rsp, 38h retn
long long js_object_set___proto__( long long a1, long long a2, long long a3, _DWORD *a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v14; // rsi long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 __m128 v21; // xmm4 __m128 v22; // xmm5 long long v29; // [rsp+28h] [rbp-10h] v14 = a3; if ( JS_IsUndefined_0(a2, a3) ) return JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v19, v20, a12, a13, v14, v15, v16, v17, v18); v14 = a3; if ( JS_IsNull_0(a2, a3) ) return JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v19, v20, a12, a13, v14, v15, v16, v17, v18); if ( JS_IsObject((long long)a4, a5) || JS_IsNull_0((long long)a4, a5) ) { LODWORD(v29) = 0; JS_SetPrototypeInternal(a1, a2, a3, a4, a5, 1LL, a6, a7, a8, a9, v21, v22, a12, a13); } else { LODWORD(v29) = 0; } return v29; }
js_object_set___proto__: SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],R8 MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0012e260 CMP EAX,0x0 JNZ 0x001c16e4 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0012e240 CMP EAX,0x0 JZ 0x001c16fc LAB_001c16e4: MOV RDI,qword ptr [RSP] CALL 0x0012f5a0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX JMP 0x001c1783 LAB_001c16fc: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0012af70 CMP EAX,0x0 JNZ 0x001c1737 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0012e240 CMP EAX,0x0 JNZ 0x001c1737 MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 JMP 0x001c1783 LAB_001c1737: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RSP + 0x10] MOV R9D,0x1 CALL 0x0012d620 CMP EAX,0x0 JGE 0x001c1772 MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x6 JMP 0x001c1783 LAB_001c1772: MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 LAB_001c1783: MOV RAX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
int1 [16] js_object_set___proto__ (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int1 auVar2 [16]; int4 local_10; int4 uStack_c; int8 local_8; iVar1 = JS_IsUndefined(param_2,param_3); if (iVar1 == 0) { iVar1 = JS_IsNull(param_2,param_3); if (iVar1 == 0) { iVar1 = JS_IsObject(param_4,param_5); if (iVar1 == 0) { iVar1 = JS_IsNull(param_4,param_5); if (iVar1 == 0) { local_10 = 0; local_8 = 3; goto LAB_001c1783; } } iVar1 = JS_SetPrototypeInternal(param_1,param_2,param_3,param_4,param_5,1); if (iVar1 < 0) { local_10 = 0; local_8 = 6; } else { local_10 = 0; local_8 = 3; } goto LAB_001c1783; } } auVar2 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; LAB_001c1783: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
11,091
js_object_set___proto__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_set___proto__(JSContext *ctx, JSValue this_val, JSValue proto) { if (JS_IsUndefined(this_val) || JS_IsNull(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); if (!JS_IsObject(proto) && !JS_IsNull(proto)) return JS_UNDEFINED; if (JS_SetPrototypeInternal(ctx, this_val, proto, TRUE) < 0) return JS_EXCEPTION; else return JS_UNDEFINED; }
O1
c
js_object_set___proto__: pushq %rax movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x71696 leaq 0x2d99e(%rip), %rsi # 0x9f025 xorl %eax, %eax callq 0x22567 movl $0x6, %r9d jmp 0x716be cmpl $0x2, %r8d je 0x716a8 movl $0x3, %r9d cmpl $-0x1, %r8d jne 0x716be movl $0x1, %r9d callq 0x22731 shrl $0x1f, %eax leaq (%rax,%rax,2), %r9 addq $0x3, %r9 xorl %eax, %eax movq %r9, %rdx popq %rcx retq
js_object_set___proto__: push rax mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_71696 lea rsi, aOperandPrototy+20h; "not an object" xor eax, eax call JS_ThrowTypeError mov r9d, 6 jmp short loc_716BE loc_71696: cmp r8d, 2 jz short loc_716A8 mov r9d, 3 cmp r8d, 0FFFFFFFFh jnz short loc_716BE loc_716A8: mov r9d, 1 call JS_SetPrototypeInternal shr eax, 1Fh lea r9, [rax+rax*2] add r9, 3 loc_716BE: xor eax, eax mov rdx, r9 pop rcx retn
long long js_object_set___proto__( long long a1, long long a2, long long a3, _DWORD *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al if ( (a3 & 0xFFFFFFFE) == 2 ) { JS_ThrowTypeError(a1, (long long)"not an object", a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14); } else if ( (_DWORD)a5 == 2 || (_DWORD)a5 == -1 ) { JS_SetPrototypeInternal(a1, a2, a3, a4, a5, 1LL, a7, a8, a9, a10, a11, a12, a13, a14); } return 0LL; }
js_object_set___proto__: PUSH RAX MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00171696 LEA RSI,[0x19f025] XOR EAX,EAX CALL 0x00122567 MOV R9D,0x6 JMP 0x001716be LAB_00171696: CMP R8D,0x2 JZ 0x001716a8 MOV R9D,0x3 CMP R8D,-0x1 JNZ 0x001716be LAB_001716a8: MOV R9D,0x1 CALL 0x00122731 SHR EAX,0x1f LEA R9,[RAX + RAX*0x2] ADD R9,0x3 LAB_001716be: XOR EAX,EAX MOV RDX,R9 POP RCX RET
int1 [16] js_object_set___proto__ (int8 param_1,int8 param_2,uint param_3,int8 param_4,int param_5) { int1 auVar1 [16]; uint uVar2; ulong uVar3; if ((param_3 & 0xfffffffe) == 2) { JS_ThrowTypeError(param_1,"not an object"); uVar3 = 6; } else if ((param_5 == 2) || (uVar3 = 3, param_5 == -1)) { uVar2 = JS_SetPrototypeInternal(); uVar3 = (ulong)(uVar2 >> 0x1f) * 3 + 3; } auVar1._8_8_ = 0; auVar1._0_8_ = uVar3; return auVar1 << 0x40; }
11,092
mz_zip_reader_is_file_encrypted
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index) { mz_uint m_bit_flag; const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); if (!p) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); return MZ_FALSE; } m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); return (m_bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0; }
O0
c
mz_zip_reader_is_file_encrypted: movq %rdi, -0x30(%rsp) movl %esi, -0x34(%rsp) movq -0x30(%rsp), %rcx movl -0x34(%rsp), %eax movq %rcx, -0x10(%rsp) movl %eax, -0x14(%rsp) cmpq $0x0, -0x10(%rsp) je 0xfff3d movq -0x10(%rsp), %rax cmpq $0x0, 0x68(%rax) je 0xfff3d movl -0x14(%rsp), %eax movq -0x10(%rsp), %rcx cmpl 0x10(%rcx), %eax jb 0xfff48 movq $0x0, -0x8(%rsp) jmp 0xfff70 movq -0x10(%rsp), %rax movq 0x68(%rax), %rax movq (%rax), %rax movq -0x10(%rsp), %rcx movq 0x68(%rcx), %rcx movq 0x20(%rcx), %rcx movl -0x14(%rsp), %edx movl (%rcx,%rdx,4), %ecx addq %rcx, %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x40(%rsp) cmpq $0x0, -0x40(%rsp) jne 0xfffb2 movq -0x30(%rsp), %rax movq %rax, -0x20(%rsp) movl $0x18, -0x24(%rsp) cmpq $0x0, -0x20(%rsp) je 0xfffa8 movl -0x24(%rsp), %ecx movq -0x20(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, -0x28(%rsp) jmp 0xfffd5 movq -0x40(%rsp), %rax movzwl 0x8(%rax), %eax movl %eax, -0x38(%rsp) movl -0x38(%rsp), %eax andl $0x41, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x28(%rsp) movl -0x28(%rsp), %eax retq nopw (%rax,%rax)
mz_zip_reader_is_file_encrypted: mov [rsp+var_30], rdi mov [rsp+var_34], esi mov rcx, [rsp+var_30] mov eax, [rsp+var_34] mov [rsp+var_10], rcx mov [rsp+var_14], eax cmp [rsp+var_10], 0 jz short loc_FFF3D mov rax, [rsp+var_10] cmp qword ptr [rax+68h], 0 jz short loc_FFF3D mov eax, [rsp+var_14] mov rcx, [rsp+var_10] cmp eax, [rcx+10h] jb short loc_FFF48 loc_FFF3D: mov [rsp+var_8], 0 jmp short loc_FFF70 loc_FFF48: mov rax, [rsp+var_10] mov rax, [rax+68h] mov rax, [rax] mov rcx, [rsp+var_10] mov rcx, [rcx+68h] mov rcx, [rcx+20h] mov edx, [rsp+var_14] mov ecx, [rcx+rdx*4] add rax, rcx mov [rsp+var_8], rax loc_FFF70: mov rax, [rsp+var_8] mov [rsp+var_40], rax cmp [rsp+var_40], 0 jnz short loc_FFFB2 mov rax, [rsp+var_30] mov [rsp+var_20], rax mov [rsp+var_24], 18h cmp [rsp+var_20], 0 jz short loc_FFFA8 mov ecx, [rsp+var_24] mov rax, [rsp+var_20] mov [rax+1Ch], ecx loc_FFFA8: mov [rsp+var_28], 0 jmp short loc_FFFD5 loc_FFFB2: mov rax, [rsp+var_40] movzx eax, word ptr [rax+8] mov [rsp+var_38], eax mov eax, [rsp+var_38] and eax, 41h cmp eax, 0 setnz al and al, 1 movzx eax, al mov [rsp+var_28], eax loc_FFFD5: mov eax, [rsp+var_28] retn
_BOOL8 mz_zip_reader_is_file_encrypted(long long a1, unsigned int a2) { long long v4; // [rsp+38h] [rbp-8h] if ( a1 && *(_QWORD *)(a1 + 104) && a2 < *(_DWORD *)(a1 + 16) ) v4 = *(unsigned int *)(*(_QWORD *)(*(_QWORD *)(a1 + 104) + 32LL) + 4LL * a2) + **(_QWORD **)(a1 + 104); else v4 = 0LL; if ( v4 ) { return (*(_WORD *)(v4 + 8) & 0x41) != 0; } else { if ( a1 ) *(_DWORD *)(a1 + 28) = 24; return 0; } }
mz_zip_reader_is_file_encrypted: MOV qword ptr [RSP + -0x30],RDI MOV dword ptr [RSP + -0x34],ESI MOV RCX,qword ptr [RSP + -0x30] MOV EAX,dword ptr [RSP + -0x34] MOV qword ptr [RSP + -0x10],RCX MOV dword ptr [RSP + -0x14],EAX CMP qword ptr [RSP + -0x10],0x0 JZ 0x001fff3d MOV RAX,qword ptr [RSP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JZ 0x001fff3d MOV EAX,dword ptr [RSP + -0x14] MOV RCX,qword ptr [RSP + -0x10] CMP EAX,dword ptr [RCX + 0x10] JC 0x001fff48 LAB_001fff3d: MOV qword ptr [RSP + -0x8],0x0 JMP 0x001fff70 LAB_001fff48: MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RCX + 0x68] MOV RCX,qword ptr [RCX + 0x20] MOV EDX,dword ptr [RSP + -0x14] MOV ECX,dword ptr [RCX + RDX*0x4] ADD RAX,RCX MOV qword ptr [RSP + -0x8],RAX LAB_001fff70: MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x40],RAX CMP qword ptr [RSP + -0x40],0x0 JNZ 0x001fffb2 MOV RAX,qword ptr [RSP + -0x30] MOV qword ptr [RSP + -0x20],RAX MOV dword ptr [RSP + -0x24],0x18 CMP qword ptr [RSP + -0x20],0x0 JZ 0x001fffa8 MOV ECX,dword ptr [RSP + -0x24] MOV RAX,qword ptr [RSP + -0x20] MOV dword ptr [RAX + 0x1c],ECX LAB_001fffa8: MOV dword ptr [RSP + -0x28],0x0 JMP 0x001fffd5 LAB_001fffb2: MOV RAX,qword ptr [RSP + -0x40] MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RSP + -0x38],EAX MOV EAX,dword ptr [RSP + -0x38] AND EAX,0x41 CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + -0x28],EAX LAB_001fffd5: MOV EAX,dword ptr [RSP + -0x28] RET
bool mz_zip_reader_is_file_encrypted(long param_1,uint param_2) { bool bVar1; long local_8; if (((param_1 == 0) || (*(long *)(param_1 + 0x68) == 0)) || (*(uint *)(param_1 + 0x10) <= param_2) ) { local_8 = 0; } else { local_8 = **(long **)(param_1 + 0x68) + (ulong)*(uint *)(*(long *)(*(long *)(param_1 + 0x68) + 0x20) + (ulong)param_2 * 4); } if (local_8 == 0) { if (param_1 != 0) { *(int4 *)(param_1 + 0x1c) = 0x18; } bVar1 = false; } else { bVar1 = (*(ushort *)(local_8 + 8) & 0x41) != 0; } return bVar1; }
11,093
mz_zip_reader_is_file_encrypted
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index) { mz_uint m_bit_flag; const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); if (!p) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); return MZ_FALSE; } m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); return (m_bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0; }
O1
c
mz_zip_reader_is_file_encrypted: testq %rdi, %rdi je 0x84223 movq 0x68(%rdi), %rax testq %rax, %rax je 0x84223 cmpl %esi, 0x10(%rdi) jbe 0x84223 movq 0x20(%rax), %rcx movl %esi, %edx movl (%rcx,%rdx,4), %ecx addq (%rax), %rcx jmp 0x84225 xorl %ecx, %ecx xorl %eax, %eax testq %rcx, %rcx je 0x84234 testb $0x41, 0x8(%rcx) setne %al retq testq %rdi, %rdi je 0x84233 movl $0x18, 0x1c(%rdi) retq
mz_zip_reader_is_file_encrypted: test rdi, rdi jz short loc_84223 mov rax, [rdi+68h] test rax, rax jz short loc_84223 cmp [rdi+10h], esi jbe short loc_84223 mov rcx, [rax+20h] mov edx, esi mov ecx, [rcx+rdx*4] add rcx, [rax] jmp short loc_84225 loc_84223: xor ecx, ecx loc_84225: xor eax, eax test rcx, rcx jz short loc_84234 test byte ptr [rcx+8], 41h setnz al locret_84233: retn loc_84234: test rdi, rdi jz short locret_84233 mov dword ptr [rdi+1Ch], 18h retn
bool mz_zip_reader_is_file_encrypted(long long a1, unsigned int a2) { _QWORD *v2; // rax long long v3; // rcx bool result; // al if ( a1 && (v2 = *(_QWORD **)(a1 + 104)) != 0LL && *(_DWORD *)(a1 + 16) > a2 ) v3 = *v2 + *(unsigned int *)(v2[4] + 4LL * a2); else v3 = 0LL; result = 0; if ( v3 ) return (*(_BYTE *)(v3 + 8) & 0x41) != 0; if ( a1 ) *(_DWORD *)(a1 + 28) = 24; return result; }
11,094
mz_zip_reader_is_file_encrypted
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index) { mz_uint m_bit_flag; const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); if (!p) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); return MZ_FALSE; } m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); return (m_bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0; }
O2
c
mz_zip_reader_is_file_encrypted: xorl %eax, %eax testq %rdi, %rdi je 0x5e9c2 movq 0x68(%rdi), %rcx testq %rcx, %rcx je 0x5e9c3 cmpl %esi, 0x10(%rdi) jbe 0x5e9c3 movq (%rcx), %rdx testq %rdx, %rdx je 0x5e9c3 movq 0x20(%rcx), %rax movl %esi, %ecx movl (%rax,%rcx,4), %ecx xorl %eax, %eax testb $0x41, 0x8(%rdx,%rcx) setne %al retq movl $0x18, 0x1c(%rdi) retq
mz_zip_reader_is_file_encrypted: xor eax, eax test rdi, rdi jz short locret_5E9C2 mov rcx, [rdi+68h] test rcx, rcx jz short loc_5E9C3 cmp [rdi+10h], esi jbe short loc_5E9C3 mov rdx, [rcx] test rdx, rdx jz short loc_5E9C3 mov rax, [rcx+20h] mov ecx, esi mov ecx, [rax+rcx*4] xor eax, eax test byte ptr [rdx+rcx+8], 41h setnz al locret_5E9C2: retn loc_5E9C3: mov dword ptr [rdi+1Ch], 18h retn
_BOOL8 mz_zip_reader_is_file_encrypted(long long a1, unsigned int a2) { _BOOL8 result; // rax _QWORD *v3; // rcx result = 0LL; if ( a1 ) { v3 = *(_QWORD **)(a1 + 104); if ( v3 && *(_DWORD *)(a1 + 16) > a2 && *v3 ) return (*(_BYTE *)(*v3 + *(unsigned int *)(v3[4] + 4LL * a2) + 8LL) & 0x41) != 0; else *(_DWORD *)(a1 + 28) = 24; } return result; }
mz_zip_reader_is_file_encrypted: XOR EAX,EAX TEST RDI,RDI JZ 0x0015e9c2 MOV RCX,qword ptr [RDI + 0x68] TEST RCX,RCX JZ 0x0015e9c3 CMP dword ptr [RDI + 0x10],ESI JBE 0x0015e9c3 MOV RDX,qword ptr [RCX] TEST RDX,RDX JZ 0x0015e9c3 MOV RAX,qword ptr [RCX + 0x20] MOV ECX,ESI MOV ECX,dword ptr [RAX + RCX*0x4] XOR EAX,EAX TEST byte ptr [RDX + RCX*0x1 + 0x8],0x41 SETNZ AL LAB_0015e9c2: RET LAB_0015e9c3: MOV dword ptr [RDI + 0x1c],0x18 RET
bool mz_zip_reader_is_file_encrypted(long param_1,uint param_2) { long *plVar1; bool bVar2; bVar2 = false; if (param_1 != 0) { plVar1 = *(long **)(param_1 + 0x68); if (((plVar1 == (long *)0x0) || (*(uint *)(param_1 + 0x10) <= param_2)) || (*plVar1 == 0)) { *(int4 *)(param_1 + 0x1c) = 0x18; return false; } bVar2 = (*(byte *)(*plVar1 + 8 + (ulong)*(uint *)(plVar1[4] + (ulong)param_2 * 4)) & 0x41) != 0; } return bVar2; }
11,095
mz_zip_reader_is_file_encrypted
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index) { mz_uint m_bit_flag; const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); if (!p) { mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); return MZ_FALSE; } m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); return (m_bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0; }
O3
c
mz_zip_reader_is_file_encrypted: xorl %eax, %eax testq %rdi, %rdi je 0x832d3 movq 0x68(%rdi), %rcx testq %rcx, %rcx je 0x832d4 cmpl %esi, 0x10(%rdi) jbe 0x832d4 movq (%rcx), %rdx testq %rdx, %rdx je 0x832d4 movq 0x20(%rcx), %rax movl %esi, %ecx movl (%rax,%rcx,4), %ecx xorl %eax, %eax testb $0x41, 0x8(%rdx,%rcx) setne %al retq movl $0x18, 0x1c(%rdi) retq
mz_zip_reader_is_file_encrypted: xor eax, eax test rdi, rdi jz short locret_832D3 mov rcx, [rdi+68h] test rcx, rcx jz short loc_832D4 cmp [rdi+10h], esi jbe short loc_832D4 mov rdx, [rcx] test rdx, rdx jz short loc_832D4 mov rax, [rcx+20h] mov ecx, esi mov ecx, [rax+rcx*4] xor eax, eax test byte ptr [rdx+rcx+8], 41h setnz al locret_832D3: retn loc_832D4: mov dword ptr [rdi+1Ch], 18h retn
_BOOL8 mz_zip_reader_is_file_encrypted(long long a1, unsigned int a2) { _BOOL8 result; // rax _QWORD *v3; // rcx result = 0LL; if ( a1 ) { v3 = *(_QWORD **)(a1 + 104); if ( v3 && *(_DWORD *)(a1 + 16) > a2 && *v3 ) return (*(_BYTE *)(*v3 + *(unsigned int *)(v3[4] + 4LL * a2) + 8LL) & 0x41) != 0; else *(_DWORD *)(a1 + 28) = 24; } return result; }
11,096
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _resolve_ref(const std::string & ref) { std::string ref_name = ref.substr(ref.find_last_of('/') + 1); if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) { _refs_being_resolved.insert(ref); json resolved = _refs[ref]; ref_name = visit(resolved, ref_name); _refs_being_resolved.erase(ref); } return ref_name; }
O2
cpp
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx pushq $0x2f popq %rsi pushq $-0x1 popq %r12 movq %rdx, %rdi movq %r12, %rdx callq 0x24130 leaq 0x1(%rax), %rdx movq %rbx, %rdi movq %r14, %rsi movq %r12, %rcx callq 0x23920 leaq 0x28(%r15), %rdi movq %rbx, %rsi callq 0x8e356 leaq 0x30(%r15), %rcx cmpq %rcx, %rax jne 0x902ec leaq 0x90(%r15), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x915d2 testq %rax, %rax jne 0x902ec movq %r12, %rdi movq %r14, %rsi callq 0x88ace leaq 0x58(%r15), %rdi movq %r14, %rsi callq 0x91600 leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x41b64 leaq 0x18(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r15, %rsi movq %rbx, %rcx callq 0x8e4dc leaq 0x18(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x23ab0 movq %r15, %rdi callq 0x241a8 movq %r12, %rdi movq %r14, %rsi callq 0x919fe leaq 0x8(%rsp), %rdi callq 0x3ce0c movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x902fd movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x3ce0c jmp 0x90315 jmp 0x90312 jmp 0x90312 jmp 0x90312 movq %rax, %r14 movq %rbx, %rdi callq 0x241a8 movq %r14, %rdi callq 0x23f70 nop
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi push 2Fh ; '/' pop rsi push 0FFFFFFFFFFFFFFFFh pop r12 mov rdi, rdx mov rdx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) lea rdx, [rax+1] mov rdi, rbx mov rsi, r14 mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [r15+28h] mov rsi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) lea rcx, [r15+30h] cmp rax, rcx jnz short loc_902EC lea r12, [r15+90h] mov rdi, r12 mov rsi, r14 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&) test rax, rax jnz short loc_902EC mov rdi, r12 mov rsi, r14 call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(std::string const&) lea rdi, [r15+58h] mov rsi, r14 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,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::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) lea rdi, [rsp+58h+var_50] mov rsi, rax 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&) lea rdi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_50] mov rsi, r15 mov rcx, rbx call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&) lea r15, [rsp+58h+var_40] mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12 mov rsi, r14 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase(std::integral_constant<bool,true>,std::string const&) lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_902EC: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_902FD: mov r14, rax lea rdi, [rsp+arg_0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_90315 jmp short loc_90312 jmp short loc_90312 jmp short $+2 loc_90312: mov r14, rax loc_90315: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4) { long long v5; // rax long long v6; // rdx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d unsigned __int8 *v14; // rax unsigned __int8 v16[16]; // [rsp+8h] [rbp-50h] BYREF _QWORD v17[8]; // [rsp+18h] [rbp-40h] BYREF v5 = std::string::rfind(a3, 47LL, -1LL); std::string::substr(a1, a3, v5 + 1, -1LL); if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( a2 + 40, a1) == a2 + 48 && !std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find( a2 + 144, a3) ) { std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert( a2 + 144, a3, v6, v7, v8, v9); v14 = (unsigned __int8 *)std::__detail::_Map_base<std::string,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::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a2 + 88, a3, v10, v11, v12, 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>::basic_json( v16, v14); SchemaConverter::visit(v17, a2, v16, a1, a4); std::string::operator=(a1, v17); std::string::~string(v17); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_erase( a2 + 144, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v16); } return a1; }
_resolve_ref: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI PUSH 0x2f POP RSI PUSH -0x1 POP R12 MOV RDI,RDX MOV RDX,R12 CALL 0x00124130 LEA RDX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RCX,R12 CALL 0x00123920 LEA RDI,[R15 + 0x28] LAB_0019025e: MOV RSI,RBX CALL 0x0018e356 LEA RCX,[R15 + 0x30] CMP RAX,RCX JNZ 0x001902ec LEA R12,[R15 + 0x90] LAB_00190276: MOV RDI,R12 MOV RSI,R14 CALL 0x001915d2 TEST RAX,RAX JNZ 0x001902ec LAB_00190286: MOV RDI,R12 MOV RSI,R14 CALL 0x00188ace LEA RDI,[R15 + 0x58] LAB_00190295: MOV RSI,R14 CALL 0x00191600 LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x00141b64 LAB_001902aa: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x8] MOV RSI,R15 MOV RCX,RBX CALL 0x0018e4dc LEA R15,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 CALL 0x00123ab0 MOV RDI,R15 CALL 0x001241a8 LAB_001902d7: MOV RDI,R12 MOV RSI,R14 CALL 0x001919fe LAB_001902e2: LEA RDI,[RSP + 0x8] CALL 0x0013ce0c LAB_001902ec: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */ string * SchemaConverter::_resolve_ref(string *param_1) { _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *this; string *psVar1; long lVar2; basic_json *pbVar3; string *in_RDX; string *in_RSI; 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_50 [16]; string local_40 [32]; std::__cxx11::string::rfind((char)in_RDX,0x2f); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX); /* try { // try from 0019025e to 00190265 has its CatchHandler @ 00190312 */ psVar1 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(in_RSI + 0x28),param_1); if (psVar1 == in_RSI + 0x30) { this = (_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(in_RSI + 0x90); /* try { // try from 00190276 to 00190280 has its CatchHandler @ 00190310 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::find(this,in_RDX); if (lVar2 == 0) { /* try { // try from 00190286 to 00190290 has its CatchHandler @ 0019030c */ std::__detail:: _Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::insert((string *)this); /* try { // try from 00190295 to 001902a9 has its CatchHandler @ 0019030e */ pbVar3 = (basic_json *) std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)(in_RSI + 0x58),in_RDX); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_50,pbVar3); /* try { // try from 001902aa to 001902be has its CatchHandler @ 001902fd */ visit(local_40,in_RSI); std::__cxx11::string::operator=(param_1,local_40); std::__cxx11::string::~string(local_40); /* try { // try from 001902d7 to 001902e1 has its CatchHandler @ 001902fb */ std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::_M_erase(this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_50); } } return param_1; }
11,097
my_wc_mb_tis620
eloqsql/strings/ctype-tis620.c
static int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *str, uchar *end __attribute__((unused))) { const uchar *pl; if (str >= end) return MY_CS_TOOSMALL; pl= uni_to_cs[(wc>>8) & 0xFF]; str[0]= pl ? pl[wc & 0xFF] : '\0'; return (!str[0] && wc) ? MY_CS_ILUNI : 1; }
O3
c
my_wc_mb_tis620: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3ff96 pushq %rbp movq %rsp, %rbp pushq %rbx movq %rsi, %rbx movzbl %bh, %eax leaq 0x2b1111(%rip), %rcx # 0x2f1080 movq (%rcx,%rax,8), %rax testq %rax, %rax je 0x3ff80 movzbl %bl, %ecx movb (%rax,%rcx), %al jmp 0x3ff82 xorl %eax, %eax movb %al, (%rdx) testb %al, %al setne %al testq %rbx, %rbx sete %cl orb %al, %cl movzbl %cl, %eax popq %rbx popq %rbp retq
my_wc_mb_tis620: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_3FF96 push rbp mov rbp, rsp push rbx mov rbx, rsi movzx eax, bh lea rcx, uni_to_cs_0 mov rax, [rcx+rax*8] test rax, rax jz short loc_3FF80 movzx ecx, bl mov al, [rax+rcx] jmp short loc_3FF82 loc_3FF80: xor eax, eax loc_3FF82: mov [rdx], al test al, al setnz al test rbx, rbx setz cl or cl, al movzx eax, cl pop rbx pop rbp locret_3FF96: retn
long long my_wc_mb_tis620(long long a1, long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rax char v6; // al result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = (long long)*(&uni_to_cs_0 + BYTE1(a2)); if ( v5 ) v6 = *(_BYTE *)(v5 + (unsigned __int8)a2); else v6 = 0; *a3 = v6; return (v6 != 0) | (unsigned __int8)(a2 == 0); } return result; }
my_wc_mb_tis620: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013ff96 PUSH RBP MOV RBP,RSP PUSH RBX MOV RBX,RSI MOVZX EAX,BH LEA RCX,[0x3f1080] MOV RAX,qword ptr [RCX + RAX*0x8] TEST RAX,RAX JZ 0x0013ff80 MOVZX ECX,BL MOV AL,byte ptr [RAX + RCX*0x1] JMP 0x0013ff82 LAB_0013ff80: XOR EAX,EAX LAB_0013ff82: MOV byte ptr [RDX],AL TEST AL,AL SETNZ AL TEST RBX,RBX SETZ CL OR CL,AL MOVZX EAX,CL POP RBX POP RBP LAB_0013ff96: RET
ulong my_wc_mb_tis620(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; ulong uVar2; uVar2 = 0xffffff9b; if (param_3 < param_4) { if (*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0'); } return uVar2; }
11,098
ident_realloc
bluesky950520[P]quickjs/quickjs.c
static __exception int ident_realloc(JSContext *ctx, char **pbuf, size_t *psize, char *static_buf) { char *buf, *new_buf; size_t size, new_size; buf = *pbuf; size = *psize; if (size >= (SIZE_MAX / 3) * 2) new_size = SIZE_MAX; else new_size = size + (size >> 1); if (buf == static_buf) { new_buf = js_malloc(ctx, new_size); if (!new_buf) return -1; memcpy(new_buf, buf, size); } else { new_buf = js_realloc(ctx, buf, new_size); if (!new_buf) return -1; } *pbuf = new_buf; *psize = new_size; return 0; }
O2
c
ident_realloc: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq (%rsi), %r12 movq (%rdx), %r13 movq %r13, %rax shrq %rax addq %r13, %rax movabsq $-0x5555555555555557, %rdx # imm = 0xAAAAAAAAAAAAAAA9 cmpq %rdx, %r13 pushq $-0x1 popq %r15 cmovbeq %rax, %r15 cmpq %rcx, %r12 je 0x41f59 movq %r12, %rsi movq %r15, %rdx callq 0x17277 movq %rax, %rbp testq %rax, %rax jne 0x41f77 jmp 0x41f81 movq %r15, %rsi callq 0x17214 testq %rax, %rax je 0x41f81 movq %rax, %rbp movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xe5c0 movq %rbp, (%r14) movq %r15, (%rbx) xorl %eax, %eax jmp 0x41f84 pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ident_realloc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r12, [rsi] mov r13, [rdx] mov rax, r13 shr rax, 1 add rax, r13 mov rdx, 0AAAAAAAAAAAAAAA9h cmp r13, rdx push 0FFFFFFFFFFFFFFFFh pop r15 cmovbe r15, rax cmp r12, rcx jz short loc_41F59 mov rsi, r12 mov rdx, r15 call js_realloc mov rbp, rax test rax, rax jnz short loc_41F77 jmp short loc_41F81 loc_41F59: mov rsi, r15 call js_malloc test rax, rax jz short loc_41F81 mov rbp, rax mov rdi, rax mov rsi, r12 mov rdx, r13 call _memcpy loc_41F77: mov [r14], rbp mov [rbx], r15 xor eax, eax jmp short loc_41F84 loc_41F81: push 0FFFFFFFFFFFFFFFFh pop rax loc_41F84: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ident_realloc(long long a1, long long *a2, long long *a3, long long a4) { long long v5; // r12 long long v6; // r13 long long v7; // r15 long long v8; // rbp long long v9; // rax v5 = *a2; v6 = *a3; v7 = -1LL; if ( (unsigned long long)*a3 <= 0xAAAAAAAAAAAAAAA9LL ) v7 = *a3 + ((unsigned long long)*a3 >> 1); if ( v5 != a4 ) { v8 = js_realloc(a1, *a2, v7); if ( !v8 ) return -1LL; LABEL_8: *a2 = v8; *a3 = v7; return 0LL; } v9 = js_malloc(a1, v7); if ( v9 ) { v8 = v9; memcpy(v9, v5, v6); goto LABEL_8; } return -1LL; }
ident_realloc: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RSI] MOV R13,qword ptr [RDX] MOV RAX,R13 SHR RAX,0x1 ADD RAX,R13 MOV RDX,-0x5555555555555557 CMP R13,RDX PUSH -0x1 POP R15 CMOVBE R15,RAX CMP R12,RCX JZ 0x00141f59 MOV RSI,R12 MOV RDX,R15 CALL 0x00117277 MOV RBP,RAX TEST RAX,RAX JNZ 0x00141f77 JMP 0x00141f81 LAB_00141f59: MOV RSI,R15 CALL 0x00117214 TEST RAX,RAX JZ 0x00141f81 MOV RBP,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R13 CALL 0x0010e5c0 LAB_00141f77: MOV qword ptr [R14],RBP MOV qword ptr [RBX],R15 XOR EAX,EAX JMP 0x00141f84 LAB_00141f81: PUSH -0x1 POP RAX LAB_00141f84: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ident_realloc(int8 param_1,long *param_2,ulong *param_3,void *param_4) { void *__src; ulong __n; void *__dest; ulong uVar1; __src = (void *)*param_2; __n = *param_3; uVar1 = 0xffffffffffffffff; if (__n < 0xaaaaaaaaaaaaaaaa) { uVar1 = (__n >> 1) + __n; } if (__src == param_4) { __dest = (void *)js_malloc(param_1,uVar1); if (__dest != (void *)0x0) { memcpy(__dest,__src,__n); goto LAB_00141f77; } } else { __dest = (void *)js_realloc(param_1,__src,uVar1); if (__dest != (void *)0x0) { LAB_00141f77: *param_2 = (long)__dest; *param_3 = uVar1; return 0; } } return 0xffffffffffffffff; }
11,099
verify_receipt_proof
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_receipt_proof.c
bool verify_receipt_proof(verify_ctx_t* ctx) { ssz_ob_t raw_tx = ssz_get(&ctx->proof, "transaction"); ssz_ob_t receipt_proof = ssz_get(&ctx->proof, "receipt_proof"); ssz_ob_t block_proof = ssz_get(&ctx->proof, "block_proof"); ssz_ob_t header = ssz_get(&ctx->proof, "header"); ssz_ob_t sync_committee_bits = ssz_get(&ctx->proof, "sync_committee_bits"); ssz_ob_t sync_committee_signature = ssz_get(&ctx->proof, "sync_committee_signature"); ssz_ob_t block_hash = ssz_get(&ctx->proof, "blockHash"); ssz_ob_t block_number = ssz_get(&ctx->proof, "blockNumber"); ssz_ob_t body_root = ssz_get(&header, "bodyRoot"); uint32_t tx_index = ssz_get_uint32(&ctx->proof, "transactionIndex"); bytes32_t receipt_root = {0}; bytes_t raw_receipt = {0}; if (ssz_is_error(header) || ssz_is_error(receipt_proof) || ssz_is_error(raw_tx) || ssz_is_error(body_root) || body_root.bytes.len != 32 || ssz_is_error(block_proof) || ssz_is_error(block_hash) || block_hash.bytes.len != 32 || ssz_is_error(block_number)) RETURN_VERIFY_ERROR(ctx, "invalid proof, missing header or blockhash_proof!"); if (ssz_is_error(sync_committee_bits) || sync_committee_bits.bytes.len != 64 || ssz_is_error(sync_committee_signature) || sync_committee_signature.bytes.len != 96) RETURN_VERIFY_ERROR(ctx, "invalid proof, missing sync committee bits or signature!"); if (!c4_tx_verify_tx_hash(ctx, raw_tx.bytes)) RETURN_VERIFY_ERROR(ctx, "invalid tx hash!"); if (!c4_tx_verify_receipt_proof(ctx, receipt_proof, tx_index, receipt_root, &raw_receipt)) RETURN_VERIFY_ERROR(ctx, "invalid receipt proof!"); if (!c4_tx_verify_receipt_data(ctx, ctx->data, block_hash.bytes.data, ssz_uint64(block_number), tx_index, raw_tx.bytes, raw_receipt)) RETURN_VERIFY_ERROR(ctx, "invalid tx data!"); if (!verify_merkle_proof(ctx, block_proof, block_hash.bytes, block_number.bytes, raw_tx.bytes, tx_index, receipt_root, body_root.bytes.data)) RETURN_VERIFY_ERROR(ctx, "invalid tx proof!"); if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false; ctx->success = true; return true; }
O2
c
verify_receipt_proof: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rdi, %rbx leaq 0x20(%rdi), %r14 leaq 0x4dee3(%rip), %rdx # 0x755c2 leaq 0x60(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d59b(%rip), %rdx # 0x74c8e leaq 0xe8(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d592(%rip), %rdx # 0x74c9c leaq 0xd0(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4cf4c(%rip), %rdx # 0x7466d leaq 0x148(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d4fd(%rip), %rdx # 0x74c38 leaq 0xb8(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d4fa(%rip), %rdx # 0x74c4c leaq 0xa0(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d4fc(%rip), %rdx # 0x74c65 leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d1f9(%rip), %rdx # 0x74976 leaq 0x30(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4d7f3(%rip), %rdx # 0x74f84 leaq 0x88(%rsp), %rdi movq %r15, %rsi callq 0x4d119 leaq 0x4d4c7(%rip), %rdx # 0x74c6f leaq 0x1a0(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x4d119 movl (%r12), %edi movq 0x8(%r12), %rsi callq 0x4bbb5 xorps %xmm0, %xmm0 movaps %xmm0, 0x120(%rsp) movaps %xmm0, 0x110(%rsp) movaps %xmm0, 0x100(%rsp) cmpq $0x0, 0x10(%r15) je 0x27827 cmpq $0x0, 0x150(%rsp) je 0x27827 cmpq $0x0, 0xf8(%rsp) je 0x27827 cmpq $0x0, 0xf0(%rsp) je 0x27827 movq %rax, %r14 cmpq $0x0, 0x70(%rsp) sete %al movq 0x68(%rsp), %rdx testq %rdx, %rdx sete %cl orb %al, %cl je 0x27853 leaq 0x70(%rbx), %rdi leaq 0x4daff(%rip), %rsi # 0x75331 callq 0x50675 movb $0x0, 0x68(%rbx) xorl %r14d, %r14d movl %r14d, %eax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x0, 0x98(%rsp) je 0x27827 cmpq $0x0, 0x90(%rsp) je 0x27827 cmpl $0x20, 0x88(%rsp) jne 0x27827 cmpq $0x0, 0xe0(%rsp) je 0x27827 cmpq $0x0, 0xd8(%rsp) je 0x27827 cmpq $0x0, 0x58(%rsp) je 0x27827 cmpq $0x0, 0x50(%rsp) je 0x27827 cmpl $0x20, 0x48(%rsp) jne 0x27827 cmpq $0x0, 0x40(%rsp) je 0x27827 cmpq $0x0, 0x38(%rsp) je 0x27827 cmpq $0x0, 0xc8(%rsp) je 0x27b1c cmpq $0x0, 0xc0(%rsp) je 0x27b1c cmpl $0x40, 0xb8(%rsp) jne 0x27b1c cmpq $0x0, 0xb0(%rsp) je 0x27b1c cmpq $0x0, 0xa8(%rsp) je 0x27b1c cmpl $0x60, 0xa0(%rsp) jne 0x27b1c movl 0x60(%rsp), %esi movq %rbx, %rdi callq 0x2a947 testb %al, %al je 0x27b2c movq 0xf8(%rsp), %rax movq %rax, 0x10(%rsp) movups 0xe8(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x110(%rsp), %rdx leaq 0x100(%rsp), %rcx movq %rbx, %rdi movl %r14d, %esi callq 0x2b62c testb %al, %al je 0x27b3c movq 0x50(%rsp), %r15 movl 0x30(%rsp), %edi movq 0x38(%rsp), %rsi callq 0x4bbb5 movl 0x60(%rsp), %r8d movq 0x68(%rsp), %r9 movaps 0x100(%rsp), %xmm0 movups %xmm0, 0x18(%rsp) movq 0x48(%rbx), %rcx movq %rcx, 0x10(%rsp) movups 0x38(%rbx), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx movl %r14d, %ecx callq 0x2aeb1 testb %al, %al je 0x27b4c movq 0x90(%rsp), %rax movq %rax, 0x78(%rsp) movl 0x48(%rsp), %ebp movq 0x50(%rsp), %r15 movl 0x30(%rsp), %edx movq 0x38(%rsp), %rsi movl 0xd0(%rsp), %eax movl %eax, 0x2c(%rsp) movq 0xd8(%rsp), %rax movq %rax, 0x80(%rsp) xorps %xmm0, %xmm0 leaq 0x200(%rsp), %r13 movaps %xmm0, 0x10(%r13) movaps %xmm0, (%r13) movaps %xmm0, -0x10(%r13) movaps %xmm0, -0x20(%r13) movaps %xmm0, -0x30(%r13) movaps %xmm0, -0x40(%r13) movaps %xmm0, -0x50(%r13) movaps %xmm0, -0x60(%r13) leaq 0x160(%rsp), %rax movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) leaq 0x180(%rsp), %r12 movq $0x326, (%r12) # imm = 0x326 movq $0x32c, 0x8(%r12) # imm = 0x32C movq $0x323, 0x10(%r12) # imm = 0x323 movl %r14d, %eax addq $0x65a00000, %rax # imm = 0x65A00000 movq %rax, 0x18(%r12) leaq 0x1a0(%rsp), %r14 movq %r14, %rdi callq 0x22090 leaq 0x1c0(%rsp), %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x22090 movaps 0x110(%rsp), %xmm0 movaps 0x120(%rsp), %xmm1 movaps %xmm0, 0x40(%r14) movaps %xmm1, 0x50(%r14) movups 0x60(%rsp), %xmm0 movaps %xmm0, 0x130(%rsp) leaq 0x8016f(%rip), %rax # 0xa7c20 movq %rax, 0x140(%rsp) movq %rax, 0x10(%rsp) movaps 0x130(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r13, %rdi callq 0x4d3f1 movl 0x2c(%rsp), %edi movq 0x80(%rsp), %rsi movl $0x80, %edx movq %r14, %rcx movq %r12, %r8 leaq 0x160(%rsp), %r9 callq 0x4d8a0 testb %al, %al je 0x27b5c leaq 0x160(%rsp), %rdi pushq $0x20 popq %rdx movq 0x78(%rsp), %rsi callq 0x22380 testl %eax, %eax je 0x27b8e leaq 0x4d933(%rip), %rsi # 0x7544d jmp 0x27b63 leaq 0x70(%rbx), %rdi leaq 0x4d83c(%rip), %rsi # 0x75363 jmp 0x27832 leaq 0x70(%rbx), %rdi leaq 0x4d88b(%rip), %rsi # 0x753c2 jmp 0x27832 leaq 0x70(%rbx), %rdi leaq 0x4d99c(%rip), %rsi # 0x754e3 jmp 0x27832 leaq 0x70(%rbx), %rdi leaq 0x4d9a3(%rip), %rsi # 0x754fa jmp 0x27832 leaq 0x4d8c9(%rip), %rsi # 0x7542c leaq 0x70(%rbx), %r15 movq %r15, %rdi callq 0x50675 xorl %r14d, %r14d movb %r14b, 0x68(%rbx) leaq 0x4d81f(%rip), %rsi # 0x7539c movq %r15, %rdi callq 0x50675 movb %r14b, 0x68(%rbx) jmp 0x2783e xorl %r14d, %r14d leaq 0x148(%rsp), %rsi leaq 0xb8(%rsp), %rdx leaq 0xa0(%rsp), %rcx movq %rbx, %rdi xorl %r8d, %r8d callq 0x2a2e4 testl %eax, %eax jne 0x2783e movb $0x1, 0x68(%rbx) movb $0x1, %r14b jmp 0x2783e
verify_receipt_proof: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov rbx, rdi lea r14, [rdi+20h] lea rdx, aInvalidTransac+8; "transaction" lea rdi, [rsp+258h+var_1F8] mov rsi, r14 call ssz_get lea rdx, aReceiptProof; "receipt_proof" lea rdi, [rsp+258h+var_170] mov rsi, r14 call ssz_get lea rdx, aBlockProof; "block_proof" lea rdi, [rsp+258h+var_188] mov rsi, r14 call ssz_get lea rdx, aInvalidRespons+15h; "header" lea r15, [rsp+258h+var_110] mov rdi, r15 mov rsi, r14 call ssz_get lea rdx, aSyncCommitteeB; "sync_committee_bits" lea rdi, [rsp+258h+var_1A0] mov rsi, r14 call ssz_get lea rdx, aSyncCommitteeS; "sync_committee_signature" lea rdi, [rsp+258h+var_1B8] mov rsi, r14 call ssz_get lea rdx, aBlockhash; "blockHash" lea rdi, [rsp+258h+var_210] mov rsi, r14 call ssz_get lea rdx, aEthBlocknumber+4; "blockNumber" lea rdi, [rsp+258h+var_228] mov rsi, r14 call ssz_get lea rdx, aBodyroot; "bodyRoot" lea rdi, [rsp+258h+var_1D0] mov rsi, r15 call ssz_get lea rdx, aTransactionind; "transactionIndex" lea r12, [rsp+258h+var_B8] mov rdi, r12 mov rsi, r14 call ssz_get mov edi, [r12] mov rsi, [r12+8] call bytes_as_le xorps xmm0, xmm0 movaps [rsp+258h+var_138], xmm0 movaps [rsp+258h+var_148], xmm0 movaps [rsp+258h+var_158], xmm0 cmp qword ptr [r15+10h], 0 jz short loc_27827 cmp [rsp+258h+var_108], 0 jz short loc_27827 cmp [rsp+258h+var_160], 0 jz short loc_27827 cmp qword ptr [rsp+258h+var_170+8], 0 jz short loc_27827 mov r14, rax cmp [rsp+258h+var_1E8], 0 setz al mov rdx, qword ptr [rsp+258h+var_1F8+8] test rdx, rdx setz cl or cl, al jz short loc_27853 loc_27827: lea rdi, [rbx+70h] lea rsi, aInvalidProofMi; "invalid proof, missing header or blockh"... loc_27832: call c4_state_add_error mov byte ptr [rbx+68h], 0 xor r14d, r14d loc_2783E: mov eax, r14d add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_27853: cmp [rsp+258h+var_1C0], 0 jz short loc_27827 cmp [rsp+258h+var_1C8], 0 jz short loc_27827 cmp [rsp+258h+var_1D0], 20h ; ' ' jnz short loc_27827 cmp [rsp+258h+var_178], 0 jz short loc_27827 cmp [rsp+258h+var_180], 0 jz short loc_27827 cmp [rsp+258h+var_200], 0 jz short loc_27827 cmp [rsp+258h+var_208], 0 jz short loc_27827 cmp [rsp+258h+var_210], 20h ; ' ' jnz short loc_27827 cmp [rsp+258h+var_218], 0 jz loc_27827 cmp [rsp+258h+var_220], 0 jz loc_27827 cmp [rsp+258h+var_190], 0 jz loc_27B1C cmp [rsp+258h+var_198], 0 jz loc_27B1C cmp [rsp+258h+var_1A0], 40h ; '@' jnz loc_27B1C cmp [rsp+258h+var_1A8], 0 jz loc_27B1C cmp [rsp+258h+var_1B0], 0 jz loc_27B1C cmp [rsp+258h+var_1B8], 60h ; '`' jnz loc_27B1C mov esi, dword ptr [rsp+258h+var_1F8] mov rdi, rbx call c4_tx_verify_tx_hash test al, al jz loc_27B2C mov rax, [rsp+258h+var_160] mov [rsp+258h+var_248], rax movups xmm0, [rsp+258h+var_170] movups [rsp+258h+var_258], xmm0 lea rdx, [rsp+258h+var_148] lea rcx, [rsp+258h+var_158] mov rdi, rbx mov esi, r14d call c4_tx_verify_receipt_proof test al, al jz loc_27B3C mov r15, [rsp+258h+var_208] mov edi, [rsp+258h+var_228] mov rsi, [rsp+258h+var_220] call bytes_as_le mov r8d, dword ptr [rsp+258h+var_1F8] mov r9, qword ptr [rsp+258h+var_1F8+8] movaps xmm0, [rsp+258h+var_158] movups [rsp+258h+var_240], xmm0 mov rcx, [rbx+48h] mov [rsp+258h+var_248], rcx movups xmm0, xmmword ptr [rbx+38h] movups [rsp+258h+var_258], xmm0 mov rdi, rbx mov rsi, r15 mov rdx, rax mov ecx, r14d call c4_tx_verify_receipt_data test al, al jz loc_27B4C mov rax, [rsp+258h+var_1C8] mov [rsp+258h+var_1E0], rax mov ebp, [rsp+258h+var_210] mov r15, [rsp+258h+var_208] mov edx, [rsp+258h+var_228] mov rsi, [rsp+258h+var_220] mov eax, [rsp+258h+var_188] mov [rsp+258h+var_22C], eax mov rax, [rsp+258h+var_180] mov [rsp+258h+var_1D8], rax xorps xmm0, xmm0 lea r13, [rsp+258h+var_58] movaps xmmword ptr [r13+10h], xmm0 movaps xmmword ptr [r13+0], xmm0 movaps xmmword ptr [r13-10h], xmm0 movaps xmmword ptr [r13-20h], xmm0 movaps xmmword ptr [r13-30h], xmm0 movaps xmmword ptr [r13-40h], xmm0 movaps xmmword ptr [r13-50h], xmm0 movaps xmmword ptr [r13-60h], xmm0 lea rax, [rsp+258h+var_F8] movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax], xmm0 lea r12, [rsp+258h+var_D8] mov qword ptr [r12], 326h mov qword ptr [r12+8], 32Ch mov qword ptr [r12+10h], 323h mov eax, r14d add rax, 65A00000h mov [r12+18h], rax lea r14, [rsp+258h+var_B8] mov rdi, r14 call _memcpy lea rdi, [rsp+258h+var_98] mov rsi, r15 mov rdx, rbp call _memcpy movaps xmm0, [rsp+258h+var_148] movaps xmm1, [rsp+258h+var_138] movaps xmmword ptr [r14+40h], xmm0 movaps xmmword ptr [r14+50h], xmm1 movups xmm0, [rsp+258h+var_1F8] movaps [rsp+258h+var_128], xmm0 lea rax, ssz_transactions_bytes mov [rsp+258h+var_118], rax mov [rsp+258h+var_248], rax movaps xmm0, [rsp+258h+var_128] movups [rsp+258h+var_258], xmm0 mov rdi, r13 call ssz_hash_tree_root mov edi, [rsp+258h+var_22C] mov rsi, [rsp+258h+var_1D8] mov edx, 80h mov rcx, r14 mov r8, r12 lea r9, [rsp+258h+var_F8] call ssz_verify_multi_merkle_proof test al, al jz short loc_27B5C lea rdi, [rsp+258h+var_F8] push 20h ; ' ' pop rdx mov rsi, [rsp+258h+var_1E0] call _bcmp test eax, eax jz short loc_27B8E lea rsi, aInvalidTxProof; "invalid tx proof, body root mismatch!" jmp short loc_27B63 loc_27B1C: lea rdi, [rbx+70h] lea rsi, aInvalidProofMi_0; "invalid proof, missing sync committee b"... jmp loc_27832 loc_27B2C: lea rdi, [rbx+70h] lea rsi, aInvalidTxHash; "invalid tx hash!" jmp loc_27832 loc_27B3C: lea rdi, [rbx+70h] lea rsi, aInvalidReceipt; "invalid receipt proof!" jmp loc_27832 loc_27B4C: lea rdi, [rbx+70h] lea rsi, aInvalidTxData; "invalid tx data!" jmp loc_27832 loc_27B5C: lea rsi, aInvalidTxProof_0; "invalid tx proof, missing nodes!" loc_27B63: lea r15, [rbx+70h] mov rdi, r15 call c4_state_add_error xor r14d, r14d mov [rbx+68h], r14b lea rsi, aInvalidTxProof_1; "invalid tx proof!" mov rdi, r15 call c4_state_add_error mov [rbx+68h], r14b jmp loc_2783E loc_27B8E: xor r14d, r14d lea rsi, [rsp+258h+var_110] lea rdx, [rsp+258h+var_1A0] lea rcx, [rsp+258h+var_1B8] mov rdi, rbx xor r8d, r8d call c4_verify_blockroot_signature test eax, eax jnz loc_2783E mov byte ptr [rbx+68h], 1 mov r14b, 1 jmp loc_2783E
long long verify_receipt_proof(long long a1) { unsigned int v2; // eax unsigned int v3; // r14d long long v4; // rdi const char *v5; // rsi unsigned int v6; // r14d int v8; // r8d int v9; // r9d int v10; // r15d int v11; // eax long long v12; // rcx long long v13; // rbp long long v14; // r15 long long v15; // rcx long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 const char *v20; // rsi unsigned int v21; // [rsp+2Ch] [rbp-22Ch] unsigned int v22; // [rsp+30h] [rbp-228h] BYREF long long v23; // [rsp+38h] [rbp-220h] long long v24; // [rsp+40h] [rbp-218h] unsigned int v25; // [rsp+48h] [rbp-210h] BYREF long long v26; // [rsp+50h] [rbp-208h] long long v27; // [rsp+58h] [rbp-200h] __int128 v28; // [rsp+60h] [rbp-1F8h] BYREF long long v29; // [rsp+70h] [rbp-1E8h] long long v30; // [rsp+78h] [rbp-1E0h] long long v31; // [rsp+80h] [rbp-1D8h] int v32; // [rsp+88h] [rbp-1D0h] BYREF long long v33; // [rsp+90h] [rbp-1C8h] long long v34; // [rsp+98h] [rbp-1C0h] int v35; // [rsp+A0h] [rbp-1B8h] BYREF long long v36; // [rsp+A8h] [rbp-1B0h] long long v37; // [rsp+B0h] [rbp-1A8h] int v38; // [rsp+B8h] [rbp-1A0h] BYREF long long v39; // [rsp+C0h] [rbp-198h] long long v40; // [rsp+C8h] [rbp-190h] unsigned int v41; // [rsp+D0h] [rbp-188h] BYREF long long v42; // [rsp+D8h] [rbp-180h] long long v43; // [rsp+E0h] [rbp-178h] __int128 v44; // [rsp+E8h] [rbp-170h] BYREF long long v45; // [rsp+F8h] [rbp-160h] __int128 v46; // [rsp+100h] [rbp-158h] BYREF __int128 v47; // [rsp+110h] [rbp-148h] BYREF __int128 v48; // [rsp+120h] [rbp-138h] __int128 v49; // [rsp+130h] [rbp-128h] char **v50; // [rsp+140h] [rbp-118h] _BYTE v51[8]; // [rsp+148h] [rbp-110h] BYREF long long v52; // [rsp+150h] [rbp-108h] long long v53; // [rsp+158h] [rbp-100h] _BYTE v54[32]; // [rsp+160h] [rbp-F8h] BYREF _QWORD v55[4]; // [rsp+180h] [rbp-D8h] BYREF _DWORD v56[8]; // [rsp+1A0h] [rbp-B8h] BYREF _BYTE v57[32]; // [rsp+1C0h] [rbp-98h] BYREF __int128 v58; // [rsp+1E0h] [rbp-78h] __int128 v59; // [rsp+1F0h] [rbp-68h] _BYTE v60[88]; // [rsp+200h] [rbp-58h] BYREF ssz_get(&v28, a1 + 32, "transaction"); ssz_get(&v44, a1 + 32, "receipt_proof"); ssz_get(&v41, a1 + 32, "block_proof"); ssz_get(v51, a1 + 32, "header"); ssz_get(&v38, a1 + 32, "sync_committee_bits"); ssz_get(&v35, a1 + 32, "sync_committee_signature"); ssz_get(&v25, a1 + 32, "blockHash"); ssz_get(&v22, a1 + 32, "blockNumber"); ssz_get(&v32, v51, "bodyRoot"); ssz_get(v56, a1 + 32, "transactionIndex"); v2 = bytes_as_le(v56[0]); v48 = 0LL; v47 = 0LL; v46 = 0LL; if ( !v53 || !v52 || !v45 || !*((_QWORD *)&v44 + 1) || (v3 = v2, v29 == 0 || *((_QWORD *)&v28 + 1) == 0LL) || !v34 || !v33 || v32 != 32 || !v43 || !v42 || !v27 || !v26 || v25 != 32 || !v24 || !v23 ) { v4 = a1 + 112; v5 = "invalid proof, missing header or blockhash_proof!"; LABEL_7: c4_state_add_error(v4, v5); *(_BYTE *)(a1 + 104) = 0; return 0; } if ( !v40 || !v39 || v38 != 64 || !v37 || !v36 || v35 != 96 ) { v4 = a1 + 112; v5 = "invalid proof, missing sync committee bits or signature!"; goto LABEL_7; } if ( !(unsigned __int8)c4_tx_verify_tx_hash(a1, (unsigned int)v28, *((_QWORD *)&v28 + 1)) ) { v4 = a1 + 112; v5 = "invalid tx hash!"; goto LABEL_7; } if ( !(unsigned __int8)c4_tx_verify_receipt_proof(a1, v3, (unsigned int)&v47, (unsigned int)&v46, v8, v9, v44, v45) ) { v4 = a1 + 112; v5 = "invalid receipt proof!"; goto LABEL_7; } v10 = v26; v11 = bytes_as_le(v22); if ( !(unsigned __int8)c4_tx_verify_receipt_data( a1, v10, v11, v3, v28, DWORD2(v28), *(_OWORD *)(a1 + 56), *(_QWORD *)(a1 + 64), *(_QWORD *)(a1 + 72), v46) ) { v4 = a1 + 112; v5 = "invalid tx data!"; goto LABEL_7; } v30 = v33; v13 = v25; v14 = v26; v21 = v41; v31 = v42; memset(v60, 0, 32); v59 = 0LL; v58 = 0LL; memset(v57, 0, sizeof(v57)); memset(v56, 0, sizeof(v56)); memset(v54, 0, sizeof(v54)); v55[0] = 806LL; v55[1] = 812LL; v55[2] = 803LL; v55[3] = v3 + 1704984576LL; memcpy(v56, v23, v22, v12); memcpy(v57, v14, v13, v15); v58 = v47; v59 = v48; v49 = v28; v50 = &ssz_transactions_bytes; ssz_hash_tree_root(v60, v14, v16, v17, v18, v19, v28, *((_QWORD *)&v28 + 1), &ssz_transactions_bytes); if ( !(unsigned __int8)ssz_verify_multi_merkle_proof(v21, v31, 128LL, v56, v55, v54) ) { v20 = "invalid tx proof, missing nodes!"; goto LABEL_36; } if ( (unsigned int)bcmp(v54, v30, 32LL) ) { v20 = "invalid tx proof, body root mismatch!"; LABEL_36: c4_state_add_error(a1 + 112, v20); v6 = 0; *(_BYTE *)(a1 + 104) = 0; c4_state_add_error(a1 + 112, "invalid tx proof!"); *(_BYTE *)(a1 + 104) = 0; return v6; } v6 = 0; if ( !(unsigned int)c4_verify_blockroot_signature(a1, v51, &v38, &v35, 0LL) ) { *(_BYTE *)(a1 + 104) = 1; LOBYTE(v6) = 1; } return v6; }
verify_receipt_proof: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV RBX,RDI LEA R14,[RDI + 0x20] LEA RDX,[0x1755c2] LEA RDI,[RSP + 0x60] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c8e] LEA RDI,[RSP + 0xe8] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c9c] LEA RDI,[RSP + 0xd0] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x17466d] LEA R15,[RSP + 0x148] MOV RDI,R15 MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c38] LEA RDI,[RSP + 0xb8] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c4c] LEA RDI,[RSP + 0xa0] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c65] LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174976] LEA RDI,[RSP + 0x30] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174f84] LEA RDI,[RSP + 0x88] MOV RSI,R15 CALL 0x0014d119 LEA RDX,[0x174c6f] LEA R12,[RSP + 0x1a0] MOV RDI,R12 MOV RSI,R14 CALL 0x0014d119 MOV EDI,dword ptr [R12] MOV RSI,qword ptr [R12 + 0x8] CALL 0x0014bbb5 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x120],XMM0 MOVAPS xmmword ptr [RSP + 0x110],XMM0 MOVAPS xmmword ptr [RSP + 0x100],XMM0 CMP qword ptr [R15 + 0x10],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0x150],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0xf8],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0xf0],0x0 JZ 0x00127827 MOV R14,RAX CMP qword ptr [RSP + 0x70],0x0 SETZ AL MOV RDX,qword ptr [RSP + 0x68] TEST RDX,RDX SETZ CL OR CL,AL JZ 0x00127853 LAB_00127827: LEA RDI,[RBX + 0x70] LEA RSI,[0x175331] LAB_00127832: CALL 0x00150675 MOV byte ptr [RBX + 0x68],0x0 XOR R14D,R14D LAB_0012783e: MOV EAX,R14D ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00127853: CMP qword ptr [RSP + 0x98],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0x90],0x0 JZ 0x00127827 CMP dword ptr [RSP + 0x88],0x20 JNZ 0x00127827 CMP qword ptr [RSP + 0xe0],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0xd8],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0x58],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0x50],0x0 JZ 0x00127827 CMP dword ptr [RSP + 0x48],0x20 JNZ 0x00127827 CMP qword ptr [RSP + 0x40],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0x38],0x0 JZ 0x00127827 CMP qword ptr [RSP + 0xc8],0x0 JZ 0x00127b1c CMP qword ptr [RSP + 0xc0],0x0 JZ 0x00127b1c CMP dword ptr [RSP + 0xb8],0x40 JNZ 0x00127b1c CMP qword ptr [RSP + 0xb0],0x0 JZ 0x00127b1c CMP qword ptr [RSP + 0xa8],0x0 JZ 0x00127b1c CMP dword ptr [RSP + 0xa0],0x60 JNZ 0x00127b1c MOV ESI,dword ptr [RSP + 0x60] MOV RDI,RBX CALL 0x0012a947 TEST AL,AL JZ 0x00127b2c MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0xe8] MOVUPS xmmword ptr [RSP],XMM0 LEA RDX,[RSP + 0x110] LEA RCX,[RSP + 0x100] MOV RDI,RBX MOV ESI,R14D CALL 0x0012b62c TEST AL,AL JZ 0x00127b3c MOV R15,qword ptr [RSP + 0x50] MOV EDI,dword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] CALL 0x0014bbb5 MOV R8D,dword ptr [RSP + 0x60] MOV R9,qword ptr [RSP + 0x68] MOVAPS XMM0,xmmword ptr [RSP + 0x100] MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RCX,qword ptr [RBX + 0x48] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RBX + 0x38] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,R15 MOV RDX,RAX MOV ECX,R14D CALL 0x0012aeb1 TEST AL,AL JZ 0x00127b4c MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x78],RAX MOV EBP,dword ptr [RSP + 0x48] MOV R15,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RSP + 0xd0] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0xd8] MOV qword ptr [RSP + 0x80],RAX XORPS XMM0,XMM0 LEA R13,[RSP + 0x200] MOVAPS xmmword ptr [R13 + 0x10],XMM0 MOVAPS xmmword ptr [R13],XMM0 MOVAPS xmmword ptr [R13 + -0x10],XMM0 MOVAPS xmmword ptr [R13 + -0x20],XMM0 MOVAPS xmmword ptr [R13 + -0x30],XMM0 MOVAPS xmmword ptr [R13 + -0x40],XMM0 MOVAPS xmmword ptr [R13 + -0x50],XMM0 MOVAPS xmmword ptr [R13 + -0x60],XMM0 LEA RAX,[RSP + 0x160] MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 LEA R12,[RSP + 0x180] MOV qword ptr [R12],0x326 MOV qword ptr [R12 + 0x8],0x32c MOV qword ptr [R12 + 0x10],0x323 MOV EAX,R14D ADD RAX,0x65a00000 MOV qword ptr [R12 + 0x18],RAX LEA R14,[RSP + 0x1a0] MOV RDI,R14 CALL 0x00122090 LEA RDI,[RSP + 0x1c0] MOV RSI,R15 MOV RDX,RBP CALL 0x00122090 MOVAPS XMM0,xmmword ptr [RSP + 0x110] MOVAPS XMM1,xmmword ptr [RSP + 0x120] MOVAPS xmmword ptr [R14 + 0x40],XMM0 MOVAPS xmmword ptr [R14 + 0x50],XMM1 MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVAPS xmmword ptr [RSP + 0x130],XMM0 LEA RAX,[0x1a7c20] MOV qword ptr [RSP + 0x140],RAX MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x130] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R13 CALL 0x0014d3f1 MOV EDI,dword ptr [RSP + 0x2c] MOV RSI,qword ptr [RSP + 0x80] MOV EDX,0x80 MOV RCX,R14 MOV R8,R12 LEA R9,[RSP + 0x160] CALL 0x0014d8a0 TEST AL,AL JZ 0x00127b5c LEA RDI,[RSP + 0x160] PUSH 0x20 POP RDX MOV RSI,qword ptr [RSP + 0x78] CALL 0x00122380 TEST EAX,EAX JZ 0x00127b8e LEA RSI,[0x17544d] JMP 0x00127b63 LAB_00127b1c: LEA RDI,[RBX + 0x70] LEA RSI,[0x175363] JMP 0x00127832 LAB_00127b2c: LEA RDI,[RBX + 0x70] LEA RSI,[0x1753c2] JMP 0x00127832 LAB_00127b3c: LEA RDI,[RBX + 0x70] LEA RSI,[0x1754e3] JMP 0x00127832 LAB_00127b4c: LEA RDI,[RBX + 0x70] LEA RSI,[0x1754fa] JMP 0x00127832 LAB_00127b5c: LEA RSI,[0x17542c] LAB_00127b63: LEA R15,[RBX + 0x70] MOV RDI,R15 CALL 0x00150675 XOR R14D,R14D MOV byte ptr [RBX + 0x68],R14B LEA RSI,[0x17539c] MOV RDI,R15 CALL 0x00150675 MOV byte ptr [RBX + 0x68],R14B JMP 0x0012783e LAB_00127b8e: XOR R14D,R14D LEA RSI,[RSP + 0x148] LEA RDX,[RSP + 0xb8] LEA RCX,[RSP + 0xa0] MOV RDI,RBX XOR R8D,R8D CALL 0x0012a2e4 TEST EAX,EAX JNZ 0x0012783e MOV byte ptr [RBX + 0x68],0x1 MOV R14B,0x1 JMP 0x0012783e
int8 verify_receipt_proof(long param_1) { long lVar1; void *pvVar2; char cVar3; uint uVar4; int iVar5; int8 uVar6; char *pcVar7; int4 uVar8; int1 *puVar9; uint local_228 [2]; void *local_220; long local_218; uint local_210 [2]; void *local_208; long local_200; int4 local_1f8 [2]; long lStack_1f0; long local_1e8; void *local_1e0; long local_1d8; int local_1d0 [2]; void *local_1c8; long local_1c0; int local_1b8 [2]; long local_1b0; long local_1a8; int local_1a0 [2]; long local_198; long local_190; int4 local_188 [2]; long local_180; long local_178; int1 local_170 [8]; int4 uStack_168; int4 uStack_164; long local_160; int8 local_158; int8 uStack_150; int8 local_148; int8 uStack_140; int8 local_138; int8 uStack_130; long lStack_120; int1 *local_118; int1 local_110 [8]; long local_108; long local_100; int8 local_f8; int8 uStack_f0; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 local_d0; int8 local_c8; long local_c0; ulong local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; lVar1 = param_1 + 0x20; ssz_get(local_1f8,lVar1,"transaction"); ssz_get(local_170,lVar1,"receipt_proof"); ssz_get(local_188,lVar1,"block_proof"); ssz_get(local_110,lVar1,"header"); ssz_get(local_1a0,lVar1,"sync_committee_bits"); ssz_get(local_1b8,lVar1,"sync_committee_signature"); ssz_get(local_210,lVar1,"blockHash"); ssz_get(local_228,lVar1,"blockNumber"); ssz_get(local_1d0,local_110,"bodyRoot"); ssz_get(&local_b8,lVar1,"transactionIndex"); uVar4 = bytes_as_le(local_b8 & 0xffffffff,uStack_b0); local_138 = 0; uStack_130 = 0; local_148 = 0; uStack_140 = 0; local_158 = 0; uStack_150 = 0; if (((((local_100 == 0) || (local_108 == 0)) || (local_160 == 0)) || (((CONCAT44(uStack_164,uStack_168) == 0 || (lStack_1f0 == 0 || local_1e8 == 0)) || ((local_1c0 == 0 || ((local_1c8 == (void *)0x0 || (local_1d0[0] != 0x20)))))))) || ((local_178 == 0 || (((((local_180 == 0 || (local_200 == 0)) || (local_208 == (void *)0x0)) || ((local_210[0] != 0x20 || (local_218 == 0)))) || (local_220 == (void *)0x0)))))) { pcVar7 = "invalid proof, missing header or blockhash_proof!"; } else if (((local_190 == 0) || (local_198 == 0)) || ((local_1a0[0] != 0x40 || (((local_1a8 == 0 || (local_1b0 == 0)) || (local_1b8[0] != 0x60)))))) { pcVar7 = "invalid proof, missing sync committee bits or signature!"; } else { cVar3 = c4_tx_verify_tx_hash(param_1,local_1f8[0]); if (cVar3 == '\0') { pcVar7 = "invalid tx hash!"; } else { cVar3 = c4_tx_verify_receipt_proof(param_1,uVar4,&local_148,&local_158); pvVar2 = local_208; if (cVar3 == '\0') { pcVar7 = "invalid receipt proof!"; } else { uVar6 = bytes_as_le(local_228[0],local_220); cVar3 = c4_tx_verify_receipt_data (param_1,pvVar2,uVar6,uVar4,local_1f8[0],lStack_1f0, *(int4 *)(param_1 + 0x38),*(int4 *)(param_1 + 0x40), *(int8 *)(param_1 + 0x48),local_158,uStack_150); if (cVar3 != '\0') { local_1e0 = local_1c8; local_1d8 = local_180; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; local_a8 = 0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; local_e8 = 0; uStack_e0 = 0; local_f8 = 0; uStack_f0 = 0; local_d8 = 0x326; local_d0 = 0x32c; local_c8 = 0x323; local_c0 = (ulong)uVar4 + 0x65a00000; memcpy(&local_b8,local_220,(ulong)local_228[0]); memcpy(&local_98,local_208,(ulong)local_210[0]); local_78 = local_148; uStack_70 = uStack_140; local_68 = local_138; uStack_60 = uStack_130; lStack_120 = lStack_1f0; lVar1 = lStack_120; local_118 = ssz_transactions_bytes; puVar9 = ssz_transactions_bytes; lStack_120._0_4_ = (int4)lStack_1f0; uVar8 = (int4)lStack_120; lStack_120 = lVar1; ssz_hash_tree_root(&local_58); cVar3 = ssz_verify_multi_merkle_proof (local_188[0],local_1d8,0x80,&local_b8,&local_d8,&local_f8,local_1f8[0], uVar8,puVar9); if (cVar3 == '\0') { pcVar7 = "invalid tx proof, missing nodes!"; } else { iVar5 = bcmp(&local_f8,local_1e0,0x20); if (iVar5 == 0) { iVar5 = c4_verify_blockroot_signature(param_1,local_110,local_1a0,local_1b8,0); if (iVar5 != 0) { return 0; } *(int1 *)(param_1 + 0x68) = 1; return 1; } pcVar7 = "invalid tx proof, body root mismatch!"; } c4_state_add_error(param_1 + 0x70,pcVar7); *(int1 *)(param_1 + 0x68) = 0; c4_state_add_error(param_1 + 0x70,"invalid tx proof!"); *(int1 *)(param_1 + 0x68) = 0; return 0; } pcVar7 = "invalid tx data!"; } } } c4_state_add_error(param_1 + 0x70,pcVar7); *(int1 *)(param_1 + 0x68) = 0; return 0; }