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
36,000
MainWindow::closedoor(Elevetor&)
LeafBlue[P]myElevetor/mainwindow.cpp
void MainWindow::closedoor(Elevetor &thisele) { if(thisele.status != 5){ return; } QList<QWidget*> widlist = thisele.ele->findChildren<QWidget*>(); QWidget *left = widlist[0]; QWidget *right = widlist[1]; QPropertyAnimation *anim_left = new QPropertyAnimation(left,"geometry"); anim_left->setDuration(1000); anim_left->setStartValue(QRect(0,0,0,thisele.ele->height())); anim_left->setEndValue(QRect(0,0,thisele.ele->width()/2,thisele.ele->height())); QPropertyAnimation *anim_right = new QPropertyAnimation(right,"geometry"); anim_right->setDuration(1000); anim_right->setStartValue(QRect(thisele.ele->width(),0,0,thisele.ele->height())); anim_right->setEndValue(QRect(thisele.ele->width()/2,0,thisele.ele->width()/2,thisele.ele->height())); QParallelAnimationGroup *group_anime = new QParallelAnimationGroup(this); group_anime->addAnimation(anim_left); group_anime->addAnimation(anim_right); connect(group_anime,&QParallelAnimationGroup::finished,[this,&thisele](){ after_closedoor(thisele); }); group_anime->start(); }
O3
cpp
MainWindow::closedoor(Elevetor&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp cmpl $0x5, 0x4c(%rsi) jne 0x78ed movq %rsi, %rbx movq %rdi, %r14 movq 0x38(%rsi), %rdi xorl %eax, %eax movq %rsp, %rsi movq %rax, 0x10(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsi) leaq 0x20(%rsp), %rcx movaps %xmm0, (%rcx) movq %rax, 0x10(%rcx) movq 0x7a05(%rip), %rdx # 0xefe8 movl $0x1, %r8d callq 0x4570 movq (%rsp), %rax testq %rax, %rax je 0x760f lock decl (%rax) jne 0x760f movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4250 leaq 0x20(%rsp), %rdi xorl %esi, %esi callq 0x7e66 movq (%rax), %r12 leaq 0x20(%rsp), %rdi movl $0x1, %esi callq 0x7e66 movq (%rax), %r13 movl $0x10, %edi callq 0x4380 movq %rax, %r15 leaq 0x3057(%rip), %rsi # 0xa69b movq %rsp, %rdi movq $-0x1, %rdx callq 0x44f0 movq %rsp, %rdx movq %r15, %rdi movq %r12, %rsi xorl %ecx, %ecx callq 0x4260 movq (%rsp), %rax testq %rax, %rax je 0x7684 lock decl (%rax) jne 0x7684 movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x4250 movq %r15, %rdi movl $0x3e8, %esi # imm = 0x3E8 callq 0x4370 movq 0x38(%rbx), %rax movq 0x20(%rax), %rax movl 0x20(%rax), %ecx subl 0x18(%rax), %ecx leaq 0x40(%rsp), %rsi movq $0x0, (%rsi) movl $0xffffffff, 0x8(%rsi) # imm = 0xFFFFFFFF movl %ecx, 0xc(%rsi) movq %rsp, %rdi callq 0x43f0 movq %rsp, %rsi movq %r15, %rdi callq 0x4220 movq %rsp, %rdi callq 0x4170 movq 0x38(%rbx), %rax movq 0x20(%rax), %rax movl 0x1c(%rax), %ecx movl 0x20(%rax), %edx subl 0x14(%rax), %ecx movl %ecx, %esi incl %esi shrl $0x1f, %esi addl %esi, %ecx incl %ecx sarl %ecx subl 0x18(%rax), %edx leaq 0x40(%rsp), %rsi movq $0x0, (%rsi) decl %ecx movl %ecx, 0x8(%rsi) movl %edx, 0xc(%rsi) movq %rsp, %rdi callq 0x43f0 movq %rsp, %rsi movq %r15, %rdi callq 0x44a0 movq %rsp, %rdi callq 0x4170 movl $0x10, %edi callq 0x4380 movq %rax, %r12 leaq 0x2f67(%rip), %rsi # 0xa69b movq %rsp, %rdi movq $-0x1, %rdx callq 0x44f0 movq %rsp, %rdx movq %r12, %rdi movq %r13, %rsi xorl %ecx, %ecx callq 0x4260 movq (%rsp), %rax testq %rax, %rax je 0x7774 lock decl (%rax) jne 0x7774 movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x4250 movq %r12, %rdi movl $0x3e8, %esi # imm = 0x3E8 callq 0x4370 movq 0x38(%rbx), %rax movq 0x20(%rax), %rax movl 0x1c(%rax), %ecx movl 0x20(%rax), %edx subl 0x14(%rax), %ecx leal 0x1(%rcx), %edi subl 0x18(%rax), %edx leaq 0x40(%rsp), %rsi movl %edi, (%rsi) movl $0x0, 0x4(%rsi) movl %ecx, 0x8(%rsi) movl %edx, 0xc(%rsi) movq %rsp, %rdi callq 0x43f0 movq %rsp, %rsi movq %r12, %rdi callq 0x4220 movq %rsp, %rdi callq 0x4170 movq 0x38(%rbx), %rax movq 0x20(%rax), %rax movl 0x1c(%rax), %ecx subl 0x14(%rax), %ecx movl 0x20(%rax), %edx movl %ecx, %esi incl %esi shrl $0x1f, %esi addl %esi, %ecx incl %ecx movl %ecx, %edi subl 0x18(%rax), %edx sarl %edi leaq 0x40(%rsp), %rsi movl %edi, (%rsi) movl $0x0, 0x4(%rsi) andl $-0x2, %ecx decl %ecx movl %ecx, 0x8(%rsi) movl %edx, 0xc(%rsi) movq %rsp, %rdi callq 0x43f0 movq %rsp, %rsi movq %r12, %rdi callq 0x44a0 movq %rsp, %rdi callq 0x4170 movl $0x10, %edi callq 0x4380 movq %rax, %r13 movq %rax, %rdi movq %r14, %rsi callq 0x4150 movq %r13, %rdi movq %r15, %rsi callq 0x4450 movq %r13, %rdi movq %r12, %rsi callq 0x4450 movq 0x779d(%rip), %rax # 0xeff0 movq %rax, (%rsp) movq $0x0, 0x8(%rsp) movl $0x20, %edi callq 0x4380 movl $0x1, %r10d movl %r10d, (%rax) leaq 0x3dc(%rip), %rcx # 0x7c56 movq %rcx, 0x8(%rax) movq %r14, 0x10(%rax) movq %rbx, 0x18(%rax) subq $0x8, %rsp movq 0x76f7(%rip), %r11 # 0xef88 leaq 0x40(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r13, %rsi movq %r13, %rcx xorl %r8d, %r8d movq %rax, %r9 pushq %r11 pushq $0x0 pushq %r10 callq 0x42a0 addq $0x20, %rsp leaq 0x38(%rsp), %rdi callq 0x41c0 movq %r13, %rdi xorl %esi, %esi callq 0x42f0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x78ed lock decl (%rax) jne 0x78ed movq 0x20(%rsp), %rdi movl $0x8, %esi movl $0x8, %edx callq 0x4250 addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx movl $0x10, %esi movq %r13, %rdi jmp 0x7990 jmp 0x7950 jmp 0x79c0 jmp 0x7950 jmp 0x79c0 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x7942 lock decl (%rax) jne 0x7942 movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x4250 jmp 0x7942 movq %rax, %rbx movl $0x10, %esi movq %r12, %rdi jmp 0x7990 jmp 0x7950 jmp 0x79c0 movq %rax, %rbx movq %rsp, %rdi callq 0x4170 jmp 0x79c3 jmp 0x79c0 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x7988 lock decl (%rax) jne 0x7988 movq (%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0x4250 jmp 0x7988 movq %rax, %rbx movl $0x10, %esi movq %r15, %rdi callq 0x4070 jmp 0x79c3 jmp 0x79c0 jmp 0x79c0 movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x79b2 leaq 0x20(%rsp), %rsi callq 0x4818 movq %rsp, %rdi callq 0x47f7 jmp 0x79e6 jmp 0x79c0 jmp 0x79c0 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x79e6 lock decl (%rax) jne 0x79e6 movq 0x20(%rsp), %rdi movl $0x8, %esi movl $0x8, %edx callq 0x4250 movq %rbx, %rdi callq 0x41d0
_ZN10MainWindow9closedoorER8Elevetor: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h cmp dword ptr [rsi+4Ch], 5 jnz loc_78ED mov rbx, rsi mov r14, rdi mov rdi, [rsi+38h] xor eax, eax mov rsi, rsp mov [rsi+10h], rax xorps xmm0, xmm0 movaps xmmword ptr [rsi], xmm0 lea rcx, [rsp+78h+var_58] movaps xmmword ptr [rcx], xmm0 mov [rcx+10h], rax mov rdx, cs:_ZN7QWidget16staticMetaObjectE_ptr mov r8d, 1 call __Z23qt_qFindChildren_helperPK7QObjectRK7QStringRK11QMetaObjectP5QListIPvE6QFlagsIN2Qt15FindChildOptionEE; qt_qFindChildren_helper(QObject const*,QString const&,QMetaObject const&,QList<void *> *,QFlags<Qt::FindChildOption>) mov rax, [rsp+78h+var_78] test rax, rax jz short loc_760F lock dec dword ptr [rax] jnz short loc_760F mov rdi, [rsp+78h+var_78] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_760F: lea rdi, [rsp+78h+var_58] xor esi, esi call _ZN5QListIP7QWidgetEixEx; QList<QWidget *>::operator[](long long) mov r12, [rax] lea rdi, [rsp+78h+var_58] mov esi, 1 call _ZN5QListIP7QWidgetEixEx; QList<QWidget *>::operator[](long long) mov r13, [rax] mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, aGeometry; "geometry" mov rdi, rsp; this mov rdx, 0FFFFFFFFFFFFFFFFh; __int64 call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long) mov rdx, rsp; QByteArray * mov rdi, r15; this mov rsi, r12; QObject * xor ecx, ecx; QObject * call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *) mov rax, [rsp+78h+var_78] test rax, rax jz short loc_7684 lock dec dword ptr [rax] jnz short loc_7684 mov rdi, [rsp+78h+var_78] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_7684: mov rdi, r15; this mov esi, 3E8h; int call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int) mov rax, [rbx+38h] mov rax, [rax+20h] mov ecx, [rax+20h] sub ecx, [rax+18h] lea rsi, [rsp+78h+var_38] mov qword ptr [rsi], 0 mov dword ptr [rsi+8], 0FFFFFFFFh mov [rsi+0Ch], ecx mov rdi, rsp call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&) mov rsi, rsp; QVariant * mov rdi, r15; this call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&) mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov rax, [rbx+38h] mov rax, [rax+20h] mov ecx, [rax+1Ch] mov edx, [rax+20h] sub ecx, [rax+14h] mov esi, ecx inc esi shr esi, 1Fh add ecx, esi inc ecx sar ecx, 1 sub edx, [rax+18h] lea rsi, [rsp+78h+var_38] mov qword ptr [rsi], 0 dec ecx mov [rsi+8], ecx mov [rsi+0Ch], edx mov rdi, rsp call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&) mov rsi, rsp; QVariant * mov rdi, r15; this call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&) mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax lea rsi, aGeometry; "geometry" mov rdi, rsp; this mov rdx, 0FFFFFFFFFFFFFFFFh; __int64 call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long) mov rdx, rsp; QByteArray * mov rdi, r12; this mov rsi, r13; QObject * xor ecx, ecx; QObject * call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *) mov rax, [rsp+78h+var_78] test rax, rax jz short loc_7774 lock dec dword ptr [rax] jnz short loc_7774 mov rdi, [rsp+78h+var_78] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_7774: mov rdi, r12; this mov esi, 3E8h; int call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int) mov rax, [rbx+38h] mov rax, [rax+20h] mov ecx, [rax+1Ch] mov edx, [rax+20h] sub ecx, [rax+14h] lea edi, [rcx+1] sub edx, [rax+18h] lea rsi, [rsp+78h+var_38] mov [rsi], edi mov dword ptr [rsi+4], 0 mov [rsi+8], ecx mov [rsi+0Ch], edx mov rdi, rsp call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&) mov rsi, rsp; QVariant * mov rdi, r12; this call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&) mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov rax, [rbx+38h] mov rax, [rax+20h] mov ecx, [rax+1Ch] sub ecx, [rax+14h] mov edx, [rax+20h] mov esi, ecx inc esi shr esi, 1Fh add ecx, esi inc ecx mov edi, ecx sub edx, [rax+18h] sar edi, 1 lea rsi, [rsp+78h+var_38] mov [rsi], edi mov dword ptr [rsi+4], 0 and ecx, 0FFFFFFFEh dec ecx mov [rsi+8], ecx mov [rsi+0Ch], edx mov rdi, rsp call __ZN8QVariantC1ERK5QRect; QVariant::QVariant(QRect const&) mov rsi, rsp; QVariant * mov rdi, r12; this call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&) mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov rdi, rax; this mov rsi, r14; QObject * call __ZN23QParallelAnimationGroupC1EP7QObject; QParallelAnimationGroup::QParallelAnimationGroup(QObject *) mov rdi, r13; this mov rsi, r15; QAbstractAnimation * call __ZN15QAnimationGroup12addAnimationEP18QAbstractAnimation; QAnimationGroup::addAnimation(QAbstractAnimation *) mov rdi, r13; this mov rsi, r12; QAbstractAnimation * call __ZN15QAnimationGroup12addAnimationEP18QAbstractAnimation; QAnimationGroup::addAnimation(QAbstractAnimation *) mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr mov [rsp+78h+var_78], rax mov [rsp+78h+var_70], 0 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov r10d, 1 mov [rax], r10d lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow9closedoorER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::closedoor(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *) mov [rax+8], rcx mov [rax+10h], r14 mov [rax+18h], rbx sub rsp, 8 mov r11, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr lea rdi, [rsp+80h+var_40] lea rdx, [rsp+80h+var_78] mov rsi, r13 mov rcx, r13 xor r8d, r8d mov r9, rax push r11 push 0 push r10 call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*) add rsp, 20h lea rdi, [rsp+78h+var_40]; this call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection() mov rdi, r13 xor esi, esi call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy) mov rax, [rsp+78h+var_58] test rax, rax jz short loc_78ED lock dec dword ptr [rax] jnz short loc_78ED mov rdi, [rsp+78h+var_58] mov esi, 8 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_78ED: add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax mov esi, 10h mov rdi, r13 jmp loc_7990 jmp short loc_7950 jmp loc_79C0 jmp short loc_7950 jmp loc_79C0 mov rbx, rax mov rax, [rsp+0] test rax, rax jz short loc_7942 lock dec dword ptr [rax] jnz short loc_7942 mov rdi, [rsp+0] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_7942 mov rbx, rax loc_7942: mov esi, 10h mov rdi, r12 jmp short loc_7990 jmp short loc_7950 jmp short loc_79C0 loc_7950: mov rbx, rax mov rdi, rsp; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp short loc_79C3 jmp short loc_79C0 mov rbx, rax mov rax, [rsp+0] test rax, rax jz short loc_7988 lock dec dword ptr [rax] jnz short loc_7988 mov rdi, [rsp+0] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_7988 mov rbx, rax loc_7988: mov esi, 10h; unsigned __int64 mov rdi, r15; void * loc_7990: call __ZdlPvm; operator delete(void *,ulong) jmp short loc_79C3 jmp short loc_79C0 jmp short loc_79C0 mov rbx, rax mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_79B2 lea rsi, [rsp+arg_18] call _ZN10MainWindow9closedoorER8Elevetor_cold_2; MainWindow::closedoor(Elevetor &) [clone] loc_79B2: mov rdi, rsp call _ZN10MainWindow9closedoorER8Elevetor_cold_1; MainWindow::closedoor(Elevetor &) [clone] jmp short loc_79E6 jmp short loc_79C0 jmp short $+2 loc_79C0: mov rbx, rax loc_79C3: mov rax, [rsp+arg_18] test rax, rax jz short loc_79E6 lock dec dword ptr [rax] jnz short loc_79E6 mov rdi, [rsp+arg_18] mov esi, 8 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_79E6: mov rdi, rbx call __Unwind_Resume
void MainWindow::closedoor(MainWindow *this, Elevetor *a2) { long long v3; // rdi QObject *v4; // r12 QObject *v5; // r13 QPropertyAnimation *v6; // r15 int v7; // ecx _DWORD *v8; // rax int v9; // ecx int v10; // edx QPropertyAnimation *v11; // r12 _DWORD *v12; // rax int v13; // ecx int v14; // edx _DWORD *v15; // rax signed int v16; // ecx int v17; // edx QParallelAnimationGroup *v18; // r13 long long v19; // rax __int128 v20; // [rsp+0h] [rbp-78h] BYREF long long v21; // [rsp+10h] [rbp-68h] __int128 v22; // [rsp+20h] [rbp-58h] BYREF long long v23; // [rsp+30h] [rbp-48h] _BYTE v24[8]; // [rsp+38h] [rbp-40h] BYREF long long v25; // [rsp+40h] [rbp-38h] BYREF unsigned int v26; // [rsp+48h] [rbp-30h] int v27; // [rsp+4Ch] [rbp-2Ch] if ( *((_DWORD *)a2 + 19) == 5 ) { v3 = *((_QWORD *)a2 + 7); v21 = 0LL; v20 = 0LL; v22 = 0LL; v23 = 0LL; qt_qFindChildren_helper(v3, &v20, &QWidget::staticMetaObject, &v22, 1LL); if ( (_QWORD)v20 && !_InterlockedDecrement((volatile signed __int32 *)v20) ) QArrayData::deallocate(v20, 2LL, 8LL); v4 = *(QObject **)QList<QWidget *>::operator[](&v22, 0LL); v5 = *(QObject **)QList<QWidget *>::operator[](&v22, 1LL); v6 = (QPropertyAnimation *)operator new(0x10uLL); QByteArray::QByteArray((QByteArray *)&v20, "geometry", -1LL); QPropertyAnimation::QPropertyAnimation(v6, v4, (const QByteArray *)&v20, 0LL); if ( (_QWORD)v20 && !_InterlockedDecrement((volatile signed __int32 *)v20) ) QArrayData::deallocate(v20, 1LL, 8LL); QVariantAnimation::setDuration(v6, 1000); v7 = *(_DWORD *)(*(_QWORD *)(*((_QWORD *)a2 + 7) + 32LL) + 32LL) - *(_DWORD *)(*(_QWORD *)(*((_QWORD *)a2 + 7) + 32LL) + 24LL); v25 = 0LL; v26 = -1; v27 = v7; QVariant::QVariant(&v20, &v25); QVariantAnimation::setStartValue(v6, (const QVariant *)&v20); QVariant::~QVariant((QVariant *)&v20); v8 = *(_DWORD **)(*((_QWORD *)a2 + 7) + 32LL); v9 = (int)(((unsigned int)(v8[7] - v8[5] + 1) >> 31) + v8[7] - v8[5] + 1) >> 1; v10 = v8[8] - v8[6]; v25 = 0LL; v26 = v9 - 1; v27 = v10; QVariant::QVariant(&v20, &v25); QVariantAnimation::setEndValue(v6, (const QVariant *)&v20); QVariant::~QVariant((QVariant *)&v20); v11 = (QPropertyAnimation *)operator new(0x10uLL); QByteArray::QByteArray((QByteArray *)&v20, "geometry", -1LL); QPropertyAnimation::QPropertyAnimation(v11, v5, (const QByteArray *)&v20, 0LL); if ( (_QWORD)v20 && !_InterlockedDecrement((volatile signed __int32 *)v20) ) QArrayData::deallocate(v20, 1LL, 8LL); QVariantAnimation::setDuration(v11, 1000); v12 = *(_DWORD **)(*((_QWORD *)a2 + 7) + 32LL); v13 = v12[7] - v12[5]; v14 = v12[8] - v12[6]; v25 = (unsigned int)(v13 + 1); v26 = v13; v27 = v14; QVariant::QVariant(&v20, &v25); QVariantAnimation::setStartValue(v11, (const QVariant *)&v20); QVariant::~QVariant((QVariant *)&v20); v15 = *(_DWORD **)(*((_QWORD *)a2 + 7) + 32LL); v16 = ((unsigned int)(v15[7] - v15[5] + 1) >> 31) + v15[7] - v15[5] + 1; v17 = v15[8] - v15[6]; v25 = (unsigned int)(v16 >> 1); v26 = (v16 & 0xFFFFFFFE) - 1; v27 = v17; QVariant::QVariant(&v20, &v25); QVariantAnimation::setEndValue(v11, (const QVariant *)&v20); QVariant::~QVariant((QVariant *)&v20); v18 = (QParallelAnimationGroup *)operator new(0x10uLL); QParallelAnimationGroup::QParallelAnimationGroup(v18, this); QAnimationGroup::addAnimation(v18, v6); QAnimationGroup::addAnimation(v18, v11); *(_QWORD *)&v20 = &QAbstractAnimation::finished; *((_QWORD *)&v20 + 1) = 0LL; v19 = operator new(0x20uLL); *(_DWORD *)v19 = 1; *(_QWORD *)(v19 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::closedoor(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl; *(_QWORD *)(v19 + 16) = this; *(_QWORD *)(v19 + 24) = a2; QObject::connectImpl(v24, v18, &v20, v18, 0LL, v19, 1LL, 0LL, &QAbstractAnimation::staticMetaObject); QMetaObject::Connection::~Connection((QMetaObject::Connection *)v24); QAbstractAnimation::start(v18, 0LL); if ( (_QWORD)v22 ) { if ( !_InterlockedDecrement((volatile signed __int32 *)v22) ) QArrayData::deallocate(v22, 8LL, 8LL); } } }
closedoor: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 CMP dword ptr [RSI + 0x4c],0x5 JNZ 0x001078ed MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RSI + 0x38] XOR EAX,EAX MOV RSI,RSP MOV qword ptr [RSI + 0x10],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSI],XMM0 LEA RCX,[RSP + 0x20] MOVAPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],RAX LAB_001075dc: MOV RDX,qword ptr [0x0010efe8] MOV R8D,0x1 CALL 0x00104570 MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x0010760f DEC.LOCK dword ptr [RAX] JNZ 0x0010760f MOV RDI,qword ptr [RSP] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104250 LAB_0010760f: LEA RDI,[RSP + 0x20] XOR ESI,ESI CALL 0x00107e66 MOV R12,qword ptr [RAX] LAB_0010761e: LEA RDI,[RSP + 0x20] MOV ESI,0x1 CALL 0x00107e66 MOV R13,qword ptr [RAX] LAB_00107630: MOV EDI,0x10 CALL 0x00104380 LAB_0010763a: MOV R15,RAX LEA RSI,[0x10a69b] MOV RDI,RSP MOV RDX,-0x1 CALL 0x001044f0 LAB_00107653: MOV RDX,RSP MOV RDI,R15 MOV RSI,R12 XOR ECX,ECX CALL 0x00104260 MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x00107684 DEC.LOCK dword ptr [RAX] JNZ 0x00107684 MOV RDI,qword ptr [RSP] MOV ESI,0x1 MOV EDX,0x8 CALL 0x00104250 LAB_00107684: MOV RDI,R15 MOV ESI,0x3e8 CALL 0x00104370 MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RAX + 0x20] SUB ECX,dword ptr [RAX + 0x18] LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],0x0 MOV dword ptr [RSI + 0x8],0xffffffff MOV dword ptr [RSI + 0xc],ECX LAB_001076b5: MOV RDI,RSP CALL 0x001043f0 LAB_001076bd: MOV RSI,RSP MOV RDI,R15 CALL 0x00104220 MOV RDI,RSP CALL 0x00104170 MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RAX + 0x1c] MOV EDX,dword ptr [RAX + 0x20] SUB ECX,dword ptr [RAX + 0x14] MOV ESI,ECX INC ESI SHR ESI,0x1f ADD ECX,ESI INC ECX SAR ECX,0x1 SUB EDX,dword ptr [RAX + 0x18] LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],0x0 DEC ECX MOV dword ptr [RSI + 0x8],ECX MOV dword ptr [RSI + 0xc],EDX LAB_00107705: MOV RDI,RSP CALL 0x001043f0 LAB_0010770d: MOV RSI,RSP MOV RDI,R15 CALL 0x001044a0 MOV RDI,RSP CALL 0x00104170 LAB_00107720: MOV EDI,0x10 CALL 0x00104380 LAB_0010772a: MOV R12,RAX LEA RSI,[0x10a69b] MOV RDI,RSP MOV RDX,-0x1 CALL 0x001044f0 LAB_00107743: MOV RDX,RSP MOV RDI,R12 MOV RSI,R13 XOR ECX,ECX CALL 0x00104260 MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x00107774 DEC.LOCK dword ptr [RAX] JNZ 0x00107774 MOV RDI,qword ptr [RSP] MOV ESI,0x1 MOV EDX,0x8 CALL 0x00104250 LAB_00107774: MOV RDI,R12 MOV ESI,0x3e8 CALL 0x00104370 MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RAX + 0x1c] MOV EDX,dword ptr [RAX + 0x20] SUB ECX,dword ptr [RAX + 0x14] LEA EDI,[RCX + 0x1] SUB EDX,dword ptr [RAX + 0x18] LEA RSI,[RSP + 0x40] MOV dword ptr [RSI],EDI MOV dword ptr [RSI + 0x4],0x0 MOV dword ptr [RSI + 0x8],ECX MOV dword ptr [RSI + 0xc],EDX LAB_001077ac: MOV RDI,RSP CALL 0x001043f0 LAB_001077b4: MOV RSI,RSP MOV RDI,R12 CALL 0x00104220 MOV RDI,RSP CALL 0x00104170 MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RAX + 0x1c] SUB ECX,dword ptr [RAX + 0x14] MOV EDX,dword ptr [RAX + 0x20] MOV ESI,ECX INC ESI SHR ESI,0x1f ADD ECX,ESI INC ECX MOV EDI,ECX SUB EDX,dword ptr [RAX + 0x18] SAR EDI,0x1 LEA RSI,[RSP + 0x40] MOV dword ptr [RSI],EDI MOV dword ptr [RSI + 0x4],0x0 AND ECX,0xfffffffe DEC ECX MOV dword ptr [RSI + 0x8],ECX MOV dword ptr [RSI + 0xc],EDX LAB_00107803: MOV RDI,RSP CALL 0x001043f0 LAB_0010780b: MOV RSI,RSP MOV RDI,R12 CALL 0x001044a0 MOV RDI,RSP CALL 0x00104170 LAB_0010781e: MOV EDI,0x10 CALL 0x00104380 LAB_00107828: MOV R13,RAX MOV RDI,RAX MOV RSI,R14 CALL 0x00104150 LAB_00107836: MOV RDI,R13 MOV RSI,R15 CALL 0x00104450 MOV RDI,R13 MOV RSI,R12 CALL 0x00104450 MOV RAX,qword ptr [0x0010eff0] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 MOV EDI,0x20 CALL 0x00104380 MOV R10D,0x1 MOV dword ptr [RAX],R10D LEA RCX,[0x107c56] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],R14 MOV qword ptr [RAX + 0x18],RBX SUB RSP,0x8 MOV R11,qword ptr [0x0010ef88] LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x8] MOV RSI,R13 MOV RCX,R13 XOR R8D,R8D MOV R9,RAX PUSH R11 PUSH 0x0 PUSH R10 CALL 0x001042a0 ADD RSP,0x20 LEA RDI,[RSP + 0x38] CALL 0x001041c0 MOV RDI,R13 XOR ESI,ESI CALL 0x001042f0 LAB_001078ca: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x001078ed DEC.LOCK dword ptr [RAX] JNZ 0x001078ed MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x8 MOV EDX,0x8 CALL 0x00104250 LAB_001078ed: ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* MainWindow::closedoor(Elevetor&) */ void __thiscall MainWindow::closedoor(MainWindow *this,Elevetor *param_1) { QObject *pQVar1; QObject *pQVar2; long lVar3; int8 *puVar4; QPropertyAnimation *pQVar5; QParallelAnimationGroup *this_00; int4 *puVar6; int iVar7; uint uVar8; QArrayData *local_78; int8 uStack_70; int8 local_68; QArrayData *local_58; int8 uStack_50; int8 local_48; Connection local_40 [8]; ulong local_38; int local_30; int local_2c; if (*(int *)(param_1 + 0x4c) == 5) { local_68 = 0; local_78 = (QArrayData *)0x0; uStack_70 = 0; local_58 = (QArrayData *)0x0; uStack_50 = 0; local_48 = 0; /* try { // try from 001075dc to 001075ed has its CatchHandler @ 0010799b */ qt_qFindChildren_helper (*(int8 *)(param_1 + 0x38),&local_78,PTR_staticMetaObject_0010efe8,&local_58,1); if (local_78 != (QArrayData *)0x0) { LOCK(); *(int *)local_78 = *(int *)local_78 + -1; UNLOCK(); if (*(int *)local_78 == 0) { QArrayData::deallocate(local_78,2,8); } } /* try { // try from 0010760f to 0010761a has its CatchHandler @ 00107999 */ puVar4 = (int8 *)QList<QWidget*>::operator[]((QList<QWidget*> *)&local_58,0); pQVar1 = (QObject *)*puVar4; /* try { // try from 0010761e to 0010762c has its CatchHandler @ 00107997 */ puVar4 = (int8 *)QList<QWidget*>::operator[]((QList<QWidget*> *)&local_58,1); pQVar2 = (QObject *)*puVar4; /* try { // try from 00107630 to 00107639 has its CatchHandler @ 001079be */ pQVar5 = (QPropertyAnimation *)operator_new(0x10); /* try { // try from 0010763a to 00107652 has its CatchHandler @ 00107985 */ QByteArray::QByteArray((QByteArray *)&local_78,"geometry",-1); /* try { // try from 00107653 to 00107662 has its CatchHandler @ 0010795f */ QPropertyAnimation::QPropertyAnimation(pQVar5,pQVar1,(QByteArray *)&local_78,(QObject *)0x0); if (local_78 != (QArrayData *)0x0) { LOCK(); *(int *)local_78 = *(int *)local_78 + -1; UNLOCK(); if (*(int *)local_78 == 0) { QArrayData::deallocate(local_78,1,8); } } /* try { // try from 00107684 to 00107690 has its CatchHandler @ 001079be */ QVariantAnimation::setDuration((int)pQVar5); local_2c = *(int *)(*(long *)(*(long *)(param_1 + 0x38) + 0x20) + 0x20) - *(int *)(*(long *)(*(long *)(param_1 + 0x38) + 0x20) + 0x18); local_38 = 0; local_30 = 0xffffffff; /* try { // try from 001076b5 to 001076bc has its CatchHandler @ 0010795d */ QVariant::QVariant((QVariant *)&local_78,(QRect *)&local_38); /* try { // try from 001076bd to 001076c7 has its CatchHandler @ 00107950 */ QVariantAnimation::setStartValue((QVariant *)pQVar5); QVariant::~QVariant((QVariant *)&local_78); lVar3 = *(long *)(*(long *)(param_1 + 0x38) + 0x20); iVar7 = *(int *)(lVar3 + 0x1c) - *(int *)(lVar3 + 0x14); local_2c = *(int *)(lVar3 + 0x20) - *(int *)(lVar3 + 0x18); local_38 = 0; local_30 = ((iVar7 - (iVar7 + 1 >> 0x1f)) + 1 >> 1) + -1; /* try { // try from 00107705 to 0010770c has its CatchHandler @ 0010794e */ QVariant::QVariant((QVariant *)&local_78,(QRect *)&local_38); /* try { // try from 0010770d to 00107717 has its CatchHandler @ 0010794c */ QVariantAnimation::setEndValue((QVariant *)pQVar5); QVariant::~QVariant((QVariant *)&local_78); /* try { // try from 00107720 to 00107729 has its CatchHandler @ 001079bc */ pQVar5 = (QPropertyAnimation *)operator_new(0x10); /* try { // try from 0010772a to 00107742 has its CatchHandler @ 0010793f */ QByteArray::QByteArray((QByteArray *)&local_78,"geometry",-1); /* try { // try from 00107743 to 00107752 has its CatchHandler @ 00107919 */ QPropertyAnimation::QPropertyAnimation(pQVar5,pQVar2,(QByteArray *)&local_78,(QObject *)0x0); if (local_78 != (QArrayData *)0x0) { LOCK(); *(int *)local_78 = *(int *)local_78 + -1; UNLOCK(); if (*(int *)local_78 == 0) { QArrayData::deallocate(local_78,1,8); } } /* try { // try from 00107774 to 00107780 has its CatchHandler @ 001079bc */ QVariantAnimation::setDuration((int)pQVar5); lVar3 = *(long *)(*(long *)(param_1 + 0x38) + 0x20); local_30 = *(int *)(lVar3 + 0x1c) - *(int *)(lVar3 + 0x14); local_2c = *(int *)(lVar3 + 0x20) - *(int *)(lVar3 + 0x18); local_38 = (ulong)(local_30 + 1); /* try { // try from 001077ac to 001077b3 has its CatchHandler @ 00107914 */ QVariant::QVariant((QVariant *)&local_78,(QRect *)&local_38); /* try { // try from 001077b4 to 001077be has its CatchHandler @ 00107912 */ QVariantAnimation::setStartValue((QVariant *)pQVar5); QVariant::~QVariant((QVariant *)&local_78); lVar3 = *(long *)(*(long *)(param_1 + 0x38) + 0x20); iVar7 = *(int *)(lVar3 + 0x1c) - *(int *)(lVar3 + 0x14); uVar8 = (iVar7 - (iVar7 + 1 >> 0x1f)) + 1; local_2c = *(int *)(lVar3 + 0x20) - *(int *)(lVar3 + 0x18); local_38 = (ulong)(uint)((int)uVar8 >> 1); local_30 = (uVar8 & 0xfffffffe) - 1; /* try { // try from 00107803 to 0010780a has its CatchHandler @ 0010790d */ QVariant::QVariant((QVariant *)&local_78,(QRect *)&local_38); /* try { // try from 0010780b to 00107815 has its CatchHandler @ 0010790b */ QVariantAnimation::setEndValue((QVariant *)pQVar5); QVariant::~QVariant((QVariant *)&local_78); /* try { // try from 0010781e to 00107827 has its CatchHandler @ 001079c0 */ this_00 = (QParallelAnimationGroup *)operator_new(0x10); /* try { // try from 00107828 to 00107835 has its CatchHandler @ 001078fb */ QParallelAnimationGroup::QParallelAnimationGroup(this_00,(QObject *)this); /* try { // try from 00107836 to 001078c9 has its CatchHandler @ 001079c0 */ QAnimationGroup::addAnimation((QAbstractAnimation *)this_00); QAnimationGroup::addAnimation((QAbstractAnimation *)this_00); local_78 = (QArrayData *)PTR_finished_0010eff0; uStack_70 = 0; puVar6 = (int4 *)operator_new(0x20); *puVar6 = 1; *(code **)(puVar6 + 2) = QtPrivate:: QFunctorSlotObject<MainWindow::closedoor(Elevetor&)::$_0,0,QtPrivate::List<>,void>::impl; *(MainWindow **)(puVar6 + 4) = this; *(Elevetor **)(puVar6 + 6) = param_1; QObject::connectImpl (local_40,this_00,&local_78,this_00,0,puVar6,1,0,PTR_staticMetaObject_0010ef88); QMetaObject::Connection::~Connection(local_40); QAbstractAnimation::start(this_00,0); if (local_58 != (QArrayData *)0x0) { LOCK(); *(int *)local_58 = *(int *)local_58 + -1; UNLOCK(); if (*(int *)local_58 == 0) { QArrayData::deallocate(local_58,8,8); } } } return; }
36,001
my_collation_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_collation_get_by_name(MY_CHARSET_LOADER *loader, const char *name, myf flags) { uint cs_number; CHARSET_INFO *cs; my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_collation_number(name,flags); my_charset_loader_init_mysys(loader); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file); } return cs; }
O0
c
my_collation_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movq %rdx, -0x238(%rbp) leaq 0x364b80(%rip), %rdi # 0x38f6c4 leaq -0x90b(%rip), %rsi # 0x2a240 callq 0x24270 movq -0x230(%rbp), %rdi movq -0x238(%rbp), %rsi callq 0x2a190 movl %eax, -0x23c(%rbp) movq -0x228(%rbp), %rdi callq 0x29860 cmpl $0x0, -0x23c(%rbp) je 0x2aba0 movq -0x228(%rbp), %rdi movl -0x23c(%rbp), %esi movq -0x238(%rbp), %rdx callq 0x2a890 movq %rax, -0x250(%rbp) jmp 0x2abab xorl %eax, %eax movq %rax, -0x250(%rbp) jmp 0x2abab movq -0x250(%rbp), %rax movq %rax, -0x248(%rbp) cmpq $0x0, -0x248(%rbp) jne 0x2ac0e movq -0x238(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2ac0e leaq -0x220(%rbp), %rdi callq 0x29f00 movq %rax, %rdi leaq 0x4fb8b(%rip), %rsi # 0x7a775 callq 0x242b0 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x1c, %edi movl $0x4, %esi movb $0x0, %al callq 0x2ed80 movq -0x248(%rbp), %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2ac3e movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x242e0 nopw %cs:(%rax,%rax)
my_collation_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_238], rdx lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov rsi, [rbp+var_238] call get_collation_number mov [rbp+var_23C], eax mov rdi, [rbp+var_228] call my_charset_loader_init_mysys cmp [rbp+var_23C], 0 jz short loc_2ABA0 mov rdi, [rbp+var_228] mov esi, [rbp+var_23C] mov rdx, [rbp+var_238] call get_internal_charset mov [rbp+var_250], rax jmp short loc_2ABAB loc_2ABA0: xor eax, eax mov [rbp+var_250], rax jmp short $+2 loc_2ABAB: mov rax, [rbp+var_250] mov [rbp+var_248], rax cmp [rbp+var_248], 0 jnz short loc_2AC0E mov rax, [rbp+var_238] and rax, 10h cmp rax, 0 jz short loc_2AC0E lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 1Ch mov esi, 4 mov al, 0 call my_error loc_2AC0E: mov rax, [rbp+var_248] mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2AC3E mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_2AC3E: call ___stack_chk_fail
long long my_collation_get_by_name(long long a1, long long a2, long long a3) { long long charsets_dir; // rax int v4; // r8d int v5; // r9d long long internal_charset; // [rsp+10h] [rbp-250h] unsigned int collation_number; // [rsp+24h] [rbp-23Ch] _BYTE v10[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v11; // [rsp+258h] [rbp-8h] v11 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); collation_number = get_collation_number(a2, a3); my_charset_loader_init_mysys(a1); if ( collation_number ) internal_charset = get_internal_charset(a1, collation_number, a3); else internal_charset = 0LL; if ( !internal_charset && (a3 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v10); stpcpy(charsets_dir, "Index.xml"); my_error(28, 4, a2, (unsigned int)v10, v4, v5); } return internal_charset; }
my_collation_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV qword ptr [RBP + -0x238],RDX LEA RDI,[0x48f6c4] LEA RSI,[0x12a240] CALL 0x00124270 MOV RDI,qword ptr [RBP + -0x230] MOV RSI,qword ptr [RBP + -0x238] CALL 0x0012a190 MOV dword ptr [RBP + -0x23c],EAX MOV RDI,qword ptr [RBP + -0x228] CALL 0x00129860 CMP dword ptr [RBP + -0x23c],0x0 JZ 0x0012aba0 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x23c] MOV RDX,qword ptr [RBP + -0x238] CALL 0x0012a890 MOV qword ptr [RBP + -0x250],RAX JMP 0x0012abab LAB_0012aba0: XOR EAX,EAX MOV qword ptr [RBP + -0x250],RAX JMP 0x0012abab LAB_0012abab: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x248],RAX CMP qword ptr [RBP + -0x248],0x0 JNZ 0x0012ac0e MOV RAX,qword ptr [RBP + -0x238] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012ac0e LEA RDI,[RBP + -0x220] CALL 0x00129f00 MOV RDI,RAX LEA RSI,[0x17a775] CALL 0x001242b0 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x1c MOV ESI,0x4 MOV AL,0x0 CALL 0x0012ed80 LAB_0012ac0e: MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012ac3e MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_0012ac3e: CALL 0x001242e0
long my_collation_get_by_name(int8 param_1,int8 param_2,ulong param_3) { int iVar1; char *__dest; long in_FS_OFFSET; long local_258; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_collation_number(param_2,param_3); my_charset_loader_init_mysys(param_1); if (iVar1 == 0) { local_258 = 0; } else { local_258 = get_internal_charset(param_1,iVar1,param_3); } if ((local_258 == 0) && ((param_3 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x1c,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_258; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
36,002
clip_free
monkey531[P]llama/examples/llava/clip.cpp
void clip_free(clip_ctx * ctx) { ggml_free(ctx->ctx_data); gguf_free(ctx->ctx_gguf); ggml_backend_buffer_free(ctx->params_buffer); ggml_backend_free(ctx->backend); ggml_gallocr_free(ctx->compute_alloc); delete ctx; }
O0
cpp
clip_free: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x368(%rax), %rdi callq 0x61700 movq 0x10(%rsp), %rax movq 0x360(%rax), %rdi callq 0x61a60 movq 0x10(%rsp), %rax movq 0x388(%rax), %rdi callq 0x62460 movq 0x10(%rsp), %rax movq 0x390(%rax), %rdi callq 0x61f90 movq 0x10(%rsp), %rax movq 0x398(%rax), %rdi callq 0x62a50 movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, %rax je 0x7fda7 movq 0x8(%rsp), %rdi callq 0xa5b30 movq 0x8(%rsp), %rdi movl $0x3a8, %esi # imm = 0x3A8 callq 0x61240 addq $0x18, %rsp retq nopl (%rax)
clip_free: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov rdi, [rax+368h] call _ggml_free mov rax, [rsp+18h+var_8] mov rdi, [rax+360h] call _gguf_free mov rax, [rsp+18h+var_8] mov rdi, [rax+388h] call _ggml_backend_buffer_free mov rax, [rsp+18h+var_8] mov rdi, [rax+390h] call _ggml_backend_free mov rax, [rsp+18h+var_8] mov rdi, [rax+398h] call _ggml_gallocr_free mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax cmp rax, 0 jz short loc_7FDA7 mov rdi, [rsp+18h+var_10]; this call _ZN8clip_ctxD2Ev; clip_ctx::~clip_ctx() mov rdi, [rsp+18h+var_10]; void * mov esi, 3A8h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7FDA7: add rsp, 18h retn
void clip_free(clip_ctx *a1) { ggml_free(*((_QWORD *)a1 + 109)); gguf_free(*((_QWORD *)a1 + 108)); ggml_backend_buffer_free(*((_QWORD *)a1 + 113)); ggml_backend_free(*((_QWORD *)a1 + 114)); ggml_gallocr_free(*((_QWORD *)a1 + 115)); if ( a1 ) { clip_ctx::~clip_ctx(a1); operator delete(a1, 0x3A8uLL); } }
clip_free: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x368] CALL 0x00161700 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x360] CALL 0x00161a60 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x388] CALL 0x00162460 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x390] CALL 0x00161f90 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x398] CALL 0x00162a50 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX CMP RAX,0x0 JZ 0x0017fda7 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001a5b30 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x3a8 CALL 0x00161240 LAB_0017fda7: ADD RSP,0x18 RET
void clip_free(clip_ctx *param_1) { ggml_free(*(int8 *)(param_1 + 0x368)); gguf_free(*(int8 *)(param_1 + 0x360)); ggml_backend_buffer_free(*(int8 *)(param_1 + 0x388)); ggml_backend_free(*(int8 *)(param_1 + 0x390)); ggml_gallocr_free(*(int8 *)(param_1 + 0x398)); if (param_1 != (clip_ctx *)0x0) { clip_ctx::~clip_ctx(param_1); operator_delete(param_1,0x3a8); } return; }
36,003
my_snprintf_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_utf32(to, n, fmt, args); va_end(args); return ret; }
O0
c
my_snprintf_utf32: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp testb %al, %al je 0x6bb7b movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0xf0(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x6fc70 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0xf0, %rsp popq %rbp retq
my_snprintf_utf32: push rbp mov rbp, rsp sub rsp, 0F0h test al, al jz short loc_6BB7B movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_6BB7B: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_F0] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf_utf32 mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 0F0h pop rbp retn
long long my_snprintf_utf32( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-F0h] BYREF long long v17; // [rsp+20h] [rbp-D0h] long long v18; // [rsp+28h] [rbp-C8h] __m128 v19; // [rsp+30h] [rbp-C0h] __m128 v20; // [rsp+40h] [rbp-B0h] __m128 v21; // [rsp+50h] [rbp-A0h] __m128 v22; // [rsp+60h] [rbp-90h] __m128 v23; // [rsp+70h] [rbp-80h] __m128 v24; // [rsp+80h] [rbp-70h] __m128 v25; // [rsp+90h] [rbp-60h] __m128 v26; // [rsp+A0h] [rbp-50h] _DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF char *v28; // [rsp+B8h] [rbp-38h] char *v29; // [rsp+C0h] [rbp-30h] long long v30; // [rsp+D0h] [rbp-20h] long long v31; // [rsp+D8h] [rbp-18h] long long v32; // [rsp+E0h] [rbp-10h] long long v33; // [rsp+E8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf_utf32(a2, a3, a4, v27); }
my_snprintf_utf32: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 TEST AL,AL JZ 0x0016bb7b MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_0016bb7b: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0xf0] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x0016fc70 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0xf0 POP RBP RET
int8 my_snprintf_utf32(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_f8 [32]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_38 = local_f8; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_d8 = param_13; local_d0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf_utf32(param_10,param_11,param_12,&local_48); return uVar1; }
36,004
ftxui::(anonymous namespace)::Focus::ComputeRequirement()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/frame.cpp
void ComputeRequirement() override { Select::ComputeRequirement(); requirement_.selection = Requirement::FOCUSED; }
O3
cpp
ftxui::(anonymous namespace)::Focus::ComputeRequirement(): pushq %rbx movq %rdi, %rbx callq 0x23e7c movq 0x8(%rbx), %rax movq (%rax), %rax movups 0x20(%rax), %xmm0 movups 0x30(%rax), %xmm1 movq 0x40(%rax), %rax movq %rax, 0x40(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm1, 0x30(%rbx) movl $0x0, 0x44(%rbx) movl 0x20(%rbx), %eax movl 0x24(%rbx), %ecx decl %eax movl %eax, 0x40(%rbx) decl %ecx movl %ecx, 0x48(%rbx) movq $0x2, 0x38(%rbx) popq %rbx retq nop
_ZN5ftxui12_GLOBAL__N_15Focus18ComputeRequirementEv: push rbx mov rbx, rdi call _ZN5ftxui4Node18ComputeRequirementEv; ftxui::Node::ComputeRequirement(void) mov rax, [rbx+8] mov rax, [rax] movups xmm0, xmmword ptr [rax+20h] movups xmm1, xmmword ptr [rax+30h] mov rax, [rax+40h] mov [rbx+40h], rax movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm1 mov dword ptr [rbx+44h], 0 mov eax, [rbx+20h] mov ecx, [rbx+24h] dec eax mov [rbx+40h], eax dec ecx mov [rbx+48h], ecx mov qword ptr [rbx+38h], 2 pop rbx retn
long long ftxui::`anonymous namespace'::Focus::ComputeRequirement(ftxui::_anonymous_namespace_::Focus *this) { long long v1; // rax __int128 v2; // xmm0 __int128 v3; // xmm1 int v4; // ecx long long result; // rax ftxui::Node::ComputeRequirement(this); v1 = **((_QWORD **)this + 1); v2 = *(_OWORD *)(v1 + 32); v3 = *(_OWORD *)(v1 + 48); *((_QWORD *)this + 8) = *(_QWORD *)(v1 + 64); *((_OWORD *)this + 2) = v2; *((_OWORD *)this + 3) = v3; *((_DWORD *)this + 17) = 0; v4 = *((_DWORD *)this + 9); result = (unsigned int)(*((_DWORD *)this + 8) - 1); *((_DWORD *)this + 16) = result; *((_DWORD *)this + 18) = v4 - 1; *((_QWORD *)this + 7) = 2LL; return result; }
ComputeRequirement: PUSH RBX MOV RBX,RDI CALL 0x00123e7c MOV RAX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX] MOVUPS XMM0,xmmword ptr [RAX + 0x20] MOVUPS XMM1,xmmword ptr [RAX + 0x30] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x40],RAX MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM1 MOV dword ptr [RBX + 0x44],0x0 MOV EAX,dword ptr [RBX + 0x20] MOV ECX,dword ptr [RBX + 0x24] DEC EAX MOV dword ptr [RBX + 0x40],EAX DEC ECX MOV dword ptr [RBX + 0x48],ECX MOV qword ptr [RBX + 0x38],0x2 POP RBX RET
/* ftxui::(anonymous namespace)::Focus::ComputeRequirement() */ void __thiscall ftxui::(anonymous_namespace)::Focus::ComputeRequirement(Focus *this) { long lVar1; int8 uVar2; int8 uVar3; int8 uVar4; int8 uVar5; Node::ComputeRequirement((Node *)this); lVar1 = **(long **)(this + 8); uVar2 = *(int8 *)(lVar1 + 0x20); uVar3 = *(int8 *)(lVar1 + 0x28); uVar4 = *(int8 *)(lVar1 + 0x30); uVar5 = *(int8 *)(lVar1 + 0x38); *(int8 *)(this + 0x40) = *(int8 *)(lVar1 + 0x40); *(int8 *)(this + 0x20) = uVar2; *(int8 *)(this + 0x28) = uVar3; *(int8 *)(this + 0x30) = uVar4; *(int8 *)(this + 0x38) = uVar5; *(int4 *)(this + 0x44) = 0; *(int *)(this + 0x40) = *(int *)(this + 0x20) + -1; *(int *)(this + 0x48) = *(int *)(this + 0x24) + -1; *(int8 *)(this + 0x38) = 2; return; }
36,005
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
monkey531[P]llama/common/minja.hpp
ForTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, location, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O2
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %rbx movq %r9, %r14 movq %r8, %r15 movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %rbx pushq $0x6 popq %rsi callq 0x622b6 leaq 0x8ab79(%rip), %rax # 0xfcc20 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r15, %rsi callq 0x3a716 movb 0x28(%rsp), %al movq 0x20(%rsp), %rcx andq $0x0, 0x50(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x48(%rbx) andq $0x0, (%r14) andq $0x0, 0x60(%rbx) movups (%rcx), %xmm0 andq $0x0, 0x8(%rcx) movups %xmm0, 0x58(%rbx) andq $0x0, (%rcx) movb %al, 0x68(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x72904 movq %r14, %rdi callq 0x23fb0
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push rbx mov r14, r9 mov r15, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov rbx, rdi push 6 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+18h+arg_8] mov rcx, [rsp+18h+arg_0] and qword ptr [rbx+50h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+48h], xmm0 and qword ptr [r14], 0 and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [rcx] and qword ptr [rcx+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [rcx], 0 mov [rbx+68h], al pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN5minja13TemplateTokenD2Ev; minja::TemplateToken::~TemplateToken() mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, long long a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 minja::TemplateToken::TemplateToken(a1, 6, a2, a3, a4); *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector((_QWORD *)(a1 + 48), a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV RBX,RDI PUSH 0x6 POP RSI CALL 0x001622b6 LEA RAX,[0x1fcc20] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_001720b2: MOV RSI,R15 CALL 0x0013a716 LAB_001720ba: MOV AL,byte ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 AND qword ptr [R14],0x0 AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [RCX] AND qword ptr [RCX + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [RCX],0x0 MOV byte ptr [RBX + 0x68],AL POP RBX POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,6,param_1,param_3,param_4); *(int ***)this = &PTR__ForTemplateToken_001fcc30; /* try { // try from 001720b2 to 001720b9 has its CatchHandler @ 001720f7 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar1 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar1; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar1 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar1; *param_7 = 0; this[0x68] = param_8; return; }
36,006
fmt::v11::vformat[abi:cxx11](fmt::v11::basic_string_view<char>, fmt::v11::basic_format_args<fmt::v11::context>)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format-inl.h
FMT_FUNC auto vformat(string_view fmt, format_args args) -> std::string { // Don't optimize the "{}" case to keep the binary size small and because it // can be better optimized in fmt::format anyway. auto buffer = memory_buffer(); detail::vformat_to(buffer, fmt, args); return to_string(buffer); }
O1
c
fmt::v11::vformat[abi:cxx11](fmt::v11::basic_string_view<char>, fmt::v11::basic_format_args<fmt::v11::context>): pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %rdi, %rbx xorps %xmm0, %xmm0 leaq 0x20(%rsp), %r14 movaps %xmm0, -0x20(%r14) leaq 0x23e2(%rip), %rax # 0x3fbfe movq %rax, -0x8(%r14) movq %r14, -0x20(%r14) movq $0x1f4, -0x10(%r14) # imm = 0x1F4 movq %rsp, %rdi xorl %r9d, %r9d callq 0x3da59 movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %rbx, %rdi callq 0x1a83c movq (%rsp), %rdi cmpq %r14, %rdi je 0x3d860 callq 0xfc50 movq %rbx, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x3d87f callq 0xfc50 movq %rbx, %rdi callq 0x101c0
_ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE: push r14 push rbx sub rsp, 238h mov rbx, rdi xorps xmm0, xmm0 lea r14, [rsp+248h+var_228] movaps xmmword ptr [r14-20h], xmm0 lea rax, _ZN3fmt3v1119basic_memory_bufferIcLm500ENS0_6detail9allocatorIcEEE4growERNS2_6bufferIcEEm; fmt::v11::basic_memory_buffer<char,500ul,fmt::v11::detail::allocator<char>>::grow(fmt::v11::detail::buffer<char> &,ulong) mov [r14-8], rax mov [r14-20h], r14 mov qword ptr [r14-10h], 1F4h mov rdi, rsp; int xor r9d, r9d call _ZN3fmt3v116detail10vformat_toERNS1_6bufferIcEENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEENS1_10locale_refE; fmt::v11::detail::vformat_to(fmt::v11::detail::buffer<char> &,fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>,fmt::v11::detail::locale_ref) mov rsi, [rsp+248h+var_248] mov rdx, [rsp+248h+var_240] add rdx, rsi lea rax, [rbx+10h] mov [rbx], rax mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [rsp+248h+var_248] cmp rdi, r14 jz short loc_3D860 call _free loc_3D860: mov rax, rbx add rsp, 238h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+0] cmp rdi, r14 jz short loc_3D87F call _free loc_3D87F: mov rdi, rbx call __Unwind_Resume
_QWORD * fmt::v11::vformat[abi:cxx11](_QWORD *a1, char *a2) { _BYTE *v2; // rsi long long v3; // rdx __int128 v5; // [rsp+0h] [rbp-248h] BYREF long long v6; // [rsp+10h] [rbp-238h] long long ( *v7)(); // [rsp+18h] [rbp-230h] _BYTE v8[552]; // [rsp+20h] [rbp-228h] BYREF v5 = 0LL; v7 = fmt::v11::basic_memory_buffer<char,500ul,fmt::v11::detail::allocator<char>>::grow; *(_QWORD *)&v5 = v8; v6 = 500LL; fmt::v11::detail::vformat_to((int)&v5, a2); v2 = (_BYTE *)v5; v3 = v5 + *((_QWORD *)&v5 + 1); *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, v2, v3); if ( (_BYTE *)v5 != v8 ) free(); return a1; }
vformat[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x238 MOV RBX,RDI XORPS XMM0,XMM0 LEA R14,[RSP + 0x20] MOVAPS xmmword ptr [R14 + -0x20],XMM0 LEA RAX,[0x13fbfe] MOV qword ptr [R14 + -0x8],RAX MOV qword ptr [R14 + -0x20],R14 MOV qword ptr [R14 + -0x10],0x1f4 LAB_0013d82c: MOV RDI,RSP XOR R9D,R9D CALL 0x0013da59 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RDI,RBX CALL 0x0011a83c LAB_0013d852: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x0013d860 CALL 0x0010fc50 LAB_0013d860: MOV RAX,RBX ADD RSP,0x238 POP RBX POP R14 RET
/* fmt::v11::vformat[abi:cxx11](fmt::v11::basic_string_view<char>, fmt::v11::basic_format_args<fmt::v11::context>) */ long * fmt::v11::vformat_abi_cxx11_(long *param_1) { int1 *local_248; long lStack_240; int8 local_238; code *local_230; int1 local_228 [536]; lStack_240 = 0; local_230 = basic_memory_buffer<char,500ul,fmt::v11::detail::allocator<char>>::grow; local_238 = 500; local_248 = local_228; /* try { // try from 0013d82c to 0013d851 has its CatchHandler @ 0013d86e */ detail::vformat_to(&local_248); *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,local_248,local_248 + lStack_240); if (local_248 != local_228) { free(local_248); } return param_1; }
36,007
sp_get_polygon_mbr
eloqsql/storage/maria/ma_sp_key.c
static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_linear_rings; uint n_points; n_linear_rings = uint4korr((*wkb)); (*wkb) += 4; for (; n_linear_rings > 0; --n_linear_rings) { n_points = uint4korr((*wkb)); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } } return 0; }
O3
c
sp_get_polygon_mbr: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movl (%rcx), %eax addq $0x4, %rcx movq %rcx, (%rdi) testl %eax, %eax je 0x71da0 addq $-0x8, %rsi movq (%rdi), %r8 movl (%r8), %ecx addq $0x4, %r8 movq %r8, (%rdi) testl %ecx, %ecx je 0x71d9c movb $0x1, %r8b xorl %r9d, %r9d movq (%rdi), %r10 cmpq %rsi, %r10 ja 0x71da4 movsd (%r10), %xmm0 addq $0x8, %r10 movq %r10, (%rdi) movsd (%rdx,%r9), %xmm1 ucomisd %xmm0, %xmm1 jbe 0x71d73 movsd %xmm0, (%rdx,%r9) ucomisd 0x8(%rdx,%r9), %xmm0 jbe 0x71d86 orq $0x8, %r9 movsd %xmm0, (%rdx,%r9) movl $0x10, %r9d testb $0x1, %r8b movl $0x0, %r8d jne 0x71d4d decl %ecx jne 0x71d47 decl %eax jne 0x71d36 xorl %eax, %eax jmp 0x71da9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq nop
sp_get_polygon_mbr: push rbp mov rbp, rsp mov rcx, [rdi] mov eax, [rcx] add rcx, 4 mov [rdi], rcx test eax, eax jz short loc_71DA0 add rsi, 0FFFFFFFFFFFFFFF8h loc_71D36: mov r8, [rdi] mov ecx, [r8] add r8, 4 mov [rdi], r8 test ecx, ecx jz short loc_71D9C loc_71D47: mov r8b, 1 xor r9d, r9d loc_71D4D: mov r10, [rdi] cmp r10, rsi ja short loc_71DA4 movsd xmm0, qword ptr [r10] add r10, 8 mov [rdi], r10 movsd xmm1, qword ptr [rdx+r9] ucomisd xmm1, xmm0 jbe short loc_71D73 movsd qword ptr [rdx+r9], xmm0 loc_71D73: ucomisd xmm0, qword ptr [rdx+r9+8] jbe short loc_71D86 or r9, 8 movsd qword ptr [rdx+r9], xmm0 loc_71D86: mov r9d, 10h test r8b, 1 mov r8d, 0 jnz short loc_71D4D dec ecx jnz short loc_71D47 loc_71D9C: dec eax jnz short loc_71D36 loc_71DA0: xor eax, eax jmp short loc_71DA9 loc_71DA4: mov eax, 0FFFFFFFFh loc_71DA9: pop rbp retn
long long sp_get_polygon_mbr(double **a1, long long a2, long long a3) { int v3; // eax unsigned long long v4; // rsi int v5; // ecx char v6; // r8 long long v7; // r9 double *v8; // r10 double v9; // xmm0_8 bool v10; // zf v3 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( v3 ) { v4 = a2 - 8; do { v5 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( v5 ) { while ( 2 ) { v6 = 1; v7 = 0LL; do { v8 = *a1; if ( (unsigned long long)*a1 > v4 ) return 0xFFFFFFFFLL; v9 = *v8; *a1 = v8 + 1; if ( *(double *)(a3 + v7) > v9 ) *(double *)(a3 + v7) = v9; if ( v9 > *(double *)(a3 + v7 + 8) ) *(double *)(a3 + (v7 | 8)) = v9; v7 = 16LL; v10 = (v6 & 1) == 0; v6 = 0; } while ( !v10 ); if ( --v5 ) continue; break; } } --v3; } while ( v3 ); } return 0LL; }
sp_get_polygon_mbr: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV EAX,dword ptr [RCX] ADD RCX,0x4 MOV qword ptr [RDI],RCX TEST EAX,EAX JZ 0x00171da0 ADD RSI,-0x8 LAB_00171d36: MOV R8,qword ptr [RDI] MOV ECX,dword ptr [R8] ADD R8,0x4 MOV qword ptr [RDI],R8 TEST ECX,ECX JZ 0x00171d9c LAB_00171d47: MOV R8B,0x1 XOR R9D,R9D LAB_00171d4d: MOV R10,qword ptr [RDI] CMP R10,RSI JA 0x00171da4 MOVSD XMM0,qword ptr [R10] ADD R10,0x8 MOV qword ptr [RDI],R10 MOVSD XMM1,qword ptr [RDX + R9*0x1] UCOMISD XMM1,XMM0 JBE 0x00171d73 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_00171d73: UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8] JBE 0x00171d86 OR R9,0x8 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_00171d86: MOV R9D,0x10 TEST R8B,0x1 MOV R8D,0x0 JNZ 0x00171d4d DEC ECX JNZ 0x00171d47 LAB_00171d9c: DEC EAX JNZ 0x00171d36 LAB_00171da0: XOR EAX,EAX JMP 0x00171da9 LAB_00171da4: MOV EAX,0xffffffff LAB_00171da9: POP RBP RET
int8 sp_get_polygon_mbr(int8 *param_1,long param_2,long param_3) { double dVar1; double *pdVar2; bool bVar3; int iVar4; int iVar5; bool bVar6; ulong uVar7; iVar4 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; if (iVar4 != 0) { do { iVar5 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; for (; iVar5 != 0; iVar5 = iVar5 + -1) { uVar7 = 0; bVar3 = true; do { bVar6 = bVar3; pdVar2 = (double *)*param_1; if ((double *)(param_2 + -8) < pdVar2) { return 0xffffffff; } dVar1 = *pdVar2; *param_1 = pdVar2 + 1; if (dVar1 < *(double *)(param_3 + uVar7)) { *(double *)(param_3 + uVar7) = dVar1; } pdVar2 = (double *)(param_3 + 8 + uVar7); if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) { *(double *)(param_3 + (uVar7 | 8)) = dVar1; } uVar7 = 0x10; bVar3 = false; } while (bVar6); } iVar4 = iVar4 + -1; } while (iVar4 != 0); } return 0; }
36,008
Catch::Matchers::EndsWith(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Catch::CaseSensitive)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
EndsWithMatcher EndsWith( std::string const& str, CaseSensitive caseSensitivity ) { return EndsWithMatcher( CasedString( str, caseSensitivity) ); }
O3
cpp
Catch::Matchers::EndsWith(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Catch::CaseSensitive): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %rsp, %r14 movq %r14, %rdi callq 0x658d2 movq %rbx, %rdi movq %r14, %rsi callq 0x65c62 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x66023 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6604c movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, %rdi callq 0x17740
_ZN5Catch8Matchers8EndsWithERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13CaseSensitiveE: push r14 push rbx sub rsp, 28h mov rbx, rdi mov r14, rsp mov rdi, r14 call _ZN5Catch8Matchers11CasedStringC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13CaseSensitiveE; Catch::Matchers::CasedString::CasedString(std::string const&,Catch::CaseSensitive) mov rdi, rbx; this mov rsi, r14; Catch::Matchers::CasedString * call _ZN5Catch8Matchers15EndsWithMatcherC2ERKNS0_11CasedStringE; Catch::Matchers::EndsWithMatcher::EndsWithMatcher(Catch::Matchers::CasedString const&) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_66023 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_66023: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6604C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6604C: mov rdi, rbx call __Unwind_Resume
Catch::Matchers::EndsWithMatcher * Catch::Matchers::EndsWith( Catch::Matchers::EndsWithMatcher *this, long long a2, int a3) { int v4; // [rsp+0h] [rbp-38h] BYREF long long *v5; // [rsp+8h] [rbp-30h] long long v6; // [rsp+18h] [rbp-20h] BYREF Catch::Matchers::CasedString::CasedString(&v4, a2, a3); Catch::Matchers::EndsWithMatcher::EndsWithMatcher(this, (const Catch::Matchers::CasedString *)&v4); if ( v5 != &v6 ) operator delete(v5, v6 + 1); return this; }
EndsWith: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R14,RSP MOV RDI,R14 CALL 0x001658d2 LAB_00165ffd: MOV RDI,RBX MOV RSI,R14 CALL 0x00165c62 LAB_00166008: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00166023 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_00166023: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* Catch::Matchers::EndsWith(std::__cxx11::string const&, Catch::CaseSensitive) */ EndsWithMatcher * Catch::Matchers::EndsWith(EndsWithMatcher *param_1) { CasedString aCStack_38 [8]; long *local_30; long local_20 [2]; CasedString::CasedString(aCStack_38); /* try { // try from 00165ffd to 00166007 has its CatchHandler @ 0016602e */ EndsWithMatcher::EndsWithMatcher(param_1,aCStack_38); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } return param_1; }
36,009
my_longlong10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; *dst++= '-'; len--; sign= 1; } } e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (uval == 0) { *--p= '0'; len= 1; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p = '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } len= MY_MIN(len, (size_t) (e-p)); cnv: memcpy(dst, p, len); return len+sign; }
O3
c
my_longlong10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r9 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0x4b75e negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r9 leaq -0x20(%rbp), %rbx movb $0x0, (%rbx) movl $0x1, %r14d jmp 0x4b772 movb $0x0, -0x20(%rbp) testq %r8, %r8 je 0x4b7fe leaq -0x20(%rbp), %rbx xorl %r14d, %r14d movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD testq %r8, %r8 js 0x4b786 movq %rbx, %rsi jmp 0x4b7a7 movq %r8, %rax mulq %rcx shrq $0x3, %rdx leaq -0x21(%rbp), %rsi imull $0xf6, %edx, %eax addl %eax, %r8d addb $0x30, %r8b movb %r8b, (%rsi) movq %rdx, %r8 subq %rsi, %rbx movq %r8, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r8d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi incq %rbx cmpq $0x9, %r8 movq %rdx, %r8 ja 0x4b7aa cmpq %rbx, %r9 cmovbq %r9, %rbx movq %rbx, %rdx callq 0x33240 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x4b80f addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x21(%rbp), %rsi movb $0x30, (%rsi) movl $0x1, %ebx xorl %r14d, %r14d jmp 0x4b7d8 callq 0x33370
my_longlong10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r9, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_4B75E neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r9 lea rbx, [rbp+var_20] mov byte ptr [rbx], 0 mov r14d, 1 jmp short loc_4B772 loc_4B75E: mov [rbp+var_20], 0 test r8, r8 jz loc_4B7FE lea rbx, [rbp+var_20] xor r14d, r14d loc_4B772: mov rcx, 0CCCCCCCCCCCCCCCDh test r8, r8 js short loc_4B786 mov rsi, rbx jmp short loc_4B7A7 loc_4B786: mov rax, r8 mul rcx shr rdx, 3 lea rsi, [rbp+var_21] imul eax, edx, 0F6h add r8d, eax add r8b, 30h ; '0' mov [rsi], r8b mov r8, rdx loc_4B7A7: sub rbx, rsi loc_4B7AA: mov rax, r8 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r8d add al, 30h ; '0' mov [rsi-1], al dec rsi inc rbx cmp r8, 9 mov r8, rdx ja short loc_4B7AA cmp r9, rbx cmovb rbx, r9 loc_4B7D8: mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_4B80F add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_4B7FE: lea rsi, [rbp+var_21] mov byte ptr [rsi], 30h ; '0' mov ebx, 1 xor r14d, r14d jmp short loc_4B7D8 loc_4B80F: call ___stack_chk_fail
_BYTE * my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r9 _BYTE *v6; // rdi long long v7; // r14 char *v8; // rsi _BYTE *v9; // rbx bool v10; // cc char v12; // [rsp+3Fh] [rbp-21h] BYREF _BYTE v13[8]; // [rsp+40h] [rbp-20h] BYREF unsigned long long v14; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v14 = __readfsqword(0x28u); if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v13[0] = 0; if ( !a5 ) { v8 = &v12; v12 = 48; v9 = (_BYTE *)(&dword_0 + 1); v7 = 0LL; goto LABEL_12; } v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v13[0] = 0; v7 = 1LL; } if ( (a5 & 0x8000000000000000LL) != 0LL ) { v8 = &v12; v12 = a5 % 0xA + 48; a5 /= 0xAuLL; } else { v8 = v13; } v9 = (_BYTE *)(v13 - v8); do { *--v8 = a5 % 0xA + 48; ++v9; v10 = a5 <= 9; a5 /= 0xAuLL; } while ( !v10 ); if ( v5 < v9 ) v9 = v5; LABEL_12: memcpy(v6, v8, v9); return &v9[v7]; }
my_longlong10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R9,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x0014b75e NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R9 LEA RBX,[RBP + -0x20] MOV byte ptr [RBX],0x0 MOV R14D,0x1 JMP 0x0014b772 LAB_0014b75e: MOV byte ptr [RBP + -0x20],0x0 TEST R8,R8 JZ 0x0014b7fe LEA RBX,[RBP + -0x20] XOR R14D,R14D LAB_0014b772: MOV RCX,-0x3333333333333333 TEST R8,R8 JS 0x0014b786 MOV RSI,RBX JMP 0x0014b7a7 LAB_0014b786: MOV RAX,R8 MUL RCX SHR RDX,0x3 LEA RSI,[RBP + -0x21] IMUL EAX,EDX,0xf6 ADD R8D,EAX ADD R8B,0x30 MOV byte ptr [RSI],R8B MOV R8,RDX LAB_0014b7a7: SUB RBX,RSI LAB_0014b7aa: MOV RAX,R8 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R8D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI INC RBX CMP R8,0x9 MOV R8,RDX JA 0x0014b7aa CMP R9,RBX CMOVC RBX,R9 LAB_0014b7d8: MOV RDX,RBX CALL 0x00133240 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0014b80f ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0014b7fe: LEA RSI,[RBP + -0x21] MOV byte ptr [RSI],0x30 MOV EBX,0x1 XOR R14D,R14D JMP 0x0014b7d8 LAB_0014b80f: CALL 0x00133370
long my_longlong10_to_str_8bit (int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5) { bool bVar1; ulong __n; char *__src; long lVar2; long in_FS_OFFSET; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_5 < 0 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 - 1; lVar2 = 1; } else { if (param_5 == 0) { __src = local_29; local_29[0] = '0'; __n = 1; lVar2 = 0; goto LAB_0014b7d8; } lVar2 = 0; } __src = local_29 + 1; if ((long)param_5 < 0) { local_29[0] = (char)param_5 + (char)(param_5 / 10) * -10 + '0'; __src = local_29; param_5 = param_5 / 10; } __n = (long)(local_29 + 1) - (long)__src; do { __src[-1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = __src + -1; __n = __n + 1; bVar1 = 9 < param_5; param_5 = param_5 / 10; } while (bVar1); if (param_3 < __n) { __n = param_3; } LAB_0014b7d8: local_29[1] = 0; memcpy(param_2,__src,__n); if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return __n + lVar2; }
36,010
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); }
O3
c
my_hash_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movb $0x1, %r15b cmpq $0x0, 0x18(%rdi) je 0xafba2 movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rdi), %rax movq %rax, -0x38(%rbp) movq 0x28(%rdi), %r13 movq 0x50(%rdi), %rax testq %rax, %rax je 0xaf9a3 leaq -0x58(%rbp), %r12 movq %rbx, %rdi movq %r12, %rsi xorl %edx, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0xaf9b1 movq 0x8(%r14), %rdx movq %rdx, -0x58(%rbp) movq (%r14), %rsi addq %rbx, %rsi movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movq 0x68(%r14), %rdi callq *0x58(%r14) movq 0x18(%r14), %rcx movq -0x38(%rbp), %r9 leaq (%r9,%r12), %r10 movl %r10d, %edx andl %eax, %edx shrq %r9 decl %r9d andl %r9d, %eax cmpq %rcx, %rdx cmovbl %edx, %eax movq %rax, %rdx shlq $0x4, %rdx leaq (%rdx,%r13), %rsi cmpq %rbx, 0x8(%r13,%rdx) je 0xafa13 movl (%rsi), %eax cmpq %r12, %rax je 0xafba2 movq %rsi, %rdx movq %rax, %rdi shlq $0x4, %rdi leaq (%rdi,%r13), %rsi cmpq %rbx, 0x8(%r13,%rdi) jne 0xaf9f1 jmp 0xafa15 xorl %edx, %edx decq %rcx movq %rcx, 0x18(%r14) movq 0x10(%r14), %rdi shrq %rdi cmpq %rdi, %rcx jae 0xafa2c movq %rdi, 0x10(%r14) movq %rcx, %r8 shlq $0x4, %r8 addq %r13, %r8 movl (%rsi), %edi testq %rdx, %rdx je 0xafa41 movl %edi, (%rdx) jmp 0xafa5c cmpl $-0x1, %edi je 0xafa5c movq %rdi, %rax shlq $0x4, %rax movups (%r13,%rax), %xmm0 movups %xmm0, (%rsi) leaq (%rax,%r13), %rsi movl %edi, %eax leaq 0x28(%r14), %rdi cmpq %r8, %rsi je 0xafb8c movq %r10, -0x50(%rbp) movq %r9, -0x38(%rbp) movl 0x4(%r8), %r11d movq 0x10(%r14), %r9 movq 0x18(%r14), %r15 addq %r9, %r12 movl %r12d, %edx andl %r11d, %edx shrq %r9 decl %r9d movl %r9d, %r10d andl %r11d, %r10d cmpq %r15, %rdx cmovbl %edx, %r10d movq %r10, %rdx shlq $0x4, %rdx addq %r13, %rdx cmpq %rsi, %rdx je 0xafb35 movq %rdi, -0x30(%rbp) movl 0x4(%rdx), %edi andl %edi, %r12d andl %edi, %r9d cmpq %r15, %r12 cmovbl %r12d, %r9d cmpl %r9d, %r10d jne 0xafb3e movq %r15, -0x48(%rbp) leaq 0x1(%r15), %r9 movq %r9, -0x40(%rbp) movq -0x50(%rbp), %r9 movl %r9d, %r12d andl %r11d, %r12d movq -0x38(%rbp), %r15 andl %r15d, %r11d cmpq -0x40(%rbp), %r12 cmovbl %r12d, %r11d andl %edi, %r9d andl %r15d, %edi cmpq -0x40(%rbp), %r9 cmovbl %r9d, %edi movl $0xffffffff, %r9d # imm = 0xFFFFFFFF cmpl %edi, %r11d jne 0xafb0f movl %r11d, %edi cmpq %rdi, -0x48(%rbp) jne 0xafb69 movl %r10d, %r9d movups (%r8), %xmm0 movups %xmm0, (%rsi) movl (%rdx), %ecx movl %eax, %edi movl %edi, %esi shlq $0x4, %rsi movl (%r13,%rsi), %edi cmpl %r9d, %edi jne 0xafb1a addq %rsi, %r13 movl %ecx, (%r13) movl %eax, (%rdx) jmp 0xafb88 movups (%r8), %xmm0 movups %xmm0, (%rsi) jmp 0xafb8c movups (%rdx), %xmm0 movups %xmm0, (%rsi) movups (%r8), %xmm0 movups %xmm0, (%rdx) movq -0x30(%rbp), %rdi movl %r9d, %ecx shlq $0x4, %rcx movl (%r13,%rcx), %r9d cmpl %r10d, %r9d jne 0xafb4f addq %rcx, %r13 movl %eax, (%r13) jmp 0xafb8c movups (%r8), %xmm0 movups %xmm0, (%rsi) movl %r10d, %edx shlq $0x4, %rdx movl (%r13,%rdx), %r10d cmpl %ecx, %r10d jne 0xafb70 addq %rdx, %r13 movl %eax, (%r13) movq -0x30(%rbp), %rdi callq 0xac77f movq 0x60(%r14), %rax testq %rax, %rax je 0xafb9f movq %rbx, %rdi callq *%rax xorl %r15d, %r15d movl %r15d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_delete: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15b, 1 cmp qword ptr [rdi+18h], 0 jz loc_AFBA2 mov rbx, rsi mov r14, rdi mov rax, [rdi+10h] mov [rbp+var_38], rax mov r13, [rdi+28h] mov rax, [rdi+50h] test rax, rax jz short loc_AF9A3 lea r12, [rbp+var_58] mov rdi, rbx mov rsi, r12 xor edx, edx call rax mov rsi, rax mov rdx, [r12] jmp short loc_AF9B1 loc_AF9A3: mov rdx, [r14+8] mov [rbp+var_58], rdx mov rsi, [r14] add rsi, rbx loc_AF9B1: mov r12d, 0FFFFFFFFh mov rdi, [r14+68h] call qword ptr [r14+58h] mov rcx, [r14+18h] mov r9, [rbp+var_38] lea r10, [r9+r12] mov edx, r10d and edx, eax shr r9, 1 dec r9d and eax, r9d cmp rdx, rcx cmovb eax, edx mov rdx, rax shl rdx, 4 lea rsi, [rdx+r13] cmp [r13+rdx+8], rbx jz short loc_AFA13 loc_AF9F1: mov eax, [rsi] cmp rax, r12 jz loc_AFBA2 mov rdx, rsi mov rdi, rax shl rdi, 4 lea rsi, [rdi+r13] cmp [r13+rdi+8], rbx jnz short loc_AF9F1 jmp short loc_AFA15 loc_AFA13: xor edx, edx loc_AFA15: dec rcx mov [r14+18h], rcx mov rdi, [r14+10h] shr rdi, 1 cmp rcx, rdi jnb short loc_AFA2C mov [r14+10h], rdi loc_AFA2C: mov r8, rcx shl r8, 4 add r8, r13 mov edi, [rsi] test rdx, rdx jz short loc_AFA41 mov [rdx], edi jmp short loc_AFA5C loc_AFA41: cmp edi, 0FFFFFFFFh jz short loc_AFA5C mov rax, rdi shl rax, 4 movups xmm0, xmmword ptr [r13+rax+0] movups xmmword ptr [rsi], xmm0 lea rsi, [rax+r13] mov eax, edi loc_AFA5C: lea rdi, [r14+28h] cmp rsi, r8 jz loc_AFB8C mov [rbp+var_50], r10 mov [rbp+var_38], r9 mov r11d, [r8+4] mov r9, [r14+10h] mov r15, [r14+18h] add r12, r9 mov edx, r12d and edx, r11d shr r9, 1 dec r9d mov r10d, r9d and r10d, r11d cmp rdx, r15 cmovb r10d, edx mov rdx, r10 shl rdx, 4 add rdx, r13 cmp rdx, rsi jz loc_AFB35 mov [rbp+var_30], rdi mov edi, [rdx+4] and r12d, edi and r9d, edi cmp r12, r15 cmovb r9d, r12d cmp r10d, r9d jnz short loc_AFB3E mov [rbp+var_48], r15 lea r9, [r15+1] mov [rbp+var_40], r9 mov r9, [rbp+var_50] mov r12d, r9d and r12d, r11d mov r15, [rbp+var_38] and r11d, r15d cmp r12, [rbp+var_40] cmovb r11d, r12d and r9d, edi and edi, r15d cmp r9, [rbp+var_40] cmovb edi, r9d mov r9d, 0FFFFFFFFh cmp r11d, edi jnz short loc_AFB0F mov edi, r11d cmp [rbp+var_48], rdi jnz short loc_AFB69 mov r9d, r10d loc_AFB0F: movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 mov ecx, [rdx] mov edi, eax loc_AFB1A: mov esi, edi shl rsi, 4 mov edi, [r13+rsi+0] cmp edi, r9d jnz short loc_AFB1A add r13, rsi mov [r13+0], ecx mov [rdx], eax jmp short loc_AFB88 loc_AFB35: movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 jmp short loc_AFB8C loc_AFB3E: movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rsi], xmm0 movups xmm0, xmmword ptr [r8] movups xmmword ptr [rdx], xmm0 mov rdi, [rbp+var_30] loc_AFB4F: mov ecx, r9d shl rcx, 4 mov r9d, [r13+rcx+0] cmp r9d, r10d jnz short loc_AFB4F add r13, rcx mov [r13+0], eax jmp short loc_AFB8C loc_AFB69: movups xmm0, xmmword ptr [r8] movups xmmword ptr [rsi], xmm0 loc_AFB70: mov edx, r10d shl rdx, 4 mov r10d, [r13+rdx+0] cmp r10d, ecx jnz short loc_AFB70 add r13, rdx mov [r13+0], eax loc_AFB88: mov rdi, [rbp+var_30] loc_AFB8C: call pop_dynamic mov rax, [r14+60h] test rax, rax jz short loc_AFB9F mov rdi, rbx call rax loc_AFB9F: xor r15d, r15d loc_AFBA2: mov eax, r15d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_delete(long long a1, long long a2) { unsigned int v2; // r15d long long v5; // r13 long long ( *v6)(long long, long long *, _QWORD); // rax long long v7; // rsi long long v8; // rdx int v9; // eax unsigned long long v10; // rcx unsigned long long v11; // r10 unsigned long long v12; // rdx unsigned long long v13; // r9 long long v14; // rax unsigned int *v15; // rsi unsigned int *v16; // rdx unsigned long long v17; // rcx unsigned long long v18; // rdi unsigned int *v19; // r8 long long v20; // rdi long long v21; // rdi unsigned int v22; // r11d unsigned long long v23; // r9 unsigned long long v24; // r15 int v25; // r12d unsigned long long v26; // rdx int v27; // r9d long long v28; // r10 unsigned int *v29; // rdx unsigned int v30; // edi unsigned long long v31; // r12 unsigned int v32; // r9d unsigned long long v33; // r12 int v34; // r11d unsigned long long v35; // r9 int v36; // edi int v37; // r9d unsigned int v38; // edi long long v39; // rsi long long v40; // rcx long long v41; // rdx void ( *v42)(long long); // rax long long v44; // [rsp+8h] [rbp-58h] BYREF unsigned long long v45; // [rsp+10h] [rbp-50h] unsigned long long v46; // [rsp+18h] [rbp-48h] unsigned long long v47; // [rsp+20h] [rbp-40h] unsigned long long v48; // [rsp+28h] [rbp-38h] long long v49; // [rsp+30h] [rbp-30h] LOBYTE(v2) = 1; if ( !*(_QWORD *)(a1 + 24) ) return v2; v48 = *(_QWORD *)(a1 + 16); v5 = *(_QWORD *)(a1 + 40); v6 = *(long long ( **)(long long, long long *, _QWORD))(a1 + 80); if ( v6 ) { v7 = v6(a2, &v44, 0LL); v8 = v44; } else { v8 = *(_QWORD *)(a1 + 8); v44 = v8; v7 = a2 + *(_QWORD *)a1; } v9 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v7, v8); v10 = *(_QWORD *)(a1 + 24); v11 = v48 + 0xFFFFFFFF; v12 = v9 & (unsigned int)(v48 - 1); v13 = (unsigned int)(v48 >> 1) - 1; v14 = (unsigned int)v13 & v9; if ( v12 < v10 ) v14 = (unsigned int)v12; v15 = (unsigned int *)(16 * v14 + v5); if ( *((_QWORD *)v15 + 1) == a2 ) { v16 = 0LL; LABEL_12: v17 = v10 - 1; *(_QWORD *)(a1 + 24) = v17; v18 = *(_QWORD *)(a1 + 16) >> 1; if ( v17 < v18 ) *(_QWORD *)(a1 + 16) = v18; v19 = (unsigned int *)(v5 + 16 * v17); v20 = *v15; if ( v16 ) { *v16 = v20; } else if ( (_DWORD)v20 != -1 ) { *(_OWORD *)v15 = *(_OWORD *)(v5 + 16 * v20); v15 = (unsigned int *)(16 * v20 + v5); LODWORD(v14) = v20; } v21 = a1 + 40; if ( v15 == v19 ) goto LABEL_43; v45 = v11; v48 = v13; v22 = v19[1]; v23 = *(_QWORD *)(a1 + 16); v24 = *(_QWORD *)(a1 + 24); v25 = v23 - 1; v26 = v22 & ((_DWORD)v23 - 1); v27 = (v23 >> 1) - 1; v28 = v22 & v27; if ( v26 < v24 ) v28 = (unsigned int)v26; v29 = (unsigned int *)(v5 + 16 * v28); if ( v29 == v15 ) { *(_OWORD *)v15 = *(_OWORD *)v19; LABEL_43: pop_dynamic(v21); v42 = *(void ( **)(long long))(a1 + 96); if ( v42 ) v42(a2); return 0; } v49 = a1 + 40; v30 = v29[1]; v31 = v30 & v25; v32 = v30 & v27; if ( v31 < v24 ) v32 = v31; if ( (_DWORD)v28 != v32 ) { *(_OWORD *)v15 = *(_OWORD *)v29; *(_OWORD *)v29 = *(_OWORD *)v19; v21 = v49; do { v40 = 16LL * v32; v32 = *(_DWORD *)(v5 + v40); } while ( v32 != (_DWORD)v28 ); *(_DWORD *)(v40 + v5) = v14; goto LABEL_43; } v46 = v24; v47 = v24 + 1; v33 = v22 & (unsigned int)v45; v34 = v48 & v22; if ( v33 < v24 + 1 ) v34 = v33; v35 = v30 & (unsigned int)v45; v36 = v48 & v30; if ( v35 < v47 ) v36 = v35; v37 = -1; if ( v34 == v36 ) { if ( v46 != v34 ) { *(_OWORD *)v15 = *(_OWORD *)v19; do { v41 = 16LL * (unsigned int)v28; LODWORD(v28) = *(_DWORD *)(v5 + v41); } while ( (_DWORD)v28 != (_DWORD)v17 ); *(_DWORD *)(v41 + v5) = v14; goto LABEL_42; } v37 = v28; } *(_OWORD *)v15 = *(_OWORD *)v19; v38 = v14; do { v39 = 16LL * v38; v38 = *(_DWORD *)(v5 + v39); } while ( v38 != v37 ); *(_DWORD *)(v39 + v5) = *v29; *v29 = v14; LABEL_42: v21 = v49; goto LABEL_43; } while ( 1 ) { v14 = *v15; if ( v14 == 0xFFFFFFFFLL ) return v2; v16 = v15; v15 = (unsigned int *)(16 * v14 + v5); if ( *((_QWORD *)v15 + 1) == a2 ) goto LABEL_12; } }
my_hash_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15B,0x1 CMP qword ptr [RDI + 0x18],0x0 JZ 0x001afba2 MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV R13,qword ptr [RDI + 0x28] MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x001af9a3 LEA R12,[RBP + -0x58] MOV RDI,RBX MOV RSI,R12 XOR EDX,EDX CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x001af9b1 LAB_001af9a3: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x58],RDX MOV RSI,qword ptr [R14] ADD RSI,RBX LAB_001af9b1: MOV R12D,0xffffffff MOV RDI,qword ptr [R14 + 0x68] CALL qword ptr [R14 + 0x58] MOV RCX,qword ptr [R14 + 0x18] MOV R9,qword ptr [RBP + -0x38] LEA R10,[R9 + R12*0x1] MOV EDX,R10D AND EDX,EAX SHR R9,0x1 DEC R9D AND EAX,R9D CMP RDX,RCX CMOVC EAX,EDX MOV RDX,RAX SHL RDX,0x4 LEA RSI,[RDX + R13*0x1] CMP qword ptr [R13 + RDX*0x1 + 0x8],RBX JZ 0x001afa13 LAB_001af9f1: MOV EAX,dword ptr [RSI] CMP RAX,R12 JZ 0x001afba2 MOV RDX,RSI MOV RDI,RAX SHL RDI,0x4 LEA RSI,[RDI + R13*0x1] CMP qword ptr [R13 + RDI*0x1 + 0x8],RBX JNZ 0x001af9f1 JMP 0x001afa15 LAB_001afa13: XOR EDX,EDX LAB_001afa15: DEC RCX MOV qword ptr [R14 + 0x18],RCX MOV RDI,qword ptr [R14 + 0x10] SHR RDI,0x1 CMP RCX,RDI JNC 0x001afa2c MOV qword ptr [R14 + 0x10],RDI LAB_001afa2c: MOV R8,RCX SHL R8,0x4 ADD R8,R13 MOV EDI,dword ptr [RSI] TEST RDX,RDX JZ 0x001afa41 MOV dword ptr [RDX],EDI JMP 0x001afa5c LAB_001afa41: CMP EDI,-0x1 JZ 0x001afa5c MOV RAX,RDI SHL RAX,0x4 MOVUPS XMM0,xmmword ptr [R13 + RAX*0x1] MOVUPS xmmword ptr [RSI],XMM0 LEA RSI,[RAX + R13*0x1] MOV EAX,EDI LAB_001afa5c: LEA RDI,[R14 + 0x28] CMP RSI,R8 JZ 0x001afb8c MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x38],R9 MOV R11D,dword ptr [R8 + 0x4] MOV R9,qword ptr [R14 + 0x10] MOV R15,qword ptr [R14 + 0x18] ADD R12,R9 MOV EDX,R12D AND EDX,R11D SHR R9,0x1 DEC R9D MOV R10D,R9D AND R10D,R11D CMP RDX,R15 CMOVC R10D,EDX MOV RDX,R10 SHL RDX,0x4 ADD RDX,R13 CMP RDX,RSI JZ 0x001afb35 MOV qword ptr [RBP + -0x30],RDI MOV EDI,dword ptr [RDX + 0x4] AND R12D,EDI AND R9D,EDI CMP R12,R15 CMOVC R9D,R12D CMP R10D,R9D JNZ 0x001afb3e MOV qword ptr [RBP + -0x48],R15 LEA R9,[R15 + 0x1] MOV qword ptr [RBP + -0x40],R9 MOV R9,qword ptr [RBP + -0x50] MOV R12D,R9D AND R12D,R11D MOV R15,qword ptr [RBP + -0x38] AND R11D,R15D CMP R12,qword ptr [RBP + -0x40] CMOVC R11D,R12D AND R9D,EDI AND EDI,R15D CMP R9,qword ptr [RBP + -0x40] CMOVC EDI,R9D MOV R9D,0xffffffff CMP R11D,EDI JNZ 0x001afb0f MOV EDI,R11D CMP qword ptr [RBP + -0x48],RDI JNZ 0x001afb69 MOV R9D,R10D LAB_001afb0f: MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 MOV ECX,dword ptr [RDX] MOV EDI,EAX LAB_001afb1a: MOV ESI,EDI SHL RSI,0x4 MOV EDI,dword ptr [R13 + RSI*0x1] CMP EDI,R9D JNZ 0x001afb1a ADD R13,RSI MOV dword ptr [R13],ECX MOV dword ptr [RDX],EAX JMP 0x001afb88 LAB_001afb35: MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 JMP 0x001afb8c LAB_001afb3e: MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RSI],XMM0 MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RDX],XMM0 MOV RDI,qword ptr [RBP + -0x30] LAB_001afb4f: MOV ECX,R9D SHL RCX,0x4 MOV R9D,dword ptr [R13 + RCX*0x1] CMP R9D,R10D JNZ 0x001afb4f ADD R13,RCX MOV dword ptr [R13],EAX JMP 0x001afb8c LAB_001afb69: MOVUPS XMM0,xmmword ptr [R8] MOVUPS xmmword ptr [RSI],XMM0 LAB_001afb70: MOV EDX,R10D SHL RDX,0x4 MOV R10D,dword ptr [R13 + RDX*0x1] CMP R10D,ECX JNZ 0x001afb70 ADD R13,RDX MOV dword ptr [R13],EAX LAB_001afb88: MOV RDI,qword ptr [RBP + -0x30] LAB_001afb8c: CALL 0x001ac77f MOV RAX,qword ptr [R14 + 0x60] TEST RAX,RAX JZ 0x001afb9f MOV RDI,RBX CALL RAX LAB_001afb9f: XOR R15D,R15D LAB_001afba2: MOV EAX,R15D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_hash_delete(long *param_1,long param_2) { long *plVar1; long lVar2; uint uVar3; int8 uVar4; uint uVar5; uint uVar6; long lVar7; ulong uVar8; ulong uVar9; uint uVar10; uint uVar11; uint *puVar12; uint *puVar13; uint *puVar14; uint uVar15; uint uVar16; ulong uVar18; uint uVar19; ulong uVar20; int8 unaff_R15; long local_60; long local_58; ulong local_50; ulong local_48; ulong local_40; long *local_38; ulong uVar17; uVar9 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1); if (param_1[3] != 0) { local_40 = param_1[2]; lVar2 = param_1[5]; if ((code *)param_1[10] == (code *)0x0) { local_60 = param_1[1]; lVar7 = *param_1 + param_2; } else { lVar7 = (*(code *)param_1[10])(param_2,&local_60,0); } uVar5 = (*(code *)param_1[0xb])(param_1[0xd],lVar7,local_60); lVar7 = local_40 + 0xffffffff; uVar10 = (uint)lVar7; uVar15 = (int)(local_40 >> 1) - 1; uVar17 = (ulong)uVar15; uVar8 = (ulong)(uVar5 & uVar15); if ((ulong)(uVar10 & uVar5) < (ulong)param_1[3]) { uVar8 = (ulong)(uVar10 & uVar5); } puVar13 = (uint *)(uVar8 * 0x10 + lVar2); if (*(long *)(lVar2 + 8 + uVar8 * 0x10) == param_2) { puVar12 = (uint *)0x0; } else { do { puVar12 = puVar13; uVar8 = (ulong)*puVar12; if (uVar8 == 0xffffffff) goto LAB_001afba2; puVar13 = (uint *)(uVar8 * 0x10 + lVar2); } while (*(long *)(lVar2 + 8 + uVar8 * 0x10) != param_2); } uVar9 = param_1[3] - 1; param_1[3] = uVar9; if (uVar9 < (ulong)param_1[2] >> 1) { param_1[2] = (ulong)param_1[2] >> 1; } puVar14 = (uint *)(uVar9 * 0x10 + lVar2); uVar5 = *puVar13; uVar6 = (uint)uVar8; if (puVar12 == (uint *)0x0) { if (uVar5 != 0xffffffff) { puVar12 = (uint *)(lVar2 + (ulong)uVar5 * 0x10); uVar6 = puVar12[1]; uVar3 = puVar12[2]; uVar11 = puVar12[3]; *puVar13 = *puVar12; puVar13[1] = uVar6; puVar13[2] = uVar3; puVar13[3] = uVar11; puVar13 = (uint *)((ulong)uVar5 * 0x10 + lVar2); uVar6 = uVar5; } } else { *puVar12 = uVar5; } plVar1 = param_1 + 5; if (puVar13 != puVar14) { uVar5 = puVar14[1]; uVar8 = param_1[3]; uVar19 = (int)param_1[2] - 1; uVar11 = uVar19 & uVar5; uVar16 = (int)((ulong)param_1[2] >> 1) - 1; uVar3 = uVar16 & uVar5; if (uVar11 < uVar8) { uVar3 = uVar11; } uVar18 = (ulong)uVar3; puVar12 = (uint *)(uVar18 * 0x10 + lVar2); local_58 = lVar7; local_40 = uVar17; if (puVar12 == puVar13) { uVar5 = puVar14[1]; uVar10 = puVar14[2]; uVar15 = puVar14[3]; *puVar13 = *puVar14; puVar13[1] = uVar5; puVar13[2] = uVar10; puVar13[3] = uVar15; } else { uVar11 = puVar12[1]; uVar20 = (ulong)(uVar19 & uVar11); uVar17 = (ulong)(uVar16 & uVar11); if (uVar20 < uVar8) { uVar17 = uVar20; } local_38 = plVar1; if (uVar3 == (uint)uVar17) { local_48 = uVar8 + 1; uVar16 = uVar5 & uVar15; if ((uVar10 & uVar5) < local_48) { uVar16 = uVar10 & uVar5; } uVar5 = uVar11 & uVar15; if ((uVar10 & uVar11) < local_48) { uVar5 = uVar10 & uVar11; } uVar10 = 0xffffffff; local_50 = uVar8; if ((uVar16 == uVar5) && (uVar10 = uVar3, uVar8 != uVar16)) { uVar5 = puVar14[1]; uVar10 = puVar14[2]; uVar15 = puVar14[3]; *puVar13 = *puVar14; puVar13[1] = uVar5; puVar13[2] = uVar10; puVar13[3] = uVar15; do { lVar7 = uVar18 * 0x10; uVar5 = *(uint *)(lVar2 + lVar7); uVar18 = (ulong)uVar5; } while (uVar5 != (uint)uVar9); *(uint *)(lVar2 + lVar7) = uVar6; } else { uVar5 = puVar14[1]; uVar15 = puVar14[2]; uVar3 = puVar14[3]; *puVar13 = *puVar14; puVar13[1] = uVar5; puVar13[2] = uVar15; puVar13[3] = uVar3; uVar5 = uVar6; do { uVar9 = (ulong)uVar5; uVar5 = *(uint *)(lVar2 + uVar9 * 0x10); } while (uVar5 != uVar10); *(uint *)(lVar2 + uVar9 * 0x10) = *puVar12; *puVar12 = uVar6; } } else { uVar4 = *(int8 *)(puVar12 + 2); *(int8 *)puVar13 = *(int8 *)puVar12; *(int8 *)(puVar13 + 2) = uVar4; uVar5 = puVar14[1]; uVar10 = puVar14[2]; uVar15 = puVar14[3]; *puVar12 = *puVar14; puVar12[1] = uVar5; puVar12[2] = uVar10; puVar12[3] = uVar15; do { lVar7 = uVar17 * 0x10; uVar5 = *(uint *)(lVar2 + lVar7); uVar17 = (ulong)uVar5; } while (uVar5 != uVar3); *(uint *)(lVar2 + lVar7) = uVar6; } } } pop_dynamic(plVar1); if ((code *)param_1[0xc] != (code *)0x0) { (*(code *)param_1[0xc])(param_2); } uVar9 = 0; } LAB_001afba2: return uVar9 & 0xffffffff; }
36,011
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) { if (JSON_HEDLEY_UNLIKELY(!j.is_boolean())) { JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j)); } b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::boolean_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x4, (%rdi) jne 0x64760 movb 0x8(%r14), %al movb %al, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x43ea6 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x513ad(%rip), %rsi # 0xb5b2f leaq 0x10(%rsp), %rdi callq 0x647e3 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63cea xorl %ebp, %ebp leaq 0x9a78b(%rip), %rsi # 0xfef38 leaq -0x23d7e(%rip), %rdx # 0x40a36 movq %rbx, %rdi callq 0x24ef0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251d8 testb %bpl, %bpl jne 0x647d3 jmp 0x647db movq %rax, %r14 movq %rbx, %rdi callq 0x24680 movq %r14, %rdi callq 0x24f80
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 4 jnz short loc_64760 mov al, [r14+8] mov [rsi], al add rsp, 30h pop rbx pop r14 pop rbp retn loc_64760: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeBool; "type must be boolean, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],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_647D3 jmp short loc_647DB mov r14, rax loc_647D3: mov rdi, rbx; void * call ___cxa_free_exception loc_647DB: mov rdi, r14 call __Unwind_Resume
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( unsigned __int8 *a1, unsigned __int8 *a2) { unsigned __int8 result; // al nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *a1 != 4 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); 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(&)[30],char const*>( v4, "type must be boolean, but is "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v4); __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); } result = a1[8]; *a2 = result; return result; }
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x4 JNZ 0x00164760 MOV AL,byte ptr [R14 + 0x8] MOV byte ptr [RSI],AL ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00164760: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x00143ea6 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016477b: LEA RSI,[0x1b5b2f] LEA RDI,[RSP + 0x10] CALL 0x001647e3 MOV BPL,0x1 LAB_0016478f: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163cea XOR EBP,EBP LEA RSI,[0x1fef38] LEA RDX,[0x140a36] MOV RDI,RBX CALL 0x00124ef0
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::boolean_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,boolean_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == '\x04') { *param_2 = param_1[8]; return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 0016477b to 0016478b has its CatchHandler @ 001647d0 */ concat<std::__cxx11::string,char_const(&)[30],char_const*> (local_38,"type must be boolean, but is ",&local_40); /* try { // try from 0016478f to 001647bb has its CatchHandler @ 001647bc */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
36,012
my_uca_previous_context_find
eloqsql/strings/ctype-uca.c
static const MY_CONTRACTION * my_uca_previous_context_find(my_uca_scanner *scanner, my_wc_t wc0, my_wc_t wc1) { const MY_CONTRACTIONS *list= &scanner->level->contractions; MY_CONTRACTION *c, *last; for (c= list->item, last= c + list->nitems; c < last; c++) { if (c->with_context && wc0 == c->ch[0] && wc1 == c->ch[1]) { scanner->wbeg= c->weight + 1; return c; } } return NULL; }
O0
c
my_uca_previous_context_find: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax addq $0x18, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx imulq $0x58, (%rcx), %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x5174e movq -0x30(%rbp), %rax movsbl 0x52(%rax), %eax cmpl $0x0, %eax je 0x5173e movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx cmpq (%rcx), %rax jne 0x5173e movq -0x20(%rbp), %rax movq -0x30(%rbp), %rcx cmpq 0x8(%rcx), %rax jne 0x5173e movq -0x30(%rbp), %rcx addq $0x30, %rcx addq $0x2, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x51756 jmp 0x51740 movq -0x30(%rbp), %rax addq $0x58, %rax movq %rax, -0x30(%rbp) jmp 0x516ef movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
my_uca_previous_context_find: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+18h] add rax, 18h mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_28] imul rcx, [rcx], 58h ; 'X' add rax, rcx mov [rbp+var_38], rax loc_516EF: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb short loc_5174E mov rax, [rbp+var_30] movsx eax, byte ptr [rax+52h] cmp eax, 0 jz short loc_5173E mov rax, [rbp+var_18] mov rcx, [rbp+var_30] cmp rax, [rcx] jnz short loc_5173E mov rax, [rbp+var_20] mov rcx, [rbp+var_30] cmp rax, [rcx+8] jnz short loc_5173E mov rcx, [rbp+var_30] add rcx, 30h ; '0' add rcx, 2 mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp short loc_51756 loc_5173E: jmp short $+2 loc_51740: mov rax, [rbp+var_30] add rax, 58h ; 'X' mov [rbp+var_30], rax jmp short loc_516EF loc_5174E: mov [rbp+var_8], 0 loc_51756: mov rax, [rbp+var_8] pop rbp retn
unsigned long long my_uca_previous_context_find(_QWORD *a1, long long a2, long long a3) { unsigned long long v4; // [rsp+0h] [rbp-38h] unsigned long long v5; // [rsp+8h] [rbp-30h] v5 = *(_QWORD *)(a1[3] + 32LL); v4 = 88LL * *(_QWORD *)(a1[3] + 24LL) + v5; while ( v5 < v4 ) { if ( *(_BYTE *)(v5 + 82) && a2 == *(_QWORD *)v5 && a3 == *(_QWORD *)(v5 + 8) ) { *a1 = v5 + 50; return v5; } v5 += 88LL; } return 0LL; }
my_uca_previous_context_find: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] IMUL RCX,qword ptr [RCX],0x58 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001516ef: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0015174e MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX + 0x52] CMP EAX,0x0 JZ 0x0015173e MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RCX] JNZ 0x0015173e MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x0015173e MOV RCX,qword ptr [RBP + -0x30] ADD RCX,0x30 ADD RCX,0x2 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x00151756 LAB_0015173e: JMP 0x00151740 LAB_00151740: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x58 MOV qword ptr [RBP + -0x30],RAX JMP 0x001516ef LAB_0015174e: MOV qword ptr [RBP + -0x8],0x0 LAB_00151756: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long * my_uca_previous_context_find(long *param_1,long param_2,long param_3) { long *plVar1; long *local_38; local_38 = *(long **)(param_1[3] + 0x20); plVar1 = local_38 + *(long *)(param_1[3] + 0x18) * 0xb; while( true ) { if (plVar1 <= local_38) { return (long *)0x0; } if (((*(char *)((long)local_38 + 0x52) != '\0') && (param_2 == *local_38)) && (param_3 == local_38[1])) break; local_38 = local_38 + 0xb; } *param_1 = (long)local_38 + 0x32; return local_38; }
36,013
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood(std::unique_ptr<unsigned char const [], std::default_delete<unsigned char const []>>, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp
void SubdivisionPlan::addNeighborhood(std::unique_ptr<uint8_t const[]> neighborhoodData, int /*startEdge*/) { Neighborhood const& neighborhood = *reinterpret_cast<Neighborhood const*>(neighborhoodData.get()); for (int i = 0; i < GetNumNeighborhoods(); ++i) if (neighborhood.IsEquivalent(GetNeighborhood(i))) return; Index index = _neighborhoods.GetSize(); // SetSize is a no-op since since 'reserve' above used the face valence to make sure // we have enough space (and revert to dynamic allocation for 'big valence' plans. // note : we are abusing the StackBuffer API since it does not expose 'push_back' // or 'resize' functions - we have to make sure that we always 'Reserve' enough space, // resort to storing a sparse vector with nullptrs or revert back to a more conventional // std::vector _neighborhoods.SetSize(index + 1); _neighborhoods[index] = neighborhoodData.release(); }
O0
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood(std::unique_ptr<unsigned char const [], std::default_delete<unsigned char const []>>, int): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rsi, -0x40(%rbp) movq %rdi, %rax movq -0x40(%rbp), %rdi movq %rdi, -0x38(%rbp) movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) callq 0xd6fc0 movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x30(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, -0x44(%rbp) callq 0xc7540 movl %eax, %ecx movl -0x44(%rbp), %eax cmpl %ecx, %eax jge 0x1ccac7 movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x24(%rbp), %esi callq 0xc4340 movq -0x50(%rbp), %rdi movq %rax, %rsi callq 0xd09e0 testb $0x1, %al jne 0x1ccab8 jmp 0x1ccaba jmp 0x1ccb10 jmp 0x1ccabc movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x1cca7a movq -0x30(%rbp), %rdi addq $0x8, %rdi callq 0xc56d0 movq -0x30(%rbp), %rdi movl %eax, -0x28(%rbp) addq $0x8, %rdi movl -0x28(%rbp), %esi addl $0x1, %esi callq 0xcbb40 movq -0x38(%rbp), %rdi callq 0xd5c70 movq -0x30(%rbp), %rdi movq %rax, -0x58(%rbp) addq $0x8, %rdi callq 0xc7000 movq -0x58(%rbp), %rdx movslq -0x28(%rbp), %rcx movq %rdx, (%rax,%rcx,8) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan15addNeighborhoodESt10unique_ptrIA_KhSt14default_deleteIS5_EEi: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_40], rsi mov rax, rdi mov rdi, [rbp+var_40] mov [rbp+var_38], rdi mov [rbp+var_8], rax mov [rbp+var_10], rdi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_30], rax call __ZNKSt10unique_ptrIA_KhSt14default_deleteIS1_EE3getEv; std::unique_ptr<uchar const[]>::get(void) mov [rbp+var_20], rax mov [rbp+var_24], 0 loc_1CCA7A: mov rdi, [rbp+var_30]; this mov eax, [rbp+var_24] mov [rbp+var_44], eax call __ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan19GetNumNeighborhoodsEv; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNumNeighborhoods(void) mov ecx, eax mov eax, [rbp+var_44] cmp eax, ecx jge short loc_1CCAC7 mov rdi, [rbp+var_30]; this mov rax, [rbp+var_20] mov [rbp+var_50], rax mov esi, [rbp+var_24]; int call __ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan15GetNeighborhoodEi; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNeighborhood(int) mov rdi, [rbp+var_50]; this mov rsi, rax; OpenSubdiv::v3_6_0::Tmr::Neighborhood * call __ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood12IsEquivalentERKS2_; OpenSubdiv::v3_6_0::Tmr::Neighborhood::IsEquivalent(OpenSubdiv::v3_6_0::Tmr::Neighborhood const&) test al, 1 jnz short loc_1CCAB8 jmp short loc_1CCABA loc_1CCAB8: jmp short loc_1CCB10 loc_1CCABA: jmp short $+2 loc_1CCABC: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_1CCA7A loc_1CCAC7: mov rdi, [rbp+var_30] add rdi, 8 call __ZNK10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPKhLj4ELb1EE7GetSizeEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<uchar const*,4u,true>::GetSize(void) mov rdi, [rbp+var_30] mov [rbp+var_28], eax add rdi, 8 mov esi, [rbp+var_28] add esi, 1 call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPKhLj4ELb1EE7SetSizeEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<uchar const*,4u,true>::SetSize(uint) mov rdi, [rbp+var_38] call __ZNSt10unique_ptrIA_KhSt14default_deleteIS1_EE7releaseEv; std::unique_ptr<uchar const[]>::release(void) mov rdi, [rbp+var_30] mov [rbp+var_58], rax add rdi, 8 call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPKhLj4ELb1EEcvPS5_Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<uchar const*,4u,true>::operator uchar const**(void) mov rdx, [rbp+var_58] movsxd rcx, [rbp+var_28] mov [rax+rcx*8], rdx loc_1CCB10: add rsp, 60h pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood( OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan *a1, long long a2) { const OpenSubdiv::v3_6_0::Tmr::Neighborhood *Neighborhood; // rax long long result; // rax long long v4; // [rsp+8h] [rbp-58h] int Size; // [rsp+38h] [rbp-28h] int i; // [rsp+3Ch] [rbp-24h] OpenSubdiv::v3_6_0::Tmr::Neighborhood *v7; // [rsp+40h] [rbp-20h] v7 = (OpenSubdiv::v3_6_0::Tmr::Neighborhood *)std::unique_ptr<unsigned char const[]>::get(); for ( i = 0; i < (int)OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNumNeighborhoods(a1); ++i ) { Neighborhood = (const OpenSubdiv::v3_6_0::Tmr::Neighborhood *)OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNeighborhood( a1, i); result = OpenSubdiv::v3_6_0::Tmr::Neighborhood::IsEquivalent(v7, Neighborhood); if ( (result & 1) != 0 ) return result; } Size = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*,4u,true>::GetSize((char *)a1 + 8); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*,4u,true>::SetSize( (char *)a1 + 8, (unsigned int)(Size + 1)); v4 = std::unique_ptr<unsigned char const[]>::release(a2); result = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*,4u,true>::operator unsigned char const**((char *)a1 + 8); *(_QWORD *)(result + 8LL * Size) = v4; return result; }
36,014
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood(std::unique_ptr<unsigned char const [], std::default_delete<unsigned char const []>>, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp
void SubdivisionPlan::addNeighborhood(std::unique_ptr<uint8_t const[]> neighborhoodData, int /*startEdge*/) { Neighborhood const& neighborhood = *reinterpret_cast<Neighborhood const*>(neighborhoodData.get()); for (int i = 0; i < GetNumNeighborhoods(); ++i) if (neighborhood.IsEquivalent(GetNeighborhood(i))) return; Index index = _neighborhoods.GetSize(); // SetSize is a no-op since since 'reserve' above used the face valence to make sure // we have enough space (and revert to dynamic allocation for 'big valence' plans. // note : we are abusing the StackBuffer API since it does not expose 'push_back' // or 'resize' functions - we have to make sure that we always 'Reserve' enough space, // resort to storing a sparse vector with nullptrs or revert back to a more conventional // std::vector _neighborhoods.SetSize(index + 1); _neighborhoods[index] = neighborhoodData.release(); }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood(std::unique_ptr<unsigned char const [], std::default_delete<unsigned char const []>>, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, (%rsp) movq %rdi, %rbx cmpl $0x0, 0x10(%rdi) jle 0xa6849 movq (%rsp), %rax movq (%rax), %r13 leaq 0x4(%r13), %r15 xorl %r14d, %r14d movq 0x8(%rbx), %rax movq (%rax,%r14,8), %r12 movzwl 0x8(%r13), %edi movzwl 0xa(%r13), %esi movzwl 0xc(%r13), %edx movzwl 0xe(%r13), %ecx xorl %r8d, %r8d callq 0x383b0 movl %eax, %ebp movzwl 0x8(%r12), %edi movzwl 0xa(%r12), %esi movzwl 0xc(%r12), %edx movzwl 0xe(%r12), %ecx xorl %r8d, %r8d callq 0x383b0 cmpl %eax, %ebp jne 0xa683d movl %ebp, %edx addq $-0x4, %rdx addq $0x4, %r12 movq %r15, %rdi movq %r12, %rsi callq 0x3a380 testl %eax, %eax je 0xa68ba incq %r14 movslq 0x10(%rbx), %rax cmpq %rax, %r14 jl 0xa67da movslq 0x10(%rbx), %r14 movl %r14d, %ebp incl %ebp jne 0xa686e movq 0x38(%rbx), %rdi callq 0x3a0c0 leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) movl $0x4, 0x14(%rbx) jmp 0xa68a1 cmpl %ebp, 0x14(%rbx) jae 0xa68a1 movq 0x38(%rbx), %rdi callq 0x3a0c0 leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) movl $0x4, 0x14(%rbx) movl %ebp, %edi shlq $0x3, %rdi callq 0x3a230 movq %rax, 0x38(%rbx) movq %rax, 0x8(%rbx) movl %ebp, 0x14(%rbx) movl %ebp, 0x10(%rbx) movq (%rsp), %rcx movq (%rcx), %rax movq $0x0, (%rcx) movq 0x8(%rbx), %rcx movq %rax, (%rcx,%r14,8) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan15addNeighborhoodESt10unique_ptrIA_KhSt14default_deleteIS5_EEi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], rsi mov rbx, rdi cmp dword ptr [rdi+10h], 0 jle short loc_A6849 mov rax, [rsp+38h+var_38] mov r13, [rax] lea r15, [r13+4] xor r14d, r14d loc_A67DA: mov rax, [rbx+8] mov r12, [rax+r14*8] movzx edi, word ptr [r13+8]; this movzx esi, word ptr [r13+0Ah]; int movzx edx, word ptr [r13+0Ch]; int movzx ecx, word ptr [r13+0Eh]; int xor r8d, r8d; int call __ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood8byteSizeEiiiii; OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize(int,int,int,int,int) mov ebp, eax movzx edi, word ptr [r12+8]; this movzx esi, word ptr [r12+0Ah]; int movzx edx, word ptr [r12+0Ch]; int movzx ecx, word ptr [r12+0Eh]; int xor r8d, r8d; int call __ZN10OpenSubdiv6v3_6_03Tmr12Neighborhood8byteSizeEiiiii; OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize(int,int,int,int,int) cmp ebp, eax jnz short loc_A683D mov edx, ebp add rdx, 0FFFFFFFFFFFFFFFCh add r12, 4 mov rdi, r15 mov rsi, r12 call _bcmp test eax, eax jz short loc_A68BA loc_A683D: inc r14 movsxd rax, dword ptr [rbx+10h] cmp r14, rax jl short loc_A67DA loc_A6849: movsxd r14, dword ptr [rbx+10h] mov ebp, r14d inc ebp jnz short loc_A686E mov rdi, [rbx+38h]; void * call __ZdlPv; operator delete(void *) lea rax, [rbx+18h] mov [rbx+8], rax mov dword ptr [rbx+14h], 4 jmp short loc_A68A1 loc_A686E: cmp [rbx+14h], ebp jnb short loc_A68A1 mov rdi, [rbx+38h]; void * call __ZdlPv; operator delete(void *) lea rax, [rbx+18h] mov [rbx+8], rax mov dword ptr [rbx+14h], 4 mov edi, ebp shl rdi, 3; unsigned __int64 call __Znwm; operator new(ulong) mov [rbx+38h], rax mov [rbx+8], rax mov [rbx+14h], ebp loc_A68A1: mov [rbx+10h], ebp mov rcx, [rsp+38h+var_38] mov rax, [rcx] mov qword ptr [rcx], 0 mov rcx, [rbx+8] mov [rcx+r14*8], rax loc_A68BA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood( long long a1, long long *a2, long long a3, long long a4, long long a5, int a6) { unsigned __int16 *v6; // r13 long long v7; // r15 long long v8; // r14 unsigned __int16 *v9; // r12 unsigned int v10; // ebp int v11; // r9d long long result; // rax long long v13; // r14 unsigned int v14; // ebp long long v15; // rax if ( *(int *)(a1 + 16) <= 0 ) { LABEL_6: v13 = *(int *)(a1 + 16); v14 = *(_DWORD *)(a1 + 16) + 1; if ( *(_DWORD *)(a1 + 16) == -1 ) { operator delete(*(void **)(a1 + 56)); *(_QWORD *)(a1 + 8) = a1 + 24; *(_DWORD *)(a1 + 20) = 4; } else if ( *(_DWORD *)(a1 + 20) < v14 ) { operator delete(*(void **)(a1 + 56)); *(_QWORD *)(a1 + 8) = a1 + 24; *(_DWORD *)(a1 + 20) = 4; v15 = operator new(8LL * v14); *(_QWORD *)(a1 + 56) = v15; *(_QWORD *)(a1 + 8) = v15; *(_DWORD *)(a1 + 20) = v14; } *(_DWORD *)(a1 + 16) = v14; result = *a2; *a2 = 0LL; *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v13) = result; } else { v6 = (unsigned __int16 *)*a2; v7 = *a2 + 4; v8 = 0LL; while ( 1 ) { v9 = *(unsigned __int16 **)(*(_QWORD *)(a1 + 8) + 8 * v8); v10 = OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize( (OpenSubdiv::v3_6_0::Tmr::Neighborhood *)v6[4], v6[5], v6[6], v6[7], 0, a6); if ( v10 == (unsigned int)OpenSubdiv::v3_6_0::Tmr::Neighborhood::byteSize( (OpenSubdiv::v3_6_0::Tmr::Neighborhood *)v9[4], v9[5], v9[6], v9[7], 0, v11) ) { result = bcmp(v7, v9 + 2, v10 - 4LL); if ( !(_DWORD)result ) break; } if ( ++v8 >= *(int *)(a1 + 16) ) goto LABEL_6; } } return result; }
addNeighborhood: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],RSI MOV RBX,RDI CMP dword ptr [RDI + 0x10],0x0 JLE 0x001a6849 MOV RAX,qword ptr [RSP] MOV R13,qword ptr [RAX] LEA R15,[R13 + 0x4] XOR R14D,R14D LAB_001a67da: MOV RAX,qword ptr [RBX + 0x8] MOV R12,qword ptr [RAX + R14*0x8] MOVZX EDI,word ptr [R13 + 0x8] MOVZX ESI,word ptr [R13 + 0xa] MOVZX EDX,word ptr [R13 + 0xc] MOVZX ECX,word ptr [R13 + 0xe] XOR R8D,R8D CALL 0x001383b0 MOV EBP,EAX MOVZX EDI,word ptr [R12 + 0x8] MOVZX ESI,word ptr [R12 + 0xa] MOVZX EDX,word ptr [R12 + 0xc] MOVZX ECX,word ptr [R12 + 0xe] XOR R8D,R8D CALL 0x001383b0 CMP EBP,EAX JNZ 0x001a683d MOV EDX,EBP ADD RDX,-0x4 ADD R12,0x4 MOV RDI,R15 MOV RSI,R12 CALL 0x0013a380 TEST EAX,EAX JZ 0x001a68ba LAB_001a683d: INC R14 MOVSXD RAX,dword ptr [RBX + 0x10] CMP R14,RAX JL 0x001a67da LAB_001a6849: MOVSXD R14,dword ptr [RBX + 0x10] MOV EBP,R14D INC EBP JNZ 0x001a686e MOV RDI,qword ptr [RBX + 0x38] CALL 0x0013a0c0 LEA RAX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x14],0x4 JMP 0x001a68a1 LAB_001a686e: CMP dword ptr [RBX + 0x14],EBP JNC 0x001a68a1 MOV RDI,qword ptr [RBX + 0x38] CALL 0x0013a0c0 LEA RAX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x14],0x4 MOV EDI,EBP SHL RDI,0x3 CALL 0x0013a230 MOV qword ptr [RBX + 0x38],RAX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x14],EBP LAB_001a68a1: MOV dword ptr [RBX + 0x10],EBP MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RCX] MOV qword ptr [RCX],0x0 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RCX + R14*0x8],RAX LAB_001a68ba: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood(std::unique_ptr<unsigned char const [], std::default_delete<unsigned char const []> >, int) */ void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::addNeighborhood(long param_1,long *param_2) { long lVar1; long lVar2; uint uVar3; uint uVar4; int iVar5; void *pvVar6; long lVar7; if (0 < *(int *)(param_1 + 0x10)) { lVar1 = *param_2; lVar7 = 0; do { lVar2 = *(long *)(*(long *)(param_1 + 8) + lVar7 * 8); uVar3 = Neighborhood::byteSize ((uint)*(ushort *)(lVar1 + 8),(uint)*(ushort *)(lVar1 + 10), (uint)*(ushort *)(lVar1 + 0xc),(uint)*(ushort *)(lVar1 + 0xe),0); uVar4 = Neighborhood::byteSize ((uint)*(ushort *)(lVar2 + 8),(uint)*(ushort *)(lVar2 + 10), (uint)*(ushort *)(lVar2 + 0xc),(uint)*(ushort *)(lVar2 + 0xe),0); if ((uVar3 == uVar4) && (iVar5 = bcmp((void *)(lVar1 + 4),(void *)(lVar2 + 4),(ulong)uVar3 - 4), iVar5 == 0)) { return; } lVar7 = lVar7 + 1; } while (lVar7 < *(int *)(param_1 + 0x10)); } iVar5 = *(int *)(param_1 + 0x10); uVar3 = iVar5 + 1; if (uVar3 == 0) { operator_delete(*(void **)(param_1 + 0x38)); *(long *)(param_1 + 8) = param_1 + 0x18; *(int4 *)(param_1 + 0x14) = 4; } else if (*(uint *)(param_1 + 0x14) < uVar3) { operator_delete(*(void **)(param_1 + 0x38)); *(long *)(param_1 + 8) = param_1 + 0x18; *(int4 *)(param_1 + 0x14) = 4; pvVar6 = operator_new((ulong)uVar3 << 3); *(void **)(param_1 + 0x38) = pvVar6; *(void **)(param_1 + 8) = pvVar6; *(uint *)(param_1 + 0x14) = uVar3; } *(uint *)(param_1 + 0x10) = uVar3; lVar1 = *param_2; *param_2 = 0; *(long *)(*(long *)(param_1 + 8) + (long)iVar5 * 8) = lVar1; return; }
36,015
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool)
monkey531[P]llama/common/json.hpp
explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept : ia(std::move(adapter)) , ignore_comments(ignore_comments_) , decimal_point_char(static_cast<char_int_type>(get_decimal_point())) {}
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool): subq $0x28, %rsp movb %dl, %al movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) andb $0x1, %al movb %al, 0x17(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movb 0x17(%rsp), %cl andb $0x1, %cl movb %cl, 0x10(%rax) callq 0xaed40 movq 0x8(%rsp), %rdi movl %eax, 0x14(%rdi) movb $0x0, 0x18(%rdi) movq $0x0, 0x20(%rdi) movq $0x0, 0x28(%rdi) movq $0x0, 0x30(%rdi) addq $0x38, %rdi movq %rdi, (%rsp) xorl %esi, %esi movl $0x18, %edx callq 0x4f470 movq (%rsp), %rdi callq 0x87aa0 movq 0x8(%rsp), %rdi addq $0x50, %rdi callq 0x4f4e0 movq 0x8(%rsp), %rax leaq 0x105875(%rip), %rcx # 0x1b4512 movq %rcx, 0x70(%rax) movq $0x0, 0x78(%rax) movq $0x0, 0x80(%rax) xorps %xmm0, %xmm0 movsd %xmm0, 0x88(%rax) callq 0xaed50 movb %al, %cl movq 0x8(%rsp), %rax movsbl %cl, %ecx movl %ecx, 0x90(%rax) addq $0x28, %rsp retq nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b: sub rsp, 28h mov al, dl mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi and al, 1 mov [rsp+28h+var_11], al mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rcx, [rsp+28h+var_10] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov cl, [rsp+28h+var_11] and cl, 1 mov [rax+10h], cl call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void) mov rdi, [rsp+28h+var_20] mov [rdi+14h], eax mov byte ptr [rdi+18h], 0 mov qword ptr [rdi+20h], 0 mov qword ptr [rdi+28h], 0 mov qword ptr [rdi+30h], 0 add rdi, 38h ; '8' mov [rsp+28h+var_28], rdi xor esi, esi mov edx, 18h call _memset mov rdi, [rsp+28h+var_28] call _ZNSt6vectorIcSaIcEEC2Ev; std::vector<char>::vector(void) mov rdi, [rsp+28h+var_20] add rdi, 50h ; 'P' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rax, [rsp+28h+var_20] lea rcx, aToControlTheBe+2Bh; "" mov [rax+70h], rcx mov qword ptr [rax+78h], 0 mov qword ptr [rax+80h], 0 xorps xmm0, xmm0 movsd qword ptr [rax+88h], xmm0 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(void) mov cl, al mov rax, [rsp+28h+var_20] movsx ecx, cl mov [rax+90h], ecx add rsp, 28h retn
long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer( long long a1, _QWORD *a2, char a3) { char decimal_point; // cl long long result; // rax *(_QWORD *)a1 = *a2; *(_QWORD *)(a1 + 8) = a2[1]; *(_BYTE *)(a1 + 16) = a3 & 1; *(_DWORD *)(a1 + 20) = std::char_traits<char>::eof(); *(_BYTE *)(a1 + 24) = 0; *(_QWORD *)(a1 + 32) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = 0LL; memset(a1 + 56, 0LL, 24LL); std::vector<char>::vector(a1 + 56); std::string::basic_string(a1 + 80); *(_QWORD *)(a1 + 112) = ""; *(_QWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; decimal_point = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(); result = a1; *(_DWORD *)(a1 + 144) = decimal_point; return result; }
lexer: SUB RSP,0x28 MOV AL,DL MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI AND AL,0x1 MOV byte ptr [RSP + 0x17],AL MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV CL,byte ptr [RSP + 0x17] AND CL,0x1 MOV byte ptr [RAX + 0x10],CL CALL 0x001aed40 MOV RDI,qword ptr [RSP + 0x8] MOV dword ptr [RDI + 0x14],EAX MOV byte ptr [RDI + 0x18],0x0 MOV qword ptr [RDI + 0x20],0x0 MOV qword ptr [RDI + 0x28],0x0 MOV qword ptr [RDI + 0x30],0x0 ADD RDI,0x38 MOV qword ptr [RSP],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x0014f470 MOV RDI,qword ptr [RSP] CALL 0x00187aa0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x50 CALL 0x0014f4e0 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x2b4512] MOV qword ptr [RAX + 0x70],RCX MOV qword ptr [RAX + 0x78],0x0 MOV qword ptr [RAX + 0x80],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RAX + 0x88],XMM0 CALL 0x001aed50 MOV CL,AL MOV RAX,qword ptr [RSP + 0x8] MOVSX ECX,CL MOV dword ptr [RAX + 0x90],ECX ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >&&, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::lexer(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this,iterator_input_adapter *param_1,bool param_2) { char cVar1; int4 uVar2; *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = *(int8 *)(param_1 + 8); this[0x10] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )param_2; uVar2 = std::char_traits<char>::eof(); *(int4 *)(this + 0x14) = uVar2; this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; memset((vector<char,std::allocator<char>> *)(this + 0x38),0,0x18); std::vector<char,std::allocator<char>>::vector((vector<char,std::allocator<char>> *)(this + 0x38)) ; std::__cxx11::string::string((string *)(this + 0x50)); *(char **)(this + 0x70) = ""; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; cVar1 = get_decimal_point(); *(int *)(this + 0x90) = (int)cVar1; return; }
36,016
tree_record_pos
eloqsql/mysys/tree.c
ha_rows tree_record_pos(TREE *tree, const void *key, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; double left= 1; double right= tree->elements_in_tree; while (element != &null_element) { if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), key)) == 0) { switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_BEFORE_KEY: cmp= 1; break; case HA_READ_AFTER_KEY: cmp= -1; break; default: return HA_POS_ERROR; } } if (cmp < 0) /* element < key */ { element= element->right; left= (left + right) / 2; } else { element= element->left; right= (left + right) / 2; } } switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_BEFORE_KEY: return (ha_rows) right; case HA_READ_AFTER_KEY: return (ha_rows) left; default: return HA_POS_ERROR; } }
O3
c
tree_record_pos: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebx movl 0x20c(%rdi), %eax cvtsi2sd %rax, %xmm0 movapd %xmm0, -0x50(%rbp) movq (%rdi), %r13 leaq 0x2e1964(%rip), %rax # 0x38cc20 cmpq %rax, %r13 je 0xab379 movq %rcx, %r14 movq %rdi, %r15 movq %rsi, %r12 movsd 0x32d8a(%rip), %xmm0 # 0xde060 movapd %xmm0, -0x40(%rbp) movl 0x208(%r15), %esi testq %rsi, %rsi je 0xab2ec addq %r13, %rsi jmp 0xab2f0 movq 0x18(%r13), %rsi movq %r14, %rdi movq %r12, %rdx callq *0x228(%r15) testl %eax, %eax je 0xab339 movapd -0x40(%rbp), %xmm0 addsd -0x50(%rbp), %xmm0 mulsd 0x32d3d(%rip), %xmm0 # 0xde050 testl %eax, %eax js 0xab31e movapd %xmm0, -0x50(%rbp) jmp 0xab323 movapd %xmm0, -0x40(%rbp) shrl $0x1f, %eax movq (%r13,%rax,8), %r13 leaq 0x2e18ee(%rip), %rax # 0x38cc20 cmpq %rax, %r13 jne 0xab2db jmp 0xab353 movl $0x1, %eax testl %ebx, %ebx je 0xab301 cmpl $0x4, %ebx je 0xab301 cmpl $0x3, %ebx jne 0xab3c6 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0xab301 movapd -0x40(%rbp), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x32cdc(%rip), %xmm0 # 0xde048 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax jmp 0xab37e movl $0x1, %eax cmpl $0x4, %ebx je 0xab393 cmpl $0x3, %ebx je 0xab3b7 movq $-0x1, %rax testl %ebx, %ebx jne 0xab3b7 movapd -0x50(%rbp), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x32c9c(%rip), %xmm0 # 0xde048 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $-0x1, %rax jmp 0xab3b7
tree_record_pos: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, edx mov eax, [rdi+20Ch] cvtsi2sd xmm0, rax movapd [rbp+var_50], xmm0 mov r13, [rdi] lea rax, null_element cmp r13, rax jz loc_AB379 mov r14, rcx mov r15, rdi mov r12, rsi movsd xmm0, cs:qword_DE060 movapd [rbp+var_40], xmm0 loc_AB2DB: mov esi, [r15+208h] test rsi, rsi jz short loc_AB2EC add rsi, r13 jmp short loc_AB2F0 loc_AB2EC: mov rsi, [r13+18h] loc_AB2F0: mov rdi, r14 mov rdx, r12 call qword ptr [r15+228h] test eax, eax jz short loc_AB339 loc_AB301: movapd xmm0, [rbp+var_40] addsd xmm0, qword ptr [rbp+var_50] mulsd xmm0, cs:qword_DE050 test eax, eax js short loc_AB31E movapd [rbp+var_50], xmm0 jmp short loc_AB323 loc_AB31E: movapd [rbp+var_40], xmm0 loc_AB323: shr eax, 1Fh mov r13, [r13+rax*8+0] lea rax, null_element cmp r13, rax jnz short loc_AB2DB jmp short loc_AB353 loc_AB339: mov eax, 1 test ebx, ebx jz short loc_AB301 cmp ebx, 4 jz short loc_AB301 cmp ebx, 3 jnz short loc_AB3C6 mov eax, 0FFFFFFFFh jmp short loc_AB301 loc_AB353: movapd xmm0, [rbp+var_40] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_DE048 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx jmp short loc_AB37E loc_AB379: mov eax, 1 loc_AB37E: cmp ebx, 4 jz short loc_AB393 cmp ebx, 3 jz short loc_AB3B7 mov rax, 0FFFFFFFFFFFFFFFFh test ebx, ebx jnz short loc_AB3B7 loc_AB393: movapd xmm0, [rbp+var_50] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_DE048 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_AB3B7: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_AB3C6: mov rax, 0FFFFFFFFFFFFFFFFh jmp short loc_AB3B7
long long tree_record_pos(long long a1, long long a2, int a3, long long a4) { _QWORD *v5; // r13 char *v8; // rsi int v9; // eax __int128 v10; // xmm0 long long result; // rax double v12; // [rsp+0h] [rbp-50h] __int128 v13; // [rsp+10h] [rbp-40h] v12 = (double)*(int *)(a1 + 524); v5 = *(_QWORD **)a1; if ( *(_UNKNOWN **)a1 != &null_element ) { v13 = 0x3FF0000000000000uLL; while ( 1 ) { if ( *(_DWORD *)(a1 + 520) ) v8 = (char *)v5 + *(unsigned int *)(a1 + 520); else v8 = (char *)v5[3]; v9 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a4, v8, a2); if ( !v9 ) { v9 = 1; if ( a3 ) { if ( a3 != 4 ) { if ( a3 != 3 ) return -1LL; v9 = -1; } } } *((_QWORD *)&v10 + 1) = *((_QWORD *)&v13 + 1); if ( v9 < 0 ) { *(double *)&v10 = (*(double *)&v13 + v12) * 0.5; v13 = v10; } else { v12 = (*(double *)&v13 + v12) * 0.5; } v5 = (_QWORD *)v5[(unsigned int)v9 >> 31]; if ( v5 == (_QWORD *)&null_element ) { result = (unsigned int)(int)*(double *)&v13; goto LABEL_17; } } } result = 1LL; LABEL_17: if ( a3 == 4 ) return (unsigned int)(int)v12; if ( a3 != 3 ) { result = -1LL; if ( !a3 ) return (unsigned int)(int)v12; } return result; }
tree_record_pos: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,EDX MOV EAX,dword ptr [RDI + 0x20c] CVTSI2SD XMM0,RAX MOVAPD xmmword ptr [RBP + -0x50],XMM0 MOV R13,qword ptr [RDI] LEA RAX,[0x48cc20] CMP R13,RAX JZ 0x001ab379 MOV R14,RCX MOV R15,RDI MOV R12,RSI MOVSD XMM0,qword ptr [0x001de060] MOVAPD xmmword ptr [RBP + -0x40],XMM0 LAB_001ab2db: MOV ESI,dword ptr [R15 + 0x208] TEST RSI,RSI JZ 0x001ab2ec ADD RSI,R13 JMP 0x001ab2f0 LAB_001ab2ec: MOV RSI,qword ptr [R13 + 0x18] LAB_001ab2f0: MOV RDI,R14 MOV RDX,R12 CALL qword ptr [R15 + 0x228] TEST EAX,EAX JZ 0x001ab339 LAB_001ab301: MOVAPD XMM0,xmmword ptr [RBP + -0x40] ADDSD XMM0,qword ptr [RBP + -0x50] MULSD XMM0,qword ptr [0x001de050] TEST EAX,EAX JS 0x001ab31e MOVAPD xmmword ptr [RBP + -0x50],XMM0 JMP 0x001ab323 LAB_001ab31e: MOVAPD xmmword ptr [RBP + -0x40],XMM0 LAB_001ab323: SHR EAX,0x1f MOV R13,qword ptr [R13 + RAX*0x8] LEA RAX,[0x48cc20] CMP R13,RAX JNZ 0x001ab2db JMP 0x001ab353 LAB_001ab339: MOV EAX,0x1 TEST EBX,EBX JZ 0x001ab301 CMP EBX,0x4 JZ 0x001ab301 CMP EBX,0x3 JNZ 0x001ab3c6 MOV EAX,0xffffffff JMP 0x001ab301 LAB_001ab353: MOVAPD XMM0,xmmword ptr [RBP + -0x40] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x001de048] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX JMP 0x001ab37e LAB_001ab379: MOV EAX,0x1 LAB_001ab37e: CMP EBX,0x4 JZ 0x001ab393 CMP EBX,0x3 JZ 0x001ab3b7 MOV RAX,-0x1 TEST EBX,EBX JNZ 0x001ab3b7 LAB_001ab393: MOVAPD XMM0,xmmword ptr [RBP + -0x50] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x001de048] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX LAB_001ab3b7: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001ab3c6: MOV RAX,-0x1 JMP 0x001ab3b7
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong tree_record_pos(long *param_1,int8 param_2,int param_3,int8 param_4) { uint uVar1; ulong uVar2; int1 *puVar3; int1 *puVar4; double dVar5; double local_58; double local_48; local_58 = (double)*(uint *)((long)param_1 + 0x20c); puVar4 = (int1 *)*param_1; if (puVar4 == null_element) { uVar2 = 1; } else { local_48 = DAT_001de060; do { if ((ulong)*(uint *)(param_1 + 0x41) == 0) { puVar3 = *(int1 **)(puVar4 + 0x18); } else { puVar3 = puVar4 + *(uint *)(param_1 + 0x41); } uVar1 = (*(code *)param_1[0x45])(param_4,puVar3,param_2); if (((uVar1 == 0) && (uVar1 = 1, param_3 != 0)) && (param_3 != 4)) { if (param_3 != 3) { return 0xffffffffffffffff; } uVar1 = 0xffffffff; } dVar5 = (local_48 + local_58) * DAT_001de050; if (-1 < (int)uVar1) { local_58 = dVar5; dVar5 = local_48; } local_48 = dVar5; puVar4 = *(int1 **)(puVar4 + (ulong)(uVar1 >> 0x1f) * 8); } while (puVar4 != null_element); uVar2 = (long)(local_48 - _DAT_001de048) & (long)local_48 >> 0x3f | (long)local_48; } if ((param_3 == 4) || ((param_3 != 3 && (uVar2 = 0xffffffffffffffff, param_3 == 0)))) { uVar2 = (long)(local_58 - _DAT_001de048) & (long)local_58 >> 0x3f | (long)local_58; } return uVar2; }
36,017
minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable, std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body) : TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
O3
cpp
minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r9, %r14 movq %r8, %r15 movq %rcx, %r12 movq %rdi, %rbx leaq 0x90c5a(%rip), %r13 # 0x12ffc8 addq $0x10, %r13 movq %r13, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x9f39e movq 0x91bf0(%rip), %rcx # 0x130f80 cmpb $0x0, (%rcx) je 0x9f39a incl 0x8(%rax) jmp 0x9f39e lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x90cd3(%rip), %rax # 0x130080 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi movq %rdx, %rsi callq 0x2685c movq 0x38(%rsp), %rax movb 0x30(%rsp), %cl xorl %edx, %edx movq %rdx, 0x40(%rbx) movups (%r12), %xmm0 movq %rdx, 0x8(%r12) movups %xmm0, 0x38(%rbx) movq %rdx, (%r12) movq %rdx, 0x50(%rbx) movups (%r15), %xmm0 movq %rdx, 0x8(%r15) movups %xmm0, 0x48(%rbx) movq %rdx, (%r15) movq %rdx, 0x60(%rbx) movups (%r14), %xmm0 movq %rdx, 0x8(%r14) movups %xmm0, 0x58(%rbx) movq %rdx, (%r14) movb %cl, 0x68(%rbx) movq %rdx, 0x78(%rbx) movups (%rax), %xmm0 movq %rdx, 0x8(%rax) movups %xmm0, 0x70(%rbx) movq %rdx, (%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %r13, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x9f43a callq 0x725dc movq %r14, %rdi callq 0x1c030
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_: push r15 push r14 push r13 push r12 push rbx mov r14, r9 mov r15, r8 mov r12, rcx mov rbx, rdi lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r13, 10h mov [rdi], r13 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_9F39E mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_9F39A inc dword ptr [rax+8] jmp short loc_9F39E loc_9F39A: lock inc dword ptr [rax+8] loc_9F39E: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] mov rsi, rdx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov rax, [rsp+28h+arg_8] mov cl, [rsp+28h+arg_0] xor edx, edx mov [rbx+40h], rdx movups xmm0, xmmword ptr [r12] mov [r12+8], rdx movups xmmword ptr [rbx+38h], xmm0 mov [r12], rdx mov [rbx+50h], rdx movups xmm0, xmmword ptr [r15] mov [r15+8], rdx movups xmmword ptr [rbx+48h], xmm0 mov [r15], rdx mov [rbx+60h], rdx movups xmm0, xmmword ptr [r14] mov [r14+8], rdx movups xmmword ptr [rbx+58h], xmm0 mov [r14], rdx mov [rbx+68h], cl mov [rbx+78h], rdx movups xmm0, xmmword ptr [rax] mov [rax+8], rdx movups xmmword ptr [rbx+70h], xmm0 mov [rax], rdx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov [rbx], r13 mov rdi, [rbx+10h] test rdi, rdi jz short loc_9F43A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9F43A: mov rdi, r14 call __Unwind_Resume
long long minja::ForNode::ForNode( long long a1, _QWORD *a2, _QWORD *a3, __int128 *a4, __int128 *a5, __int128 *a6, char a7, __int128 *a8) { long long v11; // rax long long result; // rax __int128 v13; // xmm0 __int128 v14; // xmm0 __int128 v15; // xmm0 __int128 v16; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v11 = a2[1]; *(_QWORD *)(a1 + 16) = v11; if ( v11 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v11 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v11 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::ForNode + 2; std::vector<std::string>::vector(a1 + 32, a3); result = (long long)a8; *(_QWORD *)(a1 + 64) = 0LL; v13 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 56) = v13; *(_QWORD *)a4 = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v14 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v14; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v15 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v15; *(_QWORD *)a6 = 0LL; *(_BYTE *)(a1 + 104) = a7; *(_QWORD *)(a1 + 120) = 0LL; v16 = *a8; *((_QWORD *)a8 + 1) = 0LL; *(_OWORD *)(a1 + 112) = v16; *(_QWORD *)a8 = 0LL; return result; }
ForNode: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R12,RCX MOV RBX,RDI LEA R13,[0x22ffc8] ADD R13,0x10 MOV qword ptr [RDI],R13 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x0019f39e MOV RCX,qword ptr [0x00230f80] CMP byte ptr [RCX],0x0 JZ 0x0019f39a INC dword ptr [RAX + 0x8] JMP 0x0019f39e LAB_0019f39a: INC.LOCK dword ptr [RAX + 0x8] LAB_0019f39e: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x230080] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LAB_0019f3b8: MOV RSI,RDX CALL 0x0012685c LAB_0019f3c0: MOV RAX,qword ptr [RSP + 0x38] MOV CL,byte ptr [RSP + 0x30] XOR EDX,EDX MOV qword ptr [RBX + 0x40],RDX MOVUPS XMM0,xmmword ptr [R12] MOV qword ptr [R12 + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x38],XMM0 MOV qword ptr [R12],RDX MOV qword ptr [RBX + 0x50],RDX MOVUPS XMM0,xmmword ptr [R15] MOV qword ptr [R15 + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV qword ptr [R15],RDX MOV qword ptr [RBX + 0x60],RDX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [R14],RDX MOV byte ptr [RBX + 0x68],CL MOV qword ptr [RBX + 0x78],RDX MOVUPS XMM0,xmmword ptr [RAX] MOV qword ptr [RAX + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x70],XMM0 MOV qword ptr [RAX],RDX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::ForNode::ForNode (ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4, shared_ptr *param_5,bool param_6,shared_ptr *param_7) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_0022ffd8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00230f80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_00230090; /* try { // try from 0019f3b8 to 0019f3bf has its CatchHandler @ 0019f426 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20), param_2); *(int8 *)(this + 0x40) = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x38) = *(int8 *)param_3; *(int8 *)(this + 0x40) = uVar2; *(int8 *)param_3 = 0; *(int8 *)(this + 0x50) = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x48) = *(int8 *)param_4; *(int8 *)(this + 0x50) = uVar2; *(int8 *)param_4 = 0; *(int8 *)(this + 0x60) = 0; uVar2 = *(int8 *)(param_5 + 8); *(int8 *)(param_5 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_5; *(int8 *)(this + 0x60) = uVar2; *(int8 *)param_5 = 0; this[0x68] = (ForNode)param_6; *(int8 *)(this + 0x78) = 0; uVar2 = *(int8 *)(param_7 + 8); *(int8 *)(param_7 + 8) = 0; *(int8 *)(this + 0x70) = *(int8 *)param_7; *(int8 *)(this + 0x78) = uVar2; *(int8 *)param_7 = 0; return; }
36,018
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O3
c
my_hash_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x38(%rbp) movl (%rcx), %ebx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %rbx je 0x4eead movq %rsi, %r15 movq %rdi, %r12 movq %rcx, -0x30(%rbp) movq 0x28(%rdi), %r13 shlq $0x4, %rbx addq %r13, %rbx movl (%rbx), %r14d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x4eea3 movq %r14, %rax shlq $0x4, %rax leaq (%rax,%r13), %rbx movq 0x8(%r13,%rax), %rsi movq %r12, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq 0x4eda5 testl %eax, %eax jne 0x4ee66 movq -0x30(%rbp), %rax movl %r14d, (%rax) movq 0x8(%rbx), %rax jmp 0x4eeaf movq -0x30(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdx mov ebx, [rcx] mov eax, 0FFFFFFFFh cmp rbx, rax jz short loc_4EEAD mov r15, rsi mov r12, rdi mov [rbp+var_30], rcx mov r13, [rdi+28h] shl rbx, 4 add rbx, r13 loc_4EE66: mov r14d, [rbx] mov eax, 0FFFFFFFFh cmp r14, rax jz short loc_4EEA3 mov rax, r14 shl rax, 4 lea rbx, [rax+r13] mov rsi, [r13+rax+8] mov rdi, r12 mov rdx, r15 mov rcx, [rbp+var_38] call hashcmp test eax, eax jnz short loc_4EE66 mov rax, [rbp+var_30] mov [rax], r14d mov rax, [rbx+8] jmp short loc_4EEAF loc_4EEA3: mov rax, [rbp+var_30] mov dword ptr [rax], 0FFFFFFFFh loc_4EEAD: xor eax, eax loc_4EEAF: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_next(_QWORD *a1, long long a2, long long a3, _DWORD *a4) { long long v4; // rbx long long v5; // r13 unsigned int *v6; // rbx long long v7; // r14 v4 = (unsigned int)*a4; if ( v4 != 0xFFFFFFFFLL ) { v5 = a1[5]; v6 = (unsigned int *)(v5 + 16 * v4); while ( 1 ) { v7 = *v6; if ( v7 == 0xFFFFFFFFLL ) break; v6 = (unsigned int *)(16 * v7 + v5); if ( !hashcmp(a1, *((_QWORD *)v6 + 1), a2, a3) ) { *a4 = v7; return *((_QWORD *)v6 + 1); } } *a4 = -1; } return 0LL; }
my_hash_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDX MOV EBX,dword ptr [RCX] MOV EAX,0xffffffff CMP RBX,RAX JZ 0x0014eead MOV R15,RSI MOV R12,RDI MOV qword ptr [RBP + -0x30],RCX MOV R13,qword ptr [RDI + 0x28] SHL RBX,0x4 ADD RBX,R13 LAB_0014ee66: MOV R14D,dword ptr [RBX] MOV EAX,0xffffffff CMP R14,RAX JZ 0x0014eea3 MOV RAX,R14 SHL RAX,0x4 LEA RBX,[RAX + R13*0x1] MOV RSI,qword ptr [R13 + RAX*0x1 + 0x8] MOV RDI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL 0x0014eda5 TEST EAX,EAX JNZ 0x0014ee66 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],R14D MOV RAX,qword ptr [RBX + 0x8] JMP 0x0014eeaf LAB_0014eea3: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0xffffffff LAB_0014eead: XOR EAX,EAX LAB_0014eeaf: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { uint uVar1; long lVar2; int iVar3; long lVar4; int8 uVar5; uint *puVar6; if ((ulong)*param_4 == 0xffffffff) { LAB_0014eead: uVar5 = 0; } else { lVar2 = *(long *)(param_1 + 0x28); puVar6 = (uint *)((ulong)*param_4 * 0x10 + lVar2); do { uVar1 = *puVar6; if ((ulong)uVar1 == 0xffffffff) { *param_4 = 0xffffffff; goto LAB_0014eead; } lVar4 = (ulong)uVar1 * 0x10; puVar6 = (uint *)(lVar4 + lVar2); iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3); } while (iVar3 != 0); *param_4 = uVar1; uVar5 = *(int8 *)(puVar6 + 2); } return uVar5; }
36,019
common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_deepseek_r1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { std::vector<std::string> tool_rules; foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; std::string name = function["name"]; auto parameters = function["parameters"]; auto args_rule = builder.add_schema(name + "-args", parameters); tool_rules.push_back(builder.add_rule(name + "-call", "\"<|tool▁call▁begin|>function<|tool▁sep|>" + name + "\\n```json\\n\" " + args_rule + " \"```<|tool▁call▁end|>\"")); }); data.grammar_triggers.push_back({"<|tool▁calls▁begin|>", /* .at_start = */ false}); data.preserved_tokens = { "<|tool▁sep|>", "<|tool▁call▁end|>", }; builder.add_rule("root", "\"<|tool▁calls▁begin|>\" (" + string_join(tool_rules, " | ") + ")" + (inputs.parallel_tool_calls ? "*" : "") + " space"); }, grammar_options); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_DEEPSEEK_R1; return data; }
O3
cpp
common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) xorl %eax, %eax movb %al, 0x8(%rdi) movq %rax, 0x10(%rdi) leaq 0x28(%rdi), %rcx movq %rcx, 0x18(%rdi) movq %rax, 0x20(%rdi) movb %al, 0x28(%rdi) movb %al, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %rax, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x1db02(%rip), %rsi # 0xf1971 callq 0xa7d5b movb %al, 0x38(%rbx) leaq 0x8(%rsp), %rsi movq %r14, (%rsi) movq %rbx, 0x8(%rsi) leaq 0xc926(%rip), %rax # 0xe07b0 movq %rax, 0x18(%rsi) leaq 0xcf63(%rip), %rax # 0xe0df8 movq %rax, 0x10(%rsi) leaq 0x23a08(%rip), %rdx # 0xf78a8 leaq 0x28(%rsp), %rdi callq 0xbdec8 leaq 0x18(%rbx), %rdi leaq 0x28(%rsp), %r12 movq %r12, %rsi callq 0x1bc30 movq (%r12), %rdi leaq 0x38(%rsp), %r12 cmpq %r12, %rdi je 0xd3ed6 movq 0x38(%rsp), %rsi incq %rsi callq 0x1ba20 movq 0x18(%rsp), %rax testq %rax, %rax je 0xd3eef leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movzbl 0x10(%r14), %eax testl %eax, %eax je 0xd3f1f cmpl $0x2, %eax je 0xd3f02 cmpl $0x1, %eax jne 0xd3f0f movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xd3f1f leaq 0x10(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x6046c jmp 0xd3f2d movb $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) movzbl 0x68(%r14), %r8d leaq 0x48(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx callq 0xa447a leaq 0x58(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x8275c movb 0x8(%rbx), %al leaq 0x58(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x60938 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0xd3fa9 movq 0x38(%rsp), %rsi incq %rsi callq 0x1ba20 leaq 0x48(%rsp), %rdi callq 0x60938 leaq 0x8(%rsp), %rdi callq 0x60938 movl $0x5, (%rbx) addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 jmp 0xd4027 jmp 0xd4037 movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0xd3ff5 movq 0x38(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0xd3ff5 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x60938 leaq 0x8(%rsp), %rdi callq 0x60938 jmp 0xd4027 movq %rax, %r14 movq 0x18(%rsp), %rax testq %rax, %rax je 0xd4027 leaq 0x8(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x8128e movq %r14, %rdi callq 0x1c1e0 movq %rax, %rdi callq 0x2290d
_ZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputs: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor eax, eax mov [rdi+8], al mov [rdi+10h], rax lea rcx, [rdi+28h] mov [rdi+18h], rcx mov [rdi+20h], rax mov [rdi+28h], al mov [rdi+38h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], rax lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+88h+var_80] mov [rsi], r14 mov [rsi+8], rbx lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_deepseek_r1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+88h+var_60] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+88h+var_60] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r12, [rsp+88h+var_50] cmp rdi, r12 jz short loc_D3ED6 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D3ED6: mov rax, [rsp+88h+var_70] test rax, rax jz short loc_D3EEF lea rdi, [rsp+88h+var_80] mov rsi, rdi mov edx, 3 call rax loc_D3EEF: movzx eax, byte ptr [r14+10h] test eax, eax jz short loc_D3F1F cmp eax, 2 jz short loc_D3F02 cmp eax, 1 jnz short loc_D3F0F loc_D3F02: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_D3F1F loc_D3F0F: lea rsi, [r14+10h] lea rdi, [rsp+88h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_D3F2D loc_D3F1F: mov [rsp+88h+var_80], 0 mov [rsp+88h+var_78], 0 loc_D3F2D: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+88h+var_40] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+88h+var_88], 1 lea rdi, [rsp+88h+var_60] lea rcx, [rsp+88h+var_80] mov rsi, r15 mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) lea rdi, [rsp+88h+var_30] lea rsi, [rsp+88h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+88h+var_30] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+88h+var_60]; void * cmp rdi, r12 jz short loc_D3FA9 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D3FA9: lea rdi, [rsp+88h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+88h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 5 add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov r14, rax jmp short loc_D4027 jmp short loc_D4037 mov r14, rax mov rdi, [rsp+88h+var_60]; void * cmp rdi, r12 jz short loc_D3FF5 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D3FF5 mov r14, rax loc_D3FF5: lea rdi, [rsp+88h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+88h+var_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_D4027 mov r14, rax mov rax, [rsp+88h+var_70] test rax, rax jz short loc_D4027 lea rdi, [rsp+88h+var_80] mov rsi, rdi mov edx, 3 call rax loc_D4027: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume loc_D4037: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_deepseek_r1( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v4; // rcx int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d char v9; // al long long v10; // rax long long result; // rax long long v12; // [rsp+8h] [rbp-80h] BYREF const minja::chat_template *v13; // [rsp+10h] [rbp-78h] long long ( *v14)(); // [rsp+18h] [rbp-70h] long long ( *v15)(); // [rsp+20h] [rbp-68h] void *v16[2]; // [rsp+28h] [rbp-60h] BYREF _QWORD v17[2]; // [rsp+38h] [rbp-50h] BYREF _BYTE v18[8]; // [rsp+48h] [rbp-40h] BYREF long long v19; // [rsp+50h] [rbp-38h] char v20[8]; // [rsp+58h] [rbp-30h] BYREF long long v21; // [rsp+60h] [rbp-28h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v12 = a3; v13 = a1; v15 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_deepseek_r1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v16, (long long)&v12, grammar_options, v4, v5, v6); std::string::operator=((char *)a1 + 24, v16); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); if ( v14 ) ((void ( *)(long long *, long long *, long long))v14)(&v12, &v12, 3LL); v7 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v7 == 2 || v7 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v12) = 0; v13 = 0LL; } else { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)&v12, (unsigned __int8 *)(a3 + 16)); } v8 = *(unsigned __int8 *)(a3 + 104); v18[0] = 0; v19 = 0LL; minja::chat_template::apply((long long)v16, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v12, v8, v18, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v20); v9 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v20[0]; v20[0] = v9; v10 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v21; v21 = v10; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v18); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v12); *(_DWORD *)a1 = 5; return result; }
common_chat_params_init_deepseek_r1: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR EAX,EAX MOV byte ptr [RDI + 0x8],AL MOV qword ptr [RDI + 0x10],RAX LEA RCX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],RAX MOV byte ptr [RDI + 0x28],AL MOV byte ptr [RDI + 0x38],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],RAX LEA RDI,[RDX + 0x20] LEA RSI,[0x1f1971] CALL 0x001a7d5b MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R14 MOV qword ptr [RSI + 0x8],RBX LEA RAX,[0x1e07b0] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1e0df8] MOV qword ptr [RSI + 0x10],RAX LAB_001d3e99: LEA RDX,[0x1f78a8] LEA RDI,[RSP + 0x28] CALL 0x001bdec8 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x28] MOV RSI,R12 CALL 0x0011bc30 MOV RDI,qword ptr [R12] LEA R12,[RSP + 0x38] CMP RDI,R12 JZ 0x001d3ed6 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011ba20 LAB_001d3ed6: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x001d3eef LAB_001d3ee0: LEA RDI,[RSP + 0x8] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d3eef: MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX JZ 0x001d3f1f CMP EAX,0x2 JZ 0x001d3f02 CMP EAX,0x1 JNZ 0x001d3f0f LAB_001d3f02: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001d3f1f LAB_001d3f0f: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x8] CALL 0x0016046c JMP 0x001d3f2d LAB_001d3f1f: MOV byte ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 LAB_001d3f2d: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x48] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001d3f43: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x28] LEA RCX,[RSP + 0x8] MOV RSI,R15 MOV RDX,R14 CALL 0x001a447a LAB_001d3f5f: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x28] CALL 0x0018275c MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0x58] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x00160938 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x001d3fa9 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011ba20 LAB_001d3fa9: LEA RDI,[RSP + 0x48] CALL 0x00160938 LEA RDI,[RSP + 0x8] CALL 0x00160938 MOV dword ptr [RBX],0x5 ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_params_init_deepseek_r1(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_deepseek_r1(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; ulong local_80; chat_template *local_78; code *local_70; code *local_68; long *local_60 [2]; long local_50 [2]; data local_40 [8]; int8 local_38; chat_template local_30 [8]; int8 local_28; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_68 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_deepseek_r1(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_70 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_deepseek_r1(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001d3e99 to 001d3ea9 has its CatchHandler @ 001d400b */ local_80 = in_RDX; local_78 = param_1; build_grammar_abi_cxx11_((function *)local_60,(common_grammar_options *)&local_80); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_60); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (local_70 != (code *)0x0) { /* try { // try from 001d3ee0 to 001d3eee has its CatchHandler @ 001d3fd4 */ (*local_70)(&local_80,&local_80,3); } cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_80 = local_80 & 0xffffffffffffff00; local_78 = (chat_template *)0x0; } else { /* try { // try from 001d3f0f to 001d3f1c has its CatchHandler @ 001d3fcf */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_80,(basic_json *)(in_RDX + 0x10)); } local_40[0] = (data)0x0; local_38 = 0; /* try { // try from 001d3f43 to 001d3f5e has its CatchHandler @ 001d3ff2 */ minja::chat_template::apply ((basic_json *)local_60,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_80, *(bool *)(in_RDX + 0x68)); /* try { // try from 001d3f5f to 001d3f6d has its CatchHandler @ 001d3fd6 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_30,local_60); cVar3 = param_1[8]; param_1[8] = local_30[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_28; local_30[0] = cVar3; local_28 = uVar2; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_30); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_80); *(int4 *)param_1 = 5; return; }
36,020
LefDefParser::lefiPin::setNumProperty(char const*, double, char const*, char)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
void lefiPin::setNumProperty(const char *name, double d, const char *value, const char type) { int len; if (numProperties_ == propertiesAllocated_) bumpProps(); len = strlen(name) + 1; propNames_[numProperties_] = (char*) lefMalloc(len); strcpy(propNames_[numProperties_], CASE(name)); len = strlen(value) + 1; propValues_[numProperties_] = (char*) lefMalloc(len); strcpy(propValues_[numProperties_], CASE(value)); propNums_[numProperties_] = d; propTypes_[numProperties_] = type; numProperties_ += 1; }
O0
cpp
LefDefParser::lefiPin::setNumProperty(char const*, double, char const*, char): subq $0x48, %rsp movb %cl, %al movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movsd %xmm0, 0x30(%rsp) movq %rdx, 0x28(%rsp) movb %al, 0x27(%rsp) movq 0x40(%rsp), %rcx movq %rcx, 0x18(%rsp) movl 0x28c(%rcx), %eax cmpl 0x290(%rcx), %eax jne 0x43251 movq 0x18(%rsp), %rdi callq 0x42ff0 movq 0x38(%rsp), %rdi callq 0x20d0 addq $0x1, %rax movl %eax, 0x20(%rsp) movslq 0x20(%rsp), %rdi callq 0x359d0 movq 0x18(%rsp), %rcx movq %rax, %rsi movq 0x298(%rcx), %rax movslq 0x28c(%rcx), %rdx movq %rsi, (%rax,%rdx,8) movq 0x298(%rcx), %rax movslq 0x28c(%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) movq 0x38(%rsp), %rdi callq 0x3f780 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x2250 movq 0x28(%rsp), %rdi callq 0x20d0 addq $0x1, %rax movl %eax, 0x20(%rsp) movslq 0x20(%rsp), %rdi callq 0x359d0 movq 0x18(%rsp), %rcx movq %rax, %rsi movq 0x2a0(%rcx), %rax movslq 0x28c(%rcx), %rdx movq %rsi, (%rax,%rdx,8) movq 0x2a0(%rcx), %rax movslq 0x28c(%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rdi callq 0x3f780 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x2250 movq 0x18(%rsp), %rax movsd 0x30(%rsp), %xmm0 movq 0x2a8(%rax), %rcx movslq 0x28c(%rax), %rdx movsd %xmm0, (%rcx,%rdx,8) movb 0x27(%rsp), %sil movq 0x2b0(%rax), %rcx movslq 0x28c(%rax), %rdx movb %sil, (%rcx,%rdx) movl 0x28c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x28c(%rax) addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser7lefiPin14setNumPropertyEPKcdS2_c: sub rsp, 48h mov al, cl mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi movsd [rsp+48h+var_18], xmm0 mov [rsp+48h+var_20], rdx mov [rsp+48h+var_21], al mov rcx, [rsp+48h+var_8] mov [rsp+48h+var_30], rcx mov eax, [rcx+28Ch] cmp eax, [rcx+290h] jnz short loc_43251 mov rdi, [rsp+48h+var_30]; this call _ZN12LefDefParser7lefiPin9bumpPropsEv; LefDefParser::lefiPin::bumpProps(void) loc_43251: mov rdi, [rsp+48h+var_10] call _strlen add rax, 1 mov [rsp+48h+var_28], eax movsxd rdi, [rsp+48h+var_28]; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, [rsp+48h+var_30] mov rsi, rax; char * mov rax, [rcx+298h] movsxd rdx, dword ptr [rcx+28Ch] mov [rax+rdx*8], rsi mov rax, [rcx+298h] movsxd rcx, dword ptr [rcx+28Ch] mov rax, [rax+rcx*8] mov [rsp+48h+var_40], rax mov rdi, [rsp+48h+var_10]; this call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*) mov rdi, [rsp+48h+var_40] mov rsi, rax; unsigned __int64 call _strcpy mov rdi, [rsp+48h+var_20] call _strlen add rax, 1 mov [rsp+48h+var_28], eax movsxd rdi, [rsp+48h+var_28]; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, [rsp+48h+var_30] mov rsi, rax; char * mov rax, [rcx+2A0h] movsxd rdx, dword ptr [rcx+28Ch] mov [rax+rdx*8], rsi mov rax, [rcx+2A0h] movsxd rcx, dword ptr [rcx+28Ch] mov rax, [rax+rcx*8] mov [rsp+48h+var_38], rax mov rdi, [rsp+48h+var_20]; this call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*) mov rdi, [rsp+48h+var_38] mov rsi, rax call _strcpy mov rax, [rsp+48h+var_30] movsd xmm0, [rsp+48h+var_18] mov rcx, [rax+2A8h] movsxd rdx, dword ptr [rax+28Ch] movsd qword ptr [rcx+rdx*8], xmm0 mov sil, [rsp+48h+var_21] mov rcx, [rax+2B0h] movsxd rdx, dword ptr [rax+28Ch] mov [rcx+rdx], sil mov ecx, [rax+28Ch] add ecx, 1 mov [rax+28Ch], ecx add rsp, 48h retn
LefDefParser::lefiPin * LefDefParser::lefiPin::setNumProperty( LefDefParser::lefiPin *this, char *a2, double a3, LefDefParser *a4, char a5) { int v5; // eax char *v6; // rax LefDefParser *v7; // rax char *v8; // rax LefDefParser *v9; // rax LefDefParser::lefiPin *result; // rax long long v11; // [rsp+8h] [rbp-40h] long long v12; // [rsp+10h] [rbp-38h] int v13; // [rsp+20h] [rbp-28h] if ( *((_DWORD *)this + 163) == *((_DWORD *)this + 164) ) LefDefParser::lefiPin::bumpProps(this, a2); v5 = strlen(a2); v6 = (char *)LefDefParser::lefMalloc((LefDefParser *)(v5 + 1)); *(_QWORD *)(*((_QWORD *)this + 83) + 8LL * *((int *)this + 163)) = v6; v11 = *(_QWORD *)(*((_QWORD *)this + 83) + 8LL * *((int *)this + 163)); v7 = LefDefParser::CASE((LefDefParser *)a2, v6); strcpy(v11, v7); v13 = strlen(a4) + 1; v8 = (char *)LefDefParser::lefMalloc((LefDefParser *)v13); *(_QWORD *)(*((_QWORD *)this + 84) + 8LL * *((int *)this + 163)) = v8; v12 = *(_QWORD *)(*((_QWORD *)this + 84) + 8LL * *((int *)this + 163)); v9 = LefDefParser::CASE(a4, v8); strcpy(v12, v9); result = this; *(double *)(*((_QWORD *)this + 85) + 8LL * *((int *)this + 163)) = a3; *(_BYTE *)(*((_QWORD *)this + 86) + (int)(*((_DWORD *)this + 163))++) = a5; return result; }
setNumProperty: SUB RSP,0x48 MOV AL,CL MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOVSD qword ptr [RSP + 0x30],XMM0 MOV qword ptr [RSP + 0x28],RDX MOV byte ptr [RSP + 0x27],AL MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RCX MOV EAX,dword ptr [RCX + 0x28c] CMP EAX,dword ptr [RCX + 0x290] JNZ 0x00143251 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00142ff0 LAB_00143251: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001020d0 ADD RAX,0x1 MOV dword ptr [RSP + 0x20],EAX MOVSXD RDI,dword ptr [RSP + 0x20] CALL 0x001359d0 MOV RCX,qword ptr [RSP + 0x18] MOV RSI,RAX MOV RAX,qword ptr [RCX + 0x298] MOVSXD RDX,dword ptr [RCX + 0x28c] MOV qword ptr [RAX + RDX*0x8],RSI MOV RAX,qword ptr [RCX + 0x298] MOVSXD RCX,dword ptr [RCX + 0x28c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x0013f780 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x00102250 MOV RDI,qword ptr [RSP + 0x28] CALL 0x001020d0 ADD RAX,0x1 MOV dword ptr [RSP + 0x20],EAX MOVSXD RDI,dword ptr [RSP + 0x20] CALL 0x001359d0 MOV RCX,qword ptr [RSP + 0x18] MOV RSI,RAX MOV RAX,qword ptr [RCX + 0x2a0] MOVSXD RDX,dword ptr [RCX + 0x28c] MOV qword ptr [RAX + RDX*0x8],RSI MOV RAX,qword ptr [RCX + 0x2a0] MOVSXD RCX,dword ptr [RCX + 0x28c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x0013f780 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x00102250 MOV RAX,qword ptr [RSP + 0x18] MOVSD XMM0,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x2a8] MOVSXD RDX,dword ptr [RAX + 0x28c] MOVSD qword ptr [RCX + RDX*0x8],XMM0 MOV SIL,byte ptr [RSP + 0x27] MOV RCX,qword ptr [RAX + 0x2b0] MOVSXD RDX,dword ptr [RAX + 0x28c] MOV byte ptr [RCX + RDX*0x1],SIL MOV ECX,dword ptr [RAX + 0x28c] ADD ECX,0x1 MOV dword ptr [RAX + 0x28c],ECX ADD RSP,0x48 RET
/* LefDefParser::lefiPin::setNumProperty(char const*, double, char const*, char) */ void __thiscall LefDefParser::lefiPin::setNumProperty (lefiPin *this,char *param_1,double param_2,char *param_3,char param_4) { char *pcVar1; size_t sVar2; int8 uVar3; char *pcVar4; if (*(int *)(this + 0x28c) == *(int *)(this + 0x290)) { bumpProps(this); } sVar2 = strlen(param_1); uVar3 = lefMalloc((long)((int)sVar2 + 1)); *(int8 *)(*(long *)(this + 0x298) + (long)*(int *)(this + 0x28c) * 8) = uVar3; pcVar1 = *(char **)(*(long *)(this + 0x298) + (long)*(int *)(this + 0x28c) * 8); pcVar4 = (char *)CASE(param_1); strcpy(pcVar1,pcVar4); sVar2 = strlen(param_3); uVar3 = lefMalloc((long)((int)sVar2 + 1)); *(int8 *)(*(long *)(this + 0x2a0) + (long)*(int *)(this + 0x28c) * 8) = uVar3; pcVar1 = *(char **)(*(long *)(this + 0x2a0) + (long)*(int *)(this + 0x28c) * 8); pcVar4 = (char *)CASE(param_3); strcpy(pcVar1,pcVar4); *(double *)(*(long *)(this + 0x2a8) + (long)*(int *)(this + 0x28c) * 8) = param_2; *(char *)(*(long *)(this + 0x2b0) + (long)*(int *)(this + 0x28c)) = param_4; *(int *)(this + 0x28c) = *(int *)(this + 0x28c) + 1; return; }
36,021
LefDefParser::lefiPin::setNumProperty(char const*, double, char const*, char)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
void lefiPin::setNumProperty(const char *name, double d, const char *value, const char type) { int len; if (numProperties_ == propertiesAllocated_) bumpProps(); len = strlen(name) + 1; propNames_[numProperties_] = (char*) lefMalloc(len); strcpy(propNames_[numProperties_], CASE(name)); len = strlen(value) + 1; propValues_[numProperties_] = (char*) lefMalloc(len); strcpy(propValues_[numProperties_], CASE(value)); propNums_[numProperties_] = d; propTypes_[numProperties_] = type; numProperties_ += 1; }
O3
cpp
LefDefParser::lefiPin::setNumProperty(char const*, double, char const*, char): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movl %ecx, %ebx movq %rdx, %r15 movsd %xmm0, 0x8(%rsp) movq %rsi, %r12 movq %rdi, %r14 movl 0x28c(%rdi), %eax cmpl 0x290(%rdi), %eax jne 0x29ab2 movq %r14, %rdi callq 0x29952 movq %r12, %rdi callq 0x20d0 incl %eax movslq %eax, %rdi callq 0x24985 movq 0x298(%r14), %rcx movslq 0x28c(%r14), %rdx movq %rax, (%rcx,%rdx,8) movq 0x298(%r14), %rax movq (%rax,%rdx,8), %r13 movq %r12, %rdi callq 0x27c0a movq %r13, %rdi movq %rax, %rsi callq 0x21b0 movq %r15, %rdi callq 0x20d0 incl %eax movslq %eax, %rdi callq 0x24985 movq 0x2a0(%r14), %rcx movslq 0x28c(%r14), %rdx movq %rax, (%rcx,%rdx,8) movq 0x2a0(%r14), %rax movq (%rax,%rdx,8), %r12 movq %r15, %rdi callq 0x27c0a movq %r12, %rdi movq %rax, %rsi callq 0x21b0 movq 0x2a8(%r14), %rax movslq 0x28c(%r14), %rcx movsd 0x8(%rsp), %xmm0 movsd %xmm0, (%rax,%rcx,8) movq 0x2b0(%r14), %rax movb %bl, (%rax,%rcx) incl 0x28c(%r14) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN12LefDefParser7lefiPin14setNumPropertyEPKcdS2_c: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov ebx, ecx mov r15, rdx movsd [rsp+38h+var_30], xmm0 mov r12, rsi mov r14, rdi mov eax, [rdi+28Ch] cmp eax, [rdi+290h] jnz short loc_29AB2 mov rdi, r14; this call _ZN12LefDefParser7lefiPin9bumpPropsEv; LefDefParser::lefiPin::bumpProps(void) loc_29AB2: mov rdi, r12 call _strlen inc eax movsxd rdi, eax; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, [r14+298h] movsxd rdx, dword ptr [r14+28Ch] mov [rcx+rdx*8], rax mov rax, [r14+298h] mov r13, [rax+rdx*8] mov rdi, r12; this call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*) mov rdi, r13 mov rsi, rax; char * call _strcpy mov rdi, r15 call _strlen inc eax movsxd rdi, eax; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, [r14+2A0h] movsxd rdx, dword ptr [r14+28Ch] mov [rcx+rdx*8], rax mov rax, [r14+2A0h] mov r12, [rax+rdx*8] mov rdi, r15; this call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*) mov rdi, r12 mov rsi, rax call _strcpy mov rax, [r14+2A8h] movsxd rcx, dword ptr [r14+28Ch] movsd xmm0, [rsp+38h+var_30] movsd qword ptr [rax+rcx*8], xmm0 mov rax, [r14+2B0h] mov [rax+rcx], bl inc dword ptr [r14+28Ch] add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long LefDefParser::lefiPin::setNumProperty( LefDefParser::lefiPin *this, LefDefParser *a2, double a3, LefDefParser *a4, char a5) { int v7; // eax long long v8; // rax long long v9; // rdx long long v10; // r13 char *v11; // rsi int v12; // eax long long v13; // rax long long v14; // rdx long long v15; // r12 LefDefParser *v16; // rax long long v17; // rcx long long result; // rax if ( *((_DWORD *)this + 163) == *((_DWORD *)this + 164) ) LefDefParser::lefiPin::bumpProps(this, a2); v7 = strlen(a2); v8 = LefDefParser::lefMalloc((LefDefParser *)(v7 + 1)); v9 = *((int *)this + 163); *(_QWORD *)(*((_QWORD *)this + 83) + 8 * v9) = v8; v10 = *(_QWORD *)(*((_QWORD *)this + 83) + 8 * v9); v11 = (char *)LefDefParser::CASE(a2, (char *)a2); strcpy(v10, v11); v12 = strlen(a4); v13 = LefDefParser::lefMalloc((LefDefParser *)(v12 + 1)); v14 = *((int *)this + 163); *(_QWORD *)(*((_QWORD *)this + 84) + 8 * v14) = v13; v15 = *(_QWORD *)(*((_QWORD *)this + 84) + 8 * v14); v16 = LefDefParser::CASE(a4, v11); strcpy(v15, v16); v17 = *((int *)this + 163); *(double *)(*((_QWORD *)this + 85) + 8 * v17) = a3; result = *((_QWORD *)this + 86); *(_BYTE *)(result + v17) = a5; ++*((_DWORD *)this + 163); return result; }
setNumProperty: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBX,ECX MOV R15,RDX MOVSD qword ptr [RSP + 0x8],XMM0 MOV R12,RSI MOV R14,RDI MOV EAX,dword ptr [RDI + 0x28c] CMP EAX,dword ptr [RDI + 0x290] JNZ 0x00129ab2 MOV RDI,R14 CALL 0x00129952 LAB_00129ab2: MOV RDI,R12 CALL 0x001020d0 INC EAX MOVSXD RDI,EAX CALL 0x00124985 MOV RCX,qword ptr [R14 + 0x298] MOVSXD RDX,dword ptr [R14 + 0x28c] MOV qword ptr [RCX + RDX*0x8],RAX MOV RAX,qword ptr [R14 + 0x298] MOV R13,qword ptr [RAX + RDX*0x8] MOV RDI,R12 CALL 0x00127c0a MOV RDI,R13 MOV RSI,RAX CALL 0x001021b0 MOV RDI,R15 CALL 0x001020d0 INC EAX MOVSXD RDI,EAX CALL 0x00124985 MOV RCX,qword ptr [R14 + 0x2a0] MOVSXD RDX,dword ptr [R14 + 0x28c] MOV qword ptr [RCX + RDX*0x8],RAX MOV RAX,qword ptr [R14 + 0x2a0] MOV R12,qword ptr [RAX + RDX*0x8] MOV RDI,R15 CALL 0x00127c0a MOV RDI,R12 MOV RSI,RAX CALL 0x001021b0 MOV RAX,qword ptr [R14 + 0x2a8] MOVSXD RCX,dword ptr [R14 + 0x28c] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV RAX,qword ptr [R14 + 0x2b0] MOV byte ptr [RAX + RCX*0x1],BL INC dword ptr [R14 + 0x28c] ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* LefDefParser::lefiPin::setNumProperty(char const*, double, char const*, char) */ void __thiscall LefDefParser::lefiPin::setNumProperty (lefiPin *this,char *param_1,double param_2,char *param_3,char param_4) { int iVar1; size_t sVar2; int8 uVar3; char *pcVar4; char *pcVar5; pcVar5 = param_1; if (*(int *)(this + 0x28c) == *(int *)(this + 0x290)) { bumpProps(); } sVar2 = strlen(param_1); uVar3 = lefMalloc((LefDefParser *)(long)((int)sVar2 + 1),(ulong)pcVar5); iVar1 = *(int *)(this + 0x28c); *(int8 *)(*(long *)(this + 0x298) + (long)iVar1 * 8) = uVar3; pcVar5 = *(char **)(*(long *)(this + 0x298) + (long)iVar1 * 8); pcVar4 = (char *)CASE(param_1); strcpy(pcVar5,pcVar4); sVar2 = strlen(param_3); uVar3 = lefMalloc((LefDefParser *)(long)((int)sVar2 + 1),(ulong)pcVar4); iVar1 = *(int *)(this + 0x28c); *(int8 *)(*(long *)(this + 0x2a0) + (long)iVar1 * 8) = uVar3; pcVar5 = *(char **)(*(long *)(this + 0x2a0) + (long)iVar1 * 8); pcVar4 = (char *)CASE(param_3); strcpy(pcVar5,pcVar4); iVar1 = *(int *)(this + 0x28c); *(double *)(*(long *)(this + 0x2a8) + (long)iVar1 * 8) = param_2; *(char *)(*(long *)(this + 0x2b0) + (long)iVar1) = param_4; *(int *)(this + 0x28c) = *(int *)(this + 0x28c) + 1; return; }
36,022
ma_write_undo_key_delete
eloqsql/storage/maria/ma_delete.c
my_bool _ma_write_undo_key_delete(MARIA_HA *info, const MARIA_KEY *key, my_off_t new_root, LSN *res_lsn) { MARIA_SHARE *share= info->s; uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + KEY_NR_STORE_SIZE + PAGE_STORE_SIZE], *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; struct st_msg_to_write_hook_for_undo_key msg; enum translog_record_type log_type= LOGREC_UNDO_KEY_DELETE; uint keynr= key->keyinfo->key_nr; lsn_store(log_data, info->trn->undo_lsn); key_nr_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, keynr); log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + KEY_NR_STORE_SIZE; /** @todo BUG if we had concurrent insert/deletes, reading state's key_root like this would be unsafe. */ if (new_root != share->state.key_root[keynr]) { my_off_t page; page= ((new_root == HA_OFFSET_ERROR) ? IMPOSSIBLE_PAGE_NO : new_root / share->block_size); page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; log_type= LOGREC_UNDO_KEY_DELETE_WITH_ROOT; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key->data; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (key->data_length + key->ref_length); msg.root= &share->state.key_root[keynr]; msg.value= new_root; /* set autoincrement to 1 if this is an auto_increment key This is only used if we are now in a rollback of a duplicate key */ msg.auto_increment= share->base.auto_key == keynr + 1; return translog_write_record(res_lsn, log_type, info->trn, info, (translog_size_t) (log_array[TRANSLOG_INTERNAL_PARTS + 0].length + log_array[TRANSLOG_INTERNAL_PARTS + 1].length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data + LSN_STORE_SIZE, &msg) ? -1 : 0; }
O0
c
ma_write_undo_key_delete: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl $0x17, -0xb4(%rbp) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movzbl 0xa5(%rax), %eax movl %eax, -0xb8(%rbp) jmp 0x6b9b4 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax sarq $0x20, %rax movb %al, -0x17(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, -0x16(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, -0x15(%rbp) jmp 0x6b9fe leaq -0x17(%rbp), %rax addq $0x3, %rax movq %rax, -0xc0(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rcx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0x98(%rcx), %rax movl %eax, %ecx movq -0xc0(%rbp), %rax movl %ecx, (%rax) jmp 0x6ba33 movl -0xb8(%rbp), %eax movb %al, -0xe(%rbp) leaq -0x17(%rbp), %rax addq $0x7, %rax addq $0x2, %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movq -0x40(%rbp), %rcx movq 0x118(%rcx), %rcx movl -0xb8(%rbp), %edx cmpq (%rcx,%rdx,8), %rax je 0x6bafb cmpq $-0x1, -0x30(%rbp) jne 0x6ba89 movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF movq %rax, -0xd8(%rbp) jmp 0x6baa3 movq -0x30(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xd8(%rbp) movq -0xd8(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0x48(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0xc8(%rbp), %rax movl %eax, %ecx movq -0xd0(%rbp), %rax movl %ecx, (%rax) movq -0xc8(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xd0(%rbp), %rax movb %cl, 0x4(%rax) movq -0x48(%rbp), %rax addq $0x5, %rax movq %rax, -0x48(%rbp) movl $0x18, -0xb4(%rbp) leaq -0x17(%rbp), %rcx movq %rcx, -0x70(%rbp) movl -0x48(%rbp), %eax subl %ecx, %eax movq %rax, -0x68(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rcx movl 0x10(%rcx), %eax movl 0x14(%rcx), %ecx addl %ecx, %eax movq %rax, -0x58(%rbp) movq -0x40(%rbp), %rax movq 0x118(%rax), %rax movl -0xb8(%rbp), %ecx leaq (%rax,%rcx,8), %rax movq %rax, -0xb0(%rbp) movq -0x30(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0x40(%rbp), %rax movl 0x3ec(%rax), %eax movl -0xb8(%rbp), %ecx incl %ecx subl %ecx, %eax sete %al movzbl %al, %eax movq %rax, -0x98(%rbp) movq -0x38(%rbp), %rdi movl -0xb4(%rbp), %esi movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rdx movl -0x68(%rbp), %r8d movl -0x58(%rbp), %eax addl %eax, %r8d leaq -0x10(%rbp), %r9 movq %rsp, %rax leaq -0xb0(%rbp), %r10 movq %r10, 0x10(%rax) movq %r9, 0x8(%rax) leaq -0x90(%rbp), %r9 movq %r9, (%rax) movl $0x4, %r9d callq 0x302c0 movb %al, %cl xorl %eax, %eax negb %cl sbbl %eax, %eax movb %al, -0xd9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x6bbe5 movb -0xd9(%rbp), %al addq $0x100, %rsp # imm = 0x100 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
_ma_write_undo_key_delete: push rbp mov rbp, rsp sub rsp, 100h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_38], rcx mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_40], rax mov [rbp+var_B4], 17h mov rax, [rbp+var_28] mov rax, [rax+8] movzx eax, byte ptr [rax+0A5h] mov [rbp+var_B8], eax jmp short $+2 loc_6B9B4: mov rax, [rbp+var_20] mov rax, [rax+8] mov rax, [rax+98h] sar rax, 20h mov [rbp+var_17], al mov rax, [rbp+var_20] mov rax, [rax+8] mov rax, [rax+98h] sar rax, 20h shr eax, 8 mov [rbp+var_16], al mov rax, [rbp+var_20] mov rax, [rax+8] mov rax, [rax+98h] sar rax, 20h shr eax, 10h mov [rbp+var_15], al jmp short $+2 loc_6B9FE: lea rax, [rbp+var_17] add rax, 3 mov [rbp+var_C0], rax mov rax, [rbp+var_20] mov rcx, [rax+8] mov rax, 0FFFFFFFFh and rax, [rcx+98h] mov ecx, eax mov rax, [rbp+var_C0] mov [rax], ecx jmp short $+2 loc_6BA33: mov eax, [rbp+var_B8] mov [rbp+var_E], al lea rax, [rbp+var_17] add rax, 7 add rax, 2 add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_40] mov rcx, [rcx+118h] mov edx, [rbp+var_B8] cmp rax, [rcx+rdx*8] jz loc_6BAFB cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jnz short loc_6BA89 mov rax, 0FFFFFFFFFFh mov [rbp+var_D8], rax jmp short loc_6BAA3 loc_6BA89: mov rax, [rbp+var_30] mov rcx, [rbp+var_40] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_D8], rax loc_6BAA3: mov rax, [rbp+var_D8] mov [rbp+var_C8], rax mov rax, [rbp+var_48] mov [rbp+var_D0], rax mov rax, [rbp+var_C8] mov ecx, eax mov rax, [rbp+var_D0] mov [rax], ecx mov rax, [rbp+var_C8] shr rax, 20h mov cl, al mov rax, [rbp+var_D0] mov [rax+4], cl mov rax, [rbp+var_48] add rax, 5 mov [rbp+var_48], rax mov [rbp+var_B4], 18h loc_6BAFB: lea rcx, [rbp+var_17] mov [rbp+var_70], rcx mov eax, dword ptr [rbp+var_48] sub eax, ecx mov [rbp+var_68], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_60], rax mov rcx, [rbp+var_28] mov eax, [rcx+10h] mov ecx, [rcx+14h] add eax, ecx mov [rbp+var_58], rax mov rax, [rbp+var_40] mov rax, [rax+118h] mov ecx, [rbp+var_B8] lea rax, [rax+rcx*8] mov [rbp+var_B0], rax mov rax, [rbp+var_30] mov [rbp+var_A8], rax mov rax, [rbp+var_40] mov eax, [rax+3ECh] mov ecx, [rbp+var_B8] inc ecx sub eax, ecx setz al movzx eax, al mov [rbp+var_98], rax mov rdi, [rbp+var_38] mov esi, [rbp+var_B4] mov rcx, [rbp+var_20] mov rdx, [rcx+8] mov r8d, dword ptr [rbp+var_68] mov eax, dword ptr [rbp+var_58] add r8d, eax lea r9, [rbp+var_10] mov rax, rsp lea r10, [rbp+var_B0] mov [rax+10h], r10 mov [rax+8], r9 lea r9, [rbp+var_90] mov [rax], r9 mov r9d, 4 call translog_write_record mov cl, al xor eax, eax neg cl sbb eax, eax mov [rbp+var_D9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_6BBE5 mov al, [rbp+var_D9] add rsp, 100h pop rbp retn loc_6BBE5: call ___stack_chk_fail
char ma_write_undo_key_delete(long long *a1, long long a2, unsigned long long a3, long long a4) { unsigned long long v5; // [rsp+28h] [rbp-D8h] _DWORD *v6; // [rsp+30h] [rbp-D0h] unsigned int v7; // [rsp+48h] [rbp-B8h] unsigned int v8; // [rsp+4Ch] [rbp-B4h] _QWORD v9[4]; // [rsp+50h] [rbp-B0h] BYREF _QWORD v10[7]; // [rsp+70h] [rbp-90h] BYREF long long v11; // [rsp+A8h] [rbp-58h] _DWORD *v12; // [rsp+B8h] [rbp-48h] long long v13; // [rsp+C0h] [rbp-40h] long long v14; // [rsp+C8h] [rbp-38h] unsigned long long v15; // [rsp+D0h] [rbp-30h] long long v16; // [rsp+D8h] [rbp-28h] long long *v17; // [rsp+E0h] [rbp-20h] _BYTE v18[3]; // [rsp+E9h] [rbp-17h] BYREF int v19; // [rsp+ECh] [rbp-14h] __int16 v20; // [rsp+F0h] [rbp-10h] BYREF char v21; // [rsp+F2h] [rbp-Eh] _BYTE v22[13]; // [rsp+F3h] [rbp-Dh] BYREF *(_QWORD *)&v22[5] = __readfsqword(0x28u); v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = *a1; v8 = 23; v7 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL); v18[0] = BYTE4(*(_QWORD *)(a1[1] + 152)); v18[1] = (unsigned __int16)WORD2(*(_QWORD *)(a1[1] + 152)) >> 8; v18[2] = BYTE6(*(_QWORD *)(a1[1] + 152)); v19 = *(_QWORD *)(a1[1] + 152); v21 = v7; v12 = v22; if ( a3 != *(_QWORD *)(*(_QWORD *)(v13 + 280) + 8LL * v7) ) { if ( v15 == -1LL ) v5 = 0xFFFFFFFFFFLL; else v5 = v15 / *(unsigned int *)(v13 + 1980); v6 = v12; *v12 = v5; *((_BYTE *)v6 + 4) = BYTE4(v5); v12 = (_DWORD *)((char *)v12 + 5); v8 = 24; } v10[4] = v18; v10[5] = (unsigned int)v12 - (unsigned int)v18; v10[6] = *(_QWORD *)v16; v11 = (unsigned int)(*(_DWORD *)(v16 + 20) + *(_DWORD *)(v16 + 16)); v9[0] = *(_QWORD *)(v13 + 280) + 8LL * v7; v9[1] = v15; v9[3] = *(_DWORD *)(v13 + 1004) == v7 + 1; return -(translog_write_record( v14, v8, v17[1], v17, v11 + (_DWORD)v12 - (unsigned int)v18, 4u, v10, &v20, (long long)v9) != 0); }
_ma_write_undo_key_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV qword ptr [RBP + -0x38],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0xb4],0x17 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOVZX EAX,byte ptr [RAX + 0xa5] MOV dword ptr [RBP + -0xb8],EAX JMP 0x0016b9b4 LAB_0016b9b4: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] SAR RAX,0x20 MOV byte ptr [RBP + -0x17],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] SAR RAX,0x20 SHR EAX,0x8 MOV byte ptr [RBP + -0x16],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] SAR RAX,0x20 SHR EAX,0x10 MOV byte ptr [RBP + -0x15],AL JMP 0x0016b9fe LAB_0016b9fe: LEA RAX,[RBP + -0x17] ADD RAX,0x3 MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,0xffffffff AND RAX,qword ptr [RCX + 0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xc0] MOV dword ptr [RAX],ECX JMP 0x0016ba33 LAB_0016ba33: MOV EAX,dword ptr [RBP + -0xb8] MOV byte ptr [RBP + -0xe],AL LEA RAX,[RBP + -0x17] ADD RAX,0x7 ADD RAX,0x2 ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RCX + 0x118] MOV EDX,dword ptr [RBP + -0xb8] CMP RAX,qword ptr [RCX + RDX*0x8] JZ 0x0016bafb CMP qword ptr [RBP + -0x30],-0x1 JNZ 0x0016ba89 MOV RAX,0xffffffffff MOV qword ptr [RBP + -0xd8],RAX JMP 0x0016baa3 LAB_0016ba89: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xd8],RAX LAB_0016baa3: MOV RAX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xd0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0xc8] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xd0] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x5 MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0xb4],0x18 LAB_0016bafb: LEA RCX,[RBP + -0x17] MOV qword ptr [RBP + -0x70],RCX MOV EAX,dword ptr [RBP + -0x48] SUB EAX,ECX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RCX + 0x10] MOV ECX,dword ptr [RCX + 0x14] ADD EAX,ECX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x118] MOV ECX,dword ptr [RBP + -0xb8] LEA RAX,[RAX + RCX*0x8] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x3ec] MOV ECX,dword ptr [RBP + -0xb8] INC ECX SUB EAX,ECX SETZ AL MOVZX EAX,AL MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0xb4] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RCX + 0x8] MOV R8D,dword ptr [RBP + -0x68] MOV EAX,dword ptr [RBP + -0x58] ADD R8D,EAX LEA R9,[RBP + -0x10] MOV RAX,RSP LEA R10,[RBP + -0xb0] MOV qword ptr [RAX + 0x10],R10 MOV qword ptr [RAX + 0x8],R9 LEA R9,[RBP + -0x90] MOV qword ptr [RAX],R9 MOV R9D,0x4 CALL 0x001302c0 MOV CL,AL XOR EAX,EAX NEG CL SBB EAX,EAX MOV byte ptr [RBP + -0xd9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0016bbe5 MOV AL,byte ptr [RBP + -0xd9] ADD RSP,0x100 POP RBP RET LAB_0016bbe5: CALL 0x0012a250
int8 _ma_write_undo_key_delete(long *param_1,int8 *param_2,ulong param_3,int8 param_4) { char cVar1; uint uVar2; uint uVar3; uint uVar4; long in_FS_OFFSET; ulong local_e0; int4 local_bc; long local_b8; ulong local_b0; ulong local_a0; int1 local_98 [32]; int1 *local_78; ulong local_70; int8 local_68; ulong local_60; long *local_50; long local_48; int8 local_40; ulong local_38; int8 *local_30; long *local_28; int1 local_1f; int1 local_1e; int1 local_1d; int4 local_1c; int1 local_18 [2]; byte local_16; int4 local_15; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_48 = *param_1; local_bc = 0x17; local_16 = *(byte *)(param_2[1] + 0xa5); uVar2 = (uint)local_16; local_1f = (int1)((ulong)*(int8 *)(param_1[1] + 0x98) >> 0x20); local_1e = (int1)((ulong)*(int8 *)(param_1[1] + 0x98) >> 0x28); local_1d = (int1)((ulong)*(int8 *)(param_1[1] + 0x98) >> 0x30); local_1c = (int4)*(int8 *)(param_1[1] + 0x98); local_50 = (long *)&local_15; if (param_3 != *(ulong *)(*(long *)(local_48 + 0x118) + (ulong)uVar2 * 8)) { if (param_3 == 0xffffffffffffffff) { local_e0 = 0xffffffffff; } else { local_e0 = param_3 / *(uint *)(local_48 + 0x7bc); } local_15 = (int4)local_e0; local_11 = (int1)(local_e0 >> 0x20); local_50 = &local_10; local_bc = 0x18; } local_78 = &local_1f; uVar3 = (int)local_50 - (int)local_78; local_70 = (ulong)uVar3; local_68 = *param_2; uVar4 = *(int *)(param_2 + 2) + *(int *)((long)param_2 + 0x14); local_60 = (ulong)uVar4; local_b8 = *(long *)(local_48 + 0x118) + (ulong)uVar2 * 8; local_a0 = (ulong)(*(int *)(local_48 + 0x3ec) == uVar2 + 1); local_b0 = param_3; local_40 = param_4; local_38 = param_3; local_30 = param_2; local_28 = param_1; cVar1 = translog_write_record (param_4,local_bc,param_1[1],param_1,uVar3 + uVar4,4,local_98,local_18,&local_b8 ); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),-(cVar1 != '\0')); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
36,023
ma_write_undo_key_delete
eloqsql/storage/maria/ma_delete.c
my_bool _ma_write_undo_key_delete(MARIA_HA *info, const MARIA_KEY *key, my_off_t new_root, LSN *res_lsn) { MARIA_SHARE *share= info->s; uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + KEY_NR_STORE_SIZE + PAGE_STORE_SIZE], *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; struct st_msg_to_write_hook_for_undo_key msg; enum translog_record_type log_type= LOGREC_UNDO_KEY_DELETE; uint keynr= key->keyinfo->key_nr; lsn_store(log_data, info->trn->undo_lsn); key_nr_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, keynr); log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + KEY_NR_STORE_SIZE; /** @todo BUG if we had concurrent insert/deletes, reading state's key_root like this would be unsafe. */ if (new_root != share->state.key_root[keynr]) { my_off_t page; page= ((new_root == HA_OFFSET_ERROR) ? IMPOSSIBLE_PAGE_NO : new_root / share->block_size); page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; log_type= LOGREC_UNDO_KEY_DELETE_WITH_ROOT; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key->data; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (key->data_length + key->ref_length); msg.root= &share->state.key_root[keynr]; msg.value= new_root; /* set autoincrement to 1 if this is an auto_increment key This is only used if we are now in a rollback of a duplicate key */ msg.auto_increment= share->base.auto_key == keynr + 1; return translog_write_record(res_lsn, log_type, info->trn, info, (translog_size_t) (log_array[TRANSLOG_INTERNAL_PARTS + 0].length + log_array[TRANSLOG_INTERNAL_PARTS + 1].length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data + LSN_STORE_SIZE, &msg) ? -1 : 0; }
O3
c
ma_write_undo_key_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rcx, %r11 movq %rdx, %r10 movq %rdi, %rcx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq (%rdi), %rdi movq 0x8(%rsi), %rax movzbl 0xa5(%rax), %ebx movq 0x8(%rcx), %r9 movq 0x98(%r9), %rax movq %rax, %rdx shrq $0x20, %rdx movb %dl, -0x37(%rbp) movq %rax, %rdx shrq $0x28, %rdx movb %dl, -0x36(%rbp) movq %rax, %rdx shrq $0x30, %rdx movb %dl, -0x35(%rbp) movl %eax, -0x34(%rbp) movb %bl, -0x2e(%rbp) movq 0x118(%rdi), %rax leaq (%rax,%rbx,8), %r14 cmpq %r10, (%r14) jne 0x59b73 leaq -0x2d(%rbp), %rdx movl $0x17, %eax jmp 0x59ba7 cmpq $-0x1, %r10 je 0x59b8a movl 0x7bc(%rdi), %r8d movq %r10, %rax xorl %edx, %edx divq %r8 jmp 0x59b94 movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF leaq -0x28(%rbp), %rdx movl %eax, -0x5(%rdx) shrq $0x20, %rax movb %al, -0x1(%rdx) movl $0x18, %eax leaq -0x37(%rbp), %r8 leaq -0xa0(%rbp), %r15 movq %r8, 0x20(%r15) subq %r8, %rdx movl %edx, %r8d movq %r8, 0x28(%r15) movq (%rsi), %r8 movq %r8, 0x30(%r15) movl 0x14(%rsi), %r8d addl 0x10(%rsi), %r8d movq %r8, 0x38(%r15) leaq -0x58(%rbp), %r12 movq %r14, (%r12) movq %r10, 0x8(%r12) incl %ebx xorl %esi, %esi cmpl %ebx, 0x3ec(%rdi) leaq -0x30(%rbp), %r10 sete %sil movq %rsi, 0x18(%r12) addl %edx, %r8d subq $0x8, %rsp movq %r11, %rdi movl %eax, %esi movq %r9, %rdx movl $0x4, %r9d pushq %r12 pushq %r10 pushq %r15 callq 0x2aa10 addq $0x20, %rsp movl %eax, %ecx xorl %eax, %eax negb %cl sbbl %eax, %eax movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x59c42 addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x2a240
_ma_write_undo_key_delete: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r11, rcx mov r10, rdx mov rcx, rdi mov rax, fs:28h mov [rbp+var_28], rax mov rdi, [rdi] mov rax, [rsi+8] movzx ebx, byte ptr [rax+0A5h] mov r9, [rcx+8] mov rax, [r9+98h] mov rdx, rax shr rdx, 20h mov [rbp+var_37], dl mov rdx, rax shr rdx, 28h mov [rbp+var_36], dl mov rdx, rax shr rdx, 30h mov [rbp+var_35], dl mov [rbp+var_34], eax mov [rbp+var_2E], bl mov rax, [rdi+118h] lea r14, [rax+rbx*8] cmp [r14], r10 jnz short loc_59B73 lea rdx, [rbp+var_2D] mov eax, 17h jmp short loc_59BA7 loc_59B73: cmp r10, 0FFFFFFFFFFFFFFFFh jz short loc_59B8A mov r8d, [rdi+7BCh] mov rax, r10 xor edx, edx div r8 jmp short loc_59B94 loc_59B8A: mov rax, 0FFFFFFFFFFh loc_59B94: lea rdx, [rbp+var_28] mov [rdx-5], eax shr rax, 20h mov [rdx-1], al mov eax, 18h loc_59BA7: lea r8, [rbp+var_37] lea r15, [rbp+var_A0] mov [r15+20h], r8 sub rdx, r8 mov r8d, edx mov [r15+28h], r8 mov r8, [rsi] mov [r15+30h], r8 mov r8d, [rsi+14h] add r8d, [rsi+10h] mov [r15+38h], r8 lea r12, [rbp+var_58] mov [r12], r14 mov [r12+8], r10 inc ebx xor esi, esi cmp [rdi+3ECh], ebx lea r10, [rbp+var_30] setz sil mov [r12+18h], rsi add r8d, edx sub rsp, 8 mov rdi, r11 mov esi, eax mov rdx, r9 mov r9d, 4 push r12 push r10 push r15 call translog_write_record add rsp, 20h mov ecx, eax xor eax, eax neg cl sbb eax, eax mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_59C42 add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_59C42: call ___stack_chk_fail
long long ma_write_undo_key_delete(long long *a1, long long *a2, unsigned long long a3, unsigned long long a4) { long long v7; // rdi long long v8; // rbx long long v9; // r9 long long v10; // rax _QWORD *v11; // r14 unsigned long long *v12; // rdx unsigned int v13; // eax unsigned long long v14; // rax unsigned int v15; // edx __int128 v17; // [rsp+0h] [rbp-A0h] BYREF _BYTE *v18; // [rsp+20h] [rbp-80h] long long v19; // [rsp+28h] [rbp-78h] long long v20; // [rsp+30h] [rbp-70h] long long v21; // [rsp+38h] [rbp-68h] _QWORD v22[4]; // [rsp+48h] [rbp-58h] BYREF _BYTE v23[3]; // [rsp+69h] [rbp-37h] BYREF int v24; // [rsp+6Ch] [rbp-34h] __int16 v25; // [rsp+70h] [rbp-30h] BYREF char v26; // [rsp+72h] [rbp-2Eh] int v27; // [rsp+73h] [rbp-2Dh] BYREF char v28; // [rsp+77h] [rbp-29h] unsigned long long v29; // [rsp+78h] [rbp-28h] BYREF long long savedregs; // [rsp+A0h] [rbp+0h] BYREF v29 = __readfsqword(0x28u); v7 = *a1; v8 = *(unsigned __int8 *)(a2[1] + 165); v9 = a1[1]; v10 = *(_QWORD *)(v9 + 152); v23[0] = BYTE4(v10); v23[1] = BYTE5(v10); v23[2] = BYTE6(v10); v24 = v10; v26 = v8; v11 = (_QWORD *)(*(_QWORD *)(v7 + 280) + 8 * v8); if ( *v11 == a3 ) { v12 = (unsigned long long *)&v27; v13 = 23; } else { if ( a3 == -1LL ) v14 = 0xFFFFFFFFFFLL; else v14 = a3 / *(unsigned int *)(v7 + 1980); v12 = &v29; v27 = v14; v28 = BYTE4(v14); v13 = 24; } v18 = v23; v15 = (_DWORD)v12 - ((unsigned int)&savedregs - 55); v19 = v15; v20 = *a2; v21 = (unsigned int)(*((_DWORD *)a2 + 4) + *((_DWORD *)a2 + 5)); v22[0] = v11; v22[1] = a3; v22[3] = *(_DWORD *)(v7 + 1004) == (_DWORD)v8 + 1; return (unsigned int)-((unsigned __int8)translog_write_record( a4, (_WORD *)v13, v9, a1, v15 + (unsigned int)v21, 4, &v17, &v25, (long long)v22) != 0); }
_ma_write_undo_key_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R11,RCX MOV R10,RDX MOV RCX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RSI + 0x8] MOVZX EBX,byte ptr [RAX + 0xa5] MOV R9,qword ptr [RCX + 0x8] MOV RAX,qword ptr [R9 + 0x98] MOV RDX,RAX SHR RDX,0x20 MOV byte ptr [RBP + -0x37],DL MOV RDX,RAX SHR RDX,0x28 MOV byte ptr [RBP + -0x36],DL MOV RDX,RAX SHR RDX,0x30 MOV byte ptr [RBP + -0x35],DL MOV dword ptr [RBP + -0x34],EAX MOV byte ptr [RBP + -0x2e],BL MOV RAX,qword ptr [RDI + 0x118] LEA R14,[RAX + RBX*0x8] CMP qword ptr [R14],R10 JNZ 0x00159b73 LEA RDX,[RBP + -0x2d] MOV EAX,0x17 JMP 0x00159ba7 LAB_00159b73: CMP R10,-0x1 JZ 0x00159b8a MOV R8D,dword ptr [RDI + 0x7bc] MOV RAX,R10 XOR EDX,EDX DIV R8 JMP 0x00159b94 LAB_00159b8a: MOV RAX,0xffffffffff LAB_00159b94: LEA RDX,[RBP + -0x28] MOV dword ptr [RDX + -0x5],EAX SHR RAX,0x20 MOV byte ptr [RDX + -0x1],AL MOV EAX,0x18 LAB_00159ba7: LEA R8,[RBP + -0x37] LEA R15,[RBP + -0xa0] MOV qword ptr [R15 + 0x20],R8 SUB RDX,R8 MOV R8D,EDX MOV qword ptr [R15 + 0x28],R8 MOV R8,qword ptr [RSI] MOV qword ptr [R15 + 0x30],R8 MOV R8D,dword ptr [RSI + 0x14] ADD R8D,dword ptr [RSI + 0x10] MOV qword ptr [R15 + 0x38],R8 LEA R12,[RBP + -0x58] MOV qword ptr [R12],R14 MOV qword ptr [R12 + 0x8],R10 INC EBX XOR ESI,ESI CMP dword ptr [RDI + 0x3ec],EBX LEA R10,[RBP + -0x30] SETZ SIL MOV qword ptr [R12 + 0x18],RSI ADD R8D,EDX SUB RSP,0x8 MOV RDI,R11 MOV ESI,EAX MOV RDX,R9 MOV R9D,0x4 PUSH R12 PUSH R10 PUSH R15 CALL 0x0012aa10 ADD RSP,0x20 MOV ECX,EAX XOR EAX,EAX NEG CL SBB EAX,EAX MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x00159c42 ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00159c42: CALL 0x0012a240
int _ma_write_undo_key_delete(long *param_1,int8 *param_2,ulong param_3,int8 param_4) { long lVar1; int8 uVar2; char cVar3; int4 uVar4; ulong uVar5; int iVar6; uint uVar7; uint uVar8; long in_FS_OFFSET; int1 local_a8 [32]; int1 *local_88; ulong local_80; int8 local_78; ulong local_70; ulong *local_60; ulong local_58; ulong local_48; int1 local_3f; int1 local_3e; int1 local_3d; int4 local_3c; int1 local_38 [2]; byte local_36; int4 local_35; int1 local_31; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *param_1; local_36 = *(byte *)(param_2[1] + 0xa5); uVar2 = *(int8 *)(param_1[1] + 0x98); local_3f = (int1)((ulong)uVar2 >> 0x20); local_3e = (int1)((ulong)uVar2 >> 0x28); local_3d = (int1)((ulong)uVar2 >> 0x30); local_3c = (int4)uVar2; local_60 = (ulong *)(*(long *)(lVar1 + 0x118) + (ulong)local_36 * 8); if (*local_60 == param_3) { iVar6 = (int)&local_35; uVar4 = 0x17; } else { if (param_3 == 0xffffffffffffffff) { uVar5 = 0xffffffffff; } else { uVar5 = param_3 / *(uint *)(lVar1 + 0x7bc); } iVar6 = (int)&local_30; local_35 = (int4)uVar5; local_31 = (int1)(uVar5 >> 0x20); uVar4 = 0x18; } local_88 = &local_3f; uVar7 = iVar6 - (int)local_88; local_80 = (ulong)uVar7; local_78 = *param_2; uVar8 = *(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2); local_70 = (ulong)uVar8; local_48 = (ulong)(*(int *)(lVar1 + 0x3ec) == local_36 + 1); local_58 = param_3; cVar3 = translog_write_record (param_4,uVar4,param_1[1],param_1,uVar8 + uVar7,4,local_a8,local_38,&local_60); if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return -(uint)(cVar3 != '\0'); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
36,024
ftxui::Event::Character(wchar_t)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/event.cpp
Event Event::Character(wchar_t c) { return Event::Character(to_string(std::wstring{c})); }
O2
cpp
ftxui::Event::Character(wchar_t): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %rdx movl %esi, -0x4(%rdx) leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8(%rsp), %r14 leaq 0x4(%rsp), %rsi movq %r14, %rdi callq 0x23d26 leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x318ca leaq 0x28(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x23b4c movq %r14, %rdi callq 0xc8c8 leaq 0x8(%rsp), %rdi callq 0xc070 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xc070 movq %rbx, %rdi callq 0xc7f0
_ZN5ftxui5Event9CharacterEw: push r14 push rbx sub rsp, 48h mov rbx, rdi lea rdx, [rsp+58h+var_50] mov [rdx-4], esi lea rax, [rsp+58h+var_40] mov [rax-10h], rax lea r14, [rsp+58h+var_50] lea rsi, [rsp+58h+var_54] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag; std::wstring::_M_construct<wchar_t const*>(wchar_t const*,wchar_t const*,std::forward_iterator_tag) lea rdi, [rsp+58h+var_30] mov rsi, r14 call _ZN5ftxui9to_stringERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; ftxui::to_string(std::wstring const&) lea r14, [rsp+58h+var_30] mov rdi, rbx mov rsi, r14 call _ZN5ftxui5Event9CharacterENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ftxui::Event::Character(std::string) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+58h+var_50] call __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring() mov rax, rbx add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring() mov rdi, rbx call __Unwind_Resume
ftxui::Event * ftxui::Event::Character(ftxui::Event *a1, int a2) { int v3; // [rsp+4h] [rbp-54h] BYREF _QWORD v4[2]; // [rsp+8h] [rbp-50h] BYREF char v5; // [rsp+18h] [rbp-40h] BYREF _BYTE v6[48]; // [rsp+28h] [rbp-30h] BYREF v3 = a2; v4[0] = &v5; std::wstring::_M_construct<wchar_t const*>(v4, &v3); ftxui::to_string(v6); ftxui::Event::Character(a1, (long long)v6); std::string::~string(v6); std::wstring::~wstring(v4); return a1; }
Character: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA RDX,[RSP + 0x8] MOV dword ptr [RDX + -0x4],ESI LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA R14,[RSP + 0x8] LEA RSI,[RSP + 0x4] MOV RDI,R14 CALL 0x00123d26 LAB_00123be9: LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x001318ca LAB_00123bf6: LEA R14,[RSP + 0x28] MOV RDI,RBX MOV RSI,R14 CALL 0x00123b4c MOV RDI,R14 CALL 0x0010c8c8 LEA RDI,[RSP + 0x8] CALL 0x0010c070 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET
/* ftxui::Event::Character(wchar_t) */ Event * __thiscall ftxui::Event::Character(Event *this,wchar_t param_1) { wchar_t local_54; int1 *local_50 [2]; int1 local_40 [16]; ftxui local_30 [32]; local_50[0] = local_40; local_54 = param_1; std::__cxx11::wstring::_M_construct<wchar_t_const*>(local_50,&local_54); /* try { // try from 00123be9 to 00123bf5 has its CatchHandler @ 00123c23 */ to_string(local_30,(wstring *)local_50); Character(this,(string *)local_30); std::__cxx11::string::~string((string *)local_30); std::__cxx11::wstring::~wstring((wstring *)local_50); return this; }
36,025
std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>> fmt::v10::detail::copy_str<char, char*, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>>(char*, char*, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h
FMT_CONSTEXPR auto copy_str(InputIt begin, InputIt end, OutputIt out) -> OutputIt { while (begin != end) *out++ = static_cast<Char>(*begin++); return out; }
O3
c
std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>> fmt::v10::detail::copy_str<char, char*, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>>(char*, char*, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx cmpq %rsi, %rdi je 0xf1a3c movq %rsi, %r14 movq %rdi, %r15 movb (%r15), %bpl movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0xf1a28 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi incq %r15 movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %bpl, (%rcx,%rax) cmpq %r14, %r15 jne 0xf1a07 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN3fmt3v106detail8copy_strIcPcSt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEEEET1_T0_SA_S9_: push rbp push r15 push r14 push rbx push rax mov rbx, rdx cmp rdi, rsi jz short loc_F1A3C mov r14, rsi mov r15, rdi loc_F1A07: mov bpl, [r15] mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_F1A28 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_F1A28: inc r15 mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], bpl cmp r15, r14 jnz short loc_F1A07 loc_F1A3C: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long fmt::v10::detail::copy_str<char,char *,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>>( char *a1, char *a2, long long a3) { char *v5; // r15 char v6; // bp long long v7; // rax long long v8; // rsi long long v9; // rcx if ( a1 != a2 ) { v5 = a1; do { v6 = *v5; v7 = *(_QWORD *)(a3 + 16); v8 = v7 + 1; if ( *(_QWORD *)(a3 + 24) < (unsigned long long)(v7 + 1) ) { (**(void ( ***)(long long))a3)(a3); v7 = *(_QWORD *)(a3 + 16); v8 = v7 + 1; } ++v5; v9 = *(_QWORD *)(a3 + 8); *(_QWORD *)(a3 + 16) = v8; *(_BYTE *)(v9 + v7) = v6; } while ( v5 != a2 ); } return a3; }
copy_str<char,char*,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX CMP RDI,RSI JZ 0x001f1a3c MOV R14,RSI MOV R15,RDI LAB_001f1a07: MOV BPL,byte ptr [R15] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x001f1a28 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_001f1a28: INC R15 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],BPL CMP R15,R14 JNZ 0x001f1a07 LAB_001f1a3c: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char> > > fmt::v10::detail::copy_str<char, char*, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char> > > >(char*, char*, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char> > >) */ int8 * fmt::v10::detail:: copy_str<char,char*,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>> (int1 *param_1,int1 *param_2,int8 *param_3) { int1 uVar1; long lVar2; ulong uVar3; if (param_1 != param_2) { do { uVar1 = *param_1; lVar2 = param_3[2]; uVar3 = lVar2 + 1; if ((ulong)param_3[3] < uVar3) { (**(code **)*param_3)(param_3); lVar2 = param_3[2]; uVar3 = lVar2 + 1; } param_1 = param_1 + 1; param_3[2] = uVar3; *(int1 *)(param_3[1] + lVar2) = uVar1; } while (param_1 != param_2); } return param_3; }
36,026
ftxui::(anonymous namespace)::Inverted::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/inverted.cpp
void Render(Screen& screen) override { Node::Render(screen); for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { screen.PixelAt(x, y).inverted ^= true; } } }
O3
cpp
ftxui::(anonymous namespace)::Inverted::Render(ftxui::Screen&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 callq 0x23eae movl 0x54(%r14), %r15d movl 0x58(%r14), %ecx cmpl %ecx, %r15d jg 0x38ca9 movl 0x50(%r14), %eax movl 0x4c(%r14), %r12d cmpl %eax, %r12d jg 0x38c9d movq %rbx, %rdi movl %r12d, %esi movl %r15d, %edx callq 0x3985c xorb $0x8, (%rax) leal 0x1(%r12), %ecx movl 0x50(%r14), %eax cmpl %eax, %r12d movl %ecx, %r12d jl 0x38c77 movl 0x58(%r14), %ecx leal 0x1(%r15), %edx cmpl %ecx, %r15d movl %edx, %r15d jl 0x38c6e addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nopl (%rax)
_ZN5ftxui12_GLOBAL__N_18Inverted6RenderERNS_6ScreenE: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi call _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &) mov r15d, [r14+54h] mov ecx, [r14+58h] cmp r15d, ecx jg short loc_38CA9 mov eax, [r14+50h] loc_38C6E: mov r12d, [r14+4Ch] cmp r12d, eax jg short loc_38C9D loc_38C77: mov rdi, rbx; this mov esi, r12d; int mov edx, r15d; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) xor byte ptr [rax], 8 lea ecx, [r12+1] mov eax, [r14+50h] cmp r12d, eax mov r12d, ecx jl short loc_38C77 mov ecx, [r14+58h] loc_38C9D: lea edx, [r15+1] cmp r15d, ecx mov r15d, edx jl short loc_38C6E loc_38CA9: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long ftxui::`anonymous namespace'::Inverted::Render( ftxui::_anonymous_namespace_::Inverted *this, ftxui::Screen *a2) { long long result; // rax int v3; // r15d int v4; // ecx int v5; // r12d _BYTE *v6; // rax bool v7; // cc result = ftxui::Node::Render(this, a2); v3 = *((_DWORD *)this + 21); v4 = *((_DWORD *)this + 22); if ( v3 <= v4 ) { result = *((unsigned int *)this + 20); do { v5 = *((_DWORD *)this + 19); if ( v5 <= (int)result ) { do { v6 = (_BYTE *)ftxui::Screen::PixelAt(a2, v5, v3); *v6 ^= 8u; result = *((unsigned int *)this + 20); v7 = v5++ < (int)result; } while ( v7 ); v4 = *((_DWORD *)this + 22); } v7 = v3++ < v4; } while ( v7 ); } return result; }
Render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CALL 0x00123eae MOV R15D,dword ptr [R14 + 0x54] MOV ECX,dword ptr [R14 + 0x58] CMP R15D,ECX JG 0x00138ca9 MOV EAX,dword ptr [R14 + 0x50] LAB_00138c6e: MOV R12D,dword ptr [R14 + 0x4c] CMP R12D,EAX JG 0x00138c9d LAB_00138c77: MOV RDI,RBX MOV ESI,R12D MOV EDX,R15D CALL 0x0013985c XOR byte ptr [RAX],0x8 LEA ECX,[R12 + 0x1] MOV EAX,dword ptr [R14 + 0x50] CMP R12D,EAX MOV R12D,ECX JL 0x00138c77 MOV ECX,dword ptr [R14 + 0x58] LAB_00138c9d: LEA EDX,[R15 + 0x1] CMP R15D,ECX MOV R15D,EDX JL 0x00138c6e LAB_00138ca9: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* ftxui::(anonymous namespace)::Inverted::Render(ftxui::Screen&) */ void __thiscall ftxui::(anonymous_namespace)::Inverted::Render(Inverted *this,Screen *param_1) { bool bVar1; int iVar2; byte *pbVar3; int iVar4; int iVar5; int iVar6; Node::Render((Node *)this,param_1); iVar4 = *(int *)(this + 0x58); if (*(int *)(this + 0x54) <= iVar4) { iVar2 = *(int *)(this + 0x50); iVar6 = *(int *)(this + 0x54); do { iVar5 = *(int *)(this + 0x4c); if (*(int *)(this + 0x4c) <= iVar2) { do { pbVar3 = (byte *)Screen::PixelAt(param_1,iVar5,iVar6); *pbVar3 = *pbVar3 ^ 8; iVar2 = *(int *)(this + 0x50); bVar1 = iVar5 < iVar2; iVar5 = iVar5 + 1; } while (bVar1); iVar4 = *(int *)(this + 0x58); } bVar1 = iVar6 < iVar4; iVar6 = iVar6 + 1; } while (bVar1); } return; }
36,027
google::protobuf::compiler::java::ClassNameResolver::GetFileImmutableClassName[abi:cxx11](google::protobuf::FileDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/name_resolver.cc
std::string ClassNameResolver::GetFileImmutableClassName( const FileDescriptor* file) { std::string& class_name = file_immutable_outer_class_names_[file]; if (class_name.empty()) { if (file->options().has_java_outer_classname()) { class_name = file->options().java_outer_classname(); } else { class_name = GetFileDefaultImmutableClassName(file); if (HasConflictingClassName(file, class_name, NameEquality::EXACT_EQUAL)) { class_name += kOuterClassNameSuffix; } } } return class_name; }
O0
cpp
google::protobuf::compiler::java::ClassNameResolver::GetFileImmutableClassName[abi:cxx11](google::protobuf::FileDescriptor const*): subq $0x58, %rsp movq %rdi, (%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq 0x48(%rsp), %rdi movq %rdi, 0x10(%rsp) leaq 0x40(%rsp), %rsi callq 0x7deb0 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi callq 0x212d0 testb $0x1, %al jne 0x7c03b jmp 0x7c0d5 movq 0x40(%rsp), %rdi callq 0x59690 movq %rax, %rdi callq 0x7dfb0 testb $0x1, %al jne 0x7c053 jmp 0x7c074 movq 0x40(%rsp), %rdi callq 0x59690 movq %rax, %rdi callq 0x7dfd0 movq %rax, %rsi movq 0x38(%rsp), %rdi callq 0x21be0 jmp 0x7c0d3 movq 0x10(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x18(%rsp), %rdi callq 0x7be70 movq 0x38(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x215e0 leaq 0x18(%rsp), %rdi callq 0x21cc8 movq 0x10(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdx movl $0x1, %ecx callq 0x7c0f0 testb $0x1, %al jne 0x7c0c0 jmp 0x7c0d1 movq 0x476711(%rip), %rsi # 0x4f27d8 movq 0x38(%rsp), %rdi callq 0x21190 jmp 0x7c0d3 jmp 0x7c0d5 movq (%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x21160 movq 0x8(%rsp), %rax addq $0x58, %rsp retq nopl (%rax)
_ZN6google8protobuf8compiler4java17ClassNameResolver25GetFileImmutableClassNameB5cxx11EPKNS0_14FileDescriptorE: sub rsp, 58h mov qword ptr [rsp+58h+var_58], rdi; int mov rax, rdi mov qword ptr [rsp+58h+var_50], rax; int mov qword ptr [rsp+58h+var_8], rdi; int mov qword ptr [rsp+58h+var_10], rsi; int mov [rsp+58h+var_18], rdx; int mov rdi, qword ptr [rsp+58h+var_10] mov qword ptr [rsp+58h+var_48], rdi; int lea rsi, [rsp+58h+var_18] call _ZNSt3mapIPKN6google8protobuf14FileDescriptorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS4_ESaISt4pairIKS4_SA_EEEixERSE_; std::map<google::protobuf::FileDescriptor const*,std::string>::operator[](google::protobuf::FileDescriptor const* const&) mov qword ptr [rsp+58h+var_20], rax; int mov rdi, qword ptr [rsp+58h+var_20] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_7C03B jmp loc_7C0D5 loc_7C03B: mov rdi, [rsp+58h+var_18]; this call _ZNK6google8protobuf14FileDescriptor7optionsEv; google::protobuf::FileDescriptor::options(void) mov rdi, rax; this call _ZNK6google8protobuf11FileOptions24has_java_outer_classnameEv; google::protobuf::FileOptions::has_java_outer_classname(void) test al, 1 jnz short loc_7C053 jmp short loc_7C074 loc_7C053: mov rdi, [rsp+58h+var_18]; this call _ZNK6google8protobuf14FileDescriptor7optionsEv; google::protobuf::FileDescriptor::options(void) mov rdi, rax call _ZNK6google8protobuf11FileOptions20java_outer_classnameB5cxx11Ev; google::protobuf::FileOptions::java_outer_classname(void) mov rsi, rax mov rdi, qword ptr [rsp+58h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short loc_7C0D3 loc_7C074: mov rsi, qword ptr [rsp+58h+var_48] mov rdx, [rsp+58h+var_18] lea rdi, [rsp+58h+var_40]; int call _ZN6google8protobuf8compiler4java17ClassNameResolver32GetFileDefaultImmutableClassNameB5cxx11EPKNS0_14FileDescriptorE; google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName(google::protobuf::FileDescriptor const*) mov rdi, qword ptr [rsp+58h+var_20] lea rsi, [rsp+58h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+58h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, qword ptr [rsp+58h+var_48] mov rsi, [rsp+58h+var_18] mov rdx, qword ptr [rsp+58h+var_20] mov ecx, 1 call _ZN6google8protobuf8compiler4java17ClassNameResolver23HasConflictingClassNameEPKNS0_14FileDescriptorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_12NameEqualityE; google::protobuf::compiler::java::ClassNameResolver::HasConflictingClassName(google::protobuf::FileDescriptor const*,std::string const&,google::protobuf::compiler::java::NameEquality) test al, 1 jnz short loc_7C0C0 jmp short loc_7C0D1 loc_7C0C0: mov rsi, cs:_ZN6google8protobuf8compiler4java12_GLOBAL__N_121kOuterClassNameSuffixE; google::protobuf::compiler::java::`anonymous namespace'::kOuterClassNameSuffix mov rdi, qword ptr [rsp+58h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) loc_7C0D1: jmp short $+2 loc_7C0D3: jmp short $+2 loc_7C0D5: mov rdi, qword ptr [rsp+58h+var_58] mov rsi, qword ptr [rsp+58h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rax, qword ptr [rsp+58h+var_50] add rsp, 58h retn
long long google::protobuf::compiler::java::ClassNameResolver::GetFileImmutableClassName[abi:cxx11]( long long a1, long long a2, google::protobuf::FileDescriptor *a3) { google::protobuf::FileOptions *v3; // rax long long v4; // rax long long v5; // rax int v7[8]; // [rsp+18h] [rbp-40h] BYREF int v8[2]; // [rsp+38h] [rbp-20h] google::protobuf::FileDescriptor *v9; // [rsp+40h] [rbp-18h] BYREF int v10[2]; // [rsp+48h] [rbp-10h] int v11[2]; // [rsp+50h] [rbp-8h] *(_QWORD *)v11 = a1; *(_QWORD *)v10 = a2; v9 = a3; *(_QWORD *)v8 = std::map<google::protobuf::FileDescriptor const*,std::string>::operator[](a2, &v9); if ( (std::string::empty(*(_QWORD *)v8) & 1) != 0 ) { v3 = (google::protobuf::FileOptions *)google::protobuf::FileDescriptor::options(v9); if ( (google::protobuf::FileOptions::has_java_outer_classname(v3) & 1) != 0 ) { v4 = google::protobuf::FileDescriptor::options(v9); v5 = google::protobuf::FileOptions::java_outer_classname[abi:cxx11](v4); std::string::operator=(*(_QWORD *)v8, v5); } else { google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName[abi:cxx11]( (long long)v7, a2, (long long)v9); std::string::operator=(*(_QWORD *)v8, v7); std::string::~string(v7); if ( (google::protobuf::compiler::java::ClassNameResolver::HasConflictingClassName(a2, v9, *(_QWORD *)v8, 1LL) & 1) != 0 ) std::string::operator+=( *(_QWORD *)v8, google::protobuf::compiler::java::`anonymous namespace'::kOuterClassNameSuffix); } } std::string::basic_string(a1, *(_QWORD *)v8); return a1; }
GetFileImmutableClassName[abi:cxx11]: SUB RSP,0x58 MOV qword ptr [RSP],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV RDI,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RDI LEA RSI,[RSP + 0x40] CALL 0x0017deb0 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x001212d0 TEST AL,0x1 JNZ 0x0017c03b JMP 0x0017c0d5 LAB_0017c03b: MOV RDI,qword ptr [RSP + 0x40] CALL 0x00159690 MOV RDI,RAX CALL 0x0017dfb0 TEST AL,0x1 JNZ 0x0017c053 JMP 0x0017c074 LAB_0017c053: MOV RDI,qword ptr [RSP + 0x40] CALL 0x00159690 MOV RDI,RAX CALL 0x0017dfd0 MOV RSI,RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x00121be0 JMP 0x0017c0d3 LAB_0017c074: MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x18] CALL 0x0017be70 MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x18] CALL 0x001215e0 LEA RDI,[RSP + 0x18] CALL 0x00121cc8 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x38] MOV ECX,0x1 CALL 0x0017c0f0 TEST AL,0x1 JNZ 0x0017c0c0 JMP 0x0017c0d1 LAB_0017c0c0: MOV RSI,qword ptr [0x005f27d8] MOV RDI,qword ptr [RSP + 0x38] CALL 0x00121190 LAB_0017c0d1: JMP 0x0017c0d3 LAB_0017c0d3: JMP 0x0017c0d5 LAB_0017c0d5: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00121160 MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x58 RET
/* google::protobuf::compiler::java::ClassNameResolver::GetFileImmutableClassName[abi:cxx11](google::protobuf::FileDescriptor const*) */ FileDescriptor * google::protobuf::compiler::java::ClassNameResolver::GetFileImmutableClassName_abi_cxx11_ (FileDescriptor *param_1) { ulong uVar1; FileOptions *pFVar2; string *psVar3; FileDescriptor *in_RDX; map<google::protobuf::FileDescriptor_const*,std::__cxx11::string,std::less<google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::FileDescriptor_const*const,std::__cxx11::string>>> *in_RSI; FileDescriptor local_40 [32]; string *local_20; FileDescriptor *local_18 [2]; FileDescriptor *local_8; local_18[0] = in_RDX; local_8 = param_1; local_20 = (string *) std:: map<google::protobuf::FileDescriptor_const*,std::__cxx11::string,std::less<google::protobuf::FileDescriptor_const*>,std::allocator<std::pair<google::protobuf::FileDescriptor_const*const,std::__cxx11::string>>> ::operator[](in_RSI,local_18); uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) != 0) { pFVar2 = (FileOptions *)FileDescriptor::options(local_18[0]); uVar1 = FileOptions::has_java_outer_classname(pFVar2); if ((uVar1 & 1) == 0) { GetFileDefaultImmutableClassName_abi_cxx11_(local_40); std::__cxx11::string::operator=(local_20,(string *)local_40); std::__cxx11::string::~string((string *)local_40); uVar1 = HasConflictingClassName((ClassNameResolver *)in_RSI,local_18[0],local_20,1); if ((uVar1 & 1) != 0) { std::__cxx11::string::operator+=(local_20,(anonymous_namespace)::kOuterClassNameSuffix); } } else { pFVar2 = (FileOptions *)FileDescriptor::options(local_18[0]); psVar3 = (string *)FileOptions::java_outer_classname_abi_cxx11_(pFVar2); std::__cxx11::string::operator=(local_20,psVar3); } } std::__cxx11::string::string((string *)param_1,local_20); return param_1; }
36,028
my_uca_charcmp_onelevel
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp_onelevel(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2, uint level) { size_t length1, length2; const uint16 *weight1= my_char_weight_addr(&cs->uca->level[level], wc1); const uint16 *weight2= my_char_weight_addr(&cs->uca->level[level], wc2); if (!weight1 || !weight2) return wc1 != wc2; /* Quickly compare first weights */ if (weight1[0] != weight2[0]) return 1; /* Thoroughly compare all weights */ length1= cs->uca->level[level].lengths[wc1 >> MY_UCA_PSHIFT]; length2= cs->uca->level[level].lengths[wc2 >> MY_UCA_PSHIFT]; if (length1 > length2) return memcmp((const void*)weight1, (const void*)weight2, length2*2) ? 1: weight1[length2]; if (length1 < length2) return memcmp((const void*)weight1, (const void*)weight2, length1*2) ? 1 : weight2[length1]; return memcmp((const void*)weight1, (const void*)weight2, length1*2); }
O0
c
my_uca_charcmp_onelevel: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi movl -0x24(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdi movq -0x18(%rbp), %rax movl %eax, %esi callq 0x57340 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi movl -0x24(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdi movq -0x20(%rbp), %rax movl %eax, %esi callq 0x57340 movq %rax, -0x48(%rbp) cmpq $0x0, -0x40(%rbp) je 0x57207 cmpq $0x0, -0x48(%rbp) jne 0x5721f movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x57328 movq -0x40(%rbp), %rax movzwl (%rax), %eax movq -0x48(%rbp), %rcx movzwl (%rcx), %ecx cmpl %ecx, %eax je 0x5723d movl $0x1, -0x4(%rbp) jmp 0x57328 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx shrq $0x8, %rcx movzbl (%rax,%rcx), %eax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq -0x20(%rbp), %rcx shrq $0x8, %rcx movzbl (%rax,%rcx), %eax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jbe 0x572cd movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x38(%rbp), %rdx shlq %rdx callq 0x25160 cmpl $0x0, %eax je 0x572b6 movl $0x1, %eax movl %eax, -0x4c(%rbp) jmp 0x572c5 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rcx movzwl (%rax,%rcx,2), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x57328 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x57311 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x30(%rbp), %rdx shlq %rdx callq 0x25160 cmpl $0x0, %eax je 0x572fa movl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x57309 movq -0x48(%rbp), %rax movq -0x30(%rbp), %rcx movzwl (%rax,%rcx,2), %eax movl %eax, -0x50(%rbp) movl -0x50(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x57328 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x30(%rbp), %rdx shlq %rdx callq 0x25160 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_charcmp_onelevel: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_10] mov rdi, [rax+60h] mov eax, [rbp+var_24] imul rax, 38h ; '8' add rdi, rax mov rax, [rbp+var_18] mov esi, eax call my_char_weight_addr mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rdi, [rax+60h] mov eax, [rbp+var_24] imul rax, 38h ; '8' add rdi, rax mov rax, [rbp+var_20] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax cmp [rbp+var_40], 0 jz short loc_57207 cmp [rbp+var_48], 0 jnz short loc_5721F loc_57207: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_57328 loc_5721F: mov rax, [rbp+var_40] movzx eax, word ptr [rax] mov rcx, [rbp+var_48] movzx ecx, word ptr [rcx] cmp eax, ecx jz short loc_5723D mov [rbp+var_4], 1 jmp loc_57328 loc_5723D: mov rax, [rbp+var_10] mov rax, [rax+60h] mov ecx, [rbp+var_24] imul rcx, 38h ; '8' add rax, rcx mov rax, [rax+8] mov rcx, [rbp+var_18] shr rcx, 8 movzx eax, byte ptr [rax+rcx] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+60h] mov ecx, [rbp+var_24] imul rcx, 38h ; '8' add rax, rcx mov rax, [rax+8] mov rcx, [rbp+var_20] shr rcx, 8 movzx eax, byte ptr [rax+rcx] mov [rbp+var_38], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jbe short loc_572CD mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_38] shl rdx, 1 call _memcmp cmp eax, 0 jz short loc_572B6 mov eax, 1 mov [rbp+var_4C], eax jmp short loc_572C5 loc_572B6: mov rax, [rbp+var_40] mov rcx, [rbp+var_38] movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4C], eax loc_572C5: mov eax, [rbp+var_4C] mov [rbp+var_4], eax jmp short loc_57328 loc_572CD: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb short loc_57311 mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_30] shl rdx, 1 call _memcmp cmp eax, 0 jz short loc_572FA mov eax, 1 mov [rbp+var_50], eax jmp short loc_57309 loc_572FA: mov rax, [rbp+var_48] mov rcx, [rbp+var_30] movzx eax, word ptr [rax+rcx*2] mov [rbp+var_50], eax loc_57309: mov eax, [rbp+var_50] mov [rbp+var_4], eax jmp short loc_57328 loc_57311: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_30] shl rdx, 1 call _memcmp mov [rbp+var_4], eax loc_57328: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_uca_charcmp_onelevel(long long a1, unsigned long long a2, unsigned long long a3, unsigned int a4) { unsigned __int16 *v7; // [rsp+8h] [rbp-48h] unsigned __int16 *v8; // [rsp+10h] [rbp-40h] unsigned long long v9; // [rsp+18h] [rbp-38h] unsigned long long v10; // [rsp+20h] [rbp-30h] v8 = (unsigned __int16 *)my_char_weight_addr(56LL * a4 + *(_QWORD *)(a1 + 96), (unsigned int)a2); v7 = (unsigned __int16 *)my_char_weight_addr(56LL * a4 + *(_QWORD *)(a1 + 96), (unsigned int)a3); if ( v8 && v7 ) { if ( *v8 == *v7 ) { v10 = *(unsigned __int8 *)(*(_QWORD *)(56LL * a4 + *(_QWORD *)(a1 + 96) + 8) + (a2 >> 8)); v9 = *(unsigned __int8 *)(*(_QWORD *)(56LL * a4 + *(_QWORD *)(a1 + 96) + 8) + (a3 >> 8)); if ( v10 <= v9 ) { if ( v10 >= v9 ) { return (unsigned int)memcmp(v8, v7, 2 * v10); } else if ( !(unsigned int)memcmp(v8, v7, 2 * v10) ) { return v7[v10]; } else { return 1; } } else if ( !(unsigned int)memcmp(v8, v7, 2 * v9) ) { return v8[v9]; } else { return 1; } } else { return 1; } } else { return a2 != a3; } }
my_uca_charcmp_onelevel: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RBP + -0x24] IMUL RAX,RAX,0x38 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV ESI,EAX CALL 0x00157340 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] MOV EAX,dword ptr [RBP + -0x24] IMUL RAX,RAX,0x38 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x20] MOV ESI,EAX CALL 0x00157340 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x40],0x0 JZ 0x00157207 CMP qword ptr [RBP + -0x48],0x0 JNZ 0x0015721f LAB_00157207: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x00157328 LAB_0015721f: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RCX] CMP EAX,ECX JZ 0x0015723d MOV dword ptr [RBP + -0x4],0x1 JMP 0x00157328 LAB_0015723d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x38 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] SHR RCX,0x8 MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JBE 0x001572cd MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x38] SHL RDX,0x1 CALL 0x00125160 CMP EAX,0x0 JZ 0x001572b6 MOV EAX,0x1 MOV dword ptr [RBP + -0x4c],EAX JMP 0x001572c5 LAB_001572b6: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4c],EAX LAB_001572c5: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00157328 LAB_001572cd: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00157311 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x30] SHL RDX,0x1 CALL 0x00125160 CMP EAX,0x0 JZ 0x001572fa MOV EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x00157309 LAB_001572fa: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x50],EAX LAB_00157309: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4],EAX JMP 0x00157328 LAB_00157311: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x30] SHL RDX,0x1 CALL 0x00125160 MOV dword ptr [RBP + -0x4],EAX LAB_00157328: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_uca_charcmp_onelevel(long param_1,ulong param_2,ulong param_3,uint param_4) { int iVar1; short *__s1; short *__s2; ulong uVar2; ulong uVar3; uint local_58; uint local_54; uint local_c; __s1 = (short *)my_char_weight_addr(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38, param_2 & 0xffffffff); __s2 = (short *)my_char_weight_addr(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38, param_3 & 0xffffffff); if ((__s1 == (short *)0x0) || (__s2 == (short *)0x0)) { local_c = (uint)(param_2 != param_3); } else if (*__s1 == *__s2) { uVar2 = (ulong)*(byte *)(*(long *)(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38 + 8) + (param_2 >> 8)); uVar3 = (ulong)*(byte *)(*(long *)(*(long *)(param_1 + 0x60) + (ulong)param_4 * 0x38 + 8) + (param_3 >> 8)); if (uVar3 < uVar2) { iVar1 = memcmp(__s1,__s2,uVar3 << 1); if (iVar1 == 0) { local_54 = (uint)(ushort)__s1[uVar3]; } else { local_54 = 1; } local_c = local_54; } else if (uVar2 < uVar3) { iVar1 = memcmp(__s1,__s2,uVar2 << 1); if (iVar1 == 0) { local_58 = (uint)(ushort)__s2[uVar2]; } else { local_58 = 1; } local_c = local_58; } else { local_c = memcmp(__s1,__s2,uVar2 << 1); } } else { local_c = 1; } return local_c; }
36,029
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const
monkey531[P]llama/common/json.hpp
std::string get_token_string() const { // escape control characters std::string result; for (const auto c : token_string) { if (static_cast<unsigned char>(c) <= '\x1F') { // escape control characters std::array<char, 9> cs{{}}; static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) result += cs.data(); } else { // add character as is result.push_back(static_cast<std::string::value_type>(c)); } } return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x38(%rsi), %r13 movq 0x40(%rsi), %rbp cmpq %rbp, %r13 je 0x59c29 leaq 0x921a2(%rip), %r14 # 0xebd7c leaq 0x8(%rsp), %r15 movzbl (%r13), %ecx cmpl $0x1f, %ecx ja 0x59c16 movb $0x0, 0x10(%rsp) movq $0x0, 0x8(%rsp) movl $0x9, %esi movq %r15, %rdi movq %r14, %rdx xorl %eax, %eax callq 0x1ad70 movq %rbx, %rdi movq %r15, %rsi callq 0x1b070 jmp 0x59c21 movsbl %cl, %esi movq %rbx, %rdi callq 0x1a730 incq %r13 cmpq %rbp, %r13 jne 0x59bdf movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x59c3d movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0x59c54 movq (%r12), %rsi incq %rsi callq 0x1a890 movq %r14, %rdi callq 0x1af20
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov r13, [rsi+38h] mov rbp, [rsi+40h] cmp r13, rbp jz short loc_59C29 lea r14, aU4x; "<U+%.4X>" lea r15, [rsp+48h+var_40] loc_59BDF: movzx ecx, byte ptr [r13+0] cmp ecx, 1Fh ja short loc_59C16 mov [rsp+48h+var_38], 0 mov [rsp+48h+var_40], 0 mov esi, 9 mov rdi, r15 mov rdx, r14 xor eax, eax call _snprintf mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_59C21 loc_59C16: movsx esi, cl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_59C21: inc r13 cmp r13, rbp jnz short loc_59BDF loc_59C29: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_59C3D: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_59C54 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_59C54: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( long long a1, long long a2) { unsigned __int8 *v2; // r13 unsigned __int8 *i; // rbp unsigned int v4; // ecx long long v6; // [rsp+8h] [rbp-40h] BYREF char v7; // [rsp+10h] [rbp-38h] *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v2 = *(unsigned __int8 **)(a2 + 56); for ( i = *(unsigned __int8 **)(a2 + 64); v2 != i; ++v2 ) { v4 = *v2; if ( v4 > 0x1F ) { std::string::push_back(a1, (unsigned int)(char)v4); } else { v7 = 0; v6 = 0LL; snprintf(&v6, 9LL, "<U+%.4X>", v4); std::string::append(a1, &v6); } } return a1; }
get_token_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV R13,qword ptr [RSI + 0x38] MOV RBP,qword ptr [RSI + 0x40] CMP R13,RBP JZ 0x00159c29 LEA R14,[0x1ebd7c] LEA R15,[RSP + 0x8] LAB_00159bdf: MOVZX ECX,byte ptr [R13] CMP ECX,0x1f JA 0x00159c16 MOV byte ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x8],0x0 MOV ESI,0x9 MOV RDI,R15 MOV RDX,R14 XOR EAX,EAX CALL 0x0011ad70 LAB_00159c09: MOV RDI,RBX MOV RSI,R15 CALL 0x0011b070 JMP 0x00159c21 LAB_00159c16: MOVSX ESI,CL MOV RDI,RBX CALL 0x0011a730 LAB_00159c21: INC R13 CMP R13,RBP JNZ 0x00159bdf LAB_00159c29: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_token_string() const */ void nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(void) { byte *pbVar1; long in_RSI; long *in_RDI; byte *pbVar2; char local_40 [16]; *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; pbVar2 = *(byte **)(in_RSI + 0x38); pbVar1 = *(byte **)(in_RSI + 0x40); if (pbVar2 != pbVar1) { do { if (*pbVar2 < 0x20) { local_40[8] = 0; local_40[0] = '\0'; local_40[1] = '\0'; local_40[2] = '\0'; local_40[3] = '\0'; local_40[4] = '\0'; local_40[5] = '\0'; local_40[6] = '\0'; local_40[7] = '\0'; snprintf(local_40,9,"<U+%.4X>"); /* try { // try from 00159c09 to 00159c13 has its CatchHandler @ 00159c3d */ std::__cxx11::string::append((char *)in_RDI); } else { /* try { // try from 00159c16 to 00159c20 has its CatchHandler @ 00159c3b */ std::__cxx11::string::push_back((char)in_RDI); } pbVar2 = pbVar2 + 1; } while (pbVar2 != pbVar1); } return; }
36,030
Render::Render(Context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
csit-sgu[P]mit-game-2025_1/internal.hpp
Render(Context &ctx, std::string filename) : visible(true) { hash = CalculateTextureHash(filename, 0, 0); if (ctx.textures_storage.count(hash) == 0) { Texture tex = LoadTexture(filename.c_str()); ctx.textures_storage[hash] = std::move(tex); } Texture tex = ctx.textures_storage[hash]; width = float(tex.width); height = float(tex.height); path = filename; }
O0
cpp
Render::Render(Context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdx, -0x78(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x88(%rbp) movb $0x1, (%rdi) addq $0x10, %rdi movq %rdi, -0x80(%rbp) callq 0xd720 movq -0x78(%rbp), %rsi leaq -0x38(%rbp), %rdi callq 0xd8f0 jmp 0x19125 movq -0x88(%rbp), %rdi leaq -0x38(%rbp), %rsi movq %rsi, -0xa0(%rbp) xorps %xmm1, %xmm1 movaps %xmm1, %xmm0 callq 0xd790 movq -0xa0(%rbp), %rdi movq %rax, %rcx movq -0x88(%rbp), %rax movq %rax, %rdx addq $0x30, %rdx movq %rdx, -0x98(%rbp) movq %rcx, 0x30(%rax) callq 0xc2b0 movq -0x98(%rbp), %rsi movq -0x10(%rbp), %rdi addq $0x38, %rdi callq 0xd9d0 movq %rax, -0x90(%rbp) jmp 0x19187 movq -0x90(%rbp), %rax cmpq $0x0, %rax jne 0x19201 movq -0x78(%rbp), %rdi callq 0xda30 movq %rax, %rsi leaq -0x58(%rbp), %rdi callq 0x109600 jmp 0x191ab movq -0x88(%rbp), %rsi movq -0x10(%rbp), %rdi addq $0x38, %rdi addq $0x30, %rsi callq 0xcaa0 movq %rax, -0xa8(%rbp) jmp 0x191cc movq -0xa8(%rbp), %rax movq -0x58(%rbp), %rcx movq %rcx, (%rax) movq -0x50(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x48(%rbp), %ecx movl %ecx, 0x10(%rax) jmp 0x19201 movq -0x80(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) callq 0xc2b0 jmp 0x19269 movq -0x88(%rbp), %rsi movq -0x10(%rbp), %rdi addq $0x38, %rdi addq $0x30, %rsi callq 0xcaa0 movq %rax, -0xb0(%rbp) jmp 0x19222 movq -0x78(%rbp), %rsi movq -0x88(%rbp), %rdi movq -0xb0(%rbp), %rax movl 0x10(%rax), %ecx movl %ecx, -0x60(%rbp) movups (%rax), %xmm0 movaps %xmm0, -0x70(%rbp) cvtsi2ssl -0x6c(%rbp), %xmm0 movss %xmm0, 0x4(%rdi) cvtsi2ssl -0x68(%rbp), %xmm0 movss %xmm0, 0x8(%rdi) addq $0x10, %rdi callq 0xda50 jmp 0x19260 addq $0xb0, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0xa9e0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN6RenderC2ER7ContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_78], rdx mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov [rbp+var_88], rdi mov byte ptr [rdi], 1 add rdi, 10h mov [rbp+var_80], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void) mov rsi, [rbp+var_78] lea rdi, [rbp+var_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_19125: mov rdi, [rbp+var_88] lea rsi, [rbp+var_38] mov [rbp+var_A0], rsi xorps xmm1, xmm1 movaps xmm0, xmm1 call _ZN6Render20CalculateTextureHashENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEff; Render::CalculateTextureHash(std::string,float,float) mov rdi, [rbp+var_A0] mov rcx, rax mov rax, [rbp+var_88] mov rdx, rax add rdx, 30h ; '0' mov [rbp+var_98], rdx mov [rax+30h], rcx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rsi, [rbp+var_98] mov rdi, [rbp+var_10] add rdi, 38h ; '8' call _ZNKSt3mapIy7TextureSt4lessIyESaISt4pairIKyS0_EEE5countERS4_; std::map<ulong long,Texture>::count(ulong long const&) mov [rbp+var_90], rax jmp short $+2 loc_19187: mov rax, [rbp+var_90] cmp rax, 0 jnz short loc_19201 mov rdi, [rbp+var_78] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, rax lea rdi, [rbp+var_58] call LoadTexture jmp short $+2 loc_191AB: mov rsi, [rbp+var_88] mov rdi, [rbp+var_10] add rdi, 38h ; '8' add rsi, 30h ; '0' call _ZNSt3mapIy7TextureSt4lessIyESaISt4pairIKyS0_EEEixERS4_; std::map<ulong long,Texture>::operator[](ulong long const&) mov [rbp+var_A8], rax jmp short $+2 loc_191CC: mov rax, [rbp+var_A8] mov rcx, [rbp+var_58] mov [rax], rcx mov rcx, [rbp+var_50] mov [rax+8], rcx mov ecx, [rbp+var_48] mov [rax+10h], ecx jmp short loc_19201 mov rdi, [rbp+var_80] mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_19269 loc_19201: mov rsi, [rbp+var_88] mov rdi, [rbp+var_10] add rdi, 38h ; '8' add rsi, 30h ; '0' call _ZNSt3mapIy7TextureSt4lessIyESaISt4pairIKyS0_EEEixERS4_; std::map<ulong long,Texture>::operator[](ulong long const&) mov [rbp+var_B0], rax jmp short $+2 loc_19222: mov rsi, [rbp+var_78] mov rdi, [rbp+var_88] mov rax, [rbp+var_B0] mov ecx, [rax+10h] mov [rbp+var_60], ecx movups xmm0, xmmword ptr [rax] movaps [rbp+var_70], xmm0 cvtsi2ss xmm0, dword ptr [rbp+var_70+4] movss dword ptr [rdi+4], xmm0 cvtsi2ss xmm0, dword ptr [rbp+var_70+8] movss dword ptr [rdi+8], xmm0 add rdi, 10h call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_19260: add rsp, 0B0h pop rbp retn loc_19269: mov rdi, [rbp+var_40] call __Unwind_Resume
long long Render::Render(long long a1, long long a2, long long a3) { long long v3; // rax __int128 *v5; // [rsp+0h] [rbp-B0h] long long v6; // [rsp+8h] [rbp-A8h] __int128 v8; // [rsp+40h] [rbp-70h] _QWORD v9[2]; // [rsp+58h] [rbp-58h] BYREF int v10; // [rsp+68h] [rbp-48h] _BYTE v11[32]; // [rsp+78h] [rbp-38h] BYREF long long v12; // [rsp+98h] [rbp-18h] long long v13; // [rsp+A0h] [rbp-10h] long long v14; // [rsp+A8h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; *(_BYTE *)a1 = 1; std::string::basic_string(a1 + 16); std::string::basic_string((long long)v11, a3); *(_QWORD *)(a1 + 48) = Render::CalculateTextureHash(a1, (long long)v11, 0.0, 0.0); std::string::~string((long long)v11); if ( !std::map<unsigned long long,Texture>::count(v13 + 56, a1 + 48) ) { v3 = std::string::c_str(a3); LoadTexture(v9, v3); v6 = std::map<unsigned long long,Texture>::operator[](v13 + 56, a1 + 48); *(_QWORD *)v6 = v9[0]; *(_QWORD *)(v6 + 8) = v9[1]; *(_DWORD *)(v6 + 16) = v10; } v5 = (__int128 *)std::map<unsigned long long,Texture>::operator[](v13 + 56, a1 + 48); v8 = *v5; *(float *)(a1 + 4) = (float)(int)HIDWORD(*(_QWORD *)v5); *(float *)(a1 + 8) = (float)SDWORD2(v8); return std::string::operator=(a1 + 16, a3); }
Render: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x88],RDI MOV byte ptr [RDI],0x1 ADD RDI,0x10 MOV qword ptr [RBP + -0x80],RDI CALL 0x0010d720 MOV RSI,qword ptr [RBP + -0x78] LAB_0011911a: LEA RDI,[RBP + -0x38] CALL 0x0010d8f0 JMP 0x00119125 LAB_00119125: MOV RDI,qword ptr [RBP + -0x88] LEA RSI,[RBP + -0x38] MOV qword ptr [RBP + -0xa0],RSI XORPS XMM1,XMM1 MOVAPS XMM0,XMM1 CALL 0x0010d790 MOV RDI,qword ptr [RBP + -0xa0] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x88] MOV RDX,RAX ADD RDX,0x30 MOV qword ptr [RBP + -0x98],RDX MOV qword ptr [RAX + 0x30],RCX CALL 0x0010c2b0 MOV RSI,qword ptr [RBP + -0x98] MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 CALL 0x0010d9d0 MOV qword ptr [RBP + -0x90],RAX JMP 0x00119187 LAB_00119187: MOV RAX,qword ptr [RBP + -0x90] CMP RAX,0x0 JNZ 0x00119201 MOV RDI,qword ptr [RBP + -0x78] CALL 0x0010da30 MOV RSI,RAX LEA RDI,[RBP + -0x58] CALL 0x00209600 JMP 0x001191ab LAB_001191ab: MOV RSI,qword ptr [RBP + -0x88] MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 ADD RSI,0x30 CALL 0x0010caa0 MOV qword ptr [RBP + -0xa8],RAX JMP 0x001191cc LAB_001191cc: MOV RAX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x10],ECX JMP 0x00119201 LAB_00119201: MOV RSI,qword ptr [RBP + -0x88] MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 ADD RSI,0x30 CALL 0x0010caa0 MOV qword ptr [RBP + -0xb0],RAX JMP 0x00119222 LAB_00119222: MOV RSI,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RBP + -0xb0] MOV ECX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x60],ECX MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RBP + -0x70],XMM0 CVTSI2SS XMM0,dword ptr [RBP + -0x6c] MOVSS dword ptr [RDI + 0x4],XMM0 CVTSI2SS XMM0,dword ptr [RBP + -0x68] MOVSS dword ptr [RDI + 0x8],XMM0 ADD RDI,0x10 CALL 0x0010da50 LAB_0011925e: JMP 0x00119260 LAB_00119260: ADD RSP,0xb0 POP RBP RET
/* Render::Render(Context&, std::__cxx11::string) */ void __thiscall Render::Render(Render *this,long param_1,string *param_3) { int8 uVar1; long lVar2; int8 *puVar3; int iStack_74; int iStack_70; int8 local_60; int8 local_58; int4 local_50; string local_40 [32]; string *local_20; long local_18; Render *local_10; *this = (Render)0x1; local_20 = param_3; local_18 = param_1; local_10 = this; std::__cxx11::string::string((string *)(this + 0x10)); /* try { // try from 0011911a to 0011925d has its CatchHandler @ 001191ea */ std::__cxx11::string::string(local_40,param_3); uVar1 = CalculateTextureHash((Render *)0x0,this); *(int8 *)(this + 0x30) = uVar1; std::__cxx11::string::~string(local_40); lVar2 = std:: map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> ::count((map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> *)(local_18 + 0x38),(ulonglong *)(this + 0x30)); if (lVar2 == 0) { uVar1 = std::__cxx11::string::c_str(param_3); LoadTexture(&local_60,uVar1); puVar3 = (int8 *) std:: map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> ::operator[]((map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> *)(local_18 + 0x38),(ulonglong *)(this + 0x30)); *puVar3 = local_60; puVar3[1] = local_58; *(int4 *)(puVar3 + 2) = local_50; } puVar3 = (int8 *) std:: map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> ::operator[]((map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> *)(local_18 + 0x38),(ulonglong *)(this + 0x30)); uVar1 = puVar3[1]; iStack_74 = (int)((ulong)*puVar3 >> 0x20); *(float *)(this + 4) = (float)iStack_74; iStack_70 = (int)uVar1; *(float *)(this + 8) = (float)iStack_70; std::__cxx11::string::operator=((string *)(this + 0x10),param_3); return; }
36,031
Render::Render(Context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
csit-sgu[P]mit-game-2025_1/internal.hpp
Render(Context &ctx, std::string filename) : visible(true) { hash = CalculateTextureHash(filename, 0, 0); if (ctx.textures_storage.count(hash) == 0) { Texture tex = LoadTexture(filename.c_str()); ctx.textures_storage[hash] = std::move(tex); } Texture tex = ctx.textures_storage[hash]; width = float(tex.width); height = float(tex.height); path = filename; }
O1
cpp
Render::Render(Context&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movb $0x1, (%rdi) leaq 0x10(%rdi), %rax movq %rax, 0x8(%rsp) leaq 0x20(%rdi), %rax movq %rax, (%rsp) movq %rax, 0x10(%rdi) movq $0x0, 0x18(%rdi) movb $0x0, 0x20(%rdi) leaq 0x38(%rsp), %rbx movq %rbx, -0x10(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %rdi callq 0xb256 leaq 0x28(%rsp), %rbp xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 movq %r15, %rdi movq %rbp, %rsi callq 0xb0fa leaq 0x30(%r15), %r13 movq %rax, 0x30(%r15) movq (%rbp), %rdi cmpq %rbx, %rdi je 0xf146 movq 0x38(%rsp), %rsi incq %rsi callq 0x9550 addq $0x38, %r12 movq %r12, %rdi movq %r13, %rsi callq 0xb208 testq %rax, %rax jne 0xf181 movq (%r14), %rsi leaq 0x14(%rsp), %rdi callq 0xa0ec6 movq %r12, %rdi movq %r13, %rsi callq 0xafa6 movl 0x24(%rsp), %ecx movl %ecx, 0x10(%rax) movups 0x14(%rsp), %xmm0 movups %xmm0, (%rax) movq %r12, %rdi movq %r13, %rsi callq 0xafa6 xorps %xmm0, %xmm0 cvtsi2ssl 0x4(%rax), %xmm0 xorps %xmm1, %xmm1 cvtsi2ssl 0x8(%rax), %xmm1 movss %xmm0, 0x4(%r15) movss %xmm1, 0x8(%r15) movq 0x8(%rsp), %rdi movq %r14, %rsi callq 0xb330 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xf1c8 jmp 0xf1c8 movq %rax, %r14 movq 0x8(%rsp), %rax movq (%rax), %rdi cmpq (%rsp), %rdi je 0xf1e8 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x9550 movq %r14, %rdi callq 0x99c0
_ZN6RenderC2ER7ContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdx mov r12, rsi mov r15, rdi mov byte ptr [rdi], 1 lea rax, [rdi+10h] mov [rsp+78h+var_70], rax lea rax, [rdi+20h] mov [rsp+78h+var_78], rax mov [rdi+10h], rax mov qword ptr [rdi+18h], 0 mov byte ptr [rdi+20h], 0 lea rbx, [rsp+78h+var_40] mov [rbx-10h], rbx mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi lea rdi, [rsp+78h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rbp, [rsp+78h+var_50] xorps xmm0, xmm0 xorps xmm1, xmm1 mov rdi, r15 mov rsi, rbp call _ZN6Render20CalculateTextureHashENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEff; Render::CalculateTextureHash(std::string,float,float) lea r13, [r15+30h] mov [r15+30h], rax mov rdi, [rbp+0]; void * cmp rdi, rbx jz short loc_F146 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F146: add r12, 38h ; '8' mov rdi, r12 mov rsi, r13 call _ZNKSt3mapIy7TextureSt4lessIyESaISt4pairIKyS0_EEE5countERS4_; std::map<ulong long,Texture>::count(ulong long const&) test rax, rax jnz short loc_F181 mov rsi, [r14] lea rdi, [rsp+78h+var_64] call LoadTexture mov rdi, r12 mov rsi, r13 call _ZNSt3mapIy7TextureSt4lessIyESaISt4pairIKyS0_EEEixERS4_; std::map<ulong long,Texture>::operator[](ulong long const&) mov ecx, [rsp+78h+var_54] mov [rax+10h], ecx movups xmm0, [rsp+78h+var_64] movups xmmword ptr [rax], xmm0 loc_F181: mov rdi, r12 mov rsi, r13 call _ZNSt3mapIy7TextureSt4lessIyESaISt4pairIKyS0_EEEixERS4_; std::map<ulong long,Texture>::operator[](ulong long const&) xorps xmm0, xmm0 cvtsi2ss xmm0, dword ptr [rax+4] xorps xmm1, xmm1 cvtsi2ss xmm1, dword ptr [rax+8] movss dword ptr [r15+4], xmm0 movss dword ptr [r15+8], xmm1 mov rdi, [rsp+78h+var_70] mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_F1C8 jmp short $+2 loc_F1C8: mov r14, rax mov rax, [rsp+arg_0] mov rdi, [rax]; void * cmp rdi, [rsp+0] jz short loc_F1E8 mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F1E8: mov rdi, r14 call __Unwind_Resume
void Render::Render(long long a1, long long a2, long long *a3) { long long v4; // r12 long long v5; // rax long long v6; // rax float v7; // xmm1_4 __int128 v8; // [rsp+14h] [rbp-64h] BYREF int v9; // [rsp+24h] [rbp-54h] void *v10[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v11[8]; // [rsp+38h] [rbp-40h] BYREF *(_BYTE *)a1 = 1; *(_QWORD *)(a1 + 16) = a1 + 32; *(_QWORD *)(a1 + 24) = 0LL; *(_BYTE *)(a1 + 32) = 0; v10[0] = v11; std::string::_M_construct<char *>(v10, (_BYTE *)*a3, *a3 + a3[1]); *(_QWORD *)(a1 + 48) = Render::CalculateTextureHash(0.0, 0.0, a1, v10); if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); v4 = a2 + 56; if ( !std::map<unsigned long long,Texture>::count(a2 + 56, (unsigned long long *)(a1 + 48)) ) { LoadTexture(&v8, *a3); v5 = std::map<unsigned long long,Texture>::operator[](v4, (unsigned long long *)(a1 + 48)); *(_DWORD *)(v5 + 16) = v9; *(_OWORD *)v5 = v8; } v6 = std::map<unsigned long long,Texture>::operator[](v4, (unsigned long long *)(a1 + 48)); v7 = (float)*(int *)(v6 + 8); *(float *)(a1 + 4) = (float)*(int *)(v6 + 4); *(float *)(a1 + 8) = v7; std::string::_M_assign((long long *)(a1 + 16), a3); }
Render: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV byte ptr [RDI],0x1 LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x8],RAX LEA RAX,[RDI + 0x20] MOV qword ptr [RSP],RAX MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],0x0 MOV byte ptr [RDI + 0x20],0x0 LEA RBX,[RSP + 0x38] MOV qword ptr [RBX + -0x10],RBX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_0010f108: LEA RDI,[RSP + 0x28] CALL 0x0010b256 LEA RBP,[RSP + 0x28] XORPS XMM0,XMM0 XORPS XMM1,XMM1 MOV RDI,R15 MOV RSI,RBP CALL 0x0010b0fa LEA R13,[R15 + 0x30] MOV qword ptr [R15 + 0x30],RAX MOV RDI,qword ptr [RBP] CMP RDI,RBX JZ 0x0010f146 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00109550 LAB_0010f146: ADD R12,0x38 MOV RDI,R12 MOV RSI,R13 CALL 0x0010b208 TEST RAX,RAX JNZ 0x0010f181 MOV RSI,qword ptr [R14] LAB_0010f15d: LEA RDI,[RSP + 0x14] CALL 0x001a0ec6 MOV RDI,R12 MOV RSI,R13 CALL 0x0010afa6 MOV ECX,dword ptr [RSP + 0x24] MOV dword ptr [RAX + 0x10],ECX MOVUPS XMM0,xmmword ptr [RSP + 0x14] MOVUPS xmmword ptr [RAX],XMM0 LAB_0010f181: MOV RDI,R12 MOV RSI,R13 CALL 0x0010afa6 XORPS XMM0,XMM0 CVTSI2SS XMM0,dword ptr [RAX + 0x4] XORPS XMM1,XMM1 CVTSI2SS XMM1,dword ptr [RAX + 0x8] MOVSS dword ptr [R15 + 0x4],XMM0 MOVSS dword ptr [R15 + 0x8],XMM1 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R14 CALL 0x0010b330 LAB_0010f1b5: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Render::Render(Context&, std::__cxx11::string) */ void __thiscall Render::Render(Render *this,long param_1,string *param_3) { Render *pRVar1; int iVar2; int8 uVar3; long lVar4; int8 *puVar5; map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> *this_00; int8 local_64; int8 uStack_5c; int4 local_54; long *local_50 [2]; long local_40 [2]; *this = (Render)0x1; *(Render **)(this + 0x10) = this + 0x20; *(int8 *)(this + 0x18) = 0; this[0x20] = (Render)0x0; /* try { // try from 0010f108 to 0010f154 has its CatchHandler @ 0010f1c8 */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char*> (local_50,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); uVar3 = CalculateTextureHash((Render *)0x0,0,this,local_50); pRVar1 = this + 0x30; *(int8 *)(this + 0x30) = uVar3; if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } this_00 = (map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> *)(param_1 + 0x38); lVar4 = std:: map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> ::count(this_00,(ulonglong *)pRVar1); if (lVar4 == 0) { /* try { // try from 0010f15d to 0010f171 has its CatchHandler @ 0010f1c4 */ LoadTexture(&local_64,*(int8 *)param_3); puVar5 = (int8 *) std:: map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> ::operator[](this_00,(ulonglong *)pRVar1); *(int4 *)(puVar5 + 2) = local_54; *puVar5 = local_64; puVar5[1] = uStack_5c; } /* try { // try from 0010f181 to 0010f1b4 has its CatchHandler @ 0010f1c6 */ lVar4 = std:: map<unsigned_long_long,Texture,std::less<unsigned_long_long>,std::allocator<std::pair<unsigned_long_long_const,Texture>>> ::operator[](this_00,(ulonglong *)pRVar1); iVar2 = *(int *)(lVar4 + 8); *(float *)(this + 4) = (float)*(int *)(lVar4 + 4); *(float *)(this + 8) = (float)iVar2; std::__cxx11::string::_M_assign((string *)(this + 0x10),param_3); return; }
36,032
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&)
monkey531[P]llama/common/minja.hpp
static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) { Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options); auto tokens = parser.tokenize(); TemplateTokenIterator begin = tokens.begin(); auto it = begin; TemplateTokenIterator end = tokens.end(); return parser.parseTemplate(begin, it, end, /* full= */ true); }
O2
cpp
minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&): pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %r15, %rdi callq 0x23c20 movq %rsp, %rdi movq %r15, %rsi callq 0x5dd90 leaq 0x40(%rsp), %rdi movq %rsp, %rsi movq %r14, %rdx callq 0x5ddae leaq 0x8(%rsp), %rdi callq 0x503de leaq 0x10(%rsp), %rdi callq 0x241f8 leaq 0x10(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x5de56 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rsi movq %rsp, %rdx movq %rax, (%rdx) leaq 0x38(%rsp), %rcx movq %rax, (%rcx) leaq 0x30(%rsp), %r8 movq %rsi, (%r8) leaq 0x40(%rsp), %rsi pushq $0x1 popq %r9 movq %rbx, %rdi callq 0x5fbf6 leaq 0x10(%rsp), %rdi callq 0x60b16 leaq 0x48(%rsp), %rdi callq 0x503de movq %rbx, %rax addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x60b16 jmp 0x5d2ce movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x503de jmp 0x5d2f6 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x503de jmp 0x5d2ec movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x241f8 movq %rbx, %rdi callq 0x23fb0
_ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE: push r15 push r14 push rbx sub rsp, 70h mov r14, rdx mov rbx, rdi lea r15, [rsp+88h+var_78] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rdi, rsp mov rsi, r15 call _ZSt11make_sharedINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EESt10shared_ptrIT_EDpOT0_; std::make_shared<std::string,std::string>(std::string &&) lea rdi, [rsp+88h+var_48] mov rsi, rsp mov rdx, r14 call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&) lea rdi, [rsp+88h+var_80] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+88h+var_78]; this lea rsi, [rsp+88h+var_48] call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void) mov rax, [rsp+88h+var_78] mov rsi, [rsp+88h+var_70] mov rdx, rsp mov [rdx], rax lea rcx, [rsp+88h+var_50] mov [rcx], rax lea r8, [rsp+88h+var_58] mov [r8], rsi lea rsi, [rsp+88h+var_48] push 1 pop r9 mov rdi, rbx call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool) lea rdi, [rsp+88h+var_78] call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector() lea rdi, [rsp+88h+var_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 70h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector() jmp short loc_5D2CE mov rbx, rax loc_5D2CE: lea rdi, [rsp+arg_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_5D2F6 mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_5D2EC mov rbx, rax loc_5D2EC: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_5D2F6: mov rdi, rbx call __Unwind_Resume
long long minja::Parser::parse(long long a1, long long a2, long long a3) { long long v5; // [rsp+0h] [rbp-88h] BYREF long long v6; // [rsp+8h] [rbp-80h] BYREF _QWORD v7[4]; // [rsp+10h] [rbp-78h] BYREF long long v8; // [rsp+30h] [rbp-58h] BYREF long long v9; // [rsp+38h] [rbp-50h] BYREF _BYTE v10[8]; // [rsp+40h] [rbp-48h] BYREF _QWORD v11[8]; // [rsp+48h] [rbp-40h] BYREF std::string::basic_string(v7, a2); std::make_shared<std::string,std::string>(&v5, v7); minja::Parser::Parser(v10, &v5, a3); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v6); std::string::~string(v7); minja::Parser::tokenize((minja::Parser *)v7); v5 = v7[0]; v9 = v7[0]; v8 = v7[1]; ((void ( *)(long long, _BYTE *, long long *, long long *, long long *, long long))minja::Parser::parseTemplate)( a1, v10, &v5, &v9, &v8, 1LL); std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(v7); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v11); return a1; }
parse: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x70 MOV R14,RDX MOV RBX,RDI LEA R15,[RSP + 0x10] MOV RDI,R15 CALL 0x00123c20 LAB_0015d22c: MOV RDI,RSP MOV RSI,R15 CALL 0x0015dd90 LAB_0015d237: LEA RDI,[RSP + 0x40] MOV RSI,RSP MOV RDX,R14 CALL 0x0015ddae LEA RDI,[RSP + 0x8] CALL 0x001503de LEA RDI,[RSP + 0x10] CALL 0x001241f8 LAB_0015d25b: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x40] CALL 0x0015de56 MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RSP MOV qword ptr [RDX],RAX LEA RCX,[RSP + 0x38] MOV qword ptr [RCX],RAX LEA R8,[RSP + 0x30] MOV qword ptr [R8],RSI LAB_0015d28a: LEA RSI,[RSP + 0x40] PUSH 0x1 POP R9 MOV RDI,RBX CALL 0x0015fbf6 LAB_0015d29b: LEA RDI,[RSP + 0x10] CALL 0x00160b16 LEA RDI,[RSP + 0x48] CALL 0x001503de MOV RAX,RBX ADD RSP,0x70 POP RBX POP R14 POP R15 RET
/* minja::Parser::parse(std::__cxx11::string const&, minja::Options const&) */ Parser * __thiscall minja::Parser::parse(Parser *this,string *param_1,Options *param_2) { int8 local_88; __shared_count<(__gnu_cxx::_Lock_policy)2> local_80 [8]; int8 local_78; int8 local_70; int8 local_58; int8 local_50; Parser local_48 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [40]; std::__cxx11::string::string((string *)&local_78,param_1); /* try { // try from 0015d22c to 0015d236 has its CatchHandler @ 0015d2e9 */ std::make_shared<std::__cxx11::string,std::__cxx11::string>((string *)&local_88); /* try { // try from 0015d237 to 0015d246 has its CatchHandler @ 0015d2da */ Parser(local_48,(shared_ptr *)&local_88,param_2); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_80); std::__cxx11::string::~string((string *)&local_78); /* try { // try from 0015d25b to 0015d269 has its CatchHandler @ 0015d2cb */ tokenize(); local_88 = local_78; local_50 = local_78; local_58 = local_70; /* try { // try from 0015d28a to 0015d29a has its CatchHandler @ 0015d2bc */ parseTemplate(this,local_48,(__normal_iterator *)&local_88,SUB81(&local_50,0)); std:: vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>> ::~vector((vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>> *)&local_78); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40); return this; }
36,033
JS_NewContext
bluesky950520[P]quickjs/quickjs.c
JSContext *JS_NewContext(JSRuntime *rt) { JSContext *ctx; ctx = JS_NewContextRaw(rt); if (!ctx) return NULL; JS_AddIntrinsicBaseObjects(ctx); JS_AddIntrinsicDate(ctx); JS_AddIntrinsicEval(ctx); JS_AddIntrinsicRegExp(ctx); JS_AddIntrinsicJSON(ctx); JS_AddIntrinsicProxy(ctx); JS_AddIntrinsicMapSet(ctx); JS_AddIntrinsicTypedArrays(ctx); JS_AddIntrinsicPromise(ctx); JS_AddIntrinsicBigInt(ctx); JS_AddIntrinsicWeakRef(ctx); JS_AddPerformance(ctx); return ctx; }
O2
c
JS_NewContext: pushq %rbx callq 0x182dd movq %rax, %rbx testq %rax, %rax je 0x18636 movq %rbx, %rdi callq 0x1863b movq %rbx, %rdi callq 0x19121 leaq 0x18319(%rip), %rax # 0x30900 movq %rax, 0x1f8(%rbx) movq %rbx, %rdi callq 0x191bb movq %rbx, %rdi callq 0x192b1 movq %rbx, %rdi callq 0x192cf movq %rbx, %rdi callq 0x193ab movq %rbx, %rdi callq 0x1953d movq %rbx, %rdi callq 0x198b8 movq %rbx, %rdi callq 0x19c5a movq %rbx, %rdi callq 0x19ce5 movq %rbx, %rdi callq 0x19e22 movq %rbx, %rax popq %rbx retq
JS_NewContext: push rbx call JS_NewContextRaw mov rbx, rax test rax, rax jz short loc_18636 mov rdi, rbx call JS_AddIntrinsicBaseObjects mov rdi, rbx call JS_AddIntrinsicDate lea rax, __JS_EvalInternal mov [rbx+1F8h], rax mov rdi, rbx call JS_AddIntrinsicRegExp mov rdi, rbx call JS_AddIntrinsicJSON mov rdi, rbx call JS_AddIntrinsicProxy mov rdi, rbx call JS_AddIntrinsicMapSet mov rdi, rbx call JS_AddIntrinsicTypedArrays mov rdi, rbx call JS_AddIntrinsicPromise mov rdi, rbx call JS_AddIntrinsicBigInt mov rdi, rbx call JS_AddIntrinsicWeakRef mov rdi, rbx call JS_AddPerformance loc_18636: mov rax, rbx pop rbx retn
long long JS_NewContext(long long a1) { long long v1; // rax long long v2; // rbx v1 = JS_NewContextRaw(a1); v2 = v1; if ( v1 ) { JS_AddIntrinsicBaseObjects(v1); JS_AddIntrinsicDate(v2); *(_QWORD *)(v2 + 504) = _JS_EvalInternal; JS_AddIntrinsicRegExp(v2); JS_AddIntrinsicJSON(v2); JS_AddIntrinsicProxy(v2); JS_AddIntrinsicMapSet(v2); JS_AddIntrinsicTypedArrays(v2); JS_AddIntrinsicPromise(v2); JS_AddIntrinsicBigInt(v2); JS_AddIntrinsicWeakRef(v2); JS_AddPerformance(v2); } return v2; }
JS_NewContext: PUSH RBX CALL 0x001182dd MOV RBX,RAX TEST RAX,RAX JZ 0x00118636 MOV RDI,RBX CALL 0x0011863b MOV RDI,RBX CALL 0x00119121 LEA RAX,[0x130900] MOV qword ptr [RBX + 0x1f8],RAX MOV RDI,RBX CALL 0x001191bb MOV RDI,RBX CALL 0x001192b1 MOV RDI,RBX CALL 0x001192cf MOV RDI,RBX CALL 0x001193ab MOV RDI,RBX CALL 0x0011953d MOV RDI,RBX CALL 0x001198b8 MOV RDI,RBX CALL 0x00119c5a MOV RDI,RBX CALL 0x00119ce5 MOV RDI,RBX CALL 0x00119e22 LAB_00118636: MOV RAX,RBX POP RBX RET
long JS_NewContext(void) { long lVar1; lVar1 = JS_NewContextRaw(); if (lVar1 != 0) { JS_AddIntrinsicBaseObjects(lVar1); JS_AddIntrinsicDate(lVar1); *(code **)(lVar1 + 0x1f8) = __JS_EvalInternal; JS_AddIntrinsicRegExp(lVar1); JS_AddIntrinsicJSON(lVar1); JS_AddIntrinsicProxy(lVar1); JS_AddIntrinsicMapSet(lVar1); JS_AddIntrinsicTypedArrays(lVar1); JS_AddIntrinsicPromise(lVar1); JS_AddIntrinsicBigInt(lVar1); JS_AddIntrinsicWeakRef(lVar1); JS_AddPerformance(lVar1); } return lVar1; }
36,034
translog_purge_at_flush
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_purge_at_flush() { uint32 i, min_file; int rc= 0; DBUG_ENTER("translog_purge_at_flush"); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); if (unlikely(translog_status == TRANSLOG_READONLY)) { DBUG_PRINT("info", ("The log is read only => exit")); DBUG_RETURN(0); } if (log_purge_type != TRANSLOG_PURGE_ONDEMAND) { DBUG_PRINT("info", ("It is not \"at_flush\" => exit")); DBUG_RETURN(0); } mysql_mutex_lock(&log_descriptor.purger_lock); if (unlikely(log_descriptor.min_need_file == 0 || log_purge_disabled)) { DBUG_PRINT("info", ("No info about min need file => exit")); mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(0); } min_file= translog_first_file(translog_get_horizon(), 1); DBUG_ASSERT(min_file != 0); /* log is already started */ for(i= min_file; i < log_descriptor.min_need_file && rc == 0; i++) { char path[FN_REFLEN], *file_name; DBUG_PRINT("info", ("purge file %lu\n", (ulong) i)); file_name= translog_filename_by_fileno(i, path); rc= MY_TEST(mysql_file_delete(key_file_translog, file_name, MYF(MY_WME))); } mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(rc); }
O3
c
translog_purge_at_flush: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) xorl %ebx, %ebx cmpl $0x2, 0x3cbd14(%rip) # 0x405f70 je 0x3a372 cmpq $0x2, 0x3cbcee(%rip) # 0x405f58 jne 0x3a372 cmpq $0x0, 0xbcddc8(%rip) # 0xc08040 jne 0x3a395 leaq 0xbcdd7b(%rip), %rdi # 0xc08000 callq 0x2a220 cmpl $0x0, 0xbcdd67(%rip) # 0xc07ff8 je 0x3a39f cmpl $0x0, 0x3cbcb2(%rip) # 0x405f50 jne 0x3a39f callq 0x383a0 movq %rax, %rdi movl $0x1, %esi callq 0x36828 cmpl 0xbcdd3c(%rip), %eax # 0xc07ff8 jae 0x3a351 movl %eax, %ebx leaq -0x230(%rbp), %r14 leaq 0x354f86(%rip), %r13 # 0x38f258 leaq -0x288(%rbp), %r15 leaq -0x240(%rbp), %r12 movl %ebx, %edi movq %r14, %rsi callq 0x34f09 leaq 0x3cbbd3(%rip), %rax # 0x405ec4 movl (%rax), %esi movq (%r13), %rax movq %r15, %rdi movl $0xe, %edx movq %r14, %rcx movq %r12, %r8 callq *0x148(%rax) movq %rax, -0x240(%rbp) testq %rax, %rax jne 0x3a334 movl $0x10, %esi movq %r14, %rdi callq 0xa1a24 incl %ebx cmpl 0xbcdccc(%rip), %ebx # 0xc07ff8 jae 0x3a355 testl %eax, %eax je 0x3a2e0 jmp 0x3a355 movq %rax, %rdi movq %r14, %rsi movq %r12, %rdx leaq -0x234(%rbp), %rcx callq 0x2d0ee movl -0x234(%rbp), %eax jmp 0x3a324 xorl %ebx, %ebx jmp 0x3a35a testl %eax, %eax setne %bl movq 0xbcdcdf(%rip), %rdi # 0xc08040 testq %rdi, %rdi jne 0x3a3a8 leaq 0xbcdc93(%rip), %rdi # 0xc08000 callq 0x2a1e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3a3ba movl %ebx, %eax addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2d0d1 jmp 0x3a28a callq 0x2d145 xorl %ebx, %ebx jmp 0x3a372 leaq 0x354ea9(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x160(%rax) jmp 0x3a366 callq 0x2a270
translog_purge_at_flush: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov rax, fs:28h mov [rbp+var_30], rax xor ebx, ebx cmp cs:translog_status, 2 jz loc_3A372 cmp cs:log_purge_type, 2 jnz loc_3A372 cmp cs:qword_C08040, 0 jnz loc_3A395 lea rdi, unk_C08000 call _pthread_mutex_lock loc_3A28A: cmp dword ptr cs:qword_C07FF8, 0 jz loc_3A39F cmp cs:log_purge_disabled, 0 jnz loc_3A39F call translog_get_horizon mov rdi, rax mov esi, 1 call translog_first_file cmp eax, dword ptr cs:qword_C07FF8 jnb loc_3A351 mov ebx, eax lea r14, [rbp+var_230] lea r13, PSI_server lea r15, [rbp+var_288] lea r12, [rbp+var_240] loc_3A2E0: mov edi, ebx mov rsi, r14 call translog_filename_by_fileno lea rax, key_file_translog mov esi, [rax] mov rax, [r13+0] mov rdi, r15 mov edx, 0Eh mov rcx, r14 mov r8, r12 call qword ptr [rax+148h] mov [rbp+var_240], rax test rax, rax jnz short loc_3A334 mov esi, 10h mov rdi, r14 call my_delete loc_3A324: inc ebx cmp ebx, dword ptr cs:qword_C07FF8 jnb short loc_3A355 test eax, eax jz short loc_3A2E0 jmp short loc_3A355 loc_3A334: mov rdi, rax mov rsi, r14 mov rdx, r12 lea rcx, [rbp+var_234] call translog_purge_at_flush_cold_2 mov eax, [rbp+var_234] jmp short loc_3A324 loc_3A351: xor ebx, ebx jmp short loc_3A35A loc_3A355: test eax, eax setnz bl loc_3A35A: mov rdi, cs:qword_C08040 test rdi, rdi jnz short loc_3A3A8 loc_3A366: lea rdi, unk_C08000 call _pthread_mutex_unlock loc_3A372: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_3A3BA mov eax, ebx add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3A395: call translog_purge_at_flush_cold_1 jmp loc_3A28A loc_3A39F: call translog_purge_at_flush_cold_3 xor ebx, ebx jmp short loc_3A372 loc_3A3A8: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3A366 loc_3A3BA: call ___stack_chk_fail
long long translog_purge_at_flush() { unsigned int v0; // ebx unsigned long long horizon; // rax unsigned int file; // eax long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d long long v7; // rax unsigned int v8; // eax _BYTE v10[72]; // [rsp+8h] [rbp-288h] BYREF long long v11; // [rsp+50h] [rbp-240h] BYREF unsigned int v12; // [rsp+5Ch] [rbp-234h] BYREF _BYTE v13[512]; // [rsp+60h] [rbp-230h] BYREF unsigned long long v14; // [rsp+260h] [rbp-30h] v14 = __readfsqword(0x28u); v0 = 0; if ( translog_status != 2 && log_purge_type == 2 ) { if ( qword_C08040 ) translog_purge_at_flush_cold_1(); else pthread_mutex_lock(&unk_C08000); if ( !(_DWORD)qword_C07FF8 || log_purge_disabled ) { translog_purge_at_flush_cold_3(); return 0; } else { horizon = translog_get_horizon(); file = translog_first_file(horizon, 1); if ( file >= (unsigned int)qword_C07FF8 ) { v0 = 0; } else { v0 = file; do { translog_filename_by_fileno(v0, (long long)v13, v3, v4, v5, v6); v7 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])( v10, key_file_translog, 14LL, v13, &v11); v11 = v7; if ( v7 ) { translog_purge_at_flush_cold_2(v7, (long long)v13, &v11, &v12); v8 = v12; } else { v8 = my_delete(v13, 16LL); } ++v0; } while ( v0 < (unsigned int)qword_C07FF8 && !v8 ); LOBYTE(v0) = v8 != 0; } if ( qword_C08040 ) PSI_server[44](); pthread_mutex_unlock(&unk_C08000); } } return v0; }
translog_purge_at_flush: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX XOR EBX,EBX CMP dword ptr [0x00505f70],0x2 JZ 0x0013a372 CMP qword ptr [0x00505f58],0x2 JNZ 0x0013a372 CMP qword ptr [0x00d08040],0x0 JNZ 0x0013a395 LEA RDI,[0xd08000] CALL 0x0012a220 LAB_0013a28a: CMP dword ptr [0x00d07ff8],0x0 JZ 0x0013a39f CMP dword ptr [0x00505f50],0x0 JNZ 0x0013a39f CALL 0x001383a0 MOV RDI,RAX MOV ESI,0x1 CALL 0x00136828 CMP EAX,dword ptr [0x00d07ff8] JNC 0x0013a351 MOV EBX,EAX LEA R14,[RBP + -0x230] LEA R13,[0x48f258] LEA R15,[RBP + -0x288] LEA R12,[RBP + -0x240] LAB_0013a2e0: MOV EDI,EBX MOV RSI,R14 CALL 0x00134f09 LEA RAX,[0x505ec4] MOV ESI,dword ptr [RAX] MOV RAX,qword ptr [R13] MOV RDI,R15 MOV EDX,0xe MOV RCX,R14 MOV R8,R12 CALL qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x240],RAX TEST RAX,RAX JNZ 0x0013a334 MOV ESI,0x10 MOV RDI,R14 CALL 0x001a1a24 LAB_0013a324: INC EBX CMP EBX,dword ptr [0x00d07ff8] JNC 0x0013a355 TEST EAX,EAX JZ 0x0013a2e0 JMP 0x0013a355 LAB_0013a334: MOV RDI,RAX MOV RSI,R14 MOV RDX,R12 LEA RCX,[RBP + -0x234] CALL 0x0012d0ee MOV EAX,dword ptr [RBP + -0x234] JMP 0x0013a324 LAB_0013a351: XOR EBX,EBX JMP 0x0013a35a LAB_0013a355: TEST EAX,EAX SETNZ BL LAB_0013a35a: MOV RDI,qword ptr [0x00d08040] TEST RDI,RDI JNZ 0x0013a3a8 LAB_0013a366: LEA RDI,[0xd08000] CALL 0x0012a1e0 LAB_0013a372: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013a3ba MOV EAX,EBX ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013a395: CALL 0x0012d0d1 JMP 0x0013a28a LAB_0013a39f: CALL 0x0012d145 XOR EBX,EBX JMP 0x0013a372 LAB_0013a3a8: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013a366 LAB_0013a3ba: CALL 0x0012a270
int4 translog_purge_at_flush(void) { uint uVar1; int iVar2; int8 uVar3; int4 uVar4; long in_FS_OFFSET; int1 local_290 [72]; long local_248; int local_23c; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = 0; if ((translog_status != 2) && (log_purge_type == 2)) { if (DAT_00d08040 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d08000); } else { translog_purge_at_flush_cold_1(); } if ((DAT_00d07ff8 == 0) || (log_purge_disabled != 0)) { translog_purge_at_flush_cold_3(); uVar4 = 0; } else { uVar3 = translog_get_horizon(); uVar1 = translog_first_file(uVar3,1); if (uVar1 < DAT_00d07ff8) { do { translog_filename_by_fileno(uVar1,local_238); local_248 = (**(code **)(PSI_server + 0x148)) (local_290,key_file_translog,0xe,local_238,&local_248); if (local_248 == 0) { iVar2 = my_delete(local_238,0x10); } else { translog_purge_at_flush_cold_2(local_248,local_238,&local_248,&local_23c); iVar2 = local_23c; } uVar1 = uVar1 + 1; } while ((uVar1 < DAT_00d07ff8) && (iVar2 == 0)); uVar4 = CONCAT31((int3)(uVar1 >> 8),iVar2 != 0); } else { uVar4 = 0; } if (DAT_00d08040 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d08000); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
36,035
LefDefParser::defiSlot::yh(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp
int defiSlot::yh(int index) const { char msg[160]; if (index < 0 || index >= numRectangles_) { sprintf (msg, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again.", index, numRectangles_); defiError(0, 6160, msg, defData); return 0; } return yh_[index]; }
O3
cpp
LefDefParser::defiSlot::yh(int) const: pushq %rbp pushq %r14 pushq %rbx subq $0xa0, %rsp movl %esi, %edx movq %rdi, %rbx testl %esi, %esi setns %al movl 0x14(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x2fc34 movq 0x38(%rbx), %rax movl %edx, %ecx movl (%rax,%rcx,4), %ebp jmp 0x2fc5d leaq 0x163f3(%rip), %rsi # 0x4602e xorl %ebp, %ebp movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x7060 movq 0x50(%rbx), %rcx xorl %edi, %edi movl $0x1810, %esi # imm = 0x1810 movq %r14, %rdx callq 0x1bb18 movl %ebp, %eax addq $0xa0, %rsp popq %rbx popq %r14 popq %rbp retq nop
_ZNK12LefDefParser8defiSlot2yhEi: push rbp push r14 push rbx sub rsp, 0A0h mov edx, esi mov rbx, rdi test esi, esi setns al mov ecx, [rdi+14h] cmp ecx, esi setnle sil test al, sil jz short loc_2FC34 mov rax, [rbx+38h] mov ecx, edx mov ebp, [rax+rcx*4] jmp short loc_2FC5D loc_2FC34: lea rsi, aErrorDefpars61_9; "ERROR (DEFPARS-6160): The index number "... xor ebp, ebp mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf mov rcx, [rbx+50h]; LefDefParser::defrData * xor edi, edi; this mov esi, 1810h; int mov rdx, r14; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) loc_2FC5D: mov eax, ebp add rsp, 0A0h pop rbx pop r14 pop rbp retn
long long LefDefParser::defiSlot::yh(LefDefParser::defiSlot *this, signed int a2) { int v2; // ecx unsigned int v3; // ebp LefDefParser::defrData *v4; // r8 char v6[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 5); if ( v2 > a2 && a2 >= 0 ) { return *(unsigned int *)(*((_QWORD *)this + 7) + 4LL * (unsigned int)a2); } else { v3 = 0; sprintf( v6, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\n" "Valid index number is from 0 to %d. Specify a valid index number and then try again.", a2, v2); LefDefParser::defiError(0LL, 6160, v6, *((LefDefParser::defrData **)this + 10), v4); } return v3; }
yh: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0xa0 MOV EDX,ESI MOV RBX,RDI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x14] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x0012fc34 MOV RAX,qword ptr [RBX + 0x38] MOV ECX,EDX MOV EBP,dword ptr [RAX + RCX*0x4] JMP 0x0012fc5d LAB_0012fc34: LEA RSI,[0x14602e] XOR EBP,EBP MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00107060 MOV RCX,qword ptr [RBX + 0x50] XOR EDI,EDI MOV ESI,0x1810 MOV RDX,R14 CALL 0x0011bb18 LAB_0012fc5d: MOV EAX,EBP ADD RSP,0xa0 POP RBX POP R14 POP RBP RET
/* LefDefParser::defiSlot::yh(int) const */ int4 __thiscall LefDefParser::defiSlot::yh(defiSlot *this,int param_1) { int4 uVar1; char acStack_b8 [160]; if (param_1 < 0 || *(int *)(this + 0x14) <= param_1) { uVar1 = 0; sprintf(acStack_b8, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again." ); defiError(0,0x1810,acStack_b8,*(defrData **)(this + 0x50)); } else { uVar1 = *(int4 *)(*(long *)(this + 0x38) + (ulong)(uint)param_1 * 4); } return uVar1; }
36,036
my_scan_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_utf32(CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) { const char *str0= str; switch (sequence_type) { case MY_SEQ_SPACES: for ( ; str < end; ) { my_wc_t wc; int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end); if (res < 0 || wc != ' ') break; str+= res; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O0
c
my_scan_utf32: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x40(%rbp) subl $0x2, %eax je 0x5a446 jmp 0x5a43c movl -0x40(%rbp), %eax subl $0x3, %eax je 0x5a49d jmp 0x5a4a3 jmp 0x5a448 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x5a48c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq 0x598b0 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jl 0x5a477 cmpq $0x20, -0x38(%rbp) je 0x5a479 jmp 0x5a48c movl -0x3c(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x5a448 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x5a4ab jmp 0x5a49f jmp 0x5a4a1 jmp 0x5a4a3 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_scan_utf32: 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_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov eax, [rbp+var_24] mov [rbp+var_40], eax sub eax, 2 jz short loc_5A446 jmp short $+2 loc_5A43C: mov eax, [rbp+var_40] sub eax, 3 jz short loc_5A49D jmp short loc_5A4A3 loc_5A446: jmp short $+2 loc_5A448: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_5A48C mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call my_utf32_uni mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jl short loc_5A477 cmp [rbp+var_38], 20h ; ' ' jz short loc_5A479 loc_5A477: jmp short loc_5A48C loc_5A479: mov ecx, [rbp+var_3C] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax jmp short loc_5A448 loc_5A48C: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_5A4AB loc_5A49D: jmp short $+2 loc_5A49F: jmp short $+2 loc_5A4A1: jmp short $+2 loc_5A4A3: mov [rbp+var_8], 0 loc_5A4AB: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long my_scan_utf32( long long a1, unsigned long long a2, unsigned long long a3, int a4, long long a5, long long a6) { int v7; // [rsp+4h] [rbp-3Ch] long long v8; // [rsp+8h] [rbp-38h] BYREF unsigned long long v9; // [rsp+10h] [rbp-30h] int v10; // [rsp+1Ch] [rbp-24h] unsigned long long v11; // [rsp+20h] [rbp-20h] unsigned long long v12; // [rsp+28h] [rbp-18h] long long v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a2; if ( a4 != 2 ) return 0LL; while ( v12 < v11 ) { v7 = my_utf32_uni(v13, (long long)&v8, v12, v11, a5, a6); if ( v7 < 0 || v8 != 32 ) break; v12 += v7; } return v12 - v9; }
my_scan_utf32: 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 dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x40],EAX SUB EAX,0x2 JZ 0x0015a446 JMP 0x0015a43c LAB_0015a43c: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x3 JZ 0x0015a49d JMP 0x0015a4a3 LAB_0015a446: JMP 0x0015a448 LAB_0015a448: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0015a48c MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL 0x001598b0 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JL 0x0015a477 CMP qword ptr [RBP + -0x38],0x20 JZ 0x0015a479 LAB_0015a477: JMP 0x0015a48c LAB_0015a479: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0015a448 LAB_0015a48c: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0015a4ab LAB_0015a49d: JMP 0x0015a49f LAB_0015a49f: JMP 0x0015a4a1 LAB_0015a4a1: JMP 0x0015a4a3 LAB_0015a4a3: MOV qword ptr [RBP + -0x8],0x0 LAB_0015a4ab: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long my_scan_utf32(int8 param_1,ulong param_2,ulong param_3,int param_4) { int iVar1; long local_40; ulong local_38; int4 local_2c; ulong local_28; ulong local_20; int8 local_18; long local_10; if (param_4 == 2) { local_2c = 2; local_38 = param_2; local_28 = param_3; local_20 = param_2; local_18 = param_1; while (((local_20 < local_28 && (iVar1 = my_utf32_uni(local_18,&local_40,local_20,local_28), -1 < iVar1)) && (local_40 == 0x20))) { local_20 = local_20 + (long)iVar1; } local_10 = local_20 - local_38; } else { local_10 = 0; } return local_10; }
36,037
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O0
c
my_thread_global_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0xfc25a cmpb $0x0, 0xb8e52f(%rip) # 0xc8a790 je 0xfc269 movb $0x0, -0x1(%rbp) jmp 0xfc2dc movb $0x1, 0xb8e520(%rip) # 0xc8a790 leaq 0xb8e255(%rip), %rax # 0xc8a4cc cmpb $0x0, (%rax) jne 0xfc2b5 leaq 0xb8e511(%rip), %rdi # 0xc8a794 xorl %eax, %eax movl %eax, %esi callq 0x2a6b0 movl %eax, -0x8(%rbp) cmpl $0x0, %eax je 0xfc2b5 movq 0x1c7d45(%rip), %rax # 0x2c3fe0 movq (%rax), %rdi movl -0x8(%rbp), %edx leaq 0x5ee1c(%rip), %rsi # 0x15b0c4 movb $0x0, %al callq 0x2a180 movb $0x1, -0x1(%rbp) jmp 0xfc2dc leaq 0xb8e210(%rip), %rax # 0xc8a4cc movb $0x1, (%rax) callq 0xfc150 callq 0xfc2f0 cmpb $0x0, %al je 0xfc2d3 movb $0x1, -0x1(%rbp) jmp 0xfc2dc callq 0xfc080 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_global_init: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_FC25A: cmp cs:my_thread_global_init_done, 0 jz short loc_FC269 mov [rbp+var_1], 0 jmp short loc_FC2DC loc_FC269: mov cs:my_thread_global_init_done, 1 lea rax, my_thr_key_mysys_exists cmp byte ptr [rax], 0 jnz short loc_FC2B5 lea rdi, THR_KEY_mysys xor eax, eax mov esi, eax call _pthread_key_create mov [rbp+var_8], eax cmp eax, 0 jz short loc_FC2B5 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rbp+var_8] lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp short loc_FC2DC loc_FC2B5: lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 1 call my_thread_init_internal_mutex call my_thread_init cmp al, 0 jz short loc_FC2D3 mov [rbp+var_1], 1 jmp short loc_FC2DC loc_FC2D3: call my_thread_init_common_mutex mov [rbp+var_1], 0 loc_FC2DC: mov al, [rbp+var_1] add rsp, 10h pop rbp retn
char my_thread_global_init() { int v1; // [rsp+8h] [rbp-8h] if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); if ( (unsigned __int8)my_thread_init() ) { return 1; } else { my_thread_init_common_mutex(); return 0; } } else { fprintf(stderr, "Can't initialize threads: error %d\n", v1); return 1; } }
my_thread_global_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 JMP 0x001fc25a LAB_001fc25a: CMP byte ptr [0x00d8a790],0x0 JZ 0x001fc269 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001fc2dc LAB_001fc269: MOV byte ptr [0x00d8a790],0x1 LEA RAX,[0xd8a4cc] CMP byte ptr [RAX],0x0 JNZ 0x001fc2b5 LEA RDI,[0xd8a794] XOR EAX,EAX MOV ESI,EAX CALL 0x0012a6b0 MOV dword ptr [RBP + -0x8],EAX CMP EAX,0x0 JZ 0x001fc2b5 MOV RAX,qword ptr [0x003c3fe0] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x8] LEA RSI,[0x25b0c4] MOV AL,0x0 CALL 0x0012a180 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001fc2dc LAB_001fc2b5: LEA RAX,[0xd8a4cc] MOV byte ptr [RAX],0x1 CALL 0x001fc150 CALL 0x001fc2f0 CMP AL,0x0 JZ 0x001fc2d3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001fc2dc LAB_001fc2d3: CALL 0x001fc080 MOV byte ptr [RBP + -0x1],0x0 LAB_001fc2dc: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x10 POP RBP RET
int1 my_thread_global_init(void) { char cVar1; uint uVar2; int1 local_9; if (my_thread_global_init_done == '\0') { my_thread_global_init_done = '\x01'; if ((my_thr_key_mysys_exists == '\0') && (uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) { fprintf(*(FILE **)PTR_stderr_003c3fe0,"Can\'t initialize threads: error %d\n",(ulong)uVar2); return 1; } my_thr_key_mysys_exists = '\x01'; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
36,038
nglog::tools::ProgramInvocationShortName()
ng-log[P]ng-log/src/utilities.cc
const char* ProgramInvocationShortName() { if (g_program_invocation_short_name != nullptr) { return g_program_invocation_short_name; } #if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME) return program_invocation_short_name; #elif defined(HAVE_GETPROGNAME) return getprogname(); #elif defined(HAVE___PROGNAME) return __progname; #elif defined(HAVE___ARGV) return const_basename(__argv[0]); #else return "UNKNOWN"; #endif }
O1
cpp
nglog::tools::ProgramInvocationShortName(): movq 0x1f7aa(%rip), %rax # 0x41b10 testq %rax, %rax jne 0x22375 movq 0xec2e(%rip), %rax # 0x30fa0 movq (%rax), %rax retq
_ZN5nglog5tools26ProgramInvocationShortNameEv: mov rax, cs:_ZN5nglogL31g_program_invocation_short_nameE; nglog::g_program_invocation_short_name test rax, rax jnz short locret_22375 mov rax, cs:program_invocation_short_name_ptr mov rax, [rax] locret_22375: retn
long long nglog::tools::ProgramInvocationShortName(nglog::tools *this) { long long result; // rax result = nglog::g_program_invocation_short_name; if ( !nglog::g_program_invocation_short_name ) return program_invocation_short_name; return result; }
ProgramInvocationShortName: MOV RAX,qword ptr [0x00141b10] TEST RAX,RAX JNZ 0x00122375 MOV RAX,qword ptr [0x00130fa0] MOV RAX,qword ptr [RAX] LAB_00122375: RET
/* nglog::tools::ProgramInvocationShortName() */ long nglog::tools::ProgramInvocationShortName(void) { long lVar1; lVar1 = g_program_invocation_short_name; if (g_program_invocation_short_name == 0) { lVar1 = *(long *)PTR_program_invocation_short_name_00130fa0; } return lVar1; }
36,039
nglog::LogMessage::SaveOrSendToLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->outvec_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when recording in outvec_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->outvec_->push_back(string(start, len)); } else { SendToLog(); } }
O0
cpp
nglog::LogMessage::SaveOrSendToLog(): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x58(%rbp) movq 0x8(%rax), %rax cmpq $0x0, 0x76b0(%rax) je 0x31b89 jmp 0x31a5b movq -0x58(%rbp), %rax movq 0x8(%rax), %rax cmpq $0x0, 0x76c0(%rax) jbe 0x31a8e movq -0x58(%rbp), %rcx movq 0x8(%rcx), %rax movq 0x8(%rcx), %rcx movq 0x76c0(%rcx), %rcx subq $0x1, %rcx movsbl 0x4(%rax,%rcx), %eax cmpl $0xa, %eax je 0x31abf jmp 0x31a90 movl $0x3, %edi leaq 0x3e1de(%rip), %rsi # 0x6fc7a movl $0x77e, %edx # imm = 0x77E leaq 0x3b7c3(%rip), %rcx # 0x6d26b leaq 0x3e212(%rip), %r8 # 0x6fcc1 leaq 0x3e71f(%rip), %r9 # 0x701d5 movb $0x0, %al callq 0x67490 jmp 0x31abf jmp 0x31ac1 movq -0x58(%rbp), %rax movq 0x8(%rax), %rcx movq 0x76b8(%rcx), %rdx leaq 0x4(%rcx,%rdx), %rcx movq %rcx, -0x10(%rbp) movq 0x8(%rax), %rdx movq 0x76b8(%rdx), %rcx movq 0x76c0(%rdx), %rdx notq %rcx addq %rdx, %rcx movq %rcx, -0x18(%rbp) movq 0x8(%rax), %rax movq 0x76b0(%rax), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x68(%rbp) leaq -0x39(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0xaf60 movq -0x70(%rbp), %rsi movq -0x68(%rbp), %rdx movq -0x60(%rbp), %rcx leaq -0x38(%rbp), %rdi callq 0xa960 jmp 0x31b38 movq -0x78(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x29b80 jmp 0x31b47 leaq -0x38(%rbp), %rdi callq 0xb128 leaq -0x39(%rbp), %rdi callq 0xa8b0 jmp 0x31b92 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x31b7e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x38(%rbp), %rdi callq 0xb128 leaq -0x39(%rbp), %rdi callq 0xa8b0 jmp 0x31b9b movq -0x58(%rbp), %rdi callq 0x31250 addq $0x80, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0xaf50 nopw %cs:(%rax,%rax)
_ZN5nglog10LogMessage15SaveOrSendToLogEv: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_58], rax mov rax, [rax+8] cmp qword ptr [rax+76B0h], 0 jz loc_31B89 jmp short $+2 loc_31A5B: mov rax, [rbp+var_58] mov rax, [rax+8] cmp qword ptr [rax+76C0h], 0 jbe short loc_31A8E mov rcx, [rbp+var_58] mov rax, [rcx+8] mov rcx, [rcx+8] mov rcx, [rcx+76C0h] sub rcx, 1 movsx eax, byte ptr [rax+rcx+4] cmp eax, 0Ah jz short loc_31ABF loc_31A8E: jmp short $+2 loc_31A90: mov edi, 3 lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov edx, 77Eh lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_701D3+2; "" mov al, 0 call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) jmp short $+2 loc_31ABF: jmp short $+2 loc_31AC1: mov rax, [rbp+var_58] mov rcx, [rax+8] mov rdx, [rcx+76B8h] lea rcx, [rcx+rdx+4] mov [rbp+var_10], rcx mov rdx, [rax+8] mov rcx, [rdx+76B8h] mov rdx, [rdx+76C0h] not rcx add rcx, rdx mov [rbp+var_18], rcx mov rax, [rax+8] mov rax, [rax+76B0h] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov [rbp+var_70], rax mov rax, [rbp+var_18] mov [rbp+var_68], rax lea rdi, [rbp+var_39] mov [rbp+var_60], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_70] mov rdx, [rbp+var_68] mov rcx, [rbp+var_60] lea rdi, [rbp+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&) jmp short $+2 loc_31B38: mov rdi, [rbp+var_78] lea rsi, [rbp+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_31B47: lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_31B92 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp short loc_31B7E mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_31B7E: lea rdi, [rbp+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_31B9B loc_31B89: mov rdi, [rbp+var_58]; this call _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) loc_31B92: add rsp, 80h pop rbp retn loc_31B9B: mov rdi, [rbp+var_48] call __Unwind_Resume
nglog::LogDestination * nglog::LogMessage::SaveOrSendToLog(nglog::LogMessage *this) { long long v2; // [rsp+8h] [rbp-78h] long long v3; // [rsp+10h] [rbp-70h] long long v4; // [rsp+18h] [rbp-68h] char v5; // [rsp+47h] [rbp-39h] BYREF _BYTE v6[32]; // [rsp+48h] [rbp-38h] BYREF long long v7; // [rsp+68h] [rbp-18h] long long v8; // [rsp+70h] [rbp-10h] nglog::LogMessage *v9; // [rsp+78h] [rbp-8h] v9 = this; if ( !*(_QWORD *)(*((_QWORD *)this + 1) + 30384LL) ) return nglog::LogMessage::SendToLog(this); if ( !*(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) || *(_BYTE *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - 1LL + 4) != 10 ) { nglog::RawLog( 3, (unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1918, (unsigned int)"Check %s failed: %s", (unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", (unsigned int)""); } v8 = *((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30392LL) + 4LL; v7 = *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) + ~*(_QWORD *)(*((_QWORD *)this + 1) + 30392LL); v2 = *(_QWORD *)(*((_QWORD *)this + 1) + 30384LL); v3 = v8; v4 = v7; std::allocator<char>::allocator(); std::string::basic_string(v6, v3, v4, &v5); std::vector<std::string>::push_back(v2, (long long)v6); std::string::~string(v6); return (nglog::LogDestination *)std::allocator<char>::~allocator(&v5); }
SaveOrSendToLog: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RAX + 0x8] CMP qword ptr [RAX + 0x76b0],0x0 JZ 0x00131b89 JMP 0x00131a5b LAB_00131a5b: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x8] CMP qword ptr [RAX + 0x76c0],0x0 JBE 0x00131a8e MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x76c0] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x4] CMP EAX,0xa JZ 0x00131abf LAB_00131a8e: JMP 0x00131a90 LAB_00131a90: MOV EDI,0x3 LEA RSI,[0x16fc7a] MOV EDX,0x77e LEA RCX,[0x16d26b] LEA R8,[0x16fcc1] LEA R9,[0x1701d5] MOV AL,0x0 CALL 0x00167490 JMP 0x00131abf LAB_00131abf: JMP 0x00131ac1 LAB_00131ac1: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RCX + 0x76b8] LEA RCX,[RCX + RDX*0x1 + 0x4] MOV qword ptr [RBP + -0x10],RCX MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RDX + 0x76b8] MOV RDX,qword ptr [RDX + 0x76c0] NOT RCX ADD RCX,RDX MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x76b0] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x68],RAX LEA RDI,[RBP + -0x39] MOV qword ptr [RBP + -0x60],RDI CALL 0x0010af60 MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] LAB_00131b2d: LEA RDI,[RBP + -0x38] CALL 0x0010a960 JMP 0x00131b38 LAB_00131b38: MOV RDI,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x38] CALL 0x00129b80 LAB_00131b45: JMP 0x00131b47 LAB_00131b47: LEA RDI,[RBP + -0x38] CALL 0x0010b128 LEA RDI,[RBP + -0x39] CALL 0x0010a8b0 JMP 0x00131b92 LAB_00131b89: MOV RDI,qword ptr [RBP + -0x58] CALL 0x00131250 LAB_00131b92: ADD RSP,0x80 POP RBP RET
/* nglog::LogMessage::SaveOrSendToLog() */ void __thiscall nglog::LogMessage::SaveOrSendToLog(LogMessage *this) { char *pcVar1; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; ulong uVar2; allocator local_41; string local_40 [32]; ulong local_20; char *local_18; LogMessage *local_10; local_10 = this; if (*(long *)(*(long *)(this + 8) + 0x76b0) == 0) { SendToLog(this); } else { if ((*(long *)(*(long *)(this + 8) + 0x76c0) == 0) || (*(char *)(*(long *)(this + 8) + *(long *)(*(long *)(this + 8) + 0x76c0) + 3) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x77e, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_001701d5); } pcVar1 = (char *)(*(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8)); uVar2 = ~*(ulong *)(*(long *)(this + 8) + 0x76b8) + *(long *)(*(long *)(this + 8) + 0x76c0); this_00 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **) (*(long *)(this + 8) + 0x76b0); local_20 = uVar2; local_18 = pcVar1; std::allocator<char>::allocator(); /* try { // try from 00131b2d to 00131b35 has its CatchHandler @ 00131b5b */ std::__cxx11::string::string(local_40,pcVar1,uVar2,&local_41); /* try { // try from 00131b38 to 00131b44 has its CatchHandler @ 00131b69 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back (this_00,local_40); std::__cxx11::string::~string(local_40); std::allocator<char>::~allocator((allocator<char> *)&local_41); } return; }
36,040
my_charlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); return MY_CS_ILSEQ; }
O3
c
my_charlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0xccdb7 movb (%rsi), %cl cmpb $-0x11, %cl ja 0xccdb5 movl $0x1, %eax testb %cl, %cl jns 0xccdb7 cmpb $-0x3e, %cl jae 0xccdb9 xorl %eax, %eax popq %rbp retq cmpb $-0x21, %cl ja 0xccdd9 leaq 0x2(%rsi), %rcx movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %rcx ja 0xccdb7 xorl %eax, %eax cmpb $-0x40, 0x1(%rsi) setl %al addl %eax, %eax jmp 0xccdb7 leaq 0x3(%rsi), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %rdi ja 0xccdb7 movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0xccdb5 cmpb $-0x41, 0x2(%rsi) movl $0x0, %eax jg 0xccdb7 xorl %eax, %eax cmpb $-0x60, %dl setae %al cmpb $-0x20, %cl leal (%rax,%rax,2), %ecx movl $0x3, %eax cmovel %ecx, %eax jmp 0xccdb7
my_charlen_utf8mb3: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb short loc_CCDB7 mov cl, [rsi] cmp cl, 0EFh ja short loc_CCDB5 mov eax, 1 test cl, cl jns short loc_CCDB7 cmp cl, 0C2h jnb short loc_CCDB9 loc_CCDB5: xor eax, eax loc_CCDB7: pop rbp retn loc_CCDB9: cmp cl, 0DFh ja short loc_CCDD9 lea rcx, [rsi+2] mov eax, 0FFFFFF9Ah cmp rcx, rdx ja short loc_CCDB7 xor eax, eax cmp byte ptr [rsi+1], 0C0h setl al add eax, eax jmp short loc_CCDB7 loc_CCDD9: lea rdi, [rsi+3] mov eax, 0FFFFFF99h cmp rdi, rdx ja short loc_CCDB7 mov dl, [rsi+1] cmp dl, 0BFh jg short loc_CCDB5 cmp byte ptr [rsi+2], 0BFh mov eax, 0 jg short loc_CCDB7 xor eax, eax cmp dl, 0A0h setnb al cmp cl, 0E0h lea ecx, [rax+rax*2] mov eax, 3 cmovz eax, ecx jmp short loc_CCDB7
long long my_charlen_utf8mb3(long long a1, char *a2, unsigned long long a3) { long long result; // rax char v4; // cl char v5; // dl result = 4294967195LL; if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( (unsigned __int8)*a2 > 0xEFu ) return 0LL; result = 1LL; if ( v4 >= 0 ) return result; if ( (unsigned __int8)v4 < 0xC2u ) return 0LL; if ( (unsigned __int8)v4 > 0xDFu ) { result = 4294967193LL; if ( (unsigned long long)(a2 + 3) <= a3 ) { v5 = a2[1]; if ( v5 > -65 ) return 0LL; result = 0LL; if ( a2[2] <= -65 ) { result = 3LL; if ( v4 == -32 ) return 3 * (unsigned int)((unsigned __int8)v5 >= 0xA0u); } } } else { result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) return 2 * (unsigned int)(a2[1] < -64); } } return result; }
my_charlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x001ccdb7 MOV CL,byte ptr [RSI] CMP CL,0xef JA 0x001ccdb5 MOV EAX,0x1 TEST CL,CL JNS 0x001ccdb7 CMP CL,0xc2 JNC 0x001ccdb9 LAB_001ccdb5: XOR EAX,EAX LAB_001ccdb7: POP RBP RET LAB_001ccdb9: CMP CL,0xdf JA 0x001ccdd9 LEA RCX,[RSI + 0x2] MOV EAX,0xffffff9a CMP RCX,RDX JA 0x001ccdb7 XOR EAX,EAX CMP byte ptr [RSI + 0x1],0xc0 SETL AL ADD EAX,EAX JMP 0x001ccdb7 LAB_001ccdd9: LEA RDI,[RSI + 0x3] MOV EAX,0xffffff99 CMP RDI,RDX JA 0x001ccdb7 MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x001ccdb5 CMP byte ptr [RSI + 0x2],0xbf MOV EAX,0x0 JG 0x001ccdb7 XOR EAX,EAX CMP DL,0xa0 SETNC AL CMP CL,0xe0 LEA ECX,[RAX + RAX*0x2] MOV EAX,0x3 CMOVZ EAX,ECX JMP 0x001ccdb7
int my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; if (param_3 <= param_2) { return -0x65; } bVar1 = *param_2; if (bVar1 < 0xf0) { if (-1 < (char)bVar1) { return 1; } if (0xc1 < bVar1) { if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return -0x66; } return (uint)((char)param_2[1] < -0x40) * 2; } if (param_3 < param_2 + 3) { return -0x67; } if ((char)param_2[1] < -0x40) { if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 != 0xe0) { return 3; } return (uint)(0x9f < param_2[1]) * 3; } } } return 0; }
36,041
delete_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
static my_bool delete_dynamic_record(MARIA_HA *info, MARIA_RECORD_POS filepos, uint second_read) { uint length,b_type; MARIA_BLOCK_INFO block_info,del_block; int error; my_bool remove_next_block; DBUG_ENTER("delete_dynamic_record"); /* First add a link from the last block to the new one */ error= update_backward_delete_link(info, info->s->state.dellink, filepos); block_info.second_read=second_read; do { /* Remove block at 'filepos' */ if ((b_type= _ma_get_block_info(info, &block_info, info->dfile.file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR) || (length=(uint) (block_info.filepos-filepos) +block_info.block_len) < MARIA_MIN_BLOCK_LENGTH) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); } /* Check if next block is a delete block */ del_block.second_read=0; remove_next_block=0; if (_ma_get_block_info(info, &del_block, info->dfile.file, filepos + length) & BLOCK_DELETED && del_block.block_len+length < MARIA_DYN_MAX_BLOCK_LENGTH) { /* We can't remove this yet as this block may be the head block */ remove_next_block=1; length+=del_block.block_len; } block_info.header[0]=0; mi_int3store(block_info.header+1,length); mi_sizestore(block_info.header+4,info->s->state.dellink); if (b_type & BLOCK_LAST) bfill(block_info.header+12,8,255); else mi_sizestore(block_info.header+12,block_info.next_filepos); if (info->s->file_write(info, block_info.header, 20, filepos, MYF(MY_NABP))) DBUG_RETURN(1); info->s->state.dellink = filepos; info->state->del++; info->state->empty+=length; filepos=block_info.next_filepos; /* Now it's safe to unlink the deleted block directly after this one */ if (remove_next_block && unlink_deleted_block(info,&del_block)) error=1; } while (!(b_type & BLOCK_LAST)); DBUG_RETURN(error); }
O0
c
delete_dynamic_record: pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xc8(%rbp) movq %rsi, -0xd0(%rbp) movl %edx, -0xd4(%rbp) movq -0xc8(%rbp), %rdi movq -0xc8(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rsi movq -0xd0(%rbp), %rdx callq 0x3eeb0 movsbl %al, %eax movl %eax, -0xe0(%rbp) movl -0xd4(%rbp), %eax movl %eax, -0x10(%rbp) movq -0xc8(%rbp), %rdi movq -0xc8(%rbp), %rax movl 0x480(%rax), %edx movq -0xd0(%rbp), %rcx leaq -0x60(%rbp), %rsi callq 0x3e0b0 movl %eax, -0xdc(%rbp) andl $0x3c, %eax cmpl $0x0, %eax jne 0x3ce80 movq -0x28(%rbp), %rax subq -0xd0(%rbp), %rax movl %eax, %eax addq -0x38(%rbp), %rax movl %eax, -0xd8(%rbp) cmpl $0x14, %eax jae 0x3ce9d movq -0xc8(%rbp), %rdi movl $0x7f, %esi callq 0x33880 movb $0x1, -0xb9(%rbp) jmp 0x3d1c2 movl $0x0, -0x68(%rbp) movb $0x0, -0xe1(%rbp) movq -0xc8(%rbp), %rdi movq -0xc8(%rbp), %rax movl 0x480(%rax), %edx movq -0xd0(%rbp), %rcx movl -0xd8(%rbp), %eax addq %rax, %rcx leaq -0xb8(%rbp), %rsi callq 0x3e0b0 andl $0x4, %eax cmpl $0x0, %eax je 0x3cf18 movq -0x90(%rbp), %rax movl -0xd8(%rbp), %ecx addq %rcx, %rax cmpq $0xfffffc, %rax # imm = 0xFFFFFC jae 0x3cf18 movb $0x1, -0xe1(%rbp) movq -0x90(%rbp), %rcx movl -0xd8(%rbp), %eax addq %rcx, %rax movl %eax, -0xd8(%rbp) movb $0x0, -0x60(%rbp) movl -0xd8(%rbp), %eax movq %rax, -0xf0(%rbp) movq -0xf0(%rbp), %rax movb %al, -0x5d(%rbp) movq -0xf0(%rbp), %rax shrq $0x8, %rax movb %al, -0x5e(%rbp) movq -0xf0(%rbp), %rax shrq $0x10, %rax movb %al, -0x5f(%rbp) movq -0xc8(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rax movq %rax, -0xf8(%rbp) movq -0xc8(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rax shrq $0x20, %rax movq %rax, -0x100(%rbp) movq -0x100(%rbp), %rax movq %rax, -0x108(%rbp) movq -0x108(%rbp), %rax movb %al, -0x59(%rbp) movq -0x108(%rbp), %rax shrq $0x8, %rax movb %al, -0x5a(%rbp) movq -0x108(%rbp), %rax shrq $0x10, %rax movb %al, -0x5b(%rbp) movq -0x108(%rbp), %rax shrq $0x18, %rax movb %al, -0x5c(%rbp) movq -0xf8(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x110(%rbp), %rax movb %al, -0x55(%rbp) movq -0x110(%rbp), %rax shrq $0x8, %rax movb %al, -0x56(%rbp) movq -0x110(%rbp), %rax shrq $0x10, %rax movb %al, -0x57(%rbp) movq -0x110(%rbp), %rax shrq $0x18, %rax movb %al, -0x58(%rbp) movl -0xdc(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x3d031 leaq -0x60(%rbp), %rdi addq $0xc, %rdi movl $0xff, %esi movl $0x8, %edx callq 0x2a2c0 jmp 0x3d0cf movq -0x20(%rbp), %rax movq %rax, -0x118(%rbp) movq -0x20(%rbp), %rax shrq $0x20, %rax movq %rax, -0x120(%rbp) movq -0x120(%rbp), %rax movq %rax, -0x128(%rbp) movq -0x128(%rbp), %rax movb %al, -0x51(%rbp) movq -0x128(%rbp), %rax shrq $0x8, %rax movb %al, -0x52(%rbp) movq -0x128(%rbp), %rax shrq $0x10, %rax movb %al, -0x53(%rbp) movq -0x128(%rbp), %rax shrq $0x18, %rax movb %al, -0x54(%rbp) movq -0x118(%rbp), %rax movq %rax, -0x130(%rbp) movq -0x130(%rbp), %rax movb %al, -0x4d(%rbp) movq -0x130(%rbp), %rax shrq $0x8, %rax movb %al, -0x4e(%rbp) movq -0x130(%rbp), %rax shrq $0x10, %rax movb %al, -0x4f(%rbp) movq -0x130(%rbp), %rax shrq $0x18, %rax movb %al, -0x50(%rbp) movq -0xc8(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0xc8(%rbp), %rdi leaq -0x60(%rbp), %rsi movq -0xd0(%rbp), %rcx movl $0x14, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x3d113 jmp 0x3d107 movb $0x1, -0xb9(%rbp) jmp 0x3d1c2 movq -0xd0(%rbp), %rcx movq -0xc8(%rbp), %rax movq (%rax), %rax movq %rcx, 0xc8(%rax) movq -0xc8(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x8(%rax) movl -0xd8(%rbp), %eax movl %eax, %ecx movq -0xc8(%rbp), %rax movq 0x20(%rax), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq %rax, -0xd0(%rbp) movsbl -0xe1(%rbp), %eax cmpl $0x0, %eax je 0x3d199 movq -0xc8(%rbp), %rdi leaq -0xb8(%rbp), %rsi callq 0x3eae0 movsbl %al, %eax cmpl $0x0, %eax je 0x3d199 movl $0x1, -0xe0(%rbp) jmp 0x3d19b movl -0xdc(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al xorb $-0x1, %al testb $0x1, %al jne 0x3ce32 jmp 0x3d1b6 movl -0xe0(%rbp), %eax movb %al, -0xb9(%rbp) movb -0xb9(%rbp), %al movb %al, -0x131(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3d1ef movb -0x131(%rbp), %al addq $0x140, %rsp # imm = 0x140 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
delete_dynamic_record: push rbp mov rbp, rsp sub rsp, 140h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_C8], rdi mov [rbp+var_D0], rsi mov [rbp+var_D4], edx mov rdi, [rbp+var_C8] mov rax, [rbp+var_C8] mov rax, [rax] mov rsi, [rax+0C8h] mov rdx, [rbp+var_D0] call update_backward_delete_link movsx eax, al mov [rbp+var_E0], eax mov eax, [rbp+var_D4] mov [rbp+var_10], eax loc_3CE32: mov rdi, [rbp+var_C8] mov rax, [rbp+var_C8] mov edx, [rax+480h] mov rcx, [rbp+var_D0] lea rsi, [rbp+var_60] call _ma_get_block_info mov [rbp+var_DC], eax and eax, 3Ch cmp eax, 0 jnz short loc_3CE80 mov rax, [rbp+var_28] sub rax, [rbp+var_D0] mov eax, eax add rax, [rbp+var_38] mov [rbp+var_D8], eax cmp eax, 14h jnb short loc_3CE9D loc_3CE80: mov rdi, [rbp+var_C8] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_B9], 1 jmp loc_3D1C2 loc_3CE9D: mov [rbp+var_68], 0 mov [rbp+var_E1], 0 mov rdi, [rbp+var_C8] mov rax, [rbp+var_C8] mov edx, [rax+480h] mov rcx, [rbp+var_D0] mov eax, [rbp+var_D8] add rcx, rax lea rsi, [rbp+var_B8] call _ma_get_block_info and eax, 4 cmp eax, 0 jz short loc_3CF18 mov rax, [rbp+var_90] mov ecx, [rbp+var_D8] add rax, rcx cmp rax, 0FFFFFCh jnb short loc_3CF18 mov [rbp+var_E1], 1 mov rcx, [rbp+var_90] mov eax, [rbp+var_D8] add rax, rcx mov [rbp+var_D8], eax loc_3CF18: mov [rbp+var_60], 0 mov eax, [rbp+var_D8] mov [rbp+var_F0], rax mov rax, [rbp+var_F0] mov [rbp+var_5D], al mov rax, [rbp+var_F0] shr rax, 8 mov [rbp+var_5E], al mov rax, [rbp+var_F0] shr rax, 10h mov [rbp+var_5F], al mov rax, [rbp+var_C8] mov rax, [rax] mov rax, [rax+0C8h] mov [rbp+var_F8], rax mov rax, [rbp+var_C8] mov rax, [rax] mov rax, [rax+0C8h] shr rax, 20h mov [rbp+var_100], rax mov rax, [rbp+var_100] mov [rbp+var_108], rax mov rax, [rbp+var_108] mov [rbp+var_59], al mov rax, [rbp+var_108] shr rax, 8 mov [rbp+var_5A], al mov rax, [rbp+var_108] shr rax, 10h mov [rbp+var_5B], al mov rax, [rbp+var_108] shr rax, 18h mov [rbp+var_5C], al mov rax, [rbp+var_F8] mov [rbp+var_110], rax mov rax, [rbp+var_110] mov [rbp+var_55], al mov rax, [rbp+var_110] shr rax, 8 mov [rbp+var_56], al mov rax, [rbp+var_110] shr rax, 10h mov [rbp+var_57], al mov rax, [rbp+var_110] shr rax, 18h mov [rbp+var_58], al mov eax, [rbp+var_DC] and eax, 2 cmp eax, 0 jz short loc_3D031 lea rdi, [rbp+var_60] add rdi, 0Ch mov esi, 0FFh mov edx, 8 call _memset jmp loc_3D0CF loc_3D031: mov rax, [rbp+var_20] mov [rbp+var_118], rax mov rax, [rbp+var_20] shr rax, 20h mov [rbp+var_120], rax mov rax, [rbp+var_120] mov [rbp+var_128], rax mov rax, [rbp+var_128] mov [rbp+var_51], al mov rax, [rbp+var_128] shr rax, 8 mov [rbp+var_52], al mov rax, [rbp+var_128] shr rax, 10h mov [rbp+var_53], al mov rax, [rbp+var_128] shr rax, 18h mov [rbp+var_54], al mov rax, [rbp+var_118] mov [rbp+var_130], rax mov rax, [rbp+var_130] mov [rbp+var_4D], al mov rax, [rbp+var_130] shr rax, 8 mov [rbp+var_4E], al mov rax, [rbp+var_130] shr rax, 10h mov [rbp+var_4F], al mov rax, [rbp+var_130] shr rax, 18h mov [rbp+var_50], al loc_3D0CF: mov rax, [rbp+var_C8] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_C8] lea rsi, [rbp+var_60] mov rcx, [rbp+var_D0] mov edx, 14h mov r8d, 4 call rax cmp rax, 0 jz short loc_3D113 jmp short $+2 loc_3D107: mov [rbp+var_B9], 1 jmp loc_3D1C2 loc_3D113: mov rcx, [rbp+var_D0] mov rax, [rbp+var_C8] mov rax, [rax] mov [rax+0C8h], rcx mov rax, [rbp+var_C8] mov rax, [rax+20h] mov rcx, [rax+8] add rcx, 1 mov [rax+8], rcx mov eax, [rbp+var_D8] mov ecx, eax mov rax, [rbp+var_C8] mov rax, [rax+20h] add rcx, [rax+10h] mov [rax+10h], rcx mov rax, [rbp+var_20] mov [rbp+var_D0], rax movsx eax, [rbp+var_E1] cmp eax, 0 jz short loc_3D199 mov rdi, [rbp+var_C8] lea rsi, [rbp+var_B8] call unlink_deleted_block movsx eax, al cmp eax, 0 jz short loc_3D199 mov [rbp+var_E0], 1 loc_3D199: jmp short $+2 loc_3D19B: mov eax, [rbp+var_DC] and eax, 2 cmp eax, 0 setnz al xor al, 0FFh test al, 1 jnz loc_3CE32 jmp short $+2 loc_3D1B6: mov eax, [rbp+var_E0] mov [rbp+var_B9], al loc_3D1C2: mov al, [rbp+var_B9] mov [rbp+var_131], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3D1EF mov al, [rbp+var_131] add rsp, 140h pop rbp retn loc_3D1EF: call ___stack_chk_fail
char delete_dynamic_record(unsigned int *a1, long long a2, int a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 int v6; // r9d long long v8; // [rsp+48h] [rbp-F8h] char v9; // [rsp+5Fh] [rbp-E1h] char v10; // [rsp+60h] [rbp-E0h] char block_info; // [rsp+64h] [rbp-DCh] unsigned int v12; // [rsp+68h] [rbp-D8h] long long v14; // [rsp+70h] [rbp-D0h] _BYTE v16[40]; // [rsp+88h] [rbp-B8h] BYREF long long v17; // [rsp+B0h] [rbp-90h] int v18; // [rsp+D8h] [rbp-68h] _BYTE v19[12]; // [rsp+E0h] [rbp-60h] BYREF _BYTE v20[28]; // [rsp+ECh] [rbp-54h] BYREF long long v21; // [rsp+108h] [rbp-38h] long long v22; // [rsp+118h] [rbp-28h] long long v23; // [rsp+120h] [rbp-20h] int v24; // [rsp+130h] [rbp-10h] unsigned long long v25; // [rsp+138h] [rbp-8h] v25 = __readfsqword(0x28u); v14 = a2; v10 = update_backward_delete_link(a1, *(_QWORD *)(*(_QWORD *)a1 + 200LL), a2); v24 = a3; do { block_info = ma_get_block_info(a1, v19, a1[288], v14); if ( (block_info & 0x3C) != 0 || (v12 = v21 + v22 - v14, v12 < 0x14) ) { ma_set_fatal_error(a1, 127, v3, v4, v5, v6); return 1; } v18 = 0; v9 = 0; if ( (ma_get_block_info(a1, v16, a1[288], v12 + v14) & 4) != 0 && (unsigned long long)v12 + v17 < 0xFFFFFC ) { v9 = 1; v12 += v17; } v19[0] = 0; v19[2] = BYTE1(v12); v19[3] = v12; v19[1] = BYTE2(v12); v8 = *(_QWORD *)(*(_QWORD *)a1 + 200LL); v19[6] = BYTE5(v8); v19[7] = BYTE4(v8); v19[4] = HIBYTE(v8); v19[5] = BYTE6(v8); v19[10] = BYTE1(v8); v19[11] = v8; v19[8] = BYTE3(v8); v19[9] = BYTE2(v8); if ( (block_info & 2) != 0 ) { memset(v20, 255LL, 8LL); } else { v20[2] = BYTE5(v23); v20[3] = BYTE4(v23); v20[0] = HIBYTE(v23); v20[1] = BYTE6(v23); v20[6] = BYTE1(v23); v20[7] = v23; v20[4] = BYTE3(v23); v20[5] = BYTE2(v23); } if ( (*(long long ( **)(unsigned int *, _BYTE *, long long, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, v19, 20LL, v14, 4LL) ) { return 1; } *(_QWORD *)(*(_QWORD *)a1 + 200LL) = v14; ++*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL); *(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) += v12; v14 = v23; if ( v9 && (unsigned __int8)unlink_deleted_block(a1, v16) ) v10 = 1; } while ( (block_info & 2) == 0 ); return v10; }
delete_dynamic_record: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0xc8],RDI MOV qword ptr [RBP + -0xd0],RSI MOV dword ptr [RBP + -0xd4],EDX MOV RDI,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0xc8] MOV RDX,qword ptr [RBP + -0xd0] CALL 0x0013eeb0 MOVSX EAX,AL MOV dword ptr [RBP + -0xe0],EAX MOV EAX,dword ptr [RBP + -0xd4] MOV dword ptr [RBP + -0x10],EAX LAB_0013ce32: MOV RDI,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RBP + -0xc8] MOV EDX,dword ptr [RAX + 0x480] MOV RCX,qword ptr [RBP + -0xd0] LEA RSI,[RBP + -0x60] CALL 0x0013e0b0 MOV dword ptr [RBP + -0xdc],EAX AND EAX,0x3c CMP EAX,0x0 JNZ 0x0013ce80 MOV RAX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RBP + -0xd0] MOV EAX,EAX ADD RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBP + -0xd8],EAX CMP EAX,0x14 JNC 0x0013ce9d LAB_0013ce80: MOV RDI,qword ptr [RBP + -0xc8] MOV ESI,0x7f CALL 0x00133880 MOV byte ptr [RBP + -0xb9],0x1 JMP 0x0013d1c2 LAB_0013ce9d: MOV dword ptr [RBP + -0x68],0x0 MOV byte ptr [RBP + -0xe1],0x0 MOV RDI,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RBP + -0xc8] MOV EDX,dword ptr [RAX + 0x480] MOV RCX,qword ptr [RBP + -0xd0] MOV EAX,dword ptr [RBP + -0xd8] ADD RCX,RAX LEA RSI,[RBP + -0xb8] CALL 0x0013e0b0 AND EAX,0x4 CMP EAX,0x0 JZ 0x0013cf18 MOV RAX,qword ptr [RBP + -0x90] MOV ECX,dword ptr [RBP + -0xd8] ADD RAX,RCX CMP RAX,0xfffffc JNC 0x0013cf18 MOV byte ptr [RBP + -0xe1],0x1 MOV RCX,qword ptr [RBP + -0x90] MOV EAX,dword ptr [RBP + -0xd8] ADD RAX,RCX MOV dword ptr [RBP + -0xd8],EAX LAB_0013cf18: MOV byte ptr [RBP + -0x60],0x0 MOV EAX,dword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0xf0],RAX MOV RAX,qword ptr [RBP + -0xf0] MOV byte ptr [RBP + -0x5d],AL MOV RAX,qword ptr [RBP + -0xf0] SHR RAX,0x8 MOV byte ptr [RBP + -0x5e],AL MOV RAX,qword ptr [RBP + -0xf0] SHR RAX,0x10 MOV byte ptr [RBP + -0x5f],AL MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xc8] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xc8] SHR RAX,0x20 MOV qword ptr [RBP + -0x100],RAX MOV RAX,qword ptr [RBP + -0x100] MOV qword ptr [RBP + -0x108],RAX MOV RAX,qword ptr [RBP + -0x108] MOV byte ptr [RBP + -0x59],AL MOV RAX,qword ptr [RBP + -0x108] SHR RAX,0x8 MOV byte ptr [RBP + -0x5a],AL MOV RAX,qword ptr [RBP + -0x108] SHR RAX,0x10 MOV byte ptr [RBP + -0x5b],AL MOV RAX,qword ptr [RBP + -0x108] SHR RAX,0x18 MOV byte ptr [RBP + -0x5c],AL MOV RAX,qword ptr [RBP + -0xf8] MOV qword ptr [RBP + -0x110],RAX MOV RAX,qword ptr [RBP + -0x110] MOV byte ptr [RBP + -0x55],AL MOV RAX,qword ptr [RBP + -0x110] SHR RAX,0x8 MOV byte ptr [RBP + -0x56],AL MOV RAX,qword ptr [RBP + -0x110] SHR RAX,0x10 MOV byte ptr [RBP + -0x57],AL MOV RAX,qword ptr [RBP + -0x110] SHR RAX,0x18 MOV byte ptr [RBP + -0x58],AL MOV EAX,dword ptr [RBP + -0xdc] AND EAX,0x2 CMP EAX,0x0 JZ 0x0013d031 LEA RDI,[RBP + -0x60] ADD RDI,0xc MOV ESI,0xff MOV EDX,0x8 CALL 0x0012a2c0 JMP 0x0013d0cf LAB_0013d031: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x20 MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [RBP + -0x120] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x128] MOV byte ptr [RBP + -0x51],AL MOV RAX,qword ptr [RBP + -0x128] SHR RAX,0x8 MOV byte ptr [RBP + -0x52],AL MOV RAX,qword ptr [RBP + -0x128] SHR RAX,0x10 MOV byte ptr [RBP + -0x53],AL MOV RAX,qword ptr [RBP + -0x128] SHR RAX,0x18 MOV byte ptr [RBP + -0x54],AL MOV RAX,qword ptr [RBP + -0x118] MOV qword ptr [RBP + -0x130],RAX MOV RAX,qword ptr [RBP + -0x130] MOV byte ptr [RBP + -0x4d],AL MOV RAX,qword ptr [RBP + -0x130] SHR RAX,0x8 MOV byte ptr [RBP + -0x4e],AL MOV RAX,qword ptr [RBP + -0x130] SHR RAX,0x10 MOV byte ptr [RBP + -0x4f],AL MOV RAX,qword ptr [RBP + -0x130] SHR RAX,0x18 MOV byte ptr [RBP + -0x50],AL LAB_0013d0cf: MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[RBP + -0x60] MOV RCX,qword ptr [RBP + -0xd0] MOV EDX,0x14 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0013d113 JMP 0x0013d107 LAB_0013d107: MOV byte ptr [RBP + -0xb9],0x1 JMP 0x0013d1c2 LAB_0013d113: MOV RCX,qword ptr [RBP + -0xd0] MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0xd8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xc8] MOV RAX,qword ptr [RAX + 0x20] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xd0],RAX MOVSX EAX,byte ptr [RBP + -0xe1] CMP EAX,0x0 JZ 0x0013d199 MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[RBP + -0xb8] CALL 0x0013eae0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0013d199 MOV dword ptr [RBP + -0xe0],0x1 LAB_0013d199: JMP 0x0013d19b LAB_0013d19b: MOV EAX,dword ptr [RBP + -0xdc] AND EAX,0x2 CMP EAX,0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x0013ce32 JMP 0x0013d1b6 LAB_0013d1b6: MOV EAX,dword ptr [RBP + -0xe0] MOV byte ptr [RBP + -0xb9],AL LAB_0013d1c2: MOV AL,byte ptr [RBP + -0xb9] MOV byte ptr [RBP + -0x131],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013d1ef MOV AL,byte ptr [RBP + -0x131] ADD RSP,0x140 POP RBP RET LAB_0013d1ef: CALL 0x0012a270
int8 delete_dynamic_record(long *param_1,long param_2,int4 param_3) { int8 uVar1; int8 uVar2; bool bVar3; char cVar4; uint uVar5; uint uVar6; long lVar7; long in_FS_OFFSET; uint local_e0; long local_d8; int1 local_c1; int1 local_c0 [40]; long local_98; int4 local_70; int1 local_68; int1 local_67; int1 local_66; int1 local_65; int1 local_64; int1 local_63; int1 local_62; int1 local_61; int1 local_60; int1 local_5f; int1 local_5e; int1 local_5d; int1 local_5c; int1 local_5b; int1 local_5a; int1 local_59; int1 local_58; int1 local_57; int1 local_56; int1 local_55; int8 local_40; int8 local_30; long local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c1 = update_backward_delete_link(param_1,*(int8 *)(*param_1 + 200),param_2); local_d8 = param_2; local_18 = param_3; do { uVar5 = _ma_get_block_info(param_1,&local_68,(int)param_1[0x90],local_d8); if (((uVar5 & 0x3c) != 0) || (local_e0 = ((int)local_30 - (int)local_d8) + (int)local_40, local_e0 < 0x14)) { _ma_set_fatal_error(param_1,0x7f); local_c1 = 1; break; } local_70 = 0; bVar3 = false; uVar6 = _ma_get_block_info(param_1,local_c0,(int)param_1[0x90],local_d8 + (ulong)local_e0); if (((uVar6 & 4) != 0) && (local_98 + (ulong)local_e0 < 0xfffffc)) { bVar3 = true; local_e0 = local_e0 + (int)local_98; } local_68 = 0; local_65 = (int1)local_e0; local_66 = (int1)(local_e0 >> 8); local_67 = (int1)(local_e0 >> 0x10); uVar1 = *(int8 *)(*param_1 + 200); uVar2 = *(int8 *)(*param_1 + 200); local_61 = (int1)((ulong)uVar2 >> 0x20); local_62 = (int1)((ulong)uVar2 >> 0x28); local_63 = (int1)((ulong)uVar2 >> 0x30); local_64 = (int1)((ulong)uVar2 >> 0x38); local_5d = (int1)uVar1; local_5e = (int1)((ulong)uVar1 >> 8); local_5f = (int1)((ulong)uVar1 >> 0x10); local_60 = (int1)((ulong)uVar1 >> 0x18); if ((uVar5 & 2) == 0) { local_59 = (int1)((ulong)local_28 >> 0x20); local_5a = (int1)((ulong)local_28 >> 0x28); local_5b = (int1)((ulong)local_28 >> 0x30); local_5c = (int1)((ulong)local_28 >> 0x38); local_55 = (int1)local_28; local_56 = (int1)((ulong)local_28 >> 8); local_57 = (int1)((ulong)local_28 >> 0x10); local_58 = (int1)((ulong)local_28 >> 0x18); } else { memset(&local_5c,0xff,8); } lVar7 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_68,0x14,local_d8,4); if (lVar7 != 0) { local_c1 = 1; break; } *(long *)(*param_1 + 200) = local_d8; *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(ulong *)(param_1[4] + 0x10) = (ulong)local_e0 + *(long *)(param_1[4] + 0x10); local_d8 = local_28; if ((bVar3) && (cVar4 = unlink_deleted_block(param_1,local_c0), cVar4 != '\0')) { local_c1 = 1; } } while ((uVar5 & 2) == 0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_c1); }
36,042
unpack_dirname
eloqsql/mysys/mf_pack.c
size_t unpack_dirname(char * to, const char *from) { size_t length, h_length; char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion; DBUG_ENTER("unpack_dirname"); length= normalize_dirname(buff, from); if (buff[0] == FN_HOMELIB) { suffix=buff+1; tilde_expansion=expand_tilde(&suffix); if (tilde_expansion) { length-= (size_t) (suffix-buff)-1; if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN) { if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR)) h_length--; if (buff+h_length < suffix) bmove(buff+h_length,suffix,length); else bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length); bmove(buff,tilde_expansion,h_length); } } } #ifdef USE_SYMDIR if (my_use_symdir) symdirget(buff); #endif DBUG_RETURN(system_filename(to,buff)); /* Fix for open */ }
O0
c
unpack_dirname: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0x2e110 movq %rax, -0x228(%rbp) movsbl -0x210(%rbp), %eax cmpl $0x7e, %eax jne 0x2e3c1 leaq -0x210(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) leaq -0x238(%rbp), %rdi callq 0x2e410 movq %rax, -0x240(%rbp) cmpq $0x0, -0x240(%rbp) je 0x2e3bf movq -0x238(%rbp), %rcx leaq -0x210(%rbp), %rax subq %rax, %rcx subq $0x1, %rcx movq -0x228(%rbp), %rax subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x228(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x240(%rbp), %rdi callq 0x24130 movq %rax, %rcx movq -0x248(%rbp), %rax movq %rcx, -0x230(%rbp) addq %rcx, %rax cmpq $0x200, %rax # imm = 0x200 ja 0x2e3bd cmpq $0x0, -0x230(%rbp) jbe 0x2e33a movq -0x240(%rbp), %rax movq -0x230(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0x2e33a movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) leaq -0x210(%rbp), %rax addq -0x230(%rbp), %rax cmpq -0x238(%rbp), %rax jae 0x2e374 leaq -0x210(%rbp), %rdi addq -0x230(%rbp), %rdi movq -0x238(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x24530 jmp 0x2e3a3 leaq -0x210(%rbp), %rdi addq -0x230(%rbp), %rdi addq -0x228(%rbp), %rdi movq -0x238(%rbp), %rsi addq -0x228(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x345b0 leaq -0x210(%rbp), %rdi movq -0x240(%rbp), %rsi movq -0x230(%rbp), %rdx callq 0x24530 jmp 0x2e3bf jmp 0x2e3c1 jmp 0x2e3c3 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x2e4d0 movq %rax, -0x250(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2e3ff movq -0x250(%rbp), %rax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x24320 nopw %cs:(%rax,%rax)
unpack_dirname: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] call normalize_dirname mov [rbp+var_228], rax movsx eax, [rbp+var_210] cmp eax, 7Eh ; '~' jnz loc_2E3C1 lea rax, [rbp+var_210] add rax, 1 mov [rbp+var_238], rax lea rdi, [rbp+var_238] call expand_tilde mov [rbp+var_240], rax cmp [rbp+var_240], 0 jz loc_2E3BF mov rcx, [rbp+var_238] lea rax, [rbp+var_210] sub rcx, rax sub rcx, 1 mov rax, [rbp+var_228] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_228] mov [rbp+var_248], rax mov rdi, [rbp+var_240] call _strlen mov rcx, rax mov rax, [rbp+var_248] mov [rbp+var_230], rcx add rax, rcx cmp rax, 200h ja loc_2E3BD cmp [rbp+var_230], 0 jbe short loc_2E33A mov rax, [rbp+var_240] mov rcx, [rbp+var_230] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_2E33A mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_2E33A: lea rax, [rbp+var_210] add rax, [rbp+var_230] cmp rax, [rbp+var_238] jnb short loc_2E374 lea rdi, [rbp+var_210] add rdi, [rbp+var_230] mov rsi, [rbp+var_238] mov rdx, [rbp+var_228] call _memmove jmp short loc_2E3A3 loc_2E374: lea rdi, [rbp+var_210] add rdi, [rbp+var_230] add rdi, [rbp+var_228] mov rsi, [rbp+var_238] add rsi, [rbp+var_228] mov rdx, [rbp+var_228] call bmove_upp loc_2E3A3: lea rdi, [rbp+var_210] mov rsi, [rbp+var_240] mov rdx, [rbp+var_230] call _memmove loc_2E3BD: jmp short $+2 loc_2E3BF: jmp short $+2 loc_2E3C1: jmp short $+2 loc_2E3C3: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call system_filename mov [rbp+var_250], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2E3FF mov rax, [rbp+var_250] add rsp, 250h pop rbp retn loc_2E3FF: call ___stack_chk_fail
long long unpack_dirname(long long a1, _BYTE *a2) { long long v3; // [rsp+8h] [rbp-248h] long long v4; // [rsp+10h] [rbp-240h] _BYTE *v5; // [rsp+18h] [rbp-238h] BYREF long long v6; // [rsp+20h] [rbp-230h] long long v7; // [rsp+28h] [rbp-228h] _BYTE *v8; // [rsp+30h] [rbp-220h] long long v9; // [rsp+38h] [rbp-218h] char v10; // [rsp+40h] [rbp-210h] BYREF _BYTE v11[527]; // [rsp+41h] [rbp-20Fh] BYREF *(_QWORD *)&v11[519] = __readfsqword(0x28u); v9 = a1; v8 = a2; v7 = normalize_dirname((long long)&v10, a2); if ( v10 == 126 ) { v5 = v11; v4 = expand_tilde(&v5); if ( v4 ) { v7 -= v5 - &v10 - 1; v3 = v7; v6 = strlen(v4); if ( (unsigned long long)(v6 + v3) <= 0x200 ) { if ( v6 && *(_BYTE *)(v4 + v6 - 1) == 47 ) --v6; if ( &v11[v6 - 1] >= v5 ) bmove_upp(&v11[v6 - 1 + v7], &v5[v7], v7); else memmove(&v11[v6 - 1], v5, v7); memmove(&v10, v4, v6); } } } return system_filename(v9, &v10); }
unpack_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] CALL 0x0012e110 MOV qword ptr [RBP + -0x228],RAX MOVSX EAX,byte ptr [RBP + -0x210] CMP EAX,0x7e JNZ 0x0012e3c1 LEA RAX,[RBP + -0x210] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX LEA RDI,[RBP + -0x238] CALL 0x0012e410 MOV qword ptr [RBP + -0x240],RAX CMP qword ptr [RBP + -0x240],0x0 JZ 0x0012e3bf MOV RCX,qword ptr [RBP + -0x238] LEA RAX,[RBP + -0x210] SUB RCX,RAX SUB RCX,0x1 MOV RAX,qword ptr [RBP + -0x228] SUB RAX,RCX MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x228] MOV qword ptr [RBP + -0x248],RAX MOV RDI,qword ptr [RBP + -0x240] CALL 0x00124130 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x230],RCX ADD RAX,RCX CMP RAX,0x200 JA 0x0012e3bd CMP qword ptr [RBP + -0x230],0x0 JBE 0x0012e33a MOV RAX,qword ptr [RBP + -0x240] MOV RCX,qword ptr [RBP + -0x230] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x0012e33a MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_0012e33a: LEA RAX,[RBP + -0x210] ADD RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x238] JNC 0x0012e374 LEA RDI,[RBP + -0x210] ADD RDI,qword ptr [RBP + -0x230] MOV RSI,qword ptr [RBP + -0x238] MOV RDX,qword ptr [RBP + -0x228] CALL 0x00124530 JMP 0x0012e3a3 LAB_0012e374: LEA RDI,[RBP + -0x210] ADD RDI,qword ptr [RBP + -0x230] ADD RDI,qword ptr [RBP + -0x228] MOV RSI,qword ptr [RBP + -0x238] ADD RSI,qword ptr [RBP + -0x228] MOV RDX,qword ptr [RBP + -0x228] CALL 0x001345b0 LAB_0012e3a3: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x240] MOV RDX,qword ptr [RBP + -0x230] CALL 0x00124530 LAB_0012e3bd: JMP 0x0012e3bf LAB_0012e3bf: JMP 0x0012e3c1 LAB_0012e3c1: JMP 0x0012e3c3 LAB_0012e3c3: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x0012e4d0 MOV qword ptr [RBP + -0x250],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012e3ff MOV RAX,qword ptr [RBP + -0x250] ADD RSP,0x250 POP RBP RET LAB_0012e3ff: CALL 0x00124320
int8 unpack_dirname(int8 param_1,int8 param_2) { char *__s; size_t sVar1; int8 uVar2; long in_FS_OFFSET; char *local_240; size_t local_238; size_t local_230; int8 local_228; int8 local_220; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; local_230 = normalize_dirname(local_218,param_2); if (local_218[0] == '~') { local_240 = local_218 + 1; __s = (char *)expand_tilde(&local_240); if (__s != (char *)0x0) { sVar1 = local_230 - (long)(local_240 + (-1 - (long)local_218)); local_230 = sVar1; local_238 = strlen(__s); if (sVar1 + local_238 < 0x201) { if ((local_238 != 0) && (__s[local_238 - 1] == '/')) { local_238 = local_238 - 1; } if (local_218 + local_238 < local_240) { memmove(local_218 + local_238,local_240,local_230); } else { bmove_upp(local_218 + local_230 + local_238,local_240 + local_230,local_230); } memmove(local_218,__s,local_238); } } } uVar2 = system_filename(local_220,local_218); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar2; }
36,043
SchemaConverter::check_errors()
monkey531[P]llama/common/json-schema-to-grammar.cpp
void check_errors() { if (!_errors.empty()) { throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n")); } if (!_warnings.empty()) { fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str()); } }
O0
cpp
SchemaConverter::check_errors(): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq 0x100(%rsp), %rdi movq %rdi, 0x38(%rsp) addq $0xc8, %rdi callq 0x13f900 testb $0x1, %al jne 0x2b802f movb $0x1, 0x8b(%rsp) movl $0x10, %edi callq 0x64880 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0x20(%rsp) addq $0xc8, %rax movq %rax, 0x28(%rsp) leaq 0x9f(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x654b0 movq 0x30(%rsp), %rdx leaq 0x3731f(%rip), %rsi # 0x2ef227 leaq 0xa0(%rsp), %rdi callq 0x98e10 jmp 0x2b7f17 movq 0x28(%rsp), %rsi leaq 0xc0(%rsp), %rdi leaq 0xa0(%rsp), %rdx callq 0x24e530 jmp 0x2b7f33 leaq 0x404b2(%rip), %rsi # 0x2f83ec leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rdx callq 0x98c80 jmp 0x2b7f51 movq 0x20(%rsp), %rdi leaq 0xe0(%rsp), %rsi callq 0x64640 jmp 0x2b7f65 movq 0x20(%rsp), %rdi movb $0x0, 0x8b(%rsp) movq 0x10102f(%rip), %rsi # 0x3b8fa8 movq 0x100ff0(%rip), %rdx # 0x3b8f70 callq 0x64d60 jmp 0x2b8139 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x2b8007 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x2b7ffa movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x2b7fed movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0xe0(%rsp), %rdi callq 0x65a60 leaq 0xc0(%rsp), %rdi callq 0x65a60 leaq 0xa0(%rsp), %rdi callq 0x65a60 leaq 0x9f(%rsp), %rdi callq 0x65a30 testb $0x1, 0x8b(%rsp) jne 0x2b8020 jmp 0x2b802a movq 0x20(%rsp), %rdi callq 0x652b0 jmp 0x2b812c movq 0x38(%rsp), %rdi addq $0xe0, %rdi callq 0x13f900 testb $0x1, %al jne 0x2b8124 movq 0x38(%rsp), %rax movq 0x100edc(%rip), %rcx # 0x3b8f30 movq (%rcx), %rcx movq %rcx, 0x8(%rsp) addq $0xe0, %rax movq %rax, 0x10(%rsp) leaq 0x47(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x654b0 movq 0x18(%rsp), %rdx leaq 0x403be(%rip), %rsi # 0x2f8440 leaq 0x48(%rsp), %rdi callq 0x98e10 jmp 0x2b808e movq 0x10(%rsp), %rsi leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx callq 0x24e530 jmp 0x2b80a4 leaq 0x68(%rsp), %rdi callq 0x64220 movq 0x8(%rsp), %rdi movq %rax, %rdx leaq 0x4034f(%rip), %rsi # 0x2f840c movb $0x0, %al callq 0x643f0 leaq 0x68(%rsp), %rdi callq 0x65a60 leaq 0x48(%rsp), %rdi callq 0x65a60 leaq 0x47(%rsp), %rdi callq 0x65a30 jmp 0x2b8124 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x2b8118 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x48(%rsp), %rdi callq 0x65a60 leaq 0x47(%rsp), %rdi callq 0x65a30 jmp 0x2b812c addq $0x108, %rsp # imm = 0x108 retq movq 0x90(%rsp), %rdi callq 0x64e40 nopl (%rax)
_ZN15SchemaConverter12check_errorsEv: sub rsp, 108h mov [rsp+108h+var_8], rdi mov rdi, [rsp+108h+var_8] mov [rsp+108h+var_D0], rdi add rdi, 0C8h call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz loc_2B802F mov [rsp+108h+var_7D], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rcx, rax mov rax, [rsp+108h+var_D0] mov [rsp+108h+var_E8], rcx add rax, 0C8h mov [rsp+108h+var_E0], rax lea rdi, [rsp+108h+var_69] mov [rsp+108h+var_D8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+108h+var_D8] lea rsi, aExampleSpecifi+26h; "\n" lea rdi, [rsp+108h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_2B7F17: mov rsi, [rsp+108h+var_E0] lea rdi, [rsp+108h+var_48] lea rdx, [rsp+108h+var_68] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) jmp short $+2 loc_2B7F33: lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n" lea rdi, [rsp+108h+var_28] lea rdx, [rsp+108h+var_48] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_2B7F51: mov rdi, [rsp+108h+var_E8] lea rsi, [rsp+108h+var_28] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_2B7F65: mov rdi, [rsp+108h+var_E8]; void * mov [rsp+108h+var_7D], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_2B8139 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_2B8007 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_2B7FFA mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_2B7FED mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2B7FED: lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2B7FFA: lea rdi, [rsp+arg_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2B8007: lea rdi, [rsp+arg_97] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_83], 1 jnz short loc_2B8020 jmp short loc_2B802A loc_2B8020: mov rdi, [rsp+arg_18]; void * call ___cxa_free_exception loc_2B802A: jmp loc_2B812C loc_2B802F: mov rdi, [rsp+108h+var_D0] add rdi, 0E0h call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz loc_2B8124 mov rax, [rsp+108h+var_D0] mov rcx, cs:stderr_ptr mov rcx, [rcx] mov [rsp+108h+var_100], rcx add rax, 0E0h mov [rsp+108h+var_F8], rax lea rdi, [rsp+108h+var_C1] mov [rsp+108h+var_F0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+108h+var_F0] lea rsi, asc_2F8440; "; " lea rdi, [rsp+108h+var_C0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_2B808E: mov rsi, [rsp+108h+var_F8] lea rdi, [rsp+108h+var_A0] lea rdx, [rsp+108h+var_C0] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) jmp short $+2 loc_2B80A4: lea rdi, [rsp+108h+var_A0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+108h+var_100] mov rdx, rax lea rsi, aWarningJsonSch; "WARNING: JSON schema conversion was inc"... mov al, 0 call _fprintf lea rdi, [rsp+108h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+108h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+108h+var_C1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_2B8124 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_2B8118 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2B8118: lea rdi, [rsp+arg_3F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_2B812C loc_2B8124: add rsp, 108h retn loc_2B812C: mov rdi, [rsp+arg_88] call __Unwind_Resume loc_2B8139: nop dword ptr [rax+00000000h]
char SchemaConverter::check_errors(SchemaConverter *this, long long a2) { long long v2; // rdx char result; // al long long v4; // rdx const char *v5; // rax long long v6; // [rsp+8h] [rbp-100h] void *exception; // [rsp+20h] [rbp-E8h] char v8; // [rsp+47h] [rbp-C1h] BYREF _BYTE v9[32]; // [rsp+48h] [rbp-C0h] BYREF _BYTE v10[55]; // [rsp+68h] [rbp-A0h] BYREF char v11; // [rsp+9Fh] [rbp-69h] BYREF _BYTE v12[32]; // [rsp+A0h] [rbp-68h] BYREF _BYTE v13[32]; // [rsp+C0h] [rbp-48h] BYREF _BYTE v14[32]; // [rsp+E0h] [rbp-28h] BYREF SchemaConverter *v15; // [rsp+100h] [rbp-8h] v15 = this; if ( (std::vector<std::string>::empty((long long)this + 200) & 1) == 0 ) { exception = __cxa_allocate_exception(0x10uLL); std::allocator<char>::allocator(&v11, a2, v2); std::string::basic_string<std::allocator<char>>((long long)v12, (long long)"\n", (long long)&v11); string_join((long long)v13, (_QWORD *)this + 25, (long long)v12); std::operator+<char>((long long)v14, (long long)"JSON schema conversion failed:\n", (long long)v13); std::runtime_error::runtime_error(exception, v14); v10[35] = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } result = std::vector<std::string>::empty((long long)this + 224); if ( (result & 1) == 0 ) { v6 = stderr; std::allocator<char>::allocator(&v8, a2, v4); std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"; ", (long long)&v8); string_join((long long)v10, (_QWORD *)this + 28, (long long)v9); v5 = (const char *)std::string::c_str(v10); fprintf(v6, "WARNING: JSON schema conversion was incomplete: %s\n", v5); std::string::~string(v10); std::string::~string(v9); return std::allocator<char>::~allocator(&v8); } return result; }
36,044
SchemaConverter::check_errors()
monkey531[P]llama/common/json-schema-to-grammar.cpp
void check_errors() { if (!_errors.empty()) { throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n")); } if (!_warnings.empty()) { fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str()); } }
O2
cpp
SchemaConverter::check_errors(): pushq %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %r14 movq 0xc8(%rdi), %rax cmpq 0xd0(%rdi), %rax jne 0xe2bdc movq 0xe0(%r14), %rax cmpq 0xe8(%r14), %rax jne 0xe2b76 addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x8440b(%rip), %rax # 0x166f88 movq (%rax), %rbx leaq 0x24526(%rip), %rsi # 0x1070ad leaq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x3bddc addq $0xe0, %r14 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx movq %r14, %rsi callq 0xc0f26 leaq 0x30(%rsp), %r14 movq (%r14), %rdx leaq 0x244bb(%rip), %rsi # 0x107079 movq %rbx, %rdi xorl %eax, %eax callq 0x29010 movq %r14, %rdi callq 0x29678 leaq 0x10(%rsp), %rdi callq 0x29678 jmp 0xe2b6d pushq $0x10 popq %rdi callq 0x28580 movq %rax, %rbx leaq 0x13109(%rip), %rsi # 0xf5cf7 leaq 0x50(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x3bddc addq $0xc8, %r14 leaq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rdx movq %r14, %rsi callq 0xc0f26 leaq 0x2443c(%rip), %rsi # 0x107059 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x3bd5f movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %rbx, %rdi callq 0x291e0 xorl %ebp, %ebp movq 0x843ab(%rip), %rsi # 0x166ff0 movq 0x8430c(%rip), %rdx # 0x166f58 movq %rbx, %rdi callq 0x29320 movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x29678 jmp 0xe2c69 movq %rax, %r14 movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x29678 jmp 0xe2c7b movq %rax, %r14 movb $0x1, %bpl leaq 0x50(%rsp), %rdi callq 0x29678 testb %bpl, %bpl jne 0xe2c8f jmp 0xe2cab movq %rax, %r14 movq %rbx, %rdi callq 0x28830 jmp 0xe2cab movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x29678 jmp 0xe2cab movq %rax, %r14 movq %r14, %rdi callq 0x293c0 nop
_ZN15SchemaConverter12check_errorsEv: push rbp push r14 push rbx sub rsp, 70h mov r14, rdi mov rax, [rdi+0C8h] cmp rax, [rdi+0D0h] jnz short loc_E2BDC mov rax, [r14+0E0h] cmp rax, [r14+0E8h] jnz short loc_E2B76 loc_E2B6D: add rsp, 70h pop rbx pop r14 pop rbp retn loc_E2B76: mov rax, cs:stderr_ptr mov rbx, [rax] lea rsi, asc_1070AD; "; " lea rdi, [rsp+88h+var_78] lea rdx, [rsp+88h+var_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) add r14, 0E0h lea rdi, [rsp+88h+var_58] lea rdx, [rsp+88h+var_78] mov rsi, r14 call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea r14, [rsp+88h+var_58] mov rdx, [r14] lea rsi, aWarningJsonSch; "WARNING: JSON schema conversion was inc"... mov rdi, rbx xor eax, eax call _fprintf mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+88h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E2B6D loc_E2BDC: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aDataDone+0Dh; "\n" lea rdi, [rsp+88h+var_38] lea rdx, [rsp+88h+var_79] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) add r14, 0C8h lea rdi, [rsp+88h+var_78] lea rdx, [rsp+88h+var_38] mov rsi, r14 call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n" lea rdi, [rsp+88h+var_58] lea rdx, [rsp+88h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+88h+var_58] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+88h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E2C69 mov r14, rax mov bpl, 1 loc_E2C69: lea rdi, [rsp+88h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E2C7B mov r14, rax mov bpl, 1 loc_E2C7B: lea rdi, [rsp+88h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_E2C8F jmp short loc_E2CAB mov r14, rax loc_E2C8F: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_E2CAB mov r14, rax lea rdi, [rsp+88h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E2CAB mov r14, rax loc_E2CAB: mov rdi, r14 call __Unwind_Resume
void SchemaConverter::check_errors(SchemaConverter *this) { long long v1; // rbx void *exception; // rbx _QWORD v3[4]; // [rsp+10h] [rbp-78h] BYREF const char *v4[4]; // [rsp+30h] [rbp-58h] BYREF _QWORD v5[7]; // [rsp+50h] [rbp-38h] BYREF if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) ) { exception = __cxa_allocate_exception(0x10uLL); std::string::basic_string<std::allocator<char>>(v5, (long long)"\n"); string_join((long long)v3, (long long *)this + 25, (long long)v5); std::operator+<char>((long long)v4, (long long)"JSON schema conversion failed:\n", (long long)v3); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) ) { v1 = stderr; std::string::basic_string<std::allocator<char>>(v3, (long long)"; "); string_join((long long)v4, (long long *)this + 28, (long long)v3); fprintf(v1, "WARNING: JSON schema conversion was incomplete: %s\n", v4[0]); std::string::~string(v4); std::string::~string(v3); } }
check_errors: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x70 MOV R14,RDI MOV RAX,qword ptr [RDI + 0xc8] CMP RAX,qword ptr [RDI + 0xd0] JNZ 0x001e2bdc MOV RAX,qword ptr [R14 + 0xe0] CMP RAX,qword ptr [R14 + 0xe8] JNZ 0x001e2b76 LAB_001e2b6d: ADD RSP,0x70 POP RBX POP R14 POP RBP RET LAB_001e2b76: MOV RAX,qword ptr [0x00266f88] MOV RBX,qword ptr [RAX] LAB_001e2b80: LEA RSI,[0x2070ad] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x50] CALL 0x0013bddc LAB_001e2b96: ADD R14,0xe0 LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x10] MOV RSI,R14 CALL 0x001c0f26 LAB_001e2baf: LEA R14,[RSP + 0x30] MOV RDX,qword ptr [R14] LEA RSI,[0x207079] MOV RDI,RBX XOR EAX,EAX CALL 0x00129010 MOV RDI,R14 CALL 0x00129678 LEA RDI,[RSP + 0x10] CALL 0x00129678 JMP 0x001e2b6d LAB_001e2bdc: PUSH 0x10 POP RDI CALL 0x00128580 MOV RBX,RAX LAB_001e2be7: LEA RSI,[0x1f5cf7] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0xf] CALL 0x0013bddc LAB_001e2bfd: ADD R14,0xc8 LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x50] MOV RSI,R14 CALL 0x001c0f26 LAB_001e2c16: LEA RSI,[0x207059] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x10] CALL 0x0013bd5f MOV BPL,0x1 LAB_001e2c2f: LEA RSI,[RSP + 0x30] MOV RDI,RBX CALL 0x001291e0 XOR EBP,EBP MOV RSI,qword ptr [0x00266ff0] MOV RDX,qword ptr [0x00266f58] MOV RDI,RBX CALL 0x00129320
/* SchemaConverter::check_errors() */ void __thiscall SchemaConverter::check_errors(SchemaConverter *this) { FILE *__stream; runtime_error *this_00; allocator local_79; string local_78 [32]; int8 local_58 [4]; allocator local_38 [32]; if (*(long *)(this + 200) == *(long *)(this + 0xd0)) { if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) { __stream = *(FILE **)PTR_stderr_00266f88; /* try { // try from 001e2b80 to 001e2b95 has its CatchHandler @ 001e2ca8 */ std::__cxx11::string::string<std::allocator<char>>(local_78,"; ",local_38); /* try { // try from 001e2b96 to 001e2bae has its CatchHandler @ 001e2c99 */ string_join((vector *)local_58,(string *)(this + 0xe0)); fprintf(__stream,"WARNING: JSON schema conversion was incomplete: %s\n",local_58[0]); std::__cxx11::string::~string((string *)local_58); std::__cxx11::string::~string(local_78); } return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e2be7 to 001e2bfc has its CatchHandler @ 001e2c8c */ std::__cxx11::string::string<std::allocator<char>>((string *)local_38,"\n",&local_79); /* try { // try from 001e2bfd to 001e2c15 has its CatchHandler @ 001e2c75 */ string_join(local_78,(string *)(this + 200)); /* try { // try from 001e2c16 to 001e2c2b has its CatchHandler @ 001e2c63 */ std::operator+((char *)local_58,(string *)"JSON schema conversion failed:\n"); /* try { // try from 001e2c2f to 001e2c53 has its CatchHandler @ 001e2c54 */ std::runtime_error::runtime_error(this_00,(string *)local_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58); }
36,045
mthd_stmt_get_result_metadata
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt) { MYSQL_DATA *result; MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7 + ma_extended_type_info_rows(stmt->mysql)))) return(1); if (!(stmt->fields= unpack_fields(stmt->mysql, result, fields_ma_alloc_root, stmt->field_count, 0))) return(1); return(0); }
O0
c
mthd_stmt_get_result_metadata: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x340(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x2b3d0 movq -0x30(%rbp), %rdi movl %eax, %edx movq -0x28(%rbp), %rax addl $0x7, %edx xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x2b46e movb $0x1, -0x1(%rbp) jmp 0x2b4a5 movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movl 0x60(%rax), %ecx xorl %r8d, %r8d callq 0x1a970 movq -0x10(%rbp), %rcx movq %rax, 0x58(%rcx) cmpq $0x0, %rax jne 0x2b4a1 movb $0x1, -0x1(%rbp) jmp 0x2b4a5 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
mthd_stmt_get_result_metadata: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+340h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_extended_type_info_rows mov rdi, [rbp+var_30] mov edx, eax mov rax, [rbp+var_28] add edx, 7 xor ecx, ecx mov esi, ecx call rax mov [rbp+var_18], rax cmp rax, 0 jnz short loc_2B46E mov [rbp+var_1], 1 jmp short loc_2B4A5 loc_2B46E: mov rax, [rbp+var_10] mov rdi, [rax+38h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov ecx, [rax+60h] xor r8d, r8d call unpack_fields mov rcx, [rbp+var_10] mov [rcx+58h], rax cmp rax, 0 jnz short loc_2B4A1 mov [rbp+var_1], 1 jmp short loc_2B4A5 loc_2B4A1: mov [rbp+var_1], 0 loc_2B4A5: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
bool mthd_stmt_get_result_metadata(long long a1) { BOOL v1; // eax long long v2; // rax long long v4; // [rsp+0h] [rbp-30h] long long ( *v5)(long long, _QWORD, _QWORD); // [rsp+8h] [rbp-28h] long long v6; // [rsp+10h] [rbp-20h] _QWORD *v7; // [rsp+18h] [rbp-18h] v6 = *(_QWORD *)(a1 + 832); v5 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL); v4 = *(_QWORD *)(a1 + 56); v1 = ma_extended_type_info_rows(v4); v7 = (_QWORD *)v5(v4, 0LL, (unsigned int)(v1 + 7)); if ( !v7 ) return 1; v2 = unpack_fields(*(_QWORD *)(a1 + 56), v7, v6, *(_DWORD *)(a1 + 96), 0); *(_QWORD *)(a1 + 88) = v2; return v2 == 0; }
mthd_stmt_get_result_metadata: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x340] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x0012b3d0 MOV RDI,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x28] ADD EDX,0x7 XOR ECX,ECX MOV ESI,ECX CALL RAX MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0012b46e MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b4a5 LAB_0012b46e: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x60] XOR R8D,R8D CALL 0x0011a970 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x58],RAX CMP RAX,0x0 JNZ 0x0012b4a1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012b4a5 LAB_0012b4a1: MOV byte ptr [RBP + -0x1],0x0 LAB_0012b4a5: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 mthd_stmt_get_result_metadata(long param_1) { int8 uVar1; code *pcVar2; int8 uVar3; int iVar4; long lVar5; int1 local_9; uVar1 = *(int8 *)(param_1 + 0x340); pcVar2 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x28); uVar3 = *(int8 *)(param_1 + 0x38); iVar4 = ma_extended_type_info_rows(*(int8 *)(param_1 + 0x38)); lVar5 = (*pcVar2)(uVar3,0,iVar4 + 7); if (lVar5 == 0) { local_9 = 1; } else { lVar5 = unpack_fields(*(int8 *)(param_1 + 0x38),lVar5,uVar1, *(int4 *)(param_1 + 0x60),0); *(long *)(param_1 + 0x58) = lVar5; if (lVar5 == 0) { local_9 = 1; } else { local_9 = 0; } } return local_9; }
36,046
mthd_stmt_get_result_metadata
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_get_result_metadata(MYSQL_STMT *stmt) { MYSQL_DATA *result; MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7 + ma_extended_type_info_rows(stmt->mysql)))) return(1); if (!(stmt->fields= unpack_fields(stmt->mysql, result, fields_ma_alloc_root, stmt->field_count, 0))) return(1); return(0); }
O3
c
mthd_stmt_get_result_metadata: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x340(%rdi), %r14 movq 0x38(%rdi), %rdi movq 0x4d0(%rdi), %rax movq 0x4f0(%rdi), %rcx xorl %edx, %edx btl $0x3, 0x70(%rcx) adcl $0x7, %edx xorl %esi, %esi callq *0x28(%rax) testq %rax, %rax je 0x218c5 movq 0x38(%rbx), %rdi movl 0x60(%rbx), %ecx movq %rax, %rsi movq %r14, %rdx xorl %r8d, %r8d callq 0x18370 movq %rax, 0x58(%rbx) testq %rax, %rax sete %al jmp 0x218c7 movb $0x1, %al popq %rbx popq %r14 popq %rbp retq
mthd_stmt_get_result_metadata: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov r14, [rdi+340h] mov rdi, [rdi+38h] mov rax, [rdi+4D0h] mov rcx, [rdi+4F0h] xor edx, edx bt dword ptr [rcx+70h], 3 adc edx, 7 xor esi, esi call qword ptr [rax+28h] test rax, rax jz short loc_218C5 mov rdi, [rbx+38h] mov ecx, [rbx+60h] mov rsi, rax mov rdx, r14 xor r8d, r8d call unpack_fields mov [rbx+58h], rax test rax, rax setz al jmp short loc_218C7 loc_218C5: mov al, 1 loc_218C7: pop rbx pop r14 pop rbp retn
bool mthd_stmt_get_result_metadata(long long a1) { long long v1; // r14 _QWORD *v2; // rax long long v3; // rax v1 = *(_QWORD *)(a1 + 832); v2 = (_QWORD *)(*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL))( *(_QWORD *)(a1 + 56), 0LL, (unsigned int)_bittest( (const signed __int32 *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL), 3u) + 7); if ( !v2 ) return 1; v3 = unpack_fields(*(_QWORD *)(a1 + 56), v2, v1, *(_DWORD *)(a1 + 96), 0); *(_QWORD *)(a1 + 88) = v3; return v3 == 0; }
mthd_stmt_get_result_metadata: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x340] MOV RDI,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RDI + 0x4d0] MOV RCX,qword ptr [RDI + 0x4f0] XOR EDX,EDX BT dword ptr [RCX + 0x70],0x3 ADC EDX,0x7 XOR ESI,ESI CALL qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x001218c5 MOV RDI,qword ptr [RBX + 0x38] MOV ECX,dword ptr [RBX + 0x60] MOV RSI,RAX MOV RDX,R14 XOR R8D,R8D CALL 0x00118370 MOV qword ptr [RBX + 0x58],RAX TEST RAX,RAX SETZ AL JMP 0x001218c7 LAB_001218c5: MOV AL,0x1 LAB_001218c7: POP RBX POP R14 POP RBP RET
bool mthd_stmt_get_result_metadata(long param_1) { int8 uVar1; long lVar2; bool bVar3; uVar1 = *(int8 *)(param_1 + 0x340); lVar2 = *(long *)(param_1 + 0x38); lVar2 = (**(code **)(*(long *)(lVar2 + 0x4d0) + 0x28)) (lVar2,0,((*(uint *)(*(long *)(lVar2 + 0x4f0) + 0x70) >> 3 & 1) != 0) + '\a'); if (lVar2 == 0) { bVar3 = true; } else { lVar2 = unpack_fields(*(int8 *)(param_1 + 0x38),lVar2,uVar1, *(int4 *)(param_1 + 0x60),0); *(long *)(param_1 + 0x58) = lVar2; bVar3 = lVar2 == 0; } return bVar3; }
36,047
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const
monkey531[P]llama/common/json.hpp
std::string get_token_string() const { // escape control characters std::string result; for (const auto c : token_string) { if (static_cast<unsigned char>(c) <= '\x1F') { // escape control characters std::array<char, 9> cs{{}}; static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) result += cs.data(); } else { // add character as is result.push_back(static_cast<std::string::value_type>(c)); } } return result; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq 0x38(%rsi), %r13 movq 0x40(%rsi), %rbp leaq 0x707f3(%rip), %r14 # 0xaffc1 leaq 0x8(%rsp), %r15 pushq $0x9 popq %r12 cmpq %rbp, %r13 je 0x3f81e movzbl (%r13), %ecx cmpl $0x1f, %ecx ja 0x3f80e movb $0x0, 0x10(%rsp) andq $0x0, 0x8(%rsp) movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx xorl %eax, %eax callq 0x23de0 movq %rbx, %rdi movq %r15, %rsi callq 0x240e0 jmp 0x3f819 movsbl %cl, %esi movq %rbx, %rdi callq 0x23760 incq %r13 jmp 0x3f7d7 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x3f832 movq %rax, %r14 movq %rbx, %rdi callq 0x241b8 movq %r14, %rdi callq 0x23f80 nop
_ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov r13, [rsi+38h] mov rbp, [rsi+40h] lea r14, aU4x; "<U+%.4X>" lea r15, [rsp+48h+var_40] push 9 pop r12 loc_3F7D7: cmp r13, rbp jz short loc_3F81E movzx ecx, byte ptr [r13+0] cmp ecx, 1Fh ja short loc_3F80E mov [rsp+48h+var_38], 0 and [rsp+48h+var_40], 0 mov rdi, r15 mov rsi, r12 mov rdx, r14 xor eax, eax call _snprintf mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_3F819 loc_3F80E: movsx esi, cl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_3F819: inc r13 jmp short loc_3F7D7 loc_3F81E: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_3F832: mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( long long a1, long long a2) { unsigned __int8 *v2; // r13 unsigned __int8 *v3; // rbp unsigned int v4; // ecx long long v6; // [rsp+8h] [rbp-40h] BYREF char v7; // [rsp+10h] [rbp-38h] *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v2 = *(unsigned __int8 **)(a2 + 56); v3 = *(unsigned __int8 **)(a2 + 64); while ( v2 != v3 ) { v4 = *v2; if ( v4 > 0x1F ) { std::string::push_back(a1, (unsigned int)(char)v4); } else { v7 = 0; v6 = 0LL; snprintf(&v6, 9LL, "<U+%.4X>", v4); std::string::append(a1, &v6); } ++v2; } return a1; }
get_token_string: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV R13,qword ptr [RSI + 0x38] MOV RBP,qword ptr [RSI + 0x40] LEA R14,[0x1affc1] LEA R15,[RSP + 0x8] PUSH 0x9 POP R12 LAB_0013f7d7: CMP R13,RBP JZ 0x0013f81e MOVZX ECX,byte ptr [R13] CMP ECX,0x1f JA 0x0013f80e MOV byte ptr [RSP + 0x10],0x0 AND qword ptr [RSP + 0x8],0x0 MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 XOR EAX,EAX CALL 0x00123de0 LAB_0013f801: MOV RDI,RBX MOV RSI,R15 CALL 0x001240e0 JMP 0x0013f819 LAB_0013f80e: MOVSX ESI,CL MOV RDI,RBX CALL 0x00123760 LAB_0013f819: INC R13 JMP 0x0013f7d7 LAB_0013f81e: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_token_string() const */ void nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(void) { byte *pbVar1; long in_RSI; long *in_RDI; byte *pbVar2; char local_40 [16]; *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; pbVar1 = *(byte **)(in_RSI + 0x40); for (pbVar2 = *(byte **)(in_RSI + 0x38); pbVar2 != pbVar1; pbVar2 = pbVar2 + 1) { if (*pbVar2 < 0x20) { local_40[8] = 0; local_40[0] = '\0'; local_40[1] = '\0'; local_40[2] = '\0'; local_40[3] = '\0'; local_40[4] = '\0'; local_40[5] = '\0'; local_40[6] = '\0'; local_40[7] = '\0'; snprintf(local_40,9,"<U+%.4X>"); /* try { // try from 0013f801 to 0013f80b has its CatchHandler @ 0013f832 */ std::__cxx11::string::append((char *)in_RDI); } else { /* try { // try from 0013f80e to 0013f818 has its CatchHandler @ 0013f830 */ std::__cxx11::string::push_back((char)in_RDI); } } return; }
36,048
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, double>>::DataWeakRef(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, double>>)
reaction/include/reaction/dataSource.h
DataWeakRef(std::shared_ptr<DataType> ptr) : m_weakPtr(ptr) { if (auto p = m_weakPtr.lock()) p->addWeakRef(); }
O3
c
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, double>>::DataWeakRef(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, double>>): movq %rdi, %rcx movq (%rsi), %rax movq %rax, (%rdi) movq 0x8(%rsi), %rdi movq %rdi, 0x8(%rcx) testq %rdi, %rdi je 0x52be movq 0xdd4f(%rip), %rax # 0x12fc0 cmpb $0x0, (%rax) je 0x527b incl 0xc(%rdi) jmp 0x5288 lock incl 0xc(%rdi) movq 0x8(%rcx), %rdi testq %rdi, %rdi je 0x52be movl 0x8(%rdi), %eax testl %eax, %eax je 0x52be leal 0x1(%rax), %edx lock cmpxchgl %edx, 0x8(%rdi) jne 0x528b movl 0x8(%rdi), %eax testl %eax, %eax setne %dl movq (%rcx), %rax testq %rax, %rax setne %cl andb %dl, %cl cmpb $0x1, %cl jne 0x592e lock incl 0x38(%rax) jmp 0x592e retq nop
_ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEEC2ESt10shared_ptrIS4_E: mov rcx, rdi mov rax, [rsi] mov [rdi], rax mov rdi, [rsi+8] mov [rcx+8], rdi test rdi, rdi jz short locret_52BE mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_527B inc dword ptr [rdi+0Ch] jmp short loc_5288 loc_527B: lock inc dword ptr [rdi+0Ch] mov rdi, [rcx+8] test rdi, rdi jz short locret_52BE loc_5288: mov eax, [rdi+8] loc_528B: test eax, eax jz short locret_52BE lea edx, [rax+1] lock cmpxchg [rdi+8], edx jnz short loc_528B mov eax, [rdi+8] test eax, eax setnz dl mov rax, [rcx] test rax, rax setnz cl and cl, dl cmp cl, 1 jnz _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) lock inc dword ptr [rax+38h] jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) locret_52BE: retn
long long reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::DataWeakRef( long long *a1, long long *a2) { long long result; // rax long long v4; // rdi int v5; // ett result = *a2; *a1 = *a2; v4 = a2[1]; a1[1] = v4; if ( v4 ) { result = (long long)&_libc_single_threaded; if ( _libc_single_threaded ) { ++*(_DWORD *)(v4 + 12); } else { _InterlockedIncrement((volatile signed __int32 *)(v4 + 12)); v4 = a1[1]; if ( !v4 ) return result; } result = *(unsigned int *)(v4 + 8); while ( (_DWORD)result ) { v5 = result; result = (unsigned int)_InterlockedCompareExchange((volatile signed __int32 *)(v4 + 8), result + 1, result); if ( v5 == (_DWORD)result ) { if ( *(_DWORD *)(v4 + 8) != 0 && *a1 != 0 ) _InterlockedIncrement((volatile signed __int32 *)(*a1 + 56)); return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); } } } return result; }
DataWeakRef: MOV RCX,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RCX + 0x8],RDI TEST RDI,RDI JZ 0x001052be MOV RAX,qword ptr [0x00112fc0] CMP byte ptr [RAX],0x0 JZ 0x0010527b INC dword ptr [RDI + 0xc] JMP 0x00105288 LAB_0010527b: INC.LOCK dword ptr [RDI + 0xc] MOV RDI,qword ptr [RCX + 0x8] TEST RDI,RDI JZ 0x001052be LAB_00105288: MOV EAX,dword ptr [RDI + 0x8] LAB_0010528b: TEST EAX,EAX JZ 0x001052be LEA EDX,[RAX + 0x1] CMPXCHG.LOCK dword ptr [RDI + 0x8],EDX JNZ 0x0010528b MOV EAX,dword ptr [RDI + 0x8] TEST EAX,EAX SETNZ DL MOV RAX,qword ptr [RCX] TEST RAX,RAX SETNZ CL AND CL,DL CMP CL,0x1 JNZ 0x0010592e INC.LOCK dword ptr [RAX + 0x38] JMP 0x0010592e LAB_001052be: RET
/* reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, double> >::DataWeakRef(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, double> >) */ void __thiscall reaction:: DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>:: DataWeakRef(DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>> *this,int8 *param_2) { int *piVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2; int iVar3; int *puVar4; int iVar5; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; bool bVar6; *(int8 *)this = *param_2; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = this_00; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00112fc0 == '\0') { LOCK(); *(int *)(this_00 + 0xc) = *(int *)(this_00 + 0xc) + 1; UNLOCK(); this_00 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8); if (this_00 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { return; } } else { *(int *)(this_00 + 0xc) = *(int *)(this_00 + 0xc) + 1; } iVar5 = *(int *)(this_00 + 8); while (iVar5 != 0) { LOCK(); iVar3 = *(int *)(this_00 + 8); bVar6 = iVar5 == iVar3; if (bVar6) { *(int *)(this_00 + 8) = iVar5 + 1; iVar3 = iVar5; } iVar5 = iVar3; puVar4 = PTR___libc_single_threaded_00112fc0; UNLOCK(); if (bVar6) { if (*(long *)this != 0 && *(int *)(this_00 + 8) != 0) { LOCK(); piVar1 = (int *)(*(long *)this + 0x38); *piVar1 = *piVar1 + 1; UNLOCK(); std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00); return; } if (*PTR___libc_single_threaded_00112fc0 == '\0') { LOCK(); p_Var2 = this_00 + 8; iVar5 = *(int *)p_Var2; *(int *)p_Var2 = *(int *)p_Var2 + -1; UNLOCK(); } else { iVar5 = *(int *)(this_00 + 8); *(int *)(this_00 + 8) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*(long *)this_00 + 0x10))(this_00); if (*puVar4 == '\0') { LOCK(); p_Var2 = this_00 + 0xc; iVar5 = *(int *)p_Var2; *(int *)p_Var2 = *(int *)p_Var2 + -1; UNLOCK(); } else { iVar5 = *(int *)(this_00 + 0xc); *(int *)(this_00 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { /* WARNING: Could not recover jumptable at 0x00105992. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)this_00 + 0x18))(this_00); return; } } return; } } } return; }
36,049
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, 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&) const
monkey531[P]llama/common/chat-template.hpp
std::string try_raw_render( const nlohmann::ordered_json & messages, const nlohmann::ordered_json & tools, bool add_generation_prompt, const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const { try { auto prompt = apply(messages, tools, add_generation_prompt, extra_context, /* adjust_inputs= */ false); // fprintf(stderr, "try_raw_render: %s\n", prompt.c_str()); return prompt; } catch (const std::exception & e) { // fprintf(stderr, "try_raw_render error: %s\n", e.what()); return ""; } }
O0
cpp
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, 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&) const: subq $0x78, %rsp movq %rdi, 0x10(%rsp) movb %r8b, %al movq %rdi, %r8 movq %r8, 0x18(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq %rdx, 0x60(%rsp) movq %rcx, 0x58(%rsp) andb $0x1, %al movb %al, 0x57(%rsp) movq %r9, 0x48(%rsp) movq 0x68(%rsp), %rsi movb $0x0, 0x47(%rsp) movq 0x60(%rsp), %rdx movq 0x58(%rsp), %rcx movq 0x48(%rsp), %r9 movzbl 0x57(%rsp), %r8d movq %rsp, %rax movl $0x0, (%rax) andl $0x1, %r8d callq 0x147840 jmp 0xf2bc6 movb $0x1, 0x47(%rsp) testb $0x1, 0x47(%rsp) jne 0xf2c40 jmp 0xf2c36 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0xf2c6d movq 0x38(%rsp), %rdi callq 0x520c0 movq %rax, 0x28(%rsp) leaq 0x27(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x52dc0 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rdx leaq 0xd52c4(%rip), %rsi # 0x1c7ee2 callq 0x60730 jmp 0xf2c25 leaq 0x27(%rsp), %rdi callq 0x53120 callq 0x52b00 jmp 0xf2c63 movq 0x10(%rsp), %rdi callq 0x53140 jmp 0xf2c63 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x27(%rsp), %rdi callq 0x53120 callq 0x52b00 jmp 0xf2c61 jmp 0xf2c6d movq 0x18(%rsp), %rax addq $0x78, %rsp retq movq 0x38(%rsp), %rdi callq 0x52990 movq %rax, %rdi callq 0x608e0 nop
_ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_: sub rsp, 78h mov [rsp+78h+var_68], rdi mov al, r8b mov r8, rdi mov [rsp+78h+var_60], r8 mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_20], rcx and al, 1 mov [rsp+78h+var_21], al mov [rsp+78h+var_30], r9 mov rsi, [rsp+78h+var_10] mov [rsp+78h+var_31], 0 mov rdx, [rsp+78h+var_18] mov rcx, [rsp+78h+var_20] mov r9, [rsp+78h+var_30] movzx r8d, [rsp+78h+var_21] mov rax, rsp mov dword ptr [rax], 0 and r8d, 1 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) jmp short $+2 loc_F2BC6: mov [rsp+78h+var_31], 1 test [rsp+78h+var_31], 1 jnz short loc_F2C40 jmp short loc_F2C36 mov rcx, rax mov eax, edx mov [rsp+78h+var_40], rcx mov [rsp+78h+var_44], eax mov eax, [rsp+78h+var_44] mov ecx, 1 cmp eax, ecx jnz short loc_F2C6D mov rdi, [rsp+78h+var_40]; void * call ___cxa_begin_catch mov [rsp+78h+var_50], rax lea rdi, [rsp+78h+var_51] mov [rsp+78h+var_70], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+78h+var_68] mov rdx, [rsp+78h+var_70] lea rsi, asc_1C7EDE+4; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F2C25: lea rdi, [rsp+78h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short loc_F2C63 loc_F2C36: mov rdi, [rsp+78h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F2C40: jmp short loc_F2C63 mov rcx, rax mov eax, edx mov [rsp+78h+var_40], rcx mov [rsp+78h+var_44], eax lea rdi, [rsp+78h+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short $+2 loc_F2C61: jmp short loc_F2C6D loc_F2C63: mov rax, [rsp+78h+var_60] add rsp, 78h retn loc_F2C6D: mov rdi, [rsp+78h+var_40] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::chat_template::try_raw_render(long long a1, int a2, int a3, int a4, char a5, int a6) { minja::chat_template::apply(a1, a2, a3, a4, a5 & 1, a6, 0); return a1; }
try_raw_render: SUB RSP,0x78 MOV qword ptr [RSP + 0x10],RDI MOV AL,R8B MOV R8,RDI MOV qword ptr [RSP + 0x18],R8 MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x58],RCX AND AL,0x1 MOV byte ptr [RSP + 0x57],AL MOV qword ptr [RSP + 0x48],R9 MOV RSI,qword ptr [RSP + 0x68] MOV byte ptr [RSP + 0x47],0x0 MOV RDX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x58] MOV R9,qword ptr [RSP + 0x48] MOVZX R8D,byte ptr [RSP + 0x57] LAB_001f2bb2: MOV RAX,RSP MOV dword ptr [RAX],0x0 AND R8D,0x1 CALL 0x00247840 LAB_001f2bc4: JMP 0x001f2bc6 LAB_001f2bc6: MOV byte ptr [RSP + 0x47],0x1 TEST byte ptr [RSP + 0x47],0x1 JNZ 0x001f2c40 JMP 0x001f2c36 LAB_001f2c36: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00153140 LAB_001f2c40: JMP 0x001f2c63 LAB_001f2c63: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x78 RET
/* WARNING: Removing unreachable block (ram,0x001f2bd2) */ /* minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, bool, 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&) const */ chat_template * __thiscall minja::chat_template::try_raw_render (chat_template *this,basic_json *param_1,basic_json *param_2,bool param_3, basic_json *param_4) { int7 in_register_00000009; /* try { // try from 001f2bb2 to 001f2bc3 has its CatchHandler @ 001f2bd4 */ apply(this,param_1,SUB81(param_2,0),(basic_json *)CONCAT71(in_register_00000009,param_3), (bool)((byte)param_4 & 1)); return this; }
36,050
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, 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&) const
monkey531[P]llama/common/chat-template.hpp
std::string try_raw_render( const nlohmann::ordered_json & messages, const nlohmann::ordered_json & tools, bool add_generation_prompt, const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const { try { auto prompt = apply(messages, tools, add_generation_prompt, extra_context, /* adjust_inputs= */ false); // fprintf(stderr, "try_raw_render: %s\n", prompt.c_str()); return prompt; } catch (const std::exception & e) { // fprintf(stderr, "try_raw_render error: %s\n", e.what()); return ""; } }
O3
cpp
minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, 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&) const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x0, (%rsp) callq 0x7f3fa movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 cmpl $0x1, %edx jne 0x5e796 movq %r14, %rdi callq 0x192c0 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x560c1(%rip), %rdx # 0xb483d movq %rbx, %rdi movq %rdx, %rsi callq 0x22878 callq 0x19b10 jmp 0x5e753 movq %rax, %r14 callq 0x19b10 movq %r14, %rdi callq 0x19c00 movq %rax, %rdi callq 0x2286d
_ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_: push r14 push rbx push rax mov rbx, rdi mov [rsp+18h+var_18], 0 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) loc_5E753: mov rax, rbx add rsp, 8 pop rbx pop r14 retn mov r14, rax cmp edx, 1 jnz short loc_5E796 mov rdi, r14; void * call ___cxa_begin_catch lea rax, [rbx+10h] mov [rbx], rax lea rdx, asc_B4839+4; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) call ___cxa_end_catch jmp short loc_5E753 mov r14, rax call ___cxa_end_catch loc_5E796: mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::chat_template::try_raw_render(long long a1) { minja::chat_template::apply(a1); return a1; }
try_raw_render: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LAB_0015e747: MOV dword ptr [RSP],0x0 CALL 0x0017f3fa LAB_0015e753: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, bool, 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&) const */ chat_template * __thiscall minja::chat_template::try_raw_render (chat_template *this,basic_json *param_1,basic_json *param_2,bool param_3, basic_json *param_4) { int7 in_register_00000009; /* try { // try from 0015e747 to 0015e752 has its CatchHandler @ 0015e75e */ apply((basic_json *)this,param_1,SUB81(param_2,0), (basic_json *)CONCAT71(in_register_00000009,param_3),SUB81(param_4,0)); return this; }
36,051
js_worker_postMessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_postMessage(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessagePipe *ps; size_t data_len, i; uint8_t *data; JSWorkerMessage *msg; JSSABTab sab_tab; if (!worker) return JS_EXCEPTION; data = JS_WriteObject2(ctx, &data_len, argv[0], JS_WRITE_OBJ_SAB | JS_WRITE_OBJ_REFERENCE, &sab_tab); if (!data) return JS_EXCEPTION; msg = malloc(sizeof(*msg)); if (!msg) goto fail; msg->data = NULL; msg->sab_tab = NULL; /* must reallocate because the allocator may be different */ msg->data = malloc(data_len); if (!msg->data) goto fail; memcpy(msg->data, data, data_len); msg->data_len = data_len; if (sab_tab.len > 0) { msg->sab_tab = malloc(sizeof(msg->sab_tab[0]) * sab_tab.len); if (!msg->sab_tab) goto fail; memcpy(msg->sab_tab, sab_tab.tab, sizeof(msg->sab_tab[0]) * sab_tab.len); } msg->sab_tab_len = sab_tab.len; js_free(ctx, data); js_free(ctx, sab_tab.tab); /* increment the SAB reference counts */ for(i = 0; i < msg->sab_tab_len; i++) { js_sab_dup(NULL, msg->sab_tab[i]); } ps = worker->send_pipe; pthread_mutex_lock(&ps->mutex); /* indicate that data is present */ if (list_empty(&ps->msg_queue)) { uint8_t ch = '\0'; int ret; for(;;) { ret = write(ps->write_fd, &ch, 1); if (ret == 1) break; if (ret < 0 && (errno != EAGAIN || errno != EINTR)) break; } } list_add_tail(&msg->link, &ps->msg_queue); pthread_mutex_unlock(&ps->mutex); return JS_UNDEFINED; fail: if (msg) { free(msg->data); free(msg->sab_tab); free(msg); } js_free(ctx, data); js_free(ctx, sab_tab.tab); return JS_EXCEPTION; }
O0
c
js_worker_postMessage: subq $0x98, %rsp movq %rsi, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq %rdi, 0x70(%rsp) movl %ecx, 0x6c(%rsp) movq %r8, 0x60(%rsp) movq 0x70(%rsp), %rdi callq 0x27f00 movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x115d0 movq %rax, 0x50(%rsp) movq 0x70(%rsp), %rdi movq 0x50(%rsp), %rax movl 0x7c(%rax), %ecx movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x383b0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x17138 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x173df movq 0x70(%rsp), %rdi movq 0x60(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x38(%rsp), %rsi movl $0xc, %r8d leaq 0x10(%rsp), %r9 callq 0x4aef0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x17187 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x173df movl $0x30, %edi callq 0xe660 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x171a3 jmp 0x1737c movq 0x20(%rsp), %rax movq $0x0, 0x10(%rax) movq 0x20(%rsp), %rax movq $0x0, 0x20(%rax) movq 0x38(%rsp), %rdi callq 0xe660 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x20(%rsp), %rax cmpq $0x0, 0x10(%rax) jne 0x171e4 jmp 0x1737c movq 0x20(%rsp), %rax movq 0x10(%rax), %rdi movq 0x28(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0xe5b0 movq 0x38(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x18(%rax) cmpq $0x0, 0x18(%rsp) jbe 0x17259 movq 0x18(%rsp), %rdi shlq $0x3, %rdi callq 0xe660 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x20(%rax) movq 0x20(%rsp), %rax cmpq $0x0, 0x20(%rax) jne 0x1723d jmp 0x1737c movq 0x20(%rsp), %rax movq 0x20(%rax), %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx shlq $0x3, %rdx callq 0xe5b0 movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x28(%rax) movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x21db0 movq 0x70(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x21db0 movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax movq 0x20(%rsp), %rcx cmpq 0x28(%rcx), %rax jae 0x172c9 movq 0x20(%rsp), %rax movq 0x20(%rax), %rax movq 0x30(%rsp), %rcx movq (%rax,%rcx,8), %rsi xorl %eax, %eax movl %eax, %edi callq 0x11440 movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) jmp 0x1728e movq 0x48(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi addq $0x8, %rdi callq 0xe980 movq 0x40(%rsp), %rdi addq $0x30, %rdi callq 0x17700 cmpl $0x0, %eax je 0x17342 movb $0x0, 0xf(%rsp) movq 0x40(%rsp), %rax movl 0x44(%rax), %edi leaq 0xf(%rsp), %rsi movl $0x1, %edx callq 0xe1d0 movl %eax, 0x8(%rsp) cmpl $0x1, 0x8(%rsp) jne 0x17321 jmp 0x17340 cmpl $0x0, 0x8(%rsp) jge 0x1733e callq 0xe0b0 cmpl $0xb, (%rax) jne 0x1733c callq 0xe0b0 cmpl $0x4, (%rax) je 0x1733e jmp 0x17340 jmp 0x172fd jmp 0x17342 movq 0x20(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x30, %rsi callq 0x17720 movq 0x40(%rsp), %rdi addq $0x8, %rdi callq 0xe650 movl $0x0, 0x88(%rsp) movq $0x3, 0x90(%rsp) jmp 0x173df cmpq $0x0, 0x20(%rsp) je 0x173aa movq 0x20(%rsp), %rax movq 0x10(%rax), %rdi callq 0xe060 movq 0x20(%rsp), %rax movq 0x20(%rax), %rdi callq 0xe060 movq 0x20(%rsp), %rdi callq 0xe060 movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x21db0 movq 0x70(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x21db0 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) movq 0x88(%rsp), %rax movq 0x90(%rsp), %rdx addq $0x98, %rsp retq nopw (%rax,%rax)
js_worker_postMessage: sub rsp, 98h mov [rsp+98h+var_20], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_28], rdi mov [rsp+98h+var_2C], ecx mov [rsp+98h+var_38], r8 mov rdi, [rsp+98h+var_28] call JS_GetRuntime mov [rsp+98h+var_40], rax mov rdi, [rsp+98h+var_40] call js_get_thread_state mov [rsp+98h+var_48], rax mov rdi, [rsp+98h+var_28] mov rax, [rsp+98h+var_48] mov ecx, [rax+7Ch] mov rsi, [rsp+98h+var_20] mov rdx, [rsp+98h+var_18] call JS_GetOpaque2 mov [rsp+98h+var_50], rax cmp [rsp+98h+var_50], 0 jnz short loc_17138 mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_173DF loc_17138: mov rdi, [rsp+98h+var_28] mov rax, [rsp+98h+var_38] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+98h+var_60] mov r8d, 0Ch lea r9, [rsp+98h+var_88] call JS_WriteObject2 mov [rsp+98h+var_70], rax cmp [rsp+98h+var_70], 0 jnz short loc_17187 mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_173DF loc_17187: mov edi, 30h ; '0' call _malloc mov [rsp+98h+var_78], rax cmp [rsp+98h+var_78], 0 jnz short loc_171A3 jmp loc_1737C loc_171A3: mov rax, [rsp+98h+var_78] mov qword ptr [rax+10h], 0 mov rax, [rsp+98h+var_78] mov qword ptr [rax+20h], 0 mov rdi, [rsp+98h+var_60] call _malloc mov rcx, rax mov rax, [rsp+98h+var_78] mov [rax+10h], rcx mov rax, [rsp+98h+var_78] cmp qword ptr [rax+10h], 0 jnz short loc_171E4 jmp loc_1737C loc_171E4: mov rax, [rsp+98h+var_78] mov rdi, [rax+10h] mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_60] call _memcpy mov rcx, [rsp+98h+var_60] mov rax, [rsp+98h+var_78] mov [rax+18h], rcx cmp [rsp+98h+var_80], 0 jbe short loc_17259 mov rdi, [rsp+98h+var_80] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_78] mov [rax+20h], rcx mov rax, [rsp+98h+var_78] cmp qword ptr [rax+20h], 0 jnz short loc_1723D jmp loc_1737C loc_1723D: mov rax, [rsp+98h+var_78] mov rdi, [rax+20h] mov rsi, [rsp+98h+var_88] mov rdx, [rsp+98h+var_80] shl rdx, 3 call _memcpy loc_17259: mov rcx, [rsp+98h+var_80] mov rax, [rsp+98h+var_78] mov [rax+28h], rcx mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_70] call js_free mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_88] call js_free mov [rsp+98h+var_68], 0 loc_1728E: mov rax, [rsp+98h+var_68] mov rcx, [rsp+98h+var_78] cmp rax, [rcx+28h] jnb short loc_172C9 mov rax, [rsp+98h+var_78] mov rax, [rax+20h] mov rcx, [rsp+98h+var_68] mov rsi, [rax+rcx*8] xor eax, eax mov edi, eax call js_sab_dup mov rax, [rsp+98h+var_68] add rax, 1 mov [rsp+98h+var_68], rax jmp short loc_1728E loc_172C9: mov rax, [rsp+98h+var_50] mov rax, [rax+8] mov [rsp+98h+var_58], rax mov rdi, [rsp+98h+var_58] add rdi, 8 call _pthread_mutex_lock mov rdi, [rsp+98h+var_58] add rdi, 30h ; '0' call list_empty cmp eax, 0 jz short loc_17342 mov [rsp+98h+var_89], 0 loc_172FD: mov rax, [rsp+98h+var_58] mov edi, [rax+44h] lea rsi, [rsp+98h+var_89] mov edx, 1 call _write mov [rsp+98h+var_90], eax cmp [rsp+98h+var_90], 1 jnz short loc_17321 jmp short loc_17340 loc_17321: cmp [rsp+98h+var_90], 0 jge short loc_1733E call ___errno_location cmp dword ptr [rax], 0Bh jnz short loc_1733C call ___errno_location cmp dword ptr [rax], 4 jz short loc_1733E loc_1733C: jmp short loc_17340 loc_1733E: jmp short loc_172FD loc_17340: jmp short $+2 loc_17342: mov rdi, [rsp+98h+var_78] mov rsi, [rsp+98h+var_58] add rsi, 30h ; '0' call list_add_tail mov rdi, [rsp+98h+var_58] add rdi, 8 call _pthread_mutex_unlock mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 3 jmp short loc_173DF loc_1737C: cmp [rsp+98h+var_78], 0 jz short loc_173AA mov rax, [rsp+98h+var_78] mov rdi, [rax+10h] call _free mov rax, [rsp+98h+var_78] mov rdi, [rax+20h] call _free mov rdi, [rsp+98h+var_78] call _free loc_173AA: mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_70] call js_free mov rdi, [rsp+98h+var_28] mov rsi, [rsp+98h+var_88] call js_free mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 loc_173DF: mov rax, [rsp+98h+var_10] mov rdx, [rsp+98h+var_8] add rsp, 98h retn
long long js_worker_postMessage(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rcx int v11; // [rsp+8h] [rbp-90h] char v12; // [rsp+Fh] [rbp-89h] BYREF long long v13; // [rsp+10h] [rbp-88h] BYREF long long v14; // [rsp+18h] [rbp-80h] _QWORD *v15; // [rsp+20h] [rbp-78h] long long v16; // [rsp+28h] [rbp-70h] unsigned long long i; // [rsp+30h] [rbp-68h] long long v18; // [rsp+38h] [rbp-60h] BYREF long long v19; // [rsp+40h] [rbp-58h] long long Opaque2; // [rsp+48h] [rbp-50h] long long thread_state; // [rsp+50h] [rbp-48h] long long Runtime; // [rsp+58h] [rbp-40h] _QWORD *v23; // [rsp+60h] [rbp-38h] int v24; // [rsp+6Ch] [rbp-2Ch] long long v25; // [rsp+70h] [rbp-28h] long long v26; // [rsp+78h] [rbp-20h] long long v27; // [rsp+80h] [rbp-18h] long long v28; // [rsp+88h] [rbp-10h] long long v29; // [rsp+90h] [rbp-8h] v26 = a2; v27 = a3; v25 = a1; v24 = a4; v23 = a5; Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8); Opaque2 = JS_GetOpaque2(a1, a2, v27, *(unsigned int *)(thread_state + 124)); if ( !Opaque2 ) { LODWORD(v28) = 0; v29 = 6LL; return v28; } v16 = JS_WriteObject2(v25, &v18, *v23, v23[1], 12LL, &v13); if ( !v16 ) { LODWORD(v28) = 0; v29 = 6LL; return v28; } v15 = (_QWORD *)malloc(48LL); if ( v15 ) { v15[2] = 0LL; v15[4] = 0LL; v9 = malloc(v18); v15[2] = v9; if ( v15[2] ) { memcpy(v15[2], v16, v18); v15[3] = v18; if ( !v14 ) goto LABEL_10; v15[4] = malloc(8 * v14); if ( v15[4] ) { memcpy(v15[4], v13, 8 * v14); LABEL_10: v15[5] = v14; js_free(v25, v16); js_free(v25, v13); for ( i = 0LL; i < v15[5]; ++i ) js_sab_dup(0LL, *(_QWORD *)(v15[4] + 8 * i)); v19 = *(_QWORD *)(Opaque2 + 8); pthread_mutex_lock(v19 + 8); if ( (unsigned int)list_empty(v19 + 48) ) { v12 = 0; do v11 = write(*(unsigned int *)(v19 + 68), &v12, 1LL); while ( v11 != 1 && (v11 >= 0 || *(_DWORD *)__errno_location() == 11 && *(_DWORD *)__errno_location() == 4) ); } list_add_tail(v15, v19 + 48); pthread_mutex_unlock(v19 + 8); LODWORD(v28) = 0; v29 = 3LL; return v28; } } } if ( v15 ) { free(v15[2]); free(v15[4]); free(v15); } js_free(v25, v16); js_free(v25, v13); LODWORD(v28) = 0; v29 = 6LL; return v28; }
js_worker_postMessage: SUB RSP,0x98 MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x80],RDX MOV qword ptr [RSP + 0x70],RDI MOV dword ptr [RSP + 0x6c],ECX MOV qword ptr [RSP + 0x60],R8 MOV RDI,qword ptr [RSP + 0x70] CALL 0x00127f00 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001115d0 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RAX + 0x7c] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x001383b0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JNZ 0x00117138 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x001173df LAB_00117138: MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x38] MOV R8D,0xc LEA R9,[RSP + 0x10] CALL 0x0014aef0 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x00117187 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x001173df LAB_00117187: MOV EDI,0x30 CALL 0x0010e660 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001171a3 JMP 0x0011737c LAB_001171a3: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x0010e660 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x001171e4 JMP 0x0011737c LAB_001171e4: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x38] CALL 0x0010e5b0 MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RCX CMP qword ptr [RSP + 0x18],0x0 JBE 0x00117259 MOV RDI,qword ptr [RSP + 0x18] SHL RDI,0x3 CALL 0x0010e660 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x0011723d JMP 0x0011737c LAB_0011723d: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] SHL RDX,0x3 CALL 0x0010e5b0 LAB_00117259: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x28],RCX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00121db0 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x10] CALL 0x00121db0 MOV qword ptr [RSP + 0x30],0x0 LAB_0011728e: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX + 0x28] JNC 0x001172c9 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX + RCX*0x8] XOR EAX,EAX MOV EDI,EAX CALL 0x00111440 MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX JMP 0x0011728e LAB_001172c9: MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x8 CALL 0x0010e980 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x30 CALL 0x00117700 CMP EAX,0x0 JZ 0x00117342 MOV byte ptr [RSP + 0xf],0x0 LAB_001172fd: MOV RAX,qword ptr [RSP + 0x40] MOV EDI,dword ptr [RAX + 0x44] LEA RSI,[RSP + 0xf] MOV EDX,0x1 CALL 0x0010e1d0 MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0x8],0x1 JNZ 0x00117321 JMP 0x00117340 LAB_00117321: CMP dword ptr [RSP + 0x8],0x0 JGE 0x0011733e CALL 0x0010e0b0 CMP dword ptr [RAX],0xb JNZ 0x0011733c CALL 0x0010e0b0 CMP dword ptr [RAX],0x4 JZ 0x0011733e LAB_0011733c: JMP 0x00117340 LAB_0011733e: JMP 0x001172fd LAB_00117340: JMP 0x00117342 LAB_00117342: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x30 CALL 0x00117720 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x8 CALL 0x0010e650 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x3 JMP 0x001173df LAB_0011737c: CMP qword ptr [RSP + 0x20],0x0 JZ 0x001173aa MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0010e060 MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x20] CALL 0x0010e060 MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010e060 LAB_001173aa: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00121db0 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x10] CALL 0x00121db0 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 LAB_001173df: MOV RAX,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] ADD RSP,0x98 RET
int1 [16] js_worker_postMessage (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; void *pvVar3; ssize_t sVar4; int *piVar5; int1 local_89; void *local_88; long local_80; void *local_78; void *local_70; ulong local_68; size_t local_60; long local_58; long local_50; long local_48; int8 local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_40 = JS_GetRuntime(param_1); local_48 = js_get_thread_state(local_40); local_50 = JS_GetOpaque2(local_28,local_20,local_18,*(int4 *)(local_48 + 0x7c)); if (local_50 == 0) { local_8 = 6; goto LAB_001173df; } local_70 = (void *)JS_WriteObject2(local_28,&local_60,*local_38,local_38[1],0xc,&local_88); if (local_70 == (void *)0x0) { local_8 = 6; goto LAB_001173df; } local_78 = malloc(0x30); if (local_78 != (void *)0x0) { *(int8 *)((long)local_78 + 0x10) = 0; *(int8 *)((long)local_78 + 0x20) = 0; pvVar3 = malloc(local_60); *(void **)((long)local_78 + 0x10) = pvVar3; if (*(long *)((long)local_78 + 0x10) != 0) { memcpy(*(void **)((long)local_78 + 0x10),local_70,local_60); *(size_t *)((long)local_78 + 0x18) = local_60; if (local_80 != 0) { pvVar3 = malloc(local_80 << 3); *(void **)((long)local_78 + 0x20) = pvVar3; if (*(long *)((long)local_78 + 0x20) == 0) goto LAB_0011737c; memcpy(*(void **)((long)local_78 + 0x20),local_88,local_80 << 3); } *(long *)((long)local_78 + 0x28) = local_80; js_free(local_28,local_70); js_free(local_28,local_88); for (local_68 = 0; local_68 < *(ulong *)((long)local_78 + 0x28); local_68 = local_68 + 1) { js_sab_dup(0,*(int8 *)(*(long *)((long)local_78 + 0x20) + local_68 * 8)); } local_58 = *(long *)(local_50 + 8); pthread_mutex_lock((pthread_mutex_t *)(local_58 + 8)); iVar2 = list_empty(local_58 + 0x30); if (iVar2 != 0) { local_89 = 0; while( true ) { sVar4 = write(*(int *)(local_58 + 0x44),&local_89,1); if ((int)sVar4 == 1) break; if (((int)sVar4 < 0) && ((piVar5 = __errno_location(), *piVar5 != 0xb || (piVar5 = __errno_location(), *piVar5 != 4)))) break; } } list_add_tail(local_78,local_58 + 0x30); pthread_mutex_unlock((pthread_mutex_t *)(local_58 + 8)); local_8 = 3; goto LAB_001173df; } } LAB_0011737c: if (local_78 != (void *)0x0) { free(*(void **)((long)local_78 + 0x10)); free(*(void **)((long)local_78 + 0x20)); free(local_78); } js_free(local_28,local_70); js_free(local_28,local_88); local_8 = 6; LAB_001173df: auVar1._4_8_ = local_8; auVar1._0_4_ = uStack_c; auVar1._12_4_ = 0; return auVar1 << 0x20; }
36,052
js_worker_postMessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_postMessage(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessagePipe *ps; size_t data_len, i; uint8_t *data; JSWorkerMessage *msg; JSSABTab sab_tab; if (!worker) return JS_EXCEPTION; data = JS_WriteObject2(ctx, &data_len, argv[0], JS_WRITE_OBJ_SAB | JS_WRITE_OBJ_REFERENCE, &sab_tab); if (!data) return JS_EXCEPTION; msg = malloc(sizeof(*msg)); if (!msg) goto fail; msg->data = NULL; msg->sab_tab = NULL; /* must reallocate because the allocator may be different */ msg->data = malloc(data_len); if (!msg->data) goto fail; memcpy(msg->data, data, data_len); msg->data_len = data_len; if (sab_tab.len > 0) { msg->sab_tab = malloc(sizeof(msg->sab_tab[0]) * sab_tab.len); if (!msg->sab_tab) goto fail; memcpy(msg->sab_tab, sab_tab.tab, sizeof(msg->sab_tab[0]) * sab_tab.len); } msg->sab_tab_len = sab_tab.len; js_free(ctx, data); js_free(ctx, sab_tab.tab); /* increment the SAB reference counts */ for(i = 0; i < msg->sab_tab_len; i++) { js_sab_dup(NULL, msg->sab_tab[i]); } ps = worker->send_pipe; pthread_mutex_lock(&ps->mutex); /* indicate that data is present */ if (list_empty(&ps->msg_queue)) { uint8_t ch = '\0'; int ret; for(;;) { ret = write(ps->write_fd, &ch, 1); if (ret == 1) break; if (ret < 0 && (errno != EAGAIN || errno != EINTR)) break; } } list_add_tail(&msg->link, &ps->msg_queue); pthread_mutex_unlock(&ps->mutex); return JS_UNDEFINED; fail: if (msg) { free(msg->data); free(msg->sab_tab); free(msg); } js_free(ctx, data); js_free(ctx, sab_tab.tab); return JS_EXCEPTION; }
O2
c
js_worker_postMessage: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %rbx movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 callq 0x1a185 movq %rax, %rdi callq 0x1028a movl 0x7c(%rax), %ecx movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x21207 pushq $0x6 popq %r12 testq %rax, %rax je 0x130e7 movq %rax, %r15 movq (%rbx), %rdx movq 0x8(%rbx), %rcx leaq 0x30(%rsp), %rsi pushq $0xc popq %r8 leaq 0x10(%rsp), %r9 movq %r14, %rdi callq 0x29b4d testq %rax, %rax je 0x130e7 movq %rax, %r13 pushq $0x30 popq %rdi callq 0xe680 testq %rax, %rax je 0x1306b movq %rax, %rbx movq %r15, 0x28(%rsp) andq $0x0, 0x20(%rax) movq 0x30(%rsp), %r15 movq %r15, %rdi callq 0xe680 movq %rax, %rbp movq %rax, 0x10(%rbx) testq %rax, %rax je 0x1305b movq %rbp, %rdi movq %r13, %rsi movq %r15, %rdx callq 0xe5c0 movq %r15, 0x18(%rbx) movq 0x18(%rsp), %r15 testq %r15, %r15 je 0x13023 leaq (,%r15,8), %rdi movq %rdi, 0x20(%rsp) callq 0xe680 movq %rax, 0x20(%rbx) testq %rax, %rax je 0x1305b movq 0x10(%rsp), %rsi movq %rax, %rdi movq 0x20(%rsp), %rdx callq 0xe5c0 movq %r15, 0x28(%rbx) movq %r14, %rdi movq %r13, %rsi callq 0x1726e movq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x1726e xorl %eax, %eax cmpq %r15, %rax jae 0x13085 movq 0x20(%rbx), %rcx movq (%rcx,%rax,8), %rcx lock incl -0x8(%rcx) incq %rax movq 0x28(%rbx), %r15 jmp 0x13041 movq %rbp, %rdi callq 0xe060 movq %rbx, %rdi callq 0xe060 movq %r14, %rdi movq %r13, %rsi callq 0x1726e movq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x1726e jmp 0x130e7 movq 0x28(%rsp), %rax movq 0x8(%rax), %rbp leaq 0x8(%rbp), %r14 movq %r14, %rdi callq 0xe9b0 leaq 0x30(%rbp), %r13 cmpq %r13, 0x38(%rbp) jne 0x130c8 leaq 0xf(%rsp), %r15 movb $0x0, (%r15) pushq $0x1 popq %r12 movl 0x44(%rbp), %edi movq %r15, %rsi movq %r12, %rdx callq 0xe1e0 cmpl $0x1, %eax je 0x130c8 testl %eax, %eax jns 0x130b1 movq (%r13), %rax movq %rbx, 0x8(%rax) movq %rax, (%rbx) movq %r13, 0x8(%rbx) movq %rbx, (%r13) movq %r14, %rdi callq 0xe670 pushq $0x3 popq %r12 xorl %eax, %eax movq %r12, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_worker_postMessage: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r8 mov r15, rdx mov r12, rsi mov r14, rdi call JS_GetRuntime mov rdi, rax call js_get_thread_state mov ecx, [rax+7Ch] mov rdi, r14 mov rsi, r12 mov rdx, r15 call JS_GetOpaque2 push 6 pop r12 test rax, rax jz loc_130E7 mov r15, rax mov rdx, [rbx] mov rcx, [rbx+8] lea rsi, [rsp+68h+var_38] push 0Ch pop r8 lea r9, [rsp+68h+var_58] mov rdi, r14 call JS_WriteObject2 test rax, rax jz loc_130E7 mov r13, rax push 30h ; '0' pop rdi call _malloc test rax, rax jz loc_1306B mov rbx, rax mov [rsp+68h+var_40], r15 and qword ptr [rax+20h], 0 mov r15, [rsp+68h+var_38] mov rdi, r15 call _malloc mov rbp, rax mov [rbx+10h], rax test rax, rax jz loc_1305B mov rdi, rbp mov rsi, r13 mov rdx, r15 call _memcpy mov [rbx+18h], r15 mov r15, [rsp+68h+var_50] test r15, r15 jz short loc_13023 lea rdi, ds:0[r15*8] mov [rsp+68h+var_48], rdi call _malloc mov [rbx+20h], rax test rax, rax jz short loc_1305B mov rsi, [rsp+68h+var_58] mov rdi, rax mov rdx, [rsp+68h+var_48] call _memcpy loc_13023: mov [rbx+28h], r15 mov rdi, r14 mov rsi, r13 call js_free mov rsi, [rsp+68h+var_58] mov rdi, r14 call js_free xor eax, eax loc_13041: cmp rax, r15 jnb short loc_13085 mov rcx, [rbx+20h] mov rcx, [rcx+rax*8] lock inc dword ptr [rcx-8] inc rax mov r15, [rbx+28h] jmp short loc_13041 loc_1305B: mov rdi, rbp call _free mov rdi, rbx call _free loc_1306B: mov rdi, r14 mov rsi, r13 call js_free mov rsi, [rsp+68h+var_58] mov rdi, r14 call js_free jmp short loc_130E7 loc_13085: mov rax, [rsp+68h+var_40] mov rbp, [rax+8] lea r14, [rbp+8] mov rdi, r14 call _pthread_mutex_lock lea r13, [rbp+30h] cmp [rbp+38h], r13 jnz short loc_130C8 lea r15, [rsp+68h+var_59] mov byte ptr [r15], 0 push 1 pop r12 loc_130B1: mov edi, [rbp+44h] mov rsi, r15 mov rdx, r12 call _write cmp eax, 1 jz short loc_130C8 test eax, eax jns short loc_130B1 loc_130C8: mov rax, [r13+0] mov [rax+8], rbx mov [rbx], rax mov [rbx+8], r13 mov [r13+0], rbx mov rdi, r14 call _pthread_mutex_unlock push 3 pop r12 loc_130E7: xor eax, eax mov rdx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_worker_postMessage(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { int Runtime; // eax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long thread_state; // rax long long Opaque2; // rax long long v14; // r15 long long v15; // rax long long v16; // r13 long long v17; // rax _QWORD *v18; // rbx long long v19; // r15 long long v20; // rax long long v21; // rbp unsigned long long v22; // r15 long long v23; // rax unsigned long long i; // rax long long v25; // rbp long long *v26; // r13 int v27; // eax long long v28; // rax char v30; // [rsp+0h] [rbp-68h] char v31; // [rsp+Fh] [rbp-59h] BYREF long long v32; // [rsp+10h] [rbp-58h] BYREF unsigned long long v33; // [rsp+18h] [rbp-50h] long long v34; // [rsp+20h] [rbp-48h] long long v35; // [rsp+28h] [rbp-40h] long long v36[7]; // [rsp+30h] [rbp-38h] BYREF Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v8, v9, v10, v11, v30); Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 124)); if ( !Opaque2 ) return 0LL; v14 = Opaque2; v15 = JS_WriteObject2(a1, v36, *a5, a5[1], 12LL, &v32); if ( !v15 ) return 0LL; v16 = v15; v17 = malloc(48LL); if ( !v17 ) { LABEL_12: js_free(a1, v16); js_free(a1, v32); return 0LL; } v18 = (_QWORD *)v17; v35 = v14; *(_QWORD *)(v17 + 32) = 0LL; v19 = v36[0]; v20 = malloc(v36[0]); v21 = v20; v18[2] = v20; if ( !v20 ) goto LABEL_11; memcpy(v20, v16, v19); v18[3] = v19; v22 = v33; if ( !v33 ) goto LABEL_8; v34 = 8 * v33; v23 = malloc(8 * v33); v18[4] = v23; if ( !v23 ) { LABEL_11: free(v21); free(v18); goto LABEL_12; } memcpy(v23, v32, v34); LABEL_8: v18[5] = v22; js_free(a1, v16); js_free(a1, v32); for ( i = 0LL; i < v22; ++i ) { _InterlockedIncrement((volatile signed __int32 *)(*(_QWORD *)(v18[4] + 8 * i) - 8LL)); v22 = v18[5]; } v25 = *(_QWORD *)(v35 + 8); pthread_mutex_lock(v25 + 8); v26 = (long long *)(v25 + 48); if ( *(_QWORD *)(v25 + 56) == v25 + 48 ) { v31 = 0; do v27 = write(*(unsigned int *)(v25 + 68), &v31, 1LL); while ( v27 != 1 && v27 >= 0 ); } v28 = *v26; *(_QWORD *)(v28 + 8) = v18; *v18 = v28; v18[1] = v26; *v26 = (long long)v18; pthread_mutex_unlock(v25 + 8); return 0LL; }
js_worker_postMessage: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R8 MOV R15,RDX MOV R12,RSI MOV R14,RDI CALL 0x0011a185 MOV RDI,RAX CALL 0x0011028a MOV ECX,dword ptr [RAX + 0x7c] MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x00121207 PUSH 0x6 POP R12 TEST RAX,RAX JZ 0x001130e7 MOV R15,RAX MOV RDX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] LEA RSI,[RSP + 0x30] PUSH 0xc POP R8 LEA R9,[RSP + 0x10] MOV RDI,R14 CALL 0x00129b4d TEST RAX,RAX JZ 0x001130e7 MOV R13,RAX PUSH 0x30 POP RDI CALL 0x0010e680 TEST RAX,RAX JZ 0x0011306b MOV RBX,RAX MOV qword ptr [RSP + 0x28],R15 AND qword ptr [RAX + 0x20],0x0 MOV R15,qword ptr [RSP + 0x30] MOV RDI,R15 CALL 0x0010e680 MOV RBP,RAX MOV qword ptr [RBX + 0x10],RAX TEST RAX,RAX JZ 0x0011305b MOV RDI,RBP MOV RSI,R13 MOV RDX,R15 CALL 0x0010e5c0 MOV qword ptr [RBX + 0x18],R15 MOV R15,qword ptr [RSP + 0x18] TEST R15,R15 JZ 0x00113023 LEA RDI,[R15*0x8] MOV qword ptr [RSP + 0x20],RDI CALL 0x0010e680 MOV qword ptr [RBX + 0x20],RAX TEST RAX,RAX JZ 0x0011305b MOV RSI,qword ptr [RSP + 0x10] MOV RDI,RAX MOV RDX,qword ptr [RSP + 0x20] CALL 0x0010e5c0 LAB_00113023: MOV qword ptr [RBX + 0x28],R15 MOV RDI,R14 MOV RSI,R13 CALL 0x0011726e MOV RSI,qword ptr [RSP + 0x10] MOV RDI,R14 CALL 0x0011726e XOR EAX,EAX LAB_00113041: CMP RAX,R15 JNC 0x00113085 MOV RCX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [RCX + RAX*0x8] INC.LOCK dword ptr [RCX + -0x8] INC RAX MOV R15,qword ptr [RBX + 0x28] JMP 0x00113041 LAB_0011305b: MOV RDI,RBP CALL 0x0010e060 MOV RDI,RBX CALL 0x0010e060 LAB_0011306b: MOV RDI,R14 MOV RSI,R13 CALL 0x0011726e MOV RSI,qword ptr [RSP + 0x10] MOV RDI,R14 CALL 0x0011726e JMP 0x001130e7 LAB_00113085: MOV RAX,qword ptr [RSP + 0x28] MOV RBP,qword ptr [RAX + 0x8] LEA R14,[RBP + 0x8] MOV RDI,R14 CALL 0x0010e9b0 LEA R13,[RBP + 0x30] CMP qword ptr [RBP + 0x38],R13 JNZ 0x001130c8 LEA R15,[RSP + 0xf] MOV byte ptr [R15],0x0 PUSH 0x1 POP R12 LAB_001130b1: MOV EDI,dword ptr [RBP + 0x44] MOV RSI,R15 MOV RDX,R12 CALL 0x0010e1e0 CMP EAX,0x1 JZ 0x001130c8 TEST EAX,EAX JNS 0x001130b1 LAB_001130c8: MOV RAX,qword ptr [R13] MOV qword ptr [RAX + 0x8],RBX MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],R13 MOV qword ptr [R13],RBX MOV RDI,R14 CALL 0x0010e670 PUSH 0x3 POP R12 LAB_001130e7: XOR EAX,EAX MOV RDX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_worker_postMessage (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int *piVar1; long *plVar2; long lVar3; int1 auVar4 [16]; int8 uVar5; long lVar6; void *__src; long *__ptr; void *__dest; void *__dest_00; ulong uVar7; ssize_t sVar8; int1 local_59; void *local_58; ulong local_50; size_t local_48; long local_40; size_t local_38; uVar5 = JS_GetRuntime(); lVar6 = js_get_thread_state(uVar5); lVar6 = JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar6 + 0x7c)); uVar7 = 6; if (lVar6 == 0) goto LAB_001130e7; __src = (void *)JS_WriteObject2(param_1,&local_38,*param_5,param_5[1],0xc,&local_58); if (__src == (void *)0x0) goto LAB_001130e7; __ptr = (long *)malloc(0x30); if (__ptr != (long *)0x0) { __ptr[4] = 0; local_40 = lVar6; __dest = malloc(local_38); __ptr[2] = (long)__dest; if (__dest != (void *)0x0) { memcpy(__dest,__src,local_38); __ptr[3] = local_38; if (local_50 != 0) { local_48 = local_50 * 8; __dest_00 = malloc(local_48); __ptr[4] = (long)__dest_00; if (__dest_00 == (void *)0x0) goto LAB_0011305b; memcpy(__dest_00,local_58,local_48); } __ptr[5] = local_50; js_free(param_1,__src); js_free(param_1,local_58); for (uVar7 = 0; uVar7 < local_50; uVar7 = uVar7 + 1) { LOCK(); piVar1 = (int *)(*(long *)(__ptr[4] + uVar7 * 8) + -8); *piVar1 = *piVar1 + 1; UNLOCK(); local_50 = __ptr[5]; } lVar6 = *(long *)(local_40 + 8); pthread_mutex_lock((pthread_mutex_t *)(lVar6 + 8)); plVar2 = (long *)(lVar6 + 0x30); if (*(long **)(lVar6 + 0x38) == plVar2) { local_59 = 0; do { sVar8 = write(*(int *)(lVar6 + 0x44),&local_59,1); if ((int)sVar8 == 1) break; } while (-1 < (int)sVar8); } lVar3 = *plVar2; *(long **)(lVar3 + 8) = __ptr; *__ptr = lVar3; __ptr[1] = (long)plVar2; *plVar2 = (long)__ptr; pthread_mutex_unlock((pthread_mutex_t *)(lVar6 + 8)); uVar7 = 3; goto LAB_001130e7; } LAB_0011305b: free(__dest); free(__ptr); } js_free(param_1,__src); js_free(param_1,local_58); LAB_001130e7: auVar4._8_8_ = 0; auVar4._0_8_ = uVar7; return auVar4 << 0x40; }
36,053
scan_one_character
eloqsql/strings/ctype.c
static size_t scan_one_character(const char *s, const char *e, my_wc_t *wc) { CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci; if (s >= e) return 0; /* Escape sequence: \uXXXX */ if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2])) { size_t len= 3; /* We have at least one digit */ for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++) { } wc[0]= 0; return len; } else if ((int8) s[0] > 0) /* 7-bit character */ { wc[0]= 0; return 1; } else /* Non-escaped character */ { int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e); if (rc > 0) return (size_t) rc; } return 0; }
O0
c
scan_one_character: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) leaq 0x315275(%rip), %rax # 0x389cb0 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jb 0x74a56 movq $0x0, -0x8(%rbp) jmp 0x74b88 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5c, %eax jne 0x74b27 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jae 0x74b27 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x75, %eax jne 0x74b27 movq -0x28(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x74b27 movq $0x3, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x35(%rbp) jae 0x74aed movq -0x28(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax setne %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x74af6 jmp 0x74b12 jmp 0x74af8 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x74abc movq -0x20(%rbp), %rax movq $0x0, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x74b88 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jle 0x74b48 movq -0x20(%rbp), %rax movq $0x0, (%rax) movq $0x1, -0x8(%rbp) jmp 0x74b88 movq -0x28(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) jle 0x74b7c movslq -0x34(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x74b88 jmp 0x74b7e jmp 0x74b80 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
scan_one_character: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx lea rax, my_charset_utf8mb3_general_ci mov [rbp+var_28], rax mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jb short loc_74A56 mov [rbp+var_8], 0 jmp loc_74B88 loc_74A56: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ch ; '\' jnz loc_74B27 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jnb loc_74B27 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 75h ; 'u' jnz loc_74B27 mov rax, [rbp+var_28] mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+2] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 jz short loc_74B27 mov [rbp+var_30], 3 mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_74ABC: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_35], al jnb short loc_74AED mov rax, [rbp+var_28] mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 setnz al mov [rbp+var_35], al loc_74AED: mov al, [rbp+var_35] test al, 1 jnz short loc_74AF6 jmp short loc_74B12 loc_74AF6: jmp short $+2 loc_74AF8: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_74ABC loc_74B12: mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp short loc_74B88 loc_74B27: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jle short loc_74B48 mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov [rbp+var_8], 1 jmp short loc_74B88 loc_74B48: mov rax, [rbp+var_28] mov rax, [rax+0B8h] mov rax, [rax+28h] mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] call rax mov [rbp+var_34], eax cmp [rbp+var_34], 0 jle short loc_74B7C movsxd rax, [rbp+var_34] mov [rbp+var_8], rax jmp short loc_74B88 loc_74B7C: jmp short $+2 loc_74B7E: jmp short $+2 loc_74B80: mov [rbp+var_8], 0 loc_74B88: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3) { bool v4; // [rsp+Bh] [rbp-35h] int v5; // [rsp+Ch] [rbp-34h] long long v6; // [rsp+10h] [rbp-30h] unsigned __int8 *i; // [rsp+30h] [rbp-10h] if ( (unsigned long long)a1 >= a2 ) return 0LL; if ( *a1 == 92 && (unsigned long long)(a1 + 2) < a2 && a1[1] == 117 && (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 ) { v6 = 3LL; for ( i = (unsigned __int8 *)(a1 + 3); ; ++i ) { v4 = 0; if ( (unsigned long long)i < a2 ) v4 = (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *i + 1LL) & 0x80) != 0; if ( !v4 ) break; ++v6; } *a3 = 0LL; return v6; } else if ( *a1 <= 0 ) { v5 = (*(long long ( **)(unsigned int *, _QWORD *, char *, unsigned long long))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46] + 40LL))( my_charset_utf8mb3_general_ci, a3, a1, a2); if ( v5 <= 0 ) return 0LL; else return v5; } else { *a3 = 0LL; return 1LL; } }
scan_one_character: 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 LEA RAX,[0x489cb0] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JC 0x00174a56 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00174b88 LAB_00174a56: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5c JNZ 0x00174b27 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JNC 0x00174b27 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x75 JNZ 0x00174b27 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 JZ 0x00174b27 MOV qword ptr [RBP + -0x30],0x3 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_00174abc: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x35],AL JNC 0x00174aed MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x35],AL LAB_00174aed: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x00174af6 JMP 0x00174b12 LAB_00174af6: JMP 0x00174af8 LAB_00174af8: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00174abc LAB_00174b12: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x00174b88 LAB_00174b27: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JLE 0x00174b48 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV qword ptr [RBP + -0x8],0x1 JMP 0x00174b88 LAB_00174b48: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JLE 0x00174b7c MOVSXD RAX,dword ptr [RBP + -0x34] MOV qword ptr [RBP + -0x8],RAX JMP 0x00174b88 LAB_00174b7c: JMP 0x00174b7e LAB_00174b7e: JMP 0x00174b80 LAB_00174b80: MOV qword ptr [RBP + -0x8],0x0 LAB_00174b88: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3) { int iVar1; bool bVar2; long local_38; byte *local_18; long local_10; if (param_1 < param_2) { if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) && ((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) { local_38 = 3; local_18 = param_1 + 3; while( true ) { bVar2 = false; if (local_18 < param_2) { bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) != 0; } if (!bVar2) break; local_18 = local_18 + 1; local_38 = local_38 + 1; } *param_3 = 0; local_10 = local_38; } else if ((char)*param_1 < '\x01') { iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28)) (my_charset_utf8mb3_general_ci,param_3,param_1,param_2); if (iVar1 < 1) { local_10 = 0; } else { local_10 = (long)iVar1; } } else { *param_3 = 0; local_10 = 1; } } else { local_10 = 0; } return local_10; }
36,054
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset()
monkey531[P]llama/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset(): pushq %rax movq %rdi, %rax movq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x58bf9 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x58aae popq %rax retq movq %rax, %rdi callq 0x20769
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi mov qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_58BF9 mov [rax+40h], rcx loc_58BF9: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI MOV qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x00158bf9 MOV qword ptr [RAX + 0x40],RCX LAB_00158bf9: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_00158c03: CALL 0x00158aae POP RAX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::reset() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 00158c03 to 00158c07 has its CatchHandler @ 00158c0a */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
36,055
GetPrevDirectoryPath
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
const char *GetPrevDirectoryPath(const char *dirPath) { static char prevDirPath[MAX_FILEPATH_LENGTH] = { 0 }; memset(prevDirPath, 0, MAX_FILEPATH_LENGTH); int pathLen = (int)strlen(dirPath); if (pathLen <= 3) strcpy(prevDirPath, dirPath); for (int i = (pathLen - 1); (i >= 0) && (pathLen > 3); i--) { if ((dirPath[i] == '\\') || (dirPath[i] == '/')) { // Check for root: "C:\" or "/" if (((i == 2) && (dirPath[1] ==':')) || (i == 0)) i++; strncpy(prevDirPath, dirPath, i); break; } } return prevDirPath; }
O0
c
GetPrevDirectoryPath: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) leaq 0x14b40d(%rip), %rdi # 0x21c990 xorl %esi, %esi movl $0x1000, %edx # imm = 0x1000 callq 0xa2d0 movq -0x8(%rbp), %rdi callq 0xa230 movl %eax, -0xc(%rbp) cmpl $0x3, -0xc(%rbp) jg 0xd15b1 movq -0x8(%rbp), %rsi leaq 0x14b3e4(%rip), %rdi # 0x21c990 callq 0xa4a0 movl -0xc(%rbp), %eax subl $0x1, %eax movl %eax, -0x10(%rbp) xorl %eax, %eax cmpl $0x0, -0x10(%rbp) movb %al, -0x11(%rbp) jl 0xd15cf cmpl $0x3, -0xc(%rbp) setg %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al testb $0x1, %al jne 0xd15d8 jmp 0xd1642 movq -0x8(%rbp), %rax movslq -0x10(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x5c, %eax je 0xd15fa movq -0x8(%rbp), %rax movslq -0x10(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0xd1632 cmpl $0x2, -0x10(%rbp) jne 0xd160d movq -0x8(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x3a, %eax je 0xd1613 cmpl $0x0, -0x10(%rbp) jne 0xd161c movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) movq -0x8(%rbp), %rsi movslq -0x10(%rbp), %rdx leaq 0x14b365(%rip), %rdi # 0x21c990 callq 0xa290 jmp 0xd1642 jmp 0xd1634 movl -0x10(%rbp), %eax addl $-0x1, %eax movl %eax, -0x10(%rbp) jmp 0xd15ba leaq 0x14b347(%rip), %rax # 0x21c990 addq $0x20, %rsp popq %rbp retq nop
GetPrevDirectoryPath: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi lea rdi, GetPrevDirectoryPath_prevDirPath xor esi, esi mov edx, 1000h call _memset mov rdi, [rbp+var_8] call _strlen mov [rbp+var_C], eax cmp [rbp+var_C], 3 jg short loc_D15B1 mov rsi, [rbp+var_8] lea rdi, GetPrevDirectoryPath_prevDirPath call _strcpy loc_D15B1: mov eax, [rbp+var_C] sub eax, 1 mov [rbp+var_10], eax loc_D15BA: xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_11], al jl short loc_D15CF cmp [rbp+var_C], 3 setnle al mov [rbp+var_11], al loc_D15CF: mov al, [rbp+var_11] test al, 1 jnz short loc_D15D8 jmp short loc_D1642 loc_D15D8: mov rax, [rbp+var_8] movsxd rcx, [rbp+var_10] movsx eax, byte ptr [rax+rcx] cmp eax, 5Ch ; '\' jz short loc_D15FA mov rax, [rbp+var_8] movsxd rcx, [rbp+var_10] movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_D1632 loc_D15FA: cmp [rbp+var_10], 2 jnz short loc_D160D mov rax, [rbp+var_8] movsx eax, byte ptr [rax+1] cmp eax, 3Ah ; ':' jz short loc_D1613 loc_D160D: cmp [rbp+var_10], 0 jnz short loc_D161C loc_D1613: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax loc_D161C: mov rsi, [rbp+var_8] movsxd rdx, [rbp+var_10] lea rdi, GetPrevDirectoryPath_prevDirPath call _strncpy jmp short loc_D1642 loc_D1632: jmp short $+2 loc_D1634: mov eax, [rbp+var_10] add eax, 0FFFFFFFFh mov [rbp+var_10], eax jmp loc_D15BA loc_D1642: lea rax, GetPrevDirectoryPath_prevDirPath add rsp, 20h pop rbp retn
void * GetPrevDirectoryPath(long long a1) { bool v2; // [rsp+Fh] [rbp-11h] int i; // [rsp+10h] [rbp-10h] int v4; // [rsp+14h] [rbp-Ch] memset(&GetPrevDirectoryPath_prevDirPath, 0LL, 4096LL); v4 = strlen(a1); if ( v4 <= 3 ) strcpy(&GetPrevDirectoryPath_prevDirPath, a1); for ( i = v4 - 1; ; --i ) { v2 = 0; if ( i >= 0 ) v2 = v4 > 3; if ( !v2 ) break; if ( *(_BYTE *)(a1 + i) == 92 || *(_BYTE *)(a1 + i) == 47 ) { if ( i == 2 && *(_BYTE *)(a1 + 1) == 58 || !i ) ++i; strncpy(&GetPrevDirectoryPath_prevDirPath, a1, i); return &GetPrevDirectoryPath_prevDirPath; } } return &GetPrevDirectoryPath_prevDirPath; }
GetPrevDirectoryPath: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x31c990] XOR ESI,ESI MOV EDX,0x1000 CALL 0x0010a2d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010a230 MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x3 JG 0x001d15b1 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x31c990] CALL 0x0010a4a0 LAB_001d15b1: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x1 MOV dword ptr [RBP + -0x10],EAX LAB_001d15ba: XOR EAX,EAX CMP dword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x11],AL JL 0x001d15cf CMP dword ptr [RBP + -0xc],0x3 SETG AL MOV byte ptr [RBP + -0x11],AL LAB_001d15cf: MOV AL,byte ptr [RBP + -0x11] TEST AL,0x1 JNZ 0x001d15d8 JMP 0x001d1642 LAB_001d15d8: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x5c JZ 0x001d15fa MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x001d1632 LAB_001d15fa: CMP dword ptr [RBP + -0x10],0x2 JNZ 0x001d160d MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x3a JZ 0x001d1613 LAB_001d160d: CMP dword ptr [RBP + -0x10],0x0 JNZ 0x001d161c LAB_001d1613: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX LAB_001d161c: MOV RSI,qword ptr [RBP + -0x8] MOVSXD RDX,dword ptr [RBP + -0x10] LEA RDI,[0x31c990] CALL 0x0010a290 JMP 0x001d1642 LAB_001d1632: JMP 0x001d1634 LAB_001d1634: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,-0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001d15ba LAB_001d1642: LEA RAX,[0x31c990] ADD RSP,0x20 POP RBP RET
int1 * GetPrevDirectoryPath(char *param_1) { int iVar1; int iVar2; size_t sVar3; int local_18; memset(GetPrevDirectoryPath_prevDirPath,0,0x1000); sVar3 = strlen(param_1); iVar2 = (int)sVar3; local_18 = iVar2; if (iVar2 < 4) { strcpy(GetPrevDirectoryPath_prevDirPath,param_1); } do { iVar1 = local_18; local_18 = iVar1 + -1; if (local_18 < 0 || iVar2 < 4) goto LAB_001d1642; } while ((param_1[local_18] != '\\') && (param_1[local_18] != '/')); if (((local_18 == 2) && (param_1[1] == ':')) || (local_18 == 0)) { local_18 = iVar1; } strncpy(GetPrevDirectoryPath_prevDirPath,param_1,(long)local_18); LAB_001d1642: return GetPrevDirectoryPath_prevDirPath; }
36,056
GetPrevDirectoryPath
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
const char *GetPrevDirectoryPath(const char *dirPath) { static char prevDirPath[MAX_FILEPATH_LENGTH] = { 0 }; memset(prevDirPath, 0, MAX_FILEPATH_LENGTH); int pathLen = (int)strlen(dirPath); if (pathLen <= 3) strcpy(prevDirPath, dirPath); for (int i = (pathLen - 1); (i >= 0) && (pathLen > 3); i--) { if ((dirPath[i] == '\\') || (dirPath[i] == '/')) { // Check for root: "C:\" or "/" if (((i == 2) && (dirPath[1] ==':')) || (i == 0)) i++; strncpy(prevDirPath, dirPath, i); break; } } return prevDirPath; }
O2
c
GetPrevDirectoryPath: pushq %rbx movq %rdi, %rbx leaq 0xc6001(%rip), %rdi # 0x1298f0 movl $0x1000, %edx # imm = 0x1000 xorl %esi, %esi callq 0x92c0 movq %rbx, %rdi callq 0x9210 cmpl $0x3, %eax jg 0x63918 leaq 0xc5fe1(%rip), %rdi # 0x1298f0 movq %rbx, %rsi popq %rbx jmp 0x94a0 andl $0x7fffffff, %eax # imm = 0x7FFFFFFF incq %rax leaq -0x1(%rax), %rcx testq %rcx, %rcx jle 0x63950 movzbl -0x2(%rbx,%rax), %edx cmpl $0x5c, %edx je 0x6393b movq %rcx, %rax cmpl $0x2f, %edx jne 0x63920 cmpl $0x1, %ecx je 0x6395c cmpl $0x3, %ecx jne 0x63959 cmpb $0x3a, 0x1(%rbx) je 0x6395c pushq $0x2 popq %rcx jmp 0x6395c leaq 0xc5f99(%rip), %rax # 0x1298f0 popq %rbx retq decq %rcx movl %ecx, %edx leaq 0xc5f8b(%rip), %rdi # 0x1298f0 movq %rbx, %rsi popq %rbx jmp 0x9280
GetPrevDirectoryPath: push rbx mov rbx, rdi lea rdi, GetPrevDirectoryPath_prevDirPath mov edx, 1000h xor esi, esi call _memset mov rdi, rbx call _strlen cmp eax, 3 jg short loc_63918 lea rdi, GetPrevDirectoryPath_prevDirPath mov rsi, rbx pop rbx jmp _strcpy loc_63918: and eax, 7FFFFFFFh inc rax loc_63920: lea rcx, [rax-1] test rcx, rcx jle short loc_63950 movzx edx, byte ptr [rbx+rax-2] cmp edx, 5Ch ; '\' jz short loc_6393B mov rax, rcx cmp edx, 2Fh ; '/' jnz short loc_63920 loc_6393B: cmp ecx, 1 jz short loc_6395C cmp ecx, 3 jnz short loc_63959 cmp byte ptr [rbx+1], 3Ah ; ':' jz short loc_6395C push 2 pop rcx jmp short loc_6395C loc_63950: lea rax, GetPrevDirectoryPath_prevDirPath pop rbx retn loc_63959: dec rcx loc_6395C: mov edx, ecx lea rdi, GetPrevDirectoryPath_prevDirPath mov rsi, rbx pop rbx jmp _strncpy
void * GetPrevDirectoryPath(long long a1) { int v1; // eax long long v3; // rax unsigned int v4; // ecx int v5; // edx memset(&GetPrevDirectoryPath_prevDirPath, 0LL, 4096LL); v1 = strlen(a1); if ( v1 <= 3 ) return (void *)strcpy(&GetPrevDirectoryPath_prevDirPath, a1); v3 = (v1 & 0x7FFFFFFF) + 1LL; do { v4 = v3 - 1; if ( v3 - 1 <= 0 ) return &GetPrevDirectoryPath_prevDirPath; v5 = *(unsigned __int8 *)(a1 + v3 - 2); if ( v5 == 92 ) break; --v3; } while ( v5 != 47 ); if ( v4 != 1 ) { if ( v4 == 3 ) { if ( *(_BYTE *)(a1 + 1) != 58 ) v4 = 2; } else { --v4; } } return (void *)strncpy(&GetPrevDirectoryPath_prevDirPath, a1, v4); }
GetPrevDirectoryPath: PUSH RBX MOV RBX,RDI LEA RDI,[0x2298f0] MOV EDX,0x1000 XOR ESI,ESI CALL 0x001092c0 MOV RDI,RBX CALL 0x00109210 CMP EAX,0x3 JG 0x00163918 LEA RDI,[0x2298f0] MOV RSI,RBX POP RBX JMP 0x001094a0 LAB_00163918: AND EAX,0x7fffffff INC RAX LAB_00163920: LEA RCX,[RAX + -0x1] TEST RCX,RCX JLE 0x00163950 MOVZX EDX,byte ptr [RBX + RAX*0x1 + -0x2] CMP EDX,0x5c JZ 0x0016393b MOV RAX,RCX CMP EDX,0x2f JNZ 0x00163920 LAB_0016393b: CMP ECX,0x1 JZ 0x0016395c CMP ECX,0x3 JNZ 0x00163959 CMP byte ptr [RBX + 0x1],0x3a JZ 0x0016395c PUSH 0x2 POP RCX JMP 0x0016395c LAB_00163950: LEA RAX,[0x2298f0] POP RBX RET LAB_00163959: DEC RCX LAB_0016395c: MOV EDX,ECX LEA RDI,[0x2298f0] MOV RSI,RBX POP RBX JMP 0x00109280
char * GetPrevDirectoryPath(char *param_1) { size_t sVar1; char *pcVar2; ulong uVar3; ulong uVar4; memset(GetPrevDirectoryPath_prevDirPath,0,0x1000); sVar1 = strlen(param_1); if ((int)(uint)sVar1 < 4) { pcVar2 = strcpy(GetPrevDirectoryPath_prevDirPath,param_1); return pcVar2; } uVar4 = (ulong)((uint)sVar1 & 0x7fffffff) + 1; do { uVar3 = uVar4; uVar4 = uVar3 - 1; if ((long)uVar4 < 1) { return GetPrevDirectoryPath_prevDirPath; } } while ((param_1[uVar3 - 2] != '\\') && (param_1[uVar3 - 2] != '/')); if ((int)uVar4 != 1) { if ((int)uVar4 == 3) { if (param_1[1] != ':') { uVar4 = 2; } } else { uVar4 = uVar3 - 2; } } pcVar2 = strncpy(GetPrevDirectoryPath_prevDirPath,param_1,uVar4 & 0xffffffff); return pcVar2; }
36,057
GetPrevDirectoryPath
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
const char *GetPrevDirectoryPath(const char *dirPath) { static char prevDirPath[MAX_FILEPATH_LENGTH] = { 0 }; memset(prevDirPath, 0, MAX_FILEPATH_LENGTH); int pathLen = (int)strlen(dirPath); if (pathLen <= 3) strcpy(prevDirPath, dirPath); for (int i = (pathLen - 1); (i >= 0) && (pathLen > 3); i--) { if ((dirPath[i] == '\\') || (dirPath[i] == '/')) { // Check for root: "C:\" or "/" if (((i == 2) && (dirPath[1] ==':')) || (i == 0)) i++; strncpy(prevDirPath, dirPath, i); break; } } return prevDirPath; }
O3
c
GetPrevDirectoryPath: pushq %rbx movq %rdi, %rbx leaq 0xc7a73(%rip), %rdi # 0x13d8d0 movl $0x1000, %edx # imm = 0x1000 xorl %esi, %esi callq 0xa2d0 movq %rbx, %rdi callq 0xa230 cmpl $0x3, %eax jg 0x75e86 leaq 0xc7a53(%rip), %rdi # 0x13d8d0 movq %rbx, %rsi popq %rbx jmp 0xa4b0 andl $0x7fffffff, %eax # imm = 0x7FFFFFFF incq %rax leaq -0x1(%rax), %rcx testq %rcx, %rcx jle 0x75ec0 movzbl -0x2(%rbx,%rax), %edx cmpl $0x5c, %edx je 0x75ea9 movq %rcx, %rax cmpl $0x2f, %edx jne 0x75e8e cmpl $0x1, %ecx je 0x75ecc cmpl $0x3, %ecx jne 0x75ec9 movl $0x2, %eax cmpb $0x3a, 0x1(%rbx) je 0x75ecc jmp 0x75ecf leaq 0xc7a09(%rip), %rax # 0x13d8d0 popq %rbx retq decq %rcx movq %rcx, %rax movl %eax, %edx leaq 0xc79f8(%rip), %rdi # 0x13d8d0 movq %rbx, %rsi popq %rbx jmp 0xa290
GetPrevDirectoryPath: push rbx mov rbx, rdi lea rdi, GetPrevDirectoryPath_prevDirPath mov edx, 1000h xor esi, esi call _memset mov rdi, rbx call _strlen cmp eax, 3 jg short loc_75E86 lea rdi, GetPrevDirectoryPath_prevDirPath mov rsi, rbx pop rbx jmp _strcpy loc_75E86: and eax, 7FFFFFFFh inc rax loc_75E8E: lea rcx, [rax-1] test rcx, rcx jle short loc_75EC0 movzx edx, byte ptr [rbx+rax-2] cmp edx, 5Ch ; '\' jz short loc_75EA9 mov rax, rcx cmp edx, 2Fh ; '/' jnz short loc_75E8E loc_75EA9: cmp ecx, 1 jz short loc_75ECC cmp ecx, 3 jnz short loc_75EC9 mov eax, 2 cmp byte ptr [rbx+1], 3Ah ; ':' jz short loc_75ECC jmp short loc_75ECF loc_75EC0: lea rax, GetPrevDirectoryPath_prevDirPath pop rbx retn loc_75EC9: dec rcx loc_75ECC: mov rax, rcx loc_75ECF: mov edx, eax lea rdi, GetPrevDirectoryPath_prevDirPath mov rsi, rbx pop rbx jmp _strncpy
void * GetPrevDirectoryPath(long long a1) { int v1; // eax long long v3; // rax unsigned int v4; // ecx int v5; // edx unsigned int v6; // eax memset(&GetPrevDirectoryPath_prevDirPath, 0LL, 4096LL); v1 = strlen(a1); if ( v1 <= 3 ) return (void *)strcpy(&GetPrevDirectoryPath_prevDirPath, a1); v3 = (v1 & 0x7FFFFFFF) + 1LL; do { v4 = v3 - 1; if ( v3 - 1 <= 0 ) return &GetPrevDirectoryPath_prevDirPath; v5 = *(unsigned __int8 *)(a1 + v3 - 2); if ( v5 == 92 ) break; --v3; } while ( v5 != 47 ); if ( v4 != 1 ) { if ( v4 == 3 ) { v6 = 2; if ( *(_BYTE *)(a1 + 1) != 58 ) return (void *)strncpy(&GetPrevDirectoryPath_prevDirPath, a1, v6); } else { --v4; } } v6 = v4; return (void *)strncpy(&GetPrevDirectoryPath_prevDirPath, a1, v6); }
GetPrevDirectoryPath: PUSH RBX MOV RBX,RDI LEA RDI,[0x23d8d0] MOV EDX,0x1000 XOR ESI,ESI CALL 0x0010a2d0 MOV RDI,RBX CALL 0x0010a230 CMP EAX,0x3 JG 0x00175e86 LEA RDI,[0x23d8d0] MOV RSI,RBX POP RBX JMP 0x0010a4b0 LAB_00175e86: AND EAX,0x7fffffff INC RAX LAB_00175e8e: LEA RCX,[RAX + -0x1] TEST RCX,RCX JLE 0x00175ec0 MOVZX EDX,byte ptr [RBX + RAX*0x1 + -0x2] CMP EDX,0x5c JZ 0x00175ea9 MOV RAX,RCX CMP EDX,0x2f JNZ 0x00175e8e LAB_00175ea9: CMP ECX,0x1 JZ 0x00175ecc CMP ECX,0x3 JNZ 0x00175ec9 MOV EAX,0x2 CMP byte ptr [RBX + 0x1],0x3a JZ 0x00175ecc JMP 0x00175ecf LAB_00175ec0: LEA RAX,[0x23d8d0] POP RBX RET LAB_00175ec9: DEC RCX LAB_00175ecc: MOV RAX,RCX LAB_00175ecf: MOV EDX,EAX LEA RDI,[0x23d8d0] MOV RSI,RBX POP RBX JMP 0x0010a290
char * GetPrevDirectoryPath(char *param_1) { uint uVar1; size_t sVar2; char *pcVar3; long lVar4; long lVar5; memset(GetPrevDirectoryPath_prevDirPath,0,0x1000); sVar2 = strlen(param_1); if ((int)(uint)sVar2 < 4) { pcVar3 = strcpy(GetPrevDirectoryPath_prevDirPath,param_1); return pcVar3; } lVar5 = (ulong)((uint)sVar2 & 0x7fffffff) + 1; do { lVar4 = lVar5; lVar5 = lVar4 + -1; if (lVar5 < 1) { return GetPrevDirectoryPath_prevDirPath; } } while ((param_1[lVar4 + -2] != '\\') && (param_1[lVar4 + -2] != '/')); if ((int)lVar5 != 1) { if ((int)lVar5 == 3) { uVar1 = 2; if (param_1[1] != ':') goto LAB_00175ecf; } else { lVar5 = lVar4 + -2; } } uVar1 = (uint)lVar5; LAB_00175ecf: pcVar3 = strncpy(GetPrevDirectoryPath_prevDirPath,param_1,(ulong)uVar1); return pcVar3; }
36,058
mi_get_status
eloqsql/storage/myisam/mi_locking.c
my_bool mi_get_status(void* param, my_bool concurrent_insert) { MI_INFO *info=(MI_INFO*) param; DBUG_ENTER("mi_get_status"); DBUG_PRINT("info",("name: %s key_file: %lu data_file: %lu rows: %lu concurrent_insert: %d", info->s->index_file_name, (ulong) info->s->state.state.key_file_length, (ulong) info->s->state.state.data_file_length, (ulong) info->s->state.state.records, concurrent_insert)); #ifndef DBUG_OFF if (info->state->key_file_length > info->s->state.state.key_file_length || info->state->data_file_length > info->s->state.state.data_file_length) DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); #endif info->save_state=info->s->state.state; info->state= &info->save_state; info->append_insert_at_end= concurrent_insert; if (concurrent_insert) info->s->state.state.uncacheable= TRUE; DBUG_RETURN(0); }
O0
c
mi_get_status: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0xb210c movq -0x18(%rbp), %rdi addq $0x10, %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi addq $0x18, %rsi movl $0x38, %edx callq 0x2a0b0 movq -0x18(%rbp), %rcx addq $0x10, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) movb -0x9(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, 0x33a(%rax) cmpb $0x0, -0x9(%rbp) je 0xb2157 movq -0x18(%rbp), %rax movq (%rax), %rax movb $0x1, 0x4c(%rax) jmp 0xb2159 jmp 0xb215b xorl %eax, %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mi_get_status: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov rax, [rbp+var_8] mov [rbp+var_18], rax jmp short $+2 loc_B210C: mov rdi, [rbp+var_18] add rdi, 10h mov rax, [rbp+var_18] mov rsi, [rax] add rsi, 18h mov edx, 38h ; '8' call _memcpy mov rcx, [rbp+var_18] add rcx, 10h mov rax, [rbp+var_18] mov [rax+8], rcx mov cl, [rbp+var_9] mov rax, [rbp+var_18] mov [rax+33Ah], cl cmp [rbp+var_9], 0 jz short loc_B2157 mov rax, [rbp+var_18] mov rax, [rax] mov byte ptr [rax+4Ch], 1 loc_B2157: jmp short $+2 loc_B2159: jmp short $+2 loc_B215B: xor eax, eax add rsp, 20h pop rbp retn
long long mi_get_status(long long a1, char a2) { memcpy(a1 + 16, *(_QWORD *)a1 + 24LL, 56LL); *(_QWORD *)(a1 + 8) = a1 + 16; *(_BYTE *)(a1 + 826) = a2; if ( a2 ) *(_BYTE *)(*(_QWORD *)a1 + 76LL) = 1; return 0LL; }
mi_get_status: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x001b210c LAB_001b210c: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x10 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] ADD RSI,0x18 MOV EDX,0x38 CALL 0x0012a0b0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x10 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV CL,byte ptr [RBP + -0x9] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x33a],CL CMP byte ptr [RBP + -0x9],0x0 JZ 0x001b2157 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX + 0x4c],0x1 LAB_001b2157: JMP 0x001b2159 LAB_001b2159: JMP 0x001b215b LAB_001b215b: XOR EAX,EAX ADD RSP,0x20 POP RBP RET
int8 mi_get_status(long *param_1,char param_2) { memcpy(param_1 + 2,(void *)(*param_1 + 0x18),0x38); param_1[1] = (long)(param_1 + 2); *(char *)((long)param_1 + 0x33a) = param_2; if (param_2 != '\0') { *(int1 *)(*param_1 + 0x4c) = 1; } return 0; }
36,059
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512])
monkey531[P]llama/common/common.cpp
bool parse_cpu_range(const std::string & range, bool (&boolmask)[GGML_MAX_N_THREADS]) { size_t dash_loc = range.find('-'); if (dash_loc == std::string::npos) { LOG_ERR("Format of CPU range is invalid! Expected [<start>]-[<end>].\n"); return false; } size_t start_i; size_t end_i; if (dash_loc == 0) { start_i = 0; } else { start_i = std::stoull(range.substr(0, dash_loc)); if (start_i >= GGML_MAX_N_THREADS) { LOG_ERR("Start index out of bounds!\n"); return false; } } if (dash_loc == range.length() - 1) { end_i = GGML_MAX_N_THREADS - 1; } else { end_i = std::stoull(range.substr(dash_loc + 1)); if (end_i >= GGML_MAX_N_THREADS) { LOG_ERR("End index out of bounds!\n"); return false; } } for (size_t i = start_i; i <= end_i; i++) { boolmask[i] = true; } return true; }
O3
cpp
parse_cpu_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (&) [512]): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %rbx movq %rdi, %r15 movl $0x2d, %esi xorl %edx, %edx callq 0x1ab50 movq %rax, %r12 testq %rax, %rax je 0x7198e cmpq $-0x1, %r12 jne 0x7199b leaq 0xbbab4(%rip), %rax # 0x12d428 cmpl $0x0, (%rax) js 0x71b4c callq 0xcbf1f leaq 0x7d926(%rip), %rdx # 0xef2af jmp 0x71b14 movq %rbx, 0x10(%rsp) movq %r12, %r14 jmp 0x71a55 movq %rbx, 0x10(%rsp) leaq 0x18(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movq %r12, %rcx callq 0x1a940 movq (%r14), %rbp callq 0x1a060 movq %rax, %r13 movl (%rax), %eax movl %eax, 0x4(%rsp) movl $0x0, (%r13) leaq 0x8(%rsp), %rbx movq %rbp, %rdi movq %rbx, %rsi movl $0xa, %edx callq 0x1ab80 cmpq %rbp, (%rbx) je 0x71b5f movq %rax, %r14 movl (%r13), %eax testl %eax, %eax je 0x71a08 cmpl $0x22, %eax jne 0x71a10 leaq 0x7e46d(%rip), %rdi # 0xefe70 callq 0x1acd0 movl 0x4(%rsp), %eax movl %eax, (%r13) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x71a2b movq 0x28(%rsp), %rsi incq %rsi callq 0x1a8f0 cmpq $0x200, %r14 # imm = 0x200 jb 0x71a55 leaq 0xbb9ed(%rip), %rax # 0x12d428 cmpl $0x0, (%rax) js 0x71b4c callq 0xcbf1f leaq 0x7d89c(%rip), %rdx # 0xef2ec jmp 0x71b14 movq 0x8(%r15), %rax decq %rax movl $0x1ff, %r13d # imm = 0x1FF cmpq %rax, %r12 je 0x71b27 incq %r12 leaq 0x18(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq $-0x1, %rcx callq 0x1a940 movq (%rbx), %rbx callq 0x1a060 movq %rax, %r15 movl (%rax), %ebp movl $0x0, (%rax) leaq 0x8(%rsp), %r12 movq %rbx, %rdi movq %r12, %rsi movl $0xa, %edx callq 0x1ab80 cmpq %rbx, (%r12) je 0x71b6b movq %rax, %r13 movl (%r15), %eax testl %eax, %eax je 0x71ad5 cmpl $0x22, %eax jne 0x71ad8 leaq 0x7e3a0(%rip), %rdi # 0xefe70 callq 0x1acd0 movl %ebp, (%r15) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x71af3 movq 0x28(%rsp), %rsi incq %rsi callq 0x1a8f0 cmpq $0x200, %r13 # imm = 0x200 jb 0x71b27 leaq 0xbb925(%rip), %rax # 0x12d428 cmpl $0x0, (%rax) js 0x71b4c callq 0xcbf1f leaq 0x7d7f4(%rip), %rdx # 0xef308 xorl %ebp, %ebp movq %rax, %rdi movl $0x4, %esi xorl %eax, %eax callq 0xcbfbc jmp 0x71b4e movb $0x1, %bpl cmpq %r13, %r14 ja 0x71b4e movq 0x10(%rsp), %rdi addq %r14, %rdi subq %r14, %r13 incq %r13 movl $0x1, %esi movq %r13, %rdx callq 0x1a500 jmp 0x71b4e xorl %ebp, %ebp movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x7e30a(%rip), %rdi # 0xefe70 callq 0x1a560 leaq 0x7e2fe(%rip), %rdi # 0xefe70 callq 0x1a560 movq %rax, %rbx cmpl $0x0, (%r15) jne 0x71b83 movl %ebp, (%r15) leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x1ba10 jmp 0x71bb5 movq %rax, %rbx cmpl $0x0, (%r13) jne 0x71ba6 movl 0x4(%rsp), %eax movl %eax, (%r13) leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x1ba2d movq %rbx, %rdi callq 0x1afb0
_Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rsi mov r15, rdi mov esi, 2Dh ; '-' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r12, rax test rax, rax jz short loc_7198E cmp r12, 0FFFFFFFFFFFFFFFFh jnz short loc_7199B lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_71B4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aFormatOfCpuRan; "Format of CPU range is invalid! Expecte"... jmp loc_71B14 loc_7198E: mov [rsp+68h+var_58], rbx mov r14, r12 jmp loc_71A55 loc_7199B: mov [rsp+68h+var_58], rbx lea r14, [rsp+68h+var_50] mov rdi, r14 mov rsi, r15 xor edx, edx mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rbp, [r14] call ___errno_location mov r13, rax mov eax, [rax] mov [rsp+68h+var_64], eax mov dword ptr [r13+0], 0 lea rbx, [rsp+68h+var_60] mov rdi, rbp mov rsi, rbx mov edx, 0Ah call _strtoull cmp [rbx], rbp jz loc_71B5F mov r14, rax mov eax, [r13+0] test eax, eax jz short loc_71A08 cmp eax, 22h ; '"' jnz short loc_71A10 lea rdi, aStoull; "stoull" call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*) loc_71A08: mov eax, [rsp+68h+var_64] mov [r13+0], eax loc_71A10: lea rax, [rsp+68h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_71A2B mov rsi, [rsp+68h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71A2B: cmp r14, 200h jb short loc_71A55 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_71B4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aStartIndexOutO; "Start index out of bounds!\n" jmp loc_71B14 loc_71A55: mov rax, [r15+8] dec rax mov r13d, 1FFh cmp r12, rax jz loc_71B27 inc r12 lea rbx, [rsp+68h+var_50] mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rbx, [rbx] call ___errno_location mov r15, rax mov ebp, [rax] mov dword ptr [rax], 0 lea r12, [rsp+68h+var_60] mov rdi, rbx mov rsi, r12 mov edx, 0Ah call _strtoull cmp [r12], rbx jz loc_71B6B mov r13, rax mov eax, [r15] test eax, eax jz short loc_71AD5 cmp eax, 22h ; '"' jnz short loc_71AD8 lea rdi, aStoull; "stoull" call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*) loc_71AD5: mov [r15], ebp loc_71AD8: lea rax, [rsp+68h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_71AF3 mov rsi, [rsp+68h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71AF3: cmp r13, 200h jb short loc_71B27 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_71B4C call _Z15common_log_mainv; common_log_main(void) lea rdx, aEndIndexOutOfB; "End index out of bounds!\n" loc_71B14: xor ebp, ebp mov rdi, rax mov esi, 4 xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp short loc_71B4E loc_71B27: mov bpl, 1 cmp r14, r13 ja short loc_71B4E mov rdi, [rsp+68h+var_58] add rdi, r14 sub r13, r14 inc r13 mov esi, 1 mov rdx, r13 call _memset jmp short loc_71B4E loc_71B4C: xor ebp, ebp loc_71B4E: mov eax, ebp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_71B5F: lea rdi, aStoull; "stoull" call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*) loc_71B6B: lea rdi, aStoull; "stoull" call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*) mov rbx, rax cmp dword ptr [r15], 0 jnz short loc_71B83 mov [r15], ebp loc_71B83: lea rdi, [rsp+68h+var_60] lea rsi, [rsp+68h+var_50] call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_1; parse_cpu_range(std::string const&,bool (&)[512]) [clone] jmp short loc_71BB5 mov rbx, rax cmp dword ptr [r13+0], 0 jnz short loc_71BA6 mov eax, [rsp+68h+var_64] mov [r13+0], eax loc_71BA6: lea rdi, [rsp+68h+var_60] lea rsi, [rsp+68h+var_50] call _Z15parse_cpu_rangeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA512_b_cold_2; parse_cpu_range(std::string const&,bool (&)[512]) [clone] loc_71BB5: mov rdi, rbx call __Unwind_Resume
long long parse_cpu_range(long long a1, long long a2, double a3) { void *v3; // rbp _DWORD *v4; // r15 long long v5; // rax long long v6; // r12 int v7; // eax int v8; // ecx int v9; // r8d int v10; // r9d const char *v11; // rdx unsigned long long v12; // r14 int *v13; // r13 long long v14; // rax unsigned long long v15; // r13 void *v16; // rbx long long v17; // rax long long v19; // rbx int v20; // [rsp+4h] [rbp-64h] void *v21; // [rsp+8h] [rbp-60h] BYREF long long v22; // [rsp+10h] [rbp-58h] void *v23[2]; // [rsp+18h] [rbp-50h] BYREF _QWORD v24[8]; // [rsp+28h] [rbp-40h] BYREF v4 = (_DWORD *)a1; v5 = std::string::find(a1, 45LL, 0LL); v6 = v5; if ( v5 ) { if ( v5 == -1 ) { if ( common_log_verbosity_thold >= 0 ) { v7 = common_log_main(); v11 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n"; LABEL_27: LODWORD(v3) = 0; common_log_add(v7, 4, (_DWORD)v11, v8, v9, v10); return (unsigned int)v3; } goto LABEL_30; } v22 = a2; std::string::substr(v23, a1, 0LL, v5); v3 = v23[0]; v13 = (int *)__errno_location(a3); v20 = *v13; *v13 = 0; v14 = strtoull(v3, &v21, 10LL); if ( v21 == v3 ) { std::__throw_invalid_argument("stoull"); goto LABEL_33; } v12 = v14; if ( *v13 ) { if ( *v13 == 34 ) std::__throw_out_of_range("stoull"); } else { *v13 = v20; } if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); if ( v12 >= 0x200 ) { if ( common_log_verbosity_thold >= 0 ) { v7 = common_log_main(); v11 = "Start index out of bounds!\n"; goto LABEL_27; } LABEL_30: LODWORD(v3) = 0; return (unsigned int)v3; } } else { v22 = a2; v12 = 0LL; } v15 = 511LL; if ( v6 == *(_QWORD *)(a1 + 8) - 1LL ) goto LABEL_28; std::string::substr(v23, a1, v6 + 1, -1LL); v16 = v23[0]; v4 = (_DWORD *)__errno_location(a3); LODWORD(v3) = *v4; *v4 = 0; v17 = strtoull(v16, &v21, 10LL); if ( v21 == v16 ) { LABEL_33: v19 = std::__throw_invalid_argument("stoull"); if ( !*v4 ) *v4 = (_DWORD)v3; parse_cpu_range((long long)&v21, v23); _Unwind_Resume(v19); } v15 = v17; if ( *v4 ) { if ( *v4 == 34 ) std::__throw_out_of_range("stoull"); } else { *v4 = (_DWORD)v3; } if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); if ( v15 >= 0x200 ) { if ( common_log_verbosity_thold >= 0 ) { v7 = common_log_main(); v11 = "End index out of bounds!\n"; goto LABEL_27; } goto LABEL_30; } LABEL_28: LOBYTE(v3) = 1; if ( v12 <= v15 ) memset(v12 + v22, 1LL, v15 - v12 + 1); return (unsigned int)v3; }
parse_cpu_range: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RSI MOV R15,RDI MOV ESI,0x2d XOR EDX,EDX CALL 0x0011ab50 MOV R12,RAX TEST RAX,RAX JZ 0x0017198e CMP R12,-0x1 JNZ 0x0017199b LEA RAX,[0x22d428] CMP dword ptr [RAX],0x0 JS 0x00171b4c CALL 0x001cbf1f LEA RDX,[0x1ef2af] JMP 0x00171b14 LAB_0017198e: MOV qword ptr [RSP + 0x10],RBX MOV R14,R12 JMP 0x00171a55 LAB_0017199b: MOV qword ptr [RSP + 0x10],RBX LEA R14,[RSP + 0x18] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV RCX,R12 CALL 0x0011a940 MOV RBP,qword ptr [R14] CALL 0x0011a060 MOV R13,RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x4],EAX MOV dword ptr [R13],0x0 LEA RBX,[RSP + 0x8] MOV RDI,RBP MOV RSI,RBX MOV EDX,0xa CALL 0x0011ab80 CMP qword ptr [RBX],RBP JZ 0x00171b5f MOV R14,RAX MOV EAX,dword ptr [R13] TEST EAX,EAX JZ 0x00171a08 CMP EAX,0x22 JNZ 0x00171a10 LAB_001719fc: LEA RDI,[0x1efe70] CALL 0x0011acd0 LAB_00171a08: MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [R13],EAX LAB_00171a10: LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00171a2b MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011a8f0 LAB_00171a2b: CMP R14,0x200 JC 0x00171a55 LEA RAX,[0x22d428] CMP dword ptr [RAX],0x0 JS 0x00171b4c CALL 0x001cbf1f LEA RDX,[0x1ef2ec] JMP 0x00171b14 LAB_00171a55: MOV RAX,qword ptr [R15 + 0x8] DEC RAX MOV R13D,0x1ff CMP R12,RAX JZ 0x00171b27 INC R12 LEA RBX,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV RCX,-0x1 CALL 0x0011a940 MOV RBX,qword ptr [RBX] CALL 0x0011a060 MOV R15,RAX MOV EBP,dword ptr [RAX] MOV dword ptr [RAX],0x0 LEA R12,[RSP + 0x8] MOV RDI,RBX MOV RSI,R12 MOV EDX,0xa CALL 0x0011ab80 CMP qword ptr [R12],RBX JZ 0x00171b6b MOV R13,RAX MOV EAX,dword ptr [R15] TEST EAX,EAX JZ 0x00171ad5 CMP EAX,0x22 JNZ 0x00171ad8 LAB_00171ac9: LEA RDI,[0x1efe70] CALL 0x0011acd0 LAB_00171ad5: MOV dword ptr [R15],EBP LAB_00171ad8: LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00171af3 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011a8f0 LAB_00171af3: CMP R13,0x200 JC 0x00171b27 LEA RAX,[0x22d428] CMP dword ptr [RAX],0x0 JS 0x00171b4c CALL 0x001cbf1f LEA RDX,[0x1ef308] LAB_00171b14: XOR EBP,EBP MOV RDI,RAX MOV ESI,0x4 XOR EAX,EAX CALL 0x001cbfbc JMP 0x00171b4e LAB_00171b27: MOV BPL,0x1 CMP R14,R13 JA 0x00171b4e MOV RDI,qword ptr [RSP + 0x10] ADD RDI,R14 SUB R13,R14 INC R13 MOV ESI,0x1 MOV RDX,R13 CALL 0x0011a500 JMP 0x00171b4e LAB_00171b4c: XOR EBP,EBP LAB_00171b4e: MOV EAX,EBP ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00171b5f: LEA RDI,[0x1efe70] CALL 0x0011a560 LAB_00171b6b: LEA RDI,[0x1efe70] CALL 0x0011a560 LAB_00171b77: MOV RBX,RAX CMP dword ptr [R15],0x0 JNZ 0x00171b83 MOV dword ptr [R15],EBP LAB_00171b83: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x18] CALL 0x0011ba10 JMP 0x00171bb5 LAB_00171bb5: MOV RDI,RBX CALL 0x0011afb0
/* parse_cpu_range(std::__cxx11::string const&, bool (&) [512]) */ ulong parse_cpu_range(string *param_1,bool *param_2) { int iVar1; uint uVar2; long *__nptr; long lVar3; int8 uVar4; int *piVar5; ulong uVar6; char *pcVar7; long *unaff_RBP; ulong uVar8; ulonglong uVar9; long *local_60; bool *local_58; long *local_50 [2]; long local_40 [2]; lVar3 = std::__cxx11::string::find((char)param_1,0x2d); if (lVar3 == 0) { uVar6 = 0; local_58 = param_2; LAB_00171a55: uVar9 = 0x1ff; if (lVar3 != *(long *)(param_1 + 8) + -1) { std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); __nptr = local_50[0]; param_1 = (string *)__errno_location(); uVar2 = *(uint *)param_1; unaff_RBP = (long *)(ulong)uVar2; *(uint *)param_1 = 0; uVar9 = strtoull((char *)__nptr,(char **)&local_60,10); if (local_60 == __nptr) { LAB_00171b6b: /* try { // try from 00171b6b to 00171b76 has its CatchHandler @ 00171b77 */ uVar4 = std::__throw_invalid_argument("stoull"); /* catch() { ... } // from try @ 00171ac9 with catch @ 00171b77 catch() { ... } // from try @ 00171b6b with catch @ 00171b77 */ if (*(uint *)param_1 == 0) { *(uint *)param_1 = (uint)unaff_RBP; } parse_cpu_range((string *)&local_60,(bool *)local_50); /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar4); } if (*(uint *)param_1 == 0) { LAB_00171ad5: *(uint *)param_1 = uVar2; } else if (*(uint *)param_1 == 0x22) { /* try { // try from 00171ac9 to 00171ad4 has its CatchHandler @ 00171b77 */ std::__throw_out_of_range("stoull"); goto LAB_00171ad5; } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (0x1ff < uVar9) { if (common_log_verbosity_thold < 0) goto LAB_00171b4c; uVar4 = common_log_main(); pcVar7 = "End index out of bounds!\n"; goto LAB_00171b14; } } uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); if (uVar6 <= uVar9) { memset(local_58 + uVar6,1,(uVar9 - uVar6) + 1); } } else { if (lVar3 == -1) { if (common_log_verbosity_thold < 0) { LAB_00171b4c: uVar8 = 0; goto LAB_00171b4e; } uVar4 = common_log_main(); pcVar7 = "Format of CPU range is invalid! Expected [<start>]-[<end>].\n"; } else { local_58 = param_2; std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); unaff_RBP = local_50[0]; piVar5 = __errno_location(); iVar1 = *piVar5; *piVar5 = 0; uVar6 = strtoull((char *)unaff_RBP,(char **)&local_60,10); if (local_60 == unaff_RBP) { /* try { // try from 00171b5f to 00171b6a has its CatchHandler @ 00171b94 */ std::__throw_invalid_argument("stoull"); goto LAB_00171b6b; } if (*piVar5 == 0) { LAB_00171a08: *piVar5 = iVar1; } else if (*piVar5 == 0x22) { /* try { // try from 001719fc to 00171a07 has its CatchHandler @ 00171b94 */ std::__throw_out_of_range("stoull"); goto LAB_00171a08; } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (uVar6 < 0x200) goto LAB_00171a55; if (common_log_verbosity_thold < 0) goto LAB_00171b4c; uVar4 = common_log_main(); pcVar7 = "Start index out of bounds!\n"; } LAB_00171b14: uVar8 = 0; common_log_add(uVar4,4,pcVar7); } LAB_00171b4e: return uVar8 & 0xffffffff; }
36,060
stbi__vertical_flip(void*, int, int, int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) { int row; size_t bytes_per_row = (size_t)w * bytes_per_pixel; stbi_uc temp[2048]; stbi_uc *bytes = (stbi_uc *)image; for (row = 0; row < (h>>1); row++) { stbi_uc *row0 = bytes + row*bytes_per_row; stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; // swap row0 with row1 size_t bytes_left = bytes_per_row; while (bytes_left) { size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); memcpy(temp, row0, bytes_copy); memcpy(row0, row1, bytes_copy); memcpy(row1, temp, bytes_copy); row0 += bytes_copy; row1 += bytes_copy; bytes_left -= bytes_copy; } } }
O0
c
stbi__vertical_flip(void*, int, int, int): subq $0x858, %rsp # imm = 0x858 movq %rdi, 0x850(%rsp) movl %esi, 0x84c(%rsp) movl %edx, 0x848(%rsp) movl %ecx, 0x844(%rsp) movslq 0x84c(%rsp), %rax movslq 0x844(%rsp), %rcx imulq %rcx, %rax movq %rax, 0x838(%rsp) movq 0x850(%rsp), %rax movq %rax, 0x28(%rsp) movl $0x0, 0x840(%rsp) movl 0x840(%rsp), %eax movl 0x848(%rsp), %ecx sarl %ecx cmpl %ecx, %eax jge 0x14244 movq 0x28(%rsp), %rax movslq 0x840(%rsp), %rcx imulq 0x838(%rsp), %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rax movl 0x848(%rsp), %ecx subl 0x840(%rsp), %ecx subl $0x1, %ecx movslq %ecx, %rcx imulq 0x838(%rsp), %rcx addq %rcx, %rax movq %rax, 0x18(%rsp) movq 0x838(%rsp), %rax movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) je 0x1422c cmpq $0x800, 0x10(%rsp) # imm = 0x800 jae 0x141a7 movq 0x10(%rsp), %rax movq %rax, (%rsp) jmp 0x141b2 movl $0x800, %eax # imm = 0x800 movq %rax, (%rsp) jmp 0x141b2 movq (%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0xb600 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0xb600 movq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0xb600 movq 0x8(%rsp), %rax addq 0x20(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x8(%rsp), %rax addq 0x18(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax subq %rcx, %rax movq %rax, 0x10(%rsp) jmp 0x14185 jmp 0x1422e movl 0x840(%rsp), %eax addl $0x1, %eax movl %eax, 0x840(%rsp) jmp 0x14118 addq $0x858, %rsp # imm = 0x858 retq nopl (%rax)
_ZL19stbi__vertical_flipPviii: sub rsp, 858h mov [rsp+858h+var_8], rdi mov [rsp+858h+var_C], esi mov [rsp+858h+var_10], edx mov [rsp+858h+var_14], ecx movsxd rax, [rsp+858h+var_C] movsxd rcx, [rsp+858h+var_14] imul rax, rcx mov [rsp+858h+var_20], rax mov rax, [rsp+858h+var_8] mov [rsp+858h+var_830], rax mov [rsp+858h+var_18], 0 loc_14118: mov eax, [rsp+858h+var_18] mov ecx, [rsp+858h+var_10] sar ecx, 1 cmp eax, ecx jge loc_14244 mov rax, [rsp+858h+var_830] movsxd rcx, [rsp+858h+var_18] imul rcx, [rsp+858h+var_20] add rax, rcx mov [rsp+858h+var_838], rax mov rax, [rsp+858h+var_830] mov ecx, [rsp+858h+var_10] sub ecx, [rsp+858h+var_18] sub ecx, 1 movsxd rcx, ecx imul rcx, [rsp+858h+var_20] add rax, rcx mov [rsp+858h+var_840], rax mov rax, [rsp+858h+var_20] mov [rsp+858h+var_848], rax loc_14185: cmp [rsp+858h+var_848], 0 jz loc_1422C cmp [rsp+858h+var_848], 800h jnb short loc_141A7 mov rax, [rsp+858h+var_848] mov [rsp+858h+var_858], rax jmp short loc_141B2 loc_141A7: mov eax, 800h mov [rsp+858h+var_858], rax jmp short $+2 loc_141B2: mov rax, [rsp+858h+var_858] mov [rsp+858h+var_850], rax lea rdi, [rsp+858h+var_828] mov rsi, [rsp+858h+var_838] mov rdx, [rsp+858h+var_850] call _memcpy mov rdi, [rsp+858h+var_838] mov rsi, [rsp+858h+var_840] mov rdx, [rsp+858h+var_850] call _memcpy mov rdi, [rsp+858h+var_840] lea rsi, [rsp+858h+var_828] mov rdx, [rsp+858h+var_850] call _memcpy mov rax, [rsp+858h+var_850] add rax, [rsp+858h+var_838] mov [rsp+858h+var_838], rax mov rax, [rsp+858h+var_850] add rax, [rsp+858h+var_840] mov [rsp+858h+var_840], rax mov rcx, [rsp+858h+var_850] mov rax, [rsp+858h+var_848] sub rax, rcx mov [rsp+858h+var_848], rax jmp loc_14185 loc_1422C: jmp short $+2 loc_1422E: mov eax, [rsp+858h+var_18] add eax, 1 mov [rsp+858h+var_18], eax jmp loc_14118 loc_14244: add rsp, 858h retn
long long stbi__vertical_flip(char *a1, int a2, int a3, int a4) { long long result; // rax long long v5; // [rsp+0h] [rbp-858h] unsigned long long j; // [rsp+10h] [rbp-848h] char *v7; // [rsp+18h] [rbp-840h] char *v8; // [rsp+20h] [rbp-838h] _BYTE v9[2056]; // [rsp+30h] [rbp-828h] BYREF long long v10; // [rsp+838h] [rbp-20h] int i; // [rsp+840h] [rbp-18h] int v12; // [rsp+844h] [rbp-14h] int v13; // [rsp+848h] [rbp-10h] int v14; // [rsp+84Ch] [rbp-Ch] char *v15; // [rsp+850h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v10 = a4 * (long long)a2; for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= v13 >> 1 ) break; v8 = &a1[v10 * i]; v7 = &a1[v10 * (v13 - i - 1)]; for ( j = v10; j; j -= v5 ) { if ( j >= 0x800 ) v5 = 2048LL; else v5 = j; memcpy(v9, v8, v5); memcpy(v8, v7, v5); memcpy(v7, v9, v5); v8 += v5; v7 += v5; } } return result; }
stbi__vertical_flip: SUB RSP,0x858 MOV qword ptr [RSP + 0x850],RDI MOV dword ptr [RSP + 0x84c],ESI MOV dword ptr [RSP + 0x848],EDX MOV dword ptr [RSP + 0x844],ECX MOVSXD RAX,dword ptr [RSP + 0x84c] MOVSXD RCX,dword ptr [RSP + 0x844] IMUL RAX,RCX MOV qword ptr [RSP + 0x838],RAX MOV RAX,qword ptr [RSP + 0x850] MOV qword ptr [RSP + 0x28],RAX MOV dword ptr [RSP + 0x840],0x0 LAB_00114118: MOV EAX,dword ptr [RSP + 0x840] MOV ECX,dword ptr [RSP + 0x848] SAR ECX,0x1 CMP EAX,ECX JGE 0x00114244 MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x840] IMUL RCX,qword ptr [RSP + 0x838] ADD RAX,RCX MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x848] SUB ECX,dword ptr [RSP + 0x840] SUB ECX,0x1 MOVSXD RCX,ECX IMUL RCX,qword ptr [RSP + 0x838] ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x838] MOV qword ptr [RSP + 0x10],RAX LAB_00114185: CMP qword ptr [RSP + 0x10],0x0 JZ 0x0011422c CMP qword ptr [RSP + 0x10],0x800 JNC 0x001141a7 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX JMP 0x001141b2 LAB_001141a7: MOV EAX,0x800 MOV qword ptr [RSP],RAX JMP 0x001141b2 LAB_001141b2: MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x30] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0010b600 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0010b600 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x30] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0010b600 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] SUB RAX,RCX MOV qword ptr [RSP + 0x10],RAX JMP 0x00114185 LAB_0011422c: JMP 0x0011422e LAB_0011422e: MOV EAX,dword ptr [RSP + 0x840] ADD EAX,0x1 MOV dword ptr [RSP + 0x840],EAX JMP 0x00114118 LAB_00114244: ADD RSP,0x858 RET
/* stbi__vertical_flip(void*, int, int, int) */ void stbi__vertical_flip(void *param_1,int param_2,int param_3,int param_4) { size_t local_858; ulong local_848; void *local_840; void *local_838; int1 local_828 [2056]; ulong local_20; int local_18; int local_14; int local_10; int local_c; void *local_8; local_20 = (long)param_2 * (long)param_4; local_14 = param_4; local_10 = param_3; local_c = param_2; local_8 = param_1; for (local_18 = 0; local_18 < local_10 >> 1; local_18 = local_18 + 1) { local_838 = (void *)((long)param_1 + (long)local_18 * local_20); local_840 = (void *)((long)param_1 + (long)((local_10 - local_18) + -1) * local_20); for (local_848 = local_20; local_848 != 0; local_848 = local_848 - local_858) { if (local_848 < 0x800) { local_858 = local_848; } else { local_858 = 0x800; } memcpy(local_828,local_838,local_858); memcpy(local_838,local_840,local_858); memcpy(local_840,local_828,local_858); local_838 = (void *)(local_858 + (long)local_838); local_840 = (void *)(local_858 + (long)local_840); } } return; }
36,061
stbi__vertical_flip(void*, int, int, int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) { int row; size_t bytes_per_row = (size_t)w * bytes_per_pixel; stbi_uc temp[2048]; stbi_uc *bytes = (stbi_uc *)image; for (row = 0; row < (h>>1); row++) { stbi_uc *row0 = bytes + row*bytes_per_row; stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; // swap row0 with row1 size_t bytes_left = bytes_per_row; while (bytes_left) { size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); memcpy(temp, row0, bytes_copy); memcpy(row0, row1, bytes_copy); memcpy(row1, temp, bytes_copy); row0 += bytes_copy; row1 += bytes_copy; bytes_left -= bytes_copy; } } }
O1
c
stbi__vertical_flip(void*, int, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x838, %rsp # imm = 0x838 movq %rdi, 0x20(%rsp) movl %edx, 0x14(%rsp) movl %edx, %eax sarl %eax testl %eax, %eax jle 0x229d4 movslq %esi, %rdx movslq %ecx, %rcx imulq %rdx, %rcx movq %rcx, 0x18(%rsp) movl %eax, %eax movq %rax, 0x28(%rsp) movq $0x0, 0x8(%rsp) movl $0x800, %ebx # imm = 0x800 leaq 0x30(%rsp), %r15 cmpq $0x0, 0x18(%rsp) je 0x229bc movq 0x8(%rsp), %rcx movl %ecx, %eax notl %eax addl 0x14(%rsp), %eax movslq %eax, %r12 movq 0x18(%rsp), %r14 imulq %r14, %r12 movq 0x20(%rsp), %rax addq %rax, %r12 movq %r14, %r13 imulq %rcx, %r13 addq %rax, %r13 cmpq %rbx, %r14 movl $0x800, %ebp # imm = 0x800 cmovbq %r14, %rbp movq %r15, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0xa4c0 movq %r13, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0xa4c0 movq %r12, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0xa4c0 addq %rbp, %r13 addq %rbp, %r12 subq %rbp, %r14 jne 0x2297b movq 0x8(%rsp), %rcx incq %rcx movq %rcx, 0x8(%rsp) cmpq 0x28(%rsp), %rcx jne 0x22948 addq $0x838, %rsp # imm = 0x838 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL19stbi__vertical_flipPviii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 838h mov [rsp+868h+var_848], rdi mov [rsp+868h+var_854], edx mov eax, edx sar eax, 1 test eax, eax jle loc_229D4 movsxd rdx, esi movsxd rcx, ecx imul rcx, rdx mov [rsp+868h+var_850], rcx mov eax, eax mov [rsp+868h+var_840], rax mov [rsp+868h+var_860], 0 mov ebx, 800h lea r15, [rsp+868h+var_838] loc_22948: cmp [rsp+868h+var_850], 0 jz short loc_229BC mov rcx, [rsp+868h+var_860] mov eax, ecx not eax add eax, [rsp+868h+var_854] movsxd r12, eax mov r14, [rsp+868h+var_850] imul r12, r14 mov rax, [rsp+868h+var_848] add r12, rax mov r13, r14 imul r13, rcx add r13, rax loc_2297B: cmp r14, rbx mov ebp, 800h cmovb rbp, r14 mov rdi, r15 mov rsi, r13 mov rdx, rbp call _memcpy mov rdi, r13 mov rsi, r12 mov rdx, rbp call _memcpy mov rdi, r12 mov rsi, r15 mov rdx, rbp call _memcpy add r13, rbp add r12, rbp sub r14, rbp jnz short loc_2297B loc_229BC: mov rcx, [rsp+868h+var_860] inc rcx mov [rsp+868h+var_860], rcx cmp rcx, [rsp+868h+var_840] jnz loc_22948 loc_229D4: add rsp, 838h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi__vertical_flip(char *a1, int a2, int a3, int a4) { long long result; // rax unsigned long long v5; // r14 char *v6; // r12 char *v7; // r13 long long v8; // rbp long long i; // [rsp+8h] [rbp-860h] long long v11; // [rsp+18h] [rbp-850h] long long v12; // [rsp+28h] [rbp-840h] _BYTE v13[2104]; // [rsp+30h] [rbp-838h] BYREF result = (unsigned int)(a3 >> 1); if ( (int)result > 0 ) { v11 = a2 * (long long)a4; result = (unsigned int)result; v12 = (unsigned int)result; for ( i = 0LL; i != v12; ++i ) { if ( v11 ) { v5 = v11; v6 = &a1[v11 * (a3 + ~(_DWORD)i)]; v7 = &a1[i * v11]; do { v8 = 2048LL; if ( v5 < 0x800 ) v8 = v5; memcpy(v13, v7, v8); memcpy(v7, v6, v8); result = memcpy(v6, v13, v8); v7 += v8; v6 += v8; v5 -= v8; } while ( v5 ); } } } return result; }
36,062
key_cache_insert
eloqsql/mysys/mf_keycache.c
int key_cache_insert(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length) { if (keycache->can_be_used) return keycache->interface_funcs->insert(keycache->keycache_cb, file, filepos, level, buff, length); return 0; }
O0
c
key_cache_insert: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x49(%rax) je 0xe4c05 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d callq *%rax movl %eax, -0x4(%rbp) jmp 0xe4c0c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
key_cache_insert: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_10] cmp byte ptr [rax+49h], 0 jz short loc_E4C05 mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+20h] mov rcx, [rbp+var_10] mov rdi, [rcx+8] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] call rax mov [rbp+var_4], eax jmp short loc_E4C0C loc_E4C05: mov [rbp+var_4], 0 loc_E4C0C: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long key_cache_insert( long long a1, unsigned int a2, long long a3, unsigned int a4, long long a5, unsigned int a6) { if ( *(_BYTE *)(a1 + 73) ) return (unsigned int)(*(long long ( **)(_QWORD, _QWORD, long long, _QWORD, long long, _QWORD))(*(_QWORD *)(a1 + 16) + 32LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5, a6); else return 0; }
key_cache_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x49],0x0 JZ 0x001e4c05 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x001e4c0c LAB_001e4c05: MOV dword ptr [RBP + -0x4],0x0 LAB_001e4c0c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 key_cache_insert(long param_1,int4 param_2,int8 param_3,int4 param_4, int8 param_5,int4 param_6) { int4 local_c; if (*(char *)(param_1 + 0x49) == '\0') { local_c = 0; } else { local_c = (**(code **)(*(long *)(param_1 + 0x10) + 0x20)) (*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6); } return local_c; }
36,063
pagecache_unpin_by_link
eloqsql/storage/maria/ma_pagecache.c
void pagecache_unpin_by_link(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, LSN lsn) { DBUG_ENTER("pagecache_unpin_by_link"); DBUG_PRINT("enter", ("block: %p fd: %u page: %lu", block, (uint) block->hash_link->file.file, (ulong) block->hash_link->pageno)); pagecache_pthread_mutex_lock(&pagecache->cache_lock); /* As soon as we keep lock cache can be used, and we have lock because want unlock. */ DBUG_ASSERT(pagecache->can_be_used); /* we can't unpin such page without unlock */ DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0); inc_counter_for_resize_op(pagecache); 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 */ /* 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_by_link: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x3de56 movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0x115626(%rip), %rsi # 0x15348e movl $0xdad, %edx # imm = 0xDAD callq 0x3ca50 jmp 0x3de74 jmp 0x3de76 jmp 0x3de78 movq -0x8(%rbp), %rdi callq 0x3ce00 cmpq $0x0, -0x18(%rbp) je 0x3de99 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rdx callq 0x3d670 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x1, %edx movl $0x3, %ecx xorl %r8d, %r8d callq 0x3d810 cmpb $0x0, %al je 0x3debd jmp 0x3deb9 jmp 0x3debb jmp 0x3debd movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x1, %edx callq 0x3d9b0 movq -0x8(%rbp), %rdi callq 0x3db30 movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x3cac0 jmp 0x3deea addq $0x20, %rsp popq %rbp retq
pagecache_unpin_by_link: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_3DE56: mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0DADh call inline_mysql_mutex_lock_0 jmp short $+2 loc_3DE74: jmp short $+2 loc_3DE76: jmp short $+2 loc_3DE78: mov rdi, [rbp+var_8] call inc_counter_for_resize_op cmp [rbp+var_18], 0 jz short loc_3DE99 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_10] call check_and_set_lsn loc_3DE99: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 1 mov ecx, 3 xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_3DEBD jmp short $+2 loc_3DEB9: jmp short $+2 loc_3DEBB: jmp short $+2 loc_3DEBD: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] 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_0 jmp short $+2 loc_3DEEA: add rsp, 20h pop rbp retn
long long pagecache_unpin_by_link(_QWORD *a1, long long a2, long long a3) { inline_mysql_mutex_lock_0( (long long)(a1 + 25), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xDADu); inc_counter_for_resize_op((long long)a1); if ( a3 ) check_and_set_lsn((long long)a1, a3, a2); make_lock_and_pin((long long)a1, a2, 1, 3, 0); unreg_request(a1, a2, 1); dec_counter_for_resize_op((long long)a1); return inline_mysql_mutex_unlock_0((long long)(a1 + 25)); }
pagecache_unpin_by_link: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0013de56 LAB_0013de56: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x25348e] MOV EDX,0xdad CALL 0x0013ca50 JMP 0x0013de74 LAB_0013de74: JMP 0x0013de76 LAB_0013de76: JMP 0x0013de78 LAB_0013de78: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013ce00 CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013de99 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] CALL 0x0013d670 LAB_0013de99: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x1 MOV ECX,0x3 XOR R8D,R8D CALL 0x0013d810 CMP AL,0x0 JZ 0x0013debd JMP 0x0013deb9 LAB_0013deb9: JMP 0x0013debb LAB_0013debb: JMP 0x0013debd LAB_0013debd: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x1 CALL 0x0013d9b0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013db30 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x0013cac0 JMP 0x0013deea LAB_0013deea: ADD RSP,0x20 POP RBP RET
void pagecache_unpin_by_link(long param_1,int8 param_2,long param_3) { inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0xdad); inc_counter_for_resize_op(param_1); if (param_3 != 0) { check_and_set_lsn(param_1,param_3,param_2); } make_lock_and_pin(param_1,param_2,1,3,0); unreg_request(param_1,param_2,1); dec_counter_for_resize_op(param_1); inline_mysql_mutex_unlock(param_1 + 200); return; }
36,064
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
explicit parser(InputAdapterType&& adapter, const parser_callback_t<BasicJsonType> cb = nullptr, const bool allow_exceptions_ = true, const bool skip_comments = false) : callback(cb) , m_lexer(std::move(adapter), skip_comments) , allow_exceptions(allow_exceptions_) { // read first token get_token(); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %r15d movl %ecx, %ebp movq %rsi, %r12 movq %rdi, %rbx movq %rdx, %rsi callq 0x58b26 movl $0x0, 0x20(%rbx) leaq 0x28(%rbx), %r14 movups (%r12), %xmm0 movups %xmm0, 0x28(%rbx) movb %r15b, 0x38(%rbx) movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF xorl %eax, %eax movb %al, 0x40(%rbx) leaq 0x88(%rbx), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x48(%rbx) movups %xmm0, 0x58(%rbx) movups %xmm0, 0x68(%rbx) movq %rcx, 0x78(%rbx) movq %rax, 0x80(%rbx) movb %al, 0x88(%rbx) leaq 0x92355(%rip), %rcx # 0xeb99c movq %rcx, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movq %rax, 0xb0(%rbx) callq 0x596ea movsbl %al, %eax movl %eax, 0xb8(%rbx) movb %bpl, 0xc0(%rbx) movq %r14, %rdi callq 0x5972e movl %eax, 0x20(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %r14, %rdi callq 0x596b6 movq 0x10(%rbx), %rax testq %rax, %rax je 0x596a6 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0x1afb0 movq %rax, %rdi callq 0x222a5
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb: push rbp push r15 push r14 push r12 push rbx mov r15d, r8d mov ebp, ecx mov r12, rsi mov rbx, rdi mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) mov dword ptr [rbx+20h], 0 lea r14, [rbx+28h] movups xmm0, xmmword ptr [r12] movups xmmword ptr [rbx+28h], xmm0 mov [rbx+38h], r15b mov dword ptr [rbx+3Ch], 0FFFFFFFFh xor eax, eax mov [rbx+40h], al lea rcx, [rbx+88h] xorps xmm0, xmm0 movups xmmword ptr [rbx+48h], xmm0 movups xmmword ptr [rbx+58h], xmm0 movups xmmword ptr [rbx+68h], xmm0 mov [rbx+78h], rcx mov [rbx+80h], rax mov [rbx+88h], al lea rcx, aErrorWhileHand_0+34h; "" mov [rbx+98h], rcx movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], rax call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(void) movsx eax, al mov [rbx+0B8h], eax mov [rbx+0C0h], bpl mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(void) mov [rbx+20h], eax pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [rbx+10h] test rax, rax jz short loc_596A6 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_596A6: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser( long long a1, _OWORD *a2, long long a3, char a4, char a5) { long long result; // rax std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (_OWORD *)a1, a3); *(_DWORD *)(a1 + 32) = 0; *(_OWORD *)(a1 + 40) = *a2; *(_BYTE *)(a1 + 56) = a5; *(_DWORD *)(a1 + 60) = -1; *(_BYTE *)(a1 + 64) = 0; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 120) = a1 + 136; *(_QWORD *)(a1 + 128) = 0LL; *(_BYTE *)(a1 + 136) = 0; *(_QWORD *)(a1 + 152) = ""; *(_OWORD *)(a1 + 160) = 0LL; *(_QWORD *)(a1 + 176) = 0LL; *(_DWORD *)(a1 + 184) = (char)nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(); *(_BYTE *)(a1 + 192) = a4; result = nlohmann::json_abi_v3_11_3::detail::lexer<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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan(a1 + 40); *(_DWORD *)(a1 + 32) = result; return result; }
parser: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15D,R8D MOV EBP,ECX MOV R12,RSI MOV RBX,RDI MOV RSI,RDX CALL 0x00158b26 MOV dword ptr [RBX + 0x20],0x0 LEA R14,[RBX + 0x28] MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV byte ptr [RBX + 0x38],R15B MOV dword ptr [RBX + 0x3c],0xffffffff XOR EAX,EAX MOV byte ptr [RBX + 0x40],AL LEA RCX,[RBX + 0x88] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x80],RAX MOV byte ptr [RBX + 0x88],AL LEA RCX,[0x1eb99c] MOV qword ptr [RBX + 0x98],RCX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV qword ptr [RBX + 0xb0],RAX CALL 0x001596ea MOVSX EAX,AL MOV dword ptr [RBX + 0xb8],EAX MOV byte ptr [RBX + 0xc0],BPL LAB_00159671: MOV RDI,R14 CALL 0x0015972e MOV dword ptr [RBX + 0x20],EAX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parser(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this,int8 *param_1,function *param_3, parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> param_4,parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> param_5) { int8 uVar1; char cVar2; int4 uVar3; std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)this,param_3); *(int4 *)(this + 0x20) = 0; uVar1 = param_1[1]; *(int8 *)(this + 0x28) = *param_1; *(int8 *)(this + 0x30) = uVar1; this[0x38] = param_5; *(int4 *)(this + 0x3c) = 0xffffffff; this[0x40] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> **)(this + 0x78) = this + 0x88; *(int8 *)(this + 0x80) = 0; this[0x88] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; *(char **)(this + 0x98) = ""; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; cVar2 = lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_decimal_point(); *(int *)(this + 0xb8) = (int)cVar2; this[0xc0] = param_4; /* try { // try from 00159671 to 00159678 has its CatchHandler @ 00159685 */ uVar3 = lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan((lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *)(this + 0x28)); *(int4 *)(this + 0x20) = uVar3; return; }
36,065
my_charlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); return MY_CS_ILSEQ; }
O0
c
my_charlen_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x73677 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x736a4 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x7369d movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x74510 movl %eax, -0x4(%rbp) jmp 0x736a4 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_charlen_utf8mb3: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_73677 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_736A4 loc_73677: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 0F0h jge short loc_7369D mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call my_valid_mbcharlen_utf8mb3 mov [rbp+var_4], eax jmp short loc_736A4 loc_7369D: mov [rbp+var_4], 0 loc_736A4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_charlen_utf8mb3(long long a1, unsigned __int8 *a2, unsigned long long a3) { if ( (unsigned long long)a2 < a3 ) { if ( *a2 >= 0xF0u ) return 0; else return (unsigned int)my_valid_mbcharlen_utf8mb3(a2, a3); } else { return (unsigned int)-101; } }
my_charlen_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x00173677 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001736a4 LAB_00173677: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0017369d MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00174510 MOV dword ptr [RBP + -0x4],EAX JMP 0x001736a4 LAB_0017369d: MOV dword ptr [RBP + -0x4],0x0 LAB_001736a4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3) { int4 local_c; if (param_2 < param_3) { if (*param_2 < 0xf0) { local_c = my_valid_mbcharlen_utf8mb3(param_2,param_3); } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
36,066
common_log::common_log(unsigned long)
monkey531[P]llama/common/log.cpp
common_log(size_t capacity) { file = nullptr; prefix = false; timestamps = false; running = false; t_start = t_us(); // initial message size - will be expanded if longer messages arrive entries.resize(capacity); for (auto & entry : entries) { entry.msg.resize(256); } head = 0; tail = 0; resume(); }
O3
cpp
common_log::common_log(unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r12 movq %rdi, %rbx leaq 0x30(%rdi), %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq %r14, %rdi callq 0x1e160 leaq 0x78(%rbx), %r15 xorl %eax, %eax movq %rax, 0x88(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movups %xmm0, 0xb0(%rbx) movq %rax, 0xc0(%rbx) movq %rax, 0x60(%rbx) movl $0x0, 0x67(%rbx) callq 0x1d0a0 movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx movq %rdx, 0x70(%rbx) movq %r15, %rdi movq %r12, %rsi callq 0xef830 movq 0x78(%rbx), %r12 movq 0x80(%rbx), %r13 cmpq %r13, %r12 je 0xef7cc leaq 0x10(%r12), %rdi movl $0x100, %esi # imm = 0x100 callq 0xa1f04 addq $0x30, %r12 jmp 0xef7b2 xorps %xmm0, %xmm0 movups %xmm0, 0x90(%rbx) movq %rbx, %rdi callq 0xef24e popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0xef7ea movq %rax, %r12 leaq 0xb0(%rbx), %rax movq (%rax), %rdi testq %rdi, %rdi je 0xef80b movq 0xc0(%rbx), %rsi subq %rdi, %rsi callq 0x1dc50 movq %r15, %rdi callq 0xef872 movq %r14, %rdi callq 0x1e700 cmpq $0x0, 0x28(%rbx) jne 0xef82a movq %r12, %rdi callq 0x1e660 callq 0x1d290 nop
_ZN10common_logC2Em: push r15 push r14 push r13 push r12 push rbx mov r12, rsi mov rbx, rdi lea r14, [rdi+30h] xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, r14; this call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void) lea r15, [rbx+78h] xor eax, eax mov [rbx+88h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 movups xmmword ptr [rbx+0B0h], xmm0 mov [rbx+0C0h], rax mov [rbx+60h], rax mov dword ptr [rbx+67h], 0 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 20C49BA5E353F7CFh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 7 add rdx, rax mov [rbx+70h], rdx mov rdi, r15 mov rsi, r12 call _ZNSt6vectorI16common_log_entrySaIS0_EE6resizeEm; std::vector<common_log_entry>::resize(ulong) mov r12, [rbx+78h] mov r13, [rbx+80h] loc_EF7B2: cmp r12, r13 jz short loc_EF7CC lea rdi, [r12+10h] mov esi, 100h call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) add r12, 30h ; '0' jmp short loc_EF7B2 loc_EF7CC: xorps xmm0, xmm0 movups xmmword ptr [rbx+90h], xmm0 mov rdi, rbx; this call _ZN10common_log6resumeEv; common_log::resume(void) pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_EF7EA: mov r12, rax lea rax, [rbx+0B0h] mov rdi, [rax]; void * test rdi, rdi jz short loc_EF80B mov rsi, [rbx+0C0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_EF80B: mov rdi, r15 call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() mov rdi, r14; this call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable() cmp qword ptr [rbx+28h], 0 jnz short loc_EF82A mov rdi, r12 call __Unwind_Resume loc_EF82A: call __ZSt9terminatev; std::terminate(void)
void common_log::common_log(common_log *this, long long a2) { std::condition_variable *v3; // rdi long long v4; // r12 long long v5; // r13 *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; v3 = (common_log *)((char *)this + 48); std::condition_variable::condition_variable(v3); *((_QWORD *)this + 17) = 0LL; *(_OWORD *)((char *)this + 120) = 0LL; *((_OWORD *)this + 11) = 0LL; *((_QWORD *)this + 24) = 0LL; *((_QWORD *)this + 12) = 0LL; *(_DWORD *)((char *)this + 103) = 0; *((_QWORD *)this + 14) = std::chrono::_V2::system_clock::now(v3) / 1000LL; std::vector<common_log_entry>::resize((char *)this + 120, a2); v4 = *((_QWORD *)this + 15); v5 = *((_QWORD *)this + 16); while ( v4 != v5 ) { std::vector<char>::resize((_QWORD *)(v4 + 16), 0x100uLL); v4 += 48LL; } *((_OWORD *)this + 9) = 0LL; common_log::resume(this); }
common_log: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,RSI MOV RBX,RDI LEA R14,[RDI + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,R14 CALL 0x0011e160 LEA R15,[RBX + 0x78] XOR EAX,EAX MOV qword ptr [RBX + 0x88],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOVUPS xmmword ptr [RBX + 0xb0],XMM0 MOV qword ptr [RBX + 0xc0],RAX MOV qword ptr [RBX + 0x60],RAX MOV dword ptr [RBX + 0x67],0x0 CALL 0x0011d0a0 MOV RCX,0x20c49ba5e353f7cf IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x7 ADD RDX,RAX MOV qword ptr [RBX + 0x70],RDX LAB_001ef79c: MOV RDI,R15 MOV RSI,R12 CALL 0x001ef830 MOV R12,qword ptr [RBX + 0x78] MOV R13,qword ptr [RBX + 0x80] LAB_001ef7b2: CMP R12,R13 JZ 0x001ef7cc LEA RDI,[R12 + 0x10] LAB_001ef7bc: MOV ESI,0x100 CALL 0x001a1f04 ADD R12,0x30 JMP 0x001ef7b2 LAB_001ef7cc: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x90],XMM0 LAB_001ef7d6: MOV RDI,RBX CALL 0x001ef24e LAB_001ef7de: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_log::common_log(unsigned long) */ void __thiscall common_log::common_log(common_log *this,ulong param_1) { long lVar1; long lVar2; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; std::condition_variable::condition_variable((condition_variable *)(this + 0x30)); *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 0x60) = 0; *(int4 *)(this + 0x67) = 0; lVar2 = std::chrono::_V2::system_clock::now(); *(long *)(this + 0x70) = lVar2 / 1000; /* try { // try from 001ef79c to 001ef7a6 has its CatchHandler @ 001ef7e8 */ std::vector<common_log_entry,std::allocator<common_log_entry>>::resize ((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78),param_1); lVar1 = *(long *)(this + 0x80); for (lVar2 = *(long *)(this + 0x78); lVar2 != lVar1; lVar2 = lVar2 + 0x30) { /* try { // try from 001ef7bc to 001ef7c5 has its CatchHandler @ 001ef7ea */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(lVar2 + 0x10),0x100); } *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; /* try { // try from 001ef7d6 to 001ef7dd has its CatchHandler @ 001ef7e8 */ resume(this); return; }
36,067
secp256k1_recover
corpus-core[P]colibri-stateless/src/util/crypto.c
bool secp256k1_recover(const bytes32_t digest, bytes_t signature, uint8_t* pubkey) { uint8_t pub[65] = {0}; if (ecdsa_recover_pub_from_sig(&secp256k1, pub, signature.data, digest, signature.data[64] % 27)) return false; else memcpy(pubkey, pub + 1, 64); return true; }
O1
c
secp256k1_recover: pushq %rbx subq $0x50, %rsp movq %rcx, %rbx movq %rdi, %rcx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, 0x30(%rsi) movaps %xmm0, 0x20(%rsi) movaps %xmm0, 0x10(%rsi) movaps %xmm0, (%rsi) movb $0x0, 0x40(%rsi) movzbl 0x40(%rdx), %eax leal (%rax,%rax,8), %edi leal (%rax,%rdi,2), %edi shrl $0x9, %edi leal (%rdi,%rdi,8), %edi leal (%rdi,%rdi,2), %edi subb %dil, %al movzbl %al, %r8d leaq 0x2b202(%rip), %rdi # 0x41fd4 callq 0x39415 testl %eax, %eax jne 0x16dfe movups 0x1(%rsp), %xmm0 movups 0x11(%rsp), %xmm1 movups 0x21(%rsp), %xmm2 movups 0x31(%rsp), %xmm3 movups %xmm3, 0x30(%rbx) movups %xmm2, 0x20(%rbx) movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) testl %eax, %eax sete %al addq $0x50, %rsp popq %rbx retq nopl (%rax)
secp256k1_recover: push rbx sub rsp, 50h mov rbx, rcx mov rcx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi+30h], xmm0 movaps xmmword ptr [rsi+20h], xmm0 movaps xmmword ptr [rsi+10h], xmm0 movaps xmmword ptr [rsi], xmm0 mov byte ptr [rsi+40h], 0 movzx eax, byte ptr [rdx+40h] lea edi, [rax+rax*8] lea edi, [rax+rdi*2] shr edi, 9 lea edi, [rdi+rdi*8] lea edi, [rdi+rdi*2] sub al, dil movzx r8d, al lea rdi, secp256k1 call ecdsa_recover_pub_from_sig test eax, eax jnz short loc_16DFE movups xmm0, [rsp+58h+var_57] movups xmm1, [rsp+58h+var_47] movups xmm2, [rsp+58h+var_37] movups xmm3, [rsp+58h+var_27] movups xmmword ptr [rbx+30h], xmm3 movups xmmword ptr [rbx+20h], xmm2 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 loc_16DFE: test eax, eax setz al add rsp, 50h pop rbx retn
bool secp256k1_recover(long long a1, long long a2, long long a3, _OWORD *a4) { int v5; // eax __int128 v6; // xmm0 __int128 v7; // xmm1 __int128 v8; // xmm2 _BYTE v10[88]; // [rsp+0h] [rbp-58h] BYREF memset(v10, 0, 65); v5 = ecdsa_recover_pub_from_sig(&secp256k1, v10, a3, a1, *(_BYTE *)(a3 + 64) % 0x1Bu); if ( !v5 ) { v6 = *(_OWORD *)&v10[1]; v7 = *(_OWORD *)&v10[17]; v8 = *(_OWORD *)&v10[33]; a4[3] = *(_OWORD *)&v10[49]; a4[2] = v8; a4[1] = v7; *a4 = v6; } return v5 == 0; }
secp256k1_recover: PUSH RBX SUB RSP,0x50 MOV RBX,RCX MOV RCX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI + 0x30],XMM0 MOVAPS xmmword ptr [RSI + 0x20],XMM0 MOVAPS xmmword ptr [RSI + 0x10],XMM0 MOVAPS xmmword ptr [RSI],XMM0 MOV byte ptr [RSI + 0x40],0x0 MOVZX EAX,byte ptr [RDX + 0x40] LEA EDI,[RAX + RAX*0x8] LEA EDI,[RAX + RDI*0x2] SHR EDI,0x9 LEA EDI,[RDI + RDI*0x8] LEA EDI,[RDI + RDI*0x2] SUB AL,DIL MOVZX R8D,AL LEA RDI,[0x141fd4] CALL 0x00139415 TEST EAX,EAX JNZ 0x00116dfe MOVUPS XMM0,xmmword ptr [RSP + 0x1] MOVUPS XMM1,xmmword ptr [RSP + 0x11] MOVUPS XMM2,xmmword ptr [RSP + 0x21] MOVUPS XMM3,xmmword ptr [RSP + 0x31] MOVUPS xmmword ptr [RBX + 0x30],XMM3 MOVUPS xmmword ptr [RBX + 0x20],XMM2 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 LAB_00116dfe: TEST EAX,EAX SETZ AL ADD RSP,0x50 POP RBX RET
bool secp256k1_recover(int8 param_1,int8 param_2,long param_3,int8 *param_4) { int iVar1; int1 local_58; int7 uStack_57; int1 uStack_50; int7 uStack_4f; int1 local_48; int7 uStack_47; int1 uStack_40; int7 uStack_3f; int1 local_38; int7 uStack_37; int1 uStack_30; int7 uStack_2f; int1 local_28; int7 uStack_27; int1 uStack_20; int7 uStack_1f; int1 local_18; local_28 = 0; uStack_27 = 0; uStack_20 = 0; uStack_1f = 0; local_38 = 0; uStack_37 = 0; uStack_30 = 0; uStack_2f = 0; local_48 = 0; uStack_47 = 0; uStack_40 = 0; uStack_3f = 0; local_58 = 0; uStack_57 = 0; uStack_50 = 0; uStack_4f = 0; local_18 = 0; iVar1 = ecdsa_recover_pub_from_sig (secp256k1,&local_58,param_3,param_1, *(byte *)(param_3 + 0x40) + (char)((uint)*(byte *)(param_3 + 0x40) * 0x13 >> 9) * -0x1b); if (iVar1 == 0) { param_4[6] = CONCAT17(uStack_20,uStack_27); param_4[7] = CONCAT17(local_18,uStack_1f); param_4[4] = CONCAT17(uStack_30,uStack_37); param_4[5] = CONCAT17(local_28,uStack_2f); param_4[2] = CONCAT17(uStack_40,uStack_47); param_4[3] = CONCAT17(local_38,uStack_3f); *param_4 = CONCAT17(uStack_50,uStack_57); param_4[1] = CONCAT17(local_48,uStack_4f); } return iVar1 == 0; }
36,068
secp256k1_recover
corpus-core[P]colibri-stateless/src/util/crypto.c
bool secp256k1_recover(const bytes32_t digest, bytes_t signature, uint8_t* pubkey) { uint8_t pub[65] = {0}; if (ecdsa_recover_pub_from_sig(&secp256k1, pub, signature.data, digest, signature.data[64] % 27)) return false; else memcpy(pubkey, pub + 1, 64); return true; }
O3
c
secp256k1_recover: pushq %rbx subq $0x50, %rsp movq %rcx, %rbx movq %rdi, %rcx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, 0x30(%rsi) movaps %xmm0, 0x20(%rsi) movaps %xmm0, 0x10(%rsi) movaps %xmm0, (%rsi) movb $0x0, 0x40(%rsi) movzbl 0x40(%rdx), %eax leal (%rax,%rax,8), %edi leal (%rax,%rdi,2), %edi shrl $0x9, %edi leal (%rdi,%rdi,8), %edi leal (%rdi,%rdi,2), %edi subb %dil, %al movzbl %al, %r8d leaq 0x2b923(%rip), %rdi # 0x41fcc callq 0x38be2 testl %eax, %eax jne 0x166d5 movups 0x1(%rsp), %xmm0 movups 0x11(%rsp), %xmm1 movups 0x21(%rsp), %xmm2 movups 0x31(%rsp), %xmm3 movups %xmm3, 0x30(%rbx) movups %xmm2, 0x20(%rbx) movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) testl %eax, %eax sete %al addq $0x50, %rsp popq %rbx retq
secp256k1_recover: push rbx sub rsp, 50h mov rbx, rcx mov rcx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi+30h], xmm0 movaps xmmword ptr [rsi+20h], xmm0 movaps xmmword ptr [rsi+10h], xmm0 movaps xmmword ptr [rsi], xmm0 mov byte ptr [rsi+40h], 0 movzx eax, byte ptr [rdx+40h] lea edi, [rax+rax*8] lea edi, [rax+rdi*2] shr edi, 9 lea edi, [rdi+rdi*8] lea edi, [rdi+rdi*2] sub al, dil movzx r8d, al lea rdi, secp256k1 call ecdsa_recover_pub_from_sig test eax, eax jnz short loc_166D5 movups xmm0, [rsp+58h+var_57] movups xmm1, [rsp+58h+var_47] movups xmm2, [rsp+58h+var_37] movups xmm3, [rsp+58h+var_27] movups xmmword ptr [rbx+30h], xmm3 movups xmmword ptr [rbx+20h], xmm2 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 loc_166D5: test eax, eax setz al add rsp, 50h pop rbx retn
bool secp256k1_recover(long long a1, long long a2, long long a3, _OWORD *a4) { int v5; // eax __int128 v6; // xmm0 __int128 v7; // xmm1 __int128 v8; // xmm2 _BYTE v10[88]; // [rsp+0h] [rbp-58h] BYREF memset(v10, 0, 65); v5 = ecdsa_recover_pub_from_sig(&secp256k1, v10, a3, a1, *(_BYTE *)(a3 + 64) % 0x1Bu); if ( !v5 ) { v6 = *(_OWORD *)&v10[1]; v7 = *(_OWORD *)&v10[17]; v8 = *(_OWORD *)&v10[33]; a4[3] = *(_OWORD *)&v10[49]; a4[2] = v8; a4[1] = v7; *a4 = v6; } return v5 == 0; }
secp256k1_recover: PUSH RBX SUB RSP,0x50 MOV RBX,RCX MOV RCX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI + 0x30],XMM0 MOVAPS xmmword ptr [RSI + 0x20],XMM0 MOVAPS xmmword ptr [RSI + 0x10],XMM0 MOVAPS xmmword ptr [RSI],XMM0 MOV byte ptr [RSI + 0x40],0x0 MOVZX EAX,byte ptr [RDX + 0x40] LEA EDI,[RAX + RAX*0x8] LEA EDI,[RAX + RDI*0x2] SHR EDI,0x9 LEA EDI,[RDI + RDI*0x8] LEA EDI,[RDI + RDI*0x2] SUB AL,DIL MOVZX R8D,AL LEA RDI,[0x141fcc] CALL 0x00138be2 TEST EAX,EAX JNZ 0x001166d5 MOVUPS XMM0,xmmword ptr [RSP + 0x1] MOVUPS XMM1,xmmword ptr [RSP + 0x11] MOVUPS XMM2,xmmword ptr [RSP + 0x21] MOVUPS XMM3,xmmword ptr [RSP + 0x31] MOVUPS xmmword ptr [RBX + 0x30],XMM3 MOVUPS xmmword ptr [RBX + 0x20],XMM2 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 LAB_001166d5: TEST EAX,EAX SETZ AL ADD RSP,0x50 POP RBX RET
bool secp256k1_recover(int8 param_1,int8 param_2,long param_3,int8 *param_4) { int iVar1; int1 local_58; int7 uStack_57; int1 uStack_50; int7 uStack_4f; int1 local_48; int7 uStack_47; int1 uStack_40; int7 uStack_3f; int1 local_38; int7 uStack_37; int1 uStack_30; int7 uStack_2f; int1 local_28; int7 uStack_27; int1 uStack_20; int7 uStack_1f; int1 local_18; local_28 = 0; uStack_27 = 0; uStack_20 = 0; uStack_1f = 0; local_38 = 0; uStack_37 = 0; uStack_30 = 0; uStack_2f = 0; local_48 = 0; uStack_47 = 0; uStack_40 = 0; uStack_3f = 0; local_58 = 0; uStack_57 = 0; uStack_50 = 0; uStack_4f = 0; local_18 = 0; iVar1 = ecdsa_recover_pub_from_sig (secp256k1,&local_58,param_3,param_1, *(byte *)(param_3 + 0x40) + (char)((uint)*(byte *)(param_3 + 0x40) * 0x13 >> 9) * -0x1b); if (iVar1 == 0) { param_4[6] = CONCAT17(uStack_20,uStack_27); param_4[7] = CONCAT17(local_18,uStack_1f); param_4[4] = CONCAT17(uStack_30,uStack_37); param_4[5] = CONCAT17(local_28,uStack_2f); param_4[2] = CONCAT17(uStack_40,uStack_47); param_4[3] = CONCAT17(local_38,uStack_3f); *param_4 = CONCAT17(uStack_50,uStack_57); param_4[1] = CONCAT17(local_48,uStack_4f); } return iVar1 == 0; }
36,069
bc_get_u32
bluesky950520[P]quickjs/quickjs.c
static __maybe_unused int bc_get_u32(BCReaderState *s, uint32_t *pval) { uint32_t v; if (unlikely(s->buf_end - s->ptr < 4)) { *pval = 0; /* avoid warning */ return bc_read_error_end(s); } v = get_u32(s->ptr); if (is_be()) v = bswap32(v); *pval = v; s->ptr += 4; return 0; }
O0
c
bc_get_u32: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq 0x18(%rsp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax cmpq $0x4, %rax setl %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x805a6 movq 0x10(%rsp), %rax movl $0x0, (%rax) movq 0x18(%rsp), %rdi callq 0x80780 movl %eax, 0x24(%rsp) jmp 0x805f2 movq 0x18(%rsp), %rax movq 0x10(%rax), %rdi callq 0x654a0 movl %eax, 0xc(%rsp) callq 0x32f50 cmpb $0x0, %al je 0x805ce movl 0xc(%rsp), %edi callq 0x80120 movl %eax, 0xc(%rsp) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) movq 0x18(%rsp), %rax movq 0x10(%rax), %rcx addq $0x4, %rcx movq %rcx, 0x10(%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
bc_get_u32: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rax, [rsp+28h+var_10] mov rax, [rax+18h] mov rcx, [rsp+28h+var_10] mov rcx, [rcx+10h] sub rax, rcx cmp rax, 4 setl al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_805A6 mov rax, [rsp+28h+var_18] mov dword ptr [rax], 0 mov rdi, [rsp+28h+var_10] call bc_read_error_end mov [rsp+28h+var_4], eax jmp short loc_805F2 loc_805A6: mov rax, [rsp+28h+var_10] mov rdi, [rax+10h] call get_u32 mov [rsp+28h+var_1C], eax call is_be_0 cmp al, 0 jz short loc_805CE mov edi, [rsp+28h+var_1C] call bswap32 mov [rsp+28h+var_1C], eax loc_805CE: mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_18] mov [rax], ecx mov rax, [rsp+28h+var_10] mov rcx, [rax+10h] add rcx, 4 mov [rax+10h], rcx mov [rsp+28h+var_4], 0 loc_805F2: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long bc_get_u32(long long a1, int *a2) { int u32; // [rsp+Ch] [rbp-1Ch] if ( (long long)(*(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16)) >= 4 ) { u32 = get_u32(*(unsigned int **)(a1 + 16)); if ( is_be_0() ) u32 = bswap32(u32); *a2 = u32; *(_QWORD *)(a1 + 16) += 4LL; return 0; } else { *a2 = 0; return (unsigned int)bc_read_error_end(a1); } }
bc_get_u32: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX CMP RAX,0x4 SETL AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001805a6 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00180780 MOV dword ptr [RSP + 0x24],EAX JMP 0x001805f2 LAB_001805a6: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001654a0 MOV dword ptr [RSP + 0xc],EAX CALL 0x00132f50 CMP AL,0x0 JZ 0x001805ce MOV EDI,dword ptr [RSP + 0xc] CALL 0x00180120 MOV dword ptr [RSP + 0xc],EAX LAB_001805ce: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,0x4 MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RSP + 0x24],0x0 LAB_001805f2: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 bc_get_u32(long param_1,int4 *param_2) { char cVar1; int4 local_1c; int4 local_4; if (*(long *)(param_1 + 0x18) - *(long *)(param_1 + 0x10) < 4) { *param_2 = 0; local_4 = bc_read_error_end(param_1); } else { local_1c = get_u32(*(int8 *)(param_1 + 0x10)); cVar1 = is_be(); if (cVar1 != '\0') { local_1c = bswap32(local_1c); } *param_2 = local_1c; *(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + 4; local_4 = 0; } return local_4; }
36,070
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
monkey531[P]llama/common/./json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O2
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x44dcb testq %rax, %rax je 0x44e1c movzbl (%rax), %eax cmpl $0x2, %eax je 0x44dad cmpl $0x1, %eax jne 0x44db7 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x44dbf movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x44dbf movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x57651(%rip), %rsi # 0x9c42e leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x262e2 movq (%r14), %rcx movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x44e62 xorl %ebp, %ebp leaq 0x9b5d3(%rip), %rsi # 0xe03e0 leaq 0x21ce(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 leaq 0x5d338(%rip), %rdi # 0xa215b leaq 0x55004(%rip), %rsi # 0x99e2e leaq 0x5762e(%rip), %rcx # 0x9c45f movl $0x3422, %edx # imm = 0x3422 callq 0x204a0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x20d78 testb %bpl, %bpl jne 0x44e52 jmp 0x44e5a movq %rax, %r14 movq %rbx, %rdi callq 0x20520 movq %r14, %rdi callq 0x20b90
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_44DCB test rax, rax jz loc_44E1C movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_44DAD cmp eax, 1 jnz short loc_44DB7 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_44DBF loc_44DAD: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_44DBF loc_44DB7: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_44DBF: setz al add rsp, 30h pop rbx pop r14 pop rbp retn loc_44DCB: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_44E1C: lea rdi, aAnchorMObjectN+7; "m_object != nullptr" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolNlohmannDe_4; "bool nlohmann::detail::iter_impl<nlohma"... mov edx, 3422h call ___assert_fail mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_44E52 jmp short loc_44E5A mov r14, rax loc_44E52: mov rdi, rbx; void * call ___cxa_free_exception loc_44E5A: mov rdi, r14 call __Unwind_Resume
36,071
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
monkey531[P]llama/common/./json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O3
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x4e31b testq %rax, %rax je 0x4e379 movzbl (%rax), %eax cmpl $0x2, %eax je 0x4e2fb cmpl $0x1, %eax jne 0x4e305 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x4e30d movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x4e30d movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x6af6e(%rip), %rsi # 0xb92a6 leaq 0x6af97(%rip), %rdx # 0xb92d6 leaq 0x8(%rsp), %rdi callq 0x590a2 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x4e3cc xorl %ebp, %ebp leaq 0xa0076(%rip), %rsi # 0xee3e0 leaq -0x1fc1(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 leaq 0x6ea02(%rip), %rdi # 0xbcd82 leaq 0x6891f(%rip), %rsi # 0xb6ca6 leaq 0x6c53f(%rip), %rcx # 0xba8cd movl $0x3422, %edx # imm = 0x3422 callq 0x18470 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x4e3b2 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x4e3bc jmp 0x4e3c4 movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_4E31B test rax, rax jz loc_4E379 movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_4E2FB cmp eax, 1 jnz short loc_4E305 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_4E30D loc_4E2FB: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_4E30D loc_4E305: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_4E30D: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_4E31B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] 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, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_4E379: lea rdi, aAnchorMObjectN+7; "m_object != nullptr" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolNlohmannDe_8; "bool nlohmann::detail::iter_impl<const "... mov edx, 3422h call ___assert_fail mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_4E3B2 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4E3B2: test bpl, bpl jnz short loc_4E3BC jmp short loc_4E3C4 mov r14, rax loc_4E3BC: mov rdi, rbx; void * call ___cxa_free_exception loc_4E3C4: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0014e31b TEST RAX,RAX JZ 0x0014e379 MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0014e2fb CMP EAX,0x1 JNZ 0x0014e305 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0014e30d LAB_0014e2fb: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0014e30d LAB_0014e305: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0014e30d: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0014e31b: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0014e331: LEA RSI,[0x1b92a6] LEA RDX,[0x1b92d6] LEA RDI,[RSP + 0x8] CALL 0x001590a2 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0014e34f: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0014e3cc XOR EBP,EBP LEA RSI,[0x1ee3e0] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30 LAB_0014e379: LEA RDI,[0x1bcd82] LEA RSI,[0x1b6ca6] LEA RCX,[0x1ba8cd] MOV EDX,0x3422 CALL 0x00118470
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0014e331 to 0014e348 has its CatchHandler @ 0014e3b9 */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0014e34f to 0014e378 has its CatchHandler @ 0014e398 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ __assert_fail("m_object != nullptr", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x3422 , "bool nlohmann::detail::iter_impl<const nlohmann::basic_json<nlohmann::ordered_map>>::operator==(const IterImpl &) const [BasicJsonType = const nlohmann::basic_json<nlohmann::ordered_map>, IterImpl = nlohmann::detail::iter_impl<const nlohmann::basic_json<nlohmann::ordered_map>>]" ); }
36,072
mi_get_last_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *lastkey, uchar *endpos, uint *return_key_length) { uint nod_flag; uchar *lastpos; DBUG_ENTER("_mi_get_last_key"); DBUG_PRINT("enter",("page:%p endpos: %p", page, endpos)); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { lastpos=endpos-keyinfo->keylength-nod_flag; *return_key_length=keyinfo->keylength; if (lastpos > page) bmove((uchar*) lastkey,(uchar*) lastpos,keyinfo->keylength+nod_flag); } else { lastpos=(page+=2+nod_flag); lastkey[0]=0; while (page < endpos) { lastpos=page; *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,lastkey); if (*return_key_length == 0) { DBUG_PRINT("error",("Couldn't find last key: page: %p", page)); mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos, *return_key_length)); DBUG_RETURN(lastpos); }
O0
c
mi_get_last_key: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) jmp 0x49d42 movq -0x20(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x49d65 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0x49d6c xorl %eax, %eax movl %eax, -0x4c(%rbp) jmp 0x49d6c movl -0x4c(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x49de3 movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx movzwl 0x12(%rcx), %ecx movslq %ecx, %rdx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movl -0x3c(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movzwl 0x12(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x48(%rbp), %rax cmpq -0x20(%rbp), %rax jbe 0x49dde movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x18(%rbp), %rax movzwl 0x12(%rax), %eax addl -0x3c(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x28690 jmp 0x49e72 movl -0x3c(%rbp), %ecx addl $0x2, %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x49e70 movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x3c(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x20(%rbp), %rdx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpl $0x0, (%rax) jne 0x49e6e jmp 0x49e3f jmp 0x49e41 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x36430 callq 0x83cd0 movl $0x7e, (%rax) movq $0x0, -0x8(%rbp) jmp 0x49e80 jmp 0x49e01 jmp 0x49e72 jmp 0x49e74 jmp 0x49e76 jmp 0x49e78 movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_get_last_key: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 jmp short $+2 loc_49D42: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_49D65 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_4C], eax jmp short loc_49D6C loc_49D65: xor eax, eax mov [rbp+var_4C], eax jmp short $+2 loc_49D6C: mov eax, [rbp+var_4C] mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] and eax, 28h cmp eax, 0 jnz short loc_49DE3 mov rax, [rbp+var_30] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+12h] movsxd rdx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov ecx, [rbp+var_3C] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_18] movzx ecx, word ptr [rax+12h] mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_48] cmp rax, [rbp+var_20] jbe short loc_49DDE mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_18] movzx eax, word ptr [rax+12h] add eax, [rbp+var_3C] mov eax, eax mov edx, eax call _memmove loc_49DDE: jmp loc_49E72 loc_49DE3: mov ecx, [rbp+var_3C] add ecx, 2 mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov [rbp+var_48], rax mov rax, [rbp+var_28] mov byte ptr [rax], 0 loc_49E01: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_49E70 mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_3C] mov rcx, [rbp+var_28] lea rdx, [rbp+var_20] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_38] cmp dword ptr [rax], 0 jnz short loc_49E6E jmp short $+2 loc_49E3F: jmp short $+2 loc_49E41: mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_8], 0 jmp short loc_49E80 loc_49E6E: jmp short loc_49E01 loc_49E70: jmp short $+2 loc_49E72: jmp short $+2 loc_49E74: jmp short $+2 loc_49E76: jmp short $+2 loc_49E78: mov rax, [rbp+var_48] mov [rbp+var_8], rax loc_49E80: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
_BYTE * mi_get_last_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { unsigned int v7; // [rsp+4h] [rbp-4Ch] _BYTE *v8; // [rsp+8h] [rbp-48h] _BYTE *v12; // [rsp+30h] [rbp-20h] BYREF long long v13; // [rsp+38h] [rbp-18h] long long v14; // [rsp+40h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; if ( (*a3 & 0x80) != 0 ) v7 = *(_DWORD *)(*(_QWORD *)v14 + 380LL); else v7 = 0; if ( (*(_WORD *)(v13 + 10) & 0x28) != 0 ) { v12 += v7 + 2; v8 = v12; *a4 = 0; while ( (unsigned long long)v12 < a5 ) { v8 = v12; *a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v13 + 72))(v13, v7, &v12, a4); if ( !*a6 ) { mi_report_error(126, *(_QWORD *)(*(_QWORD *)v14 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; return 0LL; } } } else { v8 = (_BYTE *)(a5 - *(unsigned __int16 *)(v13 + 18) - v7); *a6 = *(unsigned __int16 *)(v13 + 18); if ( v8 > v12 ) memmove(a4, v8, v7 + *(unsigned __int16 *)(v13 + 18)); } return v8; }
_mi_get_last_key: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 JMP 0x00149d42 LAB_00149d42: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x00149d65 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x00149d6c LAB_00149d65: XOR EAX,EAX MOV dword ptr [RBP + -0x4c],EAX JMP 0x00149d6c LAB_00149d6c: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x28 CMP EAX,0x0 JNZ 0x00149de3 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0x12] MOVSXD RDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x3c] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0x12] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x20] JBE 0x00149dde MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x12] ADD EAX,dword ptr [RBP + -0x3c] MOV EAX,EAX MOV EDX,EAX CALL 0x00128690 LAB_00149dde: JMP 0x00149e72 LAB_00149de3: MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 LAB_00149e01: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00149e70 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x20] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX],0x0 JNZ 0x00149e6e JMP 0x00149e3f LAB_00149e3f: JMP 0x00149e41 LAB_00149e41: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00136430 CALL 0x00183cd0 MOV dword ptr [RAX],0x7e MOV qword ptr [RBP + -0x8],0x0 JMP 0x00149e80 LAB_00149e6e: JMP 0x00149e01 LAB_00149e70: JMP 0x00149e72 LAB_00149e72: JMP 0x00149e74 LAB_00149e74: JMP 0x00149e76 LAB_00149e76: JMP 0x00149e78 LAB_00149e78: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX LAB_00149e80: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
byte * _mi_get_last_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5, uint *param_6) { uint uVar1; int4 *puVar2; uint local_54; byte *local_50; byte *local_28; long local_20; long *local_18; byte *local_10; if ((*param_3 & 0x80) == 0) { local_54 = 0; } else { local_54 = *(uint *)(*param_1 + 0x17c); } local_20 = param_2; local_18 = param_1; if ((*(ushort *)(param_2 + 10) & 0x28) == 0) { local_50 = param_5 + (-(ulong)local_54 - (long)(int)(uint)*(ushort *)(param_2 + 0x12)); *param_6 = (uint)*(ushort *)(param_2 + 0x12); if (param_3 < local_50) { local_28 = param_3; memmove(param_4,local_50,(ulong)(*(ushort *)(param_2 + 0x12) + local_54)); } LAB_00149e72: local_10 = local_50; } else { local_50 = param_3 + (local_54 + 2); *param_4 = 0; local_28 = local_50; do { if (param_5 <= local_28) goto LAB_00149e72; local_50 = local_28; uVar1 = (**(code **)(local_20 + 0x48))(local_20,local_54,&local_28,param_4); *param_6 = uVar1; } while (*param_6 != 0); mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_10 = (byte *)0x0; } return local_10; }
36,073
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/common.cpp
std::string string_repeat(const std::string & str, size_t n) { if (n == 0) { return ""; } std::string result; result.reserve(str.length() * n); for (size_t i = 0; i < n; ++i) { result += str; } return result; }
O2
cpp
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx testq %rdx, %rdx je 0x701cd movq %rdx, %r14 movq %rsi, %r15 leaq 0x10(%rbx), %rax movq %rax, (%rbx) andq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movq 0x8(%rsi), %rsi imulq %rdx, %rsi movq %rbx, %rdi callq 0x27380 subq $0x1, %r14 jb 0x701e1 movq %rbx, %rdi movq %r15, %rsi callq 0x278e0 jmp 0x701ba leaq 0x54f66(%rip), %rsi # 0xc513a leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x2ac52 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x701f0 movq %rax, %r14 movq %rbx, %rdi callq 0x27998 movq %r14, %rdi callq 0x27660
_Z13string_repeatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi test rdx, rdx jz short loc_701CD mov r14, rdx mov r15, rsi lea rax, [rbx+10h] mov [rbx], rax and qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 mov rsi, [rsi+8] imul rsi, rdx mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) loc_701BA: sub r14, 1 jb short loc_701E1 mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) jmp short loc_701BA loc_701CD: lea rsi, aSFailedToLoadI+2Ah; "" lea rdx, [rsp+28h+var_19] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_701E1: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn jmp short $+2 loc_701F0: mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long string_repeat(long long a1, long long a2, long long a3) { long long v3; // r14 if ( a3 ) { v3 = a3; *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, a3 * *(_QWORD *)(a2 + 8)); while ( v3-- != 0 ) std::string::append(a1, a2); } else { std::string::basic_string<std::allocator<char>>((_QWORD *)a1, (long long)""); } return a1; }
string_repeat: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI TEST RDX,RDX JZ 0x001701cd MOV R14,RDX MOV R15,RSI LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX AND qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [RSI + 0x8] IMUL RSI,RDX LAB_001701b2: MOV RDI,RBX CALL 0x00127380 LAB_001701ba: SUB R14,0x1 JC 0x001701e1 LAB_001701c0: MOV RDI,RBX MOV RSI,R15 CALL 0x001278e0 LAB_001701cb: JMP 0x001701ba LAB_001701cd: LEA RSI,[0x1c513a] LEA RDX,[RSP + 0xf] MOV RDI,RBX CALL 0x0012ac52 LAB_001701e1: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* string_repeat(std::__cxx11::string const&, unsigned long) */ string * string_repeat(string *param_1,ulong param_2) { long in_RDX; bool bVar1; allocator local_19; if (in_RDX == 0) { std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_19); } else { *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; /* try { // try from 001701b2 to 001701b9 has its CatchHandler @ 001701ee */ std::__cxx11::string::reserve((ulong)param_1); while (bVar1 = in_RDX != 0, in_RDX = in_RDX + -1, bVar1) { /* try { // try from 001701c0 to 001701ca has its CatchHandler @ 001701f0 */ std::__cxx11::string::append(param_1); } } return param_1; }
36,074
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O0
c
my_numcells_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x4c7dd movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xa1, %eax jl 0x4c798 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xdf, %eax jg 0x4c798 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x4c7d8 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x4c7be movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x4c7d6 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x4c7d8 jmp 0x4c758 movq -0x20(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_numcells_sjis: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_20], 0 loc_4C758: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_4C7DD mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0A1h jl short loc_4C798 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0DFh jg short loc_4C798 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_4C7D8 loc_4C798: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_4C7BE mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short loc_4C7D6 loc_4C7BE: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_4C7D6: jmp short $+2 loc_4C7D8: jmp loc_4C758 loc_4C7DD: mov rax, [rbp+var_20] pop rbp retn
long long my_numcells_sjis(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long v5; // [rsp+10h] [rbp-20h] v5 = 0LL; while ( (unsigned long long)a2 < a3 ) { if ( *a2 < 0xA1u || *a2 > 0xDFu ) { if ( *a2 <= 0x7Fu ) { ++v5; ++a2; } else { v5 += 2LL; a2 += 2; } } else { ++v5; ++a2; } } return v5; }
my_numcells_sjis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x20],0x0 LAB_0014c758: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0014c7dd MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa1 JL 0x0014c798 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xdf JG 0x0014c798 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0014c7d8 LAB_0014c798: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x0014c7be MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0014c7d6 LAB_0014c7be: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_0014c7d6: JMP 0x0014c7d8 LAB_0014c7d8: JMP 0x0014c758 LAB_0014c7dd: MOV RAX,qword ptr [RBP + -0x20] POP RBP RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { byte *local_30; long local_28; local_28 = 0; local_30 = param_2; while (local_30 < param_3) { if ((*local_30 < 0xa1) || (0xdf < *local_30)) { if (*local_30 < 0x80) { local_28 = local_28 + 1; local_30 = local_30 + 1; } else { local_28 = local_28 + 2; local_30 = local_30 + 2; } } else { local_28 = local_28 + 1; local_30 = local_30 + 1; } } return local_28; }
36,075
asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock>>>::wait_duration_msec(long) const
aimrt_mujoco_sim/_deps/asio-src/asio/include/asio/detail/timer_queue.hpp
virtual long wait_duration_msec(long max_duration) const { if (heap_.empty()) return max_duration; return this->to_msec( Time_Traits::to_posix_duration( Time_Traits::subtract(heap_[0].time_, Time_Traits::now())), max_duration); }
O3
cpp
asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock>>>::wait_duration_msec(long) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq 0x18(%rdi), %r14 cmpq 0x20(%rdi), %r14 je 0xf47c2 callq 0x801d0 movq %rsp, %rsi movq %rax, (%rsi) movq %r14, %rdi callq 0x808d0 testq %rax, %rax jle 0xf47c0 movq %rax, %rcx movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB mulq %rdx shrq $0x12, %rdx cmpq %rbx, %rdx cmovgeq %rbx, %rdx cmpq $0xf4240, %rcx # imm = 0xF4240 movl $0x1, %ebx cmovaeq %rdx, %rbx jmp 0xf47c2 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZNK4asio6detail11timer_queueINS0_18chrono_time_traitsINSt6chrono3_V212system_clockENS_11wait_traitsIS5_EEEEE18wait_duration_msecEl: push r14 push rbx push rax mov rbx, rsi mov r14, [rdi+18h] cmp r14, [rdi+20h] jz short loc_F47C2 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rsi, rsp mov [rsi], rax mov rdi, r14 call __ZN4asio6detail18chrono_time_traitsINSt6chrono3_V212system_clockENS_11wait_traitsIS4_EEE8subtractERKNS2_10time_pointIS4_NS2_8durationIlSt5ratioILl1ELl1000000000EEEEEESF_; asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>::subtract(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&) test rax, rax jle short loc_F47C0 mov rcx, rax mov rdx, 431BDE82D7B634DBh mul rdx shr rdx, 12h cmp rdx, rbx cmovge rdx, rbx cmp rcx, offset loc_F4240 mov ebx, 1 cmovnb rbx, rdx jmp short loc_F47C2 loc_F47C0: xor ebx, ebx loc_F47C2: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
unsigned long long asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>>::wait_duration_msec( std::chrono::_V2::system_clock *a1, signed long long a2) { long long v2; // rbx long long v3; // r14 unsigned long long v4; // rax unsigned long long v5; // rdx v2 = a2; v3 = *((_QWORD *)a1 + 3); if ( v3 != *((_QWORD *)a1 + 4) ) { std::chrono::_V2::system_clock::now(a1); v4 = asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>::subtract(v3); if ( (long long)v4 <= 0 ) { return 0LL; } else { v5 = v4 / 0xF4240; if ( (long long)(v4 / 0xF4240) >= a2 ) v5 = a2; v2 = 1LL; if ( v4 >= (unsigned long long)&loc_F4240 ) return v5; } } return v2; }
wait_duration_msec: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,qword ptr [RDI + 0x18] CMP R14,qword ptr [RDI + 0x20] JZ 0x001f47c2 CALL 0x001801d0 MOV RSI,RSP MOV qword ptr [RSI],RAX MOV RDI,R14 CALL 0x001808d0 TEST RAX,RAX JLE 0x001f47c0 MOV RCX,RAX MOV RDX,0x431bde82d7b634db MUL RDX SHR RDX,0x12 CMP RDX,RBX CMOVGE RDX,RBX CMP RCX,0xf4240 MOV EBX,0x1 CMOVNC RBX,RDX JMP 0x001f47c2 LAB_001f47c0: XOR EBX,EBX LAB_001f47c2: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* asio::detail::timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock, asio::wait_traits<std::chrono::_V2::system_clock> > >::wait_duration_msec(long) const */ ulong __thiscall asio::detail:: timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>> ::wait_duration_msec (timer_queue<asio::detail::chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>>> *this,long param_1) { time_point *ptVar1; ulong uVar2; ulong uVar3; int8 local_18; ptVar1 = *(time_point **)(this + 0x18); if (ptVar1 != *(time_point **)(this + 0x20)) { local_18 = std::chrono::_V2::system_clock::now(); uVar2 = chrono_time_traits<std::chrono::_V2::system_clock,asio::wait_traits<std::chrono::_V2::system_clock>> ::subtract(ptVar1,(time_point *)&local_18); if ((long)uVar2 < 1) { param_1 = 0; } else { uVar3 = uVar2 / 1000000; if (param_1 <= (long)(uVar2 / 1000000)) { uVar3 = param_1; } param_1 = 1; if (999999 < uVar2) { param_1 = uVar3; } } } return param_1; }
36,076
fmt::v10::detail::parse_align(char)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR inline auto parse_align(char c) -> align_t { switch (c) { case '<': return align::left; case '>': return align::right; case '^': return align::center; } return align::none; }
O0
c
fmt::v10::detail::parse_align(char): movb %dil, %al movb %al, -0x2(%rsp) movsbl -0x2(%rsp), %eax movl %eax, -0x8(%rsp) subl $0x3c, %eax je 0xa306d jmp 0xa3057 movl -0x8(%rsp), %eax subl $0x3e, %eax je 0xa3074 jmp 0xa3062 movl -0x8(%rsp), %eax subl $0x5e, %eax je 0xa307b jmp 0xa3082 movb $0x1, -0x1(%rsp) jmp 0xa3087 movb $0x2, -0x1(%rsp) jmp 0xa3087 movb $0x3, -0x1(%rsp) jmp 0xa3087 movb $0x0, -0x1(%rsp) movb -0x1(%rsp), %al retq nopl (%rax)
_ZN3fmt3v106detail11parse_alignEc: mov al, dil mov [rsp+var_2], al movsx eax, [rsp+var_2] mov [rsp+var_8], eax sub eax, 3Ch ; '<' jz short loc_A306D jmp short $+2 loc_A3057: mov eax, [rsp+var_8] sub eax, 3Eh ; '>' jz short loc_A3074 jmp short $+2 loc_A3062: mov eax, [rsp+var_8] sub eax, 5Eh ; '^' jz short loc_A307B jmp short loc_A3082 loc_A306D: mov [rsp+var_1], 1 jmp short loc_A3087 loc_A3074: mov [rsp+var_1], 2 jmp short loc_A3087 loc_A307B: mov [rsp+var_1], 3 jmp short loc_A3087 loc_A3082: mov [rsp+var_1], 0 loc_A3087: mov al, [rsp+var_1] retn
char fmt::v10::detail::parse_align(fmt::v10::detail *this) { switch ( (char)this ) { case '<': return 1; case '>': return 2; case '^': return 3; } return 0; }
parse_align: MOV AL,DIL MOV byte ptr [RSP + -0x2],AL MOVSX EAX,byte ptr [RSP + -0x2] MOV dword ptr [RSP + -0x8],EAX SUB EAX,0x3c JZ 0x001a306d JMP 0x001a3057 LAB_001a3057: MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x3e JZ 0x001a3074 JMP 0x001a3062 LAB_001a3062: MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x5e JZ 0x001a307b JMP 0x001a3082 LAB_001a306d: MOV byte ptr [RSP + -0x1],0x1 JMP 0x001a3087 LAB_001a3074: MOV byte ptr [RSP + -0x1],0x2 JMP 0x001a3087 LAB_001a307b: MOV byte ptr [RSP + -0x1],0x3 JMP 0x001a3087 LAB_001a3082: MOV byte ptr [RSP + -0x1],0x0 LAB_001a3087: MOV AL,byte ptr [RSP + -0x1] RET
/* fmt::v10::detail::parse_align(char) */ int8 fmt::v10::detail::parse_align(char param_1) { int iVar1; ulong uVar2; int1 local_1; iVar1 = (int)param_1; uVar2 = (ulong)(iVar1 - 0x3cU); if (iVar1 - 0x3cU == 0) { local_1 = 1; } else { uVar2 = (ulong)(iVar1 - 0x3eU); if (iVar1 - 0x3eU == 0) { local_1 = 2; } else { uVar2 = (ulong)(iVar1 - 0x5eU); if (iVar1 - 0x5eU == 0) { local_1 = 3; } else { local_1 = 0; } } } return CONCAT71((int7)(uVar2 >> 8),local_1); }
36,077
thr_lock_init
eloqsql/mysys/thr_lock.c
void thr_lock_init(THR_LOCK *lock) { DBUG_ENTER("thr_lock_init"); bzero((char*) lock,sizeof(*lock)); mysql_mutex_init(key_THR_LOCK_mutex, &lock->mutex, MY_MUTEX_INIT_FAST); lock->read.last= &lock->read.data; lock->read_wait.last= &lock->read_wait.data; lock->write_wait.last= &lock->write_wait.data; lock->write.last= &lock->write.data; mysql_mutex_lock(&THR_LOCK_lock); /* Add to locks in use */ lock->list.data=(void*) lock; thr_lock_thread_list=list_add(thr_lock_thread_list,&lock->list); mysql_mutex_unlock(&THR_LOCK_lock); DBUG_VOID_RETURN; }
O0
c
thr_lock_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0xf8, %edx callq 0x2a2c0 leaq 0xb8b169(%rip), %rax # 0xc8293c movl (%rax), %edi movq -0x8(%rbp), %rsi addq $0x18, %rsi leaq 0xb8be4c(%rip), %rdx # 0xc83630 callq 0xf7890 movq -0x8(%rbp), %rcx addq $0x70, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x8(%rbp), %rcx addq $0x60, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x8(%rbp), %rcx addq $0x80, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x8(%rbp), %rcx addq $0x90, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) leaq 0xb8bb3c(%rip), %rdi # 0xc83378 leaq 0x5ce45(%rip), %rsi # 0x154688 movl $0x1b0, %edx # imm = 0x1B0 callq 0xf7900 movq -0x8(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) leaq 0xb8bdc8(%rip), %rax # 0xc83628 movq (%rax), %rdi movq -0x8(%rbp), %rsi callq 0xdf390 movq %rax, %rcx leaq 0xb8bdb2(%rip), %rax # 0xc83628 movq %rcx, (%rax) leaq 0xb8baf8(%rip), %rdi # 0xc83378 callq 0xf7970 jmp 0xf7887 addq $0x10, %rsp popq %rbp retq nopl (%rax)
thr_lock_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] xor esi, esi mov edx, 0F8h call _memset lea rax, key_THR_LOCK_mutex mov edi, [rax] mov rsi, [rbp+var_8] add rsi, 18h lea rdx, my_fast_mutexattr call inline_mysql_mutex_init_11 mov rcx, [rbp+var_8] add rcx, 70h ; 'p' mov rax, [rbp+var_8] mov [rax+78h], rcx mov rcx, [rbp+var_8] add rcx, 60h ; '`' mov rax, [rbp+var_8] mov [rax+68h], rcx mov rcx, [rbp+var_8] add rcx, 80h mov rax, [rbp+var_8] mov [rax+88h], rcx mov rcx, [rbp+var_8] add rcx, 90h mov rax, [rbp+var_8] mov [rax+98h], rcx lea rdi, THR_LOCK_lock lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1B0h call inline_mysql_mutex_lock_27 mov rcx, [rbp+var_8] mov rax, [rbp+var_8] mov [rax+10h], rcx lea rax, thr_lock_thread_list mov rdi, [rax] mov rsi, [rbp+var_8] call list_add mov rcx, rax lea rax, thr_lock_thread_list mov [rax], rcx lea rdi, THR_LOCK_lock call inline_mysql_mutex_unlock_28 jmp short $+2 loc_F7887: add rsp, 10h pop rbp retn
long long thr_lock_init(_QWORD *a1) { memset(a1, 0LL, 248LL); inline_mysql_mutex_init_11(key_THR_LOCK_mutex, a1 + 3, &my_fast_mutexattr); a1[15] = a1 + 14; a1[13] = a1 + 12; a1[17] = a1 + 16; a1[19] = a1 + 18; inline_mysql_mutex_lock_27(&THR_LOCK_lock, "/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 432LL); a1[2] = a1; thr_lock_thread_list = (long long)list_add(thr_lock_thread_list, a1); return inline_mysql_mutex_unlock_28(&THR_LOCK_lock); }
thr_lock_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0xf8 CALL 0x0012a2c0 LEA RAX,[0xd8293c] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x18 LEA RDX,[0xd83630] CALL 0x001f7890 MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x70 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x78],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x60 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x80 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x90 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],RCX LEA RDI,[0xd83378] LEA RSI,[0x254688] MOV EDX,0x1b0 CALL 0x001f7900 MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX LEA RAX,[0xd83628] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x8] CALL 0x001df390 MOV RCX,RAX LEA RAX,[0xd83628] MOV qword ptr [RAX],RCX LEA RDI,[0xd83378] CALL 0x001f7970 JMP 0x001f7887 LAB_001f7887: ADD RSP,0x10 POP RBP RET
void thr_lock_init(void *param_1) { memset(param_1,0,0xf8); inline_mysql_mutex_init(key_THR_LOCK_mutex,(long)param_1 + 0x18,&my_fast_mutexattr); *(long *)((long)param_1 + 0x78) = (long)param_1 + 0x70; *(long *)((long)param_1 + 0x68) = (long)param_1 + 0x60; *(long *)((long)param_1 + 0x88) = (long)param_1 + 0x80; *(long *)((long)param_1 + 0x98) = (long)param_1 + 0x90; inline_mysql_mutex_lock (THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x1b0); *(void **)((long)param_1 + 0x10) = param_1; thr_lock_thread_list = list_add(thr_lock_thread_list,param_1); inline_mysql_mutex_unlock(THR_LOCK_lock); return; }
36,078
thr_lock_init
eloqsql/mysys/thr_lock.c
void thr_lock_init(THR_LOCK *lock) { DBUG_ENTER("thr_lock_init"); bzero((char*) lock,sizeof(*lock)); mysql_mutex_init(key_THR_LOCK_mutex, &lock->mutex, MY_MUTEX_INIT_FAST); lock->read.last= &lock->read.data; lock->read_wait.last= &lock->read_wait.data; lock->write_wait.last= &lock->write_wait.data; lock->write.last= &lock->write.data; mysql_mutex_lock(&THR_LOCK_lock); /* Add to locks in use */ lock->list.data=(void*) lock; thr_lock_thread_list=list_add(thr_lock_thread_list,&lock->list); mysql_mutex_unlock(&THR_LOCK_lock); DBUG_VOID_RETURN; }
O3
c
thr_lock_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movl $0xf8, %edx xorl %esi, %esi callq 0x292c0 leaq 0xb657c1(%rip), %rax # 0xc07d3c movl (%rax), %edi leaq 0x18(%rbx), %r14 leaq 0x2e3a88(%rip), %r15 # 0x386010 movq (%r15), %rax movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x58(%rbx) movq %r14, 0x50(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbx) leaq 0xb66489(%rip), %rsi # 0xc08a30 movq %r14, %rdi callq 0x29340 leaq 0x70(%rbx), %rax movq %rax, 0x78(%rbx) leaq 0x60(%rbx), %rax movq %rax, 0x68(%rbx) leaq 0x80(%rbx), %rax movq %rax, 0x88(%rbx) leaq 0x90(%rbx), %rax movq %rax, 0x98(%rbx) leaq 0xb66196(%rip), %r14 # 0xc08778 cmpq $0x0, 0x40(%r14) jne 0xa262d leaq 0xb66188(%rip), %rdi # 0xc08778 callq 0x29220 movq %rbx, 0x10(%rbx) leaq 0xb66428(%rip), %r12 # 0xc08a28 movq (%r12), %rdi movq %rbx, %rsi callq 0x94784 movq %rax, (%r12) movq 0x40(%r14), %rdi testq %rdi, %rdi jne 0xa2634 leaq 0xb66158(%rip), %rdi # 0xc08778 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x291e0 callq 0x2f1ce jmp 0xa25f5 movq (%r15), %rax callq *0x160(%rax) jmp 0xa2619
thr_lock_init: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov edx, 0F8h xor esi, esi call _memset lea rax, key_THR_LOCK_mutex mov edi, [rax] lea r14, [rbx+18h] lea r15, PSI_server mov rax, [r15] mov rsi, r14 call qword ptr [rax+40h] mov [rbx+58h], rax mov [rbx+50h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+40h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r14 call _pthread_mutex_init lea rax, [rbx+70h] mov [rbx+78h], rax lea rax, [rbx+60h] mov [rbx+68h], rax lea rax, [rbx+80h] mov [rbx+88h], rax lea rax, [rbx+90h] mov [rbx+98h], rax lea r14, THR_LOCK_lock cmp qword ptr [r14+40h], 0 jnz short loc_A262D lea rdi, THR_LOCK_lock call _pthread_mutex_lock loc_A25F5: mov [rbx+10h], rbx lea r12, thr_lock_thread_list mov rdi, [r12] mov rsi, rbx call list_add mov [r12], rax mov rdi, [r14+40h] test rdi, rdi jnz short loc_A2634 loc_A2619: lea rdi, THR_LOCK_lock pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_A262D: call thr_lock_init_cold_1 jmp short loc_A25F5 loc_A2634: mov rax, [r15] call qword ptr [rax+160h] jmp short loc_A2619
long long thr_lock_init(long long a1) { memset(a1, 0LL, 248LL); *(_QWORD *)(a1 + 88) = ((long long ( *)(_QWORD, long long))PSI_server[8])(key_THR_LOCK_mutex, a1 + 24); *(_QWORD *)(a1 + 80) = a1 + 24; *(_OWORD *)(a1 + 64) = 0LL; pthread_mutex_init(a1 + 24, &my_fast_mutexattr); *(_QWORD *)(a1 + 120) = a1 + 112; *(_QWORD *)(a1 + 104) = a1 + 96; *(_QWORD *)(a1 + 136) = a1 + 128; *(_QWORD *)(a1 + 152) = a1 + 144; if ( THR_LOCK_lock[8] ) thr_lock_init_cold_1(); else pthread_mutex_lock(THR_LOCK_lock); *(_QWORD *)(a1 + 16) = a1; thr_lock_thread_list = list_add(thr_lock_thread_list, (_QWORD *)a1); if ( THR_LOCK_lock[8] ) PSI_server[44](); return pthread_mutex_unlock(THR_LOCK_lock); }
thr_lock_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV EDX,0xf8 XOR ESI,ESI CALL 0x001292c0 LEA RAX,[0xd07d3c] MOV EDI,dword ptr [RAX] LEA R14,[RBX + 0x18] LEA R15,[0x486010] MOV RAX,qword ptr [R15] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x58],RAX MOV qword ptr [RBX + 0x50],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 LEA RSI,[0xd08a30] MOV RDI,R14 CALL 0x00129340 LEA RAX,[RBX + 0x70] MOV qword ptr [RBX + 0x78],RAX LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x68],RAX LEA RAX,[RBX + 0x80] MOV qword ptr [RBX + 0x88],RAX LEA RAX,[RBX + 0x90] MOV qword ptr [RBX + 0x98],RAX LEA R14,[0xd08778] CMP qword ptr [R14 + 0x40],0x0 JNZ 0x001a262d LEA RDI,[0xd08778] CALL 0x00129220 LAB_001a25f5: MOV qword ptr [RBX + 0x10],RBX LEA R12,[0xd08a28] MOV RDI,qword ptr [R12] MOV RSI,RBX CALL 0x00194784 MOV qword ptr [R12],RAX MOV RDI,qword ptr [R14 + 0x40] TEST RDI,RDI JNZ 0x001a2634 LAB_001a2619: LEA RDI,[0xd08778] POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001291e0 LAB_001a262d: CALL 0x0012f1ce JMP 0x001a25f5 LAB_001a2634: MOV RAX,qword ptr [R15] CALL qword ptr [RAX + 0x160] JMP 0x001a2619
void thr_lock_init(void *param_1) { pthread_mutex_t *__mutex; int8 uVar1; memset(param_1,0,0xf8); __mutex = (pthread_mutex_t *)((long)param_1 + 0x18); uVar1 = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_mutex,__mutex); *(int8 *)((long)param_1 + 0x58) = uVar1; *(pthread_mutex_t **)((long)param_1 + 0x50) = __mutex; *(int8 *)((long)param_1 + 0x40) = 0; *(int8 *)((long)param_1 + 0x48) = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); *(long *)((long)param_1 + 0x78) = (long)param_1 + 0x70; *(long *)((long)param_1 + 0x68) = (long)param_1 + 0x60; *(long *)((long)param_1 + 0x88) = (long)param_1 + 0x80; *(long *)((long)param_1 + 0x98) = (long)param_1 + 0x90; if (THR_LOCK_lock._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_lock); } else { thr_lock_init_cold_1(); } *(void **)((long)param_1 + 0x10) = param_1; thr_lock_thread_list = list_add(thr_lock_thread_list,param_1); if (THR_LOCK_lock._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_lock); return; }
36,079
my_strdup
eloqsql/mysys/my_malloc.c
char *my_strdup(PSI_memory_key key, const char *from, myf my_flags) { char *ptr; size_t length= strlen(from)+1; DBUG_ENTER("my_strdup"); if ((ptr= (char*) my_malloc(key, length, my_flags))) memcpy(ptr, from, length); DBUG_RETURN(ptr); }
O0
c
my_strdup: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x2a350 addq $0x1, %rax movq %rax, -0x28(%rbp) movl -0x4(%rbp), %edi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0xf3860 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0xf3d2f movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x2a090 jmp 0xf3d31 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strdup: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10] call _strlen add rax, 1 mov [rbp+var_28], rax mov edi, [rbp+var_4] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] call my_malloc mov [rbp+var_20], rax cmp rax, 0 jz short loc_F3D2F mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] call _memcpy loc_F3D2F: jmp short $+2 loc_F3D31: mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_strdup(unsigned int a1, long long a2, int a3) { const char *v4; // [rsp+8h] [rbp-28h] long long v5; // [rsp+10h] [rbp-20h] v4 = (const char *)(strlen(a2) + 1); v5 = my_malloc(a1, v4, a3); if ( v5 ) memcpy(v5, a2, v4); return v5; }
my_strdup: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a350 ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001f3860 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x001f3d2f MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0012a090 LAB_001f3d2f: JMP 0x001f3d31 LAB_001f3d31: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
void * my_strdup(int4 param_1,char *param_2,int8 param_3) { size_t sVar1; void *__dest; sVar1 = strlen(param_2); __dest = (void *)my_malloc(param_1,sVar1 + 1,param_3); if (__dest != (void *)0x0) { memcpy(__dest,param_2,sVar1 + 1); } return __dest; }
36,080
plutovg_path_traverse_dashed
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_traverse_dashed(const plutovg_path_t* path, float offset, const float* dashes, int ndashes, plutovg_path_traverse_func_t traverse_func, void* closure) { float dash_sum = 0.f; for(int i = 0; i < ndashes; ++i) dash_sum += dashes[i]; if(ndashes % 2 == 1) dash_sum *= 2.f; if(dash_sum <= 0.f) { plutovg_path_traverse(path, traverse_func, closure); return; } dasher_t dasher; dasher.dashes = dashes; dasher.ndashes = ndashes; dasher.start_phase = fmodf(offset, dash_sum); if(dasher.start_phase < 0.f) dasher.start_phase += dash_sum; dasher.start_index = 0; dasher.start_toggle = true; while(dasher.start_phase > 0.f && dasher.start_phase >= dasher.dashes[dasher.start_index % dasher.ndashes]) { dasher.start_phase -= dashes[dasher.start_index % dasher.ndashes]; dasher.start_toggle = !dasher.start_toggle; dasher.start_index++; } dasher.phase = dasher.start_phase; dasher.index = dasher.start_index; dasher.toggle = dasher.start_toggle; dasher.current_point = PLUTOVG_EMPTY_POINT; dasher.traverse_func = traverse_func; dasher.closure = closure; plutovg_path_traverse_flatten(path, dash_traverse_func, &dasher); }
O2
c
plutovg_path_traverse_dashed: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %r8, %rbx movq %rcx, %r14 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 xorl %eax, %eax testl %edx, %edx movl $0x0, %ecx cmovgl %edx, %ecx xorps %xmm1, %xmm1 cmpq %rax, %rcx je 0x26a43 addss (%r12,%rax,4), %xmm1 incq %rax jmp 0x26a33 movl %ebp, %eax andl $0x80000001, %eax # imm = 0x80000001 cmpl $0x1, %eax jne 0x26a53 addss %xmm1, %xmm1 xorps %xmm2, %xmm2 ucomiss %xmm1, %xmm2 jae 0x26ab5 movq %r12, 0x18(%rsp) movl %ebp, 0x20(%rsp) movaps %xmm1, (%rsp) callq 0xa3a0 xorps %xmm2, %xmm2 movaps (%rsp), %xmm3 addss %xmm0, %xmm3 movaps %xmm0, %xmm1 cmpltss %xmm2, %xmm1 andps %xmm1, %xmm3 andnps %xmm0, %xmm1 orps %xmm3, %xmm1 movss %xmm1, 0x24(%rsp) xorl %ecx, %ecx movb $0x1, %sil ucomiss %xmm2, %xmm1 jbe 0x26acf movl %ecx, %eax cltd idivl %ebp movss (%r12,%rdx,4), %xmm0 ucomiss %xmm0, %xmm1 jb 0x26acf subss %xmm0, %xmm1 xorb $0x1, %sil incl %ecx jmp 0x26a94 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x266f9 leaq 0x18(%rsp), %rdx movss %xmm1, 0xc(%rdx) movl %ecx, 0x14(%rdx) movb %sil, 0x1c(%rdx) movss %xmm1, 0x10(%rdx) movl %ecx, 0x18(%rdx) movb %sil, 0x1d(%rdx) andq $0x0, 0x20(%rdx) movq %r14, 0x28(%rdx) movq %rbx, 0x30(%rdx) leaq 0x15(%rip), %rsi # 0x26b15 movq %r15, %rdi callq 0x26795 addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
plutovg_path_traverse_dashed: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov rbx, r8 mov r14, rcx mov ebp, edx mov r12, rsi mov r15, rdi xor eax, eax test edx, edx mov ecx, 0 cmovg ecx, edx xorps xmm1, xmm1 loc_26A33: cmp rcx, rax jz short loc_26A43 addss xmm1, dword ptr [r12+rax*4] inc rax jmp short loc_26A33 loc_26A43: mov eax, ebp and eax, 80000001h cmp eax, 1 jnz short loc_26A53 addss xmm1, xmm1 loc_26A53: xorps xmm2, xmm2 ucomiss xmm2, xmm1 jnb short loc_26AB5 mov [rsp+78h+var_60], r12 mov [rsp+78h+var_58], ebp movaps [rsp+78h+var_78], xmm1 call _fmodf xorps xmm2, xmm2 movaps xmm3, [rsp+78h+var_78] addss xmm3, xmm0 movaps xmm1, xmm0 cmpltss xmm1, xmm2 andps xmm3, xmm1 andnps xmm1, xmm0 orps xmm1, xmm3 movss [rsp+78h+var_54], xmm1 xor ecx, ecx mov sil, 1 loc_26A94: ucomiss xmm1, xmm2 jbe short loc_26ACF mov eax, ecx cdq idiv ebp movss xmm0, dword ptr [r12+rdx*4] ucomiss xmm1, xmm0 jb short loc_26ACF subss xmm1, xmm0 xor sil, 1 inc ecx jmp short loc_26A94 loc_26AB5: mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp jmp plutovg_path_traverse loc_26ACF: lea rdx, [rsp+78h+var_60] movss dword ptr [rdx+0Ch], xmm1 mov [rdx+14h], ecx mov [rdx+1Ch], sil movss dword ptr [rdx+10h], xmm1 mov [rdx+18h], ecx mov [rdx+1Dh], sil and qword ptr [rdx+20h], 0 mov [rdx+28h], r14 mov [rdx+30h], rbx lea rsi, dash_traverse_func mov rdi, r15 call plutovg_path_traverse_flatten add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long plutovg_path_traverse_dashed( long long a1, long long a2, int a3, void ( *a4)(long long, long long, _QWORD *, long long), long long a5, __m128 a6) { long long v10; // rax long long v11; // rcx float v12; // xmm1_4 float v13; // xmm3_4 __m128 v14; // xmm1 float v15; // xmm1_4 int v16; // ecx char v17; // si long long v18; // rdx float v19; // xmm0_4 long long v21; // [rsp+18h] [rbp-60h] BYREF int v22; // [rsp+20h] [rbp-58h] float v23; // [rsp+24h] [rbp-54h] float v24; // [rsp+28h] [rbp-50h] int v25; // [rsp+2Ch] [rbp-4Ch] int v26; // [rsp+30h] [rbp-48h] char v27; // [rsp+34h] [rbp-44h] char v28; // [rsp+35h] [rbp-43h] long long v29; // [rsp+38h] [rbp-40h] void ( *v30)(long long, long long, _QWORD *, long long); // [rsp+40h] [rbp-38h] long long v31; // [rsp+48h] [rbp-30h] v10 = 0LL; v11 = 0LL; if ( a3 > 0 ) v11 = (unsigned int)a3; v12 = 0.0; while ( v11 != v10 ) v12 = v12 + *(float *)(a2 + 4 * v10++); if ( (a3 & 0x80000001) == 1 ) v12 = v12 + v12; if ( v12 <= 0.0 ) return plutovg_path_traverse(a1, a4, a5); v21 = a2; v22 = a3; *(double *)a6.m128_u64 = fmodf(*(double *)a6.m128_u64, v12); v13 = v12; v14 = _mm_cmplt_ss(a6, (__m128)0LL); LODWORD(v15) = _mm_andnot_ps(v14, a6).m128_u32[0] | COERCE_UNSIGNED_INT(v13 + a6.m128_f32[0]) & v14.m128_i32[0]; v23 = v15; v16 = 0; v17 = 1; while ( v15 > 0.0 ) { v18 = (unsigned int)(v16 >> 31); LODWORD(v18) = v16 % a3; v19 = *(float *)(a2 + 4 * v18); if ( v15 < v19 ) break; v15 = v15 - v19; v17 ^= 1u; ++v16; } v23 = v15; v25 = v16; v27 = v17; v24 = v15; v26 = v16; v28 = v17; v29 = 0LL; v30 = a4; v31 = a5; return plutovg_path_traverse_flatten( a1, (void ( *)(long long, long long, long long *, long long, double, double, double, double, double, double, double))dash_traverse_func, (long long)&v21); }
plutovg_path_traverse_dashed: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV RBX,R8 MOV R14,RCX MOV EBP,EDX MOV R12,RSI MOV R15,RDI XOR EAX,EAX TEST EDX,EDX MOV ECX,0x0 CMOVG ECX,EDX XORPS XMM1,XMM1 LAB_00126a33: CMP RCX,RAX JZ 0x00126a43 ADDSS XMM1,dword ptr [R12 + RAX*0x4] INC RAX JMP 0x00126a33 LAB_00126a43: MOV EAX,EBP AND EAX,0x80000001 CMP EAX,0x1 JNZ 0x00126a53 ADDSS XMM1,XMM1 LAB_00126a53: XORPS XMM2,XMM2 UCOMISS XMM2,XMM1 JNC 0x00126ab5 MOV qword ptr [RSP + 0x18],R12 MOV dword ptr [RSP + 0x20],EBP MOVAPS xmmword ptr [RSP],XMM1 CALL 0x0010a3a0 XORPS XMM2,XMM2 MOVAPS XMM3,xmmword ptr [RSP] ADDSS XMM3,XMM0 MOVAPS XMM1,XMM0 CMPLTSS XMM1,XMM2 ANDPS XMM3,XMM1 ANDNPS XMM1,XMM0 ORPS XMM1,XMM3 MOVSS dword ptr [RSP + 0x24],XMM1 XOR ECX,ECX MOV SIL,0x1 LAB_00126a94: UCOMISS XMM1,XMM2 JBE 0x00126acf MOV EAX,ECX CDQ IDIV EBP MOVSS XMM0,dword ptr [R12 + RDX*0x4] UCOMISS XMM1,XMM0 JC 0x00126acf SUBSS XMM1,XMM0 XOR SIL,0x1 INC ECX JMP 0x00126a94 LAB_00126ab5: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001266f9 LAB_00126acf: LEA RDX,[RSP + 0x18] MOVSS dword ptr [RDX + 0xc],XMM1 MOV dword ptr [RDX + 0x14],ECX MOV byte ptr [RDX + 0x1c],SIL MOVSS dword ptr [RDX + 0x10],XMM1 MOV dword ptr [RDX + 0x18],ECX MOV byte ptr [RDX + 0x1d],SIL AND qword ptr [RDX + 0x20],0x0 MOV qword ptr [RDX + 0x28],R14 MOV qword ptr [RDX + 0x30],RBX LEA RSI,[0x126b15] MOV RDI,R15 CALL 0x00126795 ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void plutovg_path_traverse_dashed (float param_1,int8 param_2,long param_3,uint param_4,int8 param_5, int8 param_6) { ulong uVar1; int iVar2; ulong uVar3; float fVar4; float fVar5; uVar1 = 0; uVar3 = 0; if (0 < (int)param_4) { uVar3 = (ulong)param_4; } fVar5 = 0.0; for (; uVar3 != uVar1; uVar1 = uVar1 + 1) { fVar5 = fVar5 + *(float *)(param_3 + uVar1 * 4); } if ((param_4 & 0x80000001) == 1) { fVar5 = fVar5 + fVar5; } if (0.0 < fVar5) { fVar4 = fmodf(param_1,fVar5); fVar5 = (float)(~-(uint)(fVar4 < 0.0) & (uint)fVar4 | (uint)(fVar5 + fVar4) & -(uint)(fVar4 < 0.0)); iVar2 = 0; while( true ) { if ((fVar5 <= 0.0) || (fVar4 = *(float *)(param_3 + ((long)iVar2 % (long)(int)param_4 & 0xffffffffU) * 4), fVar5 < fVar4)) break; fVar5 = fVar5 - fVar4; iVar2 = iVar2 + 1; } plutovg_path_traverse_flatten(param_2,dash_traverse_func); return; } plutovg_path_traverse(param_2,param_5,param_6); return; }
36,081
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64(int, long, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::OptionInterpreter::SetInt64( int number, int64_t value, FieldDescriptor::Type type, UnknownFieldSet* unknown_fields) { switch (type) { case FieldDescriptor::TYPE_INT64: unknown_fields->AddVarint(number, static_cast<uint64_t>(value)); break; case FieldDescriptor::TYPE_SFIXED64: unknown_fields->AddFixed64(number, static_cast<uint64_t>(value)); break; case FieldDescriptor::TYPE_SINT64: unknown_fields->AddVarint( number, internal::WireFormatLite::ZigZagEncode64(value)); break; default: GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT64: " << type; break; } }
O0
cpp
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64(int, long, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movl %esi, 0x8c(%rsp) movq %rdx, 0x80(%rsp) movl %ecx, 0x7c(%rsp) movq %r8, 0x70(%rsp) movl 0x7c(%rsp), %eax movl %eax, 0x24(%rsp) subl $0x3, %eax je 0x26e29c jmp 0x26e286 movl 0x24(%rsp), %eax subl $0x10, %eax je 0x26e2ba jmp 0x26e291 movl 0x24(%rsp), %eax subl $0x12, %eax je 0x26e2d8 jmp 0x26e310 movq 0x70(%rsp), %rdi movl 0x8c(%rsp), %esi movq 0x80(%rsp), %rdx callq 0x1e6be0 jmp 0x26e392 movq 0x70(%rsp), %rdi movl 0x8c(%rsp), %esi movq 0x80(%rsp), %rdx callq 0x1e6c80 jmp 0x26e392 movq 0x70(%rsp), %rax movq %rax, 0x18(%rsp) movl 0x8c(%rsp), %eax movl %eax, 0x20(%rsp) movq 0x80(%rsp), %rdi callq 0x1abd40 movq 0x18(%rsp), %rdi movl 0x20(%rsp), %esi movq %rax, %rdx callq 0x1e6be0 jmp 0x26e392 leaq 0x17debc(%rip), %rdx # 0x3ec1d3 leaq 0x38(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x1fac, %ecx # imm = 0x1FAC callq 0x19a670 movq 0x8(%rsp), %rdi leaq 0x180361(%rip), %rsi # 0x3ee69d callq 0x199f30 movq %rax, 0x10(%rsp) jmp 0x26e348 movq 0x10(%rsp), %rdi movl 0x7c(%rsp), %esi callq 0x19a440 movq %rax, (%rsp) jmp 0x26e35c movq (%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x19a0e0 jmp 0x26e36c leaq 0x38(%rsp), %rdi callq 0x19a6b0 jmp 0x26e392 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0x19a6b0 jmp 0x26e39a addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0x90db0 nopw %cs:(%rax,%rax)
_ZN6google8protobuf17DescriptorBuilder17OptionInterpreter8SetInt64EilNS0_15FieldDescriptor4TypeEPNS0_15UnknownFieldSetE: sub rsp, 98h mov [rsp+98h+var_C+4], rdi mov dword ptr [rsp+98h+var_C], esi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_1C], ecx mov [rsp+98h+var_28], r8 mov eax, [rsp+98h+var_1C] mov [rsp+98h+var_74], eax sub eax, 3 jz short loc_26E29C jmp short $+2 loc_26E286: mov eax, [rsp+98h+var_74] sub eax, 10h jz short loc_26E2BA jmp short $+2 loc_26E291: mov eax, [rsp+98h+var_74] sub eax, 12h jz short loc_26E2D8 jmp short loc_26E310 loc_26E29C: mov rdi, [rsp+98h+var_28]; this mov esi, dword ptr [rsp+98h+var_C]; int mov rdx, [rsp+98h+var_18]; unsigned __int64 call _ZN6google8protobuf15UnknownFieldSet9AddVarintEim; google::protobuf::UnknownFieldSet::AddVarint(int,ulong) jmp loc_26E392 loc_26E2BA: mov rdi, [rsp+98h+var_28]; this mov esi, dword ptr [rsp+98h+var_C]; __int64 mov rdx, [rsp+98h+var_18]; unsigned __int64 call _ZN6google8protobuf15UnknownFieldSet10AddFixed64Eim; google::protobuf::UnknownFieldSet::AddFixed64(int,ulong) jmp loc_26E392 loc_26E2D8: mov rax, [rsp+98h+var_28] mov [rsp+98h+var_80], rax mov eax, dword ptr [rsp+98h+var_C] mov [rsp+98h+var_78], eax mov rdi, [rsp+98h+var_18]; this call _ZN6google8protobuf8internal14WireFormatLite14ZigZagEncode64El; google::protobuf::internal::WireFormatLite::ZigZagEncode64(long) mov rdi, [rsp+98h+var_80]; this mov esi, [rsp+98h+var_78]; int mov rdx, rax; unsigned __int64 call _ZN6google8protobuf15UnknownFieldSet9AddVarintEim; google::protobuf::UnknownFieldSet::AddVarint(int,ulong) jmp loc_26E392 loc_26E310: lea rdx, aWorkspaceLlm4b_54; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+98h+var_60] mov [rsp+98h+var_90], rdi mov esi, 3 mov ecx, 1FACh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+98h+var_90] lea rsi, aInvalidWireTyp_1; "Invalid wire type for CPPTYPE_INT64: " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+98h+var_88], rax jmp short $+2 loc_26E348: mov rdi, [rsp+98h+var_88] mov esi, [rsp+98h+var_1C] call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int) mov [rsp+98h+var_98], rax jmp short $+2 loc_26E35C: mov rsi, [rsp+98h+var_98] lea rdi, [rsp+98h+var_6D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_26E36C: lea rdi, [rsp+98h+var_60]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() jmp short loc_26E392 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() jmp short loc_26E39A loc_26E392: add rsp, 98h retn loc_26E39A: mov rdi, [rsp+arg_28] call __Unwind_Resume
void google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64( long long a1, int a2, google::protobuf::internal::WireFormatLite *a3, int a4, google::protobuf::UnknownFieldSet *a5) { long long v5; // rax google::protobuf::internal::LogMessage *v6; // [rsp+0h] [rbp-98h] long long v7; // [rsp+10h] [rbp-88h] _BYTE v8[13]; // [rsp+2Bh] [rbp-6Dh] BYREF _BYTE v9[56]; // [rsp+38h] [rbp-60h] BYREF google::protobuf::UnknownFieldSet *v10; // [rsp+70h] [rbp-28h] int v11; // [rsp+7Ch] [rbp-1Ch] google::protobuf::internal::WireFormatLite *v12; // [rsp+80h] [rbp-18h] int v13[3]; // [rsp+8Ch] [rbp-Ch] *(_QWORD *)&v13[1] = a1; v13[0] = a2; v12 = a3; v11 = a4; v10 = a5; switch ( a4 ) { case 3: google::protobuf::UnknownFieldSet::AddVarint(v10, v13[0], (long long)v12); break; case 16: google::protobuf::UnknownFieldSet::AddFixed64(v10, v13[0], (long long)v12); break; case 18: v5 = google::protobuf::internal::WireFormatLite::ZigZagEncode64((long long)v12); google::protobuf::UnknownFieldSet::AddVarint(v10, v13[0], v5); break; default: google::protobuf::internal::LogMessage::LogMessage( (long long)v9, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 8108); v7 = google::protobuf::internal::LogMessage::operator<<( (long long)v9, (long long)"Invalid wire type for CPPTYPE_INT64: "); v6 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v7, v11); google::protobuf::internal::LogFinisher::operator=((long long)v8, v6); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9); break; } }
36,082
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64(int, long, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::OptionInterpreter::SetInt64( int number, int64_t value, FieldDescriptor::Type type, UnknownFieldSet* unknown_fields) { switch (type) { case FieldDescriptor::TYPE_INT64: unknown_fields->AddVarint(number, static_cast<uint64_t>(value)); break; case FieldDescriptor::TYPE_SFIXED64: unknown_fields->AddFixed64(number, static_cast<uint64_t>(value)); break; case FieldDescriptor::TYPE_SINT64: unknown_fields->AddVarint( number, internal::WireFormatLite::ZigZagEncode64(value)); break; default: GOOGLE_LOG(FATAL) << "Invalid wire type for CPPTYPE_INT64: " << type; break; } }
O3
cpp
google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64(int, long, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*): pushq %r14 pushq %rbx subq $0x48, %rsp cmpl $0x12, %ecx je 0xdc3a3 movl %ecx, %ebx cmpl $0x10, %ecx je 0xdc394 cmpl $0x3, %ebx je 0xdc3ae leaq 0x8fb4e(%rip), %rdx # 0x16be93 leaq 0x10(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x1fac, %ecx # imm = 0x1FAC callq 0x857c2 leaq 0x91ef1(%rip), %rsi # 0x16e254 movq %r14, %rdi callq 0x852c0 movq %rax, %rdi movl %ebx, %esi callq 0x855e8 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x10(%rsp), %rdi callq 0x857e0 addq $0x48, %rsp popq %rbx popq %r14 retq movq %r8, %rdi addq $0x48, %rsp popq %rbx popq %r14 jmp 0xa31c8 leaq (%rdx,%rdx), %rax sarq $0x3f, %rdx xorq %rax, %rdx movq %r8, %rdi addq $0x48, %rsp popq %rbx popq %r14 jmp 0xa314e jmp 0xdc3bf movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220
_ZN6google8protobuf17DescriptorBuilder17OptionInterpreter8SetInt64EilNS0_15FieldDescriptor4TypeEPNS0_15UnknownFieldSetE: push r14 push rbx sub rsp, 48h cmp ecx, 12h jz short loc_DC3A3 mov ebx, ecx cmp ecx, 10h jz short loc_DC394 cmp ebx, 3 jz short loc_DC3AE lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+58h+var_48] mov rdi, r14 mov esi, 3 mov ecx, 1FACh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aInvalidWireTyp_1; "Invalid wire type for CPPTYPE_INT64: " mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov rdi, rax mov esi, ebx call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int) lea rdi, [rsp+58h+var_49] mov rsi, rax; int call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() add rsp, 48h pop rbx pop r14 retn loc_DC394: mov rdi, r8; this add rsp, 48h pop rbx pop r14 jmp _ZN6google8protobuf15UnknownFieldSet10AddFixed64Eim; google::protobuf::UnknownFieldSet::AddFixed64(int,ulong) loc_DC3A3: lea rax, [rdx+rdx] sar rdx, 3Fh xor rdx, rax; unsigned __int64 loc_DC3AE: mov rdi, r8; this add rsp, 48h pop rbx pop r14 jmp _ZN6google8protobuf15UnknownFieldSet9AddVarintEim; google::protobuf::UnknownFieldSet::AddVarint(int,ulong) jmp short $+2 loc_DC3BF: mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
void google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64( long long a1, unsigned int a2, long long a3, unsigned int a4, google::protobuf::UnknownFieldSet *a5) { long long v6; // rax char *v7; // rdx google::protobuf::internal::LogMessage *v8; // rax char v9; // [rsp+Fh] [rbp-49h] BYREF _BYTE v10[72]; // [rsp+10h] [rbp-48h] BYREF switch ( a4 ) { case 0x12u: a3 = (2 * a3) ^ (a3 >> 63); break; case 0x10u: google::protobuf::UnknownFieldSet::AddFixed64(a5, a2, a3); return; case 3u: break; default: google::protobuf::internal::LogMessage::LogMessage( (long long)v10, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 8108); v6 = google::protobuf::internal::LogMessage::operator<<( (long long)v10, (long long)"Invalid wire type for CPPTYPE_INT64: "); v8 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v6, a4, v7); google::protobuf::internal::LogFinisher::operator=((long long)&v9, v8); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v10); return; } google::protobuf::UnknownFieldSet::AddVarint(a5, a2, a3); }
SetInt64: PUSH R14 PUSH RBX SUB RSP,0x48 CMP ECX,0x12 JZ 0x001dc3a3 MOV EBX,ECX CMP ECX,0x10 JZ 0x001dc394 CMP EBX,0x3 JZ 0x001dc3ae LEA RDX,[0x26be93] LEA R14,[RSP + 0x10] MOV RDI,R14 MOV ESI,0x3 MOV ECX,0x1fac CALL 0x001857c2 LAB_001dc35c: LEA RSI,[0x26e254] MOV RDI,R14 CALL 0x001852c0 MOV RDI,RAX MOV ESI,EBX CALL 0x001855e8 LAB_001dc375: LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LAB_001dc382: LEA RDI,[RSP + 0x10] CALL 0x001857e0 ADD RSP,0x48 POP RBX POP R14 RET LAB_001dc394: MOV RDI,R8 ADD RSP,0x48 POP RBX POP R14 JMP 0x001a31c8 LAB_001dc3a3: LEA RAX,[RDX + RDX*0x1] SAR RDX,0x3f XOR RDX,RAX LAB_001dc3ae: MOV RDI,R8 ADD RSP,0x48 POP RBX POP R14 JMP 0x001a314e
/* google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64(int, long, google::protobuf::FieldDescriptor::Type, google::protobuf::UnknownFieldSet*) */ void __thiscall google::protobuf::DescriptorBuilder::OptionInterpreter::SetInt64 (int8 param_1_00,int param_1,ulong param_2,int param_4,UnknownFieldSet *param_5) { LogMessage *pLVar1; LogFinisher local_49; LogMessage local_48 [56]; if (param_4 == 0x12) { param_2 = (long)param_2 >> 0x3f ^ param_2 * 2; } else { if (param_4 == 0x10) { UnknownFieldSet::AddFixed64(param_5,param_1,param_2); return; } if (param_4 != 3) { internal::LogMessage::LogMessage (local_48,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x1fac); /* try { // try from 001dc35c to 001dc374 has its CatchHandler @ 001dc3bf */ pLVar1 = (LogMessage *) internal::LogMessage::operator<<(local_48,"Invalid wire type for CPPTYPE_INT64: "); pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,param_4); /* try { // try from 001dc375 to 001dc381 has its CatchHandler @ 001dc3bd */ internal::LogFinisher::operator=(&local_49,pLVar1); internal::LogMessage::~LogMessage(local_48); return; } } UnknownFieldSet::AddVarint(param_5,param_1,param_2); return; }
36,083
google::protobuf::compiler::cpp::EscapeTrigraphs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.cc
std::string EscapeTrigraphs(const std::string& to_escape) { return StringReplace(to_escape, "?", "\\?", true); }
O3
cpp
google::protobuf::compiler::cpp::EscapeTrigraphs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x16675a(%rip), %rsi # 0x19d764 leaq 0x166754(%rip), %rdx # 0x19d765 leaq 0x28(%rsp), %rdi callq 0x250b2 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x166737(%rip), %rsi # 0x19d763 leaq 0x166732(%rip), %rdx # 0x19d765 leaq 0x8(%rsp), %rdi callq 0x250b2 leaq 0x28(%rsp), %rdx leaq 0x8(%rsp), %rcx movq %rbx, %rdi movq %r14, %rsi movl $0x1, %r8d callq 0x1096a8 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x37067 callq 0x1f4a0 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x37076 callq 0x1f4a0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x3709c callq 0x1f4a0 jmp 0x3709c movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x370ab callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler3cpp15EscapeTrigraphsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rsp+68h+var_30] mov [r15-10h], r15 lea rsi, asc_19D763+1; "?" lea rdx, asc_19D763+2; "" lea rdi, [rsp+68h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+68h+var_50] mov [r12-10h], r12 lea rsi, asc_19D763; "\\?" lea rdx, asc_19D763+2; "" lea rdi, [rsp+68h+var_60] 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 rdx, [rsp+68h+var_40] lea rcx, [rsp+68h+var_60] mov rdi, rbx mov rsi, r14 mov r8d, 1 call _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_b; google::protobuf::StringReplace(std::string const&,std::string const&,std::string const&,bool) mov rdi, [rsp+68h+var_60]; void * cmp rdi, r12 jz short loc_37067 call __ZdlPv; operator delete(void *) loc_37067: mov rdi, [rsp+68h+var_40]; void * cmp rdi, r15 jz short loc_37076 call __ZdlPv; operator delete(void *) loc_37076: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_3709C call __ZdlPv; operator delete(void *) jmp short loc_3709C mov rbx, rax loc_3709C: mov rdi, [rsp+arg_20]; void * cmp rdi, r15 jz short loc_370AB call __ZdlPv; operator delete(void *) loc_370AB: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::compiler::cpp::EscapeTrigraphs(long long a1, long long a2) { void *v3[2]; // [rsp+8h] [rbp-60h] BYREF _BYTE v4[16]; // [rsp+18h] [rbp-50h] BYREF void *v5[2]; // [rsp+28h] [rbp-40h] BYREF _BYTE v6[48]; // [rsp+38h] [rbp-30h] BYREF v5[0] = v6; std::string::_M_construct<char const*>((long long)v5, "?", (long long)""); v3[0] = v4; std::string::_M_construct<char const*>((long long)v3, "\\?", (long long)""); google::protobuf::StringReplace(a1, a2, v5, v3, 1LL); if ( v3[0] != v4 ) operator delete(v3[0]); if ( v5[0] != v6 ) operator delete(v5[0]); return a1; }
EscapeTrigraphs: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x29d764] LEA RDX,[0x29d765] LEA RDI,[RSP + 0x28] CALL 0x001250b2 LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LAB_00137025: LEA RSI,[0x29d763] LEA RDX,[0x29d765] LEA RDI,[RSP + 0x8] CALL 0x001250b2 LAB_0013703d: LEA RDX,[RSP + 0x28] LEA RCX,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 MOV R8D,0x1 CALL 0x002096a8 LAB_00137058: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x00137067 CALL 0x0011f4a0 LAB_00137067: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R15 JZ 0x00137076 CALL 0x0011f4a0 LAB_00137076: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* google::protobuf::compiler::cpp::EscapeTrigraphs(std::__cxx11::string const&) */ cpp * __thiscall google::protobuf::compiler::cpp::EscapeTrigraphs(cpp *this,string *param_1) { int1 *local_60 [2]; int1 local_50 [16]; int1 *local_40 [2]; int1 local_30 [16]; local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_0029d764,&DAT_0029d765); /* try { // try from 00137025 to 0013703c has its CatchHandler @ 00137099 */ local_60[0] = local_50; std::__cxx11::string::_M_construct<char_const*>(local_60,&DAT_0029d763,&DAT_0029d765); /* try { // try from 0013703d to 00137057 has its CatchHandler @ 00137085 */ StringReplace((protobuf *)this,param_1,(string *)local_40,(string *)local_60,true); if (local_60[0] != local_50) { operator_delete(local_60[0]); } if (local_40[0] != local_30) { operator_delete(local_40[0]); } return this; }
36,084
ResultCaptureNode::exec(int)
The-Pocket[P]PocketFlow-CPP/main.cpp
std::nullptr_t exec(int prepResult) override { capturedValue = prepResult; // Capture the value // Also store in params map like the Java example this->params["capturedValue"] = prepResult; return nullptr; }
O1
cpp
ResultCaptureNode::exec(int): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movl %esi, 0xc(%rsp) movl %esi, 0x9c(%rdi) leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9c9(%rip), %rsi # 0x11173 leaq 0x9cf(%rip), %rdx # 0x11180 leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x90e4 addq $0x8, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x6d60 leaq 0xc(%rsp), %rsi movq %rax, %rdi callq 0x10f68 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x107f1 movq 0x20(%rsp), %rsi incq %rsi callq 0x5180 xorl %eax, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x10817 movq 0x20(%rsp), %rsi incq %rsi callq 0x5180 movq %rbx, %rdi callq 0x52a0 nop
_ZN17ResultCaptureNode4execEi: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov [rsp+48h+var_3C], esi mov [rdi+9Ch], esi lea r15, [rsp+48h+var_28] mov [r15-10h], r15 lea rsi, aCapturedvalue; "capturedValue" lea rdx, aCapturedvalue+0Dh; "" lea r14, [rsp+48h+var_38] mov rdi, 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) add rbx, 8 mov rdi, rbx mov rsi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS5_ESaISt4pairIKS5_S6_EEEixEOS5_; std::map<std::string,std::any>::operator[](std::string&&) lea rsi, [rsp+48h+var_3C] mov rdi, rax call _ZNSt3anyaSIRiEENSt9enable_ifIXsr21is_copy_constructibleINS2_IXnt9is_same_vINSt5decayIT_E4typeES_EES6_E4typeEEE5valueERS_E4typeEOS4_ mov rdi, [rsp+48h+var_38]; void * cmp rdi, r15 jz short loc_107F1 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_107F1: xor eax, eax add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_8]; void * cmp rdi, r15 jz short loc_10817 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10817: mov rdi, rbx call __Unwind_Resume
long long ResultCaptureNode::exec(ResultCaptureNode *this, int a2) { long long v2; // rax int v4; // [rsp+Ch] [rbp-3Ch] BYREF void *v5[2]; // [rsp+10h] [rbp-38h] BYREF _QWORD v6[5]; // [rsp+20h] [rbp-28h] BYREF v4 = a2; *((_DWORD *)this + 39) = a2; v5[0] = v6; std::string::_M_construct<char const*>(v5, "capturedValue", (long long)""); v2 = std::map<std::string,std::any>::operator[]((long long)this + 8, (long long)v5); std::any::operator=<int &>(v2, &v4); if ( v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return 0LL; }
exec: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV dword ptr [RSP + 0xc],ESI MOV dword ptr [RDI + 0x9c],ESI LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x111173] LEA RDX,[0x111180] LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x001090e4 ADD RBX,0x8 LAB_001107c2: MOV RDI,RBX MOV RSI,R14 CALL 0x00106d60 LEA RSI,[RSP + 0xc] MOV RDI,RAX CALL 0x00110f68 LAB_001107da: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x001107f1 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00105180 LAB_001107f1: XOR EAX,EAX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ResultCaptureNode::exec(int) */ int8 __thiscall ResultCaptureNode::exec(ResultCaptureNode *this,int param_1) { any *this_00; int local_3c; long *local_38 [2]; long local_28 [2]; *(int *)(this + 0x9c) = param_1; local_3c = param_1; local_38[0] = local_28; std::__cxx11::string::_M_construct<char_const*>((string *)local_38,"capturedValue",""); /* try { // try from 001107c2 to 001107d9 has its CatchHandler @ 001107fd */ this_00 = (any *)std:: map<std::__cxx11::string,std::any,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> ::operator[]((map<std::__cxx11::string,std::any,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> *)(this + 8),(string *)local_38); std::any::operator=(this_00,&local_3c); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return 0; }
36,085
ResultCaptureNode::exec(int)
The-Pocket[P]PocketFlow-CPP/main.cpp
std::nullptr_t exec(int prepResult) override { capturedValue = prepResult; // Capture the value // Also store in params map like the Java example this->params["capturedValue"] = prepResult; return nullptr; }
O2
cpp
ResultCaptureNode::exec(int): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl %esi, 0x4(%rsp) movl %esi, 0x9c(%rdi) leaq 0xeae(%rip), %rsi # 0xe157 leaq 0x8(%rsp), %r14 leaq 0x3(%rsp), %rdx movq %r14, %rdi callq 0x61be addq $0x8, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x637c leaq 0x4(%rsp), %rsi movq %rax, %rdi callq 0xd90a leaq 0x8(%rsp), %rdi callq 0x50e0 xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x50e0 movq %rbx, %rdi callq 0x52d0
_ZN17ResultCaptureNode4execEi: push r14 push rbx sub rsp, 28h mov rbx, rdi mov [rsp+38h+var_34], esi mov [rdi+9Ch], esi lea rsi, aCapturedvalue; "capturedValue" lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_35] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) add rbx, 8 mov rdi, rbx mov rsi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS5_ESaISt4pairIKS5_S6_EEEixEOS5_; std::map<std::string,std::any>::operator[](std::string&&) lea rsi, [rsp+38h+var_34] mov rdi, rax call _ZNSt3anyaSIRiEENSt9enable_ifIXsr21is_copy_constructibleINS2_IXnt9is_same_vINSt5decayIT_E4typeES_EES6_E4typeEEE5valueERS_E4typeEOS4_ lea rdi, [rsp+38h+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() xor eax, eax add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long ResultCaptureNode::exec(ResultCaptureNode *this, int a2) { long long v2; // rax int v4; // [rsp+4h] [rbp-34h] BYREF _QWORD v5[6]; // [rsp+8h] [rbp-30h] BYREF v4 = a2; *((_DWORD *)this + 39) = a2; std::string::basic_string<std::allocator<char>>(v5, (long long)"capturedValue"); v2 = std::map<std::string,std::any>::operator[]((long long)this + 8, (long long)v5); std::any::operator=<int &>(v2, &v4); std::string::~string(v5); return 0LL; }
exec: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV dword ptr [RSP + 0x4],ESI MOV dword ptr [RDI + 0x9c],ESI LEA RSI,[0x10e157] LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x3] MOV RDI,R14 CALL 0x001061be ADD RBX,0x8 LAB_0010d2bf: MOV RDI,RBX MOV RSI,R14 CALL 0x0010637c LEA RSI,[RSP + 0x4] MOV RDI,RAX CALL 0x0010d90a LAB_0010d2d7: LEA RDI,[RSP + 0x8] CALL 0x001050e0 XOR EAX,EAX ADD RSP,0x28 POP RBX POP R14 RET
/* ResultCaptureNode::exec(int) */ int8 __thiscall ResultCaptureNode::exec(ResultCaptureNode *this,int param_1) { any *this_00; allocator local_35; int local_34; string local_30 [32]; *(int *)(this + 0x9c) = param_1; local_34 = param_1; std::__cxx11::string::string<std::allocator<char>>(local_30,"capturedValue",&local_35); /* try { // try from 0010d2bf to 0010d2d6 has its CatchHandler @ 0010d2eb */ this_00 = (any *)std:: map<std::__cxx11::string,std::any,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> ::operator[]((map<std::__cxx11::string,std::any,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> *)(this + 8),local_30); std::any::operator=(this_00,&local_34); std::__cxx11::string::~string(local_30); return 0; }
36,086
ResultCaptureNode::exec(int)
The-Pocket[P]PocketFlow-CPP/main.cpp
std::nullptr_t exec(int prepResult) override { capturedValue = prepResult; // Capture the value // Also store in params map like the Java example this->params["capturedValue"] = prepResult; return nullptr; }
O3
cpp
ResultCaptureNode::exec(int): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movl %esi, 0xc(%rsp) movl %esi, 0x9c(%rdi) leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xaab(%rip), %rsi # 0x11173 leaq 0xab1(%rip), %rdx # 0x11180 leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x9030 addq $0x8, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x6cf4 leaq 0xc(%rsp), %rsi movq %rax, %rdi callq 0x10ece movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x1070f movq 0x20(%rsp), %rsi incq %rsi callq 0x5180 xorl %eax, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x10735 movq 0x20(%rsp), %rsi incq %rsi callq 0x5180 movq %rbx, %rdi callq 0x52a0 nop
_ZN17ResultCaptureNode4execEi: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov [rsp+48h+var_3C], esi mov [rdi+9Ch], esi lea r15, [rsp+48h+var_28] mov [r15-10h], r15 lea rsi, aCapturedvalue; "capturedValue" lea rdx, aCapturedvalue+0Dh; "" lea r14, [rsp+48h+var_38] mov rdi, 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) add rbx, 8 mov rdi, rbx mov rsi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt3anySt4lessIS5_ESaISt4pairIKS5_S6_EEEixEOS5_; std::map<std::string,std::any>::operator[](std::string&&) lea rsi, [rsp+48h+var_3C] mov rdi, rax call _ZNSt3anyaSIRiEENSt9enable_ifIXsr21is_copy_constructibleINS2_IXnt9is_same_vINSt5decayIT_E4typeES_EES6_E4typeEEE5valueERS_E4typeEOS4_ mov rdi, [rsp+48h+var_38]; void * cmp rdi, r15 jz short loc_1070F mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1070F: xor eax, eax add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_8]; void * cmp rdi, r15 jz short loc_10735 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10735: mov rdi, rbx call __Unwind_Resume
long long ResultCaptureNode::exec(ResultCaptureNode *this, int a2) { long long v2; // rax int v4; // [rsp+Ch] [rbp-3Ch] BYREF void *v5[2]; // [rsp+10h] [rbp-38h] BYREF _QWORD v6[5]; // [rsp+20h] [rbp-28h] BYREF v4 = a2; *((_DWORD *)this + 39) = a2; v5[0] = v6; std::string::_M_construct<char const*>((long long)v5, "capturedValue", (long long)""); v2 = std::map<std::string,std::any>::operator[]((long long)this + 8, (long long)v5); std::any::operator=<int &>(v2, &v4); if ( v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return 0LL; }
exec: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV dword ptr [RSP + 0xc],ESI MOV dword ptr [RDI + 0x9c],ESI LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[0x111173] LEA RDX,[0x111180] LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x00109030 ADD RBX,0x8 LAB_001106e0: MOV RDI,RBX MOV RSI,R14 CALL 0x00106cf4 LEA RSI,[RSP + 0xc] MOV RDI,RAX CALL 0x00110ece LAB_001106f8: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x0011070f MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00105180 LAB_0011070f: XOR EAX,EAX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ResultCaptureNode::exec(int) */ int8 __thiscall ResultCaptureNode::exec(ResultCaptureNode *this,int param_1) { any *this_00; int local_3c; long *local_38 [2]; long local_28 [2]; *(int *)(this + 0x9c) = param_1; local_3c = param_1; local_38[0] = local_28; std::__cxx11::string::_M_construct<char_const*>((string *)local_38,"capturedValue",""); /* try { // try from 001106e0 to 001106f7 has its CatchHandler @ 0011071b */ this_00 = (any *)std:: map<std::__cxx11::string,std::any,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> ::operator[]((map<std::__cxx11::string,std::any,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::any>>> *)(this + 8),(string *)local_38); std::any::operator=(this_00,&local_3c); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return 0; }
36,087
apply_shift
eloqsql/strings/ctype-uca.c
static my_bool apply_shift(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, int level, uint16 *to, size_t nweights) { /* Apply level difference. */ if (nweights) { to[nweights - 1]+= r->diff[level]; if (r->before_level == 1) /* Apply "&[before primary]" */ { if (nweights >= 2) { to[nweights - 2]--; /* Reset before */ if (rules->shift_after_method == my_shift_method_expand) { /* Special case. Don't let characters shifted after X and before next(X) intermix to each other. For example: "[shift-after-method expand] &0 < a &[before primary]1 < A". I.e. we reorder 'a' after '0', and then 'A' before '1'. 'a' must be sorted before 'A'. Note, there are no real collations in CLDR which shift after and before two neighbourgh characters. We need this just in case. Reserving 4096 (0x1000) weights for such cases is perfectly enough. */ to[nweights - 1]+= 0x1000; /* W3-TODO: const may vary on levels 2,3*/ } } else { my_snprintf(loader->error, sizeof(loader->error), "Can't reset before " "a primary ignorable character U+%04lX", r->base[0]); return TRUE; } } } else { /* Shift to an ignorable character, e.g.: & \u0000 < \u0001 */ DBUG_ASSERT(to[0] == 0); to[0]= r->diff[level]; } return FALSE; }
O0
c
apply_shift: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x56a6a movq -0x20(%rbp), %rax movslq -0x24(%rbp), %rcx movl 0x80(%rax,%rcx,4), %esi movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx subq $0x1, %rcx movzwl (%rax,%rcx,2), %edx addl %esi, %edx movw %dx, (%rax,%rcx,2) movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x56a68 cmpq $0x2, -0x38(%rbp) jb 0x56a42 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx subq $0x2, %rcx movw (%rax,%rcx,2), %dx addw $-0x1, %dx movw %dx, (%rax,%rcx,2) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x56a40 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx subq $0x1, %rcx movzwl (%rax,%rcx,2), %edx addl $0x1000, %edx # imm = 0x1000 movw %dx, (%rax,%rcx,2) jmp 0x56a66 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movq (%rax), %rcx movl $0x80, %esi leaq 0x2bf0f(%rip), %rdx # 0x82968 movb $0x0, %al callq 0x7c650 movb $0x1, -0x1(%rbp) jmp 0x56a8b jmp 0x56a68 jmp 0x56a87 jmp 0x56a6c jmp 0x56a6e movq -0x20(%rbp), %rax movslq -0x24(%rbp), %rcx movl 0x80(%rax,%rcx,4), %eax movw %ax, %cx movq -0x30(%rbp), %rax movw %cx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_shift: 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_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 cmp [rbp+var_38], 0 jz loc_56A6A mov rax, [rbp+var_20] movsxd rcx, [rbp+var_24] mov esi, [rax+rcx*4+80h] mov rax, [rbp+var_30] mov rcx, [rbp+var_38] sub rcx, 1 movzx edx, word ptr [rax+rcx*2] add edx, esi mov [rax+rcx*2], dx mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_56A68 cmp [rbp+var_38], 2 jb short loc_56A42 mov rax, [rbp+var_30] mov rcx, [rbp+var_38] sub rcx, 2 mov dx, [rax+rcx*2] add dx, 0FFFFh mov [rax+rcx*2], dx mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_56A40 mov rax, [rbp+var_30] mov rcx, [rbp+var_38] sub rcx, 1 movzx edx, word ptr [rax+rcx*2] add edx, 1000h mov [rax+rcx*2], dx loc_56A40: jmp short loc_56A66 loc_56A42: mov rdi, [rbp+var_10] mov rax, [rbp+var_20] mov rcx, [rax] mov esi, 80h lea rdx, aCanTResetBefor; "Can't reset before a primary ignorable "... mov al, 0 call my_snprintf mov [rbp+var_1], 1 jmp short loc_56A8B loc_56A66: jmp short $+2 loc_56A68: jmp short loc_56A87 loc_56A6A: jmp short $+2 loc_56A6C: jmp short $+2 loc_56A6E: mov rax, [rbp+var_20] movsxd rcx, [rbp+var_24] mov eax, [rax+rcx*4+80h] mov cx, ax mov rax, [rbp+var_30] mov [rax], cx loc_56A87: mov [rbp+var_1], 0 loc_56A8B: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char apply_shift(int a1, long long a2, _QWORD *a3, int a4, _WORD *a5, unsigned long long a6) { if ( !a6 ) { *a5 = *((_DWORD *)a3 + a4 + 32); return 0; } a5[a6 - 1] += *((_DWORD *)a3 + a4 + 32); if ( a3[18] != 1LL ) return 0; if ( a6 >= 2 ) { --a5[a6 - 2]; if ( *(_DWORD *)(a2 + 48) == 1 ) a5[a6 - 1] += 4096; return 0; } my_snprintf(a1, 128, (unsigned int)"Can't reset before a primary ignorable character U+%04lX", *a3, (_DWORD)a5, a6); return 1; }
apply_shift: 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 dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 CMP qword ptr [RBP + -0x38],0x0 JZ 0x00156a6a MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,dword ptr [RBP + -0x24] MOV ESI,dword ptr [RAX + RCX*0x4 + 0x80] MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] SUB RCX,0x1 MOVZX EDX,word ptr [RAX + RCX*0x2] ADD EDX,ESI MOV word ptr [RAX + RCX*0x2],DX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x00156a68 CMP qword ptr [RBP + -0x38],0x2 JC 0x00156a42 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] SUB RCX,0x2 MOV DX,word ptr [RAX + RCX*0x2] ADD DX,-0x1 MOV word ptr [RAX + RCX*0x2],DX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x00156a40 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] SUB RCX,0x1 MOVZX EDX,word ptr [RAX + RCX*0x2] ADD EDX,0x1000 MOV word ptr [RAX + RCX*0x2],DX LAB_00156a40: JMP 0x00156a66 LAB_00156a42: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV ESI,0x80 LEA RDX,[0x182968] MOV AL,0x0 CALL 0x0017c650 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00156a8b LAB_00156a66: JMP 0x00156a68 LAB_00156a68: JMP 0x00156a87 LAB_00156a6a: JMP 0x00156a6c LAB_00156a6c: JMP 0x00156a6e LAB_00156a6e: MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RAX + RCX*0x4 + 0x80] MOV CX,AX MOV RAX,qword ptr [RBP + -0x30] MOV word ptr [RAX],CX LAB_00156a87: MOV byte ptr [RBP + -0x1],0x0 LAB_00156a8b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 apply_shift(int8 param_1,long param_2,int8 *param_3,int param_4,int2 *param_5, ulong param_6) { if (param_6 == 0) { *param_5 = (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80); } else { param_5[param_6 - 1] = param_5[param_6 - 1] + (short)*(int4 *)((long)param_3 + (long)param_4 * 4 + 0x80); if (param_3[0x12] == 1) { if (param_6 < 2) { my_snprintf(param_1,0x80,"Can\'t reset before a primary ignorable character U+%04lX", *param_3); return 1; } param_5[param_6 - 2] = param_5[param_6 - 2] + -1; if (*(int *)(param_2 + 0x30) == 1) { param_5[param_6 - 1] = param_5[param_6 - 1] + 0x1000; } } } return 0; }
36,088
ftxui::ButtonOption::Animated(ftxui::Color, ftxui::Color)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/component_options.cpp
ButtonOption ButtonOption::Animated(Color background, Color foreground) { // NOLINTBEGIN return ButtonOption::Animated( /*bakground=*/background, /*foreground=*/foreground, /*background_active=*/foreground, /*foreground_active=*/background); // NOLINTEND }
O0
cpp
ftxui::ButtonOption::Animated(ftxui::Color, ftxui::Color): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, %rax movq %rax, -0x28(%rbp) movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x10(%rbp), %eax movl %eax, -0x18(%rbp) movl -0x10(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x14(%rbp), %esi movl -0x18(%rbp), %edx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d callq 0x75470 movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN5ftxui12ButtonOption8AnimatedENS_5ColorES1_: push rbp mov rbp, rsp sub rsp, 30h mov rax, rdi mov [rbp+var_28], rax mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov eax, [rbp+var_C] mov [rbp+var_14], eax mov eax, [rbp+var_10] mov [rbp+var_18], eax mov eax, [rbp+var_10] mov [rbp+var_1C], eax mov eax, [rbp+var_C] mov [rbp+var_20], eax mov esi, [rbp+var_14] mov edx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] call _ZN5ftxui12ButtonOption8AnimatedENS_5ColorES1_S1_S1_; ftxui::ButtonOption::Animated(ftxui::Color,ftxui::Color,ftxui::Color,ftxui::Color) mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
ftxui::ButtonOption * ftxui::ButtonOption::Animated(ftxui::ButtonOption *a1, int a2, int a3) { ftxui::ButtonOption::Animated(a1, a2, a3, a3, a2); return a1; }
Animated: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,RDI MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x20],EAX MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] CALL 0x00175470 MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
/* ftxui::ButtonOption::Animated(ftxui::Color, ftxui::Color) */ ButtonOption * __thiscall ftxui::ButtonOption::Animated(ButtonOption *this,int4 param_2,int4 param_3) { Animated(this,param_2,param_3,param_3,param_2); return this; }
36,089
my_tell
eloqsql/mysys/my_seek.c
my_off_t my_tell(File fd, myf MyFlags) { os_off_t pos; DBUG_ENTER("my_tell"); DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags)); DBUG_ASSERT(fd >= 0); #if defined (HAVE_TELL) && !defined (_WIN32) && !defined(_AIX) pos= tell(fd); #else pos= my_seek(fd, 0L, MY_SEEK_CUR,0); #endif if (pos == (os_off_t) -1) { my_errno= errno; if (MyFlags & MY_WME) my_error(EE_CANT_SEEK, MYF(0), my_filename(fd), my_errno); DBUG_PRINT("error", ("tell: %llu errno: %d", (ulonglong) pos, my_errno)); } DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos)); DBUG_RETURN((my_off_t) pos); }
O0
c
my_tell: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) jmp 0xf4d71 jmp 0xf4d73 jmp 0xf4d75 movl -0x4(%rbp), %edi xorl %eax, %eax movl %eax, %ecx movl $0x1, %edx movq %rcx, %rsi callq 0xf4ca0 movq %rax, -0x18(%rbp) cmpq $-0x1, -0x18(%rbp) jne 0xf4de3 callq 0x2a760 movl (%rax), %eax movl %eax, -0x1c(%rbp) callq 0xf60c0 movl -0x1c(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xf4ddd movl -0x4(%rbp), %edi callq 0x1035b0 movq %rax, -0x28(%rbp) callq 0xf60c0 movq -0x28(%rbp), %rdx movl (%rax), %ecx movl $0x21, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0xefb70 jmp 0xf4ddf jmp 0xf4de1 jmp 0xf4de3 jmp 0xf4de5 jmp 0xf4de7 jmp 0xf4de9 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_tell: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi jmp short $+2 loc_F4D71: jmp short $+2 loc_F4D73: jmp short $+2 loc_F4D75: mov edi, [rbp+var_4] xor eax, eax mov ecx, eax mov edx, 1 mov rsi, rcx call my_seek mov [rbp+var_18], rax cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jnz short loc_F4DE3 call ___errno_location mov eax, [rax] mov [rbp+var_1C], eax call _my_thread_var mov ecx, [rbp+var_1C] mov [rax], ecx mov rax, [rbp+var_10] and rax, 10h cmp rax, 0 jz short loc_F4DDD mov edi, [rbp+var_4] call my_filename mov [rbp+var_28], rax call _my_thread_var mov rdx, [rbp+var_28] mov ecx, [rax] mov edi, 21h ; '!' xor eax, eax mov esi, eax mov al, 0 call my_error loc_F4DDD: jmp short $+2 loc_F4DDF: jmp short $+2 loc_F4DE1: jmp short $+2 loc_F4DE3: jmp short $+2 loc_F4DE5: jmp short $+2 loc_F4DE7: jmp short $+2 loc_F4DE9: mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_tell(unsigned int a1, char a2) { unsigned int *v2; // rax long long v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] v6 = my_seek(a1, 0LL, 1u, 0); if ( v6 == -1 ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, 0LL) = v5; if ( (a2 & 0x10) != 0 ) { v4 = my_filename(a1); v2 = (unsigned int *)my_thread_var(a1, 0LL); my_error(0x21u, 0LL, v4, *v2); } } return v6; }
my_tell: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001f4d71 LAB_001f4d71: JMP 0x001f4d73 LAB_001f4d73: JMP 0x001f4d75 LAB_001f4d75: MOV EDI,dword ptr [RBP + -0x4] XOR EAX,EAX MOV ECX,EAX MOV EDX,0x1 MOV RSI,RCX CALL 0x001f4ca0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],-0x1 JNZ 0x001f4de3 CALL 0x0012a760 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX CALL 0x001f60c0 MOV ECX,dword ptr [RBP + -0x1c] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x10 CMP RAX,0x0 JZ 0x001f4ddd MOV EDI,dword ptr [RBP + -0x4] CALL 0x002035b0 MOV qword ptr [RBP + -0x28],RAX CALL 0x001f60c0 MOV RDX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] MOV EDI,0x21 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x001efb70 LAB_001f4ddd: JMP 0x001f4ddf LAB_001f4ddf: JMP 0x001f4de1 LAB_001f4de1: JMP 0x001f4de3 LAB_001f4de3: JMP 0x001f4de5 LAB_001f4de5: JMP 0x001f4de7 LAB_001f4de7: JMP 0x001f4de9 LAB_001f4de9: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
long my_tell(int4 param_1,ulong param_2) { int iVar1; long lVar2; int *piVar3; int8 uVar4; int4 *puVar5; lVar2 = my_seek(param_1,0,1); if (lVar2 == -1) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_2 & 0x10) != 0) { uVar4 = my_filename(param_1); puVar5 = (int4 *)_my_thread_var(); my_error(0x21,0,uVar4,*puVar5); } } return lVar2; }
36,090
translog_purge
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_purge(TRANSLOG_ADDRESS low) { uint32 last_need_file= LSN_FILE_NO(low); uint32 min_unsync; int soft; TRANSLOG_ADDRESS horizon= translog_get_horizon(); int rc= 0; DBUG_ENTER("translog_purge"); DBUG_PRINT("enter", ("low: " LSN_FMT, LSN_IN_PARTS(low))); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); soft= soft_sync; min_unsync= soft_sync_min; DBUG_PRINT("info", ("min_unsync: %lu", (ulong) min_unsync)); if (soft && min_unsync < last_need_file) { last_need_file= min_unsync; DBUG_PRINT("info", ("last_need_file set to %lu", (ulong)last_need_file)); } mysql_mutex_lock(&log_descriptor.purger_lock); DBUG_PRINT("info", ("last_lsn_checked file: %lu:", (ulong) log_descriptor.last_lsn_checked)); if (LSN_FILE_NO(log_descriptor.last_lsn_checked) < last_need_file) { uint32 i; uint32 min_file= translog_first_file(horizon, 1); DBUG_ASSERT(min_file != 0); /* log is already started */ DBUG_PRINT("info", ("min_file: %lu:",(ulong) min_file)); for(i= min_file; i < last_need_file && rc == 0; i++) { LSN lsn= translog_get_file_max_lsn_stored(i); if (lsn == LSN_IMPOSSIBLE) break; /* files are still in writing */ if (lsn == LSN_ERROR) { rc= 1; break; } if (cmp_translog_addr(lsn, low) >= 0) break; DBUG_PRINT("info", ("purge file %lu", (ulong) i)); /* remove file descriptor from the cache */ /* log_descriptor.min_file can be changed only here during execution and the function is serialized, so we can access it without problems */ if (i >= log_descriptor.min_file) { TRANSLOG_FILE *file; mysql_rwlock_wrlock(&log_descriptor.open_files_lock); DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); DBUG_ASSERT(log_descriptor.min_file == i); file= *((TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files)); DBUG_PRINT("info", ("Files : %d", log_descriptor.open_files.elements)); DBUG_ASSERT(i == file->number); log_descriptor.min_file++; DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); mysql_rwlock_unlock(&log_descriptor.open_files_lock); translog_close_log_file(file); } if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE && ! log_purge_disabled) { char path[FN_REFLEN], *file_name; file_name= translog_filename_by_fileno(i, path); rc= MY_TEST(mysql_file_delete(key_file_translog, file_name, MYF(MY_WME))); } } if (unlikely(rc == 1)) log_descriptor.min_need_file= 0; /* impossible value */ else log_descriptor.min_need_file= i; } mysql_mutex_unlock(&log_descriptor.purger_lock); DBUG_RETURN(rc); }
O0
c
translog_purge: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq -0x218(%rbp), %rax sarq $0x20, %rax movl %eax, -0x21c(%rbp) callq 0x4e3c0 movq %rax, -0x230(%rbp) movl $0x0, -0x234(%rbp) jmp 0x50dc8 jmp 0x50dca jmp 0x50dcc movb 0xc27e96(%rip), %al # 0xc78c68 movsbl %al, %eax movl %eax, -0x224(%rbp) movl 0xc27e8b(%rip), %eax # 0xc78c6c movl %eax, -0x220(%rbp) jmp 0x50de9 cmpl $0x0, -0x224(%rbp) je 0x50e10 movl -0x220(%rbp), %eax cmpl -0x21c(%rbp), %eax jae 0x50e10 movl -0x220(%rbp), %eax movl %eax, -0x21c(%rbp) jmp 0x50e0e jmp 0x50e10 leaq 0x426f29(%rip), %rdi # 0x477d40 addq $0x800e80, %rdi # imm = 0x800E80 leaq 0xffcd3(%rip), %rsi # 0x150af8 movl $0x21d4, %edx # imm = 0x21D4 callq 0x49520 jmp 0x50e31 movq 0xc27dd0(%rip), %rax # 0xc78c08 sarq $0x20, %rax cmpl -0x21c(%rbp), %eax jae 0x5103d movq -0x230(%rbp), %rdi movl $0x1, %esi callq 0x4b700 movl %eax, -0x23c(%rbp) jmp 0x50e61 jmp 0x50e63 jmp 0x50e65 movl -0x23c(%rbp), %eax movl %eax, -0x238(%rbp) movl -0x238(%rbp), %ecx xorl %eax, %eax cmpl -0x21c(%rbp), %ecx movb %al, -0x259(%rbp) jae 0x50e97 cmpl $0x0, -0x234(%rbp) sete %al movb %al, -0x259(%rbp) movb -0x259(%rbp), %al testb $0x1, %al jne 0x50ea6 jmp 0x51001 movl -0x238(%rbp), %edi callq 0x49400 movq %rax, -0x248(%rbp) cmpq $0x0, -0x248(%rbp) jne 0x50ec7 jmp 0x51001 cmpq $0x1, -0x248(%rbp) jne 0x50ee0 movl $0x1, -0x234(%rbp) jmp 0x51001 movq -0x248(%rbp), %rax subq -0x218(%rbp), %rax cmpq $0x0, %rax jl 0x50ef9 jmp 0x51001 jmp 0x50efb jmp 0x50efd movl -0x238(%rbp), %eax cmpl 0x42708b(%rip), %eax # 0x477f94 jb 0x50f83 leaq 0x426e2e(%rip), %rdi # 0x477d40 addq $0x258, %rdi # imm = 0x258 leaq 0xffbd8(%rip), %rsi # 0x150af8 movl $0x21f4, %edx # imm = 0x21F4 callq 0x51090 jmp 0x50f2c jmp 0x50f2e jmp 0x50f30 leaq 0x426e09(%rip), %rdi # 0x477d40 addq $0x228, %rdi # imm = 0x228 callq 0xda110 movq (%rax), %rax movq %rax, -0x250(%rbp) jmp 0x50f4f jmp 0x50f51 jmp 0x50f53 movl 0x42703b(%rip), %eax # 0x477f94 addl $0x1, %eax movl %eax, 0x427032(%rip) # 0x477f94 jmp 0x50f64 leaq 0x426dd5(%rip), %rdi # 0x477d40 addq $0x258, %rdi # imm = 0x258 callq 0x51100 movq -0x250(%rbp), %rdi callq 0x4d600 cmpq $0x0, 0x425b8d(%rip) # 0x476b18 jne 0x50feb cmpl $0x0, 0x425b7c(%rip) # 0x476b10 jne 0x50feb movl -0x238(%rbp), %edi leaq -0x210(%rbp), %rsi callq 0x49020 movq %rax, -0x258(%rbp) leaq 0x425ace(%rip), %rax # 0x476a84 movl (%rax), %edi movq -0x258(%rbp), %rcx leaq 0xffb32(%rip), %rsi # 0x150af8 movl $0x2206, %edx # imm = 0x2206 movl $0x10, %r8d callq 0x51170 movl %eax, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x234(%rbp) jmp 0x50fed movl -0x238(%rbp), %eax addl $0x1, %eax movl %eax, -0x238(%rbp) jmp 0x50e71 cmpl $0x1, -0x234(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x5102f movl $0x0, 0xc27b8b(%rip) # 0xc78bb8 jmp 0x5103b movl -0x238(%rbp), %eax movl %eax, 0xc27b7d(%rip) # 0xc78bb8 jmp 0x5103d leaq 0x426cfc(%rip), %rdi # 0x477d40 addq $0x800e80, %rdi # imm = 0x800E80 callq 0x49590 movl -0x234(%rbp), %eax movb %al, -0x25a(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5107d movb -0x25a(%rbp), %al addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a260 nopw %cs:(%rax,%rax)
translog_purge: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov rax, [rbp+var_218] sar rax, 20h mov [rbp+var_21C], eax call translog_get_horizon mov [rbp+var_230], rax mov [rbp+var_234], 0 jmp short $+2 loc_50DC8: jmp short $+2 loc_50DCA: jmp short $+2 loc_50DCC: mov al, cs:soft_sync movsx eax, al mov [rbp+var_224], eax mov eax, cs:soft_sync_min mov [rbp+var_220], eax jmp short $+2 loc_50DE9: cmp [rbp+var_224], 0 jz short loc_50E10 mov eax, [rbp+var_220] cmp eax, [rbp+var_21C] jnb short loc_50E10 mov eax, [rbp+var_220] mov [rbp+var_21C], eax jmp short $+2 loc_50E0E: jmp short $+2 loc_50E10: lea rdi, log_descriptor add rdi, 800E80h lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 21D4h call inline_mysql_mutex_lock_7 jmp short $+2 loc_50E31: mov rax, cs:qword_C78C08 sar rax, 20h cmp eax, [rbp+var_21C] jnb loc_5103D mov rdi, [rbp+var_230] mov esi, 1 call translog_first_file mov [rbp+var_23C], eax jmp short $+2 loc_50E61: jmp short $+2 loc_50E63: jmp short $+2 loc_50E65: mov eax, [rbp+var_23C] mov [rbp+var_238], eax loc_50E71: mov ecx, [rbp+var_238] xor eax, eax cmp ecx, [rbp+var_21C] mov [rbp+var_259], al jnb short loc_50E97 cmp [rbp+var_234], 0 setz al mov [rbp+var_259], al loc_50E97: mov al, [rbp+var_259] test al, 1 jnz short loc_50EA6 jmp loc_51001 loc_50EA6: mov edi, [rbp+var_238] call translog_get_file_max_lsn_stored mov [rbp+var_248], rax cmp [rbp+var_248], 0 jnz short loc_50EC7 jmp loc_51001 loc_50EC7: cmp [rbp+var_248], 1 jnz short loc_50EE0 mov [rbp+var_234], 1 jmp loc_51001 loc_50EE0: mov rax, [rbp+var_248] sub rax, [rbp+var_218] cmp rax, 0 jl short loc_50EF9 jmp loc_51001 loc_50EF9: jmp short $+2 loc_50EFB: jmp short $+2 loc_50EFD: mov eax, [rbp+var_238] cmp eax, cs:dword_477F94 jb short loc_50F83 lea rdi, log_descriptor add rdi, 258h lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 21F4h call inline_mysql_rwlock_wrlock_0 jmp short $+2 loc_50F2C: jmp short $+2 loc_50F2E: jmp short $+2 loc_50F30: lea rdi, log_descriptor add rdi, 228h call pop_dynamic mov rax, [rax] mov [rbp+var_250], rax jmp short $+2 loc_50F4F: jmp short $+2 loc_50F51: jmp short $+2 loc_50F53: mov eax, cs:dword_477F94 add eax, 1 mov cs:dword_477F94, eax jmp short $+2 loc_50F64: lea rdi, log_descriptor add rdi, 258h call inline_mysql_rwlock_unlock_1 mov rdi, [rbp+var_250] call translog_close_log_file loc_50F83: cmp cs:log_purge_type, 0 jnz short loc_50FEB cmp cs:log_purge_disabled, 0 jnz short loc_50FEB mov edi, [rbp+var_238] lea rsi, [rbp+var_210] call translog_filename_by_fileno mov [rbp+var_258], rax lea rax, key_file_translog mov edi, [rax] mov rcx, [rbp+var_258] lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 2206h mov r8d, 10h call inline_mysql_file_delete_0 mov edx, eax xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_234], eax loc_50FEB: jmp short $+2 loc_50FED: mov eax, [rbp+var_238] add eax, 1 mov [rbp+var_238], eax jmp loc_50E71 loc_51001: cmp [rbp+var_234], 1 setz 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_5102F mov cs:dword_C78BB8, 0 jmp short loc_5103B loc_5102F: mov eax, [rbp+var_238] mov cs:dword_C78BB8, eax loc_5103B: jmp short $+2 loc_5103D: lea rdi, log_descriptor add rdi, 800E80h call inline_mysql_mutex_unlock_7 mov eax, [rbp+var_234] mov [rbp+var_25A], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5107D mov al, [rbp+var_25A] add rsp, 260h pop rbp retn loc_5107D: call ___stack_chk_fail
bool translog_purge(long long a1) { long long v1; // rdx long long v2; // rcx int v3; // r8d int v4; // r9d double v5; // xmm0_8 bool v7; // [rsp+7h] [rbp-259h] long long v8; // [rsp+8h] [rbp-258h] long long v9; // [rsp+10h] [rbp-250h] unsigned long long file_max_lsn_stored; // [rsp+18h] [rbp-248h] unsigned int i; // [rsp+28h] [rbp-238h] BOOL v12; // [rsp+2Ch] [rbp-234h] long long horizon; // [rsp+30h] [rbp-230h] unsigned int v14; // [rsp+44h] [rbp-21Ch] _BYTE v15[520]; // [rsp+50h] [rbp-210h] BYREF unsigned long long v16; // [rsp+258h] [rbp-8h] v16 = __readfsqword(0x28u); v14 = HIDWORD(a1); horizon = translog_get_horizon(); v12 = 0; if ( soft_sync && (unsigned int)soft_sync_min < HIDWORD(a1) ) v14 = soft_sync_min; inline_mysql_mutex_lock_7( (long long)&log_descriptor[1049040], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x21D4u); if ( HIDWORD(qword_C78C08) < v14 ) { for ( i = translog_first_file(horizon, 1); ; ++i ) { v7 = 0; if ( i < v14 ) v7 = !v12; if ( !v7 ) break; file_max_lsn_stored = translog_get_file_max_lsn_stored(i); if ( !file_max_lsn_stored ) break; if ( file_max_lsn_stored == 1 ) { v12 = 1; break; } if ( (long long)(file_max_lsn_stored - a1) >= 0 ) break; if ( i >= dword_477F94 ) { inline_mysql_rwlock_wrlock_0( &log_descriptor[75], "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 8692LL); v9 = *(_QWORD *)pop_dynamic(&log_descriptor[69]); ++dword_477F94; v5 = inline_mysql_rwlock_unlock_1(&log_descriptor[75]); translog_close_log_file(v9, v5); } if ( !log_purge_type && !log_purge_disabled ) { v8 = translog_filename_by_fileno(i, (long long)v15, v1, v2, v3, v4); v12 = inline_mysql_file_delete_0( key_file_translog, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 8710LL, v8, 16LL) != 0; } } if ( v12 ) dword_C78BB8 = 0; else dword_C78BB8 = i; } inline_mysql_mutex_unlock_7((long long)&log_descriptor[1049040]); return v12; }
translog_purge: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV RAX,qword ptr [RBP + -0x218] SAR RAX,0x20 MOV dword ptr [RBP + -0x21c],EAX CALL 0x0014e3c0 MOV qword ptr [RBP + -0x230],RAX MOV dword ptr [RBP + -0x234],0x0 JMP 0x00150dc8 LAB_00150dc8: JMP 0x00150dca LAB_00150dca: JMP 0x00150dcc LAB_00150dcc: MOV AL,byte ptr [0x00d78c68] MOVSX EAX,AL MOV dword ptr [RBP + -0x224],EAX MOV EAX,dword ptr [0x00d78c6c] MOV dword ptr [RBP + -0x220],EAX JMP 0x00150de9 LAB_00150de9: CMP dword ptr [RBP + -0x224],0x0 JZ 0x00150e10 MOV EAX,dword ptr [RBP + -0x220] CMP EAX,dword ptr [RBP + -0x21c] JNC 0x00150e10 MOV EAX,dword ptr [RBP + -0x220] MOV dword ptr [RBP + -0x21c],EAX JMP 0x00150e0e LAB_00150e0e: JMP 0x00150e10 LAB_00150e10: LEA RDI,[0x577d40] ADD RDI,0x800e80 LEA RSI,[0x250af8] MOV EDX,0x21d4 CALL 0x00149520 JMP 0x00150e31 LAB_00150e31: MOV RAX,qword ptr [0x00d78c08] SAR RAX,0x20 CMP EAX,dword ptr [RBP + -0x21c] JNC 0x0015103d MOV RDI,qword ptr [RBP + -0x230] MOV ESI,0x1 CALL 0x0014b700 MOV dword ptr [RBP + -0x23c],EAX JMP 0x00150e61 LAB_00150e61: JMP 0x00150e63 LAB_00150e63: JMP 0x00150e65 LAB_00150e65: MOV EAX,dword ptr [RBP + -0x23c] MOV dword ptr [RBP + -0x238],EAX LAB_00150e71: MOV ECX,dword ptr [RBP + -0x238] XOR EAX,EAX CMP ECX,dword ptr [RBP + -0x21c] MOV byte ptr [RBP + -0x259],AL JNC 0x00150e97 CMP dword ptr [RBP + -0x234],0x0 SETZ AL MOV byte ptr [RBP + -0x259],AL LAB_00150e97: MOV AL,byte ptr [RBP + -0x259] TEST AL,0x1 JNZ 0x00150ea6 JMP 0x00151001 LAB_00150ea6: MOV EDI,dword ptr [RBP + -0x238] CALL 0x00149400 MOV qword ptr [RBP + -0x248],RAX CMP qword ptr [RBP + -0x248],0x0 JNZ 0x00150ec7 JMP 0x00151001 LAB_00150ec7: CMP qword ptr [RBP + -0x248],0x1 JNZ 0x00150ee0 MOV dword ptr [RBP + -0x234],0x1 JMP 0x00151001 LAB_00150ee0: MOV RAX,qword ptr [RBP + -0x248] SUB RAX,qword ptr [RBP + -0x218] CMP RAX,0x0 JL 0x00150ef9 JMP 0x00151001 LAB_00150ef9: JMP 0x00150efb LAB_00150efb: JMP 0x00150efd LAB_00150efd: MOV EAX,dword ptr [RBP + -0x238] CMP EAX,dword ptr [0x00577f94] JC 0x00150f83 LEA RDI,[0x577d40] ADD RDI,0x258 LEA RSI,[0x250af8] MOV EDX,0x21f4 CALL 0x00151090 JMP 0x00150f2c LAB_00150f2c: JMP 0x00150f2e LAB_00150f2e: JMP 0x00150f30 LAB_00150f30: LEA RDI,[0x577d40] ADD RDI,0x228 CALL 0x001da110 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x250],RAX JMP 0x00150f4f LAB_00150f4f: JMP 0x00150f51 LAB_00150f51: JMP 0x00150f53 LAB_00150f53: MOV EAX,dword ptr [0x00577f94] ADD EAX,0x1 MOV dword ptr [0x00577f94],EAX JMP 0x00150f64 LAB_00150f64: LEA RDI,[0x577d40] ADD RDI,0x258 CALL 0x00151100 MOV RDI,qword ptr [RBP + -0x250] CALL 0x0014d600 LAB_00150f83: CMP qword ptr [0x00576b18],0x0 JNZ 0x00150feb CMP dword ptr [0x00576b10],0x0 JNZ 0x00150feb MOV EDI,dword ptr [RBP + -0x238] LEA RSI,[RBP + -0x210] CALL 0x00149020 MOV qword ptr [RBP + -0x258],RAX LEA RAX,[0x576a84] MOV EDI,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x258] LEA RSI,[0x250af8] MOV EDX,0x2206 MOV R8D,0x10 CALL 0x00151170 MOV EDX,EAX XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x234],EAX LAB_00150feb: JMP 0x00150fed LAB_00150fed: MOV EAX,dword ptr [RBP + -0x238] ADD EAX,0x1 MOV dword ptr [RBP + -0x238],EAX JMP 0x00150e71 LAB_00151001: CMP dword ptr [RBP + -0x234],0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0015102f MOV dword ptr [0x00d78bb8],0x0 JMP 0x0015103b LAB_0015102f: MOV EAX,dword ptr [RBP + -0x238] MOV dword ptr [0x00d78bb8],EAX LAB_0015103b: JMP 0x0015103d LAB_0015103d: LEA RDI,[0x577d40] ADD RDI,0x800e80 CALL 0x00149590 MOV EAX,dword ptr [RBP + -0x234] MOV byte ptr [RBP + -0x25a],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015107d MOV AL,byte ptr [RBP + -0x25a] ADD RSP,0x260 POP RBP RET LAB_0015107d: CALL 0x0012a260
int8 translog_purge(long param_1) { int iVar1; int8 uVar2; long lVar3; int8 *puVar4; long in_FS_OFFSET; bool bVar5; uint local_240; uint local_224; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_224 = (uint)((ulong)param_1 >> 0x20); uVar2 = translog_get_horizon(); bVar5 = false; if ((soft_sync != '\0') && (soft_sync_min < local_224)) { local_224 = soft_sync_min; } inline_mysql_mutex_lock (&DAT_00d78bc0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x21d4); if ((uint)((ulong)DAT_00d78c08 >> 0x20) < local_224) { local_240 = translog_first_file(uVar2,1); while( true ) { if ((local_224 <= local_240 || bVar5) || (lVar3 = translog_get_file_max_lsn_stored(local_240), lVar3 == 0)) goto LAB_00151001; if (lVar3 == 1) break; if (-1 < lVar3 - param_1) goto LAB_00151001; if (DAT_00577f94 <= local_240) { inline_mysql_rwlock_wrlock (&DAT_00577f98, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x21f4); puVar4 = (int8 *)pop_dynamic(&DAT_00577f68); uVar2 = *puVar4; DAT_00577f94 = DAT_00577f94 + 1; inline_mysql_rwlock_unlock(&DAT_00577f98); translog_close_log_file(uVar2); } if ((log_purge_type == 0) && (log_purge_disabled == 0)) { uVar2 = translog_filename_by_fileno(local_240,local_218); iVar1 = inline_mysql_file_delete (key_file_translog, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x2206,uVar2,0x10); bVar5 = iVar1 != 0; } local_240 = local_240 + 1; } bVar5 = true; LAB_00151001: if (bVar5) { DAT_00d78bb8 = 0; } else { DAT_00d78bb8 = local_240; } } inline_mysql_mutex_unlock(&DAT_00d78bc0); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),bVar5); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
36,091
mi_write_blob_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_write_blob_record(MI_INFO *info, const uchar *record) { uchar *rec_buff; int error; ulong reclength,reclength2,extra; extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+ MI_DYN_DELETE_BLOCK_HEADER+1); reclength= (info->s->base.pack_reclength + _mi_calc_total_blob_length(info,record)+ extra); if (!(rec_buff=(uchar*) my_alloca(reclength))) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), record); DBUG_PRINT("info",("reclength: %lu reclength2: %lu", reclength, reclength2)); DBUG_ASSERT(reclength2 <= reclength); error=write_dynamic_record(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), reclength2); my_afree(rec_buff); return(error); }
O3
c
mi_write_blob_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %rax movq 0x148(%rax), %r15 callq 0x7aaf8 leaq (%r15,%rax), %rsi addq $0x5d, %rsi xorl %edi, %edi xorl %edx, %edx callq 0xa2a95 testq %rax, %rax je 0x7aadf movq %rax, %r15 movq %rax, %r12 addq $0x18, %r12 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x7a1be movl %eax, %edx movq %rbx, %rdi movq %r12, %rsi callq 0x7a530 movl %eax, %ebx movq %r15, %rdi callq 0xa2cc2 movl %ebx, %eax jmp 0x7aaef callq 0xa48d6 movl $0x80, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_mi_write_blob_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rsi mov rbx, rdi mov rax, [rdi] mov r15, [rax+148h] call _mi_calc_total_blob_length lea rsi, [r15+rax] add rsi, 5Dh ; ']' xor edi, edi xor edx, edx call my_malloc test rax, rax jz short loc_7AADF mov r15, rax mov r12, rax add r12, 18h mov rdi, rbx mov rsi, r12 mov rdx, r14 call _mi_rec_pack mov edx, eax mov rdi, rbx mov rsi, r12 call write_dynamic_record_0 mov ebx, eax mov rdi, r15 call my_free mov eax, ebx jmp short loc_7AAEF loc_7AADF: call _my_thread_var mov dword ptr [rax], 80h mov eax, 0FFFFFFFFh loc_7AAEF: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long mi_write_blob_record(_BYTE *a1, char *a2) { long long v2; // r15 long long v3; // rax long long v4; // rax long long v5; // r15 long long v6; // r12 unsigned int v7; // eax unsigned int v8; // ebx v2 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); v3 = mi_calc_total_blob_length(); v4 = my_malloc(0LL, v2 + v3 + 93, 0LL); if ( v4 ) { v5 = v4; v6 = v4 + 24; v7 = mi_rec_pack((long long)a1, (_BYTE *)(v4 + 24), a2); v8 = write_dynamic_record_0(a1, v6, v7); my_free(v5); return v8; } else { *(_DWORD *)my_thread_var(0LL) = 128; return 0xFFFFFFFFLL; } }
_mi_write_blob_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV R15,qword ptr [RAX + 0x148] CALL 0x0017aaf8 LEA RSI,[R15 + RAX*0x1] ADD RSI,0x5d XOR EDI,EDI XOR EDX,EDX CALL 0x001a2a95 TEST RAX,RAX JZ 0x0017aadf MOV R15,RAX MOV R12,RAX ADD R12,0x18 MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x0017a1be MOV EDX,EAX MOV RDI,RBX MOV RSI,R12 CALL 0x0017a530 MOV EBX,EAX MOV RDI,R15 CALL 0x001a2cc2 MOV EAX,EBX JMP 0x0017aaef LAB_0017aadf: CALL 0x001a48d6 MOV dword ptr [RAX],0x80 MOV EAX,0xffffffff LAB_0017aaef: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 _mi_write_blob_record(long *param_1,int8 param_2) { int4 uVar1; long lVar2; long lVar3; int4 *puVar4; lVar3 = *(long *)(*param_1 + 0x148); lVar2 = _mi_calc_total_blob_length(); lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5d,0); if (lVar3 == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x80; uVar1 = 0xffffffff; } else { uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_2); uVar1 = write_dynamic_record(param_1,lVar3 + 0x18,uVar1); my_free(lVar3); } return uVar1; }
36,092
alloc_root
eloqsql/mysys/my_alloc.c
void *alloc_root(MEM_ROOT *mem_root, size_t length) { #if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length+=ALIGN_SIZE(sizeof(USED_MEM)); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, length, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root->block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((uchar*) 0); /* purecov: inspected */ } next->next= mem_root->used; next->left= 0; next->size= length; mem_root->used= next; DBUG_PRINT("exit",("ptr: %p", (((char*)next)+ALIGN_SIZE(sizeof(USED_MEM))))); DBUG_RETURN((((uchar*) next)+ALIGN_SIZE(sizeof(USED_MEM)))); #else size_t get_size, block_size; uchar* point; reg1 USED_MEM *next= 0; reg2 USED_MEM **prev; size_t original_length __attribute__((unused)) = length; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* Avoid reusing an already allocated block */ if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length= ALIGN_SIZE(length) + REDZONE_SIZE; if ((*(prev= &mem_root->free)) != NULL) { if ((*prev)->left < length && mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) { next= *prev; *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev ; next && next->left < length ; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ block_size= (mem_root->block_size & ~1) * (mem_root->block_num >> 2); get_size= length+ALIGN_SIZE(sizeof(USED_MEM)); get_size= MY_MAX(get_size, block_size); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, get_size, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root-> block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((void*) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; TRASH_MEM(next); } point= (uchar*) ((char*) next+ (next->size-next->left)); /*TODO: next part may be unneded due to mem_root->first_block_usage counter*/ if ((next->left-= length) < mem_root->min_malloc) { /* Full block */ *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } point+= REDZONE_SIZE; TRASH_ALLOC(point, original_length); DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN((void*) point); #endif }
O3
c
alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x9c63e cmpq %r14, 0x8(%rax) jae 0x9c625 movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0xa, %ecx jb 0x9c625 cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x9c625 movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x9c63e movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x9c628 jmp 0x9c69b movq 0x20(%rbx), %rdx movq %rdx, %rax andq $-0x2, %rax movl 0x28(%rbx), %r15d shrl $0x2, %r15d imulq %rax, %r15 leaq 0x18(%r14), %rax cmpq %r15, %rax cmovaq %rax, %r15 movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx orq $0x1010, %rdx # imm = 0x1010 movq %r15, %rsi callq 0x9f6e1 testq %rax, %rax je 0x9c6cd incl 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x9c6da movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x9c6da movq 0x30(%rbx), %rax testq %rax, %rax je 0x9c6d8 callq *%rax xorl %ecx, %ecx movq %rcx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
alloc_root: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_9C63E cmp [rax+8], r14 jnb short loc_9C625 mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 0Ah jb short loc_9C625 cmp qword ptr [rax+8], 0FFFh ja short loc_9C625 mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_9C625: mov rax, rbx loc_9C628: mov r12, rax mov rax, [rax] test rax, rax jz short loc_9C63E mov rdx, [rax+8] cmp rdx, r14 jb short loc_9C628 jmp short loc_9C69B loc_9C63E: mov rdx, [rbx+20h] mov rax, rdx and rax, 0FFFFFFFFFFFFFFFEh mov r15d, [rbx+28h] shr r15d, 2 imul r15, rax lea rax, [r14+18h] cmp rax, r15 cmova r15, rax mov edi, [rbx+38h] and edx, 1 shl edx, 10h or rdx, 1010h mov rsi, r15 call my_malloc test rax, rax jz short loc_9C6CD inc dword ptr [rbx+28h] mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_9C69B: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_9C6DA mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_9C6DA loc_9C6CD: mov rax, [rbx+30h] test rax, rax jz short loc_9C6D8 call rax loc_9C6D8: xor ecx, ecx loc_9C6DA: mov rax, rcx pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx long long v8; // rdx unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void (*v12)(void); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0xA && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_QWORD *)(a1 + 32); v9 = (v8 & 0xFFFFFFFFFFFFFFFELL) * (*(_DWORD *)(a1 + 40) >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)my_malloc(*(unsigned int *)(a1 + 56), v9, ((unsigned __int8)(v8 & 1) << 16) | 0x1010LL); if ( v6 ) { ++*(_DWORD *)(a1 + 40); *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void (**)(void))(a1 + 48); if ( v12 ) v12(); return 0LL; } return v10; }
alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x0019c63e CMP qword ptr [RAX + 0x8],R14 JNC 0x0019c625 MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0xa JC 0x0019c625 CMP qword ptr [RAX + 0x8],0xfff JA 0x0019c625 MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_0019c625: MOV RAX,RBX LAB_0019c628: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0019c63e MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x0019c628 JMP 0x0019c69b LAB_0019c63e: MOV RDX,qword ptr [RBX + 0x20] MOV RAX,RDX AND RAX,-0x2 MOV R15D,dword ptr [RBX + 0x28] SHR R15D,0x2 IMUL R15,RAX LEA RAX,[R14 + 0x18] CMP RAX,R15 CMOVA R15,RAX MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 OR RDX,0x1010 MOV RSI,R15 CALL 0x0019f6e1 TEST RAX,RAX JZ 0x0019c6cd INC dword ptr [RBX + 0x28] MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_0019c69b: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x0019c6da MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x0019c6da LAB_0019c6cd: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0019c6d8 CALL RAX LAB_0019c6d8: XOR ECX,ECX LAB_0019c6da: MOV RAX,RCX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_0019c63e: uVar7 = (ulong)(*(uint *)(param_1 + 5) >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)my_malloc((int)param_1[7],uVar7,((uint)param_1[4] & 1) << 0x10 | 0x1010); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 9 < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_0019c63e; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
36,093
ma_mmap_pread
eloqsql/storage/maria/ma_dynrec.c
size_t _ma_mmap_pread(MARIA_HA *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { DBUG_PRINT("info", ("maria_read with mmap %d\n", info->dfile.file)); if (info->s->lock_key_trees) mysql_rwlock_rdlock(&info->s->mmap_lock); /* The following test may fail in the following cases: - We failed to remap a memory area (fragmented memory?) - This thread has done some writes, but not yet extended the memory mapped area. */ if (info->s->mmaped_length >= offset + Count) { memcpy(Buffer, info->s->file_map + offset, Count); if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return 0; } else { if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags); } }
O3
c
ma_mmap_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x30(%rbp) movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r13 movq (%rdi), %rax cmpb $0x0, 0x7e3(%rax) je 0x3c1f4 leaq 0xb78(%rax), %rdi cmpq $0x0, 0xc08(%rax) jne 0x3c2ca callq 0xa43b8 movq (%r13), %r14 leaq (%r15,%rbx), %rax cmpq %rax, 0xa00(%r14) jae 0x3c274 cmpb $0x0, 0x7e3(%r14) je 0x3c22e movq 0xc08(%r14), %rdi addq $0xb78, %r14 # imm = 0xB78 testq %rdi, %rdi jne 0x3c351 movq %r14, %rdi callq 0xa44e6 movl 0x480(%r13), %r14d leaq 0x349dd4(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3c2e0 movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r8 callq 0xa0660 movq %rax, %r15 jmp 0x3c2b8 addq 0x5f0(%r14), %r15 movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x29080 movq (%r13), %rbx cmpb $0x0, 0x7e3(%rbx) je 0x3c2b5 movq 0xc08(%rbx), %rdi addq $0xb78, %rbx # imm = 0xB78 testq %rdi, %rdi jne 0x3c366 movq %rbx, %rdi callq 0xa44e6 xorl %r15d, %r15d movq %r15, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9d4a3(%rip), %rsi # 0xd9774 movl $0x84, %edx callq 0x2ec50 jmp 0x3c1f4 movq %rax, %r13 leaq 0x349d26(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x9d480(%rip), %rdx # 0xd9774 movq %r13, %rdi movq %rbx, %rsi movl $0x98, %ecx callq *0x210(%rax) movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r14 movq %r14, %r8 callq 0xa0660 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %rbx cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r14b cmovneq %rbx, %rsi leaq 0x349cd0(%rip), %rax # 0x386010 movq (%rax), %rax movq %r13, %rdi callq *0x218(%rax) jmp 0x3c2b8 leaq 0x349cb8(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x3c226 leaq 0x349ca3(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x3c2ad
_ma_mmap_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], r8 mov r15, rcx mov rbx, rdx mov r12, rsi mov r13, rdi mov rax, [rdi] cmp byte ptr [rax+7E3h], 0 jz short loc_3C1F4 lea rdi, [rax+0B78h] cmp qword ptr [rax+0C08h], 0 jnz loc_3C2CA call my_rw_rdlock loc_3C1F4: mov r14, [r13+0] lea rax, [r15+rbx] cmp [r14+0A00h], rax jnb short loc_3C274 cmp byte ptr [r14+7E3h], 0 jz short loc_3C22E mov rdi, [r14+0C08h] add r14, 0B78h test rdi, rdi jnz loc_3C351 loc_3C226: mov rdi, r14 call my_rw_unlock loc_3C22E: mov r14d, [r13+480h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_3C2E0 mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r8, [rbp+var_30] call my_pread mov r15, rax jmp short loc_3C2B8 loc_3C274: add r15, [r14+5F0h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call _memcpy mov rbx, [r13+0] cmp byte ptr [rbx+7E3h], 0 jz short loc_3C2B5 mov rdi, [rbx+0C08h] add rbx, 0B78h test rdi, rdi jnz loc_3C366 loc_3C2AD: mov rdi, rbx call my_rw_unlock loc_3C2B5: xor r15d, r15d loc_3C2B8: mov rax, r15 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3C2CA: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 84h call psi_rwlock_rdlock jmp loc_3C1F4 loc_3C2E0: mov r13, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r13 mov rsi, rbx mov ecx, 98h call qword ptr [rax+210h] mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r14, [rbp+var_30] mov r8, r14 call my_pread mov r15, rax xor esi, esi test rax, rax cmovnz rbx, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r14b, 6 cmovnz rsi, rbx lea rax, PSI_server mov rax, [rax] mov rdi, r13 call qword ptr [rax+218h] jmp loc_3C2B8 loc_3C351: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_3C226 loc_3C366: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_3C2AD
long long ma_mmap_pread(_DWORD *a1, long long a2, long long a3, long long a4, long long a5) { long long v8; // rax long long v9; // rdi long long v10; // r14 long long v11; // rdi long long v12; // r14 unsigned int v13; // r14d long long v14; // rax long long v15; // r15 long long v16; // rbx long long v17; // rdi long long v18; // rbx long long v20; // r13 _BYTE v21[72]; // [rsp+8h] [rbp-78h] BYREF long long v22; // [rsp+50h] [rbp-30h] v22 = a5; v8 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) { v9 = v8 + 2936; if ( *(_QWORD *)(v8 + 3080) ) psi_rwlock_rdlock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 0x84u); else my_rw_rdlock(v9); } v10 = *(_QWORD *)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 2560LL) >= (unsigned long long)(a4 + a3) ) { memcpy(a2, *(_QWORD *)(v10 + 1520) + a4, a3); v16 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) { v17 = *(_QWORD *)(v16 + 3080); v18 = v16 + 2936; if ( v17 ) PSI_server[45](); my_rw_unlock(v18); } return 0LL; } else { if ( *(_BYTE *)(v10 + 2019) ) { v11 = *(_QWORD *)(v10 + 3080); v12 = v10 + 2936; if ( v11 ) PSI_server[45](); my_rw_unlock(v12); } v13 = a1[288]; v14 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v21, v13, 6LL); if ( v14 ) { v20 = v14; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v14, a3, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 152LL); v15 = my_pread(v13, a2, a3, a4, v22); ((void ( *)(long long))PSI_server[67])(v20); } else { return my_pread(v13, a2, a3, a4, v22); } } return v15; }
_ma_mmap_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],R8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0013c1f4 LEA RDI,[RAX + 0xb78] CMP qword ptr [RAX + 0xc08],0x0 JNZ 0x0013c2ca CALL 0x001a43b8 LAB_0013c1f4: MOV R14,qword ptr [R13] LEA RAX,[R15 + RBX*0x1] CMP qword ptr [R14 + 0xa00],RAX JNC 0x0013c274 CMP byte ptr [R14 + 0x7e3],0x0 JZ 0x0013c22e MOV RDI,qword ptr [R14 + 0xc08] ADD R14,0xb78 TEST RDI,RDI JNZ 0x0013c351 LAB_0013c226: MOV RDI,R14 CALL 0x001a44e6 LAB_0013c22e: MOV R14D,dword ptr [R13 + 0x480] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013c2e0 MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a0660 MOV R15,RAX JMP 0x0013c2b8 LAB_0013c274: ADD R15,qword ptr [R14 + 0x5f0] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL 0x00129080 MOV RBX,qword ptr [R13] CMP byte ptr [RBX + 0x7e3],0x0 JZ 0x0013c2b5 MOV RDI,qword ptr [RBX + 0xc08] ADD RBX,0xb78 TEST RDI,RDI JNZ 0x0013c366 LAB_0013c2ad: MOV RDI,RBX CALL 0x001a44e6 LAB_0013c2b5: XOR R15D,R15D LAB_0013c2b8: MOV RAX,R15 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013c2ca: LEA RSI,[0x1d9774] MOV EDX,0x84 CALL 0x0012ec50 JMP 0x0013c1f4 LAB_0013c2e0: MOV R13,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1d9774] MOV RDI,R13 MOV RSI,RBX MOV ECX,0x98 CALL qword ptr [RAX + 0x210] MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R14,qword ptr [RBP + -0x30] MOV R8,R14 CALL 0x001a0660 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ RBX,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R14B,0x6 CMOVNZ RSI,RBX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R13 CALL qword ptr [RAX + 0x218] JMP 0x0013c2b8 LAB_0013c351: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0013c226 LAB_0013c366: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0013c2ad
size_t _ma_mmap_pread(long *param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; size_t sVar4; size_t sVar5; int1 local_80 [72]; ulong local_38; lVar3 = *param_1; local_38 = param_5; if (*(char *)(lVar3 + 0x7e3) != '\0') { if (*(long *)(lVar3 + 0xc08) == 0) { my_rw_rdlock(); } else { psi_rwlock_rdlock(lVar3 + 0xb78, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x84); } } lVar3 = *param_1; if (*(ulong *)(lVar3 + 0xa00) < param_4 + param_3) { if (*(char *)(lVar3 + 0x7e3) != '\0') { if (*(long *)(lVar3 + 0xc08) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0xb78); } uVar1 = (int4)param_1[0x90]; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6); if (lVar3 == 0) { sVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 0x98); uVar2 = local_38; sVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); if (sVar4 != 0) { param_3 = 0; } sVar5 = 0; if (sVar4 != 0xffffffffffffffff) { sVar5 = sVar4; } if ((uVar2 & 6) != 0) { sVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,sVar5); } } else { memcpy(param_2,(void *)(param_4 + *(long *)(lVar3 + 0x5f0)),param_3); lVar3 = *param_1; if (*(char *)(lVar3 + 0x7e3) != '\0') { if (*(long *)(lVar3 + 0xc08) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0xb78); } sVar4 = 0; } return sVar4; }
36,094
js_typed_array_get_length_unsafe
bluesky950520[P]quickjs/quickjs.c
static int js_typed_array_get_length_unsafe(JSContext *ctx, JSValue obj) { JSObject *p; p = get_typed_array(ctx, obj); if (!p) return -1; if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); return -1; } return p->u.array.count; }
O1
c
js_typed_array_get_length_unsafe: pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq %rsi, 0x8(%rsp) cmpl $-0x1, %edx jne 0x77f55 movq 0x8(%rsp), %r14 movzwl 0x6(%r14), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x77f69 leaq 0x2a4b5(%rip), %rsi # 0xa2411 xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testq %r14, %r14 je 0x77f96 movq %r14, %rdi callq 0x396c4 testl %eax, %eax je 0x77f92 leaq 0x2a49c(%rip), %rsi # 0xa2422 movq %rbx, %rdi xorl %eax, %eax callq 0x22567 jmp 0x77f96 movl 0x40(%r14), %ebp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
js_typed_array_get_length_unsafe: push rbp push r14 push rbx sub rsp, 10h mov rbx, rdi mov [rsp+28h+var_20], rsi cmp edx, 0FFFFFFFFh jnz short loc_77F55 mov r14, [rsp+28h+var_20] movzx eax, word ptr [r14+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jb short loc_77F69 loc_77F55: lea rsi, aNotATypedarray; "not a TypedArray" xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_77F69: mov ebp, 0FFFFFFFFh test r14, r14 jz short loc_77F96 mov rdi, r14 call typed_array_is_oob test eax, eax jz short loc_77F92 lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_77F96 loc_77F92: mov ebp, [r14+40h] loc_77F96: mov eax, ebp add rsp, 10h pop rbx pop r14 pop rbp retn
long long js_typed_array_get_length_unsafe( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // r14 unsigned int v15; // ebp long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 char v23; // [rsp+0h] [rbp-28h] if ( (_DWORD)a3 != -1 || (v14 = a2, (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu) ) { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23); } v15 = -1; if ( v14 ) { if ( typed_array_is_oob(v14) ) JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v16, v17, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14, v23); else return *(unsigned int *)(v14 + 64); } return v15; }
36,095
js_typed_array_get_length_unsafe
bluesky950520[P]quickjs/quickjs.c
static int js_typed_array_get_length_unsafe(JSContext *ctx, JSValue obj) { JSObject *p; p = get_typed_array(ctx, obj); if (!p) return -1; if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); return -1; } return p->u.array.count; }
O2
c
js_typed_array_get_length_unsafe: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 callq 0x3280b pushq $-0x1 popq %rbx testq %rax, %rax je 0x64e92 movq %rax, %r15 movq %rax, %rdi callq 0x32836 testl %eax, %eax je 0x64e8e movq %r14, %rdi callq 0x3289b jmp 0x64e92 movl 0x40(%r15), %ebx movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq
js_typed_array_get_length_unsafe: push r15 push r14 push rbx mov r14, rdi call get_typed_array push 0FFFFFFFFFFFFFFFFh pop rbx test rax, rax jz short loc_64E92 mov r15, rax mov rdi, rax call typed_array_is_oob test eax, eax jz short loc_64E8E mov rdi, r14 call JS_ThrowTypeErrorArrayBufferOOB jmp short loc_64E92 loc_64E8E: mov ebx, [r15+40h] loc_64E92: mov eax, ebx pop rbx pop r14 pop r15 retn
long long js_typed_array_get_length_unsafe( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long typed_array; // rax unsigned int v15; // ebx long long v16; // r15 long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 char v24; // [rsp+0h] [rbp-18h] typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v15 = -1; if ( typed_array ) { v16 = typed_array; if ( typed_array_is_oob(typed_array) ) JS_ThrowTypeErrorArrayBufferOOB(a1, a7, a8, a9, a10, v21, v22, a13, a14, a2, v17, v18, v19, v20, v24); else return *(unsigned int *)(v16 + 64); } return v15; }
js_typed_array_get_length_unsafe: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI CALL 0x0013280b PUSH -0x1 POP RBX TEST RAX,RAX JZ 0x00164e92 MOV R15,RAX MOV RDI,RAX CALL 0x00132836 TEST EAX,EAX JZ 0x00164e8e MOV RDI,R14 CALL 0x0013289b JMP 0x00164e92 LAB_00164e8e: MOV EBX,dword ptr [R15 + 0x40] LAB_00164e92: MOV EAX,EBX POP RBX POP R14 POP R15 RET
int4 js_typed_array_get_length_unsafe(int8 param_1) { int iVar1; long lVar2; int4 uVar3; lVar2 = get_typed_array(); uVar3 = 0xffffffff; if (lVar2 != 0) { iVar1 = typed_array_is_oob(lVar2); if (iVar1 == 0) { uVar3 = *(int4 *)(lVar2 + 0x40); } else { JS_ThrowTypeErrorArrayBufferOOB(param_1); } } return uVar3; }
36,096
js_typed_array_get_length_unsafe
bluesky950520[P]quickjs/quickjs.c
static int js_typed_array_get_length_unsafe(JSContext *ctx, JSValue obj) { JSObject *p; p = get_typed_array(ctx, obj); if (!p) return -1; if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); return -1; } return p->u.array.count; }
O3
c
js_typed_array_get_length_unsafe: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $-0x1, %edx jne 0x7a9cd movq %rsi, %r14 movzwl 0x6(%rsi), %eax addl $-0x15, %eax cmpw $0xc, %ax jae 0x7a9cd movq %r14, %rdi callq 0x3aa19 testl %eax, %eax je 0x7a9eb leaq 0x2aa01(%rip), %rsi # 0xa53cc jmp 0x7a9d4 leaq 0x2a9e7(%rip), %rsi # 0xa53bb movq %rbx, %rdi xorl %eax, %eax callq 0x22d8b movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 retq movl 0x40(%r14), %eax jmp 0x7a9e3
js_typed_array_get_length_unsafe: push r14 push rbx push rax mov rbx, rdi cmp edx, 0FFFFFFFFh jnz short loc_7A9CD mov r14, rsi movzx eax, word ptr [rsi+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jnb short loc_7A9CD mov rdi, r14 call typed_array_is_oob test eax, eax jz short loc_7A9EB lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" jmp short loc_7A9D4 loc_7A9CD: lea rsi, aNotATypedarray; "not a TypedArray" loc_7A9D4: mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov eax, 0FFFFFFFFh loc_7A9E3: add rsp, 8 pop rbx pop r14 retn loc_7A9EB: mov eax, [r14+40h] jmp short loc_7A9E3
long long js_typed_array_get_length_unsafe( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al const char *v15; // rsi char v17; // [rsp-8h] [rbp-18h] v17 = v14; if ( (_DWORD)a3 == -1 && (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) < 0xCu ) { if ( !typed_array_is_oob(a2) ) return *(unsigned int *)(a2 + 64); v15 = "ArrayBuffer is detached or resized"; } else { v15 = "not a TypedArray"; } JS_ThrowTypeError(a1, (long long)v15, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17); return 0xFFFFFFFFLL; }
js_typed_array_get_length_unsafe: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP EDX,-0x1 JNZ 0x0017a9cd MOV R14,RSI MOVZX EAX,word ptr [RSI + 0x6] ADD EAX,-0x15 CMP AX,0xc JNC 0x0017a9cd MOV RDI,R14 CALL 0x0013aa19 TEST EAX,EAX JZ 0x0017a9eb LEA RSI,[0x1a53cc] JMP 0x0017a9d4 LAB_0017a9cd: LEA RSI,[0x1a53bb] LAB_0017a9d4: MOV RDI,RBX XOR EAX,EAX CALL 0x00122d8b MOV EAX,0xffffffff LAB_0017a9e3: ADD RSP,0x8 POP RBX POP R14 RET LAB_0017a9eb: MOV EAX,dword ptr [R14 + 0x40] JMP 0x0017a9e3
int4 js_typed_array_get_length_unsafe(int8 param_1,long param_2,int param_3) { int iVar1; char *pcVar2; if ((param_3 == -1) && ((ushort)(*(short *)(param_2 + 6) - 0x15U) < 0xc)) { iVar1 = typed_array_is_oob(param_2); if (iVar1 == 0) { return *(int4 *)(param_2 + 0x40); } pcVar2 = "ArrayBuffer is detached or resized"; } else { pcVar2 = "not a TypedArray"; } JS_ThrowTypeError(param_1,pcVar2); return 0xffffffff; }
36,097
evmone::instr::core::mload(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result mload(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { auto& index = stack.top(); if (!check_memory(gas_left, state.memory, index, 32)) return {EVMC_OUT_OF_GAS, gas_left}; index = intx::be::unsafe::load<uint256>(&state.memory[static_cast<size_t>(index)]); return {EVMC_SUCCESS, gas_left}; }
O2
cpp
evmone::instr::core::mload(evmone::StackTop, long, evmone::ExecutionState&): pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movq %rsp, %rdi movq %rsi, (%rdi) addq $0x8, %r14 pushq $0x20 popq %rcx movq %r14, %rsi movq %rbx, %rdx callq 0x3b2b8 testb %al, %al je 0x3bfb5 movq (%rbx), %rax movq (%r14), %rcx movdqu (%rcx,%rax), %xmm0 movdqu 0x10(%rcx,%rax), %xmm1 movdqa 0x3ae02(%rip), %xmm2 # 0x76da0 pshufb %xmm2, %xmm1 movdqu %xmm1, (%rbx) pshufb %xmm2, %xmm0 movdqu %xmm0, 0x10(%rbx) xorl %eax, %eax jmp 0x3bfb8 pushq $0x3 popq %rax movq (%rsp), %rdx addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN6evmone5instr4core5mloadENS_8StackTopElRNS_14ExecutionStateE: push r14 push rbx push rax mov r14, rdx mov rbx, rdi mov rdi, rsp mov [rdi], rsi add r14, 8 push 20h ; ' ' pop rcx mov rsi, r14 mov rdx, rbx call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEEm; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,ulong) test al, al jz short loc_3BFB5 mov rax, [rbx] mov rcx, [r14] movdqu xmm0, xmmword ptr [rcx+rax] movdqu xmm1, xmmword ptr [rcx+rax+10h] movdqa xmm2, cs:xmmword_76DA0 pshufb xmm1, xmm2 movdqu xmmword ptr [rbx], xmm1 pshufb xmm0, xmm2 movdqu xmmword ptr [rbx+10h], xmm0 xor eax, eax jmp short loc_3BFB8 loc_3BFB5: push 3 pop rax loc_3BFB8: mov rdx, [rsp+18h+var_18] add rsp, 8 pop rbx pop r14 retn
long long evmone::instr::core::mload(__m128i *a1, evmone *a2, long long a3) { _QWORD *v3; // r14 __m128i v4; // xmm0 __m128i si128; // xmm2 evmone *v7; // [rsp+0h] [rbp-18h] BYREF v7 = a2; v3 = (_QWORD *)(a3 + 8); if ( !evmone::check_memory(&v7, a3 + 8, (unsigned long long *)a1, 0x20uLL) ) return 3LL; v4 = _mm_loadu_si128((const __m128i *)(*v3 + a1->m128i_i64[0])); si128 = _mm_load_si128((const __m128i *)&xmmword_76DA0); *a1 = _mm_shuffle_epi8(_mm_loadu_si128((const __m128i *)(*v3 + a1->m128i_i64[0] + 16)), si128); a1[1] = _mm_shuffle_epi8(v4, si128); return 0LL; }
mload: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOV RDI,RSP MOV qword ptr [RDI],RSI ADD R14,0x8 PUSH 0x20 POP RCX MOV RSI,R14 MOV RDX,RBX CALL 0x0013b2b8 TEST AL,AL JZ 0x0013bfb5 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [R14] MOVDQU XMM0,xmmword ptr [RCX + RAX*0x1] MOVDQU XMM1,xmmword ptr [RCX + RAX*0x1 + 0x10] MOVDQA XMM2,xmmword ptr [0x00176da0] PSHUFB XMM1,XMM2 MOVDQU xmmword ptr [RBX],XMM1 PSHUFB XMM0,XMM2 MOVDQU xmmword ptr [RBX + 0x10],XMM0 XOR EAX,EAX JMP 0x0013bfb8 LAB_0013bfb5: PUSH 0x3 POP RAX LAB_0013bfb8: MOV RDX,qword ptr [RSP] ADD RSP,0x8 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* evmone::instr::core::mload(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::mload(uint *param_1,long param_2,long param_3) { int1 auVar1 [16]; long lVar2; char cVar3; int8 uVar4; int1 auVar5 [16]; int1 auVar6 [16]; long local_18; local_18 = param_2; cVar3 = check_memory(&local_18,(Memory *)(param_3 + 8),param_1,0x20); auVar5 = _DAT_00176da0; if (cVar3 == '\0') { uVar4 = 3; } else { lVar2 = *(long *)(param_3 + 8); auVar1 = *(int1 (*) [16])(lVar2 + *(long *)param_1); auVar6 = pshufb(*(int1 (*) [16])(lVar2 + 0x10 + *(long *)param_1),_DAT_00176da0); *(int1 (*) [16])param_1 = auVar6; auVar5 = pshufb(auVar1,auVar5); *(int1 (*) [16])(param_1 + 0x10) = auVar5; uVar4 = 0; } auVar5._8_8_ = local_18; auVar5._0_8_ = uVar4; return auVar5; }
36,098
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O3
c
skip: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movl %edi, %ebx movq %rdx, -0x140(%rbp) movq %rcx, -0x138(%rbp) movq %r8, -0x130(%rbp) movq %r9, -0x128(%rbp) testb %al, %al je 0x915c7 movaps %xmm0, -0x120(%rbp) movaps %xmm1, -0x110(%rbp) movaps %xmm2, -0x100(%rbp) movaps %xmm3, -0xf0(%rbp) movaps %xmm4, -0xe0(%rbp) movaps %xmm5, -0xd0(%rbp) movaps %xmm6, -0xc0(%rbp) movaps %xmm7, -0xb0(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testq %rsi, %rsi je 0x91625 movq %rsi, %r10 cmpb $0x0, (%rsi) je 0x91625 leaq -0x150(%rbp), %rax leaq -0xa0(%rbp), %r9 movq %rax, 0x10(%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r9) leaq -0x80(%rbp), %rdi movl $0x50, %esi movl $0x50, %ecx movl $0x1, %edx movq %r10, %r8 callq 0x291a0 jmp 0x91629 movb $0x0, -0x80(%rbp) testl %ebx, %ebx jle 0x916b9 incl %ebx movq 0x2f296e(%rip), %r15 # 0x383fa8 leaq 0x4a91a(%rip), %r12 # 0xdbf5b leaq -0x80(%rbp), %r13 leaq 0x4e7c3(%rip), %r14 # 0xdfe0f xorps %xmm0, %xmm0 movaps %xmm0, -0xa0(%rbp) movq $0x0, -0x90(%rbp) movl $0x1, %edi xorl %esi, %esi leaq -0xa0(%rbp), %rdx callq 0x9140d movq (%r15), %rdi movl $0x1, %esi leaq 0x4a944(%rip), %rdx # 0xdbfc7 movq %r12, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x29400 movq (%r15), %rdi movl $0x1, %esi movq %r14, %rdx xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x29400 decl %ebx cmpl $0x1, %ebx ja 0x9164c movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x916da addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
skip: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov ebx, edi mov [rbp+var_140], rdx mov [rbp+var_138], rcx mov [rbp+var_130], r8 mov [rbp+var_128], r9 test al, al jz short loc_915C7 movaps [rbp+var_120], xmm0 movaps [rbp+var_110], xmm1 movaps [rbp+var_100], xmm2 movaps [rbp+var_F0], xmm3 movaps [rbp+var_E0], xmm4 movaps [rbp+var_D0], xmm5 movaps [rbp+var_C0], xmm6 movaps [rbp+var_B0], xmm7 loc_915C7: mov rax, fs:28h mov [rbp+var_30], rax test rsi, rsi jz short loc_91625 mov r10, rsi cmp byte ptr [rsi], 0 jz short loc_91625 lea rax, [rbp+var_150] lea r9, [rbp+var_A0] mov [r9+10h], rax lea rax, [rbp+arg_0] mov [r9+8], rax mov rax, 3000000010h mov [r9], rax lea rdi, [rbp+var_80] mov esi, 50h ; 'P' mov ecx, 50h ; 'P' mov edx, 1 mov r8, r10 call ___vsnprintf_chk jmp short loc_91629 loc_91625: mov [rbp+var_80], 0 loc_91629: test ebx, ebx jle loc_916B9 inc ebx mov r15, cs:stdout_ptr lea r12, aSkip; "skip" lea r13, [rbp+var_80] lea r14, asc_DFE0C+3; "\n" loc_9164C: xorps xmm0, xmm0 movaps [rbp+var_A0], xmm0 mov [rbp+var_90], 0 mov edi, 1 xor esi, esi lea rdx, [rbp+var_A0] call vemit_tap mov rdi, [r15] mov esi, 1 lea rdx, aSS; " # %s %s" mov rcx, r12 mov r8, r13 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush mov rdi, [r15] mov esi, 1 mov rdx, r14 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush dec ebx cmp ebx, 1 ja short loc_9164C loc_916B9: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_916DA add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_916DA: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { unsigned int v2; // ebx va_list va; // [rsp+B0h] [rbp-A0h] BYREF char v5[80]; // [rsp+D0h] [rbp-80h] BYREF unsigned long long v6; // [rsp+120h] [rbp-30h] v6 = __readfsqword(0x28u); if ( a2 && *a2 ) { va_start(va, a2); __vsnprintf_chk(v5, 80LL, 1LL, 80LL, a2, va); } else { v5[0] = 0; } if ( a1 > 0 ) { v2 = a1 + 1; do { memset(va, 0, sizeof(va)); vemit_tap(1, 0LL, (long long)va); __fprintf_chk(stdout, 1LL, " # %s %s", "skip", v5); fflush(stdout); __fprintf_chk(stdout, 1LL, "\n"); fflush(stdout); --v2; } while ( v2 > 1 ); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV EBX,EDI MOV qword ptr [RBP + -0x140],RDX MOV qword ptr [RBP + -0x138],RCX MOV qword ptr [RBP + -0x130],R8 MOV qword ptr [RBP + -0x128],R9 TEST AL,AL JZ 0x001915c7 MOVAPS xmmword ptr [RBP + -0x120],XMM0 MOVAPS xmmword ptr [RBP + -0x110],XMM1 MOVAPS xmmword ptr [RBP + -0x100],XMM2 MOVAPS xmmword ptr [RBP + -0xf0],XMM3 MOVAPS xmmword ptr [RBP + -0xe0],XMM4 MOVAPS xmmword ptr [RBP + -0xd0],XMM5 MOVAPS xmmword ptr [RBP + -0xc0],XMM6 MOVAPS xmmword ptr [RBP + -0xb0],XMM7 LAB_001915c7: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST RSI,RSI JZ 0x00191625 MOV R10,RSI CMP byte ptr [RSI],0x0 JZ 0x00191625 LEA RAX,[RBP + -0x150] LEA R9,[RBP + -0xa0] MOV qword ptr [R9 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R9],RAX LEA RDI,[RBP + -0x80] MOV ESI,0x50 MOV ECX,0x50 MOV EDX,0x1 MOV R8,R10 CALL 0x001291a0 JMP 0x00191629 LAB_00191625: MOV byte ptr [RBP + -0x80],0x0 LAB_00191629: TEST EBX,EBX JLE 0x001916b9 INC EBX MOV R15,qword ptr [0x00483fa8] LEA R12,[0x1dbf5b] LEA R13,[RBP + -0x80] LEA R14,[0x1dfe0f] LAB_0019164c: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOV qword ptr [RBP + -0x90],0x0 MOV EDI,0x1 XOR ESI,ESI LEA RDX,[RBP + -0xa0] CALL 0x0019140d MOV RDI,qword ptr [R15] MOV ESI,0x1 LEA RDX,[0x1dbfc7] MOV RCX,R12 MOV R8,R13 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x00129400 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,R14 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x00129400 DEC EBX CMP EBX,0x1 JA 0x0019164c LAB_001916b9: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001916da ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001916da: CALL 0x00129270
void skip(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { int *puVar1; char in_AL; uint uVar2; long in_FS_OFFSET; int1 local_158 [16]; int8 local_148; int8 local_140; int8 local_138; int8 local_130; int4 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int1 *puStack_a0; int1 *local_98; int1 local_88 [80]; long local_38; if (in_AL != '\0') { local_128 = param_1; local_118 = param_2; local_108 = param_3; local_f8 = param_4; local_e8 = param_5; local_d8 = param_6; local_c8 = param_7; local_b8 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_148 = param_11; local_140 = param_12; local_138 = param_13; local_130 = param_14; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_88[0] = 0; } else { local_98 = local_158; puStack_a0 = &stack0x00000008; local_a8 = 0x3000000010; __vsnprintf_chk(local_88,0x50,1,0x50,param_10); } puVar1 = PTR_stdout_00483fa8; if (0 < param_9) { uVar2 = param_9 + 1; do { local_a8 = 0; puStack_a0 = (int1 *)0x0; local_98 = (int1 *)0x0; vemit_tap(1,0,&local_a8); __fprintf_chk(*(int8 *)puVar1,1," # %s %s",&DAT_001dbf5b,local_88); fflush(*(FILE **)puVar1); __fprintf_chk(*(int8 *)puVar1,1,&DAT_001dfe0f); fflush(*(FILE **)puVar1); uVar2 = uVar2 - 1; } while (1 < uVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
36,099
testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile(char const*)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
explicit ScopedPrematureExitFile(const char* premature_exit_filepath) : premature_exit_filepath_( premature_exit_filepath ? premature_exit_filepath : "") { // If a path to the premature-exit file is specified... if (!premature_exit_filepath_.empty()) { // create the file with a single "0" character in it. I/O // errors are ignored as there's nothing better we can do and we // don't want to fail the test because of this. FILE* pfile = posix::FOpen(premature_exit_filepath_.c_str(), "w"); fwrite("0", 1, 1, pfile); fclose(pfile); } }
O3
cpp
testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile(char const*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx testq %rsi, %rsi leaq 0xeb24(%rip), %rax # 0x4337e cmoveq %rax, %r14 leaq 0x10(%rdi), %rax movq %rax, (%rdi) movq %r14, %rdi callq 0x8200 leaq (%rax,%r14), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x3911e cmpq $0x0, 0x8(%rbx) je 0x348b1 movq (%rbx), %rdi leaq 0xf17f(%rip), %rsi # 0x43a0c callq 0x8610 movq %rax, %rbx movl $0x30, %edi movq %rax, %rsi callq 0x8690 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x84a0 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN7testing8internal23ScopedPrematureExitFileC2EPKc: push r14 push rbx push rax mov r14, rsi mov rbx, rdi test rsi, rsi lea rax, aSFromSSMsTotal+1Ah; "" cmovz r14, rax lea rax, [rdi+10h] mov [rdi], rax mov rdi, r14 call _strlen lea rdx, [rax+r14] mov rdi, rbx mov rsi, 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) cmp qword ptr [rbx+8], 0 jz short loc_348B1 mov rdi, [rbx] lea rsi, aW; "w" call _fopen mov rbx, rax mov edi, 30h ; '0' mov rsi, rax call _fputc mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _fclose loc_348B1: add rsp, 8 pop rbx pop r14 retn
long long testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile( testing::internal::ScopedPrematureExitFile *this, char *a2) { char *v2; // r14 long long v3; // rax long long result; // rax long long v5; // rbx v2 = a2; if ( !a2 ) v2 = ""; *(_QWORD *)this = (char *)this + 16; v3 = strlen(v2); result = std::string::_M_construct<char const*>(this, v2, &v2[v3]); if ( *((_QWORD *)this + 1) ) { v5 = fopen(*(_QWORD *)this, "w"); fputc(48LL, v5); return fclose(v5); } return result; }
ScopedPrematureExitFile: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI TEST RSI,RSI LEA RAX,[0x14337e] CMOVZ R14,RAX LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV RDI,R14 CALL 0x00108200 LEA RDX,[RAX + R14*0x1] MOV RDI,RBX MOV RSI,R14 CALL 0x0013911e CMP qword ptr [RBX + 0x8],0x0 JZ 0x001348b1 MOV RDI,qword ptr [RBX] LEA RSI,[0x143a0c] CALL 0x00108610 MOV RBX,RAX MOV EDI,0x30 MOV RSI,RAX CALL 0x00108690 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001084a0 LAB_001348b1: ADD RSP,0x8 POP RBX POP R14 RET
/* testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile(char const*) */ void __thiscall testing::internal::ScopedPrematureExitFile::ScopedPrematureExitFile (ScopedPrematureExitFile *this,char *param_1) { size_t sVar1; FILE *__stream; if (param_1 == (char *)0x0) { param_1 = ""; } *(ScopedPrematureExitFile **)this = this + 0x10; sVar1 = strlen(param_1); std::__cxx11::string::_M_construct<char_const*>(this,param_1,param_1 + sVar1); if (*(long *)(this + 8) != 0) { __stream = fopen(*(char **)this,"w"); fputc(0x30,__stream); fclose(__stream); return; } return; }