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
61,400
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O2
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq 0xca30a(%rip), %rbx # 0x10cde8 movq 0xca30b(%rip), %r15 # 0x10cdf0 cmpq %r15, %rbx je 0x42b13 movl (%rbx), %edi callq 0x24870 movq %rax, %rdi movq %r14, %rsi callq 0x51e7c testb %al, %al jne 0x42b06 addq $0x4, %rbx jmp 0x42ae5 movl (%rbx), %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x7a70f(%rip), %rsi # 0xbd234 leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x45643 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x24e90 xorl %ebp, %ebp movq 0xc94a5(%rip), %rsi # 0x10bff0 movq 0xc9406(%rip), %rdx # 0x10bf58 movq %rbx, %rdi callq 0x24f80 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25298 testb %bpl, %bpl jne 0x42b71 jmp 0x42b79 movq %rax, %r14 movq %rbx, %rdi callq 0x246a0 movq %r14, %rdi callq 0x25010 nop
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 28h mov r14, rdi mov rbx, cs:_ZL14kv_cache_types; kv_cache_types mov r15, cs:qword_10CDF0 loc_42AE5: cmp rbx, r15 jz short loc_42B13 mov edi, [rbx] call _ggml_type_name mov rdi, rax mov rsi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbPKT_RKNSt7__cxx1112basic_stringIS3_T0_T1_EE; std::operator==<char>(char const*,std::string const&) test al, al jnz short loc_42B06 add rbx, 4 jmp short loc_42AE5 loc_42B06: mov eax, [rbx] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_42B13: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnsupportedCac; "Unsupported cache type: " lea rdi, [rsp+48h+var_40] mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_42B71 jmp short loc_42B79 mov r14, rax loc_42B71: mov rdi, rbx; void * call ___cxa_free_exception loc_42B79: mov rdi, r14 call __Unwind_Resume
long long kv_cache_type_from_str(long long a1) { unsigned int *v1; // rbx long long v2; // r15 long long v3; // rax void *exception; // rbx _BYTE v6[64]; // [rsp+8h] [rbp-40h] BYREF v1 = (unsigned int *)kv_cache_types; v2 = qword_10CDF0; while ( 1 ) { if ( v1 == (unsigned int *)v2 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v6, "Unsupported cache type: ", a1); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = ggml_type_name(*v1); if ( (unsigned __int8)std::operator==<char>(v3, a1) ) break; ++v1; } return *v1; }
kv_cache_type_from_str: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RBX,qword ptr [0x0020cde8] MOV R15,qword ptr [0x0020cdf0] LAB_00142ae5: CMP RBX,R15 JZ 0x00142b13 MOV EDI,dword ptr [RBX] CALL 0x00124870 MOV RDI,RAX MOV RSI,R14 CALL 0x00151e7c TEST AL,AL JNZ 0x00142b06 ADD RBX,0x4 JMP 0x00142ae5 LAB_00142b06: MOV EAX,dword ptr [RBX] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00142b13: PUSH 0x10 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_00142b1e: LEA RSI,[0x1bd234] LEA RDI,[RSP + 0x8] MOV RDX,R14 CALL 0x00145643 MOV BPL,0x1 LAB_00142b35: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00124e90 XOR EBP,EBP MOV RSI,qword ptr [0x0020bff0] MOV RDX,qword ptr [0x0020bf58] MOV RDI,RBX CALL 0x00124f80
/* kv_cache_type_from_str(std::__cxx11::string const&) */ int4 kv_cache_type_from_str(string *param_1) { int4 *puVar1; bool bVar2; char *pcVar3; runtime_error *this; int4 *puVar4; string local_40 [32]; puVar1 = DAT_0020cdf0; puVar4 = kv_cache_types; while( true ) { if (puVar4 == puVar1) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00142b1e to 00142b31 has its CatchHandler @ 00142b6e */ std::operator+((char *)local_40,(string *)"Unsupported cache type: "); /* try { // try from 00142b35 to 00142b59 has its CatchHandler @ 00142b5a */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58); } pcVar3 = (char *)ggml_type_name(*puVar4); bVar2 = std::operator==(pcVar3,param_1); if (bVar2) break; puVar4 = puVar4 + 1; } return *puVar4; }
61,401
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O3
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq 0xdd424(%rip), %rbx # 0x13bdc8 movq 0xdd425(%rip), %r15 # 0x13bdd0 cmpq %r15, %rbx je 0x5e9d9 movl (%rbx), %edi callq 0x1b850 movq %r14, %rdi movq %rax, %rsi callq 0x1b220 testl %eax, %eax je 0x5e9cc addq $0x4, %rbx jmp 0x5e9ab movl (%rbx), %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x9c885(%rip), %rsi # 0xfb272 leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x623d1 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1be80 xorl %ebp, %ebp movq 0xdc5d5(%rip), %rsi # 0x13afe8 movq 0xdc53e(%rip), %rdx # 0x13af58 movq %rbx, %rdi callq 0x1bf90 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5ea40 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 testb %bpl, %bpl jne 0x5ea4a jmp 0x5ea52 movq %rax, %r14 movq %rbx, %rdi callq 0x1b680 movq %r14, %rdi callq 0x1c020
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 28h mov r14, rdi mov rbx, cs:_ZL14kv_cache_types; kv_cache_types mov r15, cs:qword_13BDD0 loc_5E9AB: cmp rbx, r15 jz short loc_5E9D9 mov edi, [rbx] call _ggml_type_name mov rdi, r14 mov rsi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_5E9CC add rbx, 4 jmp short loc_5E9AB loc_5E9CC: mov eax, [rbx] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_5E9D9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnsupportedCac; "Unsupported cache type: " lea rdi, [rsp+48h+var_40] mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+48h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5EA40 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5EA40: test bpl, bpl jnz short loc_5EA4A jmp short loc_5EA52 mov r14, rax loc_5EA4A: mov rdi, rbx; void * call ___cxa_free_exception loc_5EA52: mov rdi, r14 call __Unwind_Resume
long long kv_cache_type_from_str(long long a1) { unsigned int *v1; // rbx long long v2; // r15 long long v3; // rax void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-40h] BYREF v1 = (unsigned int *)kv_cache_types; v2 = qword_13BDD0; while ( 1 ) { if ( v1 == (unsigned int *)v2 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v6, "Unsupported cache type: ", a1); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = ggml_type_name(*v1); if ( !(unsigned int)std::string::compare(a1, v3) ) break; ++v1; } return *v1; }
kv_cache_type_from_str: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RBX,qword ptr [0x0023bdc8] MOV R15,qword ptr [0x0023bdd0] LAB_0015e9ab: CMP RBX,R15 JZ 0x0015e9d9 MOV EDI,dword ptr [RBX] CALL 0x0011b850 MOV RDI,R14 MOV RSI,RAX CALL 0x0011b220 TEST EAX,EAX JZ 0x0015e9cc ADD RBX,0x4 JMP 0x0015e9ab LAB_0015e9cc: MOV EAX,dword ptr [RBX] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0015e9d9: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_0015e9e6: LEA RSI,[0x1fb272] LEA RDI,[RSP + 0x8] MOV RDX,R14 CALL 0x001623d1 MOV BPL,0x1 LAB_0015e9fd: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0011be80 XOR EBP,EBP MOV RSI,qword ptr [0x0023afe8] MOV RDX,qword ptr [0x0023af58] MOV RDI,RBX CALL 0x0011bf90
/* kv_cache_type_from_str(std::__cxx11::string const&) */ int4 kv_cache_type_from_str(string *param_1) { int4 *puVar1; int iVar2; runtime_error *this; int4 *puVar3; string local_40 [32]; puVar1 = DAT_0023bdd0; puVar3 = kv_cache_types; while( true ) { if (puVar3 == puVar1) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015e9e6 to 0015e9f9 has its CatchHandler @ 0015ea47 */ std::operator+((char *)local_40,(string *)"Unsupported cache type: "); /* try { // try from 0015e9fd to 0015ea21 has its CatchHandler @ 0015ea22 */ std::runtime_error::runtime_error(this,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0023afe8,PTR__runtime_error_0023af58); } ggml_type_name(*puVar3); iVar2 = std::__cxx11::string::compare((char *)param_1); if (iVar2 == 0) break; puVar3 = puVar3 + 1; } return *puVar3; }
61,402
qdevtools::MethodIncoker::~MethodIncoker()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
MethodIncoker(QObject* object, const QMetaMethod& method, QWidget* parent = nullptr) : QWidget(parent), object_{object}, method_{method} { setWindowTitle(method.name()); auto layout = new QGridLayout; layout->setColumnStretch(2, 1); QList<std::pair<QWidget*, QVariant (*)(QWidget*)>> edits; for (int i = 0; i < method.parameterCount(); ++i) { auto type = new QLabel(method.parameterTypeName(i)); auto name = new QLabel(method.parameterNames().value(i)); QWidget* edit = nullptr; if (typeEditor->contains(method.parameterType(i))) edit = typeEditor->value(method.parameterType(i)).create(); edits.append({edit, typeEditor->value(method.parameterType(i)).get}); const auto align = (edit && edit->height() > 25) ? Qt::AlignTop : Qt::AlignVCenter; layout->addWidget(type, i, 0, align); layout->addWidget(name, i, 1, align); if (edit) layout->addWidget(edit, i, 2); } layout->addItem(new QSpacerItem(0, 0), layout->rowCount(), 0); auto button = new QPushButton(QStringLiteral("Invoke")); connect(button, &QPushButton::clicked, this, [object, method, edits]() { const auto argc = edits.size(); QVariantList args; for (const auto& edit : edits) args.append(edit.second(edit.first)); #define A(INDEX) Arg(method.parameterTypeName(INDEX), args.value(INDEX).data()) using Arg = QGenericArgument; switch (argc) { case 0: method.invoke(object); break; case 1: method.invoke(object, A(0)); break; case 2: method.invoke(object, A(0), A(1)); break; case 3: method.invoke(object, A(0), A(1), A(2)); break; case 4: method.invoke(object, A(0), A(1), A(2), A(3)); break; case 5: method.invoke(object, A(0), A(1), A(2), A(3), A(4)); break; case 6: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5)); break; case 7: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6)); break; case 8: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7)); break; case 9: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8)); break; #undef A default: break; } }); layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), layout->rowCount(), 0); layout->addWidget(button, layout->rowCount(), 0, 1, 3); setLayout(layout); }
O0
cpp
qdevtools::MethodIncoker::~MethodIncoker(): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $-0x10, %rdi popq %rbp jmp 0x22ce0 nopw %cs:(%rax,%rax)
_ZThn16_N9qdevtools13MethodIncokerD0Ev: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 0FFFFFFFFFFFFFFF0h; this pop rbp jmp _ZN9qdevtools13MethodIncokerD0Ev; qdevtools::MethodIncoker::~MethodIncoker()
void `non-virtual thunk to'qdevtools::MethodIncoker::~MethodIncoker(qdevtools::MethodIncoker *this) { qdevtools::MethodIncoker::~MethodIncoker((qdevtools::MethodIncoker *)((char *)this - 16)); }
~MethodIncoker: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,-0x10 POP RBP JMP 0x00122ce0
/* non-virtual thunk to qdevtools::MethodIncoker::~MethodIncoker() */ void __thiscall qdevtools::MethodIncoker::~MethodIncoker(MethodIncoker *this) { ~MethodIncoker(this + -0x10); return; }
61,403
qdevtools::MethodIncoker::~MethodIncoker()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
MethodIncoker(QObject* object, const QMetaMethod& method, QWidget* parent = nullptr) : QWidget(parent), object_{object}, method_{method} { setWindowTitle(method.name()); auto layout = new QGridLayout; layout->setColumnStretch(2, 1); QList<std::pair<QWidget*, QVariant (*)(QWidget*)>> edits; for (int i = 0; i < method.parameterCount(); ++i) { auto type = new QLabel(method.parameterTypeName(i)); auto name = new QLabel(method.parameterNames().value(i)); QWidget* edit = nullptr; if (typeEditor->contains(method.parameterType(i))) edit = typeEditor->value(method.parameterType(i)).create(); edits.append({edit, typeEditor->value(method.parameterType(i)).get}); const auto align = (edit && edit->height() > 25) ? Qt::AlignTop : Qt::AlignVCenter; layout->addWidget(type, i, 0, align); layout->addWidget(name, i, 1, align); if (edit) layout->addWidget(edit, i, 2); } layout->addItem(new QSpacerItem(0, 0), layout->rowCount(), 0); auto button = new QPushButton(QStringLiteral("Invoke")); connect(button, &QPushButton::clicked, this, [object, method, edits]() { const auto argc = edits.size(); QVariantList args; for (const auto& edit : edits) args.append(edit.second(edit.first)); #define A(INDEX) Arg(method.parameterTypeName(INDEX), args.value(INDEX).data()) using Arg = QGenericArgument; switch (argc) { case 0: method.invoke(object); break; case 1: method.invoke(object, A(0)); break; case 2: method.invoke(object, A(0), A(1)); break; case 3: method.invoke(object, A(0), A(1), A(2)); break; case 4: method.invoke(object, A(0), A(1), A(2), A(3)); break; case 5: method.invoke(object, A(0), A(1), A(2), A(3), A(4)); break; case 6: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5)); break; case 7: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6)); break; case 8: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7)); break; case 9: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8)); break; #undef A default: break; } }); layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), layout->rowCount(), 0); layout->addWidget(button, layout->rowCount(), 0, 1, 3); setLayout(layout); }
O1
cpp
qdevtools::MethodIncoker::~MethodIncoker(): pushq %rbx movq %rdi, %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0xf340 movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0xf0d0
_ZThn16_N9qdevtools13MethodIncokerD0Ev: push rbx mov rbx, rdi add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx; this call __ZN7QWidgetD2Ev; QWidget::~QWidget() mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void `non-virtual thunk to'qdevtools::MethodIncoker::~MethodIncoker(qdevtools::MethodIncoker *this) { QWidget::~QWidget((qdevtools::MethodIncoker *)((char *)this - 16)); operator delete((char *)this - 16, 0x40uLL); }
~MethodIncoker: PUSH RBX MOV RBX,RDI ADD RBX,-0x10 MOV RDI,RBX CALL 0x0010f340 MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0010f0d0
/* non-virtual thunk to qdevtools::MethodIncoker::~MethodIncoker() */ void __thiscall qdevtools::MethodIncoker::~MethodIncoker(MethodIncoker *this) { QWidget::~QWidget((QWidget *)(this + -0x10)); operator_delete((QWidget *)(this + -0x10),0x40); return; }
61,404
qdevtools::MethodIncoker::~MethodIncoker()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
MethodIncoker(QObject* object, const QMetaMethod& method, QWidget* parent = nullptr) : QWidget(parent), object_{object}, method_{method} { setWindowTitle(method.name()); auto layout = new QGridLayout; layout->setColumnStretch(2, 1); QList<std::pair<QWidget*, QVariant (*)(QWidget*)>> edits; for (int i = 0; i < method.parameterCount(); ++i) { auto type = new QLabel(method.parameterTypeName(i)); auto name = new QLabel(method.parameterNames().value(i)); QWidget* edit = nullptr; if (typeEditor->contains(method.parameterType(i))) edit = typeEditor->value(method.parameterType(i)).create(); edits.append({edit, typeEditor->value(method.parameterType(i)).get}); const auto align = (edit && edit->height() > 25) ? Qt::AlignTop : Qt::AlignVCenter; layout->addWidget(type, i, 0, align); layout->addWidget(name, i, 1, align); if (edit) layout->addWidget(edit, i, 2); } layout->addItem(new QSpacerItem(0, 0), layout->rowCount(), 0); auto button = new QPushButton(QStringLiteral("Invoke")); connect(button, &QPushButton::clicked, this, [object, method, edits]() { const auto argc = edits.size(); QVariantList args; for (const auto& edit : edits) args.append(edit.second(edit.first)); #define A(INDEX) Arg(method.parameterTypeName(INDEX), args.value(INDEX).data()) using Arg = QGenericArgument; switch (argc) { case 0: method.invoke(object); break; case 1: method.invoke(object, A(0)); break; case 2: method.invoke(object, A(0), A(1)); break; case 3: method.invoke(object, A(0), A(1), A(2)); break; case 4: method.invoke(object, A(0), A(1), A(2), A(3)); break; case 5: method.invoke(object, A(0), A(1), A(2), A(3), A(4)); break; case 6: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5)); break; case 7: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6)); break; case 8: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7)); break; case 9: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8)); break; #undef A default: break; } }); layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), layout->rowCount(), 0); layout->addWidget(button, layout->rowCount(), 0, 1, 3); setLayout(layout); }
O2
cpp
qdevtools::MethodIncoker::~MethodIncoker(): addq $-0x10, %rdi jmp 0xf340 nop
_ZThn16_N9qdevtools13MethodIncokerD1Ev: add rdi, 0FFFFFFFFFFFFFFF0h; this jmp __ZN7QWidgetD2Ev; QWidget::~QWidget()
void `non-virtual thunk to'qdevtools::MethodIncoker::~MethodIncoker(qdevtools::MethodIncoker *this) { QWidget::~QWidget((qdevtools::MethodIncoker *)((char *)this - 16)); }
~MethodIncoker: ADD RDI,-0x10 JMP 0x0010f340
/* non-virtual thunk to qdevtools::MethodIncoker::~MethodIncoker() */ void __thiscall qdevtools::MethodIncoker::~MethodIncoker(MethodIncoker *this) { QWidget::~QWidget((QWidget *)(this + -0x10)); return; }
61,405
qdevtools::MethodIncoker::~MethodIncoker()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
MethodIncoker(QObject* object, const QMetaMethod& method, QWidget* parent = nullptr) : QWidget(parent), object_{object}, method_{method} { setWindowTitle(method.name()); auto layout = new QGridLayout; layout->setColumnStretch(2, 1); QList<std::pair<QWidget*, QVariant (*)(QWidget*)>> edits; for (int i = 0; i < method.parameterCount(); ++i) { auto type = new QLabel(method.parameterTypeName(i)); auto name = new QLabel(method.parameterNames().value(i)); QWidget* edit = nullptr; if (typeEditor->contains(method.parameterType(i))) edit = typeEditor->value(method.parameterType(i)).create(); edits.append({edit, typeEditor->value(method.parameterType(i)).get}); const auto align = (edit && edit->height() > 25) ? Qt::AlignTop : Qt::AlignVCenter; layout->addWidget(type, i, 0, align); layout->addWidget(name, i, 1, align); if (edit) layout->addWidget(edit, i, 2); } layout->addItem(new QSpacerItem(0, 0), layout->rowCount(), 0); auto button = new QPushButton(QStringLiteral("Invoke")); connect(button, &QPushButton::clicked, this, [object, method, edits]() { const auto argc = edits.size(); QVariantList args; for (const auto& edit : edits) args.append(edit.second(edit.first)); #define A(INDEX) Arg(method.parameterTypeName(INDEX), args.value(INDEX).data()) using Arg = QGenericArgument; switch (argc) { case 0: method.invoke(object); break; case 1: method.invoke(object, A(0)); break; case 2: method.invoke(object, A(0), A(1)); break; case 3: method.invoke(object, A(0), A(1), A(2)); break; case 4: method.invoke(object, A(0), A(1), A(2), A(3)); break; case 5: method.invoke(object, A(0), A(1), A(2), A(3), A(4)); break; case 6: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5)); break; case 7: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6)); break; case 8: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7)); break; case 9: method.invoke(object, A(0), A(1), A(2), A(3), A(4), A(5), A(6), A(7), A(8)); break; #undef A default: break; } }); layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), layout->rowCount(), 0); layout->addWidget(button, layout->rowCount(), 0, 1, 3); setLayout(layout); }
O3
cpp
qdevtools::MethodIncoker::~MethodIncoker(): addq $-0x10, %rdi jmp 0xf340 nop
_ZThn16_N9qdevtools13MethodIncokerD1Ev: add rdi, 0FFFFFFFFFFFFFFF0h; this jmp __ZN7QWidgetD2Ev; QWidget::~QWidget()
void `non-virtual thunk to'qdevtools::MethodIncoker::~MethodIncoker(qdevtools::MethodIncoker *this) { QWidget::~QWidget((qdevtools::MethodIncoker *)((char *)this - 16)); }
~MethodIncoker: ADD RDI,-0x10 JMP 0x0010f340
/* non-virtual thunk to qdevtools::MethodIncoker::~MethodIncoker() */ void __thiscall qdevtools::MethodIncoker::~MethodIncoker(MethodIncoker *this) { QWidget::~QWidget((QWidget *)(this + -0x10)); return; }
61,406
minja::LoopControlException::LoopControlException(minja::LoopControlType)
monkey531[P]llama/common/minja.hpp
LoopControlException(LoopControlType control_type) : std::runtime_error((control_type == LoopControlType::Continue ? "continue" : "break") + std::string(" outside of a loop")), control_type(control_type) {}
O2
cpp
minja::LoopControlException::LoopControlException(minja::LoopControlType): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movl %esi, %ebx movq %rdi, %r14 leaq 0x3d6bf(%rip), %rsi # 0xc0ee8 leaq 0x30(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi callq 0x30aea cmpl $0x1, %ebx leaq 0x3c36e(%rip), %rax # 0xbfbb3 leaq 0x3c361(%rip), %rsi # 0xbfbad cmoveq %rax, %rsi leaq 0x10(%rsp), %rdi movq %r15, %rdx callq 0x64496 leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x24b10 leaq 0x10(%rsp), %rdi callq 0x25298 leaq 0x30(%rsp), %rdi callq 0x25298 leaq 0x87793(%rip), %rax # 0x10b018 addq $0x10, %rax movq %rax, (%r14) movl %ebx, 0x10(%r14) addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x25298 jmp 0x838ac movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x25298 movq %rbx, %rdi callq 0x25010
_ZN5minja20LoopControlExceptionC2ENS_15LoopControlTypeE: push r15 push r14 push rbx sub rsp, 50h mov ebx, esi mov r14, rdi lea rsi, aOutsideOfALoop; " outside of a loop" lea r15, [rsp+68h+var_38] lea rdx, [rsp+68h+var_59] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) cmp ebx, 1 lea rax, aContinue; "continue" lea rsi, aBreak; "break" cmovz rsi, rax lea rdi, [rsp+68h+var_58] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, [rsp+68h+var_58] mov rdi, r14 call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rdi, [rsp+68h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+68h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException add rax, 10h mov [r14], rax mov [r14+10h], ebx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_838AC mov rbx, rax loc_838AC: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long * minja::LoopControlException::LoopControlException(long long a1, int a2) { const char *v3; // rsi long long *result; // rax _BYTE v5[32]; // [rsp+10h] [rbp-58h] BYREF _QWORD v6[7]; // [rsp+30h] [rbp-38h] BYREF std::string::basic_string<std::allocator<char>>(v6, (long long)" outside of a loop"); v3 = "break"; if ( a2 == 1 ) v3 = "continue"; std::operator+<char>((long long)v5, (long long)v3, (long long)v6); std::runtime_error::runtime_error(a1); std::string::~string(v5); std::string::~string(v6); result = &`vtable for'minja::LoopControlException + 2; *(_QWORD *)a1 = &`vtable for'minja::LoopControlException + 2; *(_DWORD *)(a1 + 16) = a2; return result; }
LoopControlException: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV EBX,ESI MOV R14,RDI LEA RSI,[0x1c0ee8] LEA R15,[RSP + 0x30] LEA RDX,[RSP + 0xf] MOV RDI,R15 CALL 0x00130aea CMP EBX,0x1 LEA RAX,[0x1bfbb3] LEA RSI,[0x1bfbad] CMOVZ RSI,RAX LAB_00183850: LEA RDI,[RSP + 0x10] MOV RDX,R15 CALL 0x00164496 LAB_0018385d: LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x00124b10 LAB_0018386a: LEA RDI,[RSP + 0x10] CALL 0x00125298 LEA RDI,[RSP + 0x30] CALL 0x00125298 LEA RAX,[0x20b018] ADD RAX,0x10 MOV qword ptr [R14],RAX MOV dword ptr [R14 + 0x10],EBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* minja::LoopControlException::LoopControlException(minja::LoopControlType) */ void __thiscall minja::LoopControlException::LoopControlException(LoopControlException *this,int param_2) { char *pcVar1; allocator local_59; string local_58 [32]; string local_38 [32]; std::__cxx11::string::string<std::allocator<char>>(local_38," outside of a loop",&local_59); pcVar1 = "break"; if (param_2 == 1) { pcVar1 = "continue"; } /* try { // try from 00183850 to 0018385c has its CatchHandler @ 001838a9 */ std::operator+((char *)local_58,(string *)pcVar1); /* try { // try from 0018385d to 00183869 has its CatchHandler @ 0018389a */ std::runtime_error::runtime_error((runtime_error *)this,local_58); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_38); *(int ***)this = &PTR__runtime_error_0020b028; *(int *)(this + 0x10) = param_2; return; }
61,407
CLI::Formatter::make_option[abi:cxx11](CLI::Option const*, bool) const
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/FormatterFwd.hpp
virtual std::string make_option(const Option *opt, bool is_positional) const { std::stringstream out; detail::format_help( out, make_option_name(opt, is_positional) + make_option_opts(opt), make_option_desc(opt), column_width_); return out.str(); }
O3
cpp
CLI::Formatter::make_option[abi:cxx11](CLI::Option const*, bool) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x210, %rsp # imm = 0x210 movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x88(%rsp), %rdi callq 0x72d0 movq (%r14), %rax leaq 0x48(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx callq *0x60(%rax) movq (%r14), %rax leaq 0x28(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx callq *0x68(%rax) leaq 0x58(%rsp), %r12 movq -0x10(%r12), %rcx movq -0x8(%r12), %r8 movq 0x30(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r12, %rcx je 0x10b84 movq 0x58(%rsp), %rdi movq 0x28(%rsp), %rsi cmpq %rdi, %rax jbe 0x10ba7 leaq 0x38(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0x10ba2 movq 0x38(%rsp), %rdi cmpq %rdi, %rax jbe 0x10bb3 leaq 0x48(%rsp), %rdi callq 0x7140 jmp 0x10bc1 leaq 0x28(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x74a0 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x10be5 movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x10beb movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) movq (%r14), %rax leaq 0x68(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx callq *0x70(%rax) leaq 0x98(%rsp), %rdi movq 0x8(%r14), %rcx leaq 0x8(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0x2ce31 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10c4f movq 0x78(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10c6a movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10c85 movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x10c9c movq 0x58(%rsp), %rsi incq %rsi callq 0x7430 leaq 0xa0(%rsp), %rsi movq %rbx, %rdi callq 0x7680 movq 0x39295(%rip), %rsi # 0x49f48 leaq 0x88(%rsp), %rdi callq 0x7330 leaq 0x108(%rsp), %rdi callq 0x7150 movq %rbx, %rax addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x10d65 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10d08 movq 0x78(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x10d08 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10d28 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x10d28 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10d48 movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x10d48 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10d68 movq 0x58(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x10d68 movq %rax, %rbx movq 0x391d9(%rip), %rsi # 0x49f48 leaq 0x88(%rsp), %rdi callq 0x7330 leaq 0x108(%rsp), %rdi callq 0x7150 movq %rbx, %rdi callq 0x7780 nop
_ZNK3CLI9Formatter11make_optionB5cxx11EPKNS_6OptionEb: push rbp push r15 push r14 push r12 push rbx sub rsp, 210h mov ebp, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+238h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov rax, [r14] lea rdi, [rsp+238h+var_1F0] mov rsi, r14 mov rdx, r15 mov ecx, ebp call qword ptr [rax+60h] mov rax, [r14] lea rdi, [rsp+238h+var_210] mov rsi, r14 mov rdx, r15 call qword ptr [rax+68h] lea r12, [rsp+238h+var_1E0] mov rcx, [r12-10h] mov r8, [r12-8] mov rdx, [rsp+238h+var_208] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r12 jz short loc_10B84 mov rdi, [rsp+238h+var_1E0] loc_10B84: mov rsi, [rsp+238h+var_210] cmp rax, rdi jbe short loc_10BA7 lea r9, [rsp+238h+var_200] mov edi, 0Fh cmp rsi, r9 jz short loc_10BA2 mov rdi, [rsp+238h+var_200] loc_10BA2: cmp rax, rdi jbe short loc_10BB3 loc_10BA7: lea rdi, [rsp+238h+var_1F0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_10BC1 loc_10BB3: lea rdi, [rsp+238h+var_210] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_10BC1: lea rdx, [rsp+238h+var_220] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_10BE5 mov [rsp+238h+var_230], rsi mov rdx, [rcx] mov [rsp+238h+var_220], rdx jmp short loc_10BEB loc_10BE5: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_10BEB: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+238h+var_228], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rax, [r14] lea rdi, [rsp+238h+var_1D0] mov rsi, r14 mov rdx, r15 call qword ptr [rax+70h] lea rdi, [rsp+238h+var_1A0]; this mov rcx, [r14+8] lea rsi, [rsp+238h+var_230] lea rdx, [rsp+238h+var_1D0] call _ZN3CLI6detail11format_helpERSoNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_m; CLI::detail::format_help(std::ostream &,std::string,std::string const&,ulong) lea rax, [rsp+238h+var_1C0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10C4F mov rsi, [rsp+238h+var_1C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10C4F: lea rax, [rsp+238h+var_220] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10C6A mov rsi, [rsp+238h+var_220] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10C6A: lea rax, [rsp+238h+var_200] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10C85 mov rsi, [rsp+238h+var_200] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10C85: mov rdi, [rsp+238h+var_1F0]; void * cmp rdi, r12 jz short loc_10C9C mov rsi, [rsp+238h+var_1E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10C9C: lea rsi, [rsp+238h+var_198] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+238h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+238h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 210h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp loc_10D65 mov rbx, rax lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10D08 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_10D08 mov rbx, rax loc_10D08: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10D28 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_10D28 mov rbx, rax loc_10D28: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10D48 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_10D48 mov rbx, rax loc_10D48: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10D68 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_10D68 loc_10D65: mov rbx, rax loc_10D68: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_80] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_100]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long CLI::Formatter::make_option[abi:cxx11](long long a1, long long a2, long long a3, unsigned int a4) { char *v7; // rax unsigned long long v8; // rdi unsigned long long v9; // rdi __int128 **v10; // rax __int128 *v11; // rcx __int128 *v13; // [rsp+8h] [rbp-230h] __int128 v14; // [rsp+18h] [rbp-220h] BYREF _QWORD *v15; // [rsp+28h] [rbp-210h] BYREF long long v16; // [rsp+30h] [rbp-208h] _QWORD v17[2]; // [rsp+38h] [rbp-200h] BYREF void *v18[2]; // [rsp+48h] [rbp-1F0h] BYREF _QWORD v19[2]; // [rsp+58h] [rbp-1E0h] BYREF long long *v20; // [rsp+68h] [rbp-1D0h] BYREF long long v21; // [rsp+78h] [rbp-1C0h] BYREF _BYTE v22[16]; // [rsp+88h] [rbp-1B0h] BYREF _BYTE v23[8]; // [rsp+98h] [rbp-1A0h] BYREF _BYTE v24[104]; // [rsp+A0h] [rbp-198h] BYREF _BYTE v25[304]; // [rsp+108h] [rbp-130h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v22); (*(void ( **)(void **, long long, long long, _QWORD))(*(_QWORD *)a2 + 96LL))(v18, a2, a3, a4); (*(void ( **)(_QWORD **, long long, long long))(*(_QWORD *)a2 + 104LL))(&v15, a2, a3); v7 = (char *)v18[1] + v16; v8 = 15LL; if ( v18[0] != v19 ) v8 = v19[0]; if ( (unsigned long long)v7 <= v8 ) goto LABEL_7; v9 = 15LL; if ( v15 != v17 ) v9 = v17[0]; if ( (unsigned long long)v7 <= v9 ) v10 = (__int128 **)std::string::replace(&v15, 0LL, 0LL); else LABEL_7: v10 = (__int128 **)std::string::_M_append(v18, v15, v16); v13 = &v14; v11 = (__int128 *)(v10 + 2); if ( *v10 == (__int128 *)(v10 + 2) ) { v14 = *v11; } else { v13 = *v10; *(_QWORD *)&v14 = *(_QWORD *)v11; } *v10 = v11; v10[1] = 0LL; *(_BYTE *)v11 = 0; (*(void ( **)(long long **, long long, long long))(*(_QWORD *)a2 + 112LL))(&v20, a2, a3); CLI::detail::format_help((std::ostream *)v23); if ( v20 != &v21 ) operator delete(v20, v21 + 1); if ( v13 != &v14 ) operator delete(v13, v14 + 1); if ( v15 != v17 ) operator delete(v15, v17[0] + 1LL); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 1LL); std::stringbuf::str(a1, v24); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v22, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v25); return a1; }
make_option[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x210 MOV EBP,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x88] CALL 0x001072d0 MOV RAX,qword ptr [R14] LAB_00110b3c: LEA RDI,[RSP + 0x48] MOV RSI,R14 MOV RDX,R15 MOV ECX,EBP CALL qword ptr [RAX + 0x60] MOV RAX,qword ptr [R14] LAB_00110b4f: LEA RDI,[RSP + 0x28] MOV RSI,R14 MOV RDX,R15 CALL qword ptr [RAX + 0x68] LEA R12,[RSP + 0x58] MOV RCX,qword ptr [R12 + -0x10] MOV R8,qword ptr [R12 + -0x8] MOV RDX,qword ptr [RSP + 0x30] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R12 JZ 0x00110b84 MOV RDI,qword ptr [RSP + 0x58] LAB_00110b84: MOV RSI,qword ptr [RSP + 0x28] CMP RAX,RDI JBE 0x00110ba7 LEA R9,[RSP + 0x38] MOV EDI,0xf CMP RSI,R9 JZ 0x00110ba2 MOV RDI,qword ptr [RSP + 0x38] LAB_00110ba2: CMP RAX,RDI JBE 0x00110bb3 LAB_00110ba7: LEA RDI,[RSP + 0x48] CALL 0x00107140 JMP 0x00110bc1 LAB_00110bb3: LEA RDI,[RSP + 0x28] XOR ESI,ESI XOR EDX,EDX CALL 0x001074a0 LAB_00110bc1: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x00110be5 MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00110beb LAB_00110be5: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_00110beb: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 MOV RAX,qword ptr [R14] LAB_00110c0b: LEA RDI,[RSP + 0x68] MOV RSI,R14 MOV RDX,R15 CALL qword ptr [RAX + 0x70] LEA RDI,[RSP + 0x98] MOV RCX,qword ptr [R14 + 0x8] LAB_00110c25: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x68] CALL 0x0012ce31 LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00110c4f MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00107430 LAB_00110c4f: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00110c6a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_00110c6a: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00110c85 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00107430 LAB_00110c85: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x00110c9c MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00107430 LAB_00110c9c: LEA RSI,[RSP + 0xa0] LAB_00110ca4: MOV RDI,RBX CALL 0x00107680 LAB_00110cac: MOV RSI,qword ptr [0x00149f48] LEA RDI,[RSP + 0x88] CALL 0x00107330 LEA RDI,[RSP + 0x108] CALL 0x00107150 MOV RAX,RBX ADD RSP,0x210 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* CLI::Formatter::make_option[abi:cxx11](CLI::Option const*, bool) const */ Option * CLI::Formatter::make_option_abi_cxx11_(Option *param_1,bool param_2) { long *plVar1; int8 *puVar2; int7 in_register_00000031; long *plVar3; ulong uVar4; long *local_230; int8 local_228; long local_220; int4 uStack_218; int4 uStack_214; ulong *local_210; long local_208; ulong local_200 [2]; ulong *local_1f0; long local_1e8; ulong local_1e0 [2]; long *local_1d0 [2]; long local_1c0 [2]; stringstream local_1b0 [16]; int1 local_1a0 [112]; ios_base local_130 [264]; plVar3 = (long *)CONCAT71(in_register_00000031,param_2); std::__cxx11::stringstream::stringstream(local_1b0); /* try { // try from 00110b3c to 00110b4b has its CatchHandler @ 00110d65 */ (**(code **)(*plVar3 + 0x60))(&local_1f0,plVar3); /* try { // try from 00110b4f to 00110b5c has its CatchHandler @ 00110d45 */ (**(code **)(*plVar3 + 0x68))(&local_210,plVar3); uVar4 = 0xf; if (local_1f0 != local_1e0) { uVar4 = local_1e0[0]; } if (uVar4 < (ulong)(local_208 + local_1e8)) { uVar4 = 0xf; if (local_210 != local_200) { uVar4 = local_200[0]; } if ((ulong)(local_208 + local_1e8) <= uVar4) { puVar2 = (int8 *) std::__cxx11::string::replace((ulong)&local_210,0,(char *)0x0,(ulong)local_1f0); goto LAB_00110bc1; } } /* try { // try from 00110ba7 to 00110bc0 has its CatchHandler @ 00110d25 */ puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_1f0,(ulong)local_210); LAB_00110bc1: local_230 = &local_220; plVar1 = puVar2 + 2; if ((long *)*puVar2 == plVar1) { local_220 = *plVar1; uStack_218 = *(int4 *)(puVar2 + 3); uStack_214 = *(int4 *)((long)puVar2 + 0x1c); } else { local_220 = *plVar1; local_230 = (long *)*puVar2; } local_228 = puVar2[1]; *puVar2 = plVar1; puVar2[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 00110c0b to 00110c18 has its CatchHandler @ 00110d05 */ (**(code **)(*plVar3 + 0x70))(local_1d0,plVar3); /* try { // try from 00110c25 to 00110c33 has its CatchHandler @ 00110ce5 */ detail::format_help(local_1a0,&local_230,local_1d0,plVar3[1]); if (local_1d0[0] != local_1c0) { operator_delete(local_1d0[0],local_1c0[0] + 1); } if (local_230 != &local_220) { operator_delete(local_230,local_220 + 1); } if (local_210 != local_200) { operator_delete(local_210,local_200[0] + 1); } if (local_1f0 != local_1e0) { operator_delete(local_1f0,local_1e0[0] + 1); } /* try { // try from 00110ca4 to 00110cab has its CatchHandler @ 00110ce0 */ std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b0); std::ios_base::~ios_base(local_130); return param_1; }
61,408
inherit_charset_data
eloqsql/mysys/charset.c
static void inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs) { if (!cs->to_upper) cs->to_upper= refcs->to_upper; if (!cs->to_lower) cs->to_lower= refcs->to_lower; if (!cs->m_ctype) cs->m_ctype= refcs->m_ctype; if (!cs->tab_to_uni) cs->tab_to_uni= refcs->tab_to_uni; }
O3
c
inherit_charset_data: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x50(%rdi) jne 0x98904 movq 0x50(%rsi), %rax movq %rax, 0x50(%rdi) cmpq $0x0, 0x48(%rdi) jne 0x98913 movq 0x48(%rsi), %rax movq %rax, 0x48(%rdi) cmpq $0x0, 0x40(%rdi) jne 0x98922 movq 0x40(%rsi), %rax movq %rax, 0x40(%rdi) cmpq $0x0, 0x68(%rdi) jne 0x98931 movq 0x68(%rsi), %rax movq %rax, 0x68(%rdi) popq %rbp retq nop
inherit_charset_data: push rbp mov rbp, rsp cmp qword ptr [rdi+50h], 0 jnz short loc_98904 mov rax, [rsi+50h] mov [rdi+50h], rax loc_98904: cmp qword ptr [rdi+48h], 0 jnz short loc_98913 mov rax, [rsi+48h] mov [rdi+48h], rax loc_98913: cmp qword ptr [rdi+40h], 0 jnz short loc_98922 mov rax, [rsi+40h] mov [rdi+40h], rax loc_98922: cmp qword ptr [rdi+68h], 0 jnz short loc_98931 mov rax, [rsi+68h] mov [rdi+68h], rax loc_98931: pop rbp retn
long long inherit_charset_data(_QWORD *a1, _QWORD *a2) { long long result; // rax if ( !a1[10] ) { result = a2[10]; a1[10] = result; } if ( !a1[9] ) { result = a2[9]; a1[9] = result; } if ( !a1[8] ) { result = a2[8]; a1[8] = result; } if ( !a1[13] ) { result = a2[13]; a1[13] = result; } return result; }
inherit_charset_data: PUSH RBP MOV RBP,RSP CMP qword ptr [RDI + 0x50],0x0 JNZ 0x00198904 MOV RAX,qword ptr [RSI + 0x50] MOV qword ptr [RDI + 0x50],RAX LAB_00198904: CMP qword ptr [RDI + 0x48],0x0 JNZ 0x00198913 MOV RAX,qword ptr [RSI + 0x48] MOV qword ptr [RDI + 0x48],RAX LAB_00198913: CMP qword ptr [RDI + 0x40],0x0 JNZ 0x00198922 MOV RAX,qword ptr [RSI + 0x40] MOV qword ptr [RDI + 0x40],RAX LAB_00198922: CMP qword ptr [RDI + 0x68],0x0 JNZ 0x00198931 MOV RAX,qword ptr [RSI + 0x68] MOV qword ptr [RDI + 0x68],RAX LAB_00198931: POP RBP RET
void inherit_charset_data(long param_1,long param_2) { if (*(long *)(param_1 + 0x50) == 0) { *(int8 *)(param_1 + 0x50) = *(int8 *)(param_2 + 0x50); } if (*(long *)(param_1 + 0x48) == 0) { *(int8 *)(param_1 + 0x48) = *(int8 *)(param_2 + 0x48); } if (*(long *)(param_1 + 0x40) == 0) { *(int8 *)(param_1 + 0x40) = *(int8 *)(param_2 + 0x40); } if (*(long *)(param_1 + 0x68) == 0) { *(int8 *)(param_1 + 0x68) = *(int8 *)(param_2 + 0x68); } return; }
61,409
mysql_stmt_use_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
MYSQL_RES *_mysql_stmt_use_result(MYSQL_STMT *stmt) { MYSQL *mysql= stmt->mysql; if (!stmt->field_count || (!stmt->cursor_exists && mysql->status != MYSQL_STATUS_STMT_RESULT) || (stmt->cursor_exists && mysql->status != MYSQL_STATUS_READY) || (stmt->state != MYSQL_STMT_WAITING_USE_OR_STORE)) { SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(NULL); } CLEAR_CLIENT_STMT_ERROR(stmt); stmt->state = MYSQL_STMT_USE_OR_STORE_CALLED; if (!stmt->cursor_exists) stmt->fetch_row_func= stmt_unbuffered_fetch; //mysql_stmt_fetch_unbuffered_row; else stmt->fetch_row_func= stmt_cursor_fetch; return(NULL); }
O0
c
mysql_stmt_use_result: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x2aec3 movq -0x10(%rbp), %rax cmpb $0x0, 0x338(%rax) jne 0x2ae9c movq -0x18(%rbp), %rax cmpl $0x8, 0x488(%rax) jne 0x2aec3 movq -0x10(%rbp), %rax movsbl 0x338(%rax), %eax cmpl $0x0, %eax je 0x2aeb9 movq -0x18(%rbp), %rax cmpl $0x0, 0x488(%rax) jne 0x2aec3 movq -0x10(%rbp), %rax cmpl $0x3, 0x50(%rax) je 0x2af32 jmp 0x2aec5 movq -0x18(%rbp), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x18(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x3925b(%rip), %rax # 0x64140 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rdi addq $0x97, %rdi leaq 0x39241(%rip), %rax # 0x64150 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x2afaa jmp 0x2af34 movq -0x10(%rbp), %rax movl $0x0, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x263b0(%rip), %rsi # 0x51304 callq 0x133c0 movq -0x10(%rbp), %rax movb $0x0, 0x10c(%rax) movq -0x10(%rbp), %rax movl $0x4, 0x50(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x338(%rax) jne 0x2af90 movq -0x10(%rbp), %rax leaq 0x39(%rip), %rcx # 0x2afc0 movq %rcx, 0x348(%rax) jmp 0x2afa2 movq -0x10(%rbp), %rax leaq 0xe5(%rip), %rcx # 0x2b080 movq %rcx, 0x348(%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mysql_stmt_use_result: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_18], rax mov rax, [rbp+var_10] cmp dword ptr [rax+60h], 0 jz short loc_2AEC3 mov rax, [rbp+var_10] cmp byte ptr [rax+338h], 0 jnz short loc_2AE9C mov rax, [rbp+var_18] cmp dword ptr [rax+488h], 8 jnz short loc_2AEC3 loc_2AE9C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax+338h] cmp eax, 0 jz short loc_2AEB9 mov rax, [rbp+var_18] cmp dword ptr [rax+488h], 0 jnz short loc_2AEC3 loc_2AEB9: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 3 jz short loc_2AF32 loc_2AEC3: jmp short $+2 loc_2AEC5: mov rax, [rbp+var_18] mov dword ptr [rax+90h], 7DEh mov rdi, [rbp+var_18] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_18] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp short loc_2AFAA loc_2AF32: jmp short $+2 loc_2AF34: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 0 mov rdi, [rbp+var_10] add rdi, 30Dh lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_10] mov byte ptr [rax+10Ch], 0 mov rax, [rbp+var_10] mov dword ptr [rax+50h], 4 mov rax, [rbp+var_10] cmp byte ptr [rax+338h], 0 jnz short loc_2AF90 mov rax, [rbp+var_10] lea rcx, stmt_unbuffered_fetch mov [rax+348h], rcx jmp short loc_2AFA2 loc_2AF90: mov rax, [rbp+var_10] lea rcx, stmt_cursor_fetch mov [rax+348h], rcx loc_2AFA2: mov [rbp+var_8], 0 loc_2AFAA: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long mysql_stmt_use_result(long long a1) { long long v2; // [rsp+8h] [rbp-18h] v2 = *(_QWORD *)(a1 + 56); if ( *(_DWORD *)(a1 + 96) && (*(_BYTE *)(a1 + 824) || *(_DWORD *)(v2 + 1160) == 8) && (!*(_BYTE *)(a1 + 824) || !*(_DWORD *)(v2 + 1160)) && *(_DWORD *)(a1 + 80) == 3 ) { *(_DWORD *)(a1 + 264) = 0; strcpy(a1 + 781, "00000"); *(_BYTE *)(a1 + 268) = 0; *(_DWORD *)(a1 + 80) = 4; if ( *(_BYTE *)(a1 + 824) ) *(_QWORD *)(a1 + 840) = stmt_cursor_fetch; else *(_QWORD *)(a1 + 840) = stmt_unbuffered_fetch; } else { *(_DWORD *)(v2 + 144) = 2014; strncpy(v2 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v2 + 668) = 0; strncpy(v2 + 151, client_errors[14], 511LL); *(_BYTE *)(v2 + 662) = 0; } return 0LL; }
_mysql_stmt_use_result: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x60],0x0 JZ 0x0012aec3 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x338],0x0 JNZ 0x0012ae9c MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x488],0x8 JNZ 0x0012aec3 LAB_0012ae9c: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x338] CMP EAX,0x0 JZ 0x0012aeb9 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x488],0x0 JNZ 0x0012aec3 LAB_0012aeb9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x3 JZ 0x0012af32 LAB_0012aec3: JMP 0x0012aec5 LAB_0012aec5: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x90],0x7de MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x297 LEA RAX,[0x164140] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x97 LEA RAX,[0x164150] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012afaa LAB_0012af32: JMP 0x0012af34 LAB_0012af34: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RSI,[0x151304] CALL 0x001133c0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x10c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x4 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x338],0x0 JNZ 0x0012af90 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x12afc0] MOV qword ptr [RAX + 0x348],RCX JMP 0x0012afa2 LAB_0012af90: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x12b080] MOV qword ptr [RAX + 0x348],RCX LAB_0012afa2: MOV qword ptr [RBP + -0x8],0x0 LAB_0012afaa: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int8 _mysql_stmt_use_result(long param_1) { long lVar1; lVar1 = *(long *)(param_1 + 0x38); if ((((*(int *)(param_1 + 0x60) == 0) || ((*(char *)(param_1 + 0x338) == '\0' && (*(int *)(lVar1 + 0x488) != 8)))) || ((*(char *)(param_1 + 0x338) != '\0' && (*(int *)(lVar1 + 0x488) != 0)))) || (*(int *)(param_1 + 0x50) != 3)) { *(int4 *)(lVar1 + 0x90) = 0x7de; strncpy((char *)(lVar1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(lVar1 + 0x29c) = 0; strncpy((char *)(lVar1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_001641c0,0x1ff); *(int1 *)(lVar1 + 0x296) = 0; } else { *(int4 *)(param_1 + 0x108) = 0; strcpy((char *)(param_1 + 0x30d),"00000"); *(int1 *)(param_1 + 0x10c) = 0; *(int4 *)(param_1 + 0x50) = 4; if (*(char *)(param_1 + 0x338) == '\0') { *(code **)(param_1 + 0x348) = stmt_unbuffered_fetch; } else { *(code **)(param_1 + 0x348) = stmt_cursor_fetch; } } return 0; }
61,410
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); std::unordered_map<llama_seq_id, size_t> seqs; llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] < 0) { continue; } if (seqs.find(cs_curr[j]) == seqs.end()) { if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } const size_t sz = seqs.size(); seqs[cs_curr[j]] = sz; } } if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } } printf("=== Sequence legend: "); for (const auto & it : seqs) { printf("%zu=%d, ", it.second, it.first); } printf("'+'=other sequence ids"); c_curr = view.cells; cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { const auto & it = seqs.find(cs_curr[j]); putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+'); } else { putchar('.'); } } putchar(' '); } printf("\n=== Done dumping\n"); }
O1
cpp
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %esi, 0xc(%rsp) movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x88db9(%rip), %rdi # 0xb1635 xorl %r12d, %r12d xorl %eax, %eax callq 0x1a080 leaq 0x40(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) cmpl $0x0, (%r14) jle 0x28997 movq 0x20(%r14), %r13 leaq 0x10(%rsp), %r15 movl 0x4(%r14), %r8d testl %r8d, %r8d jle 0x28974 xorl %ebp, %ebp movslq (%r13,%rbp,4), %rcx testq %rcx, %rcx js 0x28964 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %r9 movq %rcx, %rax xorl %edx, %edx divq %r9 movq %rdx, %rsi movq (%rdi,%rdx,8), %rdx movl $0x0, %eax testq %rdx, %rdx je 0x28934 movq (%rdx), %r10 movq %rdx, %rax cmpl 0x8(%r10), %ecx je 0x28934 movq %r10, %r11 movq (%r10), %r10 testq %r10, %r10 je 0x28932 movslq 0x8(%r10), %rdi movq %rdi, %rax xorl %edx, %edx divq %r9 movl $0x0, %eax cmpq %rsi, %rdx jne 0x28934 movq %r11, %rax cmpl %edi, %ecx jne 0x28908 jmp 0x28934 xorl %eax, %eax testq %rax, %rax je 0x2893f cmpq $0x0, (%rax) jne 0x28964 movq 0x28(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x28974 leaq (,%rbp,4), %rsi addq %r13, %rsi movq %r15, %rdi callq 0x84c8a movq %rbx, (%rax) incq %rbp movslq 0x4(%r14), %r8 cmpq %r8, %rbp jl 0x288cb movq 0x28(%rsp), %rax addq $-0x3e, %rax cmpq $-0x3f, %rax jb 0x28997 incl %r12d movslq %r8d, %rax leaq (%r13,%rax,4), %r13 cmpl (%r14), %r12d jl 0x288bc leaq 0x88d22(%rip), %rdi # 0xb16c0 xorl %eax, %eax callq 0x1a080 movq 0x20(%rsp), %r12 testq %r12, %r12 je 0x289d3 leaq 0x88d20(%rip), %r15 # 0xb16d6 movq 0x10(%r12), %rsi movl 0x8(%r12), %edx movq %r15, %rdi xorl %eax, %eax callq 0x1a080 movq (%r12), %r12 testq %r12, %r12 jne 0x289b6 leaq 0x88d05(%rip), %rdi # 0xb16df xorl %eax, %eax callq 0x1a080 cmpl $0x0, (%r14) movl 0xc(%rsp), %ebx jle 0x28ae1 movq 0x20(%r14), %r12 leaq 0x8cc66(%rip), %r13 # 0xb5660 xorl %ebp, %ebp movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0x28a15 leaq 0x88c22(%rip), %rdi # 0xb162e movl %ebp, %esi xorl %eax, %eax callq 0x1a080 cmpl $0x0, 0x4(%r14) jle 0x28ac4 xorl %r15d, %r15d movslq (%r12,%r15,4), %rcx testq %rcx, %rcx js 0x28a85 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %r8 movq %rcx, %rax xorl %edx, %edx divq %r8 movq %rdx, %rsi movq (%rdi,%rdx,8), %rdx movl $0x0, %eax testq %rdx, %rdx je 0x28a8e movq (%rdx), %r9 movq %rdx, %rax cmpl 0x8(%r9), %ecx je 0x28a8e movq %r9, %r10 movq (%r9), %r9 testq %r9, %r9 je 0x28a8c movslq 0x8(%r9), %rdi movq %rdi, %rax xorl %edx, %edx divq %r8 movl $0x0, %eax cmpq %rsi, %rdx jne 0x28a8e movq %r10, %rax cmpl %edi, %ecx jne 0x28a5b jmp 0x28a8e movl $0x2e, %edi jmp 0x28aaf xorl %eax, %eax testq %rax, %rax je 0x28a98 movq (%rax), %rax jmp 0x28a9a xorl %eax, %eax testq %rax, %rax je 0x28aaa movq 0x10(%rax), %rax movsbl (%rax,%r13), %edi jmp 0x28aaf movl $0x2b, %edi callq 0x1aa60 incq %r15 movslq 0x4(%r14), %rax cmpq %rax, %r15 jl 0x28a23 movl $0x20, %edi callq 0x1aa60 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 cmpl (%r14), %ebp jl 0x289fc leaq 0x8cb25(%rip), %rdi # 0xb560d callq 0x1ab80 leaq 0x10(%rsp), %rdi callq 0x82064 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x82064 movq %rbx, %rdi callq 0x1ad30
_Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_6C], esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+78h+var_78], eax lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"... xor r12d, r12d xor eax, eax call _printf lea rax, [rsp+78h+var_38] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 cmp dword ptr [r14], 0 jle loc_28997 mov r13, [r14+20h] lea r15, [rsp+78h+var_68] loc_288BC: mov r8d, [r14+4] test r8d, r8d jle loc_28974 xor ebp, ebp loc_288CB: movsxd rcx, dword ptr [r13+rbp*4+0] test rcx, rcx js loc_28964 mov rdi, [rsp+78h+var_68] mov r9, [rsp+78h+var_60] mov rax, rcx xor edx, edx div r9 mov rsi, rdx mov rdx, [rdi+rdx*8] mov eax, 0 test rdx, rdx jz short loc_28934 mov r10, [rdx] mov rax, rdx cmp ecx, [r10+8] jz short loc_28934 loc_28908: mov r11, r10 mov r10, [r10] test r10, r10 jz short loc_28932 movsxd rdi, dword ptr [r10+8] mov rax, rdi xor edx, edx div r9 mov eax, 0 cmp rdx, rsi jnz short loc_28934 mov rax, r11 cmp ecx, edi jnz short loc_28908 jmp short loc_28934 loc_28932: xor eax, eax loc_28934: test rax, rax jz short loc_2893F cmp qword ptr [rax], 0 jnz short loc_28964 loc_2893F: mov rbx, [rsp+78h+var_50] lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_28974 lea rsi, ds:0[rbp*4] add rsi, r13 mov rdi, r15 call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&) mov [rax], rbx loc_28964: inc rbp movsxd r8, dword ptr [r14+4] cmp rbp, r8 jl loc_288CB loc_28974: mov rax, [rsp+78h+var_50] add rax, 0FFFFFFFFFFFFFFC2h cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_28997 inc r12d movsxd rax, r8d lea r13, [r13+rax*4+0] cmp r12d, [r14] jl loc_288BC loc_28997: lea rdi, aSequenceLegend; "=== Sequence legend: " xor eax, eax call _printf mov r12, [rsp+78h+var_58] test r12, r12 jz short loc_289D3 lea r15, aZuD; "%zu=%d, " loc_289B6: mov rsi, [r12+10h] mov edx, [r12+8] mov rdi, r15 xor eax, eax call _printf mov r12, [r12] test r12, r12 jnz short loc_289B6 loc_289D3: lea rdi, aOtherSequenceI; "'+'=other sequence ids" xor eax, eax call _printf cmp dword ptr [r14], 0 mov ebx, [rsp+78h+var_6C] jle loc_28AE1 mov r12, [r14+20h] lea r13, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_289FC: mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_28A15 lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_28A15: cmp dword ptr [r14+4], 0 jle loc_28AC4 xor r15d, r15d loc_28A23: movsxd rcx, dword ptr [r12+r15*4] test rcx, rcx js short loc_28A85 mov rdi, [rsp+78h+var_68] mov r8, [rsp+78h+var_60] mov rax, rcx xor edx, edx div r8 mov rsi, rdx mov rdx, [rdi+rdx*8] mov eax, 0 test rdx, rdx jz short loc_28A8E mov r9, [rdx] mov rax, rdx cmp ecx, [r9+8] jz short loc_28A8E loc_28A5B: mov r10, r9 mov r9, [r9] test r9, r9 jz short loc_28A8C movsxd rdi, dword ptr [r9+8] mov rax, rdi xor edx, edx div r8 mov eax, 0 cmp rdx, rsi jnz short loc_28A8E mov rax, r10 cmp ecx, edi jnz short loc_28A5B jmp short loc_28A8E loc_28A85: mov edi, 2Eh ; '.' jmp short loc_28AAF loc_28A8C: xor eax, eax loc_28A8E: test rax, rax jz short loc_28A98 mov rax, [rax] jmp short loc_28A9A loc_28A98: xor eax, eax loc_28A9A: test rax, rax jz short loc_28AAA mov rax, [rax+10h] movsx edi, byte ptr [rax+r13] jmp short loc_28AAF loc_28AAA: mov edi, 2Bh ; '+' loc_28AAF: call _putchar inc r15 movsxd rax, dword ptr [r14+4] cmp r15, rax jl loc_28A23 loc_28AC4: mov edi, 20h ; ' ' call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r12, [r12+rax*4] cmp ebp, [r14] jl loc_289FC loc_28AE1: lea rdi, aDoneDumping; "\n=== Done dumping" call _puts lea rdi, [rsp+78h+var_68] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long common_kv_cache_dump_view_seqs(long long a1, int a2) { int v3; // r12d long long v4; // r13 long long v5; // r8 long long v6; // rbp unsigned long long v7; // rcx long long **v8; // rdx _QWORD *v9; // rax long long *v10; // r10 _QWORD *v11; // r11 long long v12; // rbx long long *i; // r12 long long v14; // r12 int v15; // ebp long long v16; // r15 unsigned long long v17; // rcx long long **v18; // rdx long long *v19; // rax long long *v20; // r9 long long *v21; // r10 long long v22; // rdi long long v23; // rax char *v25; // [rsp+10h] [rbp-68h] BYREF unsigned long long v26; // [rsp+18h] [rbp-60h] __int128 v27; // [rsp+20h] [rbp-58h] int v28; // [rsp+30h] [rbp-48h] __int128 v29; // [rsp+38h] [rbp-40h] BYREF v3 = 0; printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d\n", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); v25 = (char *)&v29 + 8; v26 = 1LL; v27 = 0LL; v28 = 1065353216; v29 = 0LL; if ( *(int *)a1 > 0 ) { v4 = *(_QWORD *)(a1 + 32); do { LODWORD(v5) = *(_DWORD *)(a1 + 4); if ( (int)v5 > 0 ) { v6 = 0LL; do { v7 = *(int *)(v4 + 4 * v6); if ( (v7 & 0x8000000000000000LL) == 0LL ) { v8 = *(long long ***)&v25[8 * (v7 % v26)]; v9 = 0LL; if ( v8 ) { v10 = *v8; v9 = *(_QWORD **)&v25[8 * (v7 % v26)]; if ( (_DWORD)v7 != *((_DWORD *)*v8 + 2) ) { while ( 1 ) { v11 = v10; v10 = (long long *)*v10; if ( !v10 ) break; v9 = 0LL; if ( *((int *)v10 + 2) % v26 == v7 % v26 ) { v9 = v11; if ( (_DWORD)v7 != *((_DWORD *)v10 + 2) ) continue; } goto LABEL_13; } v9 = 0LL; } } LABEL_13: if ( !v9 || !*v9 ) { v12 = *((_QWORD *)&v27 + 1); if ( (unsigned long long)(*((_QWORD *)&v27 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL ) break; *(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( &v25, v4 + 4 * v6) = v12; } } ++v6; v5 = *(int *)(a1 + 4); } while ( v6 < v5 ); } if ( (unsigned long long)(*((_QWORD *)&v27 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL ) break; ++v3; v4 += 4LL * (int)v5; } while ( v3 < *(_DWORD *)a1 ); } printf("=== Sequence legend: "); for ( i = (long long *)v27; i; i = (long long *)*i ) printf("%zu=%d, ", i[2], *((_DWORD *)i + 2)); printf("'+'=other sequence ids"); if ( *(int *)a1 > 0 ) { v14 = *(_QWORD *)(a1 + 32); v15 = 0; do { if ( !(v15 % a2) ) printf("\n%5d: ", v15); if ( *(int *)(a1 + 4) > 0 ) { v16 = 0LL; do { v17 = *(int *)(v14 + 4 * v16); if ( (v17 & 0x8000000000000000LL) != 0LL ) { v22 = 46LL; } else { v18 = *(long long ***)&v25[8 * (v17 % v26)]; v19 = 0LL; if ( v18 ) { v20 = *v18; v19 = *(long long **)&v25[8 * (v17 % v26)]; if ( (_DWORD)v17 != *((_DWORD *)*v18 + 2) ) { while ( 1 ) { v21 = v20; v20 = (long long *)*v20; if ( !v20 ) break; v19 = 0LL; if ( *((int *)v20 + 2) % v26 == v17 % v26 ) { v19 = v21; if ( (_DWORD)v17 != *((_DWORD *)v20 + 2) ) continue; } goto LABEL_37; } v19 = 0LL; } } LABEL_37: if ( v19 ) v23 = *v19; else v23 = 0LL; if ( v23 ) v22 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v23 + 16)]; else v22 = 43LL; } putchar(v22); ++v16; } while ( v16 < *(int *)(a1 + 4) ); } putchar(32LL); ++v15; v14 += 4LL * *(int *)(a1 + 4); } while ( v15 < *(_DWORD *)a1 ); } puts("\n=== Done dumping"); return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(&v25); }
common_kv_cache_dump_view_seqs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV dword ptr [RSP + 0xc],ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1b1635] XOR R12D,R12D XOR EAX,EAX CALL 0x0011a080 LEA RAX,[RSP + 0x40] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 CMP dword ptr [R14],0x0 JLE 0x00128997 MOV R13,qword ptr [R14 + 0x20] LEA R15,[RSP + 0x10] LAB_001288bc: MOV R8D,dword ptr [R14 + 0x4] TEST R8D,R8D JLE 0x00128974 XOR EBP,EBP LAB_001288cb: MOVSXD RCX,dword ptr [R13 + RBP*0x4] TEST RCX,RCX JS 0x00128964 MOV RDI,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x18] MOV RAX,RCX XOR EDX,EDX DIV R9 MOV RSI,RDX MOV RDX,qword ptr [RDI + RDX*0x8] MOV EAX,0x0 TEST RDX,RDX JZ 0x00128934 MOV R10,qword ptr [RDX] MOV RAX,RDX CMP ECX,dword ptr [R10 + 0x8] JZ 0x00128934 LAB_00128908: MOV R11,R10 MOV R10,qword ptr [R10] TEST R10,R10 JZ 0x00128932 MOVSXD RDI,dword ptr [R10 + 0x8] MOV RAX,RDI XOR EDX,EDX DIV R9 MOV EAX,0x0 CMP RDX,RSI JNZ 0x00128934 MOV RAX,R11 CMP ECX,EDI JNZ 0x00128908 JMP 0x00128934 LAB_00128932: XOR EAX,EAX LAB_00128934: TEST RAX,RAX JZ 0x0012893f CMP qword ptr [RAX],0x0 JNZ 0x00128964 LAB_0012893f: MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x00128974 LEA RSI,[RBP*0x4] ADD RSI,R13 LAB_00128959: MOV RDI,R15 CALL 0x00184c8a LAB_00128961: MOV qword ptr [RAX],RBX LAB_00128964: INC RBP MOVSXD R8,dword ptr [R14 + 0x4] CMP RBP,R8 JL 0x001288cb LAB_00128974: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,-0x3e CMP RAX,-0x3f JC 0x00128997 INC R12D MOVSXD RAX,R8D LEA R13,[R13 + RAX*0x4] CMP R12D,dword ptr [R14] JL 0x001288bc LAB_00128997: LEA RDI,[0x1b16c0] XOR EAX,EAX CALL 0x0011a080 MOV R12,qword ptr [RSP + 0x20] TEST R12,R12 JZ 0x001289d3 LEA R15,[0x1b16d6] LAB_001289b6: MOV RSI,qword ptr [R12 + 0x10] MOV EDX,dword ptr [R12 + 0x8] MOV RDI,R15 XOR EAX,EAX CALL 0x0011a080 MOV R12,qword ptr [R12] TEST R12,R12 JNZ 0x001289b6 LAB_001289d3: LEA RDI,[0x1b16df] XOR EAX,EAX CALL 0x0011a080 CMP dword ptr [R14],0x0 MOV EBX,dword ptr [RSP + 0xc] JLE 0x00128ae1 MOV R12,qword ptr [R14 + 0x20] LEA R13,[0x1b5660] XOR EBP,EBP LAB_001289fc: MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x00128a15 LEA RDI,[0x1b162e] MOV ESI,EBP XOR EAX,EAX CALL 0x0011a080 LAB_00128a15: CMP dword ptr [R14 + 0x4],0x0 JLE 0x00128ac4 XOR R15D,R15D LAB_00128a23: MOVSXD RCX,dword ptr [R12 + R15*0x4] TEST RCX,RCX JS 0x00128a85 MOV RDI,qword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x18] MOV RAX,RCX XOR EDX,EDX DIV R8 MOV RSI,RDX MOV RDX,qword ptr [RDI + RDX*0x8] MOV EAX,0x0 TEST RDX,RDX JZ 0x00128a8e MOV R9,qword ptr [RDX] MOV RAX,RDX CMP ECX,dword ptr [R9 + 0x8] JZ 0x00128a8e LAB_00128a5b: MOV R10,R9 MOV R9,qword ptr [R9] TEST R9,R9 JZ 0x00128a8c MOVSXD RDI,dword ptr [R9 + 0x8] MOV RAX,RDI XOR EDX,EDX DIV R8 MOV EAX,0x0 CMP RDX,RSI JNZ 0x00128a8e MOV RAX,R10 CMP ECX,EDI JNZ 0x00128a5b JMP 0x00128a8e LAB_00128a85: MOV EDI,0x2e JMP 0x00128aaf LAB_00128a8c: XOR EAX,EAX LAB_00128a8e: TEST RAX,RAX JZ 0x00128a98 MOV RAX,qword ptr [RAX] JMP 0x00128a9a LAB_00128a98: XOR EAX,EAX LAB_00128a9a: TEST RAX,RAX JZ 0x00128aaa MOV RAX,qword ptr [RAX + 0x10] MOVSX EDI,byte ptr [RAX + R13*0x1] JMP 0x00128aaf LAB_00128aaa: MOV EDI,0x2b LAB_00128aaf: CALL 0x0011aa60 INC R15 MOVSXD RAX,dword ptr [R14 + 0x4] CMP R15,RAX JL 0x00128a23 LAB_00128ac4: MOV EDI,0x20 CALL 0x0011aa60 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x001289fc LAB_00128ae1: LEA RDI,[0x1b560d] CALL 0x0011ab80 LEA RDI,[RSP + 0x10] CALL 0x00182064 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2) { int iVar1; int8 *puVar2; long *plVar3; long *plVar4; long lVar5; ulong uVar6; uint uVar7; long lVar8; long *plVar9; int iVar10; long lVar11; int8 *local_68; ulong local_60; int8 *local_58; long lStack_50; int4 local_48; int8 local_40; int8 uStack_38; iVar10 = 0; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), *(int4 *)(param_1 + 0x14)); local_68 = &uStack_38; local_60 = 1; local_58 = (int8 *)0x0; lStack_50 = 0; local_48 = 0x3f800000; local_40 = 0; uStack_38 = 0; if (0 < *(int *)param_1) { lVar11 = *(long *)(param_1 + 0x20); do { uVar7 = *(uint *)(param_1 + 4); uVar6 = (ulong)uVar7; if (0 < (int)uVar7) { lVar8 = 0; do { lVar5 = lStack_50; uVar7 = (uint)uVar6; iVar1 = *(int *)(lVar11 + lVar8 * 4); if (-1 < (long)iVar1) { uVar6 = (ulong)(long)iVar1 % local_60; plVar3 = (long *)local_68[uVar6]; plVar4 = (long *)0x0; if ((plVar3 != (long *)0x0) && (plVar4 = plVar3, plVar9 = (long *)*plVar3, iVar1 != *(int *)((long *)*plVar3 + 1))) { while (plVar3 = (long *)*plVar9, plVar3 != (long *)0x0) { plVar4 = (long *)0x0; if (((ulong)(long)(int)plVar3[1] % local_60 != uVar6) || (plVar4 = plVar9, plVar9 = plVar3, iVar1 == (int)plVar3[1])) goto LAB_00128934; } plVar4 = (long *)0x0; } LAB_00128934: if ((plVar4 == (long *)0x0) || (*plVar4 == 0)) { if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break; /* try { // try from 00128959 to 00128960 has its CatchHandler @ 00128b06 */ plVar3 = (long *)std::__detail:: _Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> ::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)&local_68,(int *)(lVar8 * 4 + lVar11)); *plVar3 = lVar5; } } lVar8 = lVar8 + 1; uVar7 = *(uint *)(param_1 + 4); uVar6 = (ulong)(int)uVar7; } while (lVar8 < (long)uVar6); } if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break; iVar10 = iVar10 + 1; lVar11 = lVar11 + (long)(int)uVar7 * 4; } while (iVar10 < *(int *)param_1); } printf("=== Sequence legend: "); for (puVar2 = local_58; puVar2 != (int8 *)0x0; puVar2 = (int8 *)*puVar2) { printf("%zu=%d, ",puVar2[2],(ulong)*(uint *)(puVar2 + 1)); } printf("\'+\'=other sequence ids"); if (0 < *(int *)param_1) { lVar11 = *(long *)(param_1 + 0x20); uVar7 = 0; do { if ((int)uVar7 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar7); } if (0 < *(int *)(param_1 + 4)) { lVar8 = 0; do { iVar10 = *(int *)(lVar11 + lVar8 * 4); if ((long)iVar10 < 0) { iVar10 = 0x2e; } else { uVar6 = (ulong)(long)iVar10 % local_60; plVar3 = (long *)local_68[uVar6]; plVar4 = (long *)0x0; if ((plVar3 != (long *)0x0) && (plVar4 = plVar3, plVar9 = (long *)*plVar3, iVar10 != *(int *)((long *)*plVar3 + 1))) { while (plVar3 = (long *)*plVar9, plVar3 != (long *)0x0) { plVar4 = (long *)0x0; if (((ulong)(long)(int)plVar3[1] % local_60 != uVar6) || (plVar4 = plVar9, plVar9 = plVar3, iVar10 == (int)plVar3[1])) goto LAB_00128a8e; } plVar4 = (long *)0x0; } LAB_00128a8e: if (plVar4 == (long *)0x0) { lVar5 = 0; } else { lVar5 = *plVar4; } if (lVar5 == 0) { iVar10 = 0x2b; } else { iVar10 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" [*(long *)(lVar5 + 0x10)]; } } putchar(iVar10); lVar8 = lVar8 + 1; } while (lVar8 < *(int *)(param_1 + 4)); } putchar(0x20); uVar7 = uVar7 + 1; lVar11 = lVar11 + (long)*(int *)(param_1 + 4) * 4; } while ((int)uVar7 < *(int *)param_1); } puts("\n=== Done dumping"); std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68); return; }
61,411
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); std::unordered_map<llama_seq_id, size_t> seqs; llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] < 0) { continue; } if (seqs.find(cs_curr[j]) == seqs.end()) { if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } const size_t sz = seqs.size(); seqs[cs_curr[j]] = sz; } } if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } } printf("=== Sequence legend: "); for (const auto & it : seqs) { printf("%zu=%d, ", it.second, it.first); } printf("'+'=other sequence ids"); c_curr = view.cells; cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { const auto & it = seqs.find(cs_curr[j]); putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+'); } else { putchar('.'); } } putchar(' '); } printf("\n=== Done dumping\n"); }
O3
cpp
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %esi, 0x14(%rsp) movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x85f22(%rip), %rdi # 0xae605 movq $0x0, 0x18(%rsp) xorl %eax, %eax callq 0x1a080 leaq 0x50(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) cmpl $0x0, (%r14) jle 0x287a6 movq 0x20(%r14), %rbp movl 0x4(%r14), %eax leaq 0x20(%rsp), %r15 xorl %ebx, %ebx testl %eax, %eax jle 0x28782 movq %rbp, %r12 xorl %r13d, %r13d cmpl $0x0, (%r12) js 0x2876d movq %r15, %rdi movq %r12, %rsi callq 0x839e8 testq %rax, %rax jne 0x2876d movq 0x38(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x28782 movq %r15, %rdi movq %r12, %rsi callq 0x83a44 movq %rbx, (%rax) incq %r13 movslq 0x4(%r14), %rax addq $0x4, %r12 cmpq %rax, %r13 jl 0x28739 movq 0x38(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x287a6 movq 0x18(%rsp), %rcx incl %ecx movslq 0x4(%r14), %rax leaq (%rbp,%rax,4), %rbp movq %rcx, 0x18(%rsp) cmpl (%r14), %ecx jl 0x2872f leaq 0x85ee3(%rip), %rdi # 0xae690 xorl %eax, %eax callq 0x1a080 movq 0x30(%rsp), %rbx testq %rbx, %rbx je 0x287de leaq 0x85ee1(%rip), %r15 # 0xae6a6 movq 0x10(%rbx), %rsi movl 0x8(%rbx), %edx movq %r15, %rdi xorl %eax, %eax callq 0x1a080 movq (%rbx), %rbx testq %rbx, %rbx jne 0x287c5 leaq 0x85eca(%rip), %rdi # 0xae6af xorl %eax, %eax callq 0x1a080 cmpl $0x0, (%r14) jle 0x2888e movq 0x20(%r14), %r15 leaq 0x20(%rsp), %r12 xorl %ebp, %ebp movl %ebp, %eax cltd idivl 0x14(%rsp) testl %edx, %edx jne 0x2881c leaq 0x85deb(%rip), %rdi # 0xae5fe movl %ebp, %esi xorl %eax, %eax callq 0x1a080 cmpl $0x0, 0x4(%r14) jle 0x28871 movq %r15, %r13 xorl %ebx, %ebx cmpl $0x0, (%r13) js 0x28850 movq %r12, %rdi movq %r13, %rsi callq 0x839e8 testq %rax, %rax je 0x28857 movq 0x10(%rax), %rax leaq 0x89de6(%rip), %rcx # 0xb2630 movsbl (%rax,%rcx), %edi jmp 0x2885c movl $0x2e, %edi jmp 0x2885c movl $0x2b, %edi callq 0x1aa60 incq %rbx movslq 0x4(%r14), %rax addq $0x4, %r13 cmpq %rax, %rbx jl 0x28828 movl $0x20, %edi callq 0x1aa60 incl %ebp movslq 0x4(%r14), %rax leaq (%r15,%rax,4), %r15 cmpl (%r14), %ebp jl 0x28801 leaq 0x89d48(%rip), %rdi # 0xb25dd callq 0x1ab80 leaq 0x20(%rsp), %rdi callq 0x80e3a addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x288b7 jmp 0x288b7 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x80e3a movq %rbx, %rdi callq 0x1ad30
_Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_74], esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+88h+var_88], eax lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"... mov [rsp+88h+var_70], 0 xor eax, eax call _printf lea rax, [rsp+88h+var_38] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 cmp dword ptr [r14], 0 jle loc_287A6 mov rbp, [r14+20h] mov eax, [r14+4] lea r15, [rsp+88h+var_68] xor ebx, ebx loc_2872F: test eax, eax jle short loc_28782 mov r12, rbp xor r13d, r13d loc_28739: cmp dword ptr [r12], 0 js short loc_2876D mov rdi, r15 mov rsi, r12 call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jnz short loc_2876D mov rbx, [rsp+88h+var_50] lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_28782 mov rdi, r15 mov rsi, r12 call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&) mov [rax], rbx loc_2876D: inc r13 movsxd rax, dword ptr [r14+4] add r12, 4 cmp r13, rax jl short loc_28739 mov rbx, [rsp+88h+var_50] loc_28782: lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_287A6 mov rcx, [rsp+88h+var_70] inc ecx movsxd rax, dword ptr [r14+4] lea rbp, [rbp+rax*4+0] mov [rsp+88h+var_70], rcx cmp ecx, [r14] jl short loc_2872F loc_287A6: lea rdi, aSequenceLegend; "=== Sequence legend: " xor eax, eax call _printf mov rbx, [rsp+88h+var_58] test rbx, rbx jz short loc_287DE lea r15, aZuD; "%zu=%d, " loc_287C5: mov rsi, [rbx+10h] mov edx, [rbx+8] mov rdi, r15 xor eax, eax call _printf mov rbx, [rbx] test rbx, rbx jnz short loc_287C5 loc_287DE: lea rdi, aOtherSequenceI; "'+'=other sequence ids" xor eax, eax call _printf cmp dword ptr [r14], 0 jle loc_2888E mov r15, [r14+20h] lea r12, [rsp+88h+var_68] xor ebp, ebp loc_28801: mov eax, ebp cdq idiv [rsp+88h+var_74] test edx, edx jnz short loc_2881C lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_2881C: cmp dword ptr [r14+4], 0 jle short loc_28871 mov r13, r15 xor ebx, ebx loc_28828: cmp dword ptr [r13+0], 0 js short loc_28850 mov rdi, r12 mov rsi, r13 call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jz short loc_28857 mov rax, [rax+10h] lea rcx, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... movsx edi, byte ptr [rax+rcx] jmp short loc_2885C loc_28850: mov edi, 2Eh ; '.' jmp short loc_2885C loc_28857: mov edi, 2Bh ; '+' loc_2885C: call _putchar inc rbx movsxd rax, dword ptr [r14+4] add r13, 4 cmp rbx, rax jl short loc_28828 loc_28871: mov edi, 20h ; ' ' call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r15, [r15+rax*4] cmp ebp, [r14] jl loc_28801 loc_2888E: lea rdi, aDoneDumping; "\n=== Done dumping" call _puts lea rdi, [rsp+88h+var_68] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_288B7 jmp short $+2 loc_288B7: mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long common_kv_cache_dump_view_seqs(long long a1, int a2) { int *v3; // rbp long long v4; // rax long long v5; // rbx int *v6; // r12 long long v7; // r13 long long *i; // rbx int *v9; // r15 int v10; // ebp int *v11; // r13 long long v12; // rbx long long v13; // rax long long v14; // rdi int v16; // [rsp+18h] [rbp-70h] _QWORD v17[2]; // [rsp+20h] [rbp-68h] BYREF __int128 v18; // [rsp+30h] [rbp-58h] int v19; // [rsp+40h] [rbp-48h] __int128 v20; // [rsp+48h] [rbp-40h] BYREF v16 = 0; printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d\n", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); v17[0] = (char *)&v20 + 8; v17[1] = 1LL; v18 = 0LL; v19 = 1065353216; v20 = 0LL; if ( *(int *)a1 > 0 ) { v3 = *(int **)(a1 + 32); LODWORD(v4) = *(_DWORD *)(a1 + 4); v5 = 0LL; do { if ( (int)v4 > 0 ) { v6 = v3; v7 = 0LL; do { if ( *v6 >= 0 && !std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v17, v6) ) { v5 = *((_QWORD *)&v18 + 1); if ( (unsigned long long)(*((_QWORD *)&v18 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL ) goto LABEL_11; *(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( v17, v6) = v5; } ++v7; ++v6; } while ( v7 < *(int *)(a1 + 4) ); v5 = *((_QWORD *)&v18 + 1); } LABEL_11: if ( (unsigned long long)(v5 - 62) < 0xFFFFFFFFFFFFFFC1LL ) break; v4 = *(int *)(a1 + 4); v3 += v4; ++v16; } while ( v16 < *(_DWORD *)a1 ); } printf("=== Sequence legend: "); for ( i = (long long *)v18; i; i = (long long *)*i ) printf("%zu=%d, ", i[2], *((_DWORD *)i + 2)); printf("'+'=other sequence ids"); if ( *(int *)a1 > 0 ) { v9 = *(int **)(a1 + 32); v10 = 0; do { if ( !(v10 % a2) ) printf("\n%5d: ", v10); if ( *(int *)(a1 + 4) > 0 ) { v11 = v9; v12 = 0LL; do { if ( *v11 < 0 ) { v14 = 46LL; } else { v13 = std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v17, v11); if ( v13 ) v14 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v13 + 16)]; else v14 = 43LL; } putchar(v14); ++v12; ++v11; } while ( v12 < *(int *)(a1 + 4) ); } putchar(32LL); ++v10; v9 += *(int *)(a1 + 4); } while ( v10 < *(_DWORD *)a1 ); } puts("\n=== Done dumping"); return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v17); }
common_kv_cache_dump_view_seqs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RSP + 0x14],ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1ae605] MOV qword ptr [RSP + 0x18],0x0 XOR EAX,EAX CALL 0x0011a080 LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 CMP dword ptr [R14],0x0 JLE 0x001287a6 MOV RBP,qword ptr [R14 + 0x20] MOV EAX,dword ptr [R14 + 0x4] LEA R15,[RSP + 0x20] XOR EBX,EBX LAB_0012872f: TEST EAX,EAX JLE 0x00128782 MOV R12,RBP XOR R13D,R13D LAB_00128739: CMP dword ptr [R12],0x0 JS 0x0012876d LAB_00128740: MOV RDI,R15 MOV RSI,R12 CALL 0x001839e8 TEST RAX,RAX JNZ 0x0012876d MOV RBX,qword ptr [RSP + 0x38] LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x00128782 LAB_0012875f: MOV RDI,R15 MOV RSI,R12 CALL 0x00183a44 MOV qword ptr [RAX],RBX LAB_0012876d: INC R13 MOVSXD RAX,dword ptr [R14 + 0x4] ADD R12,0x4 CMP R13,RAX JL 0x00128739 MOV RBX,qword ptr [RSP + 0x38] LAB_00128782: LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x001287a6 MOV RCX,qword ptr [RSP + 0x18] INC ECX MOVSXD RAX,dword ptr [R14 + 0x4] LEA RBP,[RBP + RAX*0x4] MOV qword ptr [RSP + 0x18],RCX CMP ECX,dword ptr [R14] JL 0x0012872f LAB_001287a6: LEA RDI,[0x1ae690] XOR EAX,EAX CALL 0x0011a080 MOV RBX,qword ptr [RSP + 0x30] TEST RBX,RBX JZ 0x001287de LEA R15,[0x1ae6a6] LAB_001287c5: MOV RSI,qword ptr [RBX + 0x10] MOV EDX,dword ptr [RBX + 0x8] MOV RDI,R15 XOR EAX,EAX CALL 0x0011a080 MOV RBX,qword ptr [RBX] TEST RBX,RBX JNZ 0x001287c5 LAB_001287de: LEA RDI,[0x1ae6af] XOR EAX,EAX CALL 0x0011a080 CMP dword ptr [R14],0x0 JLE 0x0012888e MOV R15,qword ptr [R14 + 0x20] LEA R12,[RSP + 0x20] XOR EBP,EBP LAB_00128801: MOV EAX,EBP CDQ IDIV dword ptr [RSP + 0x14] TEST EDX,EDX JNZ 0x0012881c LEA RDI,[0x1ae5fe] MOV ESI,EBP XOR EAX,EAX CALL 0x0011a080 LAB_0012881c: CMP dword ptr [R14 + 0x4],0x0 JLE 0x00128871 MOV R13,R15 XOR EBX,EBX LAB_00128828: CMP dword ptr [R13],0x0 JS 0x00128850 LAB_0012882f: MOV RDI,R12 MOV RSI,R13 CALL 0x001839e8 LAB_0012883a: TEST RAX,RAX JZ 0x00128857 MOV RAX,qword ptr [RAX + 0x10] LEA RCX,[0x1b2630] MOVSX EDI,byte ptr [RAX + RCX*0x1] JMP 0x0012885c LAB_00128850: MOV EDI,0x2e JMP 0x0012885c LAB_00128857: MOV EDI,0x2b LAB_0012885c: CALL 0x0011aa60 INC RBX MOVSXD RAX,dword ptr [R14 + 0x4] ADD R13,0x4 CMP RBX,RAX JL 0x00128828 LAB_00128871: MOV EDI,0x20 CALL 0x0011aa60 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R15,[R15 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x00128801 LAB_0012888e: LEA RDI,[0x1b25dd] CALL 0x0011ab80 LEA RDI,[RSP + 0x20] CALL 0x00180e3a ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2) { int8 *puVar1; long lVar2; long *plVar3; ulong uVar4; int iVar5; long lVar6; uint uVar7; int *piVar8; int *piVar9; long lVar10; int8 *local_68; int8 local_60; int8 *local_58; long lStack_50; int4 local_48; int8 local_40; int8 uStack_38; iVar5 = 0; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), *(int4 *)(param_1 + 0x14)); local_68 = &uStack_38; local_60 = 1; local_58 = (int8 *)0x0; lStack_50 = 0; local_48 = 0x3f800000; local_40 = 0; uStack_38 = 0; if (0 < *(int *)param_1) { piVar8 = *(int **)(param_1 + 0x20); uVar4 = (ulong)*(uint *)(param_1 + 4); lVar6 = 0; do { if (0 < (int)uVar4) { lVar10 = 0; piVar9 = piVar8; do { /* try { // try from 00128740 to 0012874a has its CatchHandler @ 001288b5 */ if ((-1 < *piVar9) && (lVar2 = std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68,piVar9), lVar6 = lStack_50, lVar2 == 0)) { if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break; /* try { // try from 0012875f to 00128769 has its CatchHandler @ 001288b3 */ plVar3 = (long *)std::__detail:: _Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> ::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)&local_68,piVar9); *plVar3 = lVar6; } lVar10 = lVar10 + 1; piVar9 = piVar9 + 1; lVar6 = lStack_50; } while (lVar10 < *(int *)(param_1 + 4)); } if (lVar6 - 0x3eU < 0xffffffffffffffc1) break; iVar5 = iVar5 + 1; uVar4 = (ulong)*(int *)(param_1 + 4); piVar8 = piVar8 + uVar4; } while (iVar5 < *(int *)param_1); } printf("=== Sequence legend: "); for (puVar1 = local_58; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { printf("%zu=%d, ",puVar1[2],(ulong)*(uint *)(puVar1 + 1)); } printf("\'+\'=other sequence ids"); if (0 < *(int *)param_1) { piVar8 = *(int **)(param_1 + 0x20); uVar7 = 0; do { if ((int)uVar7 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar7); } if (0 < *(int *)(param_1 + 4)) { lVar6 = 0; piVar9 = piVar8; do { if (*piVar9 < 0) { iVar5 = 0x2e; } else { /* try { // try from 0012882f to 00128839 has its CatchHandler @ 001288b7 */ lVar10 = std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68,piVar9); if (lVar10 == 0) { iVar5 = 0x2b; } else { iVar5 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" [*(long *)(lVar10 + 0x10)]; } } putchar(iVar5); lVar6 = lVar6 + 1; piVar9 = piVar9 + 1; } while (lVar6 < *(int *)(param_1 + 4)); } putchar(0x20); uVar7 = uVar7 + 1; piVar8 = piVar8 + *(int *)(param_1 + 4); } while ((int)uVar7 < *(int *)param_1); } puts("\n=== Done dumping"); std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68); return; }
61,412
print_xml_row
eloqsql/client/mysqldump.c
static void print_xml_row(FILE *xml_file, const char *row_name, MYSQL_RES *tableRes, MYSQL_ROW *row, const char *str_create) { uint i; my_bool body_found __attribute__((unused)) = 0; char *create_stmt_ptr= NULL; ulong create_stmt_len= 0; MYSQL_FIELD *field; ulong *lengths= mysql_fetch_lengths(tableRes); fprintf(xml_file, "\t\t<%s", row_name); check_io(xml_file); mysql_field_seek(tableRes, 0); for (i= 0; (field= mysql_fetch_field(tableRes)); i++) { if ((*row)[i]) { /* For 'create' statements, dump using CDATA. */ if ((str_create) && (strcmp(str_create, field->name) == 0)) { create_stmt_ptr= (*row)[i]; create_stmt_len= lengths[i]; #ifdef DBUG_ASSERT_EXISTS body_found= 1; #endif } else { fputc(' ', xml_file); print_quoted_xml(xml_file, field->name, field->name_length, 1); fputs("=\"", xml_file); if (opt_copy_s3_tables && !strcmp(field->name, "Engine") && !strcmp((*row)[i], "S3")) print_quoted_xml(xml_file, "Aria", sizeof("Aria") - 1, 0); else print_quoted_xml(xml_file, (*row)[i], lengths[i], 0); fputc('"', xml_file); check_io(xml_file); } } } if (create_stmt_len) { DBUG_ASSERT(body_found); fputs(">\n", xml_file); print_xml_cdata(xml_file, create_stmt_ptr, create_stmt_len); fprintf(xml_file, "\t\t</%s>\n", row_name); } else fputs(" />\n", xml_file); check_io(xml_file); }
O0
c
print_xml_row: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movb $0x0, -0x2d(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x18(%rbp), %rdi callq 0x51980 movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq 0x97ea4(%rip), %rsi # 0xdcde0 movb $0x0, %al callq 0x381d0 movq -0x8(%rbp), %rdi callq 0x38d60 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x51b50 movl $0x0, -0x2c(%rbp) movq -0x18(%rbp), %rdi callq 0x51730 movq %rax, -0x48(%rbp) cmpq $0x0, %rax je 0x450b1 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x450a1 cmpq $0x0, -0x28(%rbp) je 0x44fcc movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rax movq (%rax), %rsi callq 0x38880 cmpl $0x0, %eax jne 0x44fcc movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x38(%rbp) movq -0x50(%rbp), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) jmp 0x4509f movq -0x8(%rbp), %rsi movl $0x20, %edi callq 0x388b0 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rax movq (%rax), %rsi movq -0x48(%rbp), %rax movl 0x48(%rax), %eax movl %eax, %edx movl $0x1, %ecx callq 0x440e0 movq -0x8(%rbp), %rsi leaq 0x97de3(%rip), %rdi # 0xdcde6 callq 0x38340 movsbl 0x3bc824(%rip), %eax # 0x401833 cmpl $0x0, %eax je 0x45064 movq -0x48(%rbp), %rax movq (%rax), %rdi leaq 0x97dc7(%rip), %rsi # 0xdcde9 callq 0x38880 cmpl $0x0, %eax jne 0x45064 movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rdi leaq 0x93cb7(%rip), %rsi # 0xd8cf8 callq 0x38880 cmpl $0x0, %eax jne 0x45064 movq -0x8(%rbp), %rdi leaq 0x97d9a(%rip), %rsi # 0xdcdf0 movl $0x4, %edx xorl %ecx, %ecx callq 0x440e0 jmp 0x45088 movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rsi movq -0x50(%rbp), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rdx xorl %ecx, %ecx callq 0x440e0 movq -0x8(%rbp), %rsi movl $0x22, %edi callq 0x388b0 movq -0x8(%rbp), %rdi callq 0x38d60 jmp 0x450a1 jmp 0x450a3 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x44f5e cmpq $0x0, -0x40(%rbp) je 0x450f5 jmp 0x450ba jmp 0x450bc movq -0x8(%rbp), %rsi leaq 0x9675f(%rip), %rdi # 0xdb826 callq 0x38340 movq -0x8(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x45620 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq 0x97d09(%rip), %rsi # 0xdcdf5 movb $0x0, %al callq 0x381d0 jmp 0x45105 movq -0x8(%rbp), %rsi leaq 0x98b87(%rip), %rdi # 0xddc87 callq 0x38340 movq -0x8(%rbp), %rdi callq 0x38d60 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
print_xml_row: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_2D], 0 mov [rbp+var_38], 0 mov [rbp+var_40], 0 mov rdi, [rbp+var_18] call mysql_fetch_lengths mov [rbp+var_50], rax mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, aS_1; "\t\t<%s" mov al, 0 call _fprintf mov rdi, [rbp+var_8] call check_io mov rdi, [rbp+var_18] xor esi, esi call mysql_field_seek mov [rbp+var_2C], 0 loc_44F5E: mov rdi, [rbp+var_18] call mysql_fetch_field mov [rbp+var_48], rax cmp rax, 0 jz loc_450B1 mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] cmp qword ptr [rax+rcx*8], 0 jz loc_450A1 cmp [rbp+var_28], 0 jz short loc_44FCC mov rdi, [rbp+var_28] mov rax, [rbp+var_48] mov rsi, [rax] call _strcmp cmp eax, 0 jnz short loc_44FCC mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] mov rax, [rax+rcx*8] mov [rbp+var_38], rax mov rax, [rbp+var_50] mov ecx, [rbp+var_2C] mov rax, [rax+rcx*8] mov [rbp+var_40], rax jmp loc_4509F loc_44FCC: mov rsi, [rbp+var_8] mov edi, 20h ; ' ' call _fputc mov rdi, [rbp+var_8] mov rax, [rbp+var_48] mov rsi, [rax] mov rax, [rbp+var_48] mov eax, [rax+48h] mov edx, eax mov ecx, 1 call print_quoted_xml mov rsi, [rbp+var_8] lea rdi, asc_DCDE6; "=\"" call _fputs movsx eax, cs:opt_copy_s3_tables cmp eax, 0 jz short loc_45064 mov rax, [rbp+var_48] mov rdi, [rax] lea rsi, aEngine_0; "Engine" call _strcmp cmp eax, 0 jnz short loc_45064 mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] mov rdi, [rax+rcx*8] lea rsi, aIfNoS3TablesWi+6Ah; "S3" call _strcmp cmp eax, 0 jnz short loc_45064 mov rdi, [rbp+var_8] lea rsi, aAria; "Aria" mov edx, 4 xor ecx, ecx call print_quoted_xml jmp short loc_45088 loc_45064: mov rdi, [rbp+var_8] mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rbp+var_2C] mov rsi, [rax+rcx*8] mov rax, [rbp+var_50] mov ecx, [rbp+var_2C] mov rdx, [rax+rcx*8] xor ecx, ecx call print_quoted_xml loc_45088: mov rsi, [rbp+var_8] mov edi, 22h ; '"' call _fputc mov rdi, [rbp+var_8] call check_io loc_4509F: jmp short $+2 loc_450A1: jmp short $+2 loc_450A3: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_44F5E loc_450B1: cmp [rbp+var_40], 0 jz short loc_450F5 jmp short $+2 loc_450BA: jmp short $+2 loc_450BC: mov rsi, [rbp+var_8] lea rdi, asc_DB823+3; ">\n" call _fputs mov rdi, [rbp+var_8] mov rsi, [rbp+var_38] mov rdx, [rbp+var_40] call print_xml_cdata mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, aS_2; "\t\t</%s>\n" mov al, 0 call _fprintf jmp short loc_45105 loc_450F5: mov rsi, [rbp+var_8] lea rdi, aOptionsComment+19h; " />\n" call _fputs loc_45105: mov rdi, [rbp+var_8] call check_io add rsp, 50h pop rbp retn
long long print_xml_row(long long a1, const char *a2, long long a3, _QWORD *a4, long long a5) { long long lengths; // [rsp+0h] [rbp-50h] _QWORD *field; // [rsp+8h] [rbp-48h] long long v8; // [rsp+10h] [rbp-40h] long long v9; // [rsp+18h] [rbp-38h] unsigned int i; // [rsp+24h] [rbp-2Ch] v9 = 0LL; v8 = 0LL; lengths = mysql_fetch_lengths(a3); fprintf(a1, "\t\t<%s", a2); check_io(a1); mysql_field_seek(a3, 0LL); for ( i = 0; ; ++i ) { field = (_QWORD *)mysql_fetch_field(a3); if ( !field ) break; if ( *(_QWORD *)(*a4 + 8LL * i) ) { if ( a5 && !(unsigned int)strcmp(a5, *field) ) { v9 = *(_QWORD *)(*a4 + 8LL * i); v8 = *(_QWORD *)(lengths + 8LL * i); } else { fputc(32LL, a1); print_quoted_xml(a1, (_BYTE *)*field, *((unsigned int *)field + 18), 1); fputs("=\"", a1); if ( opt_copy_s3_tables && !(unsigned int)strcmp(*field, "Engine") && !(unsigned int)strcmp(*(_QWORD *)(*a4 + 8LL * i), "S3") ) { print_quoted_xml(a1, "Aria", 4LL, 0); } else { print_quoted_xml(a1, *(_BYTE **)(*a4 + 8LL * i), *(_QWORD *)(lengths + 8LL * i), 0); } fputc(34LL, a1); check_io(a1); } } } if ( v8 ) { fputs(">\n", a1); print_xml_cdata(a1, v9, v8); fprintf(a1, "\t\t</%s>\n", a2); } else { fputs(" />\n", a1); } return check_io(a1); }
print_xml_row: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV byte ptr [RBP + -0x2d],0x0 MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x40],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00151980 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1dcde0] MOV AL,0x0 CALL 0x001381d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI CALL 0x00151b50 MOV dword ptr [RBP + -0x2c],0x0 LAB_00144f5e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00151730 MOV qword ptr [RBP + -0x48],RAX CMP RAX,0x0 JZ 0x001450b1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001450a1 CMP qword ptr [RBP + -0x28],0x0 JZ 0x00144fcc MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX] CALL 0x00138880 CMP EAX,0x0 JNZ 0x00144fcc MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x0014509f LAB_00144fcc: MOV RSI,qword ptr [RBP + -0x8] MOV EDI,0x20 CALL 0x001388b0 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x48] MOV EDX,EAX MOV ECX,0x1 CALL 0x001440e0 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1dcde6] CALL 0x00138340 MOVSX EAX,byte ptr [0x00501833] CMP EAX,0x0 JZ 0x00145064 MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX] LEA RSI,[0x1dcde9] CALL 0x00138880 CMP EAX,0x0 JNZ 0x00145064 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV RDI,qword ptr [RAX + RCX*0x8] LEA RSI,[0x1d8cf8] CALL 0x00138880 CMP EAX,0x0 JNZ 0x00145064 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1dcdf0] MOV EDX,0x4 XOR ECX,ECX CALL 0x001440e0 JMP 0x00145088 LAB_00145064: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RAX + RCX*0x8] XOR ECX,ECX CALL 0x001440e0 LAB_00145088: MOV RSI,qword ptr [RBP + -0x8] MOV EDI,0x22 CALL 0x001388b0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 LAB_0014509f: JMP 0x001450a1 LAB_001450a1: JMP 0x001450a3 LAB_001450a3: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00144f5e LAB_001450b1: CMP qword ptr [RBP + -0x40],0x0 JZ 0x001450f5 JMP 0x001450ba LAB_001450ba: JMP 0x001450bc LAB_001450bc: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db826] CALL 0x00138340 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x40] CALL 0x00145620 MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1dcdf5] MOV AL,0x0 CALL 0x001381d0 JMP 0x00145105 LAB_001450f5: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1ddc87] CALL 0x00138340 LAB_00145105: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 ADD RSP,0x50 POP RBP RET
void print_xml_row(FILE *param_1,int8 param_2,int8 param_3,long *param_4,char *param_5) { int iVar1; long lVar2; int8 *puVar3; long local_48; int8 local_40; uint local_34; local_40 = 0; local_48 = 0; lVar2 = mysql_fetch_lengths(param_3); fprintf(param_1,"\t\t<%s",param_2); check_io(param_1); mysql_field_seek(param_3,0); local_34 = 0; while (puVar3 = (int8 *)mysql_fetch_field(param_3), puVar3 != (int8 *)0x0) { if (*(long *)(*param_4 + (ulong)local_34 * 8) != 0) { if ((param_5 == (char *)0x0) || (iVar1 = strcmp(param_5,(char *)*puVar3), iVar1 != 0)) { fputc(0x20,param_1); print_quoted_xml(param_1,*puVar3,*(int4 *)(puVar3 + 9),1); fputs("=\"",param_1); if ((opt_copy_s3_tables == '\0') || ((iVar1 = strcmp((char *)*puVar3,"Engine"), iVar1 != 0 || (iVar1 = strcmp(*(char **)(*param_4 + (ulong)local_34 * 8),"S3"), iVar1 != 0)))) { print_quoted_xml(param_1,*(int8 *)(*param_4 + (ulong)local_34 * 8), *(int8 *)(lVar2 + (ulong)local_34 * 8),0); } else { print_quoted_xml(param_1,&DAT_001dcdf0,4,0); } fputc(0x22,param_1); check_io(param_1); } else { local_40 = *(int8 *)(*param_4 + (ulong)local_34 * 8); local_48 = *(long *)(lVar2 + (ulong)local_34 * 8); } } local_34 = local_34 + 1; } if (local_48 == 0) { fputs(" />\n",param_1); } else { fputs(">\n",param_1); print_xml_cdata(param_1,local_40,local_48); fprintf(param_1,"\t\t</%s>\n",param_2); } check_io(param_1); return; }
61,413
std::unordered_set<google::protobuf::internal::ExtensionInfo, google::protobuf::internal::(anonymous namespace)::ExtensionHasher, google::protobuf::internal::(anonymous namespace)::ExtensionEq, std::allocator<google::protobuf::internal::ExtensionInfo>>* google::protobuf::internal::OnShutdownDelete<std::unordered_set<google::protobuf::internal::ExtensionInfo, google::protobuf::internal::(anonymous namespace)::ExtensionHasher, google::protobuf::internal::(anonymous namespace)::ExtensionEq, std::allocator<google::protobuf::internal::ExtensionInfo>>>(std::unordered_set<google::protobuf::internal::ExtensionInfo, google::protobuf::internal::(anonymous namespace)::ExtensionHasher, google::protobuf::internal::(anonymous namespace)::ExtensionEq, std::allocator<google::protobuf::internal::ExtensionInfo>>*)::'lambda'(void const*)::__invoke(void const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.h
T* OnShutdownDelete(T* p) { OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p); return p; }
O3
c
std::unordered_set<google::protobuf::internal::ExtensionInfo, google::protobuf::internal::(anonymous namespace)::ExtensionHasher, google::protobuf::internal::(anonymous namespace)::ExtensionEq, std::allocator<google::protobuf::internal::ExtensionInfo>>* google::protobuf::internal::OnShutdownDelete<std::unordered_set<google::protobuf::internal::ExtensionInfo, google::protobuf::internal::(anonymous namespace)::ExtensionHasher, google::protobuf::internal::(anonymous namespace)::ExtensionEq, std::allocator<google::protobuf::internal::ExtensionInfo>>>(std::unordered_set<google::protobuf::internal::ExtensionInfo, google::protobuf::internal::(anonymous namespace)::ExtensionHasher, google::protobuf::internal::(anonymous namespace)::ExtensionEq, std::allocator<google::protobuf::internal::ExtensionInfo>>*)::'lambda'(void const*)::__invoke(void const*): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx testq %rdi, %rdi je 0x9ac4e leaq 0x10(%rbx), %r14 movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x9ac24 movq (%rdi), %r15 callq 0xf330 movq %r15, %rdi testq %r15, %r15 jne 0x9ac14 movq (%rbx), %rdi movq 0x8(%rbx), %rdx shlq $0x3, %rdx xorl %esi, %esi callq 0xf1d0 xorps %xmm0, %xmm0 movups %xmm0, (%r14) movq (%rbx), %rdi leaq 0x30(%rbx), %rax cmpq %rdi, %rax je 0x9ac4e callq 0xf330 movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0xf330 nop
_ZZN6google8protobuf8internal16OnShutdownDeleteISt13unordered_setINS1_13ExtensionInfoENS1_12_GLOBAL__N_115ExtensionHasherENS5_11ExtensionEqESaIS4_EEEEPT_SB_ENUlPKvE_8__invokeESD_: push r15 push r14 push rbx mov rbx, rdi test rdi, rdi jz short loc_9AC4E lea r14, [rbx+10h] mov rdi, [rbx+10h]; void * test rdi, rdi jz short loc_9AC24 loc_9AC14: mov r15, [rdi] call __ZdlPv; operator delete(void *) mov rdi, r15 test r15, r15 jnz short loc_9AC14 loc_9AC24: mov rdi, [rbx] mov rdx, [rbx+8] shl rdx, 3 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 mov rdi, [rbx]; void * lea rax, [rbx+30h] cmp rax, rdi jz short loc_9AC4E call __ZdlPv; operator delete(void *) loc_9AC4E: mov rdi, rbx; void * pop rbx pop r14 pop r15 jmp __ZdlPv; operator delete(void *)
void google::protobuf::internal::OnShutdownDelete<std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::`anonymous namespace'::ExtensionHasher,google::protobuf::internal::`anonymous namespace'::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>>>(std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::`anonymous namespace'::ExtensionHasher,google::protobuf::internal::`anonymous namespace'::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>> *)::{lambda(void const*)#1}::__invoke( _QWORD *a1) { _OWORD *v2; // r14 _QWORD *v3; // rdi _QWORD *v4; // r15 if ( a1 ) { v2 = a1 + 2; v3 = (_QWORD *)a1[2]; if ( v3 ) { do { v4 = (_QWORD *)*v3; operator delete(v3); v3 = v4; } while ( v4 ); } memset(*a1, 0LL, 8LL * a1[1]); *v2 = 0LL; if ( a1 + 6 != (_QWORD *)*a1 ) operator delete((void *)*a1); } operator delete(a1); }
__invoke: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI TEST RDI,RDI JZ 0x0019ac4e LEA R14,[RBX + 0x10] MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0019ac24 LAB_0019ac14: MOV R15,qword ptr [RDI] CALL 0x0010f330 MOV RDI,R15 TEST R15,R15 JNZ 0x0019ac14 LAB_0019ac24: MOV RDI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] SHL RDX,0x3 XOR ESI,ESI CALL 0x0010f1d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV RDI,qword ptr [RBX] LEA RAX,[RBX + 0x30] CMP RAX,RDI JZ 0x0019ac4e CALL 0x0010f330 LAB_0019ac4e: MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0010f330
/* __invoke(void const*) */ void google::protobuf::internal:: OnShutdownDelete<std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::(anonymous_namespace)::ExtensionHasher,google::protobuf::internal::(anonymous_namespace)::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>>>(std::unordered_set<google::protobuf::internal::ExtensionInfo,google::protobuf::internal::(anonymous_namespace)::ExtensionHasher,google::protobuf::internal::(anonymous_namespace)::ExtensionEq,std::allocator<google::protobuf::internal::ExtensionInfo>>*) ::{lambda(void_const*)#1}::__invoke(void *param_1) { int8 *puVar1; int8 *puVar2; if (param_1 != (void *)0x0) { puVar2 = *(int8 **)((long)param_1 + 0x10); while (puVar2 != (int8 *)0x0) { puVar1 = (int8 *)*puVar2; operator_delete(puVar2); puVar2 = puVar1; } /* WARNING: Load size is inaccurate */ memset(*param_1,0,*(long *)((long)param_1 + 8) << 3); *(int8 *)((long)param_1 + 0x10) = 0; *(int8 *)((long)param_1 + 0x18) = 0; /* WARNING: Load size is inaccurate */ if ((void *)((long)param_1 + 0x30) != *param_1) { operator_delete(*param_1); } } operator_delete(param_1); return; }
61,414
mysql_cset_escape_quotes
eloqsql/libmariadb/libmariadb/ma_charset.c
size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr, const char * escapestr, size_t escapestr_len ) { const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; my_bool escape_overflow = FALSE; for (;escapestr < end; escapestr++) { unsigned int len = 0; /* check unicode characters */ if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) { /* check possible overflow */ if ((newstr + len) > newstr_e) { escape_overflow = TRUE; break; } /* copy mb char without escaping it */ while (len--) { *newstr++ = *escapestr++; } escapestr--; continue; } if (*escapestr == '\'') { if (newstr + 2 > newstr_e) { escape_overflow = TRUE; break; } *newstr++ = '\''; *newstr++ = '\''; } else { if (newstr + 1 > newstr_e) { escape_overflow = TRUE; break; } *newstr++ = *escapestr; } } *newstr = '\0'; if (escape_overflow) { return((size_t)~0); } return((size_t)(newstr - newstr_s)); }
O0
c
mysql_cset_escape_quotes: 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 -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movb $0x0, -0x41(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x75e3c movl $0x0, -0x48(%rbp) movq -0x10(%rbp), %rax cmpl $0x1, 0x34(%rax) jbe 0x75db8 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x20(%rbp), %rdi movq -0x40(%rbp), %rsi callq *%rax movl %eax, -0x48(%rbp) cmpl $0x0, %eax je 0x75db8 movq -0x18(%rbp), %rax movl -0x48(%rbp), %ecx addq %rcx, %rax cmpq -0x38(%rbp), %rax jbe 0x75d74 movb $0x1, -0x41(%rbp) jmp 0x75e3c jmp 0x75d76 movl -0x48(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x48(%rbp) cmpl $0x0, %eax je 0x75daa movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movb %cl, (%rax) jmp 0x75d76 movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x75e2b movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0x75dfe movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x38(%rbp), %rax jbe 0x75dd8 movb $0x1, -0x41(%rbp) jmp 0x75e3c movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb $0x27, (%rax) movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb $0x27, (%rax) jmp 0x75e29 movq -0x18(%rbp), %rax addq $0x1, %rax cmpq -0x38(%rbp), %rax jbe 0x75e12 movb $0x1, -0x41(%rbp) jmp 0x75e3c movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movb %cl, (%rax) jmp 0x75e2b movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x75d22 movq -0x18(%rbp), %rax movb $0x0, (%rax) cmpb $0x0, -0x41(%rbp) je 0x75e53 movq $-0x1, -0x8(%rbp) jmp 0x75e62 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
mysql_cset_escape_quotes: 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 rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_28] shl rcx, 1 add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax mov [rbp+var_41], 0 loc_75D22: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_75E3C mov [rbp+var_48], 0 mov rax, [rbp+var_10] cmp dword ptr [rax+34h], 1 jbe short loc_75DB8 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rdi, [rbp+var_20] mov rsi, [rbp+var_40] call rax mov [rbp+var_48], eax cmp eax, 0 jz short loc_75DB8 mov rax, [rbp+var_18] mov ecx, [rbp+var_48] add rax, rcx cmp rax, [rbp+var_38] jbe short loc_75D74 mov [rbp+var_41], 1 jmp loc_75E3C loc_75D74: jmp short $+2 loc_75D76: mov eax, [rbp+var_48] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_48], ecx cmp eax, 0 jz short loc_75DAA mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 1 mov [rbp+var_18], rdx mov [rax], cl jmp short loc_75D76 loc_75DAA: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_75E2B loc_75DB8: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz short loc_75DFE mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_38] jbe short loc_75DD8 mov [rbp+var_41], 1 jmp short loc_75E3C loc_75DD8: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov byte ptr [rax], 27h ; ''' mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov byte ptr [rax], 27h ; ''' jmp short loc_75E29 loc_75DFE: mov rax, [rbp+var_18] add rax, 1 cmp rax, [rbp+var_38] jbe short loc_75E12 mov [rbp+var_41], 1 jmp short loc_75E3C loc_75E12: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 1 mov [rbp+var_18], rdx mov [rax], cl loc_75E29: jmp short $+2 loc_75E2B: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_75D22 loc_75E3C: mov rax, [rbp+var_18] mov byte ptr [rax], 0 cmp [rbp+var_41], 0 jz short loc_75E53 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_75E62 loc_75E53: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax loc_75E62: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long mysql_cset_escape_quotes(long long a1, char *a2, char *a3, long long a4) { char *v5; // rax char v6; // cl char *v7; // rax _BYTE *v8; // rax char *v9; // rax int v11; // [rsp+8h] [rbp-48h] char v12; // [rsp+Fh] [rbp-41h] unsigned long long v13; // [rsp+10h] [rbp-40h] unsigned long long v14; // [rsp+18h] [rbp-38h] char *v15; // [rsp+30h] [rbp-20h] char *v16; // [rsp+38h] [rbp-18h] v16 = a2; v15 = a3; v14 = (unsigned long long)&a2[2 * a4]; v13 = (unsigned long long)&a3[a4]; v12 = 0; while ( (unsigned long long)v15 < v13 ) { if ( *(_DWORD *)(a1 + 52) > 1u && (v11 = (*(long long ( **)(char *, unsigned long long))(a1 + 64))(v15, v13)) != 0 ) { if ( (unsigned long long)&v16[v11] > v14 ) { v12 = 1; break; } while ( v11-- ) { v5 = v15++; v6 = *v5; v7 = v16++; *v7 = v6; } --v15; } else if ( *v15 == 39 ) { if ( (unsigned long long)(v16 + 2) > v14 ) { v12 = 1; break; } *v16 = 39; v8 = v16 + 1; v16 += 2; *v8 = 39; } else { if ( (unsigned long long)(v16 + 1) > v14 ) { v12 = 1; break; } v9 = v16++; *v9 = *v15; } ++v15; } *v16 = 0; if ( v12 ) return -1LL; else return v16 - a2; }
mysql_cset_escape_quotes: 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 RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV byte ptr [RBP + -0x41],0x0 LAB_00175d22: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00175e3c MOV dword ptr [RBP + -0x48],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x34],0x1 JBE 0x00175db8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x40] CALL RAX MOV dword ptr [RBP + -0x48],EAX CMP EAX,0x0 JZ 0x00175db8 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x48] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x38] JBE 0x00175d74 MOV byte ptr [RBP + -0x41],0x1 JMP 0x00175e3c LAB_00175d74: JMP 0x00175d76 LAB_00175d76: MOV EAX,dword ptr [RBP + -0x48] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x48],ECX CMP EAX,0x0 JZ 0x00175daa MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RAX],CL JMP 0x00175d76 LAB_00175daa: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00175e2b LAB_00175db8: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x00175dfe MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x38] JBE 0x00175dd8 MOV byte ptr [RBP + -0x41],0x1 JMP 0x00175e3c LAB_00175dd8: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV byte ptr [RAX],0x27 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV byte ptr [RAX],0x27 JMP 0x00175e29 LAB_00175dfe: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x38] JBE 0x00175e12 MOV byte ptr [RBP + -0x41],0x1 JMP 0x00175e3c LAB_00175e12: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RAX],CL LAB_00175e29: JMP 0x00175e2b LAB_00175e2b: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00175d22 LAB_00175e3c: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 CMP byte ptr [RBP + -0x41],0x0 JZ 0x00175e53 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00175e62 LAB_00175e53: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_00175e62: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4) { bool bVar1; char *pcVar2; uint local_50; char *local_28; char *local_20; long local_10; pcVar2 = param_2 + param_4 * 2; bVar1 = false; local_28 = param_3; local_20 = param_2; do { if (param_3 + param_4 <= local_28) { LAB_00175e3c: *local_20 = '\0'; if (bVar1) { local_10 = -1; } else { local_10 = (long)local_20 - (long)param_2; } return local_10; } if ((*(uint *)(param_1 + 0x34) < 2) || (local_50 = (**(code **)(param_1 + 0x40))(local_28,param_3 + param_4), local_50 == 0)) { if (*local_28 == '\'') { if (pcVar2 < local_20 + 2) { bVar1 = true; goto LAB_00175e3c; } *local_20 = '\''; local_20[1] = '\''; local_20 = local_20 + 2; } else { if (pcVar2 < local_20 + 1) { bVar1 = true; goto LAB_00175e3c; } *local_20 = *local_28; local_20 = local_20 + 1; } } else { if (pcVar2 < local_20 + local_50) { bVar1 = true; goto LAB_00175e3c; } while (local_50 != 0) { *local_20 = *local_28; local_50 = local_50 - 1; local_28 = local_28 + 1; local_20 = local_20 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }
61,415
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const
llama.cpp/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<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x7f6af testq %rax, %rax je 0x7f70d movzbl (%rax), %eax cmpl $0x2, %eax je 0x7f68f cmpl $0x1, %eax jne 0x7f699 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x7f6a1 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x7f6a1 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 0x20660 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9a06c(%rip), %rsi # 0x119738 leaq 0x9a095(%rip), %rdx # 0x119768 leaq 0x8(%rsp), %rdi callq 0x27960 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x7f762 xorl %ebp, %ebp leaq 0xdf902(%rip), %rsi # 0x15f000 leaq -0xa0f5(%rip), %rdx # 0x75610 movq %rbx, %rdi callq 0x20a60 leaq 0x9900e(%rip), %rdi # 0x118722 leaq 0x99042(%rip), %rdx # 0x11875d leaq 0x9f286(%rip), %rcx # 0x11e9a8 movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x20e70 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x7f748 movq 0x18(%rsp), %rsi incq %rsi callq 0x20190 testb %bpl, %bpl jne 0x7f752 jmp 0x7f75a movq %rax, %r14 movq %rbx, %rdi callq 0x20f00 movq %r14, %rdi callq 0x20b00
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: push rbp; void * push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_7F6AF test rax, rax jz loc_7F70D movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_7F68F cmp eax, 1 jnz short loc_7F699 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_7F6A1 loc_7F68F: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_7F6A1 loc_7F699: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_7F6A1: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_7F6AF: 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_jsonISt3mapSt6vectorNSt7__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_7F70D: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_7F748 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7F748: test bpl, bpl jnz short loc_7F752 jmp short loc_7F75A mov r14, rax loc_7F752: mov rdi, rbx; void * call ___cxa_free_exception loc_7F75A: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__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 0x0017f6af TEST RAX,RAX JZ 0x0017f70d MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0017f68f CMP EAX,0x1 JNZ 0x0017f699 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0017f6a1 LAB_0017f68f: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0017f6a1 LAB_0017f699: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0017f6a1: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0017f6af: MOV EDI,0x20 CALL 0x00120660 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0017f6c5: LEA RSI,[0x219738] LEA RDX,[0x219768] LEA RDI,[RSP + 0x8] CALL 0x00127960 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0017f6e3: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0017f762 XOR EBP,EBP LEA RSI,[0x25f000] LEA RDX,[0x175610] MOV RDI,RBX CALL 0x00120a60 LAB_0017f70d: LEA RDI,[0x218722] LEA RDX,[0x21875d] LEA RCX,[0x21e9a8] MOV ESI,0x3422 XOR EAX,EAX CALL 0x00120e70
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__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 0017f6c5 to 0017f6dc has its CatchHandler @ 0017f74f */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0017f6e3 to 0017f70c has its CatchHandler @ 0017f72e */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__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 */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
61,416
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/catmarkPatchBuilder.cpp
void GregoryConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the popoluation of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + 2 * _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O0
cpp
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const: pushq %rbp movq %rsp, %rbp subq $0x4b0, %rsp # imm = 0x4B0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x470(%rbp) testb $0x1, 0x8(%rax) je 0x10e47c movq -0x470(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0xc(%rdi), %edx movl 0x10(%rdi), %ecx callq 0xcc630 jmp 0x10e48c movq -0x470(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xc4ba0 movq -0x470(%rbp), %rax movl 0x4(%rax), %edx movl %edx, %ecx leal 0x1(%rcx,%rcx), %ecx movl %ecx, -0x14(%rbp) movl -0x14(%rbp), %edx movl %edx, %ecx leal (%rcx,%rcx,2), %ecx movl %ecx, -0x1c(%rbp) movl (%rax), %eax addl %eax, %eax movl %eax, -0x20(%rbp) leaq -0x1c(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0xd2720 movl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %esi leaq -0x238(%rbp), %rdi callq 0xc7fd0 movl -0x18(%rbp), %esi leaq -0x450(%rbp), %rdi callq 0xcf750 jmp 0x10e4e3 movl $0x0, -0x460(%rbp) cmpl $0x4, -0x460(%rbp) jge 0x10e5e6 movq -0x470(%rbp), %rax addq $0x18, %rax movslq -0x460(%rbp), %rcx imulq $0xd8, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x3, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x10e580 movq -0x470(%rbp), %rdi movl -0x460(%rbp), %esi movq -0x10(%rbp), %rdx callq 0xd1d30 jmp 0x10e541 jmp 0x10e5d0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x458(%rbp) movl %eax, -0x45c(%rbp) jmp 0x10e790 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x458(%rbp) movl %eax, -0x45c(%rbp) leaq -0x450(%rbp), %rdi callq 0xccc30 jmp 0x10e790 movl -0x460(%rbp), %eax movl %eax, -0x484(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x480(%rbp) leaq -0x238(%rbp), %rdi callq 0xd6dc0 movq %rax, -0x478(%rbp) jmp 0x10e5ac movq -0x478(%rbp), %rcx movq -0x480(%rbp), %rdx movl -0x484(%rbp), %esi movq -0x470(%rbp), %rdi callq 0xc54a0 jmp 0x10e5ce jmp 0x10e5d0 jmp 0x10e5d2 movl -0x460(%rbp), %eax addl $0x1, %eax movl %eax, -0x460(%rbp) jmp 0x10e4ed movl $0x0, -0x464(%rbp) cmpl $0x4, -0x464(%rbp) jge 0x10e755 movq -0x470(%rbp), %rax addq $0x18, %rax movslq -0x464(%rbp), %rcx imulq $0xd8, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x7, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x10e65b movq -0x470(%rbp), %rax addq $0x18, %rax movslq -0x464(%rbp), %rcx imulq $0xd8, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x10e675 movq -0x470(%rbp), %rdi movl -0x464(%rbp), %esi movq -0x10(%rbp), %rdx callq 0xc8aa0 jmp 0x10e673 jmp 0x10e675 movq -0x470(%rbp), %rax addq $0x18, %rax movslq -0x464(%rbp), %rcx imulq $0xd8, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x7, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x10e6d3 movq -0x470(%rbp), %rax addq $0x18, %rax movslq -0x464(%rbp), %rcx imulq $0xd8, %rcx, %rcx addq %rcx, %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x10e73f movl -0x464(%rbp), %eax movl %eax, -0x49c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x498(%rbp) leaq -0x238(%rbp), %rdi callq 0xd6dc0 movq %rax, -0x490(%rbp) jmp 0x10e6ff leaq -0x450(%rbp), %rdi callq 0xd0e30 movq %rax, -0x4a8(%rbp) jmp 0x10e714 movq -0x4a8(%rbp), %r8 movq -0x490(%rbp), %rcx movq -0x498(%rbp), %rdx movl -0x49c(%rbp), %esi movq -0x470(%rbp), %rdi callq 0xc9670 jmp 0x10e73d jmp 0x10e73f jmp 0x10e741 movl -0x464(%rbp), %eax addl $0x1, %eax movl %eax, -0x464(%rbp) jmp 0x10e5f0 movq -0x470(%rbp), %rax testb $0x1, 0x9(%rax) je 0x10e76f movq -0x10(%rbp), %rdi callq 0x10b0c0 jmp 0x10e76d jmp 0x10e76f leaq -0x450(%rbp), %rdi callq 0xccc30 leaq -0x238(%rbp), %rdi callq 0xc5690 addq $0x4b0, %rsp # imm = 0x4B0 popq %rbp retq leaq -0x238(%rbp), %rdi callq 0xc5690 movq -0x458(%rbp), %rdi callq 0xd58b0 nopl (%rax,%rax)
_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE7ConvertERNS1_12SparseMatrixIfEE: push rbp mov rbp, rsp sub rsp, 4B0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_470], rax test byte ptr [rax+8], 1 jz short loc_10E47C mov rdi, [rbp+var_470] mov rsi, [rbp+var_10] mov edx, [rdi+0Ch] mov ecx, [rdi+10h] call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIfEEii; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,int,int) jmp short loc_10E48C loc_10E47C: mov rdi, [rbp+var_470] mov rsi, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE22resizeMatrixUnisolatedERNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_10E48C: mov rax, [rbp+var_470] mov edx, [rax+4] mov ecx, edx lea ecx, [rcx+rcx+1] mov [rbp+var_14], ecx mov edx, [rbp+var_14] mov ecx, edx lea ecx, [rcx+rcx*2] mov [rbp+var_1C], ecx mov eax, [rax] add eax, eax mov [rbp+var_20], eax lea rdi, [rbp+var_1C] lea rsi, [rbp+var_20] call __ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&) mov eax, [rax] mov [rbp+var_18], eax mov esi, [rbp+var_18] lea rdi, [rbp+var_238] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::StackBuffer(uint) mov esi, [rbp+var_18] lea rdi, [rbp+var_450] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(uint) jmp short $+2 loc_10E4E3: mov [rbp+var_460], 0 loc_10E4ED: cmp [rbp+var_460], 4 jge loc_10E5E6 mov rax, [rbp+var_470] add rax, 18h movsxd rcx, [rbp+var_460] imul rcx, 0D8h add rax, rcx mov ax, [rax] shr ax, 3 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_10E580 mov rdi, [rbp+var_470] mov esi, [rbp+var_460] mov rdx, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assignRegularEdgePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) jmp short $+2 loc_10E541: jmp loc_10E5D0 mov rcx, rax mov eax, edx mov [rbp+var_458], rcx mov [rbp+var_45C], eax jmp loc_10E790 mov rcx, rax mov eax, edx mov [rbp+var_458], rcx mov [rbp+var_45C], eax lea rdi, [rbp+var_450] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::~StackBuffer() jmp loc_10E790 loc_10E580: mov eax, [rbp+var_460] mov [rbp+var_484], eax mov rax, [rbp+var_10] mov [rbp+var_480], rax lea rdi, [rbp+var_238] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj128ELb1EEcvPfEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::operator float *(void) mov [rbp+var_478], rax jmp short $+2 loc_10E5AC: mov rcx, [rbp+var_478] mov rdx, [rbp+var_480] mov esi, [rbp+var_484] mov rdi, [rbp+var_470] call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIfEEPf; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *) jmp short $+2 loc_10E5CE: jmp short $+2 loc_10E5D0: jmp short $+2 loc_10E5D2: mov eax, [rbp+var_460] add eax, 1 mov [rbp+var_460], eax jmp loc_10E4ED loc_10E5E6: mov [rbp+var_464], 0 loc_10E5F0: cmp [rbp+var_464], 4 jge loc_10E755 mov rax, [rbp+var_470] add rax, 18h movsxd rcx, [rbp+var_464] imul rcx, 0D8h add rax, rcx mov ax, [rax] shr ax, 7 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_10E65B mov rax, [rbp+var_470] add rax, 18h movsxd rcx, [rbp+var_464] imul rcx, 0D8h add rax, rcx mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_10E675 loc_10E65B: mov rdi, [rbp+var_470] mov esi, [rbp+var_464] mov rdx, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assignRegularFacePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) jmp short $+2 loc_10E673: jmp short $+2 loc_10E675: mov rax, [rbp+var_470] add rax, 18h movsxd rcx, [rbp+var_464] imul rcx, 0D8h add rax, rcx mov ax, [rax] shr ax, 7 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_10E6D3 mov rax, [rbp+var_470] add rax, 18h movsxd rcx, [rbp+var_464] imul rcx, 0D8h add rax, rcx mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_10E73F loc_10E6D3: mov eax, [rbp+var_464] mov [rbp+var_49C], eax mov rax, [rbp+var_10] mov [rbp+var_498], rax lea rdi, [rbp+var_238] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj128ELb1EEcvPfEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::operator float *(void) mov [rbp+var_490], rax jmp short $+2 loc_10E6FF: lea rdi, [rbp+var_450] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEcvPiEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(void) mov [rbp+var_4A8], rax jmp short $+2 loc_10E714: mov r8, [rbp+var_4A8] mov rcx, [rbp+var_490] mov rdx, [rbp+var_498] mov esi, [rbp+var_49C] mov rdi, [rbp+var_470] call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE26computeIrregularFacePointsEiRNS1_12SparseMatrixIfEEPfPi; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *,int *) jmp short $+2 loc_10E73D: jmp short $+2 loc_10E73F: jmp short $+2 loc_10E741: mov eax, [rbp+var_464] add eax, 1 mov [rbp+var_464], eax jmp loc_10E5F0 loc_10E755: mov rax, [rbp+var_470] test byte ptr [rax+9], 1 jz short loc_10E76F mov rdi, [rbp+var_10] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIfEEvRNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) jmp short $+2 loc_10E76D: jmp short $+2 loc_10E76F: lea rdi, [rbp+var_450] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::~StackBuffer() lea rdi, [rbp+var_238] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::~StackBuffer() add rsp, 4B0h pop rbp retn loc_10E790: lea rdi, [rbp+var_238] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj128ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::~StackBuffer() mov rdi, [rbp+var_458] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(long long a1, long long a2) { long long v3; // [rsp+8h] [rbp-4A8h] long long v4; // [rsp+18h] [rbp-498h] long long v5; // [rsp+20h] [rbp-490h] long long v6; // [rsp+30h] [rbp-480h] long long v7; // [rsp+38h] [rbp-478h] int j; // [rsp+4Ch] [rbp-464h] int i; // [rsp+50h] [rbp-460h] _BYTE v10[536]; // [rsp+60h] [rbp-450h] BYREF _BYTE v11[536]; // [rsp+278h] [rbp-238h] BYREF int v12; // [rsp+490h] [rbp-20h] BYREF int v13; // [rsp+494h] [rbp-1Ch] BYREF unsigned int v14; // [rsp+498h] [rbp-18h] int v15; // [rsp+49Ch] [rbp-14h] long long v16; // [rsp+4A0h] [rbp-10h] long long v17; // [rsp+4A8h] [rbp-8h] v17 = a1; v16 = a2; if ( (*(_BYTE *)(a1 + 8) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixIsolatedIrregular( a1, v16, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixUnisolated(a1, v16); v15 = 2 * *(_DWORD *)(a1 + 4) + 1; v13 = 3 * v15; v12 = 2 * *(_DWORD *)a1; v14 = *(_DWORD *)std::max<int>(&v13, &v12); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::StackBuffer(v11, v14); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(v10, v14); for ( i = 0; i < 4; ++i ) { if ( ((*(_WORD *)(216LL * i + a1 + 24) >> 3) & 1) != 0 ) { OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularEdgePoints(a1, (unsigned int)i, v16); } else { v6 = v16; v7 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::operator float *(v11); OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularEdgePoints(a1, (unsigned int)i, v6, v7); } } for ( j = 0; j < 4; ++j ) { if ( ((*(_WORD *)(216LL * j + a1 + 24) >> 7) & 1) != 0 || (*(_WORD *)(216LL * j + a1 + 24) & 0x100) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularFacePoints(a1, (unsigned int)j, v16); if ( ((*(_WORD *)(216LL * j + a1 + 24) >> 7) & 1) == 0 || (*(_WORD *)(216LL * j + a1 + 24) & 0x100) == 0 ) { v4 = v16; v5 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::operator float *(v11); v3 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::operator int *(v10); OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularFacePoints(a1, (unsigned int)j, v4, v5, v3); } } if ( (*(_BYTE *)(a1 + 9) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(v16); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::~StackBuffer(v10); return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,128u,true>::~StackBuffer(v11); }
61,417
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/catmarkPatchBuilder.cpp
void GregoryConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the popoluation of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + 2 * _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O1
cpp
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x438, %rsp # imm = 0x438 movq %rsi, %rbx movq %rdi, %r14 cmpb $0x1, 0x8(%rdi) jne 0x4dff0 movl 0xc(%r14), %edx movl 0x10(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi callq 0x3a010 jmp 0x4dffb movq %r14, %rdi movq %rbx, %rsi callq 0x384e0 movl (%r14), %ebp movl 0x4(%r14), %eax leal (%rax,%rax,2), %eax leal 0x3(,%rax,2), %eax addl %ebp, %ebp cmpl %ebp, %eax cmovgl %eax, %ebp leaq 0x230(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, -0x4(%rax) movq $0x0, 0x200(%rax) movl %ebp, %r15d cmpl $0x81, %ebp jb 0x4e063 leaq (,%r15,4), %rdi callq 0x3a230 movq %rax, 0x430(%rsp) movq %rax, 0x220(%rsp) movl %ebp, 0x22c(%rsp) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movl %ebp, -0x8(%r12) movl $0x80, -0x4(%r12) movq $0x0, 0x200(%r12) cmpl $0x81, %ebp jb 0x4e0ac shlq $0x2, %r15 movq %r15, %rdi callq 0x3a230 movq %rax, 0x218(%rsp) movq %rax, 0x8(%rsp) movl %ebp, 0x14(%rsp) leaq 0x18(%r14), %r13 xorl %r15d, %r15d testb $0x8, (%r13) jne 0x4e0d2 movq 0x220(%rsp), %rcx movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x38760 jmp 0x4e0e0 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3b0b0 incq %r15 addq $0xd8, %r13 cmpq $0x4, %r15 jne 0x4e0b3 leaq 0x18(%r14), %r13 xorl %r15d, %r15d movzwl (%r13), %eax testl $0x180, %eax # imm = 0x180 je 0x4e111 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x393b0 movl (%r13), %eax notl %eax testl $0x180, %eax # imm = 0x180 je 0x4e139 movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x395d0 incq %r15 addq $0xd8, %r13 cmpq $0x4, %r15 jne 0x4e0f7 cmpb $0x0, 0x9(%r14) je 0x4e158 movq %rbx, %rdi callq 0x4c8e2 movq 0x218(%rsp), %rdi callq 0x3a0c0 movq 0x430(%rsp), %rdi callq 0x3a0c0 addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4e18d movq %rax, %rbx jmp 0x4e1aa jmp 0x4e18d movq %rax, %rbx movq 0x218(%rsp), %rdi callq 0x3a0c0 movq %r12, 0x8(%rsp) movl $0x80, 0x14(%rsp) movq 0x430(%rsp), %rdi callq 0x3a0c0 movq %rbx, %rdi callq 0x3bd70 nop
_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE7ConvertERNS1_12SparseMatrixIfEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 438h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi+8], 1 jnz short loc_4DFF0 mov edx, [r14+0Ch] mov ecx, [r14+10h] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIfEEii; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,int,int) jmp short loc_4DFFB loc_4DFF0: mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE22resizeMatrixUnisolatedERNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_4DFFB: mov ebp, [r14] mov eax, [r14+4] lea eax, [rax+rax*2] lea eax, ds:3[rax*2] add ebp, ebp cmp eax, ebp cmovg ebp, eax lea rax, [rsp+468h+var_238] mov [rax-10h], rax mov [rax-8], ebp mov dword ptr [rax-4], 80h mov qword ptr [rax+200h], 0 mov r15d, ebp cmp ebp, 81h jb short loc_4E063 lea rdi, ds:0[r15*4]; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+468h+var_38], rax mov [rsp+468h+var_248], rax mov [rsp+468h+var_23C], ebp loc_4E063: lea r12, [rsp+468h+var_450] mov [r12-10h], r12 mov [r12-8], ebp mov dword ptr [r12-4], 80h mov qword ptr [r12+200h], 0 cmp ebp, 81h jb short loc_4E0AC shl r15, 2 mov rdi, r15; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+468h+var_250], rax mov [rsp+468h+var_460], rax mov [rsp+468h+var_454], ebp loc_4E0AC: lea r13, [r14+18h] xor r15d, r15d loc_4E0B3: test byte ptr [r13+0], 8 jnz short loc_4E0D2 mov rcx, [rsp+468h+var_248] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIfEEPf; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *) jmp short loc_4E0E0 loc_4E0D2: mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assignRegularEdgePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_4E0E0: inc r15 add r13, 0D8h cmp r15, 4 jnz short loc_4E0B3 lea r13, [r14+18h] xor r15d, r15d loc_4E0F7: movzx eax, word ptr [r13+0] test eax, 180h jz short loc_4E111 mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assignRegularFacePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_4E111: mov eax, [r13+0] not eax test eax, 180h jz short loc_4E139 mov rcx, [rsp+468h+var_248] mov r8, [rsp+468h+var_460] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE26computeIrregularFacePointsEiRNS1_12SparseMatrixIfEEPfPi; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *,int *) loc_4E139: inc r15 add r13, 0D8h cmp r15, 4 jnz short loc_4E0F7 cmp byte ptr [r14+9], 0 jz short loc_4E158 mov rdi, rbx call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIfEEvRNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_4E158: mov rdi, [rsp+468h+var_250]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+468h+var_38]; void * call __ZdlPv; operator delete(void *) add rsp, 438h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4E18D mov rbx, rax jmp short loc_4E1AA jmp short $+2 loc_4E18D: mov rbx, rax mov rdi, [rsp+arg_210]; void * call __ZdlPv; operator delete(void *) mov [rsp+arg_0], r12 mov [rsp+arg_C], 80h loc_4E1AA: mov rdi, [rsp+arg_428]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(long long a1, int *a2) { unsigned int v2; // ebp _BYTE *v3; // r13 long long i; // r15 _WORD *v5; // r13 long long j; // r15 char *v7; // [rsp+8h] [rbp-460h] char v8; // [rsp+18h] [rbp-450h] BYREF void *v9; // [rsp+218h] [rbp-250h] char *v10; // [rsp+220h] [rbp-248h] unsigned int v11; // [rsp+228h] [rbp-240h] int v12; // [rsp+22Ch] [rbp-23Ch] char v13; // [rsp+230h] [rbp-238h] BYREF void *v14; // [rsp+430h] [rbp-38h] if ( *(_BYTE *)(a1 + 8) == 1 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixIsolatedIrregular( a1, a2, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixUnisolated(a1, a2); v2 = 2 * *(_DWORD *)a1; if ( 6 * *(_DWORD *)(a1 + 4) + 3 > (int)v2 ) v2 = 6 * *(_DWORD *)(a1 + 4) + 3; v10 = &v13; v11 = v2; v12 = 128; v14 = 0LL; if ( v2 >= 0x81 ) { v14 = (void *)operator new(4LL * v2); v10 = (char *)v14; v12 = v2; } v7 = &v8; v9 = 0LL; if ( v2 >= 0x81 ) { v9 = (void *)operator new(4LL * v2); v7 = (char *)v9; } v3 = (_BYTE *)(a1 + 24); for ( i = 0LL; i != 4; ++i ) { if ( (*v3 & 8) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularEdgePoints(a1, (unsigned int)i, a2); else OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularEdgePoints(a1, (unsigned int)i, a2, v10); v3 += 216; } v5 = (_WORD *)(a1 + 24); for ( j = 0LL; j != 4; ++j ) { if ( (*v5 & 0x180) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularFacePoints(a1, (unsigned int)j, a2); if ( (~*(_DWORD *)v5 & 0x180) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularFacePoints(a1, (unsigned int)j, a2, v10, v7); v5 += 108; } if ( *(_BYTE *)(a1 + 9) ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(a2); operator delete(v9); operator delete(v14); }
Convert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x438 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI + 0x8],0x1 JNZ 0x0014dff0 MOV EDX,dword ptr [R14 + 0xc] MOV ECX,dword ptr [R14 + 0x10] MOV RDI,R14 MOV RSI,RBX CALL 0x0013a010 JMP 0x0014dffb LAB_0014dff0: MOV RDI,R14 MOV RSI,RBX CALL 0x001384e0 LAB_0014dffb: MOV EBP,dword ptr [R14] MOV EAX,dword ptr [R14 + 0x4] LEA EAX,[RAX + RAX*0x2] LEA EAX,[0x3 + RAX*0x2] ADD EBP,EBP CMP EAX,EBP CMOVG EBP,EAX LEA RAX,[RSP + 0x230] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV dword ptr [RAX + -0x4],0x80 MOV qword ptr [RAX + 0x200],0x0 MOV R15D,EBP CMP EBP,0x81 JC 0x0014e063 LEA RDI,[R15*0x4] CALL 0x0013a230 MOV qword ptr [RSP + 0x430],RAX MOV qword ptr [RSP + 0x220],RAX MOV dword ptr [RSP + 0x22c],EBP LAB_0014e063: LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV dword ptr [R12 + -0x8],EBP MOV dword ptr [R12 + -0x4],0x80 MOV qword ptr [R12 + 0x200],0x0 CMP EBP,0x81 JC 0x0014e0ac SHL R15,0x2 LAB_0014e093: MOV RDI,R15 CALL 0x0013a230 MOV qword ptr [RSP + 0x218],RAX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x14],EBP LAB_0014e0ac: LEA R13,[R14 + 0x18] XOR R15D,R15D LAB_0014e0b3: TEST byte ptr [R13],0x8 JNZ 0x0014e0d2 MOV RCX,qword ptr [RSP + 0x220] LAB_0014e0c2: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00138760 JMP 0x0014e0e0 LAB_0014e0d2: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013b0b0 LAB_0014e0e0: INC R15 ADD R13,0xd8 CMP R15,0x4 JNZ 0x0014e0b3 LEA R13,[R14 + 0x18] XOR R15D,R15D LAB_0014e0f7: MOVZX EAX,word ptr [R13] TEST EAX,0x180 JZ 0x0014e111 LAB_0014e103: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001393b0 LAB_0014e111: MOV EAX,dword ptr [R13] NOT EAX TEST EAX,0x180 JZ 0x0014e139 MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001395d0 LAB_0014e139: INC R15 ADD R13,0xd8 CMP R15,0x4 JNZ 0x0014e0f7 CMP byte ptr [R14 + 0x9],0x0 JZ 0x0014e158 LAB_0014e150: MOV RDI,RBX CALL 0x0014c8e2 LAB_0014e158: MOV RDI,qword ptr [RSP + 0x218] CALL 0x0013a0c0 MOV RDI,qword ptr [RSP + 0x430] CALL 0x0013a0c0 ADD RSP,0x438 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert (GregoryConverter<float> *this,SparseMatrix *param_1) { uint uVar1; uint uVar2; GregoryConverter<float> *pGVar3; long lVar4; int *local_460; int local_450 [128]; int *local_250; float *local_248; uint local_240; uint local_23c; float local_238 [128]; float *local_38; if (this[8] == (GregoryConverter<float>)0x1) { resizeMatrixIsolatedIrregular(this,param_1,*(int *)(this + 0xc),*(int *)(this + 0x10)); } else { resizeMatrixUnisolated(this,param_1); } uVar2 = *(int *)(this + 4) * 6 + 3; uVar1 = *(int *)this * 2; if (*(int *)this * 2 < (int)uVar2) { uVar1 = uVar2; } local_248 = local_238; local_23c = 0x80; local_38 = (float *)0x0; local_240 = uVar1; if (0x80 < uVar1) { local_248 = (float *)operator_new((ulong)uVar1 * 4); local_23c = uVar1; local_38 = local_248; } local_460 = local_450; local_250 = (int *)0x0; if (0x80 < uVar1) { /* try { // try from 0014e093 to 0014e09a has its CatchHandler @ 0014e186 */ local_460 = (int *)operator_new((ulong)uVar1 << 2); local_250 = local_460; } pGVar3 = this + 0x18; lVar4 = 0; do { if (((byte)*pGVar3 & 8) == 0) { /* try { // try from 0014e0c2 to 0014e0df has its CatchHandler @ 0014e18b */ computeIrregularEdgePoints(this,(int)lVar4,param_1,local_248); } else { assignRegularEdgePoints(this,(int)lVar4,param_1); } lVar4 = lVar4 + 1; pGVar3 = pGVar3 + 0xd8; } while (lVar4 != 4); pGVar3 = this + 0x18; lVar4 = 0; do { if ((*(ushort *)pGVar3 & 0x180) != 0) { /* try { // try from 0014e103 to 0014e138 has its CatchHandler @ 0014e18d */ assignRegularFacePoints(this,(int)lVar4,param_1); } if ((~*(uint *)pGVar3 & 0x180) != 0) { computeIrregularFacePoints(this,(int)lVar4,param_1,local_248,local_460); } lVar4 = lVar4 + 1; pGVar3 = pGVar3 + 0xd8; } while (lVar4 != 4); if (this[9] != (GregoryConverter<float>)0x0) { /* try { // try from 0014e150 to 0014e157 has its CatchHandler @ 0014e184 */ (anonymous_namespace)::_removeValence2Duplicates<float>(param_1); } operator_delete(local_250); operator_delete(local_38); return; }
61,418
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/catmarkPatchBuilder.cpp
void GregoryConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the popoluation of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + 2 * _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O2
cpp
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x638, %rsp # imm = 0x638 movq %rsi, %rbx movq %rdi, %r14 cmpb $0x1, 0x8(%rdi) jne 0x68364 movl 0xc(%r14), %edx movl 0x10(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi callq 0x50080 jmp 0x6836f movq %r14, %rdi movq %rbx, %rsi callq 0x55da0 imull $0x6, 0x4(%r14), %eax addl $0x3, %eax movl (%r14), %ebp addl %ebp, %ebp cmpl %ebp, %eax cmovgl %eax, %ebp leaq 0x220(%rsp), %rdi movl %ebp, %esi callq 0x527b0 leaq 0x8(%rsp), %rdi movl %ebp, %esi callq 0x53300 leaq 0x18(%r14), %r12 xorl %r15d, %r15d movq %r12, %r13 cmpq $0x4, %r15 je 0x683e5 testb $0x8, (%r13) jne 0x683cb movq 0x220(%rsp), %rcx movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x540d0 jmp 0x683d9 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x535f0 incq %r15 addq $0xe0, %r13 jmp 0x683a6 xorl %r15d, %r15d cmpq $0x4, %r15 je 0x6843a movzwl (%r12), %eax testw $0x180, %ax # imm = 0x180 je 0x68413 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x542b0 movl (%r12), %eax notl %eax testw $0x180, %ax # imm = 0x180 je 0x6842e movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x55a60 incq %r15 addq $0xe0, %r12 jmp 0x683e8 cmpb $0x0, 0x9(%r14) je 0x68449 movq %rbx, %rdi callq 0x649a6 movq 0x218(%rsp), %rdi callq 0x524d0 movq 0x630(%rsp), %rdi callq 0x524d0 addq $0x638, %rsp # imm = 0x638 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x6847e movq %rax, %rbx jmp 0x6848e jmp 0x6847e movq %rax, %rbx movq 0x218(%rsp), %rdi callq 0x524d0 movq 0x630(%rsp), %rdi callq 0x524d0 movq %rbx, %rdi callq 0x55300 nop
_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE7ConvertERNS1_12SparseMatrixIdEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 638h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi+8], 1 jnz short loc_68364 mov edx, [r14+0Ch] mov ecx, [r14+10h] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIdEEii; OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int,int) jmp short loc_6836F loc_68364: mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE22resizeMatrixUnisolatedERNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_6836F: imul eax, [r14+4], 6 add eax, 3 mov ebp, [r14] add ebp, ebp cmp eax, ebp cmovg ebp, eax lea rdi, [rsp+668h+var_448] mov esi, ebp call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIdLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::StackBuffer(uint) lea rdi, [rsp+668h+var_660] mov esi, ebp call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj128ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(uint) lea r12, [r14+18h] xor r15d, r15d mov r13, r12 loc_683A6: cmp r15, 4 jz short loc_683E5 test byte ptr [r13+0], 8 jnz short loc_683CB mov rcx, [rsp+668h+var_448] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIdEEPd; OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *) jmp short loc_683D9 loc_683CB: mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE23assignRegularEdgePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_683D9: inc r15 add r13, 0E0h jmp short loc_683A6 loc_683E5: xor r15d, r15d loc_683E8: cmp r15, 4 jz short loc_6843A movzx eax, word ptr [r12] test ax, 180h jz short loc_68413 mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) mov eax, [r12] not eax test ax, 180h jz short loc_6842E loc_68413: mov rcx, [rsp+668h+var_448] mov r8, [rsp+668h+var_660] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi; OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,double *,int *) loc_6842E: inc r15 add r12, 0E0h jmp short loc_683E8 loc_6843A: cmp byte ptr [r14+9], 0 jz short loc_68449 mov rdi, rbx call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIdEEvRNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &) loc_68449: mov rdi, [rsp+668h+var_450]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+668h+var_38]; void * call __ZdlPv; operator delete(void *) add rsp, 638h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_6847E mov rbx, rax jmp short loc_6848E jmp short $+2 loc_6847E: mov rbx, rax mov rdi, [rsp+arg_210]; void * call __ZdlPv; operator delete(void *) loc_6848E: mov rdi, [rsp+arg_628]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::Convert(long long a1, unsigned int *a2) { unsigned int v2; // ebp _WORD *v3; // r12 long long v4; // r15 _BYTE *v5; // r13 long long i; // r15 void *v7[67]; // [rsp+8h] [rbp-660h] BYREF void *v8[137]; // [rsp+220h] [rbp-448h] BYREF if ( *(_BYTE *)(a1 + 8) == 1 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::resizeMatrixIsolatedIrregular( a1, a2, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::resizeMatrixUnisolated(a1, a2); v2 = 2 * *(_DWORD *)a1; if ( 6 * *(_DWORD *)(a1 + 4) + 3 > (int)v2 ) v2 = 6 * *(_DWORD *)(a1 + 4) + 3; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<double,128u,true>::StackBuffer(v8, v2); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,128u,true>::StackBuffer(v7, v2); v3 = (_WORD *)(a1 + 24); v4 = 0LL; v5 = (_BYTE *)(a1 + 24); while ( v4 != 4 ) { if ( (*v5 & 8) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::assignRegularEdgePoints(a1, (unsigned int)v4, a2); else OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::computeIrregularEdgePoints(a1, (unsigned int)v4, a2, v8[0]); ++v4; v5 += 224; } for ( i = 0LL; i != 4; ++i ) { if ( (*v3 & 0x180) == 0 || (OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::assignRegularFacePoints(a1, (unsigned int)i, a2), (~*v3 & 0x180) != 0) ) { OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::computeIrregularFacePoints( a1, (unsigned int)i, a2, v8[0], v7[0]); } v3 += 112; } if ( *(_BYTE *)(a1 + 9) ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<double>(a2); operator delete(v7[66]); operator delete(v8[130]); }
Convert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x638 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI + 0x8],0x1 JNZ 0x00168364 MOV EDX,dword ptr [R14 + 0xc] MOV ECX,dword ptr [R14 + 0x10] MOV RDI,R14 MOV RSI,RBX CALL 0x00150080 JMP 0x0016836f LAB_00168364: MOV RDI,R14 MOV RSI,RBX CALL 0x00155da0 LAB_0016836f: IMUL EAX,dword ptr [R14 + 0x4],0x6 ADD EAX,0x3 MOV EBP,dword ptr [R14] ADD EBP,EBP CMP EAX,EBP CMOVG EBP,EAX LEA RDI,[RSP + 0x220] MOV ESI,EBP CALL 0x001527b0 LAB_00168390: LEA RDI,[RSP + 0x8] MOV ESI,EBP CALL 0x00153300 LEA R12,[R14 + 0x18] XOR R15D,R15D MOV R13,R12 LAB_001683a6: CMP R15,0x4 JZ 0x001683e5 TEST byte ptr [R13],0x8 JNZ 0x001683cb MOV RCX,qword ptr [RSP + 0x220] LAB_001683bb: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001540d0 JMP 0x001683d9 LAB_001683cb: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001535f0 LAB_001683d9: INC R15 ADD R13,0xe0 JMP 0x001683a6 LAB_001683e5: XOR R15D,R15D LAB_001683e8: CMP R15,0x4 JZ 0x0016843a MOVZX EAX,word ptr [R12] TEST AX,0x180 JZ 0x00168413 LAB_001683f9: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001542b0 MOV EAX,dword ptr [R12] NOT EAX TEST AX,0x180 JZ 0x0016842e LAB_00168413: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00155a60 LAB_0016842e: INC R15 ADD R12,0xe0 JMP 0x001683e8 LAB_0016843a: CMP byte ptr [R14 + 0x9],0x0 JZ 0x00168449 LAB_00168441: MOV RDI,RBX CALL 0x001649a6 LAB_00168449: MOV RDI,qword ptr [RSP + 0x218] CALL 0x001524d0 MOV RDI,qword ptr [RSP + 0x630] CALL 0x001524d0 ADD RSP,0x638 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryConverter<double>::Convert (GregoryConverter<double> *this,SparseMatrix *param_1) { uint uVar1; uint uVar2; GregoryConverter<double> *pGVar3; GregoryConverter<double> *pGVar4; long lVar5; int *local_660 [66]; void *local_450; double *local_448 [130]; void *local_38; if (this[8] == (GregoryConverter<double>)0x1) { resizeMatrixIsolatedIrregular(this,param_1,*(int *)(this + 0xc),*(int *)(this + 0x10)); } else { resizeMatrixUnisolated(this,param_1); } uVar2 = *(int *)(this + 4) * 6 + 3; uVar1 = *(int *)this * 2; if (*(int *)this * 2 < (int)uVar2) { uVar1 = uVar2; } Vtr::internal::StackBuffer<double,128u,true>::StackBuffer ((StackBuffer<double,128u,true> *)local_448,uVar1); /* try { // try from 00168390 to 0016839b has its CatchHandler @ 00168477 */ Vtr::internal::StackBuffer<int,128u,true>::StackBuffer ((StackBuffer<int,128u,true> *)local_660,uVar1); pGVar3 = this + 0x18; pGVar4 = pGVar3; for (lVar5 = 0; lVar5 != 4; lVar5 = lVar5 + 1) { if (((byte)*pGVar4 & 8) == 0) { /* try { // try from 001683bb to 001683d8 has its CatchHandler @ 0016847c */ computeIrregularEdgePoints(this,(int)lVar5,param_1,local_448[0]); } else { assignRegularEdgePoints(this,(int)lVar5,param_1); } pGVar4 = pGVar4 + 0xe0; } lVar5 = 0; do { if (lVar5 == 4) { if (this[9] != (GregoryConverter<double>)0x0) { /* try { // try from 00168441 to 00168448 has its CatchHandler @ 00168475 */ (anonymous_namespace)::_removeValence2Duplicates<double>(param_1); } operator_delete(local_450); operator_delete(local_38); return; } if ((*(ushort *)pGVar3 & 0x180) == 0) { LAB_00168413: computeIrregularFacePoints(this,(int)lVar5,param_1,local_448[0],local_660[0]); } else { /* try { // try from 001683f9 to 0016842d has its CatchHandler @ 0016847e */ assignRegularFacePoints(this,(int)lVar5,param_1); if ((~*(uint *)pGVar3 & 0x180) != 0) goto LAB_00168413; } lVar5 = lVar5 + 1; pGVar3 = pGVar3 + 0xe0; } while( true ); }
61,419
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/catmarkPatchBuilder.cpp
void GregoryConverter<REAL>::Convert(Matrix & matrix) const { // // Initialize the sparse matrix to accomodate the coefficients for each // row/point -- identify common topological cases to treat more easily // (and note that specializing the popoluation of the matrix may also be // worthwhile in such cases) // if (_isIsolatedInteriorPatch) { resizeMatrixIsolatedIrregular(matrix, _isolatedCorner, _isolatedValence); } else { resizeMatrixUnisolated(matrix); } // // Compute the corner and edge points P, Ep and Em first. Since face // points Fp and Fm involve edge points for two adjacent corners, their // computation must follow: // int maxRingSize = 1 + 2 * _maxValence; int weightBufferSize = std::max(3 * maxRingSize, 2 * _numSourcePoints); StackBuffer<Weight, 128, true> weightBuffer(weightBufferSize); StackBuffer<int, 128, true> indexBuffer(weightBufferSize); for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].isRegular) { assignRegularEdgePoints(cIndex, matrix); } else { computeIrregularEdgePoints(cIndex, matrix, weightBuffer); } } for (int cIndex = 0; cIndex < 4; ++cIndex) { if (_corners[cIndex].fpIsRegular || _corners[cIndex].fmIsRegular) { assignRegularFacePoints(cIndex, matrix); } if (!_corners[cIndex].fpIsRegular || !_corners[cIndex].fmIsRegular) { computeIrregularFacePoints(cIndex, matrix, weightBuffer, indexBuffer); } } if (_hasVal2InteriorCorner) { _removeValence2Duplicates(matrix); } }
O3
cpp
OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x438, %rsp # imm = 0x438 movq %rsi, %rbx movq %rdi, %r14 cmpb $0x1, 0x8(%rdi) jne 0x5058e movl 0xc(%r14), %edx movl 0x10(%r14), %ecx movq %r14, %rdi movq %rbx, %rsi callq 0x39ff0 jmp 0x50599 movq %r14, %rdi movq %rbx, %rsi callq 0x384e0 movl (%r14), %ebp movl 0x4(%r14), %eax leal (%rax,%rax,2), %eax leal 0x3(,%rax,2), %eax addl %ebp, %ebp cmpl %ebp, %eax cmovgl %eax, %ebp leaq 0x230(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, %ecx movl %ecx, -0x4(%rax) movq $0x0, 0x200(%rax) cmpl %ecx, %ebp jbe 0x50636 movl %ebp, %r15d shlq $0x2, %r15 movq %r15, %rdi callq 0x3a210 movq %rax, 0x430(%rsp) movq %rax, 0x220(%rsp) movl %ebp, 0x22c(%rsp) leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, -0x4(%rax) movq $0x0, 0x200(%rax) movq %r15, %rdi callq 0x3a210 movq %rax, 0x218(%rsp) movq %rax, 0x8(%rsp) movl %ebp, 0x14(%rsp) jmp 0x50654 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movl %ebp, -0x8(%rax) movl $0x80, -0x4(%rax) movq $0x0, 0x200(%rax) leaq 0x18(%r14), %r12 xorl %r15d, %r15d movq %r12, %r13 testb $0x8, (%r13) jne 0x5067d movq 0x220(%rsp), %rcx movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x38760 jmp 0x5068b movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x3b070 incq %r15 addq $0xd8, %r13 cmpq $0x4, %r15 jne 0x5065e xorl %r15d, %r15d movzwl (%r12), %eax testl $0x180, %eax # imm = 0x180 je 0x506c5 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x393a0 movl (%r12), %eax notl %eax testl $0x180, %eax # imm = 0x180 je 0x506e0 movq 0x220(%rsp), %rcx movq 0x8(%rsp), %r8 movq %r14, %rdi movl %r15d, %esi movq %rbx, %rdx callq 0x395b0 incq %r15 addq $0xd8, %r12 cmpq $0x4, %r15 jne 0x5069e cmpb $0x0, 0x9(%r14) je 0x506ff movq %rbx, %rdi callq 0x4eee2 movq 0x218(%rsp), %rdi callq 0x3a0a0 movq 0x430(%rsp), %rdi callq 0x3a0a0 addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x50734 movq %rax, %rbx jmp 0x5074c jmp 0x50734 movq %rax, %rbx movq 0x218(%rsp), %rdi callq 0x3a0a0 movl $0x80, 0x14(%rsp) movq 0x430(%rsp), %rdi callq 0x3a0a0 movq %rbx, %rdi callq 0x3bd30 nop
_ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE7ConvertERNS1_12SparseMatrixIfEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 438h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi+8], 1 jnz short loc_5058E mov edx, [r14+0Ch] mov ecx, [r14+10h] mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE29resizeMatrixIsolatedIrregularERNS1_12SparseMatrixIfEEii; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixIsolatedIrregular(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,int,int) jmp short loc_50599 loc_5058E: mov rdi, r14 mov rsi, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE22resizeMatrixUnisolatedERNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixUnisolated(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_50599: mov ebp, [r14] mov eax, [r14+4] lea eax, [rax+rax*2] lea eax, ds:3[rax*2] add ebp, ebp cmp eax, ebp cmovg ebp, eax lea rax, [rsp+468h+var_238] mov [rax-10h], rax mov [rax-8], ebp mov ecx, 80h mov [rax-4], ecx mov qword ptr [rax+200h], 0 cmp ebp, ecx jbe short loc_50636 mov r15d, ebp shl r15, 2 mov rdi, r15; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+468h+var_38], rax mov [rsp+468h+var_248], rax mov [rsp+468h+var_23C], ebp lea rax, [rsp+468h+var_450] mov [rax-10h], rax mov [rax-8], ebp mov dword ptr [rax-4], 80h mov qword ptr [rax+200h], 0 mov rdi, r15; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+468h+var_250], rax mov [rsp+468h+var_460], rax mov [rsp+468h+var_454], ebp jmp short loc_50654 loc_50636: lea rax, [rsp+468h+var_450] mov [rax-10h], rax mov [rax-8], ebp mov dword ptr [rax-4], 80h mov qword ptr [rax+200h], 0 loc_50654: lea r12, [r14+18h] xor r15d, r15d mov r13, r12 loc_5065E: test byte ptr [r13+0], 8 jnz short loc_5067D mov rcx, [rsp+468h+var_248] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE26computeIrregularEdgePointsEiRNS1_12SparseMatrixIfEEPf; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *) jmp short loc_5068B loc_5067D: mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assignRegularEdgePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularEdgePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_5068B: inc r15 add r13, 0D8h cmp r15, 4 jnz short loc_5065E xor r15d, r15d loc_5069E: movzx eax, word ptr [r12] test eax, 180h jz short loc_506C5 mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE23assignRegularFacePointsEiRNS1_12SparseMatrixIfEE; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) mov eax, [r12] not eax test eax, 180h jz short loc_506E0 loc_506C5: mov rcx, [rsp+468h+var_248] mov r8, [rsp+468h+var_460] mov rdi, r14 mov esi, r15d mov rdx, rbx call __ZNK10OpenSubdiv6v3_6_03Far16GregoryConverterIfE26computeIrregularFacePointsEiRNS1_12SparseMatrixIfEEPfPi; OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularFacePoints(int,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &,float *,int *) loc_506E0: inc r15 add r12, 0D8h cmp r15, 4 jnz short loc_5069E cmp byte ptr [r14+9], 0 jz short loc_506FF mov rdi, rbx call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_125_removeValence2DuplicatesIfEEvRNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &) loc_506FF: mov rdi, [rsp+468h+var_250]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+468h+var_38]; void * call __ZdlPv; operator delete(void *) add rsp, 438h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_50734 mov rbx, rax jmp short loc_5074C jmp short $+2 loc_50734: mov rbx, rax mov rdi, [rsp+arg_210]; void * call __ZdlPv; operator delete(void *) mov [rsp+arg_C], 80h loc_5074C: mov rdi, [rsp+arg_428]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(long long a1, int *a2) { unsigned int v2; // ebp _WORD *v3; // r12 long long v4; // r15 _BYTE *v5; // r13 long long i; // r15 char *v7; // [rsp+8h] [rbp-460h] char v8; // [rsp+18h] [rbp-450h] BYREF void *v9; // [rsp+218h] [rbp-250h] char *v10; // [rsp+220h] [rbp-248h] unsigned int v11; // [rsp+228h] [rbp-240h] int v12; // [rsp+22Ch] [rbp-23Ch] char v13; // [rsp+230h] [rbp-238h] BYREF void *v14; // [rsp+430h] [rbp-38h] if ( *(_BYTE *)(a1 + 8) == 1 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixIsolatedIrregular( a1, a2, *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 16)); else OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::resizeMatrixUnisolated(a1, a2); v2 = 2 * *(_DWORD *)a1; if ( 6 * *(_DWORD *)(a1 + 4) + 3 > (int)v2 ) v2 = 6 * *(_DWORD *)(a1 + 4) + 3; v10 = &v13; v11 = v2; v12 = 128; v14 = 0LL; if ( v2 <= 0x80 ) { v7 = &v8; v9 = 0LL; } else { v14 = (void *)operator new(4LL * v2); v10 = (char *)v14; v12 = v2; v9 = (void *)operator new(4LL * v2); v7 = (char *)v9; } v3 = (_WORD *)(a1 + 24); v4 = 0LL; v5 = (_BYTE *)(a1 + 24); do { if ( (*v5 & 8) != 0 ) OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularEdgePoints(a1, (unsigned int)v4, a2); else OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularEdgePoints(a1, (unsigned int)v4, a2, v10); ++v4; v5 += 216; } while ( v4 != 4 ); for ( i = 0LL; i != 4; ++i ) { if ( (*v3 & 0x180) == 0 || (OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::assignRegularFacePoints(a1, (unsigned int)i, a2), (~*(_DWORD *)v3 & 0x180) != 0) ) { OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::computeIrregularFacePoints(a1, (unsigned int)i, a2, v10, v7); } v3 += 108; } if ( *(_BYTE *)(a1 + 9) ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_removeValence2Duplicates<float>(a2); operator delete(v9); operator delete(v14); }
Convert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x438 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI + 0x8],0x1 JNZ 0x0015058e MOV EDX,dword ptr [R14 + 0xc] MOV ECX,dword ptr [R14 + 0x10] MOV RDI,R14 MOV RSI,RBX CALL 0x00139ff0 JMP 0x00150599 LAB_0015058e: MOV RDI,R14 MOV RSI,RBX CALL 0x001384e0 LAB_00150599: MOV EBP,dword ptr [R14] MOV EAX,dword ptr [R14 + 0x4] LEA EAX,[RAX + RAX*0x2] LEA EAX,[0x3 + RAX*0x2] ADD EBP,EBP CMP EAX,EBP CMOVG EBP,EAX LEA RAX,[RSP + 0x230] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV ECX,0x80 MOV dword ptr [RAX + -0x4],ECX MOV qword ptr [RAX + 0x200],0x0 CMP EBP,ECX JBE 0x00150636 MOV R15D,EBP SHL R15,0x2 MOV RDI,R15 CALL 0x0013a210 MOV qword ptr [RSP + 0x430],RAX MOV qword ptr [RSP + 0x220],RAX MOV dword ptr [RSP + 0x22c],EBP LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV dword ptr [RAX + -0x4],0x80 MOV qword ptr [RAX + 0x200],0x0 LAB_0015061b: MOV RDI,R15 CALL 0x0013a210 MOV qword ptr [RSP + 0x218],RAX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x14],EBP JMP 0x00150654 LAB_00150636: LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],EBP MOV dword ptr [RAX + -0x4],0x80 MOV qword ptr [RAX + 0x200],0x0 LAB_00150654: LEA R12,[R14 + 0x18] XOR R15D,R15D MOV R13,R12 LAB_0015065e: TEST byte ptr [R13],0x8 JNZ 0x0015067d MOV RCX,qword ptr [RSP + 0x220] LAB_0015066d: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x00138760 JMP 0x0015068b LAB_0015067d: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x0013b070 LAB_0015068b: INC R15 ADD R13,0xd8 CMP R15,0x4 JNZ 0x0015065e XOR R15D,R15D LAB_0015069e: MOVZX EAX,word ptr [R12] TEST EAX,0x180 JZ 0x001506c5 LAB_001506aa: MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001393a0 MOV EAX,dword ptr [R12] NOT EAX TEST EAX,0x180 JZ 0x001506e0 LAB_001506c5: MOV RCX,qword ptr [RSP + 0x220] MOV R8,qword ptr [RSP + 0x8] MOV RDI,R14 MOV ESI,R15D MOV RDX,RBX CALL 0x001395b0 LAB_001506e0: INC R15 ADD R12,0xd8 CMP R15,0x4 JNZ 0x0015069e CMP byte ptr [R14 + 0x9],0x0 JZ 0x001506ff LAB_001506f7: MOV RDI,RBX CALL 0x0014eee2 LAB_001506ff: MOV RDI,qword ptr [RSP + 0x218] CALL 0x0013a0a0 MOV RDI,qword ptr [RSP + 0x430] CALL 0x0013a0a0 ADD RSP,0x438 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert(OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryConverter<float>::Convert (GregoryConverter<float> *this,SparseMatrix *param_1) { uint uVar1; uint uVar2; GregoryConverter<float> *pGVar3; GregoryConverter<float> *pGVar4; long lVar5; int *local_460; int local_450 [128]; int *local_250; float *local_248; uint local_240; uint local_23c; float local_238 [128]; float *local_38; if (this[8] == (GregoryConverter<float>)0x1) { resizeMatrixIsolatedIrregular(this,param_1,*(int *)(this + 0xc),*(int *)(this + 0x10)); } else { resizeMatrixUnisolated(this,param_1); } uVar2 = *(int *)(this + 4) * 6 + 3; uVar1 = *(int *)this * 2; if (*(int *)this * 2 < (int)uVar2) { uVar1 = uVar2; } local_248 = local_238; local_23c = 0x80; local_38 = (float *)0x0; local_240 = uVar1; if (uVar1 < 0x81) { local_460 = local_450; local_250 = (int *)0x0; } else { local_248 = (float *)operator_new((ulong)uVar1 << 2); local_250 = (int *)0x0; local_23c = uVar1; local_38 = local_248; /* try { // try from 0015061b to 00150622 has its CatchHandler @ 0015072d */ local_460 = (int *)operator_new((ulong)uVar1 << 2); local_250 = local_460; } pGVar3 = this + 0x18; lVar5 = 0; pGVar4 = pGVar3; do { if (((byte)*pGVar4 & 8) == 0) { /* try { // try from 0015066d to 0015068a has its CatchHandler @ 00150732 */ computeIrregularEdgePoints(this,(int)lVar5,param_1,local_248); } else { assignRegularEdgePoints(this,(int)lVar5,param_1); } lVar5 = lVar5 + 1; pGVar4 = pGVar4 + 0xd8; } while (lVar5 != 4); lVar5 = 0; do { if ((*(ushort *)pGVar3 & 0x180) == 0) { LAB_001506c5: computeIrregularFacePoints(this,(int)lVar5,param_1,local_248,local_460); } else { /* try { // try from 001506aa to 001506df has its CatchHandler @ 00150734 */ assignRegularFacePoints(this,(int)lVar5,param_1); if ((~*(uint *)pGVar3 & 0x180) != 0) goto LAB_001506c5; } lVar5 = lVar5 + 1; pGVar3 = pGVar3 + 0xd8; if (lVar5 == 4) { if (this[9] != (GregoryConverter<float>)0x0) { /* try { // try from 001506f7 to 001506fe has its CatchHandler @ 0015072b */ (anonymous_namespace)::_removeValence2Duplicates<float>(param_1); } operator_delete(local_250); operator_delete(local_38); return; } } while( true ); }
61,420
js_string_pad
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_pad(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int padEnd) { JSValue str, v = JS_UNDEFINED; StringBuffer b_s, *b = &b_s; JSString *p, *p1 = NULL; int n, len, c = ' '; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) goto fail1; if (JS_ToInt32Sat(ctx, &n, argv[0])) goto fail2; p = JS_VALUE_GET_STRING(str); len = p->len; if (len >= n) return str; if (argc > 1 && !JS_IsUndefined(argv[1])) { v = JS_ToString(ctx, argv[1]); if (JS_IsException(v)) goto fail2; p1 = JS_VALUE_GET_STRING(v); if (p1->len == 0) { JS_FreeValue(ctx, v); return str; } if (p1->len == 1) { c = string_get(p1, 0); p1 = NULL; } } if (n > JS_STRING_LEN_MAX) { JS_ThrowRangeError(ctx, "invalid string length"); goto fail2; } if (string_buffer_init(ctx, b, n)) goto fail3; n -= len; if (padEnd) { if (string_buffer_concat(b, p, 0, len)) goto fail; } if (p1) { while (n > 0) { int chunk = min_int(n, p1->len); if (string_buffer_concat(b, p1, 0, chunk)) goto fail; n -= chunk; } } else { if (string_buffer_fill(b, c, n)) goto fail; } if (!padEnd) { if (string_buffer_concat(b, p, 0, len)) goto fail; } JS_FreeValue(ctx, v); JS_FreeValue(ctx, str); return string_buffer_end(b); fail: string_buffer_free(b); fail3: JS_FreeValue(ctx, v); fail2: JS_FreeValue(ctx, str); fail1: return JS_EXCEPTION; }
O2
c
js_string_pad: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, %r13d movq %r8, %rbp movl %ecx, %r14d movq %rdi, %r12 callq 0x3de40 movq %rdx, %r15 pushq $0x6 popq %rdx cmpl $0x6, %r15d jne 0x6c682 xorl %ebx, %ebx jmp 0x6c6b6 movq %rax, %rbx movl %r13d, 0x10(%rsp) movq (%rbp), %rdx movq 0x8(%rbp), %rcx leaq 0x14(%rsp), %rsi movq %r12, %rdi callq 0x24eed testl %eax, %eax je 0x6c6c8 movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x1bbce xorl %ebx, %ebx pushq $0x6 popq %rdx movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl 0x4(%rbx), %eax movl 0x14(%rsp), %r9d movl %r9d, %r13d subl %eax, %r13d jle 0x6c7ec pushq $0x3 popq %r8 pushq $0x20 popq %rcx xorl %esi, %esi cmpl $0x2, %r14d jl 0x6c6ff movq 0x18(%rbp), %rdx xorl %esi, %esi cmpl $0x3, %edx jne 0x6c7a9 xorl %r14d, %r14d cmpl $0x40000000, %r9d # imm = 0x40000000 jb 0x6c71e leaq 0x1c424(%rip), %rsi # 0x88b36 movq %r12, %rdi xorl %eax, %eax callq 0x1e863 jmp 0x6c6a3 movl %ecx, %ebp movl %eax, 0xc(%rsp) movq %rsi, 0x18(%rsp) movq %r8, 0x20(%rsp) leaq 0x28(%rsp), %rsi movq %r12, %rdi movl %r9d, %edx callq 0x31bf2 testl %eax, %eax jne 0x6c890 cmpl $0x0, 0x10(%rsp) je 0x6c768 leaq 0x28(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movl 0xc(%rsp), %ecx callq 0x3d95d testl %eax, %eax jne 0x6c886 testq %r14, %r14 je 0x6c81a testl %r13d, %r13d jle 0x6c82d movq %r14, %rsi movl 0x4(%r14), %ebp movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl %eax, %ebp cmpl %ebp, %r13d cmovbl %r13d, %ebp leaq 0x28(%rsp), %rdi xorl %edx, %edx movl %ebp, %ecx callq 0x3d95d subl %ebp, %r13d testl %eax, %eax je 0x6c771 jmp 0x6c886 movl %r9d, %r14d movl %eax, 0xc(%rsp) movq 0x10(%rbp), %rsi movq %r12, %rdi callq 0x1ebec movq %rdx, %r8 cmpl $0x6, %r8d je 0x6c6a3 movq %rax, %rsi movq 0x4(%rax), %rax movl %eax, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpl $0x1, %ecx je 0x6c7f4 testl %ecx, %ecx jne 0x6c808 movq %r12, %rdi movq %r8, %rdx callq 0x1bbce movq %r15, %rdx jmp 0x6c6b6 testl %eax, %eax movl 0xc(%rsp), %eax movl %r14d, %r9d js 0x6c866 movzbl 0x18(%rsi), %ecx jmp 0x6c6ff movl %r14d, %r9d movq %rsi, %r14 movl 0xc(%rsp), %eax pushq $0x20 popq %rcx jmp 0x6c702 leaq 0x28(%rsp), %rdi movl %ebp, %esi movl %r13d, %edx callq 0x6d373 testl %eax, %eax jne 0x6c886 cmpl $0x0, 0x10(%rsp) je 0x6c86f movq %r12, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1bbce movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x1bbce leaq 0x28(%rsp), %rdi callq 0x30684 movq %rax, %rbx jmp 0x6c6b6 movzwl 0x18(%rsi), %ecx jmp 0x6c6ff leaq 0x28(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movl 0xc(%rsp), %ecx callq 0x3d95d testl %eax, %eax je 0x6c834 leaq 0x28(%rsp), %rdi callq 0x32ab1 movq %r12, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1bbce jmp 0x6c6a3
js_string_pad: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13d, r9d mov rbp, r8 mov r14d, ecx mov r12, rdi call JS_ToStringCheckObject mov r15, rdx push 6 pop rdx cmp r15d, 6 jnz short loc_6C682 xor ebx, ebx jmp short loc_6C6B6 loc_6C682: mov rbx, rax mov [rsp+78h+var_68], r13d mov rdx, [rbp+0] mov rcx, [rbp+8] lea rsi, [rsp+78h+var_64] mov rdi, r12 call JS_ToInt32Sat test eax, eax jz short loc_6C6C8 loc_6C6A3: mov rdi, r12 mov rsi, rbx mov rdx, r15 call JS_FreeValue xor ebx, ebx push 6 pop rdx loc_6C6B6: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6C6C8: mov eax, 7FFFFFFFh and eax, [rbx+4] mov r9d, [rsp+78h+var_64] mov r13d, r9d sub r13d, eax jle loc_6C7EC push 3 pop r8 push 20h ; ' ' pop rcx xor esi, esi cmp r14d, 2 jl short loc_6C6FF mov rdx, [rbp+18h] xor esi, esi cmp edx, 3 jnz loc_6C7A9 loc_6C6FF: xor r14d, r14d loc_6C702: cmp r9d, 40000000h jb short loc_6C71E lea rsi, aInvalidStringL; "invalid string length" mov rdi, r12 xor eax, eax call JS_ThrowRangeError jmp short loc_6C6A3 loc_6C71E: mov ebp, ecx mov [rsp+78h+var_6C], eax mov [rsp+78h+var_60], rsi mov [rsp+78h+var_58], r8 lea rsi, [rsp+78h+var_50] mov rdi, r12 mov edx, r9d call string_buffer_init test eax, eax jnz loc_6C890 cmp [rsp+78h+var_68], 0 jz short loc_6C768 lea rdi, [rsp+78h+var_50] mov rsi, rbx xor edx, edx mov ecx, [rsp+78h+var_6C] call string_buffer_concat test eax, eax jnz loc_6C886 loc_6C768: test r14, r14 jz loc_6C81A loc_6C771: test r13d, r13d jle loc_6C82D mov rsi, r14 mov ebp, [r14+4] mov eax, 7FFFFFFFh and ebp, eax cmp r13d, ebp cmovb ebp, r13d lea rdi, [rsp+78h+var_50] xor edx, edx mov ecx, ebp call string_buffer_concat sub r13d, ebp test eax, eax jz short loc_6C771 jmp loc_6C886 loc_6C7A9: mov r14d, r9d mov [rsp+78h+var_6C], eax mov rsi, [rbp+10h] mov rdi, r12 call JS_ToString mov r8, rdx cmp r8d, 6 jz loc_6C6A3 mov rsi, rax mov rax, [rax+4] mov ecx, eax and ecx, 7FFFFFFFh cmp ecx, 1 jz short loc_6C7F4 test ecx, ecx jnz short loc_6C808 mov rdi, r12 mov rdx, r8 call JS_FreeValue loc_6C7EC: mov rdx, r15 jmp loc_6C6B6 loc_6C7F4: test eax, eax mov eax, [rsp+78h+var_6C] mov r9d, r14d js short loc_6C866 movzx ecx, byte ptr [rsi+18h] jmp loc_6C6FF loc_6C808: mov r9d, r14d mov r14, rsi mov eax, [rsp+78h+var_6C] push 20h ; ' ' pop rcx jmp loc_6C702 loc_6C81A: lea rdi, [rsp+78h+var_50] mov esi, ebp mov edx, r13d call string_buffer_fill test eax, eax jnz short loc_6C886 loc_6C82D: cmp [rsp+78h+var_68], 0 jz short loc_6C86F loc_6C834: mov rdi, r12 mov rsi, [rsp+78h+var_60] mov rdx, [rsp+78h+var_58] call JS_FreeValue mov rdi, r12 mov rsi, rbx mov rdx, r15 call JS_FreeValue lea rdi, [rsp+78h+var_50] call string_buffer_end mov rbx, rax jmp loc_6C6B6 loc_6C866: movzx ecx, word ptr [rsi+18h] jmp loc_6C6FF loc_6C86F: lea rdi, [rsp+78h+var_50] mov rsi, rbx xor edx, edx mov ecx, [rsp+78h+var_6C] call string_buffer_concat test eax, eax jz short loc_6C834 loc_6C886: lea rdi, [rsp+78h+var_50] call string_buffer_free loc_6C890: mov rdi, r12 mov rsi, [rsp+78h+var_60] mov rdx, [rsp+78h+var_58] call JS_FreeValue jmp loc_6C6A3
long long js_string_pad( 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) { int v14; // r13d int v16; // r14d long long v17; // rax long long v18; // rdx long long v19; // r15 long long v20; // rbx long long v21; // rdx __m128 v22; // xmm4 __m128 v23; // xmm5 int v25; // eax long long v26; // r9 int v27; // r13d long long v28; // r8 long long v29; // rcx long long v30; // rsi long long v31; // r14 unsigned int v32; // ebp unsigned int v33; // ebp unsigned int v34; // r14d long long v35; // rax long long v36; // rax bool v37; // sf char v38; // [rsp+0h] [rbp-78h] unsigned int v39; // [rsp+Ch] [rbp-6Ch] int v40; // [rsp+Ch] [rbp-6Ch] int v41; // [rsp+10h] [rbp-68h] unsigned int v42; // [rsp+14h] [rbp-64h] BYREF long long v43; // [rsp+18h] [rbp-60h] long long v44; // [rsp+20h] [rbp-58h] long long v45[10]; // [rsp+28h] [rbp-50h] BYREF v14 = a6; v16 = a4; v17 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v19 = v18; if ( (_DWORD)v18 != 6 ) { v20 = v17; v41 = v14; if ( (unsigned int)JS_ToInt32Sat(a1, (long long)&v42, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) ) { LABEL_4: JS_FreeValue(a1, v20, v19); return 0LL; } v25 = *(_DWORD *)(v20 + 4) & 0x7FFFFFFF; v26 = v42; v27 = v42 - v25; if ( (int)v42 <= v25 ) return v20; v28 = 3LL; v29 = 32LL; v30 = 0LL; if ( v16 >= 2 ) { v21 = *(_QWORD *)(a5 + 24); v30 = 0LL; if ( (_DWORD)v21 != 3 ) { v34 = v42; v40 = *(_DWORD *)(v20 + 4) & 0x7FFFFFFF; v35 = JS_ToString(a1, *(_QWORD *)(a5 + 16), v21); v28 = v21; if ( (_DWORD)v21 == 6 ) goto LABEL_4; v30 = v35; v36 = *(_QWORD *)(v35 + 4); if ( (v36 & 0x7FFFFFFF) != 1 ) { if ( (v36 & 0x7FFFFFFF) == 0 ) { JS_FreeValue(a1, v30, v21); return v20; } v26 = v34; v31 = v30; v25 = v40; v29 = 32LL; LABEL_10: if ( (unsigned int)v26 >= 0x40000000 ) { JS_ThrowRangeError( a1, (long long)"invalid string length", v21, v29, v28, v26, a7, a8, a9, a10, v22, v23, a13, a14, v38); goto LABEL_4; } v32 = v29; v39 = v25; v43 = v30; v44 = v28; if ( (unsigned int)string_buffer_init(a1, (long long)v45, v26) ) { LABEL_35: JS_FreeValue(a1, v43, v44); goto LABEL_4; } if ( !v41 || !(unsigned int)string_buffer_concat((long long)v45, v20, 0, v39) ) { if ( v31 ) { while ( v27 > 0 ) { v33 = *(_DWORD *)(v31 + 4) & 0x7FFFFFFF; if ( v27 < v33 ) v33 = v27; v27 -= v33; if ( (unsigned int)string_buffer_concat((long long)v45, v31, 0, v33) ) goto LABEL_34; } LABEL_30: if ( v41 || !(unsigned int)string_buffer_concat((long long)v45, v20, 0, v39) ) { JS_FreeValue(a1, v43, v44); JS_FreeValue(a1, v20, v19); return string_buffer_end(v45); } goto LABEL_34; } if ( !(unsigned int)string_buffer_fill(v45, v32, (unsigned int)v27) ) goto LABEL_30; } LABEL_34: string_buffer_free(v45); goto LABEL_35; } v37 = (int)v36 < 0; v25 = v40; v26 = v34; if ( v37 ) v29 = *(unsigned __int16 *)(v30 + 24); else v29 = *(unsigned __int8 *)(v30 + 24); } } v31 = 0LL; goto LABEL_10; } return 0LL; }
js_string_pad: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13D,R9D MOV RBP,R8 MOV R14D,ECX MOV R12,RDI CALL 0x0013de40 MOV R15,RDX PUSH 0x6 POP RDX CMP R15D,0x6 JNZ 0x0016c682 XOR EBX,EBX JMP 0x0016c6b6 LAB_0016c682: MOV RBX,RAX MOV dword ptr [RSP + 0x10],R13D MOV RDX,qword ptr [RBP] MOV RCX,qword ptr [RBP + 0x8] LEA RSI,[RSP + 0x14] MOV RDI,R12 CALL 0x00124eed TEST EAX,EAX JZ 0x0016c6c8 LAB_0016c6a3: MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x0011bbce XOR EBX,EBX PUSH 0x6 POP RDX LAB_0016c6b6: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016c6c8: MOV EAX,0x7fffffff AND EAX,dword ptr [RBX + 0x4] MOV R9D,dword ptr [RSP + 0x14] MOV R13D,R9D SUB R13D,EAX JLE 0x0016c7ec PUSH 0x3 POP R8 PUSH 0x20 POP RCX XOR ESI,ESI CMP R14D,0x2 JL 0x0016c6ff MOV RDX,qword ptr [RBP + 0x18] XOR ESI,ESI CMP EDX,0x3 JNZ 0x0016c7a9 LAB_0016c6ff: XOR R14D,R14D LAB_0016c702: CMP R9D,0x40000000 JC 0x0016c71e LEA RSI,[0x188b36] MOV RDI,R12 XOR EAX,EAX CALL 0x0011e863 JMP 0x0016c6a3 LAB_0016c71e: MOV EBP,ECX MOV dword ptr [RSP + 0xc],EAX MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],R8 LEA RSI,[RSP + 0x28] MOV RDI,R12 MOV EDX,R9D CALL 0x00131bf2 TEST EAX,EAX JNZ 0x0016c890 CMP dword ptr [RSP + 0x10],0x0 JZ 0x0016c768 LEA RDI,[RSP + 0x28] MOV RSI,RBX XOR EDX,EDX MOV ECX,dword ptr [RSP + 0xc] CALL 0x0013d95d TEST EAX,EAX JNZ 0x0016c886 LAB_0016c768: TEST R14,R14 JZ 0x0016c81a LAB_0016c771: TEST R13D,R13D JLE 0x0016c82d MOV RSI,R14 MOV EBP,dword ptr [R14 + 0x4] MOV EAX,0x7fffffff AND EBP,EAX CMP R13D,EBP CMOVC EBP,R13D LEA RDI,[RSP + 0x28] XOR EDX,EDX MOV ECX,EBP CALL 0x0013d95d SUB R13D,EBP TEST EAX,EAX JZ 0x0016c771 JMP 0x0016c886 LAB_0016c7a9: MOV R14D,R9D MOV dword ptr [RSP + 0xc],EAX MOV RSI,qword ptr [RBP + 0x10] MOV RDI,R12 CALL 0x0011ebec MOV R8,RDX CMP R8D,0x6 JZ 0x0016c6a3 MOV RSI,RAX MOV RAX,qword ptr [RAX + 0x4] MOV ECX,EAX AND ECX,0x7fffffff CMP ECX,0x1 JZ 0x0016c7f4 TEST ECX,ECX JNZ 0x0016c808 MOV RDI,R12 MOV RDX,R8 CALL 0x0011bbce LAB_0016c7ec: MOV RDX,R15 JMP 0x0016c6b6 LAB_0016c7f4: TEST EAX,EAX MOV EAX,dword ptr [RSP + 0xc] MOV R9D,R14D JS 0x0016c866 MOVZX ECX,byte ptr [RSI + 0x18] JMP 0x0016c6ff LAB_0016c808: MOV R9D,R14D MOV R14,RSI MOV EAX,dword ptr [RSP + 0xc] PUSH 0x20 POP RCX JMP 0x0016c702 LAB_0016c81a: LEA RDI,[RSP + 0x28] MOV ESI,EBP MOV EDX,R13D CALL 0x0016d373 TEST EAX,EAX JNZ 0x0016c886 LAB_0016c82d: CMP dword ptr [RSP + 0x10],0x0 JZ 0x0016c86f LAB_0016c834: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011bbce MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x0011bbce LEA RDI,[RSP + 0x28] CALL 0x00130684 MOV RBX,RAX JMP 0x0016c6b6 LAB_0016c866: MOVZX ECX,word ptr [RSI + 0x18] JMP 0x0016c6ff LAB_0016c86f: LEA RDI,[RSP + 0x28] MOV RSI,RBX XOR EDX,EDX MOV ECX,dword ptr [RSP + 0xc] CALL 0x0013d95d TEST EAX,EAX JZ 0x0016c834 LAB_0016c886: LEA RDI,[RSP + 0x28] CALL 0x00132ab1 LAB_0016c890: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x0011bbce JMP 0x0016c6a3
long js_string_pad(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5,int param_6) { int iVar1; uint uVar2; long lVar3; ushort uVar4; uint uVar5; uint uVar6; long lVar7; int1 auVar8 [16]; int1 auVar9 [16]; uint local_64; int1 local_60 [16]; int1 local_50 [32]; auVar8 = JS_ToStringCheckObject(); lVar3 = auVar8._0_8_; if (auVar8._8_4_ == 6) { return 0; } iVar1 = JS_ToInt32Sat(param_1,&local_64,*param_5,param_5[1]); if (iVar1 != 0) goto LAB_0016c6a3; uVar2 = *(uint *)(lVar3 + 4) & 0x7fffffff; uVar6 = local_64 - uVar2; if (uVar6 == 0 || (int)local_64 < (int)uVar2) { return lVar3; } uVar4 = 0x20; auVar9 = ZEXT816(3) << 0x40; if ((param_4 < 2) || (auVar9 = ZEXT816(3) << 0x40, (int)param_5[3] == 3)) { LAB_0016c6ff: lVar7 = 0; } else { auVar9 = JS_ToString(param_1,param_5[2]); lVar7 = auVar9._0_8_; if (auVar9._8_4_ == 6) goto LAB_0016c6a3; uVar5 = (uint)*(ulong *)(lVar7 + 4); if ((uVar5 & 0x7fffffff) == 1) { if ((int)uVar5 < 0) { uVar4 = *(ushort *)(lVar7 + 0x18); } else { uVar4 = (ushort)*(byte *)(lVar7 + 0x18); } goto LAB_0016c6ff; } if ((*(ulong *)(lVar7 + 4) & 0x7fffffff) == 0) { JS_FreeValue(param_1,lVar7,auVar9._8_8_); return lVar3; } uVar4 = 0x20; } if (0x3fffffff < local_64) { JS_ThrowRangeError(param_1,"invalid string length"); goto LAB_0016c6a3; } local_60 = auVar9; iVar1 = string_buffer_init(param_1,local_50,local_64); if (iVar1 == 0) { if (param_6 == 0) { LAB_0016c768: if (lVar7 == 0) { iVar1 = string_buffer_fill(local_50,uVar4,uVar6); if (iVar1 == 0) { LAB_0016c82d: if (param_6 != 0) { LAB_0016c834: JS_FreeValue(param_1,local_60._0_8_,local_60._8_8_); JS_FreeValue(param_1,lVar3,auVar8._8_8_); lVar3 = string_buffer_end(local_50); return lVar3; } iVar1 = string_buffer_concat(local_50,lVar3,0,uVar2); if (iVar1 == 0) goto LAB_0016c834; } } else { do { if ((int)uVar6 < 1) goto LAB_0016c82d; uVar5 = *(uint *)(lVar7 + 4) & 0x7fffffff; if (uVar6 < uVar5) { uVar5 = uVar6; } iVar1 = string_buffer_concat(local_50,lVar7,0,uVar5); uVar6 = uVar6 - uVar5; } while (iVar1 == 0); } } else { iVar1 = string_buffer_concat(local_50,lVar3,0,uVar2); if (iVar1 == 0) goto LAB_0016c768; } string_buffer_free(local_50); } JS_FreeValue(param_1,local_60._0_8_,local_60._8_8_); LAB_0016c6a3: JS_FreeValue(param_1,lVar3,auVar8._8_8_); return 0; }
61,421
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x7ae37 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24520 movq %rax, %rbx movq %r14, %rdi callq 0x45c5c leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3c1e3(%rip), %rsi # 0xb703c leaq 0x10(%rsp), %rdi callq 0x7aeba movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x65cd0 xorl %ebp, %ebp leaq 0x840c4(%rip), %rsi # 0xfef48 leaq -0x38589(%rip), %rdx # 0x42902 movq %rbx, %rdi callq 0x25150 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x25478 testb %bpl, %bpl jne 0x7aeaa jmp 0x7aeb2 movq %rax, %r14 movq %rbx, %rdi callq 0x247a0 movq %r14, %rdi callq 0x251e0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_7AE37 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_7AE37: 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, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7AEAA jmp short loc_7AEB2 mov r14, rax loc_7AEAA: mov rdi, rbx; void * call ___cxa_free_exception loc_7AEB2: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { 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((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, (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); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x0017ae37 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0017ae37: PUSH 0x20 POP RDI CALL 0x00124520 MOV RBX,RAX MOV RDI,R14 CALL 0x00145c5c LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017ae52: LEA RSI,[0x1b703c] LEA RDI,[RSP + 0x10] CALL 0x0017aeba MOV BPL,0x1 LAB_0017ae66: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00165cd0 XOR EBP,EBP LEA RSI,[0x1fef48] LEA RDX,[0x142902] MOV RDI,RBX CALL 0x00125150
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017ae52 to 0017ae62 has its CatchHandler @ 0017aea7 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 0017ae66 to 0017ae92 has its CatchHandler @ 0017ae93 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
61,422
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int)
HansKristian-Work[P]pyroveil/compiler/compiler.cpp
std::vector<uint32_t> compileToSpirv(const std::string &name, const std::string &glsl, spv::ExecutionModel stage, uint32_t spirvVersion) { shaderc::Compiler compiler; shaderc::CompileOptions options; options.SetOptimizationLevel(shaderc_optimization_level_zero); options.SetGenerateDebugInfo(); shaderc_shader_kind kind; switch (stage) { case spv::ExecutionModelVertex: kind = shaderc_glsl_vertex_shader; break; case spv::ExecutionModelTessellationControl: kind = shaderc_glsl_tess_control_shader; break; case spv::ExecutionModelTessellationEvaluation: kind = shaderc_glsl_tess_evaluation_shader; break; case spv::ExecutionModelGeometry: kind = shaderc_glsl_geometry_shader; break; case spv::ExecutionModelFragment: kind = shaderc_glsl_fragment_shader; break; case spv::ExecutionModelGLCompute: kind = shaderc_glsl_compute_shader; break; case spv::ExecutionModelMeshEXT: kind = shaderc_glsl_mesh_shader; break; case spv::ExecutionModelTaskEXT: kind = shaderc_glsl_task_shader; break; case spv::ExecutionModelClosestHitKHR: kind = shaderc_glsl_closesthit_shader; break; case spv::ExecutionModelAnyHitKHR: kind = shaderc_glsl_anyhit_shader; break; case spv::ExecutionModelMissKHR: kind = shaderc_glsl_miss_shader; break; case spv::ExecutionModelIntersectionKHR: kind = shaderc_glsl_intersection_shader; break; case spv::ExecutionModelRayGenerationKHR: kind = shaderc_glsl_raygen_shader; break; case spv::ExecutionModelCallableKHR: kind = shaderc_glsl_callable_shader; break; default: return {}; } if (spirvVersion >= 0x10600) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_3); else if (spirvVersion >= 0x10500) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_2); else if (spirvVersion >= 0x10300) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); else options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_0); options.SetTargetSpirv(shaderc_spirv_version(spirvVersion)); options.SetSourceLanguage(shaderc_source_language_glsl); shaderc::SpvCompilationResult result; result = compiler.CompileGlslToSpv(glsl, kind, name.c_str(), options); if (result.GetCompilationStatus() != shaderc_compilation_status_success) { fprintf(stderr, "pyroveil: Failed to convert GLSL: %s\n", result.GetErrorMessage().c_str()); return {}; } return { result.cbegin(), result.cend() }; }
O0
cpp
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int): pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x98(%rbp) movq %rdi, %rax movq %rax, -0x90(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) leaq -0x28(%rbp), %rdi callq 0x1a40b0 leaq -0x38(%rbp), %rdi callq 0x1a40e0 jmp 0x1a3c33 leaq -0x38(%rbp), %rdi xorl %esi, %esi callq 0x1a4140 jmp 0x1a3c40 leaq -0x38(%rbp), %rdi callq 0x1a4170 jmp 0x1a3c4b movl -0x1c(%rbp), %eax movl %eax, -0x9c(%rbp) testl %eax, %eax je 0x1a3d6c jmp 0x1a3c5e movl -0x9c(%rbp), %eax subl $0x1, %eax je 0x1a3d78 jmp 0x1a3c6f movl -0x9c(%rbp), %eax subl $0x2, %eax je 0x1a3d84 jmp 0x1a3c80 movl -0x9c(%rbp), %eax subl $0x3, %eax je 0x1a3d90 jmp 0x1a3c91 movl -0x9c(%rbp), %eax subl $0x4, %eax je 0x1a3d9c jmp 0x1a3ca2 movl -0x9c(%rbp), %eax subl $0x5, %eax je 0x1a3da5 jmp 0x1a3cb3 movl -0x9c(%rbp), %eax subl $0x14c1, %eax # imm = 0x14C1 je 0x1a3de4 jmp 0x1a3cc6 movl -0x9c(%rbp), %eax subl $0x14c2, %eax # imm = 0x14C2 je 0x1a3ddb jmp 0x1a3cd9 movl -0x9c(%rbp), %eax subl $0x14c3, %eax # imm = 0x14C3 je 0x1a3dc9 jmp 0x1a3cec movl -0x9c(%rbp), %eax subl $0x14c4, %eax # imm = 0x14C4 je 0x1a3dc0 jmp 0x1a3cff movl -0x9c(%rbp), %eax subl $0x14c5, %eax # imm = 0x14C5 je 0x1a3dd2 jmp 0x1a3d12 movl -0x9c(%rbp), %eax subl $0x14c6, %eax # imm = 0x14C6 je 0x1a3ded jmp 0x1a3d25 movl -0x9c(%rbp), %eax subl $0x14f4, %eax # imm = 0x14F4 je 0x1a3db7 jmp 0x1a3d38 movl -0x9c(%rbp), %eax subl $0x14f5, %eax # imm = 0x14F5 je 0x1a3dae jmp 0x1a3df6 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x1a4098 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x1a408f movl $0x0, -0x48(%rbp) jmp 0x1a3e21 movl $0x4, -0x48(%rbp) jmp 0x1a3e21 movl $0x5, -0x48(%rbp) jmp 0x1a3e21 movl $0x3, -0x48(%rbp) jmp 0x1a3e21 movl $0x1, -0x48(%rbp) jmp 0x1a3e21 movl $0x2, -0x48(%rbp) jmp 0x1a3e21 movl $0x1b, -0x48(%rbp) jmp 0x1a3e21 movl $0x1a, -0x48(%rbp) jmp 0x1a3e21 movl $0x10, -0x48(%rbp) jmp 0x1a3e21 movl $0xf, -0x48(%rbp) jmp 0x1a3e21 movl $0x11, -0x48(%rbp) jmp 0x1a3e21 movl $0x12, -0x48(%rbp) jmp 0x1a3e21 movl $0xe, -0x48(%rbp) jmp 0x1a3e21 movl $0x13, -0x48(%rbp) jmp 0x1a3e21 movq -0x98(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x16b250 movq -0x98(%rbp), %rdi callq 0x17deb0 movl $0x1, -0x4c(%rbp) jmp 0x1a406d cmpl $0x10600, -0x20(%rbp) # imm = 0x10600 jb 0x1a3e3e leaq -0x38(%rbp), %rdi xorl %esi, %esi movl $0x403000, %edx # imm = 0x403000 callq 0x1a41b0 jmp 0x1a3e3c jmp 0x1a3e90 cmpl $0x10500, -0x20(%rbp) # imm = 0x10500 jb 0x1a3e5b leaq -0x38(%rbp), %rdi xorl %esi, %esi movl $0x402000, %edx # imm = 0x402000 callq 0x1a41b0 jmp 0x1a3e59 jmp 0x1a3e8e cmpl $0x10300, -0x20(%rbp) # imm = 0x10300 jb 0x1a3e78 leaq -0x38(%rbp), %rdi xorl %esi, %esi movl $0x401000, %edx # imm = 0x401000 callq 0x1a41b0 jmp 0x1a3e76 jmp 0x1a3e8c leaq -0x38(%rbp), %rdi xorl %esi, %esi movl $0x400000, %edx # imm = 0x400000 callq 0x1a41b0 jmp 0x1a3e8a jmp 0x1a3e8c jmp 0x1a3e8e jmp 0x1a3e90 movl -0x20(%rbp), %esi leaq -0x38(%rbp), %rdi callq 0x1a41e0 jmp 0x1a3e9e leaq -0x38(%rbp), %rdi xorl %esi, %esi callq 0x1a4210 jmp 0x1a3eab leaq -0x58(%rbp), %rdi callq 0x1a4240 jmp 0x1a3eb6 movq -0x18(%rbp), %rax movq %rax, -0xa8(%rbp) movl -0x48(%rbp), %eax movl %eax, -0xa0(%rbp) movq -0x10(%rbp), %rdi callq 0x166a50 movq -0xa8(%rbp), %rdx movl -0xa0(%rbp), %ecx movq %rax, %r8 leaq -0x60(%rbp), %rdi leaq -0x28(%rbp), %rsi leaq -0x38(%rbp), %r9 callq 0x1a4260 jmp 0x1a3ef6 leaq -0x58(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x1a42e0 jmp 0x1a3f05 leaq -0x60(%rbp), %rdi callq 0x1a4330 leaq -0x58(%rbp), %rdi callq 0x1a4360 movl %eax, -0xac(%rbp) jmp 0x1a3f1f movl -0xac(%rbp), %eax cmpl $0x0, %eax je 0x1a3fce movq 0xb3c01b(%rip), %rax # 0xcdff50 movq (%rax), %rax movq %rax, -0xb8(%rbp) leaq -0x80(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x1a43a0 jmp 0x1a3f4e leaq -0x80(%rbp), %rdi callq 0x166a50 movq -0xb8(%rbp), %rdi movq %rax, %rdx leaq 0x74a1b0(%rip), %rsi # 0x8ee118 movb $0x0, %al callq 0x1685c0 leaq -0x80(%rbp), %rdi callq 0x17f4c0 movq -0x98(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x16b250 movq -0x98(%rbp), %rdi callq 0x17deb0 movl $0x1, -0x4c(%rbp) jmp 0x1a4057 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x1a4062 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x60(%rbp), %rdi callq 0x1a4330 jmp 0x1a4062 leaq -0x58(%rbp), %rdi callq 0x1a4480 movq %rax, -0xc0(%rbp) jmp 0x1a3fe0 leaq -0x58(%rbp), %rdi callq 0x1a44c0 movq %rax, -0xc8(%rbp) jmp 0x1a3ff2 leaq -0x81(%rbp), %rdi movq %rdi, -0xd0(%rbp) callq 0x170880 movq -0x98(%rbp), %rdi movq -0xc0(%rbp), %rsi movq -0xc8(%rbp), %rdx movq -0xd0(%rbp), %rcx callq 0x1736c0 jmp 0x1a4028 leaq -0x81(%rbp), %rdi callq 0x1674d0 movl $0x1, -0x4c(%rbp) jmp 0x1a4057 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x81(%rbp), %rdi callq 0x1674d0 jmp 0x1a4062 leaq -0x58(%rbp), %rdi callq 0x1a4330 jmp 0x1a406d leaq -0x58(%rbp), %rdi callq 0x1a4330 jmp 0x1a408f leaq -0x38(%rbp), %rdi callq 0x1a45c0 leaq -0x28(%rbp), %rdi callq 0x1a4600 movq -0x90(%rbp), %rax addq $0xd0, %rsp popq %rbp retq leaq -0x38(%rbp), %rdi callq 0x1a45c0 leaq -0x28(%rbp), %rdi callq 0x1a4600 movq -0x40(%rbp), %rdi callq 0x171c30 nopw (%rax,%rax)
_Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_98], rdi mov rax, rdi mov [rbp+var_90], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_20], r8d lea rdi, [rbp+var_28]; this call _ZN7shaderc8CompilerC2Ev; shaderc::Compiler::Compiler(void) lea rdi, [rbp+var_38]; this call _ZN7shaderc14CompileOptionsC2Ev; shaderc::CompileOptions::CompileOptions(void) jmp short $+2 loc_1A3C33: lea rdi, [rbp+var_38] xor esi, esi call _ZN7shaderc14CompileOptions20SetOptimizationLevelE26shaderc_optimization_level; shaderc::CompileOptions::SetOptimizationLevel(shaderc_optimization_level) jmp short $+2 loc_1A3C40: lea rdi, [rbp+var_38]; this call _ZN7shaderc14CompileOptions20SetGenerateDebugInfoEv; shaderc::CompileOptions::SetGenerateDebugInfo(void) jmp short $+2 loc_1A3C4B: mov eax, [rbp+var_1C] mov [rbp+var_9C], eax test eax, eax jz loc_1A3D6C jmp short $+2 loc_1A3C5E: mov eax, [rbp+var_9C] sub eax, 1 jz loc_1A3D78 jmp short $+2 loc_1A3C6F: mov eax, [rbp+var_9C] sub eax, 2 jz loc_1A3D84 jmp short $+2 loc_1A3C80: mov eax, [rbp+var_9C] sub eax, 3 jz loc_1A3D90 jmp short $+2 loc_1A3C91: mov eax, [rbp+var_9C] sub eax, 4 jz loc_1A3D9C jmp short $+2 loc_1A3CA2: mov eax, [rbp+var_9C] sub eax, 5 jz loc_1A3DA5 jmp short $+2 loc_1A3CB3: mov eax, [rbp+var_9C] sub eax, 14C1h jz loc_1A3DE4 jmp short $+2 loc_1A3CC6: mov eax, [rbp+var_9C] sub eax, 14C2h jz loc_1A3DDB jmp short $+2 loc_1A3CD9: mov eax, [rbp+var_9C] sub eax, 14C3h jz loc_1A3DC9 jmp short $+2 loc_1A3CEC: mov eax, [rbp+var_9C] sub eax, 14C4h jz loc_1A3DC0 jmp short $+2 loc_1A3CFF: mov eax, [rbp+var_9C] sub eax, 14C5h jz loc_1A3DD2 jmp short $+2 loc_1A3D12: mov eax, [rbp+var_9C] sub eax, 14C6h jz loc_1A3DED jmp short $+2 loc_1A3D25: mov eax, [rbp+var_9C] sub eax, 14F4h jz loc_1A3DB7 jmp short $+2 loc_1A3D38: mov eax, [rbp+var_9C] sub eax, 14F5h jz short loc_1A3DAE jmp loc_1A3DF6 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_1A4098 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_1A408F loc_1A3D6C: mov [rbp+var_48], 0 jmp loc_1A3E21 loc_1A3D78: mov [rbp+var_48], 4 jmp loc_1A3E21 loc_1A3D84: mov [rbp+var_48], 5 jmp loc_1A3E21 loc_1A3D90: mov [rbp+var_48], 3 jmp loc_1A3E21 loc_1A3D9C: mov [rbp+var_48], 1 jmp short loc_1A3E21 loc_1A3DA5: mov [rbp+var_48], 2 jmp short loc_1A3E21 loc_1A3DAE: mov [rbp+var_48], 1Bh jmp short loc_1A3E21 loc_1A3DB7: mov [rbp+var_48], 1Ah jmp short loc_1A3E21 loc_1A3DC0: mov [rbp+var_48], 10h jmp short loc_1A3E21 loc_1A3DC9: mov [rbp+var_48], 0Fh jmp short loc_1A3E21 loc_1A3DD2: mov [rbp+var_48], 11h jmp short loc_1A3E21 loc_1A3DDB: mov [rbp+var_48], 12h jmp short loc_1A3E21 loc_1A3DE4: mov [rbp+var_48], 0Eh jmp short loc_1A3E21 loc_1A3DED: mov [rbp+var_48], 13h jmp short loc_1A3E21 loc_1A3DF6: mov rdi, [rbp+var_98] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_98] call __ZNSt6vectorIjSaIjEEC2Ev; std::vector<uint>::vector(void) mov [rbp+var_4C], 1 jmp loc_1A406D loc_1A3E21: cmp [rbp+var_20], 10600h jb short loc_1A3E3E lea rdi, [rbp+var_38] xor esi, esi mov edx, 403000h call _ZN7shaderc14CompileOptions20SetTargetEnvironmentE18shaderc_target_envj; shaderc::CompileOptions::SetTargetEnvironment(shaderc_target_env,uint) jmp short $+2 loc_1A3E3C: jmp short loc_1A3E90 loc_1A3E3E: cmp [rbp+var_20], offset stru_10500 jb short loc_1A3E5B lea rdi, [rbp+var_38] xor esi, esi mov edx, offset _ZNSt8__detail21_Hash_node_value_baseISt4pairIKjmEE4_M_vEv; std::__detail::_Hash_node_value_base<std::pair<uint const,ulong>>::_M_v(void) call _ZN7shaderc14CompileOptions20SetTargetEnvironmentE18shaderc_target_envj; shaderc::CompileOptions::SetTargetEnvironment(shaderc_target_env,uint) jmp short $+2 loc_1A3E59: jmp short loc_1A3E8E loc_1A3E5B: cmp [rbp+var_20], 10300h jb short loc_1A3E78 lea rdi, [rbp+var_38] xor esi, esi mov edx, 401000h call _ZN7shaderc14CompileOptions20SetTargetEnvironmentE18shaderc_target_envj; shaderc::CompileOptions::SetTargetEnvironment(shaderc_target_env,uint) jmp short $+2 loc_1A3E76: jmp short loc_1A3E8C loc_1A3E78: lea rdi, [rbp+var_38] xor esi, esi mov edx, 400000h call _ZN7shaderc14CompileOptions20SetTargetEnvironmentE18shaderc_target_envj; shaderc::CompileOptions::SetTargetEnvironment(shaderc_target_env,uint) jmp short $+2 loc_1A3E8A: jmp short $+2 loc_1A3E8C: jmp short $+2 loc_1A3E8E: jmp short $+2 loc_1A3E90: mov esi, [rbp+var_20] lea rdi, [rbp+var_38] call _ZN7shaderc14CompileOptions14SetTargetSpirvE21shaderc_spirv_version; shaderc::CompileOptions::SetTargetSpirv(shaderc_spirv_version) jmp short $+2 loc_1A3E9E: lea rdi, [rbp+var_38] xor esi, esi call _ZN7shaderc14CompileOptions17SetSourceLanguageE23shaderc_source_language; shaderc::CompileOptions::SetSourceLanguage(shaderc_source_language) jmp short $+2 loc_1A3EAB: lea rdi, [rbp+var_58] call _ZN7shaderc17CompilationResultIjEC2Ev; shaderc::CompilationResult<uint>::CompilationResult(void) jmp short $+2 loc_1A3EB6: mov rax, [rbp+var_18] mov [rbp+var_A8], rax mov eax, [rbp+var_48] mov [rbp+var_A0], eax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdx, [rbp+var_A8] mov ecx, [rbp+var_A0] mov r8, rax lea rdi, [rbp+var_60] lea rsi, [rbp+var_28] lea r9, [rbp+var_38] call _ZNK7shaderc8Compiler16CompileGlslToSpvERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19shaderc_shader_kindPKcRKNS_14CompileOptionsE; shaderc::Compiler::CompileGlslToSpv(std::string const&,shaderc_shader_kind,char const*,shaderc::CompileOptions const&) jmp short $+2 loc_1A3EF6: lea rdi, [rbp+var_58] lea rsi, [rbp+var_60] call _ZN7shaderc17CompilationResultIjEaSEOS1_; shaderc::CompilationResult<uint>::operator=(shaderc::CompilationResult<uint>&&) jmp short $+2 loc_1A3F05: lea rdi, [rbp+var_60] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() lea rdi, [rbp+var_58] call _ZNK7shaderc17CompilationResultIjE20GetCompilationStatusEv; shaderc::CompilationResult<uint>::GetCompilationStatus(void) mov [rbp+var_AC], eax jmp short $+2 loc_1A3F1F: mov eax, [rbp+var_AC] cmp eax, 0 jz loc_1A3FCE mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_B8], rax lea rdi, [rbp+var_80] lea rsi, [rbp+var_58] call _ZNK7shaderc17CompilationResultIjE15GetErrorMessageB5cxx11Ev; shaderc::CompilationResult<uint>::GetErrorMessage(void) jmp short $+2 loc_1A3F4E: lea rdi, [rbp+var_80] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rbp+var_B8] mov rdx, rax lea rsi, aPyroveilFailed_4; "pyroveil: Failed to convert GLSL: %s\n" mov al, 0 call _fprintf lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_98] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_98] call __ZNSt6vectorIjSaIjEEC2Ev; std::vector<uint>::vector(void) mov [rbp+var_4C], 1 jmp loc_1A4057 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_1A4062 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_60] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() jmp loc_1A4062 loc_1A3FCE: lea rdi, [rbp+var_58] call _ZNK7shaderc17CompilationResultIjE6cbeginEv; shaderc::CompilationResult<uint>::cbegin(void) mov [rbp+var_C0], rax jmp short $+2 loc_1A3FE0: lea rdi, [rbp+var_58] call _ZNK7shaderc17CompilationResultIjE4cendEv; shaderc::CompilationResult<uint>::cend(void) mov [rbp+var_C8], rax jmp short $+2 loc_1A3FF2: lea rdi, [rbp+var_81] mov [rbp+var_D0], rdi call __ZNSaIjEC2Ev; std::allocator<uint>::allocator(void) mov rdi, [rbp+var_98] mov rsi, [rbp+var_C0] mov rdx, [rbp+var_C8] mov rcx, [rbp+var_D0] call __ZNSt6vectorIjSaIjEEC2IPKjvEET_S5_RKS0_; std::vector<uint>::vector<uint const*,void>(uint const*,uint const*,std::allocator<uint> const&) jmp short $+2 loc_1A4028: lea rdi, [rbp+var_81] call __ZNSaIjED2Ev; std::allocator<uint>::~allocator() mov [rbp+var_4C], 1 jmp short loc_1A4057 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_81] call __ZNSaIjED2Ev; std::allocator<uint>::~allocator() jmp short loc_1A4062 loc_1A4057: lea rdi, [rbp+var_58] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() jmp short loc_1A406D loc_1A4062: lea rdi, [rbp+var_58] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() jmp short loc_1A408F loc_1A406D: lea rdi, [rbp+var_38]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() lea rdi, [rbp+var_28]; this call _ZN7shaderc8CompilerD2Ev; shaderc::Compiler::~Compiler() mov rax, [rbp+var_90] add rsp, 0D0h pop rbp retn loc_1A408F: lea rdi, [rbp+var_38]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() loc_1A4098: lea rdi, [rbp+var_28]; this call _ZN7shaderc8CompilerD2Ev; shaderc::Compiler::~Compiler() mov rdi, [rbp+var_40] call __Unwind_Resume
long long compileToSpirv(long long a1, long long a2, long long a3, int a4, unsigned int a5) { long long v5; // rax const char *v6; // rax long long v8; // [rsp+8h] [rbp-C8h] long long v9; // [rsp+10h] [rbp-C0h] long long v10; // [rsp+18h] [rbp-B8h] long long v11; // [rsp+28h] [rbp-A8h] unsigned int v12; // [rsp+30h] [rbp-A0h] char v13; // [rsp+4Fh] [rbp-81h] BYREF _BYTE v14[32]; // [rsp+50h] [rbp-80h] BYREF _BYTE v15[8]; // [rsp+70h] [rbp-60h] BYREF _BYTE v16[12]; // [rsp+78h] [rbp-58h] BYREF int v17; // [rsp+84h] [rbp-4Ch] int v18; // [rsp+88h] [rbp-48h] _BYTE v19[16]; // [rsp+98h] [rbp-38h] BYREF _BYTE v20[8]; // [rsp+A8h] [rbp-28h] BYREF unsigned int v21; // [rsp+B0h] [rbp-20h] int v22; // [rsp+B4h] [rbp-1Ch] long long v23; // [rsp+B8h] [rbp-18h] long long v24; // [rsp+C0h] [rbp-10h] long long v25; // [rsp+C8h] [rbp-8h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; shaderc::Compiler::Compiler((shaderc::Compiler *)v20); shaderc::CompileOptions::CompileOptions((shaderc::CompileOptions *)v19); shaderc::CompileOptions::SetOptimizationLevel(v19, 0LL); shaderc::CompileOptions::SetGenerateDebugInfo((shaderc::CompileOptions *)v19); if ( v22 ) { switch ( v22 ) { case 1: v18 = 4; break; case 2: v18 = 5; break; case 3: v18 = 3; break; case 4: v18 = 1; break; case 5: v18 = 2; break; case 5313: v18 = 14; break; case 5314: v18 = 18; break; case 5315: v18 = 15; break; case 5316: v18 = 16; break; case 5317: v18 = 17; break; case 5318: v18 = 19; break; case 5364: v18 = 26; break; case 5365: v18 = 27; break; default: memset(a1, 0LL, 24LL); std::vector<unsigned int>::vector(a1); v17 = 1; goto LABEL_41; } } else { v18 = 0; } if ( v21 < 0x10600 ) { if ( v21 < (unsigned int)&stru_10500 ) { if ( v21 < 0x10300 ) shaderc::CompileOptions::SetTargetEnvironment(v19, 0LL, 0x400000LL); else shaderc::CompileOptions::SetTargetEnvironment(v19, 0LL, 4198400LL); } else { shaderc::CompileOptions::SetTargetEnvironment( v19, 0LL, std::__detail::_Hash_node_value_base<std::pair<unsigned int const,unsigned long>>::_M_v); } } else { shaderc::CompileOptions::SetTargetEnvironment(v19, 0LL, 4206592LL); } shaderc::CompileOptions::SetTargetSpirv(v19, v21); shaderc::CompileOptions::SetSourceLanguage(v19, 0LL); shaderc::CompilationResult<unsigned int>::CompilationResult(v16); v11 = v23; v12 = v18; v5 = std::string::c_str(v24); shaderc::Compiler::CompileGlslToSpv(v15, v20, v11, v12, v5, v19); shaderc::CompilationResult<unsigned int>::operator=(v16, v15); shaderc::CompilationResult<unsigned int>::~CompilationResult(v15); if ( (unsigned int)shaderc::CompilationResult<unsigned int>::GetCompilationStatus(v16) ) { v10 = stderr; shaderc::CompilationResult<unsigned int>::GetErrorMessage[abi:cxx11](v14, v16); v6 = (const char *)std::string::c_str(v14); fprintf(v10, "pyroveil: Failed to convert GLSL: %s\n", v6); std::string::~string(v14); memset(a1, 0LL, 24LL); std::vector<unsigned int>::vector(a1); } else { v9 = shaderc::CompilationResult<unsigned int>::cbegin(v16); v8 = shaderc::CompilationResult<unsigned int>::cend(v16); std::allocator<unsigned int>::allocator(); std::vector<unsigned int>::vector<unsigned int const*,void>(a1, v9, v8, &v13); std::allocator<unsigned int>::~allocator(&v13); } v17 = 1; shaderc::CompilationResult<unsigned int>::~CompilationResult(v16); LABEL_41: shaderc::CompileOptions::~CompileOptions((shaderc::CompileOptions *)v19); shaderc::Compiler::~Compiler((shaderc::Compiler *)v20); return a1; }
61,423
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int)
HansKristian-Work[P]pyroveil/compiler/compiler.cpp
std::vector<uint32_t> compileToSpirv(const std::string &name, const std::string &glsl, spv::ExecutionModel stage, uint32_t spirvVersion) { shaderc::Compiler compiler; shaderc::CompileOptions options; options.SetOptimizationLevel(shaderc_optimization_level_zero); options.SetGenerateDebugInfo(); shaderc_shader_kind kind; switch (stage) { case spv::ExecutionModelVertex: kind = shaderc_glsl_vertex_shader; break; case spv::ExecutionModelTessellationControl: kind = shaderc_glsl_tess_control_shader; break; case spv::ExecutionModelTessellationEvaluation: kind = shaderc_glsl_tess_evaluation_shader; break; case spv::ExecutionModelGeometry: kind = shaderc_glsl_geometry_shader; break; case spv::ExecutionModelFragment: kind = shaderc_glsl_fragment_shader; break; case spv::ExecutionModelGLCompute: kind = shaderc_glsl_compute_shader; break; case spv::ExecutionModelMeshEXT: kind = shaderc_glsl_mesh_shader; break; case spv::ExecutionModelTaskEXT: kind = shaderc_glsl_task_shader; break; case spv::ExecutionModelClosestHitKHR: kind = shaderc_glsl_closesthit_shader; break; case spv::ExecutionModelAnyHitKHR: kind = shaderc_glsl_anyhit_shader; break; case spv::ExecutionModelMissKHR: kind = shaderc_glsl_miss_shader; break; case spv::ExecutionModelIntersectionKHR: kind = shaderc_glsl_intersection_shader; break; case spv::ExecutionModelRayGenerationKHR: kind = shaderc_glsl_raygen_shader; break; case spv::ExecutionModelCallableKHR: kind = shaderc_glsl_callable_shader; break; default: return {}; } if (spirvVersion >= 0x10600) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_3); else if (spirvVersion >= 0x10500) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_2); else if (spirvVersion >= 0x10300) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); else options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_0); options.SetTargetSpirv(shaderc_spirv_version(spirvVersion)); options.SetSourceLanguage(shaderc_source_language_glsl); shaderc::SpvCompilationResult result; result = compiler.CompileGlslToSpv(glsl, kind, name.c_str(), options); if (result.GetCompilationStatus() != shaderc_compilation_status_success) { fprintf(stderr, "pyroveil: Failed to convert GLSL: %s\n", result.GetErrorMessage().c_str()); return {}; } return { result.cbegin(), result.cend() }; }
O1
cpp
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r8d, %ebx movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 callq 0x11d220 movq %rax, -0x48(%rbp) movq $0x0, -0x38(%rbp) callq 0x11cb54 movq %rax, -0x40(%rbp) movq %rax, %rdi xorl %esi, %esi callq 0x11cd40 movq -0x40(%rbp), %rdi callq 0x11cd37 cmpl $0x14c0, %r13d # imm = 0x14C0 jle 0x92169 leal -0x14c1(%r13), %eax cmpl $0x5, %eax ja 0x9218e leaq 0x355cfb(%rip), %rcx # 0x3e7e50 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0xe, %r13d jmp 0x921f2 cmpl $0x5, %r13d ja 0x92303 movl %r13d, %eax leaq 0x355cbb(%rip), %rcx # 0x3e7e38 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x4, %r13d jmp 0x921f2 cmpl $0x14f4, %r13d # imm = 0x14F4 je 0x921d4 cmpl $0x14f5, %r13d # imm = 0x14F5 jne 0x92303 movl $0x1b, %r13d jmp 0x921f2 movl $0x11, %r13d jmp 0x921f2 movl $0xf, %r13d jmp 0x921f2 movl $0x10, %r13d jmp 0x921f2 movl $0x12, %r13d jmp 0x921f2 movl $0x5, %r13d jmp 0x921f2 movl $0x1a, %r13d jmp 0x921f2 movl $0x13, %r13d jmp 0x921f2 movl $0x2, %r13d jmp 0x921f2 movl $0x1, %r13d movl $0x403000, %edx # imm = 0x403000 cmpl $0x105ff, %ebx # imm = 0x105FF ja 0x92220 movl $0x402000, %edx # imm = 0x402000 cmpl $0x104ff, %ebx # imm = 0x104FF ja 0x92220 xorl %edx, %edx cmpl $0x10300, %ebx # imm = 0x10300 setae %dl shll $0xc, %edx orl $0x400000, %edx # imm = 0x400000 movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x11cd93 movq -0x40(%rbp), %rdi movl %ebx, %esi callq 0x11ce2c movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x11cd24 movq $0x0, -0x30(%rbp) movq (%r12), %r8 movq (%r15), %rsi movq 0x8(%r15), %rdx movq -0x40(%rbp), %rax movq %rax, (%rsp) leaq 0x39e11f(%rip), %r9 # 0x430382 movq -0x48(%rbp), %r12 movq %r12, %rdi movl %r13d, %ecx callq 0x11d2ad movq %rax, %r15 movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0x92283 callq 0x11db9a movq %r15, -0x30(%rbp) xorl %edi, %edi callq 0x11db9a movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0x9229e callq 0x11dbab jmp 0x922a3 movl $0x4, %eax testl %eax, %eax jne 0x92318 movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0x922ba callq 0x11db94 movq %rax, %rbx jmp 0x922bc xorl %ebx, %ebx leaq -0x30(%rbp), %rdi callq 0x923f8 leaq -0x68(%rbp), %rcx movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x7f010 movq -0x30(%rbp), %rdi callq 0x11db9a leaq -0x40(%rbp), %rdi callq 0x9246c movq %r12, %rdi callq 0x11d290 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorps %xmm0, %xmm0 movups %xmm0, (%r14) movq $0x0, 0x10(%r14) movq -0x48(%rbp), %r12 jmp 0x922e0 movq 0x54fc71(%rip), %rax # 0x5e1f90 movq (%rax), %rbx leaq -0x68(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x923ae leaq -0x68(%rbp), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x814cc jmp 0x922d7 movq %rax, %rbx movq %r15, %rdi callq 0x11db9a jmp 0x9237c jmp 0x923a6 jmp 0x92379 jmp 0x92379 jmp 0x923a6 jmp 0x923a6 jmp 0x92379 jmp 0x923a6 movq %rax, %rbx movq -0x38(%rbp), %rdi testq %rdi, %rdi je 0x9236d movq (%rdi), %rax callq *0x18(%rax) movq $0x0, -0x38(%rbp) jmp 0x92395 jmp 0x92389 movq %rax, %rbx movq -0x30(%rbp), %rdi callq 0x11db9a jmp 0x9238c jmp 0x923a6 movq %rax, %rbx leaq -0x40(%rbp), %rdi callq 0x9246c movq -0x48(%rbp), %rdi callq 0x11d290 movq %rbx, %rdi callq 0x809f0 movq %rax, %rdi callq 0x8c94e
_Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebx, r8d mov r13d, ecx mov r15, rdx mov r12, rsi mov r14, rdi call shaderc_compiler_initialize mov [rbp+var_48], rax mov [rbp+var_38], 0 call shaderc_compile_options_initialize mov [rbp+var_40], rax mov rdi, rax xor esi, esi call shaderc_compile_options_set_optimization_level mov rdi, [rbp+var_40] call shaderc_compile_options_set_generate_debug_info cmp r13d, 14C0h jle short loc_92169 lea eax, [r13-14C1h]; switch 6 cases cmp eax, 5 ja short def_9215C; jumptable 000000000009215C default case lea rcx, jpt_9215C movsxd rax, ds:(jpt_9215C - 3E7E50h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9215E: mov r13d, 0Eh; jumptable 000000000009215C case 5313 jmp loc_921F2; jumptable 0000000000092184 cases 0,3 loc_92169: cmp r13d, 5; switch 6 cases ja def_92184; jumptable 0000000000092184 default case mov eax, r13d lea rcx, jpt_92184 movsxd rax, ds:(jpt_92184 - 3E7E38h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_92186: mov r13d, 4; jumptable 0000000000092184 case 1 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 def_9215C: cmp r13d, 14F4h; jumptable 000000000009215C default case jz short loc_921D4 cmp r13d, 14F5h jnz def_92184; jumptable 0000000000092184 default case mov r13d, 1Bh jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921AC: mov r13d, 11h; jumptable 000000000009215C case 5317 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921B4: mov r13d, 0Fh; jumptable 000000000009215C case 5315 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921BC: mov r13d, 10h; jumptable 000000000009215C case 5316 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921C4: mov r13d, 12h; jumptable 000000000009215C case 5314 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921CC: mov r13d, 5; jumptable 0000000000092184 case 2 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921D4: mov r13d, 1Ah jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921DC: mov r13d, 13h; jumptable 000000000009215C case 5318 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921E4: mov r13d, 2; jumptable 0000000000092184 case 5 jmp short loc_921F2; jumptable 0000000000092184 cases 0,3 loc_921EC: mov r13d, 1; jumptable 0000000000092184 case 4 loc_921F2: mov edx, 403000h; jumptable 0000000000092184 cases 0,3 cmp ebx, 105FFh ja short loc_92220 mov edx, 402000h cmp ebx, 104FFh ja short loc_92220 xor edx, edx cmp ebx, 10300h setnb dl shl edx, 0Ch or edx, 400000h loc_92220: mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_target_env mov rdi, [rbp+var_40] mov esi, ebx call shaderc_compile_options_set_target_spirv mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_source_language mov [rbp+var_30], 0 mov r8, [r12] mov rsi, [r15] mov rdx, [r15+8] mov rax, [rbp+var_40] mov [rsp+70h+var_70], rax lea r9, aInvalidDomain+0Ah; "main" mov r12, [rbp+var_48] mov rdi, r12 mov ecx, r13d call shaderc_compile_into_spv mov r15, rax mov rdi, [rbp+var_30] test rdi, rdi jz short loc_92283 call shaderc_result_release loc_92283: mov [rbp+var_30], r15 xor edi, edi call shaderc_result_release mov rdi, [rbp+var_30] test rdi, rdi jz short loc_9229E call shaderc_result_get_compilation_status jmp short loc_922A3 loc_9229E: mov eax, 4 loc_922A3: test eax, eax jnz short loc_92318 mov rdi, [rbp+var_30] test rdi, rdi jz short loc_922BA call shaderc_result_get_bytes mov rbx, rax jmp short loc_922BC loc_922BA: xor ebx, ebx loc_922BC: lea rdi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE4cendEv; shaderc::CompilationResult<uint>::cend(void) lea rcx, [rbp+var_68] mov rdi, r14 mov rsi, rbx mov rdx, rax call __ZNSt6vectorIjSaIjEEC2IPKjvEET_S5_RKS0_; std::vector<uint>::vector<uint const*,void>(uint const*,uint const*,std::allocator<uint> const&) loc_922D7: mov rdi, [rbp+var_30] call shaderc_result_release loc_922E0: lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() mov rdi, r12; void * call shaderc_compiler_release mov rax, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn def_92184: xorps xmm0, xmm0; jumptable 0000000000092184 default case movups xmmword ptr [r14], xmm0 mov qword ptr [r14+10h], 0 mov r12, [rbp+var_48] jmp short loc_922E0 loc_92318: mov rax, cs:stderr_ptr mov rbx, [rax] lea rdi, [rbp+var_68] lea rsi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE15GetErrorMessageB5cxx11Ev; shaderc::CompilationResult<uint>::GetErrorMessage(void) lea rdi, [rbp+var_68] mov rsi, rbx mov rdx, r14 call _Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj_cold_1; compileToSpirv(std::string const&,std::string const&,spv::ExecutionModel,uint) [clone] jmp short loc_922D7 mov rbx, rax mov rdi, r15 call shaderc_result_release jmp short loc_9237C jmp short loc_923A6 jmp short loc_92379 jmp short loc_92379 jmp short loc_923A6 jmp short loc_923A6 jmp short loc_92379 jmp short loc_923A6 mov rbx, rax mov rdi, [rbp+var_38] test rdi, rdi jz short loc_9236D mov rax, [rdi] call qword ptr [rax+18h] loc_9236D: mov [rbp+var_38], 0 jmp short loc_92395 jmp short loc_92389 loc_92379: mov rbx, rax loc_9237C: mov rdi, [rbp+var_30] call shaderc_result_release jmp short loc_9238C jmp short loc_923A6 loc_92389: mov rbx, rax loc_9238C: lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() loc_92395: mov rdi, [rbp+var_48]; void * call shaderc_compiler_release mov rdi, rbx call __Unwind_Resume loc_923A6: mov rdi, rax call __clang_call_terminate
long long compileToSpirv(long long a1, _QWORD *a2, _QWORD *a3, int a4, unsigned int a5) { long long v8; // rdx void *v9; // r12 int compilation_status; // eax long long bytes; // rbx long long v12; // rax long long v14; // rbx const char *v15[4]; // [rsp+8h] [rbp-68h] BYREF void *v16; // [rsp+28h] [rbp-48h] _QWORD v17[2]; // [rsp+30h] [rbp-40h] BYREF _QWORD v18[6]; // [rsp+40h] [rbp-30h] BYREF v16 = (void *)shaderc_compiler_initialize(); v17[1] = 0LL; v17[0] = shaderc_compile_options_initialize(); shaderc_compile_options_set_optimization_level(v17[0], 0LL); shaderc_compile_options_set_generate_debug_info(v17[0]); if ( a4 <= 5312 ) { switch ( a4 ) { case 0: case 3: goto LABEL_18; case 1: a4 = 4; goto LABEL_18; case 2: a4 = 5; goto LABEL_18; case 4: a4 = 1; goto LABEL_18; case 5: a4 = 2; goto LABEL_18; default: LABEL_31: *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v9 = v16; break; } } else { switch ( a4 ) { case 5313: a4 = 14; break; case 5314: a4 = 18; break; case 5315: a4 = 15; break; case 5316: a4 = 16; break; case 5317: a4 = 17; break; case 5318: a4 = 19; break; default: if ( a4 == 5364 ) { a4 = 26; } else { if ( a4 != 5365 ) goto LABEL_31; a4 = 27; } break; } LABEL_18: v8 = 4206592LL; if ( a5 <= 0x105FF ) { v8 = 4202496LL; if ( a5 <= 0x104FF ) v8 = ((a5 >= 0x10300) << 12) | 0x400000u; } shaderc_compile_options_set_target_env(v17[0], 0LL, v8); shaderc_compile_options_set_target_spirv(v17[0], a5); shaderc_compile_options_set_source_language(v17[0], 0LL); v18[0] = 0LL; v9 = v16; v18[0] = shaderc_compile_into_spv(v16, *a3, a3[1], (unsigned int)a4, *a2, "main", v17[0]); shaderc_result_release(0LL); if ( v18[0] ) compilation_status = shaderc_result_get_compilation_status(); else compilation_status = 4; if ( compilation_status ) { v14 = stderr; shaderc::CompilationResult<unsigned int>::GetErrorMessage[abi:cxx11](v15, v18); compileToSpirv(v15, v14, a1); } else { if ( v18[0] ) bytes = shaderc_result_get_bytes(); else bytes = 0LL; v12 = shaderc::CompilationResult<unsigned int>::cend(v18); std::vector<unsigned int>::vector<unsigned int const*,void>(a1, bytes, v12, v15); } shaderc_result_release(v18[0]); } shaderc::CompileOptions::~CompileOptions((shaderc::CompileOptions *)v17); shaderc_compiler_release(v9); return a1; }
compileToSpirv: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBX,R8D MOV R13D,ECX MOV R15,RDX MOV R12,RSI MOV R14,RDI CALL 0x0021d220 MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x38],0x0 LAB_0019211d: CALL 0x0021cb54 MOV qword ptr [RBP + -0x40],RAX LAB_00192126: MOV RDI,RAX XOR ESI,ESI CALL 0x0021cd40 MOV RDI,qword ptr [RBP + -0x40] CALL 0x0021cd37 CMP R13D,0x14c0 JLE 0x00192169 LEA EAX,[R13 + -0x14c1] CMP EAX,0x5 JA 0x0019218e LEA RCX,[0x4e7e50] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_14c1: MOV R13D,0xe JMP 0x001921f2 LAB_00192169: CMP R13D,0x5 JA 0x00192303 MOV EAX,R13D LEA RCX,[0x4e7e38] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV R13D,0x4 JMP 0x001921f2 default: CMP R13D,0x14f4 JZ 0x001921d4 CMP R13D,0x14f5 JNZ 0x00192303 MOV R13D,0x1b JMP 0x001921f2 caseD_14c5: MOV R13D,0x11 JMP 0x001921f2 caseD_14c3: MOV R13D,0xf JMP 0x001921f2 caseD_14c4: MOV R13D,0x10 JMP 0x001921f2 caseD_14c2: MOV R13D,0x12 JMP 0x001921f2 caseD_2: MOV R13D,0x5 JMP 0x001921f2 LAB_001921d4: MOV R13D,0x1a JMP 0x001921f2 caseD_14c6: MOV R13D,0x13 JMP 0x001921f2 caseD_5: MOV R13D,0x2 JMP 0x001921f2 caseD_4: MOV R13D,0x1 caseD_0: MOV EDX,0x403000 CMP EBX,0x105ff JA 0x00192220 MOV EDX,0x402000 CMP EBX,0x104ff JA 0x00192220 XOR EDX,EDX CMP EBX,0x10300 SETNC DL SHL EDX,0xc OR EDX,0x400000 LAB_00192220: MOV RDI,qword ptr [RBP + -0x40] LAB_00192224: XOR ESI,ESI CALL 0x0021cd93 MOV RDI,qword ptr [RBP + -0x40] MOV ESI,EBX CALL 0x0021ce2c MOV RDI,qword ptr [RBP + -0x40] XOR ESI,ESI CALL 0x0021cd24 MOV qword ptr [RBP + -0x30],0x0 MOV R8,qword ptr [R12] MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RAX,qword ptr [RBP + -0x40] LAB_00192258: MOV qword ptr [RSP],RAX LEA R9,[0x530382] MOV R12,qword ptr [RBP + -0x48] MOV RDI,R12 MOV ECX,R13D CALL 0x0021d2ad MOV R15,RAX MOV RDI,qword ptr [RBP + -0x30] TEST RDI,RDI JZ 0x00192283 LAB_0019227e: CALL 0x0021db9a LAB_00192283: MOV qword ptr [RBP + -0x30],R15 LAB_00192287: XOR EDI,EDI CALL 0x0021db9a MOV RDI,qword ptr [RBP + -0x30] TEST RDI,RDI JZ 0x0019229e LAB_00192297: CALL 0x0021dbab JMP 0x001922a3 LAB_0019229e: MOV EAX,0x4 LAB_001922a3: TEST EAX,EAX JNZ 0x00192318 MOV RDI,qword ptr [RBP + -0x30] TEST RDI,RDI JZ 0x001922ba CALL 0x0021db94 MOV RBX,RAX JMP 0x001922bc LAB_001922ba: XOR EBX,EBX LAB_001922bc: LEA RDI,[RBP + -0x30] CALL 0x001923f8 LAB_001922c5: LEA RCX,[RBP + -0x68] MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX CALL 0x0017f010 LAB_001922d7: MOV RDI,qword ptr [RBP + -0x30] LAB_001922db: CALL 0x0021db9a LAB_001922e0: LEA RDI,[RBP + -0x40] CALL 0x0019246c LAB_001922e9: MOV RDI,R12 CALL 0x0021d290 MOV RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET default: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],0x0 MOV R12,qword ptr [RBP + -0x48] JMP 0x001922e0 LAB_00192318: MOV RAX,qword ptr [0x006e1f90] MOV RBX,qword ptr [RAX] LAB_00192322: LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x30] CALL 0x001923ae LAB_0019232f: LEA RDI,[RBP + -0x68] MOV RSI,RBX MOV RDX,R14 CALL 0x001814cc JMP 0x001922d7
/* compileToSpirv(std::__cxx11::string const&, std::__cxx11::string const&, spv::ExecutionModel, unsigned int) */ uint * compileToSpirv(uint *param_1,int8 *param_2,int8 *param_3,int param_4,uint param_5 ) { int8 uVar1; int iVar2; long lVar3; uint *puVar4; allocator *paVar5; uint uVar6; int8 uVar7; int1 local_70 [32]; int8 local_50; int8 local_48; int8 local_40; long local_38; local_50 = shaderc_compiler_initialize(); local_40 = 0; /* try { // try from 0019211d to 00192121 has its CatchHandler @ 0019235b */ local_48 = shaderc_compile_options_initialize(); /* try { // try from 00192126 to 00192138 has its CatchHandler @ 00192377 */ shaderc_compile_options_set_optimization_level(local_48,0); shaderc_compile_options_set_generate_debug_info(local_48); if (param_4 < 0x14c1) { switch(param_4) { case 0: case 3: break; case 1: param_4 = 4; break; case 2: param_4 = 5; break; case 4: param_4 = 1; break; case 5: param_4 = 2; break; default: switchD_00192184_default: param_1[0] = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; uVar7 = local_50; goto LAB_001922e0; } } else { switch(param_4) { case 0x14c1: param_4 = 0xe; break; case 0x14c2: param_4 = 0x12; break; case 0x14c3: param_4 = 0xf; break; case 0x14c4: param_4 = 0x10; break; case 0x14c5: param_4 = 0x11; break; case 0x14c6: param_4 = 0x13; break; default: if (param_4 == 0x14f4) { param_4 = 0x1a; } else { if (param_4 != 0x14f5) goto switchD_00192184_default; param_4 = 0x1b; } } } uVar6 = 0x403000; if ((param_5 < 0x10600) && (uVar6 = 0x402000, param_5 < 0x10500)) { uVar6 = (uint)(0x102ff < param_5) << 0xc | 0x400000; } /* try { // try from 00192224 to 00192240 has its CatchHandler @ 00192389 */ shaderc_compile_options_set_target_env(local_48,0,uVar6); shaderc_compile_options_set_target_spirv(local_48,param_5); shaderc_compile_options_set_source_language(local_48,0); uVar7 = local_50; local_38 = 0; /* try { // try from 00192258 to 00192271 has its CatchHandler @ 00192357 */ lVar3 = shaderc_compile_into_spv(local_50,*param_3,param_3[1],param_4,*param_2,"main",local_48); if (local_38 != 0) { /* try { // try from 0019227e to 00192282 has its CatchHandler @ 00192340 */ shaderc_result_release(); } local_38 = lVar3; /* try { // try from 00192287 to 0019228d has its CatchHandler @ 00192355 */ shaderc_result_release(0); if (local_38 == 0) { iVar2 = 4; } else { /* try { // try from 00192297 to 001922c4 has its CatchHandler @ 00192379 */ iVar2 = shaderc_result_get_compilation_status(); } if (iVar2 == 0) { if (local_38 == 0) { puVar4 = (uint *)0x0; } else { puVar4 = (uint *)shaderc_result_get_bytes(); } paVar5 = (allocator *) shaderc::CompilationResult<unsigned_int>::cend ((CompilationResult<unsigned_int> *)&local_38); /* try { // try from 001922c5 to 001922d6 has its CatchHandler @ 00192351 */ std::vector<unsigned_int,std::allocator<unsigned_int>>::vector<unsigned_int_const*,void> (param_1,puVar4,paVar5); } else { uVar1 = *(int8 *)PTR_stderr_006e1f90; /* try { // try from 00192322 to 0019232e has its CatchHandler @ 0019234f */ shaderc::CompilationResult<unsigned_int>::GetErrorMessage_abi_cxx11_(); compileToSpirv(local_70,uVar1,param_1); } /* try { // try from 001922db to 001922df has its CatchHandler @ 00192353 */ shaderc_result_release(local_38); LAB_001922e0: shaderc::CompileOptions::~CompileOptions((CompileOptions *)&local_48); /* try { // try from 001922e9 to 001922f0 has its CatchHandler @ 00192359 */ shaderc_compiler_release(uVar7); return param_1; }
61,424
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int)
HansKristian-Work[P]pyroveil/compiler/compiler.cpp
std::vector<uint32_t> compileToSpirv(const std::string &name, const std::string &glsl, spv::ExecutionModel stage, uint32_t spirvVersion) { shaderc::Compiler compiler; shaderc::CompileOptions options; options.SetOptimizationLevel(shaderc_optimization_level_zero); options.SetGenerateDebugInfo(); shaderc_shader_kind kind; switch (stage) { case spv::ExecutionModelVertex: kind = shaderc_glsl_vertex_shader; break; case spv::ExecutionModelTessellationControl: kind = shaderc_glsl_tess_control_shader; break; case spv::ExecutionModelTessellationEvaluation: kind = shaderc_glsl_tess_evaluation_shader; break; case spv::ExecutionModelGeometry: kind = shaderc_glsl_geometry_shader; break; case spv::ExecutionModelFragment: kind = shaderc_glsl_fragment_shader; break; case spv::ExecutionModelGLCompute: kind = shaderc_glsl_compute_shader; break; case spv::ExecutionModelMeshEXT: kind = shaderc_glsl_mesh_shader; break; case spv::ExecutionModelTaskEXT: kind = shaderc_glsl_task_shader; break; case spv::ExecutionModelClosestHitKHR: kind = shaderc_glsl_closesthit_shader; break; case spv::ExecutionModelAnyHitKHR: kind = shaderc_glsl_anyhit_shader; break; case spv::ExecutionModelMissKHR: kind = shaderc_glsl_miss_shader; break; case spv::ExecutionModelIntersectionKHR: kind = shaderc_glsl_intersection_shader; break; case spv::ExecutionModelRayGenerationKHR: kind = shaderc_glsl_raygen_shader; break; case spv::ExecutionModelCallableKHR: kind = shaderc_glsl_callable_shader; break; default: return {}; } if (spirvVersion >= 0x10600) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_3); else if (spirvVersion >= 0x10500) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_2); else if (spirvVersion >= 0x10300) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); else options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_0); options.SetTargetSpirv(shaderc_spirv_version(spirvVersion)); options.SetSourceLanguage(shaderc_source_language_glsl); shaderc::SpvCompilationResult result; result = compiler.CompileGlslToSpv(glsl, kind, name.c_str(), options); if (result.GetCompilationStatus() != shaderc_compilation_status_success) { fprintf(stderr, "pyroveil: Failed to convert GLSL: %s\n", result.GetErrorMessage().c_str()); return {}; } return { result.cbegin(), result.cend() }; }
O2
cpp
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r8d, %r13d movl %ecx, %r12d movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x126653 movq %rax, -0x48(%rbp) leaq -0x40(%rbp), %rdi callq 0xb2d56 movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x126288 movq -0x40(%rbp), %rdi callq 0x12627f cmpl $0x5, %r12d jbe 0xb2b81 leal -0x14c1(%r12), %eax cmpl $0x5, %eax ja 0xb2b98 leaq 0x2b854c(%rip), %rcx # 0x36b0c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax pushq $0xe jmp 0xb2bd4 movl %r12d, %eax leaq 0x2b851d(%rip), %rcx # 0x36b0a8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax pushq $0x4 jmp 0xb2bd4 cmpl $0x14f4, %r12d # imm = 0x14F4 je 0xb2bc2 cmpl $0x14f5, %r12d # imm = 0x14F5 jne 0xb2cbf pushq $0x1b jmp 0xb2bd4 pushq $0x11 jmp 0xb2bd4 pushq $0x5 jmp 0xb2bd4 pushq $0xf jmp 0xb2bd4 pushq $0x10 jmp 0xb2bd4 pushq $0x1a jmp 0xb2bd4 pushq $0x12 jmp 0xb2bd4 pushq $0x2 jmp 0xb2bd4 pushq $0x13 jmp 0xb2bd4 pushq $0x1 popq %r12 movl $0x403000, %edx # imm = 0x403000 cmpl $0x105ff, %r13d # imm = 0x105FF ja 0xb2c07 movl $0x402000, %edx # imm = 0x402000 cmpl $0x104ff, %r13d # imm = 0x104FF ja 0xb2c07 xorl %edx, %edx cmpl $0x10300, %r13d # imm = 0x10300 setae %dl shll $0xc, %edx orl $0x400000, %edx # imm = 0x400000 movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x1262db movq -0x40(%rbp), %rdi movl %r13d, %esi callq 0x12636c movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x12626c andq $0x0, -0x30(%rbp) movq (%r15), %r8 leaq -0x68(%rbp), %rdi leaq -0x48(%rbp), %rsi leaq -0x40(%rbp), %r9 movq %r14, %rdx movl %r12d, %ecx callq 0xb2d8a leaq -0x30(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0xb2dba leaq -0x68(%rbp), %rdi callq 0xb2de6 leaq -0x30(%rbp), %rdi callq 0xb2dfc testl %eax, %eax jne 0xb2ccc leaq -0x30(%rbp), %rdi callq 0xb2e56 movq %rax, %r14 leaq -0x30(%rbp), %rdi callq 0xb2e6c leaq -0x68(%rbp), %rcx movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0xa21e0 leaq -0x30(%rbp), %rdi callq 0xb2de6 leaq -0x40(%rbp), %rdi callq 0xb2ece leaq -0x48(%rbp), %rdi callq 0xb2efa movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorps %xmm0, %xmm0 movups %xmm0, (%rbx) andq $0x0, 0x10(%rbx) jmp 0xb2c9b movq 0x5002c5(%rip), %rax # 0x5b2f98 movq (%rax), %r14 leaq -0x68(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xb2e16 leaq -0x68(%rbp), %r15 movq (%r15), %rdx leaq 0x2b83e7(%rip), %rsi # 0x36b0d8 movq %r14, %rdi xorl %eax, %eax callq 0xa4480 movq %r15, %rdi callq 0xa60a8 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) andq $0x0, 0x10(%rbx) jmp 0xb2c92 jmp 0xb2d2b jmp 0xb2d2b movq %rax, %rbx leaq -0x68(%rbp), %rdi callq 0xb2de6 jmp 0xb2d2e jmp 0xb2d2b movq %rax, %rbx jmp 0xb2d45 jmp 0xb2d39 movq %rax, %rbx leaq -0x30(%rbp), %rdi callq 0xb2de6 jmp 0xb2d3c movq %rax, %rbx leaq -0x40(%rbp), %rdi callq 0xb2ece leaq -0x48(%rbp), %rdi callq 0xb2efa movq %rbx, %rdi callq 0xa55e0
_Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13d, r8d mov r12d, ecx mov r14, rdx mov r15, rsi mov rbx, rdi call shaderc_compiler_initialize mov [rbp+var_48], rax lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsC2Ev; shaderc::CompileOptions::CompileOptions(void) mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_optimization_level mov rdi, [rbp+var_40] call shaderc_compile_options_set_generate_debug_info cmp r12d, 5; switch 6 cases jbe short loc_B2B81 def_B2B92: lea eax, [r12-14C1h]; jumptable 00000000000B2B92 default case cmp eax, 5 ja short def_B2B7B; jumptable 00000000000B2B7B default case lea rcx, jpt_B2B7B movsxd rax, ds:(jpt_B2B7B - 36B0C0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B2B7D: push 0Eh; jumptable 00000000000B2B7B case 5313 jmp short loc_B2BD4 loc_B2B81: mov eax, r12d lea rcx, jpt_B2B92 movsxd rax, ds:(jpt_B2B92 - 36B0A8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B2B94: push 4; jumptable 00000000000B2B92 case 1 jmp short loc_B2BD4 def_B2B7B: cmp r12d, 14F4h; jumptable 00000000000B2B7B default case jz short loc_B2BC2 cmp r12d, 14F5h jnz loc_B2CBF push 1Bh jmp short loc_B2BD4 loc_B2BB2: push 11h; jumptable 00000000000B2B7B case 5317 jmp short loc_B2BD4 loc_B2BB6: push 5; jumptable 00000000000B2B92 case 2 jmp short loc_B2BD4 loc_B2BBA: push 0Fh; jumptable 00000000000B2B7B case 5315 jmp short loc_B2BD4 loc_B2BBE: push 10h; jumptable 00000000000B2B7B case 5316 jmp short loc_B2BD4 loc_B2BC2: push 1Ah jmp short loc_B2BD4 loc_B2BC6: push 12h; jumptable 00000000000B2B7B case 5314 jmp short loc_B2BD4 loc_B2BCA: push 2; jumptable 00000000000B2B92 case 5 jmp short loc_B2BD4 loc_B2BCE: push 13h; jumptable 00000000000B2B7B case 5318 jmp short loc_B2BD4 loc_B2BD2: push 1; jumptable 00000000000B2B92 case 4 loc_B2BD4: pop r12 loc_B2BD6: mov edx, offset unk_403000; jumptable 00000000000B2B92 cases 0,3 cmp r13d, 105FFh ja short loc_B2C07 mov edx, offset unk_402000 cmp r13d, 104FFh ja short loc_B2C07 xor edx, edx cmp r13d, 10300h setnb dl shl edx, 0Ch or edx, 400000h loc_B2C07: mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_target_env mov rdi, [rbp+var_40] mov esi, r13d call shaderc_compile_options_set_target_spirv mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_source_language and [rbp+var_30], 0 mov r8, [r15] lea rdi, [rbp+var_68] lea rsi, [rbp+var_48] lea r9, [rbp+var_40] mov rdx, r14 mov ecx, r12d call _ZNK7shaderc8Compiler16CompileGlslToSpvERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19shaderc_shader_kindPKcRKNS_14CompileOptionsE; shaderc::Compiler::CompileGlslToSpv(std::string const&,shaderc_shader_kind,char const*,shaderc::CompileOptions const&) lea rdi, [rbp+var_30] lea rsi, [rbp+var_68] call _ZN7shaderc17CompilationResultIjEaSEOS1_; shaderc::CompilationResult<uint>::operator=(shaderc::CompilationResult<uint>&&) lea rdi, [rbp+var_68] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() lea rdi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE20GetCompilationStatusEv; shaderc::CompilationResult<uint>::GetCompilationStatus(void) test eax, eax jnz short loc_B2CCC lea rdi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE6cbeginEv; shaderc::CompilationResult<uint>::cbegin(void) mov r14, rax lea rdi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE4cendEv; shaderc::CompilationResult<uint>::cend(void) lea rcx, [rbp+var_68] mov rdi, rbx mov rsi, r14 mov rdx, rax call __ZNSt6vectorIjSaIjEEC2IPKjvEET_S5_RKS0_; std::vector<uint>::vector<uint const*,void>(uint const*,uint const*,std::allocator<uint> const&) loc_B2C92: lea rdi, [rbp+var_30] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() loc_B2C9B: lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() lea rdi, [rbp+var_48]; this call _ZN7shaderc8CompilerD2Ev; shaderc::Compiler::~Compiler() mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B2CBF: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 and qword ptr [rbx+10h], 0 jmp short loc_B2C9B loc_B2CCC: mov rax, cs:stderr_ptr mov r14, [rax] lea rdi, [rbp+var_68] lea rsi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE15GetErrorMessageB5cxx11Ev; shaderc::CompilationResult<uint>::GetErrorMessage(void) lea r15, [rbp+var_68] mov rdx, [r15] lea rsi, aPyroveilFailed_4; "pyroveil: Failed to convert GLSL: %s\n" mov rdi, r14 xor eax, eax call _fprintf mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 and qword ptr [rbx+10h], 0 jmp short loc_B2C92 jmp short loc_B2D2B jmp short loc_B2D2B mov rbx, rax lea rdi, [rbp+var_68] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() jmp short loc_B2D2E jmp short loc_B2D2B mov rbx, rax jmp short loc_B2D45 jmp short loc_B2D39 loc_B2D2B: mov rbx, rax loc_B2D2E: lea rdi, [rbp+var_30] call _ZN7shaderc17CompilationResultIjED2Ev; shaderc::CompilationResult<uint>::~CompilationResult() jmp short loc_B2D3C loc_B2D39: mov rbx, rax loc_B2D3C: lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() loc_B2D45: lea rdi, [rbp+var_48]; this call _ZN7shaderc8CompilerD2Ev; shaderc::Compiler::~Compiler() mov rdi, rbx call __Unwind_Resume
long long compileToSpirv(long long a1, _QWORD *a2, long long a3, unsigned int a4, unsigned int a5) { void *v8; // rdx long long v9; // r14 long long v10; // rax long long v12; // r14 int v13; // [rsp-8h] [rbp-78h] const char *v14[4]; // [rsp+8h] [rbp-68h] BYREF long long v15; // [rsp+28h] [rbp-48h] BYREF _QWORD v16[2]; // [rsp+30h] [rbp-40h] BYREF _QWORD v17[6]; // [rsp+40h] [rbp-30h] BYREF v15 = shaderc_compiler_initialize(); shaderc::CompileOptions::CompileOptions((shaderc::CompileOptions *)v16); shaderc_compile_options_set_optimization_level(v16[0], 0LL); shaderc_compile_options_set_generate_debug_info(v16[0]); switch ( a4 ) { case 0u: case 3u: goto LABEL_19; case 1u: v13 = 4; goto LABEL_18; case 2u: v13 = 5; goto LABEL_18; case 4u: v13 = 1; goto LABEL_18; case 5u: v13 = 2; LABEL_18: a4 = v13; LABEL_19: v8 = &unk_403000; if ( a5 <= 0x105FF ) { v8 = &unk_402000; if ( a5 <= 0x104FF ) v8 = (void *)(((a5 >= 0x10300) << 12) | 0x400000u); } shaderc_compile_options_set_target_env(v16[0], 0LL, v8); shaderc_compile_options_set_target_spirv(v16[0], a5); shaderc_compile_options_set_source_language(v16[0], 0LL); v17[0] = 0LL; shaderc::Compiler::CompileGlslToSpv(v14, &v15, a3, a4, *a2, v16); shaderc::CompilationResult<unsigned int>::operator=(v17, v14); shaderc::CompilationResult<unsigned int>::~CompilationResult(v14); if ( (unsigned int)shaderc::CompilationResult<unsigned int>::GetCompilationStatus(v17) ) { v12 = stderr; shaderc::CompilationResult<unsigned int>::GetErrorMessage[abi:cxx11](v14, v17); fprintf(v12, "pyroveil: Failed to convert GLSL: %s\n", v14[0]); std::string::~string(v14); *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; } else { v9 = shaderc::CompilationResult<unsigned int>::cbegin(v17); v10 = shaderc::CompilationResult<unsigned int>::cend(v17); std::vector<unsigned int>::vector<unsigned int const*,void>(a1, v9, v10, v14); } shaderc::CompilationResult<unsigned int>::~CompilationResult(v17); break; default: switch ( a4 ) { case 0x14C1u: v13 = 14; goto LABEL_18; case 0x14C2u: v13 = 18; goto LABEL_18; case 0x14C3u: v13 = 15; goto LABEL_18; case 0x14C4u: v13 = 16; goto LABEL_18; case 0x14C5u: v13 = 17; goto LABEL_18; case 0x14C6u: v13 = 19; goto LABEL_18; default: if ( a4 == 5364 ) { v13 = 26; goto LABEL_18; } if ( a4 == 5365 ) { v13 = 27; goto LABEL_18; } *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; break; } break; } shaderc::CompileOptions::~CompileOptions((shaderc::CompileOptions *)v16); shaderc::Compiler::~Compiler((shaderc::Compiler *)&v15); return a1; }
compileToSpirv: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13D,R8D MOV R12D,ECX MOV R14,RDX MOV R15,RSI MOV RBX,RDI CALL 0x00226653 MOV qword ptr [RBP + -0x48],RAX LAB_001b2b3d: LEA RDI,[RBP + -0x40] CALL 0x001b2d56 MOV RDI,qword ptr [RBP + -0x40] LAB_001b2b4a: XOR ESI,ESI CALL 0x00226288 MOV RDI,qword ptr [RBP + -0x40] CALL 0x0022627f CMP R12D,0x5 JBE 0x001b2b81 default: LEA EAX,[R12 + -0x14c1] CMP EAX,0x5 JA 0x001b2b98 LEA RCX,[0x46b0c0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_14c1: PUSH 0xe JMP 0x001b2bd4 LAB_001b2b81: MOV EAX,R12D LEA RCX,[0x46b0a8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: PUSH 0x4 JMP 0x001b2bd4 default: CMP R12D,0x14f4 JZ 0x001b2bc2 CMP R12D,0x14f5 JNZ 0x001b2cbf PUSH 0x1b JMP 0x001b2bd4 caseD_14c5: PUSH 0x11 JMP 0x001b2bd4 caseD_2: PUSH 0x5 JMP 0x001b2bd4 caseD_14c3: PUSH 0xf JMP 0x001b2bd4 caseD_14c4: PUSH 0x10 JMP 0x001b2bd4 LAB_001b2bc2: PUSH 0x1a JMP 0x001b2bd4 caseD_14c2: PUSH 0x12 JMP 0x001b2bd4 caseD_5: PUSH 0x2 JMP 0x001b2bd4 caseD_14c6: PUSH 0x13 JMP 0x001b2bd4 caseD_4: PUSH 0x1 LAB_001b2bd4: POP R12 caseD_0: MOV EDX,0x403000 CMP R13D,0x105ff JA 0x001b2c07 MOV EDX,0x402000 CMP R13D,0x104ff JA 0x001b2c07 XOR EDX,EDX CMP R13D,0x10300 SETNC DL SHL EDX,0xc OR EDX,0x400000 LAB_001b2c07: MOV RDI,qword ptr [RBP + -0x40] LAB_001b2c0b: XOR ESI,ESI CALL 0x002262db MOV RDI,qword ptr [RBP + -0x40] MOV ESI,R13D CALL 0x0022636c MOV RDI,qword ptr [RBP + -0x40] XOR ESI,ESI CALL 0x0022626c AND qword ptr [RBP + -0x30],0x0 MOV R8,qword ptr [R15] LAB_001b2c31: LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x48] LEA R9,[RBP + -0x40] MOV RDX,R14 MOV ECX,R12D CALL 0x001b2d8a LAB_001b2c48: LEA RDI,[RBP + -0x30] LEA RSI,[RBP + -0x68] CALL 0x001b2dba LEA RDI,[RBP + -0x68] CALL 0x001b2de6 LAB_001b2c5e: LEA RDI,[RBP + -0x30] CALL 0x001b2dfc TEST EAX,EAX JNZ 0x001b2ccc LEA RDI,[RBP + -0x30] CALL 0x001b2e56 MOV R14,RAX LEA RDI,[RBP + -0x30] CALL 0x001b2e6c LAB_001b2c80: LEA RCX,[RBP + -0x68] MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x001a21e0 LAB_001b2c92: LEA RDI,[RBP + -0x30] CALL 0x001b2de6 LAB_001b2c9b: LEA RDI,[RBP + -0x40] CALL 0x001b2ece LEA RDI,[RBP + -0x48] CALL 0x001b2efa MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b2cbf: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RBX + 0x10],0x0 JMP 0x001b2c9b LAB_001b2ccc: MOV RAX,qword ptr [0x006b2f98] MOV R14,qword ptr [RAX] LAB_001b2cd6: LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x30] CALL 0x001b2e16 LAB_001b2ce3: LEA R15,[RBP + -0x68] MOV RDX,qword ptr [R15] LEA RSI,[0x46b0d8] MOV RDI,R14 XOR EAX,EAX CALL 0x001a4480 MOV RDI,R15 CALL 0x001a60a8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RBX + 0x10],0x0 JMP 0x001b2c92
/* compileToSpirv(std::__cxx11::string const&, std::__cxx11::string const&, spv::ExecutionModel, unsigned int) */ uint * compileToSpirv(uint *param_1,int8 *param_2,int8 param_3,int param_4,uint param_5) { FILE *__stream; int iVar1; uint *puVar2; allocator *paVar3; uint uVar4; int8 local_70 [4]; int8 local_50; int8 local_48 [2]; int8 local_38; local_50 = shaderc_compiler_initialize(); /* try { // try from 001b2b3d to 001b2b45 has its CatchHandler @ 001b2d24 */ shaderc::CompileOptions::CompileOptions((CompileOptions *)local_48); /* try { // try from 001b2b4a to 001b2b59 has its CatchHandler @ 001b2d29 */ shaderc_compile_options_set_optimization_level(local_48[0],0); shaderc_compile_options_set_generate_debug_info(local_48[0]); switch(param_4) { case 0: case 3: break; case 1: param_4 = 4; break; case 2: param_4 = 5; break; case 4: param_4 = 1; break; case 5: param_4 = 2; break; default: switch(param_4) { case 0x14c1: param_4 = 0xe; break; case 0x14c2: param_4 = 0x12; break; case 0x14c3: param_4 = 0xf; break; case 0x14c4: param_4 = 0x10; break; case 0x14c5: param_4 = 0x11; break; case 0x14c6: param_4 = 0x13; break; default: if (param_4 == 0x14f4) { param_4 = 0x1a; } else { if (param_4 != 0x14f5) { param_1[0] = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; goto LAB_001b2c9b; } param_4 = 0x1b; } } } uVar4 = 0x403000; if ((param_5 < 0x10600) && (uVar4 = 0x402000, param_5 < 0x10500)) { uVar4 = (uint)(0x102ff < param_5) << 0xc | 0x400000; } /* try { // try from 001b2c0b to 001b2c28 has its CatchHandler @ 001b2d39 */ shaderc_compile_options_set_target_env(local_48[0],0,uVar4); shaderc_compile_options_set_target_spirv(local_48[0],param_5); shaderc_compile_options_set_source_language(local_48[0],0); local_38 = 0; /* try { // try from 001b2c31 to 001b2c47 has its CatchHandler @ 001b2d22 */ shaderc::Compiler::CompileGlslToSpv(local_70,&local_50,param_3,param_4,*param_2,local_48); /* try { // try from 001b2c48 to 001b2c54 has its CatchHandler @ 001b2d14 */ shaderc::CompilationResult<unsigned_int>::operator= ((CompilationResult<unsigned_int> *)&local_38,(CompilationResult *)local_70); shaderc::CompilationResult<unsigned_int>::~CompilationResult ((CompilationResult<unsigned_int> *)local_70); /* try { // try from 001b2c5e to 001b2c7f has its CatchHandler @ 001b2d2b */ iVar1 = shaderc::CompilationResult<unsigned_int>::GetCompilationStatus ((CompilationResult<unsigned_int> *)&local_38); if (iVar1 == 0) { puVar2 = (uint *)shaderc::CompilationResult<unsigned_int>::cbegin ((CompilationResult<unsigned_int> *)&local_38); paVar3 = (allocator *) shaderc::CompilationResult<unsigned_int>::cend ((CompilationResult<unsigned_int> *)&local_38); /* try { // try from 001b2c80 to 001b2c91 has its CatchHandler @ 001b2d12 */ std::vector<unsigned_int,std::allocator<unsigned_int>>::vector<unsigned_int_const*,void> (param_1,puVar2,paVar3); } else { __stream = *(FILE **)PTR_stderr_006b2f98; /* try { // try from 001b2cd6 to 001b2ce2 has its CatchHandler @ 001b2d10 */ shaderc::CompilationResult<unsigned_int>::GetErrorMessage_abi_cxx11_(); fprintf(__stream,"pyroveil: Failed to convert GLSL: %s\n",local_70[0]); std::__cxx11::string::~string((string *)local_70); param_1[0] = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; } shaderc::CompilationResult<unsigned_int>::~CompilationResult ((CompilationResult<unsigned_int> *)&local_38); LAB_001b2c9b: shaderc::CompileOptions::~CompileOptions((CompileOptions *)local_48); shaderc::Compiler::~Compiler((Compiler *)&local_50); return param_1; }
61,425
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int)
HansKristian-Work[P]pyroveil/compiler/compiler.cpp
std::vector<uint32_t> compileToSpirv(const std::string &name, const std::string &glsl, spv::ExecutionModel stage, uint32_t spirvVersion) { shaderc::Compiler compiler; shaderc::CompileOptions options; options.SetOptimizationLevel(shaderc_optimization_level_zero); options.SetGenerateDebugInfo(); shaderc_shader_kind kind; switch (stage) { case spv::ExecutionModelVertex: kind = shaderc_glsl_vertex_shader; break; case spv::ExecutionModelTessellationControl: kind = shaderc_glsl_tess_control_shader; break; case spv::ExecutionModelTessellationEvaluation: kind = shaderc_glsl_tess_evaluation_shader; break; case spv::ExecutionModelGeometry: kind = shaderc_glsl_geometry_shader; break; case spv::ExecutionModelFragment: kind = shaderc_glsl_fragment_shader; break; case spv::ExecutionModelGLCompute: kind = shaderc_glsl_compute_shader; break; case spv::ExecutionModelMeshEXT: kind = shaderc_glsl_mesh_shader; break; case spv::ExecutionModelTaskEXT: kind = shaderc_glsl_task_shader; break; case spv::ExecutionModelClosestHitKHR: kind = shaderc_glsl_closesthit_shader; break; case spv::ExecutionModelAnyHitKHR: kind = shaderc_glsl_anyhit_shader; break; case spv::ExecutionModelMissKHR: kind = shaderc_glsl_miss_shader; break; case spv::ExecutionModelIntersectionKHR: kind = shaderc_glsl_intersection_shader; break; case spv::ExecutionModelRayGenerationKHR: kind = shaderc_glsl_raygen_shader; break; case spv::ExecutionModelCallableKHR: kind = shaderc_glsl_callable_shader; break; default: return {}; } if (spirvVersion >= 0x10600) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_3); else if (spirvVersion >= 0x10500) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_2); else if (spirvVersion >= 0x10300) options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_1); else options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_0); options.SetTargetSpirv(shaderc_spirv_version(spirvVersion)); options.SetSourceLanguage(shaderc_source_language_glsl); shaderc::SpvCompilationResult result; result = compiler.CompileGlslToSpv(glsl, kind, name.c_str(), options); if (result.GetCompilationStatus() != shaderc_compilation_status_success) { fprintf(stderr, "pyroveil: Failed to convert GLSL: %s\n", result.GetErrorMessage().c_str()); return {}; } return { result.cbegin(), result.cend() }; }
O3
cpp
compileToSpirv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, spv::ExecutionModel, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r8d, %ebx movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 callq 0x11a719 movq %rax, -0x48(%rbp) movq $0x0, -0x38(%rbp) callq 0x11a054 movq %rax, -0x40(%rbp) movq %rax, %rdi xorl %esi, %esi callq 0x11a239 movq -0x40(%rbp), %rdi callq 0x11a230 cmpl $0x14c0, %r13d # imm = 0x14C0 jle 0x90939 leal -0x14c1(%r13), %eax cmpl $0x5, %eax ja 0x9095e leaq 0x34053b(%rip), %rcx # 0x3d0e60 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0xe, %r13d jmp 0x909c2 cmpl $0x5, %r13d ja 0x90ae5 movl %r13d, %eax leaq 0x3404fb(%rip), %rcx # 0x3d0e48 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x4, %r13d jmp 0x909c2 cmpl $0x14f4, %r13d # imm = 0x14F4 je 0x909a4 cmpl $0x14f5, %r13d # imm = 0x14F5 jne 0x90ae5 movl $0x1b, %r13d jmp 0x909c2 movl $0x11, %r13d jmp 0x909c2 movl $0xf, %r13d jmp 0x909c2 movl $0x10, %r13d jmp 0x909c2 movl $0x12, %r13d jmp 0x909c2 movl $0x5, %r13d jmp 0x909c2 movl $0x1a, %r13d jmp 0x909c2 movl $0x13, %r13d jmp 0x909c2 movl $0x2, %r13d jmp 0x909c2 movl $0x1, %r13d movl $0x403000, %edx # imm = 0x403000 cmpl $0x105ff, %ebx # imm = 0x105FF ja 0x909f0 movl $0x402000, %edx # imm = 0x402000 cmpl $0x104ff, %ebx # imm = 0x104FF ja 0x909f0 xorl %edx, %edx cmpl $0x10300, %ebx # imm = 0x10300 setae %dl shll $0xc, %edx orl $0x400000, %edx # imm = 0x400000 movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x11a28c movq -0x40(%rbp), %rdi movl %ebx, %esi callq 0x11a325 movq -0x40(%rbp), %rdi xorl %esi, %esi callq 0x11a21d movq $0x0, -0x30(%rbp) movq (%r12), %r8 movq (%r15), %rsi movq 0x8(%r15), %rdx movq -0x40(%rbp), %rax movq %rax, (%rsp) leaq 0x388727(%rip), %r9 # 0x41915a movq -0x48(%rbp), %r15 movq %r15, %rdi movl %r13d, %ecx callq 0x11a79f movq %rax, %rbx movq %rax, -0x30(%rbp) xorl %edi, %edi callq 0x11b06c testq %rbx, %rbx je 0x90abd movq %rbx, %rdi callq 0x11b07d testl %eax, %eax jne 0x90abd movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0x90a74 callq 0x11b066 movq %rax, %rbx jmp 0x90a76 xorl %ebx, %ebx leaq -0x30(%rbp), %rdi callq 0x90b8c leaq -0x68(%rbp), %rcx movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x7e030 movq -0x30(%rbp), %rdi callq 0x11b06c leaq -0x40(%rbp), %rdi callq 0x90c00 movq %r15, %rdi callq 0x11a780 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x5384cc(%rip), %rax # 0x5c8f90 movq (%rax), %rbx leaq -0x68(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x90b42 leaq -0x68(%rbp), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x809eb jmp 0x90a91 xorps %xmm0, %xmm0 movups %xmm0, (%r14) movq $0x0, 0x10(%r14) movq -0x48(%rbp), %r15 jmp 0x90a9a jmp 0x90b0d jmp 0x90b3a jmp 0x90b3a jmp 0x90b0d jmp 0x90b3a movq %rax, %rbx jmp 0x90b27 jmp 0x90b0d jmp 0x90b1b movq %rax, %rbx movq -0x30(%rbp), %rdi callq 0x11b06c jmp 0x90b1e movq %rax, %rbx leaq -0x40(%rbp), %rdi callq 0x90c00 movq -0x48(%rbp), %rdi callq 0x11a780 movq %rbx, %rdi callq 0x7f950 jmp 0x90b3a movq %rax, %rdi callq 0x8b862
_Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebx, r8d mov r13d, ecx mov r15, rdx mov r12, rsi mov r14, rdi call shaderc_compiler_initialize mov [rbp+var_48], rax mov [rbp+var_38], 0 call shaderc_compile_options_initialize mov [rbp+var_40], rax mov rdi, rax xor esi, esi call shaderc_compile_options_set_optimization_level mov rdi, [rbp+var_40] call shaderc_compile_options_set_generate_debug_info cmp r13d, 14C0h jle short loc_90939 lea eax, [r13-14C1h]; switch 6 cases cmp eax, 5 ja short def_9092C; jumptable 000000000009092C default case lea rcx, jpt_9092C movsxd rax, ds:(jpt_9092C - 3D0E60h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9092E: mov r13d, 0Eh; jumptable 000000000009092C case 5313 jmp loc_909C2; jumptable 0000000000090954 cases 0,3 loc_90939: cmp r13d, 5; switch 6 cases ja def_90954; jumptable 0000000000090954 default case mov eax, r13d lea rcx, jpt_90954 movsxd rax, ds:(jpt_90954 - 3D0E48h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_90956: mov r13d, 4; jumptable 0000000000090954 case 1 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 def_9092C: cmp r13d, 14F4h; jumptable 000000000009092C default case jz short loc_909A4 cmp r13d, 14F5h jnz def_90954; jumptable 0000000000090954 default case mov r13d, 1Bh jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_9097C: mov r13d, 11h; jumptable 000000000009092C case 5317 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_90984: mov r13d, 0Fh; jumptable 000000000009092C case 5315 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_9098C: mov r13d, 10h; jumptable 000000000009092C case 5316 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_90994: mov r13d, 12h; jumptable 000000000009092C case 5314 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_9099C: mov r13d, 5; jumptable 0000000000090954 case 2 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_909A4: mov r13d, 1Ah jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_909AC: mov r13d, 13h; jumptable 000000000009092C case 5318 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_909B4: mov r13d, 2; jumptable 0000000000090954 case 5 jmp short loc_909C2; jumptable 0000000000090954 cases 0,3 loc_909BC: mov r13d, 1; jumptable 0000000000090954 case 4 loc_909C2: mov edx, 403000h; jumptable 0000000000090954 cases 0,3 cmp ebx, 105FFh ja short loc_909F0 mov edx, 402000h cmp ebx, 104FFh ja short loc_909F0 xor edx, edx cmp ebx, 10300h setnb dl shl edx, 0Ch or edx, 400000h loc_909F0: mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_target_env mov rdi, [rbp+var_40] mov esi, ebx call shaderc_compile_options_set_target_spirv mov rdi, [rbp+var_40] xor esi, esi call shaderc_compile_options_set_source_language mov [rbp+var_30], 0 mov r8, [r12] mov rsi, [r15] mov rdx, [r15+8] mov rax, [rbp+var_40] mov [rsp+70h+var_70], rax lea r9, aInvalidDomain+0Ah; "main" mov r15, [rbp+var_48] mov rdi, r15 mov ecx, r13d call shaderc_compile_into_spv mov rbx, rax mov [rbp+var_30], rax xor edi, edi call shaderc_result_release test rbx, rbx jz short loc_90ABD mov rdi, rbx call shaderc_result_get_compilation_status test eax, eax jnz short loc_90ABD mov rdi, [rbp+var_30] test rdi, rdi jz short loc_90A74 call shaderc_result_get_bytes mov rbx, rax jmp short loc_90A76 loc_90A74: xor ebx, ebx loc_90A76: lea rdi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE4cendEv; shaderc::CompilationResult<uint>::cend(void) lea rcx, [rbp+var_68] mov rdi, r14 mov rsi, rbx mov rdx, rax call __ZNSt6vectorIjSaIjEEC2IPKjvEET_S5_RKS0_; std::vector<uint>::vector<uint const*,void>(uint const*,uint const*,std::allocator<uint> const&) loc_90A91: mov rdi, [rbp+var_30] call shaderc_result_release loc_90A9A: lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() mov rdi, r15; void * call shaderc_compiler_release mov rax, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_90ABD: mov rax, cs:stderr_ptr mov rbx, [rax] lea rdi, [rbp+var_68] lea rsi, [rbp+var_30] call _ZNK7shaderc17CompilationResultIjE15GetErrorMessageB5cxx11Ev; shaderc::CompilationResult<uint>::GetErrorMessage(void) lea rdi, [rbp+var_68] mov rsi, rbx mov rdx, r14 call _Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj_cold_1; compileToSpirv(std::string const&,std::string const&,spv::ExecutionModel,uint) [clone] jmp short loc_90A91 def_90954: xorps xmm0, xmm0; jumptable 0000000000090954 default case movups xmmword ptr [r14], xmm0 mov qword ptr [r14+10h], 0 mov r15, [rbp+var_48] jmp short loc_90A9A jmp short loc_90B0D jmp short loc_90B3A jmp short loc_90B3A jmp short loc_90B0D jmp short loc_90B3A mov rbx, rax jmp short loc_90B27 jmp short loc_90B0D jmp short loc_90B1B loc_90B0D: mov rbx, rax mov rdi, [rbp+var_30] call shaderc_result_release jmp short loc_90B1E loc_90B1B: mov rbx, rax loc_90B1E: lea rdi, [rbp+var_40]; this call _ZN7shaderc14CompileOptionsD2Ev; shaderc::CompileOptions::~CompileOptions() loc_90B27: mov rdi, [rbp+var_48]; void * call shaderc_compiler_release mov rdi, rbx call __Unwind_Resume jmp short $+2 loc_90B3A: mov rdi, rax call __clang_call_terminate
long long compileToSpirv(long long a1, _QWORD *a2, long long *a3, int a4, unsigned int a5) { long long v9; // rdx long long v10; // rsi long long v11; // rdx void *v12; // r15 long long v13; // rbx long long bytes; // rbx long long v15; // rax long long v17; // rbx const char *v18[4]; // [rsp+8h] [rbp-68h] BYREF void *v19; // [rsp+28h] [rbp-48h] long long v20[2]; // [rsp+30h] [rbp-40h] BYREF _QWORD v21[6]; // [rsp+40h] [rbp-30h] BYREF v19 = (void *)shaderc_compiler_initialize(); v20[1] = 0LL; v20[0] = shaderc_compile_options_initialize(); shaderc_compile_options_set_optimization_level(v20[0], 0LL); shaderc_compile_options_set_generate_debug_info(v20[0]); if ( a4 <= 5312 ) { switch ( a4 ) { case 0: case 3: goto LABEL_18; case 1: a4 = 4; goto LABEL_18; case 2: a4 = 5; goto LABEL_18; case 4: a4 = 1; goto LABEL_18; case 5: a4 = 2; goto LABEL_18; default: LABEL_30: *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v12 = v19; break; } } else { switch ( a4 ) { case 5313: a4 = 14; break; case 5314: a4 = 18; break; case 5315: a4 = 15; break; case 5316: a4 = 16; break; case 5317: a4 = 17; break; case 5318: a4 = 19; break; default: if ( a4 == 5364 ) { a4 = 26; } else { if ( a4 != 5365 ) goto LABEL_30; a4 = 27; } break; } LABEL_18: v9 = 4206592LL; if ( a5 <= 0x105FF ) { v9 = 4202496LL; if ( a5 <= 0x104FF ) v9 = ((a5 >= 0x10300) << 12) | 0x400000u; } shaderc_compile_options_set_target_env(v20[0], 0LL, v9); shaderc_compile_options_set_target_spirv(v20[0], a5); shaderc_compile_options_set_source_language(v20[0], 0LL); v21[0] = 0LL; v10 = *a3; v11 = a3[1]; v12 = v19; v13 = shaderc_compile_into_spv((_DWORD)v19, v10, v11, a4, *a2, (unsigned int)"main", v20[0]); v21[0] = v13; shaderc_result_release(0LL); if ( !v13 || (unsigned int)shaderc_result_get_compilation_status(v13) ) { v17 = stderr; shaderc::CompilationResult<unsigned int>::GetErrorMessage[abi:cxx11](v18, v21); compileToSpirv(v18, v17, a1); } else { if ( v21[0] ) bytes = shaderc_result_get_bytes(); else bytes = 0LL; v15 = shaderc::CompilationResult<unsigned int>::cend(v21); std::vector<unsigned int>::vector<unsigned int const*,void>(a1, bytes, v15, v18); } shaderc_result_release(v21[0]); } shaderc::CompileOptions::~CompileOptions((shaderc::CompileOptions *)v20); shaderc_compiler_release(v12); return a1; }
compileToSpirv: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBX,R8D MOV R13D,ECX MOV R15,RDX MOV R12,RSI MOV R14,RDI CALL 0x0021a719 MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x38],0x0 LAB_001908ed: CALL 0x0021a054 MOV qword ptr [RBP + -0x40],RAX LAB_001908f6: MOV RDI,RAX XOR ESI,ESI CALL 0x0021a239 MOV RDI,qword ptr [RBP + -0x40] CALL 0x0021a230 CMP R13D,0x14c0 JLE 0x00190939 LEA EAX,[R13 + -0x14c1] CMP EAX,0x5 JA 0x0019095e LEA RCX,[0x4d0e60] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_14c1: MOV R13D,0xe JMP 0x001909c2 LAB_00190939: CMP R13D,0x5 JA 0x00190ae5 MOV EAX,R13D LEA RCX,[0x4d0e48] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV R13D,0x4 JMP 0x001909c2 default: CMP R13D,0x14f4 JZ 0x001909a4 CMP R13D,0x14f5 JNZ 0x00190ae5 MOV R13D,0x1b JMP 0x001909c2 caseD_14c5: MOV R13D,0x11 JMP 0x001909c2 caseD_14c3: MOV R13D,0xf JMP 0x001909c2 caseD_14c4: MOV R13D,0x10 JMP 0x001909c2 caseD_14c2: MOV R13D,0x12 JMP 0x001909c2 caseD_2: MOV R13D,0x5 JMP 0x001909c2 LAB_001909a4: MOV R13D,0x1a JMP 0x001909c2 caseD_14c6: MOV R13D,0x13 JMP 0x001909c2 caseD_5: MOV R13D,0x2 JMP 0x001909c2 caseD_4: MOV R13D,0x1 caseD_0: MOV EDX,0x403000 CMP EBX,0x105ff JA 0x001909f0 MOV EDX,0x402000 CMP EBX,0x104ff JA 0x001909f0 XOR EDX,EDX CMP EBX,0x10300 SETNC DL SHL EDX,0xc OR EDX,0x400000 LAB_001909f0: MOV RDI,qword ptr [RBP + -0x40] LAB_001909f4: XOR ESI,ESI CALL 0x0021a28c MOV RDI,qword ptr [RBP + -0x40] MOV ESI,EBX CALL 0x0021a325 MOV RDI,qword ptr [RBP + -0x40] XOR ESI,ESI CALL 0x0021a21d MOV qword ptr [RBP + -0x30],0x0 MOV R8,qword ptr [R12] MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RAX,qword ptr [RBP + -0x40] LAB_00190a28: MOV qword ptr [RSP],RAX LEA R9,[0x51915a] MOV R15,qword ptr [RBP + -0x48] MOV RDI,R15 MOV ECX,R13D CALL 0x0021a79f MOV RBX,RAX MOV qword ptr [RBP + -0x30],RAX LAB_00190a49: XOR EDI,EDI CALL 0x0021b06c TEST RBX,RBX JZ 0x00190abd LAB_00190a55: MOV RDI,RBX CALL 0x0021b07d TEST EAX,EAX JNZ 0x00190abd MOV RDI,qword ptr [RBP + -0x30] TEST RDI,RDI JZ 0x00190a74 CALL 0x0021b066 MOV RBX,RAX JMP 0x00190a76 LAB_00190a74: XOR EBX,EBX LAB_00190a76: LEA RDI,[RBP + -0x30] CALL 0x00190b8c LAB_00190a7f: LEA RCX,[RBP + -0x68] MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX CALL 0x0017e030 LAB_00190a91: MOV RDI,qword ptr [RBP + -0x30] LAB_00190a95: CALL 0x0021b06c LAB_00190a9a: LEA RDI,[RBP + -0x40] CALL 0x00190c00 LAB_00190aa3: MOV RDI,R15 CALL 0x0021a780 MOV RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00190abd: MOV RAX,qword ptr [0x006c8f90] MOV RBX,qword ptr [RAX] LAB_00190ac7: LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x30] CALL 0x00190b42 LAB_00190ad4: LEA RDI,[RBP + -0x68] MOV RSI,RBX MOV RDX,R14 CALL 0x001809eb JMP 0x00190a91 default: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],0x0 MOV R15,qword ptr [RBP + -0x48] JMP 0x00190a9a
/* compileToSpirv(std::__cxx11::string const&, std::__cxx11::string const&, spv::ExecutionModel, unsigned int) */ uint * compileToSpirv(uint *param_1,int8 *param_2,int8 *param_3,int param_4,uint param_5 ) { int8 uVar1; int iVar2; long lVar3; uint *puVar4; allocator *paVar5; uint uVar6; int8 uVar7; int1 local_70 [32]; int8 local_50; int8 local_48; int8 local_40; long local_38; local_50 = shaderc_compiler_initialize(); local_40 = 0; /* try { // try from 001908ed to 001908f1 has its CatchHandler @ 00190b04 */ local_48 = shaderc_compile_options_initialize(); /* try { // try from 001908f6 to 00190908 has its CatchHandler @ 00190b0b */ shaderc_compile_options_set_optimization_level(local_48,0); shaderc_compile_options_set_generate_debug_info(local_48); if (param_4 < 0x14c1) { switch(param_4) { case 0: case 3: break; case 1: param_4 = 4; break; case 2: param_4 = 5; break; case 4: param_4 = 1; break; case 5: param_4 = 2; break; default: switchD_00190954_default: param_1[0] = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0; param_1[4] = 0; param_1[5] = 0; uVar7 = local_50; goto LAB_00190a9a; } } else { switch(param_4) { case 0x14c1: param_4 = 0xe; break; case 0x14c2: param_4 = 0x12; break; case 0x14c3: param_4 = 0xf; break; case 0x14c4: param_4 = 0x10; break; case 0x14c5: param_4 = 0x11; break; case 0x14c6: param_4 = 0x13; break; default: if (param_4 == 0x14f4) { param_4 = 0x1a; } else { if (param_4 != 0x14f5) goto switchD_00190954_default; param_4 = 0x1b; } } } uVar6 = 0x403000; if ((param_5 < 0x10600) && (uVar6 = 0x402000, param_5 < 0x10500)) { uVar6 = (uint)(0x102ff < param_5) << 0xc | 0x400000; } /* try { // try from 001909f4 to 00190a10 has its CatchHandler @ 00190b1b */ shaderc_compile_options_set_target_env(local_48,0,uVar6); shaderc_compile_options_set_target_spirv(local_48,param_5); shaderc_compile_options_set_source_language(local_48,0); uVar7 = local_50; local_38 = 0; /* try { // try from 00190a28 to 00190a41 has its CatchHandler @ 00190b00 */ lVar3 = shaderc_compile_into_spv(local_50,*param_3,param_3[1],param_4,*param_2,"main",local_48); local_38 = lVar3; /* try { // try from 00190a49 to 00190a4f has its CatchHandler @ 00190afe */ shaderc_result_release(0); /* try { // try from 00190a55 to 00190a7e has its CatchHandler @ 00190b0d */ if ((lVar3 == 0) || (iVar2 = shaderc_result_get_compilation_status(lVar3), iVar2 != 0)) { uVar1 = *(int8 *)PTR_stderr_006c8f90; /* try { // try from 00190ac7 to 00190ad3 has its CatchHandler @ 00190b09 */ shaderc::CompilationResult<unsigned_int>::GetErrorMessage_abi_cxx11_(); compileToSpirv(local_70,uVar1,param_1); } else { if (local_38 == 0) { puVar4 = (uint *)0x0; } else { puVar4 = (uint *)shaderc_result_get_bytes(); } paVar5 = (allocator *) shaderc::CompilationResult<unsigned_int>::cend ((CompilationResult<unsigned_int> *)&local_38); /* try { // try from 00190a7f to 00190a90 has its CatchHandler @ 00190afa */ std::vector<unsigned_int,std::allocator<unsigned_int>>::vector<unsigned_int_const*,void> (param_1,puVar4,paVar5); } /* try { // try from 00190a95 to 00190a99 has its CatchHandler @ 00190afc */ shaderc_result_release(local_38); LAB_00190a9a: shaderc::CompileOptions::~CompileOptions((CompileOptions *)&local_48); /* try { // try from 00190aa3 to 00190aaa has its CatchHandler @ 00190b02 */ shaderc_compiler_release(uVar7); return param_1; }
61,426
rw_pr_wrlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_wrlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); if (rwlock->active_readers != 0) { /* There are active readers. We have to wait until they are gone. */ rwlock->writers_waiting_readers++; while (rwlock->active_readers != 0) pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock); rwlock->writers_waiting_readers--; } /* We own 'lock' mutex so there is no active writers. Also there are no active readers. This means that we can grant wr-lock. Not releasing 'lock' mutex until unlock will block both requests for rd and wr-locks. Set 'active_writer' flag to simplify unlock. Thanks to the fact wr-lock/unlock in the absence of contention from readers is essentially mutex lock/unlock with a few simple checks make this rwlock implementation wr-lock optimized. */ rwlock->active_writer= TRUE; #ifdef SAFE_MUTEX rwlock->writer_thread= pthread_self(); #endif return 0; }
O0
c
rw_pr_wrlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x243e0 movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0x32266 movq -0x8(%rbp), %rax movl 0x5c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x5c(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0x32259 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi callq 0x24460 jmp 0x3223c movq -0x8(%rbp), %rax movl 0x5c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x5c(%rax) movq -0x8(%rbp), %rax movb $0x1, 0x60(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_wrlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jz short loc_32266 mov rax, [rbp+var_8] mov ecx, [rax+5Ch] add ecx, 1 mov [rax+5Ch], ecx loc_3223C: mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jz short loc_32259 mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] call _pthread_cond_wait jmp short loc_3223C loc_32259: mov rax, [rbp+var_8] mov ecx, [rax+5Ch] add ecx, 0FFFFFFFFh mov [rax+5Ch], ecx loc_32266: mov rax, [rbp+var_8] mov byte ptr [rax+60h], 1 xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_wrlock(long long a1) { pthread_mutex_lock(a1); if ( *(_DWORD *)(a1 + 88) ) { ++*(_DWORD *)(a1 + 92); while ( *(_DWORD *)(a1 + 88) ) pthread_cond_wait(a1 + 40, a1); --*(_DWORD *)(a1 + 92); } *(_BYTE *)(a1 + 96) = 1; return 0LL; }
rw_pr_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x001243e0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JZ 0x00132266 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x5c] ADD ECX,0x1 MOV dword ptr [RAX + 0x5c],ECX LAB_0013223c: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JZ 0x00132259 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] CALL 0x00124460 JMP 0x0013223c LAB_00132259: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x5c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x5c],ECX LAB_00132266: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x1 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_wrlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); if (*(int *)((long)param_1 + 0x58) != 0) { *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1; while (*(int *)((long)param_1 + 0x58) != 0) { pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1); } *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1; } *(int1 *)((long)param_1 + 0x60) = 1; return 0; }
61,427
my_strxfrm_pad_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend) { uchar *str0= str; DBUG_ASSERT(str && str <= strend); for ( ; str < strend ; ) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O3
c
my_strxfrm_pad_unicode: movq %rdi, %rax cmpq %rsi, %rdi jae 0x52394 pushq %rbp movq %rsp, %rbp movq %rdi, %rcx leaq 0x1(%rcx), %rax movb $0x0, (%rcx) cmpq %rsi, %rax jae 0x5238b movb $0x20, 0x1(%rcx) addq $0x2, %rcx movq %rcx, %rax movq %rax, %rcx cmpq %rsi, %rax jb 0x52374 popq %rbp subq %rdi, %rax retq
my_strxfrm_pad_unicode: mov rax, rdi cmp rdi, rsi jnb short loc_52394 push rbp mov rbp, rsp mov rcx, rdi loc_52374: lea rax, [rcx+1] mov byte ptr [rcx], 0 cmp rax, rsi jnb short loc_5238B mov byte ptr [rcx+1], 20h ; ' ' add rcx, 2 mov rax, rcx loc_5238B: mov rcx, rax cmp rax, rsi jb short loc_52374 pop rbp loc_52394: sub rax, rdi retn
long long my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2) { _BYTE *v2; // rax _BYTE *v3; // rcx v2 = a1; if ( (unsigned long long)a1 < a2 ) { v3 = a1; do { v2 = v3 + 1; *v3 = 0; if ( (unsigned long long)(v3 + 1) < a2 ) { v3[1] = 32; v2 = v3 + 2; } v3 = v2; } while ( (unsigned long long)v2 < a2 ); } return v2 - a1; }
my_strxfrm_pad_unicode: MOV RAX,RDI CMP RDI,RSI JNC 0x00152394 PUSH RBP MOV RBP,RSP MOV RCX,RDI LAB_00152374: LEA RAX,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP RAX,RSI JNC 0x0015238b MOV byte ptr [RCX + 0x1],0x20 ADD RCX,0x2 MOV RAX,RCX LAB_0015238b: MOV RCX,RAX CMP RAX,RSI JC 0x00152374 POP RBP LAB_00152394: SUB RAX,RDI RET
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2) { int1 *puVar1; int1 *puVar2; puVar2 = param_1; puVar1 = param_1; if (param_1 < param_2) { do { puVar2 = puVar1 + 1; *puVar1 = 0; if (puVar2 < param_2) { puVar1[1] = 0x20; puVar2 = puVar1 + 2; } puVar1 = puVar2; } while (puVar2 < param_2); } return (long)puVar2 - (long)param_1; }
61,428
ft_init_boolean_search
eloqsql/storage/myisam/ft_boolean_search.c
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query, uint query_len, CHARSET_INFO *cs) { FTB *ftb; FTB_EXPR *ftbe; FTB_WORD *ftbw; if (!(ftb=(FTB *)my_malloc(mi_key_memory_FTB, sizeof(FTB), MYF(MY_WME)))) return 0; ftb->please= (struct _ft_vft *) & _ft_vft_boolean; ftb->state=UNINITIALIZED; ftb->info=info; ftb->keynr=keynr; ftb->charset=cs; DBUG_ASSERT(keynr==NO_SUCH_KEY || cs == info->s->keyinfo[keynr].seg->charset); ftb->with_scan=0; ftb->lastpos=HA_OFFSET_ERROR; bzero(& ftb->no_dupes, sizeof(TREE)); ftb->last_word= 0; init_alloc_root(mi_key_memory_FTB, &ftb->mem_root, 1024, 1024, MYF(0)); ftb->queue.max_elements= 0; if (!(ftbe=(FTB_EXPR *)alloc_root(&ftb->mem_root, sizeof(FTB_EXPR)))) goto err; ftbe->weight=1; ftbe->flags=FTB_FLAG_YES; ftbe->nos=1; ftbe->up=0; ftbe->max_docid= ftbe->ythresh= ftbe->yweaks= 0; ftbe->docid[0]=ftbe->docid[1]=HA_OFFSET_ERROR; ftbe->phrase= NULL; ftbe->document= 0; ftb->root=ftbe; if (unlikely(_ftb_parse_query(ftb, query, query_len, keynr == NO_SUCH_KEY ? &ft_default_parser : info->s->keyinfo[keynr].parser))) goto err; /* Hack: instead of init_queue, we'll use reinit queue to be able to alloc queue with alloc_root() */ if (! (ftb->queue.root= (uchar **)alloc_root(&ftb->mem_root, (ftb->queue.max_elements + 1) * sizeof(void *)))) goto err; reinit_queue(&ftb->queue, ftb->queue.max_elements, 0, 0, (int (*)(void*, uchar*, uchar*))FTB_WORD_cmp, 0, 0, 0); for (ftbw= ftb->last_word; ftbw; ftbw= ftbw->prev) queue_insert(&ftb->queue, (uchar *)ftbw); ftb->list=(FTB_WORD **)alloc_root(&ftb->mem_root, sizeof(FTB_WORD *)*ftb->queue.elements); memcpy(ftb->list, &queue_top(&ftb->queue), sizeof(FTB_WORD *)*ftb->queue.elements); my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *), (qsort2_cmp)FTB_WORD_cmp_list, (void*)ftb->charset); if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC; ftb->state=READY; return ftb; err: free_root(& ftb->mem_root, MYF(0)); my_free(ftb); return 0; }
O3
c
ft_init_boolean_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movl %ecx, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movl %esi, %r13d movq %rdi, %r15 leaq 0xb8e028(%rip), %r12 # 0xbff97c movl (%r12), %edi movl $0x350, %esi # imm = 0x350 movl $0x10, %edx callq 0x9fd89 xorl %ecx, %ecx testq %rax, %rax je 0x71b5b movq %rax, %rbx leaq 0x309abc(%rip), %rax # 0x37b438 movq %rax, (%rbx) movl %ecx, 0x348(%rbx) movq %r15, 0x8(%rbx) movl %r13d, 0x340(%rbx) movq %r14, 0x10(%rbx) movb $0x0, 0x344(%rbx) movq $-0x1, 0x338(%rbx) leaq 0xa0(%rbx), %rdi movl $0x298, %edx # imm = 0x298 xorl %esi, %esi callq 0x292c0 movq $0x0, 0x28(%rbx) movl (%r12), %edi leaq 0x30(%rbx), %r14 movl $0x400, %edx # imm = 0x400 movl $0x400, %ecx # imm = 0x400 movq %r14, %rsi xorl %r8d, %r8d callq 0x9cb1c xorl %eax, %eax movl %eax, 0x84(%rbx) movl $0x50, %esi movq %r14, %rdi callq 0x9cc73 testq %rax, %rax je 0x71b49 movl $0x3f800000, 0x28(%rax) # imm = 0x3F800000 movl $0x2, 0x8(%rax) movl $0x1, 0x44(%rax) xorl %ecx, %ecx movq %rcx, (%rax) movq %rcx, 0x48(%rax) movq %rcx, 0x20(%rax) pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x10(%rax) pxor %xmm0, %xmm0 movdqu %xmm0, 0x30(%rax) movq %rax, 0x18(%rbx) cmpl $-0x1, %r13d je 0x71a52 movq (%r15), %rax movq 0x218(%rax), %rax movl %r13d, %ecx imulq $0x70, %rcx, %rcx movq 0x38(%rax,%rcx), %r15 jmp 0x71a59 leaq 0x3138a7(%rip), %r15 # 0x385300 cmpl $0x0, 0x348(%rbx) jne 0x71ae6 movq 0x8(%rbx), %rdi movl 0x340(%rbx), %esi xorl %edx, %edx callq 0x73ef5 testq %rax, %rax je 0x71b49 leaq -0x58(%rbp), %rcx movq %rbx, (%rcx) movl $0x0, 0x18(%rcx) movq 0x18(%rbx), %rdx movq %rdx, 0x8(%rcx) movq $0x0, 0x10(%rcx) leaq 0xc93(%rip), %rdx # 0x72738 movq %rdx, (%rax) leaq 0xd1e(%rip), %rdx # 0x727cd movq %rdx, 0x8(%rax) movq %rcx, 0x18(%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x20(%rax) movq -0x38(%rbp), %rcx movq %rcx, 0x28(%rax) movl -0x2c(%rbp), %ecx movl %ecx, 0x30(%rax) movabsq $0x200000000, %rcx # imm = 0x200000000 movq %rcx, 0x34(%rax) movq %rax, %rdi callq *0x8(%r15) testl %eax, %eax jne 0x71b49 movl 0x84(%rbx), %esi incl %esi shlq $0x3, %rsi movq %r14, %rdi callq 0x9cc73 movq %rax, 0x70(%rbx) testq %rax, %rax je 0x71b49 movq %rbx, %r15 addq $0x70, %r15 movl 0x84(%rbx), %esi xorl %eax, %eax leaq 0xc1(%rip), %r8 # 0x71bda movq %r15, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r9d, %r9d pushq %rax pushq %rax callq 0xa20bb addq $0x10, %rsp movq 0x28(%rbx), %r12 testq %r12, %r12 je 0x71b5f movq %r15, %rdi movq %r12, %rsi callq 0xa216f movq 0x38(%r12), %r12 jmp 0x71b32 movq %r14, %rdi xorl %esi, %esi callq 0x9ceeb movq %rbx, %rdi callq 0x9ffb6 xorl %ebx, %ebx jmp 0x71bc8 movl 0x80(%rbx), %esi shlq $0x3, %rsi movq %r14, %rdi callq 0x9cc73 movq %rax, 0x20(%rbx) movq 0x70(%rbx), %rsi addq $0x8, %rsi movl 0x80(%rbx), %edx shlq $0x3, %rdx movq %rax, %rdi callq 0x29080 movq 0x10(%rbx), %r8 movq 0x20(%rbx), %rdi movl 0x80(%rbx), %esi leaq 0x72(%rip), %rcx # 0x71c16 movl $0x8, %edx callq 0x9bf08 cmpl $0x1, 0x80(%rbx) ja 0x71bbe andb $-0x2, 0x344(%rbx) movl $0x1, 0x348(%rbx) movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ft_init_boolean_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov [rbp+var_2C], ecx mov [rbp+var_38], rdx mov r13d, esi mov r15, rdi lea r12, mi_key_memory_FTB mov edi, [r12] mov esi, 350h mov edx, 10h call my_malloc xor ecx, ecx test rax, rax jz loc_71B5B mov rbx, rax lea rax, _ft_vft_boolean mov [rbx], rax mov [rbx+348h], ecx mov [rbx+8], r15 mov [rbx+340h], r13d mov [rbx+10h], r14 mov byte ptr [rbx+344h], 0 mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh lea rdi, [rbx+0A0h] mov edx, 298h xor esi, esi call _memset mov qword ptr [rbx+28h], 0 mov edi, [r12] lea r14, [rbx+30h] mov edx, 400h mov ecx, 400h mov rsi, r14 xor r8d, r8d call init_alloc_root xor eax, eax mov [rbx+84h], eax mov esi, 50h ; 'P' mov rdi, r14 call alloc_root test rax, rax jz loc_71B49 mov dword ptr [rax+28h], 3F800000h mov dword ptr [rax+8], 2 mov dword ptr [rax+44h], 1 xor ecx, ecx mov [rax], rcx mov [rax+48h], rcx mov [rax+20h], rcx pcmpeqd xmm0, xmm0 movdqu xmmword ptr [rax+10h], xmm0 pxor xmm0, xmm0 movdqu xmmword ptr [rax+30h], xmm0 mov [rbx+18h], rax cmp r13d, 0FFFFFFFFh jz short loc_71A52 mov rax, [r15] mov rax, [rax+218h] mov ecx, r13d imul rcx, 70h ; 'p' mov r15, [rax+rcx+38h] jmp short loc_71A59 loc_71A52: lea r15, ft_default_parser loc_71A59: cmp dword ptr [rbx+348h], 0 jnz loc_71AE6 mov rdi, [rbx+8] mov esi, [rbx+340h] xor edx, edx call ftparser_call_initializer test rax, rax jz loc_71B49 lea rcx, [rbp+var_58] mov [rcx], rbx mov dword ptr [rcx+18h], 0 mov rdx, [rbx+18h] mov [rcx+8], rdx mov qword ptr [rcx+10h], 0 lea rdx, ftb_parse_query_internal mov [rax], rdx lea rdx, ftb_query_add_word mov [rax+8], rdx mov [rax+18h], rcx mov rcx, [rbx+10h] mov [rax+20h], rcx mov rcx, [rbp+var_38] mov [rax+28h], rcx mov ecx, [rbp+var_2C] mov [rax+30h], ecx mov rcx, 200000000h mov [rax+34h], rcx mov rdi, rax call qword ptr [r15+8] test eax, eax jnz short loc_71B49 loc_71AE6: mov esi, [rbx+84h] inc esi shl rsi, 3 mov rdi, r14 call alloc_root mov [rbx+70h], rax test rax, rax jz short loc_71B49 mov r15, rbx add r15, 70h ; 'p' mov esi, [rbx+84h] xor eax, eax lea r8, FTB_WORD_cmp mov rdi, r15 xor edx, edx xor ecx, ecx xor r9d, r9d push rax push rax call reinit_queue add rsp, 10h mov r12, [rbx+28h] loc_71B32: test r12, r12 jz short loc_71B5F mov rdi, r15 mov rsi, r12 call queue_insert mov r12, [r12+38h] jmp short loc_71B32 loc_71B49: mov rdi, r14 xor esi, esi call free_root mov rdi, rbx call my_free loc_71B5B: xor ebx, ebx jmp short loc_71BC8 loc_71B5F: mov esi, [rbx+80h] shl rsi, 3 mov rdi, r14 call alloc_root mov [rbx+20h], rax mov rsi, [rbx+70h] add rsi, 8 mov edx, [rbx+80h] shl rdx, 3 mov rdi, rax call _memcpy mov r8, [rbx+10h] mov rdi, [rbx+20h] mov esi, [rbx+80h] lea rcx, FTB_WORD_cmp_list mov edx, 8 call my_qsort2 cmp dword ptr [rbx+80h], 1 ja short loc_71BBE and byte ptr [rbx+344h], 0FEh loc_71BBE: mov dword ptr [rbx+348h], 1 loc_71BC8: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ft_init_boolean_search(long long a1, unsigned int a2, long long a3, int a4, long long a5) { long long v6; // rax long long v7; // rbx long long v8; // rax unsigned int ( **v9)(long long); // r15 long long v10; // rax long long v11; // rax long long i; // r12 long long v13; // rax _QWORD v15[3]; // [rsp+8h] [rbp-58h] BYREF int v16; // [rsp+20h] [rbp-40h] long long v17; // [rsp+28h] [rbp-38h] int v18; // [rsp+34h] [rbp-2Ch] v18 = a4; v17 = a3; v6 = my_malloc(mi_key_memory_FTB, 848LL, 16LL); if ( !v6 ) return 0LL; v7 = v6; *(_QWORD *)v6 = ft_vft_boolean; *(_DWORD *)(v6 + 840) = 0; *(_QWORD *)(v6 + 8) = a1; *(_DWORD *)(v6 + 832) = a2; *(_QWORD *)(v6 + 16) = a5; *(_BYTE *)(v6 + 836) = 0; *(_QWORD *)(v6 + 824) = -1LL; memset(v6 + 160, 0LL, 664LL); *(_QWORD *)(v7 + 40) = 0LL; init_alloc_root(mi_key_memory_FTB, v7 + 48, 1024LL, 1024LL, 0LL); *(_DWORD *)(v7 + 132) = 0; v8 = alloc_root(v7 + 48, 80LL); if ( !v8 ) goto LABEL_13; *(_DWORD *)(v8 + 40) = 1065353216; *(_DWORD *)(v8 + 8) = 2; *(_DWORD *)(v8 + 68) = 1; *(_QWORD *)v8 = 0LL; *(_QWORD *)(v8 + 72) = 0LL; *(_QWORD *)(v8 + 32) = 0LL; *(_OWORD *)(v8 + 16) = -1LL; *(_OWORD *)(v8 + 48) = 0LL; *(_QWORD *)(v7 + 24) = v8; v9 = a2 == -1 ? (unsigned int ( **)(long long))&ft_default_parser : *(unsigned int ( ***)(long long))(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2 + 56); if ( !*(_DWORD *)(v7 + 840) ) { v10 = ftparser_call_initializer(*(_QWORD *)(v7 + 8), *(unsigned int *)(v7 + 832), 0LL, 0.0); if ( !v10 ) goto LABEL_13; v15[0] = v7; v16 = 0; v15[1] = *(_QWORD *)(v7 + 24); v15[2] = 0LL; *(_QWORD *)v10 = ftb_parse_query_internal; *(_QWORD *)(v10 + 8) = ftb_query_add_word; *(_QWORD *)(v10 + 24) = v15; *(_QWORD *)(v10 + 32) = *(_QWORD *)(v7 + 16); *(_QWORD *)(v10 + 40) = v17; *(_DWORD *)(v10 + 48) = v18; *(_QWORD *)(v10 + 52) = 0x200000000LL; if ( v9[1](v10) ) goto LABEL_13; } v11 = alloc_root(v7 + 48, 8LL * (unsigned int)(*(_DWORD *)(v7 + 132) + 1)); *(_QWORD *)(v7 + 112) = v11; if ( !v11 ) { LABEL_13: free_root(v7 + 48, 0LL); my_free(v7); return 0LL; } reinit_queue(v7 + 112, *(_DWORD *)(v7 + 132), 0, 0, (unsigned int)FTB_WORD_cmp, 0, 0, 0); for ( i = *(_QWORD *)(v7 + 40); i; i = *(_QWORD *)(i + 56) ) queue_insert(v7 + 112, i); v13 = alloc_root(v7 + 48, 8LL * *(unsigned int *)(v7 + 128)); *(_QWORD *)(v7 + 32) = v13; memcpy(v13, *(_QWORD *)(v7 + 112) + 8LL, 8LL * *(unsigned int *)(v7 + 128)); my_qsort2(*(_QWORD *)(v7 + 32), *(unsigned int *)(v7 + 128), 8LL, FTB_WORD_cmp_list, *(_QWORD *)(v7 + 16)); if ( *(_DWORD *)(v7 + 128) <= 1u ) *(_BYTE *)(v7 + 836) &= ~1u; *(_DWORD *)(v7 + 840) = 1; return v7; }
ft_init_boolean_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV dword ptr [RBP + -0x2c],ECX MOV qword ptr [RBP + -0x38],RDX MOV R13D,ESI MOV R15,RDI LEA R12,[0xcff97c] MOV EDI,dword ptr [R12] MOV ESI,0x350 MOV EDX,0x10 CALL 0x0019fd89 XOR ECX,ECX TEST RAX,RAX JZ 0x00171b5b MOV RBX,RAX LEA RAX,[0x47b438] MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x348],ECX MOV qword ptr [RBX + 0x8],R15 MOV dword ptr [RBX + 0x340],R13D MOV qword ptr [RBX + 0x10],R14 MOV byte ptr [RBX + 0x344],0x0 MOV qword ptr [RBX + 0x338],-0x1 LEA RDI,[RBX + 0xa0] MOV EDX,0x298 XOR ESI,ESI CALL 0x001292c0 MOV qword ptr [RBX + 0x28],0x0 MOV EDI,dword ptr [R12] LEA R14,[RBX + 0x30] MOV EDX,0x400 MOV ECX,0x400 MOV RSI,R14 XOR R8D,R8D CALL 0x0019cb1c XOR EAX,EAX MOV dword ptr [RBX + 0x84],EAX MOV ESI,0x50 MOV RDI,R14 CALL 0x0019cc73 TEST RAX,RAX JZ 0x00171b49 MOV dword ptr [RAX + 0x28],0x3f800000 MOV dword ptr [RAX + 0x8],0x2 MOV dword ptr [RAX + 0x44],0x1 XOR ECX,ECX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x48],RCX MOV qword ptr [RAX + 0x20],RCX PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x10],XMM0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x30],XMM0 MOV qword ptr [RBX + 0x18],RAX CMP R13D,-0x1 JZ 0x00171a52 MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,R13D IMUL RCX,RCX,0x70 MOV R15,qword ptr [RAX + RCX*0x1 + 0x38] JMP 0x00171a59 LAB_00171a52: LEA R15,[0x485300] LAB_00171a59: CMP dword ptr [RBX + 0x348],0x0 JNZ 0x00171ae6 MOV RDI,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RBX + 0x340] XOR EDX,EDX CALL 0x00173ef5 TEST RAX,RAX JZ 0x00171b49 LEA RCX,[RBP + -0x58] MOV qword ptr [RCX],RBX MOV dword ptr [RCX + 0x18],0x0 MOV RDX,qword ptr [RBX + 0x18] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RCX + 0x10],0x0 LEA RDX,[0x172738] MOV qword ptr [RAX],RDX LEA RDX,[0x1727cd] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + 0x30],ECX MOV RCX,0x200000000 MOV qword ptr [RAX + 0x34],RCX MOV RDI,RAX CALL qword ptr [R15 + 0x8] TEST EAX,EAX JNZ 0x00171b49 LAB_00171ae6: MOV ESI,dword ptr [RBX + 0x84] INC ESI SHL RSI,0x3 MOV RDI,R14 CALL 0x0019cc73 MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x00171b49 MOV R15,RBX ADD R15,0x70 MOV ESI,dword ptr [RBX + 0x84] XOR EAX,EAX LEA R8,[0x171bda] MOV RDI,R15 XOR EDX,EDX XOR ECX,ECX XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x001a20bb ADD RSP,0x10 MOV R12,qword ptr [RBX + 0x28] LAB_00171b32: TEST R12,R12 JZ 0x00171b5f MOV RDI,R15 MOV RSI,R12 CALL 0x001a216f MOV R12,qword ptr [R12 + 0x38] JMP 0x00171b32 LAB_00171b49: MOV RDI,R14 XOR ESI,ESI CALL 0x0019ceeb MOV RDI,RBX CALL 0x0019ffb6 LAB_00171b5b: XOR EBX,EBX JMP 0x00171bc8 LAB_00171b5f: MOV ESI,dword ptr [RBX + 0x80] SHL RSI,0x3 MOV RDI,R14 CALL 0x0019cc73 MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RBX + 0x70] ADD RSI,0x8 MOV EDX,dword ptr [RBX + 0x80] SHL RDX,0x3 MOV RDI,RAX CALL 0x00129080 MOV R8,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0x20] MOV ESI,dword ptr [RBX + 0x80] LEA RCX,[0x171c16] MOV EDX,0x8 CALL 0x0019bf08 CMP dword ptr [RBX + 0x80],0x1 JA 0x00171bbe AND byte ptr [RBX + 0x344],0xfe LAB_00171bbe: MOV dword ptr [RBX + 0x348],0x1 LAB_00171bc8: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * ft_init_boolean_search (long *param_1,uint param_2,int8 param_3,int4 param_4,int8 param_5) { int8 *puVar1; int iVar2; int8 *puVar3; int8 *puVar4; long lVar5; void *__dest; int1 *puVar6; int8 *local_60; int8 local_58; int8 local_50; int4 local_48; int8 local_40; int4 local_34; local_40 = param_3; local_34 = param_4; puVar3 = (int8 *)my_malloc(mi_key_memory_FTB,0x350,0x10); if (puVar3 == (int8 *)0x0) { return (int8 *)0x0; } *puVar3 = _ft_vft_boolean; *(int4 *)(puVar3 + 0x69) = 0; puVar3[1] = param_1; *(uint *)(puVar3 + 0x68) = param_2; puVar3[2] = param_5; *(int1 *)((long)puVar3 + 0x344) = 0; puVar3[0x67] = 0xffffffffffffffff; memset(puVar3 + 0x14,0,0x298); puVar3[5] = 0; puVar1 = puVar3 + 6; init_alloc_root(mi_key_memory_FTB,puVar1,0x400,0x400,0); *(int4 *)((long)puVar3 + 0x84) = 0; puVar4 = (int8 *)alloc_root(puVar1,0x50); if (puVar4 == (int8 *)0x0) goto LAB_00171b49; *(int4 *)(puVar4 + 5) = 0x3f800000; *(int4 *)(puVar4 + 1) = 2; *(int4 *)((long)puVar4 + 0x44) = 1; *puVar4 = 0; puVar4[9] = 0; puVar4[4] = 0; *(int4 *)(puVar4 + 2) = 0xffffffff; *(int4 *)((long)puVar4 + 0x14) = 0xffffffff; *(int4 *)(puVar4 + 3) = 0xffffffff; *(int4 *)((long)puVar4 + 0x1c) = 0xffffffff; *(int1 (*) [16])(puVar4 + 6) = (int1 [16])0x0; puVar3[3] = puVar4; if (param_2 == 0xffffffff) { puVar6 = ft_default_parser; } else { puVar6 = *(int1 **)(*(long *)(*param_1 + 0x218) + 0x38 + (ulong)param_2 * 0x70); } if (*(int *)(puVar3 + 0x69) == 0) { puVar4 = (int8 *)ftparser_call_initializer(puVar3[1],*(int4 *)(puVar3 + 0x68),0); if (puVar4 == (int8 *)0x0) goto LAB_00171b49; local_48 = 0; local_58 = puVar3[3]; local_50 = 0; *puVar4 = ftb_parse_query_internal; puVar4[1] = ftb_query_add_word; puVar4[3] = &local_60; puVar4[4] = puVar3[2]; puVar4[5] = local_40; *(int4 *)(puVar4 + 6) = local_34; *(int8 *)((long)puVar4 + 0x34) = 0x200000000; local_60 = puVar3; iVar2 = (**(code **)(puVar6 + 8))(puVar4); if (iVar2 != 0) goto LAB_00171b49; } lVar5 = alloc_root(puVar1,(ulong)(*(int *)((long)puVar3 + 0x84) + 1) << 3); puVar3[0xe] = lVar5; if (lVar5 != 0) { reinit_queue(puVar3 + 0xe,*(int4 *)((long)puVar3 + 0x84),0,0,FTB_WORD_cmp,0,0,0); for (lVar5 = puVar3[5]; lVar5 != 0; lVar5 = *(long *)(lVar5 + 0x38)) { queue_insert(puVar3 + 0xe,lVar5); } __dest = (void *)alloc_root(puVar1,(ulong)*(uint *)(puVar3 + 0x10) << 3); puVar3[4] = __dest; memcpy(__dest,(void *)(puVar3[0xe] + 8),(ulong)*(uint *)(puVar3 + 0x10) << 3); my_qsort2(puVar3[4],*(int4 *)(puVar3 + 0x10),8,FTB_WORD_cmp_list,puVar3[2]); if (*(uint *)(puVar3 + 0x10) < 2) { *(byte *)((long)puVar3 + 0x344) = *(byte *)((long)puVar3 + 0x344) & 0xfe; } *(int4 *)(puVar3 + 0x69) = 1; return puVar3; } LAB_00171b49: free_root(puVar1,0); my_free(puVar3); return (int8 *)0x0; }
61,429
maria_scan_init
eloqsql/storage/maria/ma_scan.c
int maria_scan_init(register MARIA_HA *info) { DBUG_ENTER("maria_scan_init"); info->cur_row.nextpos= info->s->pack.header_length; /* Read first record */ info->lastinx= -1; /* Can't forward or backward */ if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); if ((*info->s->scan_init)(info)) DBUG_RETURN(my_errno); DBUG_RETURN(0); }
O3
c
maria_scan_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax movq 0x590(%rax), %rcx movq %rcx, 0xa0(%rdi) movl $0xffffffff, 0x62c(%rdi) # imm = 0xFFFFFFFF testb $0x10, 0x61c(%rdi) je 0x417c5 leaq 0x4b8(%rbx), %rdi movl $0x1, %esi callq 0x9a355 testl %eax, %eax jne 0x417d2 movq (%rbx), %rax movq %rbx, %rdi callq *0x650(%rax) testb %al, %al je 0x417db callq 0xa8dda movl (%rax), %eax jmp 0x417dd xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
maria_scan_init: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, [rdi] mov rcx, [rax+590h] mov [rdi+0A0h], rcx mov dword ptr [rdi+62Ch], 0FFFFFFFFh test byte ptr [rdi+61Ch], 10h jz short loc_417C5 lea rdi, [rbx+4B8h] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz short loc_417D2 mov rax, [rbx] loc_417C5: mov rdi, rbx call qword ptr [rax+650h] test al, al jz short loc_417DB loc_417D2: call _my_thread_var mov eax, [rax] jmp short loc_417DD loc_417DB: xor eax, eax loc_417DD: add rsp, 8 pop rbx pop rbp retn
long long maria_scan_init(long long *a1, const char *a2) { long long v3; // rax long long *v4; // rdi v3 = *a1; a1[20] = *(_QWORD *)(*a1 + 1424); *((_DWORD *)a1 + 395) = -1; if ( (*((_BYTE *)a1 + 1564) & 0x10) != 0 ) { v4 = a1 + 151; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v4, 1LL) ) return *(unsigned int *)my_thread_var(v4, a2); v3 = *a1; } v4 = a1; if ( (*(unsigned __int8 ( **)(long long *))(v3 + 1616))(a1) ) return *(unsigned int *)my_thread_var(v4, a2); return 0LL; }
maria_scan_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0x590] MOV qword ptr [RDI + 0xa0],RCX MOV dword ptr [RDI + 0x62c],0xffffffff TEST byte ptr [RDI + 0x61c],0x10 JZ 0x001417c5 LEA RDI,[RBX + 0x4b8] MOV ESI,0x1 CALL 0x0019a355 TEST EAX,EAX JNZ 0x001417d2 MOV RAX,qword ptr [RBX] LAB_001417c5: MOV RDI,RBX CALL qword ptr [RAX + 0x650] TEST AL,AL JZ 0x001417db LAB_001417d2: CALL 0x001a8dda MOV EAX,dword ptr [RAX] JMP 0x001417dd LAB_001417db: XOR EAX,EAX LAB_001417dd: ADD RSP,0x8 POP RBX POP RBP RET
int4 maria_scan_init(long *param_1) { char cVar1; int iVar2; long lVar3; int4 *puVar4; lVar3 = *param_1; param_1[0x14] = *(long *)(lVar3 + 0x590); *(int4 *)((long)param_1 + 0x62c) = 0xffffffff; if ((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) { iVar2 = my_b_flush_io_cache(param_1 + 0x97,1); if (iVar2 != 0) goto LAB_001417d2; lVar3 = *param_1; } cVar1 = (**(code **)(lVar3 + 0x650))(param_1); if (cVar1 == '\0') { return 0; } LAB_001417d2: puVar4 = (int4 *)_my_thread_var(); return *puVar4; }
61,430
check_hex
corpus-core[P]colibri-stateless/src/util/json_validate.c
static const char* check_hex(json_t val, int len, bool isuint, const char* error_prefix) { if (val.type != JSON_TYPE_STRING) ERROR("%sExpected hex string", error_prefix); if (val.start[1] != '0' && val.start[2] != 'x') ERROR("%sExpected hex prefixed (0x) string", error_prefix); int l = 0; for (int i = 3; i < val.len - 1; i++, l++) { if (!isxdigit(val.start[i])) ERROR("%sExpected hex string", error_prefix); } if (len > 0 && (l % 2 || l / 2 != len)) ERROR("%sExpected hex string with fixed size (%d) but got %d bytes", error_prefix, len, l / 2); if (isuint && (l == 0 || (val.start[3] == '0' && l > 1))) ERROR("%sno leading zeros allowed for uint", error_prefix); if (isuint && l / 2 > 32) ERROR("%sexpected uint with max 32 bytes length, but got %d bytes ", error_prefix, l / 2); if (len < 0 && l / 2 > (-len)) ERROR("%sexpected uint with max %d bytes length, but got %d bytes ", error_prefix, -len, l / 2); return NULL; }
O0
c
check_hex: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %cl leaq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) movl %edi, -0xc(%rbp) andb $0x1, %cl movb %cl, -0xd(%rbp) movq %rdx, -0x18(%rbp) cmpl $0x1, 0x10(%rax) je 0xa5965 movq -0x18(%rbp), %rdx xorl %eax, %eax movl %eax, %edi leaq 0x401e8(%rip), %rsi # 0xe5b3d movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 movq -0x28(%rbp), %rax movq (%rax), %rax movsbl 0x1(%rax), %eax cmpl $0x30, %eax je 0xa59a4 movq -0x28(%rbp), %rax movq (%rax), %rax movsbl 0x2(%rax), %eax cmpl $0x78, %eax je 0xa59a4 movq -0x18(%rbp), %rdx xorl %eax, %eax movl %eax, %edi leaq 0x401bf(%rip), %rsi # 0xe5b53 movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 movl $0x0, -0x1c(%rbp) movl $0x3, -0x20(%rbp) movq -0x28(%rbp), %rcx movslq -0x20(%rbp), %rax movq 0x8(%rcx), %rcx subq $0x1, %rcx cmpq %rcx, %rax jae 0xa5a24 callq 0x23250 movq -0x28(%rbp), %rcx movq (%rax), %rax movq (%rcx), %rcx movslq -0x20(%rbp), %rdx movsbl (%rcx,%rdx), %ecx movslq %ecx, %rcx movzwl (%rax,%rcx,2), %eax andl $0x1000, %eax # imm = 0x1000 cmpl $0x0, %eax jne 0xa5a0e movq -0x18(%rbp), %rdx xorl %eax, %eax movl %eax, %edi leaq 0x4013f(%rip), %rsi # 0xe5b3d movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 jmp 0xa5a10 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0xa59b2 cmpl $0x0, -0xc(%rbp) jle 0xa5a82 movl -0x1c(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx cmpl $0x0, %edx jne 0xa5a4a movl -0x1c(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx cmpl -0xc(%rbp), %eax je 0xa5a82 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movl -0xc(%rbp), %ecx movl -0x1c(%rbp), %eax movl $0x2, %esi cltd idivl %esi movq -0x30(%rbp), %rdx movl %eax, %r8d xorl %eax, %eax movl %eax, %edi leaq 0x40105(%rip), %rsi # 0xe5b77 movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 testb $0x1, -0xd(%rbp) je 0xa5ac3 cmpl $0x0, -0x1c(%rbp) je 0xa5aa4 movq -0x28(%rbp), %rax movq (%rax), %rax movsbl 0x3(%rax), %eax cmpl $0x30, %eax jne 0xa5ac3 cmpl $0x1, -0x1c(%rbp) jle 0xa5ac3 movq -0x18(%rbp), %rdx xorl %eax, %eax movl %eax, %edi leaq 0x40100(%rip), %rsi # 0xe5bb3 movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 testb $0x1, -0xd(%rbp) je 0xa5b0a movl -0x1c(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx cmpl $0x20, %eax jle 0xa5b0a movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x1c(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movq -0x38(%rbp), %rdx movl %eax, %ecx xorl %eax, %eax movl %eax, %edi leaq 0x400da(%rip), %rsi # 0xe5bd7 movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 cmpl $0x0, -0xc(%rbp) jge 0xa5b5b movl -0x1c(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx xorl %ecx, %ecx subl -0xc(%rbp), %ecx cmpl %ecx, %eax jle 0xa5b5b movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) xorl %ecx, %ecx subl -0xc(%rbp), %ecx movl -0x1c(%rbp), %eax movl $0x2, %esi cltd idivl %esi movq -0x40(%rbp), %rdx movl %eax, %r8d xorl %eax, %eax movl %eax, %edi leaq 0x400c5(%rip), %rsi # 0xe5c13 movb $0x0, %al callq 0x9d5a0 movq %rax, -0x8(%rbp) jmp 0xa5b63 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
check_hex: push rbp mov rbp, rsp sub rsp, 40h mov cl, sil lea rax, [rbp+arg_0] mov [rbp+var_28], rax mov [rbp+var_C], edi and cl, 1 mov [rbp+var_D], cl mov [rbp+var_18], rdx cmp dword ptr [rax+10h], 1 jz short loc_A5965 mov rdx, [rbp+var_18] xor eax, eax mov edi, eax lea rsi, aSexpectedHexSt; "%sExpected hex string" mov al, 0 call bprintf mov [rbp+var_8], rax jmp loc_A5B63 loc_A5965: mov rax, [rbp+var_28] mov rax, [rax] movsx eax, byte ptr [rax+1] cmp eax, 30h ; '0' jz short loc_A59A4 mov rax, [rbp+var_28] mov rax, [rax] movsx eax, byte ptr [rax+2] cmp eax, 78h ; 'x' jz short loc_A59A4 mov rdx, [rbp+var_18] xor eax, eax mov edi, eax lea rsi, aSexpectedHexPr; "%sExpected hex prefixed (0x) string" mov al, 0 call bprintf mov [rbp+var_8], rax jmp loc_A5B63 loc_A59A4: mov [rbp+var_1C], 0 mov [rbp+var_20], 3 loc_A59B2: mov rcx, [rbp+var_28] movsxd rax, [rbp+var_20] mov rcx, [rcx+8] sub rcx, 1 cmp rax, rcx jnb short loc_A5A24 call ___ctype_b_loc mov rcx, [rbp+var_28] mov rax, [rax] mov rcx, [rcx] movsxd rdx, [rbp+var_20] movsx ecx, byte ptr [rcx+rdx] movsxd rcx, ecx movzx eax, word ptr [rax+rcx*2] and eax, 1000h cmp eax, 0 jnz short loc_A5A0E mov rdx, [rbp+var_18] xor eax, eax mov edi, eax lea rsi, aSexpectedHexSt; "%sExpected hex string" mov al, 0 call bprintf mov [rbp+var_8], rax jmp loc_A5B63 loc_A5A0E: jmp short $+2 loc_A5A10: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_A59B2 loc_A5A24: cmp [rbp+var_C], 0 jle short loc_A5A82 mov eax, [rbp+var_1C] mov ecx, 2 cdq idiv ecx cmp edx, 0 jnz short loc_A5A4A mov eax, [rbp+var_1C] mov ecx, 2 cdq idiv ecx cmp eax, [rbp+var_C] jz short loc_A5A82 loc_A5A4A: mov rax, [rbp+var_18] mov [rbp+var_30], rax mov ecx, [rbp+var_C] mov eax, [rbp+var_1C] mov esi, 2 cdq idiv esi mov rdx, [rbp+var_30] mov r8d, eax xor eax, eax mov edi, eax lea rsi, aSexpectedHexSt_0; "%sExpected hex string with fixed size ("... mov al, 0 call bprintf mov [rbp+var_8], rax jmp loc_A5B63 loc_A5A82: test [rbp+var_D], 1 jz short loc_A5AC3 cmp [rbp+var_1C], 0 jz short loc_A5AA4 mov rax, [rbp+var_28] mov rax, [rax] movsx eax, byte ptr [rax+3] cmp eax, 30h ; '0' jnz short loc_A5AC3 cmp [rbp+var_1C], 1 jle short loc_A5AC3 loc_A5AA4: mov rdx, [rbp+var_18] xor eax, eax mov edi, eax lea rsi, aSnoLeadingZero; "%sno leading zeros allowed for uint" mov al, 0 call bprintf mov [rbp+var_8], rax jmp loc_A5B63 loc_A5AC3: test [rbp+var_D], 1 jz short loc_A5B0A mov eax, [rbp+var_1C] mov ecx, 2 cdq idiv ecx cmp eax, 20h ; ' ' jle short loc_A5B0A mov rax, [rbp+var_18] mov [rbp+var_38], rax mov eax, [rbp+var_1C] mov ecx, 2 cdq idiv ecx mov rdx, [rbp+var_38] mov ecx, eax xor eax, eax mov edi, eax lea rsi, aSexpectedUintW; "%sexpected uint with max 32 bytes lengt"... mov al, 0 call bprintf mov [rbp+var_8], rax jmp short loc_A5B63 loc_A5B0A: cmp [rbp+var_C], 0 jge short loc_A5B5B mov eax, [rbp+var_1C] mov ecx, 2 cdq idiv ecx xor ecx, ecx sub ecx, [rbp+var_C] cmp eax, ecx jle short loc_A5B5B mov rax, [rbp+var_18] mov [rbp+var_40], rax xor ecx, ecx sub ecx, [rbp+var_C] mov eax, [rbp+var_1C] mov esi, 2 cdq idiv esi mov rdx, [rbp+var_40] mov r8d, eax xor eax, eax mov edi, eax lea rsi, aSexpectedUintW_0; "%sexpected uint with max %d bytes lengt"... mov al, 0 call bprintf mov [rbp+var_8], rax jmp short loc_A5B63 loc_A5B5B: mov [rbp+var_8], 0 loc_A5B63: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long check_hex( int a1, char 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, _BYTE *a15, long long a16, int a17) { long long v17; // rcx _QWORD *v18; // rax char v20; // [rsp+0h] [rbp-40h] int i; // [rsp+20h] [rbp-20h] int v22; // [rsp+24h] [rbp-1Ch] LOBYTE(a4) = a2 & 1; if ( a17 != 1 ) return bprintf(0LL, (long long)"%sExpected hex string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); if ( a15[1] != 48 && a15[2] != 120 ) return bprintf( 0LL, (long long)"%sExpected hex prefixed (0x) string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); v22 = 0; for ( i = 3; ; ++i ) { v17 = a16 - 1; if ( i >= (unsigned long long)(a16 - 1) ) break; v18 = (_QWORD *)__ctype_b_loc(); a4 = (char)a15[i]; if ( (*(_WORD *)(*v18 + 2 * a4) & 0x1000) == 0 ) return bprintf(0LL, (long long)"%sExpected hex string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); ++v22; } if ( a1 > 0 ) { if ( v22 % 2 ) return bprintf( 0LL, (long long)"%sExpected hex string with fixed size (%d) but got %d bytes", a3, (unsigned int)a1, (unsigned int)(v22 / 2), a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); v17 = 2LL; if ( v22 / 2 != a1 ) return bprintf( 0LL, (long long)"%sExpected hex string with fixed size (%d) but got %d bytes", a3, (unsigned int)a1, (unsigned int)(v22 / 2), a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); } if ( (a2 & 1) != 0 && (!v22 || a15[3] == 48 && v22 > 1) ) return bprintf( 0LL, (long long)"%sno leading zeros allowed for uint", a3, v17, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); if ( (a2 & 1) != 0 && v22 / 2 > 32 ) return bprintf( 0LL, (long long)"%sexpected uint with max 32 bytes length, but got %d bytes ", a3, (unsigned int)(v22 / 2), a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); if ( a1 >= 0 || v22 / 2 <= -a1 ) return 0LL; return bprintf( 0LL, (long long)"%sexpected uint with max %d bytes length, but got %d bytes ", a3, (unsigned int)-a1, (unsigned int)(v22 / 2), a6, a7, a8, a9, a10, a11, a12, a13, a14, a3); }
check_hex: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV CL,SIL LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0xc],EDI AND CL,0x1 MOV byte ptr [RBP + -0xd],CL MOV qword ptr [RBP + -0x18],RDX CMP dword ptr [RAX + 0x10],0x1 JZ 0x001a5965 MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5b3d] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a5965: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x30 JZ 0x001a59a4 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX + 0x2] CMP EAX,0x78 JZ 0x001a59a4 MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5b53] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a59a4: MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x20],0x3 LAB_001a59b2: MOV RCX,qword ptr [RBP + -0x28] MOVSXD RAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] SUB RCX,0x1 CMP RAX,RCX JNC 0x001a5a24 CALL 0x00123250 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RCX] MOVSXD RDX,dword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RCX + RDX*0x1] MOVSXD RCX,ECX MOVZX EAX,word ptr [RAX + RCX*0x2] AND EAX,0x1000 CMP EAX,0x0 JNZ 0x001a5a0e MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5b3d] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a5a0e: JMP 0x001a5a10 LAB_001a5a10: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x001a59b2 LAB_001a5a24: CMP dword ptr [RBP + -0xc],0x0 JLE 0x001a5a82 MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,0x2 CDQ IDIV ECX CMP EDX,0x0 JNZ 0x001a5a4a MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,0x2 CDQ IDIV ECX CMP EAX,dword ptr [RBP + -0xc] JZ 0x001a5a82 LAB_001a5a4a: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV ECX,dword ptr [RBP + -0xc] MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,0x2 CDQ IDIV ESI MOV RDX,qword ptr [RBP + -0x30] MOV R8D,EAX XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5b77] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a5a82: TEST byte ptr [RBP + -0xd],0x1 JZ 0x001a5ac3 CMP dword ptr [RBP + -0x1c],0x0 JZ 0x001a5aa4 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX + 0x3] CMP EAX,0x30 JNZ 0x001a5ac3 CMP dword ptr [RBP + -0x1c],0x1 JLE 0x001a5ac3 LAB_001a5aa4: MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5bb3] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a5ac3: TEST byte ptr [RBP + -0xd],0x1 JZ 0x001a5b0a MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,0x2 CDQ IDIV ECX CMP EAX,0x20 JLE 0x001a5b0a MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,0x2 CDQ IDIV ECX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,EAX XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5bd7] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a5b0a: CMP dword ptr [RBP + -0xc],0x0 JGE 0x001a5b5b MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,0x2 CDQ IDIV ECX XOR ECX,ECX SUB ECX,dword ptr [RBP + -0xc] CMP EAX,ECX JLE 0x001a5b5b MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX XOR ECX,ECX SUB ECX,dword ptr [RBP + -0xc] MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,0x2 CDQ IDIV ESI MOV RDX,qword ptr [RBP + -0x40] MOV R8D,EAX XOR EAX,EAX MOV EDI,EAX LEA RSI,[0x1e5c13] MOV AL,0x0 CALL 0x0019d5a0 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a5b63 LAB_001a5b5b: MOV qword ptr [RBP + -0x8],0x0 LAB_001a5b63: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 check_hex(int param_1,byte param_2,int8 param_3) { ushort **ppuVar1; int8 uVar2; long in_stack_00000008; long in_stack_00000010; int in_stack_00000018; int local_28; int local_24; int8 local_10; if (in_stack_00000018 == 1) { if ((*(char *)(in_stack_00000008 + 1) == '0') || (*(char *)(in_stack_00000008 + 2) == 'x')) { local_24 = 0; for (local_28 = 3; (ulong)(long)local_28 < in_stack_00000010 - 1U; local_28 = local_28 + 1) { ppuVar1 = __ctype_b_loc(); if (((*ppuVar1)[(int)*(char *)(in_stack_00000008 + local_28)] & 0x1000) == 0) { uVar2 = bprintf(0,"%sExpected hex string",param_3); return uVar2; } local_24 = local_24 + 1; } if ((param_1 < 1) || ((local_24 % 2 == 0 && (local_24 / 2 == param_1)))) { if (((param_2 & 1) == 0) || ((local_24 != 0 && ((*(char *)(in_stack_00000008 + 3) != '0' || (local_24 < 2)))))) { if (((param_2 & 1) == 0) || (local_24 / 2 < 0x21)) { if ((param_1 < 0) && (-param_1 < local_24 / 2)) { local_10 = bprintf(0,"%sexpected uint with max %d bytes length, but got %d bytes ", param_3,-param_1,(long)local_24 / 2 & 0xffffffff); } else { local_10 = 0; } } else { local_10 = bprintf(0,"%sexpected uint with max 32 bytes length, but got %d bytes ", param_3,(long)local_24 / 2 & 0xffffffff); } } else { local_10 = bprintf(0,"%sno leading zeros allowed for uint",param_3); } } else { local_10 = bprintf(0,"%sExpected hex string with fixed size (%d) but got %d bytes",param_3, param_1,(long)local_24 / 2 & 0xffffffff); } } else { local_10 = bprintf(0,"%sExpected hex prefixed (0x) string",param_3); } } else { local_10 = bprintf(0,"%sExpected hex string",param_3); } return local_10; }
61,431
httpserver_chunked_append_str
qoraal-tictactoe/build_O0/_deps/qoraal_http-src/src/httpserver.c
int32_t httpserver_chunked_append_str (HTTP_USER_T* user, const char* str, uint32_t len) { int32_t req = 0; DBG_ASSERT_HTTP_SERVER (user->rw_buffer, "HTTPD :A: httpserver_chunked_append_str unexpected!") ; if (len == 0) len = strlen(str) ; while (len > 0) { char * buffer ; req = _chunked_alloc (user, len, &buffer) ; if (req <= 0) { DBG_MESSAGE_HTTP_SERVER (DBG_MESSAGE_SEVERITY_LOG, "HTTPD : : httpserver_chunked_append_str : memory %d", req); req = HTTP_SERVER_E_LENGTH; break ; } memcpy(buffer, str, req) ; _chunked_commit(user, req) ; str += req ; len -= req ; } return req ; }
O0
c
httpserver_chunked_append_str: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl $0x0, -0x18(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x2a7b3 leaq 0x165c9(%rip), %rdi # 0x40d75 movb $0x0, %al callq 0x1bb90 cmpl $0x0, -0x14(%rbp) jne 0x2a7c5 movq -0x10(%rbp), %rdi callq 0x61a0 movl %eax, -0x14(%rbp) jmp 0x2a7c7 cmpl $0x0, -0x14(%rbp) jbe 0x2a842 movq -0x8(%rbp), %rdi movl -0x14(%rbp), %esi leaq -0x20(%rbp), %rdx callq 0x2a560 movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) jg 0x2a807 movl -0x18(%rbp), %ecx movl $0x5, %edi xorl %esi, %esi leaq 0x165b2(%rip), %rdx # 0x40da9 movb $0x0, %al callq 0x1e560 movl $0xfffffffb, -0x18(%rbp) # imm = 0xFFFFFFFB jmp 0x2a842 movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movslq -0x18(%rbp), %rdx callq 0x6350 movq -0x8(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x2a640 movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x18(%rbp), %ecx movl -0x14(%rbp), %eax subl %ecx, %eax movl %eax, -0x14(%rbp) jmp 0x2a7c7 movl -0x18(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
httpserver_chunked_append_str: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+18h], 0 jnz short loc_2A7B3 lea rdi, aHttpdAHttpserv_0; "HTTPD :A: httpserver_chunked_append_str"... mov al, 0 call debug_assert loc_2A7B3: cmp [rbp+var_14], 0 jnz short loc_2A7C5 mov rdi, [rbp+var_10] call _strlen mov [rbp+var_14], eax loc_2A7C5: jmp short $+2 loc_2A7C7: cmp [rbp+var_14], 0 jbe short loc_2A842 mov rdi, [rbp+var_8] mov esi, [rbp+var_14] lea rdx, [rbp+var_20] call _chunked_alloc mov [rbp+var_18], eax cmp [rbp+var_18], 0 jg short loc_2A807 mov ecx, [rbp+var_18] mov edi, 5 xor esi, esi lea rdx, aHttpdHttpserve_0; "HTTPD : : httpserver_chunked_append_str"... mov al, 0 call svc_logger_type_log mov [rbp+var_18], 0FFFFFFFBh jmp short loc_2A842 loc_2A807: mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] movsxd rdx, [rbp+var_18] call _memcpy mov rdi, [rbp+var_8] mov esi, [rbp+var_18] call _chunked_commit mov ecx, [rbp+var_18] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_18] mov eax, [rbp+var_14] sub eax, ecx mov [rbp+var_14], eax jmp short loc_2A7C7 loc_2A842: mov eax, [rbp+var_18] add rsp, 20h pop rbp retn
long long httpserver_chunked_append_str( 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 v15; // [rsp+0h] [rbp-20h] BYREF unsigned int v16; // [rsp+8h] [rbp-18h] unsigned int v17; // [rsp+Ch] [rbp-14h] long long v18; // [rsp+10h] [rbp-10h] long long v19; // [rsp+18h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = 0; if ( !*(_QWORD *)(a1 + 24) ) debug_assert((long long)aHttpdAHttpserv_0, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v15); if ( !v17 ) v17 = strlen(v18); while ( v17 ) { v16 = chunked_alloc(v19, v17, &v15, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( (int)v16 <= 0 ) { svc_logger_type_log(5u, 0, (long long)"HTTPD : : httpserver_chunked_append_str : memory %d", v16); return (unsigned int)-5; } memcpy(v15, v18, (int)v16); chunked_commit(v19, v16); v18 += (int)v16; a4 = v16; v17 -= v16; } return v16; }
httpserver_chunked_append_str: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0012a7b3 LEA RDI,[0x140d75] MOV AL,0x0 CALL 0x0011bb90 LAB_0012a7b3: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x0012a7c5 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001061a0 MOV dword ptr [RBP + -0x14],EAX LAB_0012a7c5: JMP 0x0012a7c7 LAB_0012a7c7: CMP dword ptr [RBP + -0x14],0x0 JBE 0x0012a842 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x14] LEA RDX,[RBP + -0x20] CALL 0x0012a560 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JG 0x0012a807 MOV ECX,dword ptr [RBP + -0x18] MOV EDI,0x5 XOR ESI,ESI LEA RDX,[0x140da9] MOV AL,0x0 CALL 0x0011e560 MOV dword ptr [RBP + -0x18],0xfffffffb JMP 0x0012a842 LAB_0012a807: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOVSXD RDX,dword ptr [RBP + -0x18] CALL 0x00106350 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x18] CALL 0x0012a640 MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x14] SUB EAX,ECX MOV dword ptr [RBP + -0x14],EAX JMP 0x0012a7c7 LAB_0012a842: MOV EAX,dword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int httpserver_chunked_append_str(long param_1,char *param_2,int param_3) { size_t sVar1; void *local_28; int local_20; int local_1c; char *local_18; long local_10; local_20 = 0; local_1c = param_3; local_18 = param_2; local_10 = param_1; if (*(long *)(param_1 + 0x18) == 0) { debug_assert(s_HTTPD__A__httpserver_chunked_app_00140d75); } if (local_1c == 0) { sVar1 = strlen(local_18); local_1c = (int)sVar1; } while( true ) { if (local_1c == 0) { return local_20; } local_20 = _chunked_alloc(local_10,local_1c,&local_28); if (local_20 < 1) break; memcpy(local_28,local_18,(long)local_20); _chunked_commit(local_10,local_20); local_18 = local_18 + local_20; local_1c = local_1c - local_20; } svc_logger_type_log(5,0,s_HTTPD_____httpserver_chunked_app_00140da9,local_20); return -5; }
61,432
ma_log_new
eloqsql/storage/maria/ma_write.c
my_bool _ma_log_new(MARIA_PAGE *ma_page, my_bool root_page) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE * 2 + KEY_NR_STORE_SIZE +1]; uint page_length; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; MARIA_HA *info= ma_page->info; MARIA_SHARE *share= info->s; my_off_t page= ma_page->pos / share->block_size; DBUG_ENTER("_ma_log_new"); DBUG_PRINT("enter", ("page: %lu", (ulong) page)); DBUG_ASSERT(share->now_transactional); /* Store address of new root page */ page_store(log_data + FILEID_STORE_SIZE, page); /* Store link to next unused page */ if (info->key_del_used == 2) page= 0; /* key_del not changed */ else page= ((share->key_del_current == HA_OFFSET_ERROR) ? IMPOSSIBLE_PAGE_NO : share->key_del_current / share->block_size); page_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, page); key_nr_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE*2, ma_page->keyinfo->key_nr); log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE*2 + KEY_NR_STORE_SIZE]= (uchar) root_page; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); page_length= ma_page->size - LSN_STORE_SIZE; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= ma_page->buff + LSN_STORE_SIZE; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= page_length; /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; if (translog_write_record(&lsn, LOGREC_REDO_INDEX_NEW_PAGE, info->trn, info, (translog_size_t) (sizeof(log_data) + page_length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data, NULL)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
ma_log_new: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movb %sil, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x20(%rbp) movb %al, -0x21(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq -0x90(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x98(%rbp) jmp 0x832b4 jmp 0x832b6 jmp 0x832b8 jmp 0x832ba leaq -0x16(%rbp), %rax addq $0x2, %rax movq %rax, -0xa0(%rbp) movq -0x98(%rbp), %rax movl %eax, %ecx movq -0xa0(%rbp), %rax movl %ecx, (%rax) movq -0x98(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa0(%rbp), %rax movb %cl, 0x4(%rax) movq -0x88(%rbp), %rax movzbl 0x67e(%rax), %eax cmpl $0x2, %eax jne 0x83312 movq $0x0, -0x98(%rbp) jmp 0x8336b movq -0x90(%rbp), %rax cmpq $-0x1, 0x700(%rax) jne 0x83336 movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF movq %rax, -0xb0(%rbp) jmp 0x8335d movq -0x90(%rbp), %rax movq 0x700(%rax), %rax movq -0x90(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xb0(%rbp) movq -0xb0(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x8336d leaq -0x16(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax movl %eax, %ecx movq -0xa8(%rbp), %rax movl %ecx, (%rax) movq -0x98(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xa8(%rbp), %rax movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movb 0xa5(%rax), %al movb %al, -0xa(%rbp) movb -0x21(%rbp), %al movb %al, -0x9(%rbp) leaq -0x16(%rbp), %rax movq %rax, -0x60(%rbp) movq $0xe, -0x58(%rbp) movq -0x20(%rbp), %rax movl 0x20(%rax), %eax subl $0x7, %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax addq $0x7, %rax movq %rax, -0x50(%rbp) movl -0x34(%rbp), %eax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movl 0x20(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x88(%rbp), %rax movq 0x8(%rax), %rdx movq -0x88(%rbp), %rcx movl -0x34(%rbp), %eax addq $0xe, %rax movl %eax, %r8d leaq -0x80(%rbp), %r10 leaq -0x16(%rbp), %rax leaq -0x30(%rbp), %rdi movl $0xd, %esi movl $0x4, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x53ff0 cmpb $0x0, %al je 0x8345b jmp 0x83455 movb $0x1, -0x17(%rbp) jmp 0x83461 jmp 0x8345d movb $0x0, -0x17(%rbp) movb -0x17(%rbp), %al movb %al, -0xb1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8348b movb -0xb1(%rbp), %al addq $0xd0, %rsp popq %rbp retq callq 0x2a270
_ma_log_new: push rbp mov rbp, rsp sub rsp, 0D0h mov al, sil mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_20], rdi mov [rbp+var_21], al mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_88], rax mov rax, [rbp+var_88] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_20] mov rax, [rax+18h] mov rcx, [rbp+var_90] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_98], rax jmp short $+2 loc_832B4: jmp short $+2 loc_832B6: jmp short $+2 loc_832B8: jmp short $+2 loc_832BA: lea rax, [rbp+var_16] add rax, 2 mov [rbp+var_A0], rax mov rax, [rbp+var_98] mov ecx, eax mov rax, [rbp+var_A0] mov [rax], ecx mov rax, [rbp+var_98] shr rax, 20h mov cl, al mov rax, [rbp+var_A0] mov [rax+4], cl mov rax, [rbp+var_88] movzx eax, byte ptr [rax+67Eh] cmp eax, 2 jnz short loc_83312 mov [rbp+var_98], 0 jmp short loc_8336B loc_83312: mov rax, [rbp+var_90] cmp qword ptr [rax+700h], 0FFFFFFFFFFFFFFFFh jnz short loc_83336 mov rax, 0FFFFFFFFFFh mov [rbp+var_B0], rax jmp short loc_8335D loc_83336: mov rax, [rbp+var_90] mov rax, [rax+700h] mov rcx, [rbp+var_90] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_B0], rax loc_8335D: mov rax, [rbp+var_B0] mov [rbp+var_98], rax loc_8336B: jmp short $+2 loc_8336D: lea rax, [rbp+var_16] add rax, 2 add rax, 5 mov [rbp+var_A8], rax mov rax, [rbp+var_98] mov ecx, eax mov rax, [rbp+var_A8] mov [rax], ecx mov rax, [rbp+var_98] shr rax, 20h mov cl, al mov rax, [rbp+var_A8] mov [rax+4], cl mov rax, [rbp+var_20] mov rax, [rax+8] mov al, [rax+0A5h] mov [rbp+var_A], al mov al, [rbp+var_21] mov [rbp+var_9], al lea rax, [rbp+var_16] mov [rbp+var_60], rax mov [rbp+var_58], 0Eh mov rax, [rbp+var_20] mov eax, [rax+20h] sub eax, 7 mov [rbp+var_34], eax mov rax, [rbp+var_20] mov rax, [rax+10h] add rax, 7 mov [rbp+var_50], rax mov eax, [rbp+var_34] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov ecx, [rax+20h] mov rax, [rbp+var_20] mov [rax+24h], ecx mov rax, [rbp+var_88] mov rdx, [rax+8] mov rcx, [rbp+var_88] mov eax, [rbp+var_34] add rax, 0Eh mov r8d, eax lea r10, [rbp+var_80] lea rax, [rbp+var_16] lea rdi, [rbp+var_30] mov esi, 0Dh mov r9d, 4 xor r11d, r11d mov [rsp+0D0h+var_D0], r10 mov [rsp+0D0h+var_C8], rax mov [rsp+0D0h+var_C0], 0 call translog_write_record cmp al, 0 jz short loc_8345B jmp short $+2 loc_83455: mov [rbp+var_17], 1 jmp short loc_83461 loc_8345B: jmp short $+2 loc_8345D: mov [rbp+var_17], 0 loc_83461: mov al, [rbp+var_17] mov [rbp+var_B1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8348B mov al, [rbp+var_B1] add rsp, 0D0h pop rbp retn loc_8348B: call ___stack_chk_fail
bool ma_log_new(long long **a1, char a2) { unsigned long long v3; // [rsp+20h] [rbp-B0h] unsigned long long v4; // [rsp+38h] [rbp-98h] unsigned long long v5; // [rsp+38h] [rbp-98h] long long v6; // [rsp+40h] [rbp-90h] long long *v7; // [rsp+48h] [rbp-88h] _QWORD v8[9]; // [rsp+50h] [rbp-80h] BYREF unsigned int v9; // [rsp+9Ch] [rbp-34h] _BYTE v10[15]; // [rsp+A0h] [rbp-30h] BYREF char v11; // [rsp+AFh] [rbp-21h] long long **v12; // [rsp+B0h] [rbp-20h] __int16 v13; // [rsp+BAh] [rbp-16h] BYREF int v14; // [rsp+BCh] [rbp-14h] char v15; // [rsp+C0h] [rbp-10h] int v16; // [rsp+C1h] [rbp-Fh] char v17; // [rsp+C5h] [rbp-Bh] char v18; // [rsp+C6h] [rbp-Ah] char v19; // [rsp+C7h] [rbp-9h] unsigned long long v20; // [rsp+C8h] [rbp-8h] v20 = __readfsqword(0x28u); v12 = a1; v11 = a2; v7 = *a1; v6 = **a1; v4 = (unsigned long long)a1[3] / *(unsigned int *)(v6 + 1980); v14 = v4; v15 = BYTE4(v4); if ( *((_BYTE *)v7 + 1662) == 2 ) { v5 = 0LL; } else { if ( *(_QWORD *)(v6 + 1792) == -1LL ) v3 = 0xFFFFFFFFFFLL; else v3 = *(_QWORD *)(v6 + 1792) / (unsigned long long)*(unsigned int *)(v6 + 1980); v5 = v3; } v16 = v5; v17 = BYTE4(v5); v18 = *((_BYTE *)v12[1] + 165); v19 = v11; v8[4] = &v13; v8[5] = 14LL; v9 = *((_DWORD *)v12 + 8) - 7; v8[6] = (char *)v12[2] + 7; v8[7] = v9; *((_DWORD *)v12 + 9) = *((_DWORD *)v12 + 8); return translog_write_record((long long)v10, 0xDu, v7[1], v7, v9 + 14, 4u, v8, &v13, 0LL) != 0; }
_ma_log_new: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV AL,SIL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x20],RDI MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x90] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x98],RAX JMP 0x001832b4 LAB_001832b4: JMP 0x001832b6 LAB_001832b6: JMP 0x001832b8 LAB_001832b8: JMP 0x001832ba LAB_001832ba: LEA RAX,[RBP + -0x16] ADD RAX,0x2 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x88] MOVZX EAX,byte ptr [RAX + 0x67e] CMP EAX,0x2 JNZ 0x00183312 MOV qword ptr [RBP + -0x98],0x0 JMP 0x0018336b LAB_00183312: MOV RAX,qword ptr [RBP + -0x90] CMP qword ptr [RAX + 0x700],-0x1 JNZ 0x00183336 MOV RAX,0xffffffffff MOV qword ptr [RBP + -0xb0],RAX JMP 0x0018335d LAB_00183336: MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX + 0x700] MOV RCX,qword ptr [RBP + -0x90] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xb0],RAX LAB_0018335d: MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x98],RAX LAB_0018336b: JMP 0x0018336d LAB_0018336d: LEA RAX,[RBP + -0x16] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xa8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x98] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xa8] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV AL,byte ptr [RAX + 0xa5] MOV byte ptr [RBP + -0xa],AL MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x9],AL LEA RAX,[RBP + -0x16] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBP + -0x58],0xe MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x20] SUB EAX,0x7 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] ADD RAX,0x7 MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x34] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0x34] ADD RAX,0xe MOV R8D,EAX LEA R10,[RBP + -0x80] LEA RAX,[RBP + -0x16] LEA RDI,[RBP + -0x30] MOV ESI,0xd MOV R9D,0x4 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00153ff0 CMP AL,0x0 JZ 0x0018345b JMP 0x00183455 LAB_00183455: MOV byte ptr [RBP + -0x17],0x1 JMP 0x00183461 LAB_0018345b: JMP 0x0018345d LAB_0018345d: MOV byte ptr [RBP + -0x17],0x0 LAB_00183461: MOV AL,byte ptr [RBP + -0x17] MOV byte ptr [RBP + -0xb1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0018348b MOV AL,byte ptr [RBP + -0xb1] ADD RSP,0xd0 POP RBP RET LAB_0018348b: CALL 0x0012a270
int8 _ma_log_new(long *param_1,int1 param_2) { long *plVar1; long lVar2; char cVar3; ulong uVar4; long in_FS_OFFSET; ulong local_b8; ulong local_a0; int1 local_88 [32]; int1 *local_68; int8 local_60; long local_58; ulong local_50; uint local_3c; int1 local_38 [15]; int1 local_29; long *local_28; int1 local_1f; int1 local_1e [2]; int4 local_1c; int1 local_18; int4 local_17; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; lVar2 = *plVar1; uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(lVar2 + 0x7bc); local_1c = (int4)uVar4; local_18 = (int1)(uVar4 >> 0x20); if (*(char *)((long)plVar1 + 0x67e) == '\x02') { local_a0 = 0; } else { if (*(long *)(lVar2 + 0x700) == -1) { local_b8 = 0xffffffffff; } else { local_b8 = *(ulong *)(lVar2 + 0x700) / (ulong)*(uint *)(lVar2 + 0x7bc); } local_a0 = local_b8; } local_17 = (int4)local_a0; local_13 = (int1)(local_a0 >> 0x20); local_12 = *(int1 *)(param_1[1] + 0xa5); local_68 = local_1e; local_60 = 0xe; local_3c = (int)param_1[4] - 7; local_58 = param_1[2] + 7; local_50 = (ulong)local_3c; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_29 = param_2; local_28 = param_1; local_11 = param_2; cVar3 = translog_write_record (local_38,0xd,plVar1[1],plVar1,(int)param_1[4] + 7,4,local_88,local_1e,0); local_1f = cVar3 != '\0'; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1f); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,433
escape_string_for_mysql
eloqsql/mysys/charset.c
size_t escape_string_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); *overflow= FALSE; for (end= from + length; from < end; from++) { char escape= 0; #ifdef USE_MB int tmp_length= my_ci_charlen(charset_info, (const uchar *) from, (const uchar *) end); if (tmp_length > 1) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* If the next character appears to begin a multi-byte character, we escape that first byte of that apparent multi-byte character. (The character just looks like a multi-byte character -- if it were actually a multi-byte character, it would have been passed through in the test above.) Without this check, we can create a problem by converting an invalid multi-byte character into a valid one. For example, 0xbf27 is not a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \) */ if (tmp_length < 1) /* Bad byte sequence */ escape= *from; else #endif switch (*from) { case 0: /* Must be escaped for 'mysql' */ escape= '0'; break; case '\n': /* Must be escaped for logs */ escape= 'n'; break; case '\r': escape= 'r'; break; case '\\': escape= '\\'; break; case '\'': escape= '\''; break; case '"': /* Better safe than sorry */ escape= '"'; break; case '\032': /* This gives problems on Win32 */ escape= 'Z'; break; } if (escape) { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\\'; *to++= escape; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O3
c
escape_string_for_mysql: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 leaq (%r8,%r8), %rax subq $0x1, %r12 cmovbq %rax, %r12 movq %r9, -0x38(%rbp) movb $0x0, (%r9) movq %rsi, -0x30(%rbp) movq %rsi, %rax testq %r8, %r8 jle 0x934d3 movq %r8, %r15 movq %rcx, %r13 movq %rdi, %r14 movq -0x30(%rbp), %rbx addq %rbx, %r12 addq %rcx, %r15 movq 0xb8(%r14), %rax movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx callq *0xc0(%rax) movl %eax, %ecx cmpl $0x2, %eax jl 0x9344a movl %ecx, %eax addq %rbx, %rax cmpq %r12, %rax ja 0x934c9 decq %r13 movq %r13, %rdx leaq 0x1(%rdx), %r13 leaq 0x1(%rbx), %rax movb 0x1(%rdx), %dl movb %dl, (%rbx) movq %r13, %rdx movq %rax, %rbx decl %ecx jne 0x93431 jmp 0x934a0 movb (%r13), %dl cmpl $0x1, %ecx jne 0x9346c movzbl %dl, %eax cmpl $0x19, %eax jle 0x93481 cmpl $0x26, %eax jg 0x934b1 cmpl $0x1a, %eax je 0x934c1 cmpl $0x22, %eax je 0x93470 jmp 0x93495 testb %dl, %dl je 0x93493 leaq 0x2(%rbx), %rax cmpq %r12, %rax ja 0x934c9 movb $0x5c, (%rbx) movb %dl, 0x1(%rbx) jmp 0x934a0 testl %eax, %eax je 0x934bd cmpl $0xa, %eax je 0x934c5 cmpl $0xd, %eax jne 0x93495 movb $0x72, %dl jmp 0x93470 xorl %edx, %edx leaq 0x1(%rbx), %rax cmpq %r12, %rax ja 0x934c9 movb %dl, (%rbx) incq %r13 movq %rax, %rbx cmpq %r15, %r13 jb 0x93400 jmp 0x934d3 cmpl $0x27, %eax je 0x93470 cmpl $0x5c, %eax je 0x93470 jmp 0x93495 movb $0x30, %dl jmp 0x93470 movb $0x5a, %dl jmp 0x93470 movb $0x6e, %dl jmp 0x93470 movq -0x38(%rbp), %rax movb $0x1, (%rax) movq %rbx, %rax movb $0x0, (%rax) subq -0x30(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
escape_string_for_mysql: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx lea rax, [r8+r8] sub r12, 1 cmovb r12, rax mov [rbp+var_38], r9 mov byte ptr [r9], 0 mov [rbp+var_30], rsi mov rax, rsi test r8, r8 jle loc_934D3 mov r15, r8 mov r13, rcx mov r14, rdi mov rbx, [rbp+var_30] add r12, rbx add r15, rcx loc_93400: mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r13 mov rdx, r15 call qword ptr [rax+0C0h] mov ecx, eax cmp eax, 2 jl short loc_9344A mov eax, ecx add rax, rbx cmp rax, r12 ja loc_934C9 dec r13 mov rdx, r13 loc_93431: lea r13, [rdx+1] lea rax, [rbx+1] mov dl, [rdx+1] mov [rbx], dl mov rdx, r13 mov rbx, rax dec ecx jnz short loc_93431 jmp short loc_934A0 loc_9344A: mov dl, [r13+0] cmp ecx, 1 jnz short loc_9346C movzx eax, dl cmp eax, 19h jle short loc_93481 cmp eax, 26h ; '&' jg short loc_934B1 cmp eax, 1Ah jz short loc_934C1 cmp eax, 22h ; '"' jz short loc_93470 jmp short loc_93495 loc_9346C: test dl, dl jz short loc_93493 loc_93470: lea rax, [rbx+2] cmp rax, r12 ja short loc_934C9 mov byte ptr [rbx], 5Ch ; '\' mov [rbx+1], dl jmp short loc_934A0 loc_93481: test eax, eax jz short loc_934BD cmp eax, 0Ah jz short loc_934C5 cmp eax, 0Dh jnz short loc_93495 mov dl, 72h ; 'r' jmp short loc_93470 loc_93493: xor edx, edx loc_93495: lea rax, [rbx+1] cmp rax, r12 ja short loc_934C9 mov [rbx], dl loc_934A0: inc r13 mov rbx, rax cmp r13, r15 jb loc_93400 jmp short loc_934D3 loc_934B1: cmp eax, 27h ; ''' jz short loc_93470 cmp eax, 5Ch ; '\' jz short loc_93470 jmp short loc_93495 loc_934BD: mov dl, 30h ; '0' jmp short loc_93470 loc_934C1: mov dl, 5Ah ; 'Z' jmp short loc_93470 loc_934C5: mov dl, 6Eh ; 'n' jmp short loc_93470 loc_934C9: mov rax, [rbp+var_38] mov byte ptr [rax], 1 mov rax, rbx loc_934D3: mov byte ptr [rax], 0 sub rax, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * escape_string_for_mysql( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, _BYTE *a6) { long long v6; // r12 unsigned __int8 *v7; // rax unsigned __int8 *v8; // r13 unsigned __int8 *v9; // rbx unsigned long long v10; // r12 unsigned long long v11; // r15 int v12; // ecx unsigned __int8 *v13; // rdx unsigned __int8 v14; // dl v6 = a3 - 1; if ( !a3 ) v6 = 2 * a5; *a6 = 0; v7 = a2; if ( a5 > 0 ) { v8 = a4; v9 = a2; v10 = (unsigned long long)&a2[v6]; v11 = (unsigned long long)&a4[a5]; do { v12 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v8, v11); if ( v12 >= 2 ) { if ( (unsigned long long)&v9[v12] > v10 ) goto LABEL_34; v13 = v8 - 1; do { v8 = v13 + 1; v7 = v9 + 1; *v9++ = *++v13; --v12; } while ( v12 ); goto LABEL_26; } v14 = *v8; if ( v12 == 1 ) { if ( v14 <= 0x19u ) { switch ( v14 ) { case 0u: v14 = 48; goto LABEL_17; case 0xAu: v14 = 110; goto LABEL_17; case 0xDu: v14 = 114; LABEL_17: v7 = v9 + 2; if ( (unsigned long long)(v9 + 2) > v10 ) goto LABEL_34; *v9 = 92; v9[1] = v14; goto LABEL_26; } } else if ( v14 > 0x26u ) { if ( v14 == 39 || v14 == 92 ) goto LABEL_17; } else { if ( v14 == 26 ) { v14 = 90; goto LABEL_17; } if ( v14 == 34 ) goto LABEL_17; } } else { if ( v14 ) goto LABEL_17; v14 = 0; } v7 = v9 + 1; if ( (unsigned long long)(v9 + 1) > v10 ) { LABEL_34: *a6 = 1; v7 = v9; break; } *v9 = v14; LABEL_26: ++v8; v9 = v7; } while ( (unsigned long long)v8 < v11 ); } *v7 = 0; return (_BYTE *)(v7 - a2); }
escape_string_for_mysql: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX LEA RAX,[R8 + R8*0x1] SUB R12,0x1 CMOVC R12,RAX MOV qword ptr [RBP + -0x38],R9 MOV byte ptr [R9],0x0 MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI TEST R8,R8 JLE 0x001934d3 MOV R15,R8 MOV R13,RCX MOV R14,RDI MOV RBX,qword ptr [RBP + -0x30] ADD R12,RBX ADD R15,RCX LAB_00193400: MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] MOV ECX,EAX CMP EAX,0x2 JL 0x0019344a MOV EAX,ECX ADD RAX,RBX CMP RAX,R12 JA 0x001934c9 DEC R13 MOV RDX,R13 LAB_00193431: LEA R13,[RDX + 0x1] LEA RAX,[RBX + 0x1] MOV DL,byte ptr [RDX + 0x1] MOV byte ptr [RBX],DL MOV RDX,R13 MOV RBX,RAX DEC ECX JNZ 0x00193431 JMP 0x001934a0 LAB_0019344a: MOV DL,byte ptr [R13] CMP ECX,0x1 JNZ 0x0019346c MOVZX EAX,DL CMP EAX,0x19 JLE 0x00193481 CMP EAX,0x26 JG 0x001934b1 CMP EAX,0x1a JZ 0x001934c1 CMP EAX,0x22 JZ 0x00193470 JMP 0x00193495 LAB_0019346c: TEST DL,DL JZ 0x00193493 LAB_00193470: LEA RAX,[RBX + 0x2] CMP RAX,R12 JA 0x001934c9 MOV byte ptr [RBX],0x5c MOV byte ptr [RBX + 0x1],DL JMP 0x001934a0 LAB_00193481: TEST EAX,EAX JZ 0x001934bd CMP EAX,0xa JZ 0x001934c5 CMP EAX,0xd JNZ 0x00193495 MOV DL,0x72 JMP 0x00193470 LAB_00193493: XOR EDX,EDX LAB_00193495: LEA RAX,[RBX + 0x1] CMP RAX,R12 JA 0x001934c9 MOV byte ptr [RBX],DL LAB_001934a0: INC R13 MOV RBX,RAX CMP R13,R15 JC 0x00193400 JMP 0x001934d3 LAB_001934b1: CMP EAX,0x27 JZ 0x00193470 CMP EAX,0x5c JZ 0x00193470 JMP 0x00193495 LAB_001934bd: MOV DL,0x30 JMP 0x00193470 LAB_001934c1: MOV DL,0x5a JMP 0x00193470 LAB_001934c5: MOV DL,0x6e JMP 0x00193470 LAB_001934c9: MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],0x1 MOV RAX,RBX LAB_001934d3: MOV byte ptr [RAX],0x0 SUB RAX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long escape_string_for_mysql (long param_1,byte *param_2,long param_3,byte *param_4,long param_5, int1 *param_6) { uint uVar1; byte *pbVar2; ulong uVar3; byte bVar4; byte *pbVar5; byte *pbVar6; long lVar7; byte *pbVar8; byte *pbVar9; lVar7 = param_3 + -1; if (param_3 == 0) { lVar7 = param_5 * 2; } *param_6 = 0; pbVar2 = param_2; if (0 < param_5) { pbVar8 = param_2 + lVar7; pbVar9 = param_4 + param_5; pbVar6 = param_2; do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pbVar9); uVar3 = (ulong)uVar1; if ((int)uVar1 < 2) { bVar4 = *param_4; if (uVar1 == 1) { if (bVar4 < 0x1a) { if (bVar4 == 0) { bVar4 = 0x30; } else if (bVar4 == 10) { bVar4 = 0x6e; } else { if (bVar4 != 0xd) goto LAB_00193495; bVar4 = 0x72; } } else if (bVar4 < 0x27) { if (bVar4 == 0x1a) { bVar4 = 0x5a; } else if (bVar4 != 0x22) goto LAB_00193495; } else if ((bVar4 != 0x27) && (bVar4 != 0x5c)) { LAB_00193495: pbVar2 = pbVar6 + 1; if (pbVar8 < pbVar2) goto LAB_001934c9; *pbVar6 = bVar4; goto LAB_001934a0; } } else if (bVar4 == 0) { bVar4 = 0; goto LAB_00193495; } pbVar2 = pbVar6 + 2; if (pbVar8 < pbVar2) goto LAB_001934c9; *pbVar6 = 0x5c; pbVar6[1] = bVar4; } else { if (pbVar8 < pbVar6 + uVar3) { LAB_001934c9: *param_6 = 1; pbVar2 = pbVar6; break; } pbVar5 = param_4 + -1; do { param_4 = pbVar5 + 1; pbVar2 = pbVar6 + 1; *pbVar6 = pbVar5[1]; uVar1 = (int)uVar3 - 1; uVar3 = (ulong)uVar1; pbVar5 = param_4; pbVar6 = pbVar2; } while (uVar1 != 0); } LAB_001934a0: param_4 = param_4 + 1; pbVar6 = pbVar2; } while (param_4 < pbVar9); } *pbVar2 = 0; return (long)pbVar2 - (long)param_2; }
61,434
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>::string_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_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>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x3e23f movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x203d0 pushq $0x20 popq %rdi callq 0x20380 movq %rax, %rbx movq %r14, %rdi callq 0x3cd04 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x506b4(%rip), %rsi # 0x8e915 leaq 0x10(%rsp), %rdi callq 0x3cca5 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x3cbb8 xorl %ebp, %ebp leaq 0x9004c(%rip), %rsi # 0xce2d8 leaq 0x9fd3(%rip), %rdx # 0x48266 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x20d98 testb %bpl, %bpl jne 0x3e2b2 jmp 0x3e2ba movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20bb0
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_3E23F mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_3E23F: 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, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_3E2B2 jmp short loc_3E2BA mov r14, rax loc_3E2B2: mov rdi, rbx; void * call ___cxa_free_exception loc_3E2BA: mov rdi, r14 call __Unwind_Resume
long long 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>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", (long long)&v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x12Eu, (long long)v5, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
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],0x3 JNZ 0x0013e23f MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001203d0 LAB_0013e23f: PUSH 0x20 POP RDI CALL 0x00120380 MOV RBX,RAX MOV RDI,R14 CALL 0x0013cd04 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0013e25a: LEA RSI,[0x18e915] LEA RDI,[RSP + 0x10] CALL 0x0013cca5 MOV BPL,0x1 LAB_0013e26e: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x0013cbb8 XOR EBP,EBP LEA RSI,[0x1ce2d8] LEA RDX,[0x148266] MOV RDI,RBX CALL 0x00120b30
/* 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>::string_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,string_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == '\x03') { std::__cxx11::string::_M_assign((string *)param_2); 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 0013e25a to 0013e26a has its CatchHandler @ 0013e2af */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be string, but is ",&local_40); /* try { // try from 0013e26e to 0013e29a has its CatchHandler @ 0013e29b */ _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); }
61,435
d2b
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc) { Bigint *b; int de, k; ULong *x, y, z; int i; #define d0 word0(d) #define d1 word1(d) b= Balloc(1, alloc); x= b->p.x; z= d0 & Frac_mask; d0 &= 0x7fffffff; /* clear sign bit, which we ignore */ if ((de= (int)(d0 >> Exp_shift))) z|= Exp_msk1; if ((y= d1)) { if ((k= lo0bits(&y))) { x[0]= y | z << (32 - k); z>>= (k == 32) ? (--k) : k; } else x[0]= y; i= b->wds= (x[1]= z) ? 2 : 1; } else { k= lo0bits(&z); x[0]= z; i= b->wds= 1; k+= 32; } if (de) { *e= de - Bias - (P-1) + k; *bits= P - k; } else { *e= de - Bias - (P-1) + 1 + k; *bits= 32*i - hi0bits(x[i-1]); } return b; #undef d0 #undef d1 }
O0
c
d2b: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rsi movl $0x1, %edi callq 0x34f90 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax andl $0xfffff, %eax # imm = 0xFFFFF movl %eax, -0x40(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movl %ecx, 0x4(%rax) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax shrl $0x14, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x34541 movl -0x40(%rbp), %eax orl $0x100000, %eax # imm = 0x100000 movl %eax, -0x40(%rbp) movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0x345d8 leaq -0x3c(%rbp), %rdi callq 0x35590 movl %eax, -0x30(%rbp) cmpl $0x0, %eax je 0x345a9 movl -0x3c(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x40(%rbp), %eax movl $0x20, %ecx subl -0x30(%rbp), %ecx shll %cl, %eax movl -0x48(%rbp), %ecx orl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) cmpl $0x20, -0x30(%rbp) jne 0x34596 movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) movl %eax, -0x4c(%rbp) jmp 0x3459c movl -0x30(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %ecx movl -0x40(%rbp), %eax shrl %cl, %eax movl %eax, -0x40(%rbp) jmp 0x345b2 movl -0x3c(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movl -0x40(%rbp), %edx movq -0x38(%rbp), %rax movl %edx, 0x4(%rax) movl $0x1, %eax movl $0x2, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movq -0x28(%rbp), %rcx movl %eax, 0x14(%rcx) movl %eax, -0x44(%rbp) jmp 0x34608 leaq -0x40(%rbp), %rdi callq 0x35590 movl %eax, -0x30(%rbp) movl -0x40(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax movl $0x1, 0x14(%rax) movl $0x1, -0x44(%rbp) movl -0x30(%rbp), %eax addl $0x20, %eax movl %eax, -0x30(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x34633 movl -0x2c(%rbp), %ecx subl $0x3ff, %ecx # imm = 0x3FF subl $0x34, %ecx addl -0x30(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x35, %ecx subl -0x30(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) jmp 0x34674 movl -0x2c(%rbp), %ecx subl $0x3ff, %ecx # imm = 0x3FF subl $0x34, %ecx addl $0x1, %ecx addl -0x30(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x44(%rbp), %eax shll $0x5, %eax movl %eax, -0x50(%rbp) movq -0x38(%rbp), %rax movl -0x44(%rbp), %ecx subl $0x1, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %edi callq 0x34b10 movl -0x50(%rbp), %ecx subl %eax, %ecx movq -0x18(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax addq $0x50, %rsp popq %rbp retq nop
d2b: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rsi, [rbp+var_20] mov edi, 1 call Balloc mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_8] mov eax, [rax+4] and eax, 0FFFFFh mov [rbp+var_40], eax mov rax, [rbp+var_8] mov ecx, [rax+4] and ecx, 7FFFFFFFh mov [rax+4], ecx mov rax, [rbp+var_8] mov eax, [rax+4] shr eax, 14h mov [rbp+var_2C], eax cmp eax, 0 jz short loc_34541 mov eax, [rbp+var_40] or eax, 100000h mov [rbp+var_40], eax loc_34541: mov rax, [rbp+var_8] mov eax, [rax] mov [rbp+var_3C], eax cmp eax, 0 jz loc_345D8 lea rdi, [rbp+var_3C] call lo0bits mov [rbp+var_30], eax cmp eax, 0 jz short loc_345A9 mov eax, [rbp+var_3C] mov [rbp+var_48], eax mov eax, [rbp+var_40] mov ecx, 20h ; ' ' sub ecx, [rbp+var_30] shl eax, cl mov ecx, [rbp+var_48] or ecx, eax mov rax, [rbp+var_38] mov [rax], ecx cmp [rbp+var_30], 20h ; ' ' jnz short loc_34596 mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax mov [rbp+var_4C], eax jmp short loc_3459C loc_34596: mov eax, [rbp+var_30] mov [rbp+var_4C], eax loc_3459C: mov ecx, [rbp+var_4C] mov eax, [rbp+var_40] shr eax, cl mov [rbp+var_40], eax jmp short loc_345B2 loc_345A9: mov ecx, [rbp+var_3C] mov rax, [rbp+var_38] mov [rax], ecx loc_345B2: mov edx, [rbp+var_40] mov rax, [rbp+var_38] mov [rax+4], edx mov eax, 1 mov ecx, 2 cmp edx, 0 cmovnz eax, ecx mov rcx, [rbp+var_28] mov [rcx+14h], eax mov [rbp+var_44], eax jmp short loc_34608 loc_345D8: lea rdi, [rbp+var_40] call lo0bits mov [rbp+var_30], eax mov ecx, [rbp+var_40] mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_28] mov dword ptr [rax+14h], 1 mov [rbp+var_44], 1 mov eax, [rbp+var_30] add eax, 20h ; ' ' mov [rbp+var_30], eax loc_34608: cmp [rbp+var_2C], 0 jz short loc_34633 mov ecx, [rbp+var_2C] sub ecx, 3FFh sub ecx, 34h ; '4' add ecx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], ecx mov ecx, 35h ; '5' sub ecx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], ecx jmp short loc_34674 loc_34633: mov ecx, [rbp+var_2C] sub ecx, 3FFh sub ecx, 34h ; '4' add ecx, 1 add ecx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], ecx mov eax, [rbp+var_44] shl eax, 5 mov [rbp+var_50], eax mov rax, [rbp+var_38] mov ecx, [rbp+var_44] sub ecx, 1 movsxd rcx, ecx mov edi, [rax+rcx*4] call hi0bits mov ecx, [rbp+var_50] sub ecx, eax mov rax, [rbp+var_18] mov [rax], ecx loc_34674: mov rax, [rbp+var_28] add rsp, 50h pop rbp retn
long long d2b(unsigned int *a1, _DWORD *a2, _DWORD *a3, long long a4) { unsigned int v4; // edx int v5; // eax char v7; // [rsp+4h] [rbp-4Ch] int v8; // [rsp+Ch] [rbp-44h] unsigned int v9; // [rsp+10h] [rbp-40h] BYREF unsigned int v10; // [rsp+14h] [rbp-3Ch] BYREF unsigned int *v11; // [rsp+18h] [rbp-38h] int v12; // [rsp+20h] [rbp-30h] unsigned int v13; // [rsp+24h] [rbp-2Ch] long long v14; // [rsp+28h] [rbp-28h] long long v15; // [rsp+30h] [rbp-20h] _DWORD *v16; // [rsp+38h] [rbp-18h] _DWORD *v17; // [rsp+40h] [rbp-10h] unsigned int *v18; // [rsp+48h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = Balloc(1LL, a4); v11 = *(unsigned int **)v14; v9 = a1[1] & 0xFFFFF; a1[1] &= ~0x80000000; v13 = v18[1] >> 20; if ( v13 ) v9 |= 0x100000u; v10 = *v18; if ( v10 ) { v12 = lo0bits(&v10); if ( v12 ) { *v11 = (v9 << (32 - v12)) | v10; if ( v12 == 32 ) { v12 = 31; v7 = 31; } else { v7 = v12; } v9 >>= v7; } else { *v11 = v10; } v4 = v9; v11[1] = v9; v5 = 1; if ( v4 ) v5 = 2; *(_DWORD *)(v14 + 20) = v5; v8 = v5; } else { v12 = lo0bits(&v9); *v11 = v9; *(_DWORD *)(v14 + 20) = 1; v8 = 1; v12 += 32; } if ( v13 ) { *v17 = v12 + v13 - 1075; *v16 = 53 - v12; } else { *v17 = v12 - 1074; *v16 = 32 * v8 - hi0bits(v11[v8 - 1]); } return v14; }
d2b: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RSI,qword ptr [RBP + -0x20] MOV EDI,0x1 CALL 0x00134f90 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0xfffff MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x4] AND ECX,0x7fffffff MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] SHR EAX,0x14 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x00134541 MOV EAX,dword ptr [RBP + -0x40] OR EAX,0x100000 MOV dword ptr [RBP + -0x40],EAX LAB_00134541: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JZ 0x001345d8 LEA RDI,[RBP + -0x3c] CALL 0x00135590 MOV dword ptr [RBP + -0x30],EAX CMP EAX,0x0 JZ 0x001345a9 MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x40] MOV ECX,0x20 SUB ECX,dword ptr [RBP + -0x30] SHL EAX,CL MOV ECX,dword ptr [RBP + -0x48] OR ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX CMP dword ptr [RBP + -0x30],0x20 JNZ 0x00134596 MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX MOV dword ptr [RBP + -0x4c],EAX JMP 0x0013459c LAB_00134596: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4c],EAX LAB_0013459c: MOV ECX,dword ptr [RBP + -0x4c] MOV EAX,dword ptr [RBP + -0x40] SHR EAX,CL MOV dword ptr [RBP + -0x40],EAX JMP 0x001345b2 LAB_001345a9: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX LAB_001345b2: MOV EDX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],EDX MOV EAX,0x1 MOV ECX,0x2 CMP EDX,0x0 CMOVNZ EAX,ECX MOV RCX,qword ptr [RBP + -0x28] MOV dword ptr [RCX + 0x14],EAX MOV dword ptr [RBP + -0x44],EAX JMP 0x00134608 LAB_001345d8: LEA RDI,[RBP + -0x40] CALL 0x00135590 MOV dword ptr [RBP + -0x30],EAX MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x14],0x1 MOV dword ptr [RBP + -0x44],0x1 MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x20 MOV dword ptr [RBP + -0x30],EAX LAB_00134608: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x00134633 MOV ECX,dword ptr [RBP + -0x2c] SUB ECX,0x3ff SUB ECX,0x34 ADD ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV ECX,0x35 SUB ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],ECX JMP 0x00134674 LAB_00134633: MOV ECX,dword ptr [RBP + -0x2c] SUB ECX,0x3ff SUB ECX,0x34 ADD ECX,0x1 ADD ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x44] SHL EAX,0x5 MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x44] SUB ECX,0x1 MOVSXD RCX,ECX MOV EDI,dword ptr [RAX + RCX*0x4] CALL 0x00134b10 MOV ECX,dword ptr [RBP + -0x50] SUB ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],ECX LAB_00134674: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x50 POP RBP RET
int8 * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4) { int iVar1; int local_4c; uint local_48; uint local_44; uint *local_40; int local_38; uint local_34; int8 *local_30; int8 local_28; int *local_20; int *local_18; uint *local_10; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_30 = (int8 *)Balloc(1,param_4); local_40 = (uint *)*local_30; local_48 = local_10[1] & 0xfffff; local_10[1] = local_10[1] & 0x7fffffff; local_34 = local_10[1] >> 0x14; if (local_34 != 0) { local_48 = local_48 | 0x100000; } local_44 = *local_10; if (local_44 == 0) { local_38 = lo0bits(&local_48); *local_40 = local_48; *(int4 *)((long)local_30 + 0x14) = 1; local_4c = 1; local_38 = local_38 + 0x20; } else { local_38 = lo0bits(&local_44); if (local_38 == 0) { *local_40 = local_44; } else { *local_40 = local_44 | local_48 << (0x20U - (char)local_38 & 0x1f); if (local_38 == 0x20) { local_38 = 0x1f; } local_48 = local_48 >> ((byte)local_38 & 0x1f); } local_40[1] = local_48; local_4c = 1; if (local_48 != 0) { local_4c = 2; } *(int *)((long)local_30 + 0x14) = local_4c; } if (local_34 == 0) { *local_18 = local_38 + -0x432; iVar1 = hi0bits(local_40[local_4c + -1]); *local_20 = local_4c * 0x20 - iVar1; } else { *local_18 = (local_34 - 0x433) + local_38; *local_20 = 0x35 - local_38; } return local_30; }
61,436
ma_flush_table_files
eloqsql/storage/maria/ma_extra.c
int _ma_flush_table_files(MARIA_HA *info, uint flush_data_or_index, enum flush_type flush_type_for_data, enum flush_type flush_type_for_index) { int error= 0; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_flush_table_files"); /* flush data file first because it's more critical */ if (flush_data_or_index & MARIA_FLUSH_DATA) { if ((info->opt_flag & WRITE_CACHE_USED) && flush_type_for_data != FLUSH_IGNORE_CHANGED && flush_io_cache(&info->rec_cache)) error= 1; if (share->data_file_type == BLOCK_RECORD) { if (flush_type_for_data != FLUSH_IGNORE_CHANGED) { if (_ma_bitmap_flush(share)) error= 1; } else { mysql_mutex_lock(&share->bitmap.bitmap_lock); share->bitmap.changed= 0; share->bitmap.changed_not_flushed= 0; mysql_mutex_unlock(&share->bitmap.bitmap_lock); } if (flush_pagecache_blocks(share->pagecache, &info->dfile, flush_type_for_data)) error= 1; } } if ((flush_data_or_index & MARIA_FLUSH_INDEX) && flush_pagecache_blocks(share->pagecache, &share->kfile, flush_type_for_index)) error= 1; if (!error) DBUG_RETURN(0); _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(1); }
O0
c
ma_flush_table_files: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movl -0x14(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x2f972 movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x2f8bf cmpl $0x2, -0x18(%rbp) je 0x2f8bf movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe1eb0 cmpl $0x0, %eax je 0x2f8bf movl $0x1, -0x20(%rbp) movq -0x28(%rbp), %rax cmpl $0x3, 0x7d0(%rax) jne 0x2f970 cmpl $0x2, -0x18(%rbp) je 0x2f8ec movq -0x28(%rbp), %rdi callq 0x3e730 cmpb $0x0, %al je 0x2f8ea movl $0x1, -0x20(%rbp) jmp 0x2f93c movq -0x28(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0x12a85d(%rip), %rsi # 0x15a162 movl $0x28c, %edx # imm = 0x28C callq 0x2f780 movq -0x28(%rbp), %rax movb $0x0, 0xa30(%rax) movq -0x28(%rbp), %rax movb $0x0, 0xa31(%rax) movq -0x28(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x2f7f0 movq -0x28(%rbp), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movl -0x18(%rbp), %edx xorl %eax, %eax movl %eax, %r8d movq %r8, %rcx callq 0x5c4e0 cmpl $0x0, %eax je 0x2f96e movl $0x1, -0x20(%rbp) jmp 0x2f970 jmp 0x2f972 movl -0x14(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x2f9af movq -0x28(%rbp), %rax movq 0x600(%rax), %rdi movq -0x28(%rbp), %rsi addq $0x750, %rsi # imm = 0x750 movl -0x1c(%rbp), %edx xorl %eax, %eax movl %eax, %r8d movq %r8, %rcx callq 0x5c4e0 cmpl $0x0, %eax je 0x2f9af movl $0x1, -0x20(%rbp) cmpl $0x0, -0x20(%rbp) jne 0x2f9c0 jmp 0x2f9b7 movl $0x0, -0x4(%rbp) jmp 0x2f9d5 movq -0x10(%rbp), %rdi movl $0x7e, %esi callq 0x30500 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
_ma_flush_table_files: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx mov [rbp+var_20], 0 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov eax, [rbp+var_14] and eax, 1 cmp eax, 0 jz loc_2F972 mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_2F8BF cmp [rbp+var_18], 2 jz short loc_2F8BF mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_2F8BF mov [rbp+var_20], 1 loc_2F8BF: mov rax, [rbp+var_28] cmp dword ptr [rax+7D0h], 3 jnz loc_2F970 cmp [rbp+var_18], 2 jz short loc_2F8EC mov rdi, [rbp+var_28] call _ma_bitmap_flush cmp al, 0 jz short loc_2F8EA mov [rbp+var_20], 1 loc_2F8EA: jmp short loc_2F93C loc_2F8EC: mov rdi, [rbp+var_28] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 28Ch call inline_mysql_mutex_lock mov rax, [rbp+var_28] mov byte ptr [rax+0A30h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+0A31h], 0 mov rdi, [rbp+var_28] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock loc_2F93C: mov rax, [rbp+var_28] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov edx, [rbp+var_18] xor eax, eax mov r8d, eax mov rcx, r8 call flush_pagecache_blocks_with_filter cmp eax, 0 jz short loc_2F96E mov [rbp+var_20], 1 loc_2F96E: jmp short $+2 loc_2F970: jmp short $+2 loc_2F972: mov eax, [rbp+var_14] and eax, 2 cmp eax, 0 jz short loc_2F9AF mov rax, [rbp+var_28] mov rdi, [rax+600h] mov rsi, [rbp+var_28] add rsi, 750h mov edx, [rbp+var_1C] xor eax, eax mov r8d, eax mov rcx, r8 call flush_pagecache_blocks_with_filter cmp eax, 0 jz short loc_2F9AF mov [rbp+var_20], 1 loc_2F9AF: cmp [rbp+var_20], 0 jnz short loc_2F9C0 jmp short $+2 loc_2F9B7: mov [rbp+var_4], 0 jmp short loc_2F9D5 loc_2F9C0: mov rdi, [rbp+var_10] mov esi, 7Eh ; '~' call _ma_set_fatal_error mov [rbp+var_4], 1 loc_2F9D5: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_flush_table_files(long long *a1, char a2, unsigned int a3, unsigned int a4) { long long v5; // [rsp+8h] [rbp-28h] BOOL v6; // [rsp+10h] [rbp-20h] v6 = 0; v5 = *a1; if ( (a2 & 1) != 0 ) { if ( (*((_DWORD *)a1 + 391) & 0x10) != 0 && a3 != 2 ) v6 = my_b_flush_io_cache(a1 + 151, 1LL) != 0; if ( *(_DWORD *)(v5 + 2000) == 3 ) { if ( a3 == 2 ) { inline_mysql_mutex_lock( v5 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c", 0x28Cu); *(_BYTE *)(v5 + 2608) = 0; *(_BYTE *)(v5 + 2609) = 0; inline_mysql_mutex_unlock(v5 + 2712); } else if ( (unsigned __int8)ma_bitmap_flush(v5) ) { v6 = 1; } if ( (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(v5 + 1536), a1 + 142, a3, 0LL) ) v6 = 1; } } if ( (a2 & 2) != 0 && (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(v5 + 1536), v5 + 1872, a4, 0LL) ) v6 = 1; if ( v6 ) { ma_set_fatal_error(a1, 126LL); return 1; } else { return 0; } }
_ma_flush_table_files: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x1 CMP EAX,0x0 JZ 0x0012f972 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x0012f8bf CMP dword ptr [RBP + -0x18],0x2 JZ 0x0012f8bf MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e1eb0 CMP EAX,0x0 JZ 0x0012f8bf MOV dword ptr [RBP + -0x20],0x1 LAB_0012f8bf: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x7d0],0x3 JNZ 0x0012f970 CMP dword ptr [RBP + -0x18],0x2 JZ 0x0012f8ec MOV RDI,qword ptr [RBP + -0x28] CALL 0x0013e730 CMP AL,0x0 JZ 0x0012f8ea MOV dword ptr [RBP + -0x20],0x1 LAB_0012f8ea: JMP 0x0012f93c LAB_0012f8ec: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x25a162] MOV EDX,0x28c CALL 0x0012f780 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0xa30],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0xa31],0x0 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x0012f7f0 LAB_0012f93c: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV EDX,dword ptr [RBP + -0x18] XOR EAX,EAX MOV R8D,EAX MOV RCX,R8 CALL 0x0015c4e0 CMP EAX,0x0 JZ 0x0012f96e MOV dword ptr [RBP + -0x20],0x1 LAB_0012f96e: JMP 0x0012f970 LAB_0012f970: JMP 0x0012f972 LAB_0012f972: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x2 CMP EAX,0x0 JZ 0x0012f9af MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x750 MOV EDX,dword ptr [RBP + -0x1c] XOR EAX,EAX MOV R8D,EAX MOV RCX,R8 CALL 0x0015c4e0 CMP EAX,0x0 JZ 0x0012f9af MOV dword ptr [RBP + -0x20],0x1 LAB_0012f9af: CMP dword ptr [RBP + -0x20],0x0 JNZ 0x0012f9c0 JMP 0x0012f9b7 LAB_0012f9b7: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012f9d5 LAB_0012f9c0: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7e CALL 0x00130500 MOV dword ptr [RBP + -0x4],0x1 LAB_0012f9d5: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
bool _ma_flush_table_files(long *param_1,uint param_2,int param_3,int4 param_4) { long lVar1; bool bVar2; char cVar3; int iVar4; bVar2 = false; lVar1 = *param_1; if ((param_2 & 1) != 0) { if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && (param_3 != 2)) && (iVar4 = my_b_flush_io_cache(param_1 + 0x97,1), iVar4 != 0)) { bVar2 = true; } if (*(int *)(lVar1 + 2000) == 3) { if (param_3 == 2) { inline_mysql_mutex_lock (lVar1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c" ,0x28c); *(int1 *)(lVar1 + 0xa30) = 0; *(int1 *)(lVar1 + 0xa31) = 0; inline_mysql_mutex_unlock(lVar1 + 0xa98); } else { cVar3 = _ma_bitmap_flush(lVar1); if (cVar3 != '\0') { bVar2 = true; } } iVar4 = flush_pagecache_blocks_with_filter (*(int8 *)(lVar1 + 0x600),param_1 + 0x8e,param_3,0); if (iVar4 != 0) { bVar2 = true; } } } if (((param_2 & 2) != 0) && (iVar4 = flush_pagecache_blocks_with_filter (*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,param_4,0), iVar4 != 0)) { bVar2 = true; } if (bVar2) { _ma_set_fatal_error(param_1,0x7e); } return bVar2; }
61,437
resize_partitioned_key_cache
eloqsql/mysys/mf_keycache.c
static int resize_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { uint i; uint partitions= keycache->partitions; my_bool cleanup= use_mem == 0; int blocks= -1; int err= 0; DBUG_ENTER("partitioned_resize_key_cache"); if (cleanup) { end_partitioned_key_cache(keycache, 0); DBUG_RETURN(-1); } for (i= 0; i < partitions; i++) { err|= prepare_resize_simple_key_cache(keycache->partition_array[i], 1); } if (!err) blocks= init_partitioned_key_cache(keycache, key_cache_block_size, use_mem, division_limit, age_threshold, changed_blocks_hash_size); if (blocks > 0) { for (i= 0; i < partitions; i++) { keycache_pthread_mutex_lock(&keycache->partition_array[i]->cache_lock); finish_resize_simple_key_cache(keycache->partition_array[i]); } } DBUG_RETURN(blocks); }
O3
c
resize_partitioned_key_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movl 0x1c(%rdi), %r13d testq %rdx, %rdx je 0x55cf0 movq %rdx, %r15 testq %r13, %r13 je 0x55c82 movl %esi, -0x2c(%rbp) movl %ecx, -0x30(%rbp) movl %r8d, -0x34(%rbp) movl %r9d, -0x38(%rbp) xorl %r14d, %r14d xorl %r12d, %r12d movq 0x8(%rbx), %rax movq (%rax,%r14,8), %rdi movl $0x1, %esi callq 0x54ff2 orl %eax, %r12d incq %r14 cmpq %r14, %r13 jne 0x55c48 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testl %r12d, %r12d movl -0x38(%rbp), %r9d movl -0x34(%rbp), %r8d movl -0x30(%rbp), %ecx movl -0x2c(%rbp), %esi jne 0x55d15 movq %rbx, %rdi movq %r15, %rdx callq 0x559b8 movl %eax, %r14d testl %eax, %eax setg %al testl %r13d, %r13d setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x55d15 xorl %r12d, %r12d leaq 0x3cd7f(%rip), %r15 # 0x92a2b movq 0x8(%rbx), %rax movq (%rax,%r12,8), %rax leaq 0xc0(%rax), %rdi cmpq $0x0, 0x100(%rax) jne 0x55ce1 callq 0x28530 movq 0x8(%rbx), %rax movq (%rax,%r12,8), %rdi callq 0x551d6 incq %r12 cmpq %r12, %r13 jne 0x55cac jmp 0x55d15 movq %r15, %rsi movl $0x14a9, %edx # imm = 0x14A9 callq 0x29e8c jmp 0x55cca movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testq %r13, %r13 je 0x55d15 xorl %r15d, %r15d movq 0x8(%rbx), %rax movq (%rax,%r15,8), %rdi xorl %esi, %esi callq 0x54ede incq %r15 cmpq %r15, %r13 jne 0x55cfe movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
resize_partitioned_key_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13d, [rdi+1Ch] test rdx, rdx jz loc_55CF0 mov r15, rdx test r13, r13 jz short loc_55C82 mov [rbp+var_2C], esi mov [rbp+var_30], ecx mov [rbp+var_34], r8d mov [rbp+var_38], r9d xor r14d, r14d xor r12d, r12d loc_55C48: mov rax, [rbx+8] mov rdi, [rax+r14*8] mov esi, 1 call prepare_resize_simple_key_cache or r12d, eax inc r14 cmp r13, r14 jnz short loc_55C48 mov r14d, 0FFFFFFFFh test r12d, r12d mov r9d, [rbp+var_38] mov r8d, [rbp+var_34] mov ecx, [rbp+var_30] mov esi, [rbp+var_2C] jnz loc_55D15 loc_55C82: mov rdi, rbx mov rdx, r15 call init_partitioned_key_cache mov r14d, eax test eax, eax setnle al test r13d, r13d setnz cl and cl, al cmp cl, 1 jnz short loc_55D15 xor r12d, r12d lea r15, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... loc_55CAC: mov rax, [rbx+8] mov rax, [rax+r12*8] lea rdi, [rax+0C0h] cmp qword ptr [rax+100h], 0 jnz short loc_55CE1 call _pthread_mutex_lock loc_55CCA: mov rax, [rbx+8] mov rdi, [rax+r12*8] call finish_resize_simple_key_cache inc r12 cmp r13, r12 jnz short loc_55CAC jmp short loc_55D15 loc_55CE1: mov rsi, r15 mov edx, 14A9h call psi_mutex_lock jmp short loc_55CCA loc_55CF0: mov r14d, 0FFFFFFFFh test r13, r13 jz short loc_55D15 xor r15d, r15d loc_55CFE: mov rax, [rbx+8] mov rdi, [rax+r15*8] xor esi, esi call end_simple_key_cache inc r15 cmp r13, r15 jnz short loc_55CFE loc_55D15: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long resize_partitioned_key_cache( long long a1, unsigned int a2, unsigned long long a3, long long a4, unsigned int a5, unsigned int a6) { long long v7; // r13 long long v9; // r14 int v10; // r12d int inited; // r14d long long v12; // r12 long long v13; // rax long long v14; // rdi long long v15; // r15 unsigned int v17; // [rsp+8h] [rbp-38h] unsigned int v18; // [rsp+Ch] [rbp-34h] unsigned int v19; // [rsp+10h] [rbp-30h] v7 = *(unsigned int *)(a1 + 28); if ( a3 ) { if ( !*(_DWORD *)(a1 + 28) ) goto LABEL_19; v19 = a4; v18 = a5; v17 = a6; v9 = 0LL; v10 = 0; do v10 |= prepare_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v9++), 1); while ( v7 != v9 ); inited = -1; a6 = v17; a5 = v18; a4 = v19; if ( !v10 ) { LABEL_19: inited = init_partitioned_key_cache((char *)a1, a2, a3, a4, a5, a6); if ( inited > 0 && (_DWORD)v7 != 0 ) { v12 = 0LL; do { v13 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v12); v14 = v13 + 192; if ( *(_QWORD *)(v13 + 256) ) psi_mutex_lock(v14, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x14A9u); else pthread_mutex_lock(v14); finish_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v12++)); } while ( v7 != v12 ); } } } else { inited = -1; if ( *(_DWORD *)(a1 + 28) ) { v15 = 0LL; do end_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v15++), 0); while ( v7 != v15 ); } } return (unsigned int)inited; }
resize_partitioned_key_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13D,dword ptr [RDI + 0x1c] TEST RDX,RDX JZ 0x00155cf0 MOV R15,RDX TEST R13,R13 JZ 0x00155c82 MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x30],ECX MOV dword ptr [RBP + -0x34],R8D MOV dword ptr [RBP + -0x38],R9D XOR R14D,R14D XOR R12D,R12D LAB_00155c48: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R14*0x8] MOV ESI,0x1 CALL 0x00154ff2 OR R12D,EAX INC R14 CMP R13,R14 JNZ 0x00155c48 MOV R14D,0xffffffff TEST R12D,R12D MOV R9D,dword ptr [RBP + -0x38] MOV R8D,dword ptr [RBP + -0x34] MOV ECX,dword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x2c] JNZ 0x00155d15 LAB_00155c82: MOV RDI,RBX MOV RDX,R15 CALL 0x001559b8 MOV R14D,EAX TEST EAX,EAX SETG AL TEST R13D,R13D SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x00155d15 XOR R12D,R12D LEA R15,[0x192a2b] LAB_00155cac: MOV RAX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX + R12*0x8] LEA RDI,[RAX + 0xc0] CMP qword ptr [RAX + 0x100],0x0 JNZ 0x00155ce1 CALL 0x00128530 LAB_00155cca: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R12*0x8] CALL 0x001551d6 INC R12 CMP R13,R12 JNZ 0x00155cac JMP 0x00155d15 LAB_00155ce1: MOV RSI,R15 MOV EDX,0x14a9 CALL 0x00129e8c JMP 0x00155cca LAB_00155cf0: MOV R14D,0xffffffff TEST R13,R13 JZ 0x00155d15 XOR R15D,R15D LAB_00155cfe: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R15*0x8] XOR ESI,ESI CALL 0x00154ede INC R15 CMP R13,R15 JNZ 0x00155cfe LAB_00155d15: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int resize_partitioned_key_cache (long param_1,ulong param_2,long param_3,ulong param_4,ulong param_5,ulong param_6) { pthread_mutex_t *__mutex; uint uVar1; long lVar2; uint uVar3; int iVar4; uint uVar5; ulong uVar6; ulong uVar7; uVar1 = *(uint *)(param_1 + 0x1c); uVar6 = (ulong)uVar1; if (param_3 == 0) { iVar4 = -1; if (uVar6 != 0) { uVar7 = 0; do { end_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8),0); uVar7 = uVar7 + 1; } while (uVar6 != uVar7); } } else { if (uVar6 != 0) { uVar7 = 0; uVar5 = 0; do { uVar3 = prepare_resize_simple_key_cache (*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8),1); uVar5 = uVar5 | uVar3; uVar7 = uVar7 + 1; } while (uVar6 != uVar7); param_6 = param_6 & 0xffffffff; param_5 = param_5 & 0xffffffff; param_4 = param_4 & 0xffffffff; param_2 = param_2 & 0xffffffff; if (uVar5 != 0) { return -1; } } iVar4 = init_partitioned_key_cache(param_1,param_2,param_3,param_4,param_5,param_6); if (uVar1 != 0 && 0 < iVar4) { uVar7 = 0; do { lVar2 = *(long *)(*(long *)(param_1 + 8) + uVar7 * 8); __mutex = (pthread_mutex_t *)(lVar2 + 0xc0); if (*(long *)(lVar2 + 0x100) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x14a9); } finish_resize_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8)); uVar7 = uVar7 + 1; } while (uVar6 != uVar7); } } return iVar4; }
61,438
my_casedn_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->casedn_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_tolower_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } /* In rare cases lower string can be shorter than the original string, for example: "U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE" (which is 0xC4B0 in utf8mb3, i.e. two bytes) is converted into "U+0069 LATIN SMALL LETTER I" (which is 0x69 in utf8mb3, i.e. one byte) So, we need to put '\0' terminator after converting. */ *dst= '\0'; return (size_t) (dst - dst0); }
O0
c
my_casedn_str_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x38(%rbp) jmp 0xcf90e jmp 0xcf910 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x39(%rbp) je 0xcf93e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x18(%rbp), %rsi callq 0xd36d0 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0xcf947 jmp 0xcf996 movq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0xd3ac0 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xd3980 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jg 0xcf96f jmp 0xcf996 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0xcf910 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nop
my_casedn_str_utf8mb4: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_38], rax jmp short $+2 loc_CF90E: jmp short $+2 loc_CF910: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_39], al jz short loc_CF93E mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, [rbp+var_18] call my_mb_wc_utf8mb4_no_range mov [rbp+var_1C], eax cmp eax, 0 setnle al mov [rbp+var_39], al loc_CF93E: mov al, [rbp+var_39] test al, 1 jnz short loc_CF947 jmp short loc_CF996 loc_CF947: mov rdi, [rbp+var_38] lea rsi, [rbp+var_18] call my_tolower_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call my_wc_mb_utf8mb4_no_range mov [rbp+var_20], eax cmp eax, 0 jg short loc_CF96F jmp short loc_CF996 loc_CF96F: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_CF910 loc_CF996: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] sub rax, rcx add rsp, 40h pop rbp retn
_BYTE * my_casedn_str_utf8mb4(long long a1, _BYTE *a2) { bool v3; // [rsp+7h] [rbp-39h] long long v4; // [rsp+8h] [rbp-38h] _BYTE *v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] BYREF _BYTE *v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v5 = a2; v4 = *(_QWORD *)(a1 + 120); while ( 1 ) { v3 = 0; if ( *v9 ) { v7 = my_mb_wc_utf8mb4_no_range(v10, &v8, v9); v3 = v7 > 0; } if ( !v3 ) break; my_tolower_utf8mb4(v4, &v8); v6 = my_wc_mb_utf8mb4_no_range(v10, v8, v5); if ( v6 <= 0 ) break; v9 += v7; v5 += v6; } *v5 = 0; return (_BYTE *)(v5 - a2); }
my_casedn_str_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x38],RAX JMP 0x001cf90e LAB_001cf90e: JMP 0x001cf910 LAB_001cf910: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x001cf93e MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x001d36d0 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x39],AL LAB_001cf93e: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x001cf947 JMP 0x001cf996 LAB_001cf947: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x18] CALL 0x001d3ac0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001d3980 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JG 0x001cf96f JMP 0x001cf996 LAB_001cf96f: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001cf910 LAB_001cf996: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_casedn_str_utf8mb4(long param_1,char *param_2) { int8 uVar1; bool bVar2; int iVar3; char *local_30; int local_24; int8 local_20; char *local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_2; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (*local_18 != '\0') { local_24 = my_mb_wc_utf8mb4_no_range(local_10,&local_20,local_18); bVar2 = 0 < local_24; } if (!bVar2) break; my_tolower_utf8mb4(uVar1,&local_20); iVar3 = my_wc_mb_utf8mb4_no_range(local_10,local_20,local_30); if (iVar3 < 1) break; local_18 = local_18 + local_24; local_30 = local_30 + iVar3; } *local_30 = '\0'; return (long)local_30 - (long)param_2; }
61,439
bitmap_is_set_all
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_set_all(const MY_BITMAP *map) { my_bitmap_map *data_ptr= map->bitmap; my_bitmap_map *end= map->last_word_ptr; for (; data_ptr < end; data_ptr++) if (*data_ptr != 0xFFFFFFFF) return FALSE; return (*data_ptr | map->last_word_mask) == 0xFFFFFFFF; }
O0
c
bitmap_is_set_all: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xefa18 movq -0x18(%rbp), %rax cmpl $-0x1, (%rax) je 0xefa08 movb $0x0, -0x1(%rbp) jmp 0xefa33 jmp 0xefa0a movq -0x18(%rbp), %rax addq $0x4, %rax movq %rax, -0x18(%rbp) jmp 0xef9ef movq -0x18(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rcx orl 0x18(%rcx), %eax cmpl $-0x1, %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
bitmap_is_set_all: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax loc_EF9EF: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_EFA18 mov rax, [rbp+var_18] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_EFA08 mov [rbp+var_1], 0 jmp short loc_EFA33 loc_EFA08: jmp short $+2 loc_EFA0A: mov rax, [rbp+var_18] add rax, 4 mov [rbp+var_18], rax jmp short loc_EF9EF loc_EFA18: mov rax, [rbp+var_18] mov eax, [rax] mov rcx, [rbp+var_10] or eax, [rcx+18h] cmp eax, 0FFFFFFFFh setz al and al, 1 movzx eax, al mov [rbp+var_1], al loc_EFA33: mov al, [rbp+var_1] pop rbp retn
bool bitmap_is_set_all(long long a1) { _DWORD *i; // [rsp+8h] [rbp-18h] for ( i = *(_DWORD **)a1; (unsigned long long)i < *(_QWORD *)(a1 + 8); ++i ) { if ( *i != -1 ) return 0; } return (*(_DWORD *)(a1 + 24) | *i) == -1; }
bitmap_is_set_all: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_001ef9ef: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001efa18 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],-0x1 JZ 0x001efa08 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001efa33 LAB_001efa08: JMP 0x001efa0a LAB_001efa0a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x001ef9ef LAB_001efa18: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] OR EAX,dword ptr [RCX + 0x18] CMP EAX,-0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL LAB_001efa33: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 bitmap_is_set_all(int8 *param_1) { uint *local_20; bool local_9; local_20 = (uint *)*param_1; do { if ((uint *)param_1[1] <= local_20) { local_9 = (*local_20 | *(uint *)(param_1 + 3)) == 0xffffffff; local_20 = (uint *)0x0; LAB_001efa33: return CONCAT71((int7)((ulong)local_20 >> 8),local_9); } if (*local_20 != 0xffffffff) { local_9 = false; goto LAB_001efa33; } local_20 = local_20 + 1; } while( true ); }
61,440
YAML::convert<std::vector<unsigned int, std::allocator<unsigned int>>>::encode(std::vector<unsigned int, std::allocator<unsigned int>> const&)
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/convert.h
static Node encode(const std::vector<T, A>& rhs) { Node node(NodeType::Sequence); for (const auto& element : rhs) node.push_back(element); return node; }
O3
c
YAML::convert<std::vector<unsigned int, std::allocator<unsigned int>>>::encode(std::vector<unsigned int, std::allocator<unsigned int>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx movl $0x3, %esi callq 0xa349a movq (%r15), %r14 movq 0x8(%r15), %r15 cmpq %r15, %r14 je 0xa418a movq %rbx, %rdi movq %r14, %rsi callq 0xa41a6 addq $0x4, %r14 jmp 0xa4174 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x9c7d4 movq %r14, %rdi callq 0x83b70
_ZN4YAML7convertISt6vectorIjSaIjEEE6encodeERKS3_: push r15 push r14 push rbx mov r15, rsi mov rbx, rdi mov esi, 3 call _ZN4YAML4NodeC2ENS_8NodeType5valueE; YAML::Node::Node(YAML::NodeType::value) mov r14, [r15] mov r15, [r15+8] loc_A4174: cmp r14, r15 jz short loc_A418A mov rdi, rbx; this mov rsi, r14 call _ZN4YAML4Node9push_backIjEEvRKT_; YAML::Node::push_back<uint>(uint const&) add r14, 4 jmp short loc_A4174 loc_A418A: mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN4YAML4NodeD2Ev; YAML::Node::~Node() mov rdi, r14 call __Unwind_Resume
YAML::Node * YAML::convert<std::vector<unsigned int>>::encode(YAML::Node *this, long long *a2) { long long v2; // r14 long long v3; // r15 YAML::Node::Node((long long)this); v2 = *a2; v3 = a2[1]; while ( v2 != v3 ) { YAML::Node::push_back<unsigned int>(this); v2 += 4LL; } return this; }
encode: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV RBX,RDI MOV ESI,0x3 CALL 0x001a349a MOV R14,qword ptr [R15] MOV R15,qword ptr [R15 + 0x8] LAB_001a4174: CMP R14,R15 JZ 0x001a418a LAB_001a4179: MOV RDI,RBX MOV RSI,R14 CALL 0x001a41a6 LAB_001a4184: ADD R14,0x4 JMP 0x001a4174 LAB_001a418a: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* YAML::convert<std::vector<unsigned int, std::allocator<unsigned int> > >::encode(std::vector<unsigned int, std::allocator<unsigned int> > const&) */ convert<std::vector<unsigned_int,std::allocator<unsigned_int>>> * __thiscall YAML::convert<std::vector<unsigned_int,std::allocator<unsigned_int>>>::encode (convert<std::vector<unsigned_int,std::allocator<unsigned_int>>> *this,vector *param_1) { uint *puVar1; uint *puVar2; Node::Node((Node *)this,3); puVar1 = *(uint **)(param_1 + 8); for (puVar2 = *(uint **)param_1; puVar2 != puVar1; puVar2 = puVar2 + 1) { /* try { // try from 001a4179 to 001a4183 has its CatchHandler @ 001a4193 */ Node::push_back<unsigned_int>((Node *)this,puVar2); } return this; }
61,441
google::protobuf::compiler::php::(anonymous namespace)::PhpGetterTypeName[abi:cxx11](google::protobuf::FieldDescriptor const*, google::protobuf::compiler::php::Options const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/php/php_generator.cc
std::string PhpGetterTypeName(const FieldDescriptor* field, const Options& options) { if (field->is_map()) { return "\\Google\\Protobuf\\Internal\\MapField"; } if (field->is_repeated()) { return "\\Google\\Protobuf\\Internal\\RepeatedField"; } switch (field->type()) { case FieldDescriptor::TYPE_INT32: case FieldDescriptor::TYPE_UINT32: case FieldDescriptor::TYPE_SINT32: case FieldDescriptor::TYPE_FIXED32: case FieldDescriptor::TYPE_SFIXED32: case FieldDescriptor::TYPE_ENUM: return "int"; case FieldDescriptor::TYPE_INT64: case FieldDescriptor::TYPE_UINT64: case FieldDescriptor::TYPE_SINT64: case FieldDescriptor::TYPE_FIXED64: case FieldDescriptor::TYPE_SFIXED64: return "int|string"; case FieldDescriptor::TYPE_DOUBLE: case FieldDescriptor::TYPE_FLOAT: return "float"; case FieldDescriptor::TYPE_BOOL: return "bool"; case FieldDescriptor::TYPE_STRING: case FieldDescriptor::TYPE_BYTES: return "string"; case FieldDescriptor::TYPE_MESSAGE: return "\\" + FullClassName(field->message_type(), options); case FieldDescriptor::TYPE_GROUP: return "null"; default: assert(false); return ""; } }
O3
cpp
google::protobuf::compiler::php::(anonymous namespace)::PhpGetterTypeName[abi:cxx11](google::protobuf::FieldDescriptor const*, google::protobuf::compiler::php::Options const&): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq 0x18(%rsi), %rdi testq %rdi, %rdi je 0x5e31a leaq 0xdb92f(%rip), %rax # 0x139c34 leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %rdx movq %r15, (%rdx) callq 0x2f19d cmpb $0xb, 0x2(%r15) jne 0x5e347 movq %r15, %rdi callq 0x11e734 testb %al, %al je 0x5e347 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x146f4f(%rip), %rsi # 0x1a528a leaq 0x146f6a(%rip), %rdx # 0x1a52ac jmp 0x5e49c movb 0x1(%r15), %al notb %al testb $0x60, %al jne 0x5e36b leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x146f64(%rip), %rsi # 0x1a52c3 leaq 0x146f84(%rip), %rdx # 0x1a52ea jmp 0x5e49c movq 0x18(%r15), %rdi testq %rdi, %rdi je 0x5e390 leaq 0xdb8b9(%rip), %rax # 0x139c34 leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %rdx movq %r15, (%rdx) callq 0x2f19d movzbl 0x2(%r15), %eax decl %eax cmpl $0x11, %eax ja 0x5e471 leaq 0x1460f9(%rip), %rcx # 0x1a44a0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x144e9c(%rip), %rsi # 0x1a325a leaq 0x144e98(%rip), %rdx # 0x1a325d jmp 0x5e49c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x146ed5(%rip), %rsi # 0x1a52ad leaq 0x146ed8(%rip), %rdx # 0x1a52b7 jmp 0x5e49c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x191b83(%rip), %rsi # 0x1eff75 leaq 0x191b82(%rip), %rdx # 0x1eff7b jmp 0x5e49c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x13f247(%rip), %rsi # 0x19d653 leaq 0x13f245(%rip), %rdx # 0x19d658 jmp 0x5e49c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x13f233(%rip), %rsi # 0x19d659 leaq 0x13f230(%rip), %rdx # 0x19d65d jmp 0x5e49c movq %r15, %rdi callq 0x11d7ce leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x5d17e leaq 0x13e6fe(%rip), %rsi # 0x19cb4f movq %rbx, %rdi movq %r15, %rdx callq 0x52e51 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e4a4 callq 0x1f4a0 jmp 0x5e4a4 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x13c12a(%rip), %rdx # 0x19a5a9 movq %rbx, %rdi movq %rdx, %rsi jmp 0x5e49f leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x14031c(%rip), %rsi # 0x19e7b1 leaq 0x140319(%rip), %rdx # 0x19e7b5 movq %rbx, %rdi callq 0x250b2 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e4c4 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler3php12_GLOBAL__N_117PhpGetterTypeNameB5cxx11EPKNS0_15FieldDescriptorERKNS2_7OptionsE: push r15 push r14 push rbx sub rsp, 30h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, [rsi+18h] test rdi, rdi jz short loc_5E31A lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+48h+var_38] mov [rsi], rax lea rdx, [rsp+48h+var_40] mov [rdx], r15 call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_5E31A: cmp byte ptr [r15+2], 0Bh jnz short loc_5E347 mov rdi, r15; this call _ZNK6google8protobuf15FieldDescriptor19is_map_message_typeEv; google::protobuf::FieldDescriptor::is_map_message_type(void) test al, al jz short loc_5E347 lea rax, [rbx+10h] mov [rbx], rax lea rsi, aArrayGooglePro+6; "\\Google\\Protobuf\\Internal\\MapField" lea rdx, aArrayGooglePro+28h; "" jmp loc_5E49C loc_5E347: mov al, [r15+1] not al test al, 60h jnz short loc_5E36B lea rax, [rbx+10h] mov [rbx], rax lea rsi, aGoogleProtobuf_17+2; "\\Google\\Protobuf\\Internal\\RepeatedF"... lea rdx, aGoogleProtobuf_17+29h; "" jmp loc_5E49C loc_5E36B: mov rdi, [r15+18h] test rdi, rdi jz short loc_5E390 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+48h+var_38] mov [rsi], rax lea rdx, [rsp+48h+var_40] mov [rdx], r15 call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_5E390: movzx eax, byte ptr [r15+2] dec eax; switch 18 cases cmp eax, 11h ja def_5E3AE; jumptable 000000000005E3AE default case lea rcx, jpt_5E3AE movsxd rax, ds:(jpt_5E3AE - 1A44A0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5E3B0: lea rax, [rbx+10h]; jumptable 000000000005E3AE cases 5,7,13-15,17 mov [rbx], rax lea rsi, aInternalaccess+21h; "int" lea rdx, aInternalaccess+24h; "" jmp loc_5E49C loc_5E3CA: lea rax, [rbx+10h]; jumptable 000000000005E3AE cases 3,4,6,16,18 mov [rbx], rax lea rsi, aIntString; "int|string" lea rdx, aIntString+0Ah; "" jmp loc_5E49C loc_5E3E4: lea rax, [rbx+10h]; jumptable 000000000005E3AE cases 9,12 mov [rbx], rax lea rsi, aCanTGetHereFai+2Fh; "string" lea rdx, aCanTGetHereFai+35h; "" jmp loc_5E49C loc_5E3FE: lea rax, [rbx+10h]; jumptable 000000000005E3AE cases 1,2 mov [rbx], rax lea rsi, aFloat; "float" lea rdx, aFloat+5; "" jmp loc_5E49C loc_5E418: lea rax, [rbx+10h]; jumptable 000000000005E3AE case 8 mov [rbx], rax lea rsi, aBool; "bool" lea rdx, aBool+4; "" jmp short loc_5E49C loc_5E42F: mov rdi, r15; jumptable 000000000005E3AE case 11 call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) lea r15, [rsp+48h+var_38] mov rdi, r15 mov rsi, rax mov rdx, r14 call _ZN6google8protobuf8compiler3php12_GLOBAL__N_113FullClassNameINS0_10DescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKNS2_7OptionsE; google::protobuf::compiler::php::`anonymous namespace'::FullClassName<google::protobuf::Descriptor>(google::protobuf::Descriptor const*,google::protobuf::compiler::php::Options const&) lea rsi, asc_19CB4E+1; "\\" mov rdi, rbx mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E4A4 call __ZdlPv; operator delete(void *) jmp short loc_5E4A4 def_5E3AE: lea rax, [rbx+10h]; jumptable 000000000005E3AE default case mov [rbx], rax lea rdx, asc_19A5A7+2; "" mov rdi, rbx mov rsi, rdx jmp short loc_5E49F loc_5E487: lea rax, [rbx+10h]; jumptable 000000000005E3AE case 10 mov [rbx], rax lea rsi, aNull+5; "null" lea rdx, aNull+9; "" loc_5E49C: mov rdi, rbx loc_5E49F: 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) loc_5E4A4: add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E4C4 call __ZdlPv; operator delete(void *) loc_5E4C4: mov rdi, rbx call __Unwind_Resume
void google::protobuf::compiler::php::`anonymous namespace'::PhpGetterTypeName[abi:cxx11]( _QWORD *a1, long long a2, unsigned int *a3) { long long v5; // rdi char *v6; // rsi char *v7; // rdx long long v8; // rdi long long v9; // rax long long v10; // rdi long long v11; // [rsp+8h] [rbp-40h] BYREF void *v12[2]; // [rsp+10h] [rbp-38h] BYREF char v13; // [rsp+20h] [rbp-28h] BYREF v5 = *(_QWORD *)(a2 + 24); if ( v5 ) { v12[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v11 = a2; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v5, (long long)v12, (long long)&v11); } if ( *(_BYTE *)(a2 + 2) == 11 && (unsigned __int8)google::protobuf::FieldDescriptor::is_map_message_type((google::protobuf::FieldDescriptor *)a2) ) { *a1 = a1 + 2; v6 = "\\Google\\Protobuf\\Internal\\MapField"; v7 = ""; goto LABEL_20; } if ( (~*(_BYTE *)(a2 + 1) & 0x60) == 0 ) { *a1 = a1 + 2; v6 = "\\Google\\Protobuf\\Internal\\RepeatedField"; v7 = ""; LABEL_20: v10 = (long long)a1; LABEL_21: std::string::_M_construct<char const*>(v10, v6, (long long)v7); return; } v8 = *(_QWORD *)(a2 + 24); if ( v8 ) { v12[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v11 = a2; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v8, (long long)v12, (long long)&v11); } switch ( *(_BYTE *)(a2 + 2) ) { case 1: case 2: *a1 = a1 + 2; v6 = "float"; v7 = ""; goto LABEL_20; case 3: case 4: case 6: case 0x10: case 0x12: *a1 = a1 + 2; v6 = "int|string"; v7 = ""; goto LABEL_20; case 5: case 7: case 0xD: case 0xE: case 0xF: case 0x11: *a1 = a1 + 2; v6 = "int"; v7 = ""; goto LABEL_20; case 8: *a1 = a1 + 2; v6 = "bool"; v7 = ""; goto LABEL_20; case 9: case 0xC: *a1 = a1 + 2; v6 = "string"; v7 = ""; goto LABEL_20; case 0xA: *a1 = a1 + 2; v6 = "null"; v7 = ""; goto LABEL_20; case 0xB: v9 = google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)a2); google::protobuf::compiler::php::`anonymous namespace'::FullClassName<google::protobuf::Descriptor>( (long long)v12, v9, a3); std::operator+<char>((long long)a1, (long long)"\\", (long long)v12); if ( v12[0] != &v13 ) operator delete(v12[0]); break; default: *a1 = a1 + 2; v7 = ""; v10 = (long long)a1; v6 = ""; goto LABEL_21; } }
PhpGetterTypeName[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RSI + 0x18] TEST RDI,RDI JZ 0x0015e31a LEA RAX,[0x239c34] LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],R15 CALL 0x0012f19d LAB_0015e31a: CMP byte ptr [R15 + 0x2],0xb JNZ 0x0015e347 MOV RDI,R15 CALL 0x0021e734 TEST AL,AL JZ 0x0015e347 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a528a] LEA RDX,[0x2a52ac] JMP 0x0015e49c LAB_0015e347: MOV AL,byte ptr [R15 + 0x1] NOT AL TEST AL,0x60 JNZ 0x0015e36b LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a52c3] LEA RDX,[0x2a52ea] JMP 0x0015e49c LAB_0015e36b: MOV RDI,qword ptr [R15 + 0x18] TEST RDI,RDI JZ 0x0015e390 LEA RAX,[0x239c34] LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],R15 CALL 0x0012f19d LAB_0015e390: MOVZX EAX,byte ptr [R15 + 0x2] DEC EAX CMP EAX,0x11 JA 0x0015e471 LEA RCX,[0x2a44a0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a325a] LEA RDX,[0x2a325d] JMP 0x0015e49c caseD_3: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2a52ad] LEA RDX,[0x2a52b7] JMP 0x0015e49c caseD_9: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x2eff75] LEA RDX,[0x2eff7b] JMP 0x0015e49c caseD_1: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x29d653] LEA RDX,[0x29d658] JMP 0x0015e49c caseD_8: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x29d659] LEA RDX,[0x29d65d] JMP 0x0015e49c caseD_b: MOV RDI,R15 CALL 0x0021d7ce LEA R15,[RSP + 0x10] MOV RDI,R15 MOV RSI,RAX MOV RDX,R14 CALL 0x0015d17e LAB_0015e44a: LEA RSI,[0x29cb4f] MOV RDI,RBX MOV RDX,R15 CALL 0x00152e51 LAB_0015e45c: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015e4a4 CALL 0x0011f4a0 JMP 0x0015e4a4 default: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[0x29a5a9] MOV RDI,RBX MOV RSI,RDX JMP 0x0015e49f caseD_a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x29e7b1] LEA RDX,[0x29e7b5] LAB_0015e49c: MOV RDI,RBX LAB_0015e49f: CALL 0x001250b2 LAB_0015e4a4: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* google::protobuf::compiler::php::(anonymous namespace)::PhpGetterTypeName[abi:cxx11](google::protobuf::FieldDescriptor const*, google::protobuf::compiler::php::Options const&) */ void __thiscall google::protobuf::compiler::php::(anonymous_namespace)::PhpGetterTypeName_abi_cxx11_ (_anonymous_namespace_ *this,FieldDescriptor *param_1,Options *param_2) { char cVar1; Descriptor *pDVar2; char *pcVar3; char *pcVar4; FieldDescriptor *local_40; code *local_38 [2]; int1 local_28 [16]; if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_38[0] = FieldDescriptor::TypeOnceInit; local_40 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)local_38,&local_40) ; } if ((param_1[2] == (FieldDescriptor)0xb) && (cVar1 = FieldDescriptor::is_map_message_type(param_1), cVar1 != '\0')) { *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "\\Google\\Protobuf\\Internal\\MapField"; pcVar3 = ""; } else if ((~(byte)param_1[1] & 0x60) == 0) { *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "\\Google\\Protobuf\\Internal\\RepeatedField"; pcVar3 = ""; } else { if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_38[0] = FieldDescriptor::TypeOnceInit; local_40 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)local_38, &local_40); } switch(param_1[2]) { case (FieldDescriptor)0x1: case (FieldDescriptor)0x2: *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "float"; pcVar3 = ""; break; case (FieldDescriptor)0x3: case (FieldDescriptor)0x4: case (FieldDescriptor)0x6: case (FieldDescriptor)0x10: case (FieldDescriptor)0x12: *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "int|string"; pcVar3 = ""; break; case (FieldDescriptor)0x5: case (FieldDescriptor)0x7: case (FieldDescriptor)0xd: case (FieldDescriptor)0xe: case (FieldDescriptor)0xf: case (FieldDescriptor)0x11: *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "int"; pcVar3 = ""; break; case (FieldDescriptor)0x8: *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "bool"; pcVar3 = ""; break; case (FieldDescriptor)0x9: case (FieldDescriptor)0xc: *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "string"; pcVar3 = ""; break; case (FieldDescriptor)0xa: *(_anonymous_namespace_ **)this = this + 0x10; pcVar4 = "null"; pcVar3 = ""; break; case (FieldDescriptor)0xb: pDVar2 = (Descriptor *)FieldDescriptor::message_type(param_1); FullClassName<google::protobuf::Descriptor>((_anonymous_namespace_ *)local_38,pDVar2,param_2); /* try { // try from 0015e44a to 0015e45b has its CatchHandler @ 0015e4ae */ std::operator+((char *)this,(string *)&DAT_0029cb4f); if (local_38[0] == (code *)local_28) { return; } operator_delete(local_38[0]); return; default: *(_anonymous_namespace_ **)this = this + 0x10; pcVar3 = ""; pcVar4 = ""; } } std::__cxx11::string::_M_construct<char_const*>(this,pcVar4,pcVar3); return; }
61,442
Item_func_xml_update::collect_result(String*, my_xml_node_st const*, String const*)
eloqsql/sql/item_xmlfunc.cc
bool Item_func_xml_update::collect_result(String *str, const MY_XML_NODE *cut, const String *replace) { uint offs= cut->type == MY_XML_NODE_TAG ? 1 : 0; const char *end= cut->tagend + offs; str->length(0); str->set_charset(collation.collation); return /* Put the XML part preceding the replaced piece */ str->append(xml.raw()->ptr(), cut->beg - xml.raw()->ptr() - offs) || /* Put the replacement */ str->append(replace->ptr(), replace->length()) || /* Put the XML part following the replaced piece */ str->append(end, xml.raw()->ptr() + xml.raw()->length() - end); }
O0
cpp
Item_func_xml_update::collect_result(String*, my_xml_node_st const*, String const*): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movl 0x4(%rax), %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovel %ecx, %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi addq $0x8, %rdi xorl %eax, %eax movl %eax, %esi callq 0x857e00 movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq 0x10(%rax), %rsi callq 0x857b50 movq -0x58(%rbp), %rdi movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) addq $0xd0, %rdi callq 0xe41640 movq %rax, %rdi addq $0x8, %rdi callq 0x81bf20 movq -0x58(%rbp), %rdi movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x50(%rbp) addq $0xd0, %rdi callq 0xe41640 movq %rax, %rdi addq $0x8, %rdi callq 0x81bf20 movq -0x50(%rbp), %rdx movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi subq %rax, %rdx movl -0x24(%rbp), %eax subq %rax, %rdx callq 0xaae260 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, -0x31(%rbp) jne 0xe3c3b7 movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x20(%rbp), %rdi addq $0x8, %rdi callq 0x81bf20 movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rdi addq $0x8, %rdi callq 0x81be40 movq -0x68(%rbp), %rdi movq -0x60(%rbp), %rsi movl %eax, %eax movl %eax, %edx callq 0xaae260 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, -0x31(%rbp) jne 0xe3c3b7 movq -0x58(%rbp), %rdi movq -0x10(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x70(%rbp) addq $0xd0, %rdi callq 0xe41640 movq %rax, %rdi addq $0x8, %rdi callq 0x81bf20 movq -0x58(%rbp), %rdi movq %rax, -0x80(%rbp) addq $0xd0, %rdi callq 0xe41640 movq %rax, %rdi addq $0x8, %rdi callq 0x81be40 movq -0x80(%rbp), %rdx movq -0x78(%rbp), %rdi movq -0x70(%rbp), %rsi movl %eax, %eax addq %rax, %rdx movq -0x30(%rbp), %rax subq %rax, %rdx callq 0xaae260 movb %al, -0x31(%rbp) movb -0x31(%rbp), %al andb $0x1, %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN20Item_func_xml_update14collect_resultEP6StringPK14my_xml_node_stPKS0_: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov edx, [rax+4] xor eax, eax mov ecx, 1 cmp edx, 0 cmovz eax, ecx mov [rbp+var_24], eax mov rax, [rbp+var_18] mov rax, [rax+20h] mov ecx, [rbp+var_24] add rax, rcx mov [rbp+var_30], rax mov rdi, [rbp+var_10] add rdi, 8; this xor eax, eax mov esi, eax; unsigned __int64 call _ZN13Binary_string6lengthEm; Binary_string::length(ulong) mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rsi, [rax+10h] call _ZN7Charset11set_charsetEPK15charset_info_st; Charset::set_charset(charset_info_st const*) mov rdi, [rbp+var_58] mov rax, [rbp+var_10] mov [rbp+var_48], rax add rdi, 0D0h; this call _ZN17Item_xml_str_func3XML3rawEv; Item_xml_str_func::XML::raw(void) mov rdi, rax add rdi, 8; this call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void) mov rdi, [rbp+var_58] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_50], rax add rdi, 0D0h; this call _ZN17Item_xml_str_func3XML3rawEv; Item_xml_str_func::XML::raw(void) mov rdi, rax add rdi, 8; this call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void) mov rdx, [rbp+var_50] mov rdi, [rbp+var_48]; this mov rsi, [rbp+var_40]; char * sub rdx, rax mov eax, [rbp+var_24] sub rdx, rax; unsigned __int64 call _ZN6String6appendEPKcm; String::append(char const*,ulong) mov cl, al mov al, 1 test cl, 1 mov [rbp+var_31], al jnz loc_E3C3B7 mov rax, [rbp+var_10] mov [rbp+var_68], rax mov rdi, [rbp+var_20] add rdi, 8; this call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void) mov [rbp+var_60], rax mov rdi, [rbp+var_20] add rdi, 8; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) mov rdi, [rbp+var_68]; this mov rsi, [rbp+var_60]; char * mov eax, eax mov edx, eax; unsigned __int64 call _ZN6String6appendEPKcm; String::append(char const*,ulong) mov cl, al mov al, 1 test cl, 1 mov [rbp+var_31], al jnz short loc_E3C3B7 mov rdi, [rbp+var_58] mov rax, [rbp+var_10] mov [rbp+var_78], rax mov rax, [rbp+var_30] mov [rbp+var_70], rax add rdi, 0D0h; this call _ZN17Item_xml_str_func3XML3rawEv; Item_xml_str_func::XML::raw(void) mov rdi, rax add rdi, 8; this call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void) mov rdi, [rbp+var_58] mov [rbp+var_80], rax add rdi, 0D0h; this call _ZN17Item_xml_str_func3XML3rawEv; Item_xml_str_func::XML::raw(void) mov rdi, rax add rdi, 8; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) mov rdx, [rbp+var_80] mov rdi, [rbp+var_78]; this mov rsi, [rbp+var_70]; char * mov eax, eax add rdx, rax mov rax, [rbp+var_30] sub rdx, rax; unsigned __int64 call _ZN6String6appendEPKcm; String::append(char const*,ulong) mov [rbp+var_31], al loc_E3C3B7: mov al, [rbp+var_31] and al, 1 add rsp, 80h pop rbp retn
char Item_func_xml_update::collect_result(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rax unsigned int v7; // eax long long v8; // rax long long v9; // rax unsigned int v10; // eax long long v12; // [rsp+0h] [rbp-80h] char *v13; // [rsp+20h] [rbp-60h] long long v14; // [rsp+30h] [rbp-50h] char *v15; // [rsp+40h] [rbp-40h] char v16; // [rsp+4Fh] [rbp-31h] char *v17; // [rsp+50h] [rbp-30h] BOOL v18; // [rsp+5Ch] [rbp-24h] v18 = *(_DWORD *)(a3 + 4) == 0; v17 = (char *)((*(_DWORD *)(a3 + 4) == 0) + *(_QWORD *)(a3 + 32)); Binary_string::length((Binary_string *)(a2 + 8), 0); Charset::set_charset((Charset *)a2, *(const charset_info_st **)(a1 + 16)); v4 = Item_xml_str_func::XML::raw((Item_xml_str_func::XML *)(a1 + 208)); v15 = (char *)Binary_string::ptr((Binary_string *)(v4 + 8)); v14 = *(_QWORD *)(a3 + 16); v5 = Item_xml_str_func::XML::raw((Item_xml_str_func::XML *)(a1 + 208)); v6 = Binary_string::ptr((Binary_string *)(v5 + 8)); v16 = 1; if ( (String::append((String *)a2, v15, v14 - v6 - v18) & 1) == 0 ) { v13 = (char *)Binary_string::ptr((Binary_string *)(a4 + 8)); v7 = Binary_string::length((Binary_string *)(a4 + 8)); v16 = 1; if ( (String::append((String *)a2, v13, v7) & 1) == 0 ) { v8 = Item_xml_str_func::XML::raw((Item_xml_str_func::XML *)(a1 + 208)); v12 = Binary_string::ptr((Binary_string *)(v8 + 8)); v9 = Item_xml_str_func::XML::raw((Item_xml_str_func::XML *)(a1 + 208)); v10 = Binary_string::length((Binary_string *)(v9 + 8)); v16 = String::append((String *)a2, v17, v10 + v12 - (_QWORD)v17); } } return v16 & 1; }
needs_charset_converter: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00e3c520 AND AL,0x1 ADD RSP,0x10 POP RBP RET
/* Item::needs_charset_converter(charset_info_st const*) */ byte __thiscall Item::needs_charset_converter(Item *this,charset_info_st *param_1) { byte bVar1; bVar1 = needs_charset_converter(this,1,param_1); return bVar1 & 1; }
61,443
Item_func_xml_update::collect_result(String*, my_xml_node_st const*, String const*)
eloqsql/sql/item_xmlfunc.cc
bool Item_func_xml_update::collect_result(String *str, const MY_XML_NODE *cut, const String *replace) { uint offs= cut->type == MY_XML_NODE_TAG ? 1 : 0; const char *end= cut->tagend + offs; str->length(0); str->set_charset(collation.collation); return /* Put the XML part preceding the replaced piece */ str->append(xml.raw()->ptr(), cut->beg - xml.raw()->ptr() - offs) || /* Put the replacement */ str->append(replace->ptr(), replace->length()) || /* Put the XML part following the replaced piece */ str->append(end, xml.raw()->ptr() + xml.raw()->length() - end); }
O3
cpp
Item_func_xml_update::collect_result(String*, my_xml_node_st const*, String const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %r12 movq %rsi, %rbx xorl %eax, %eax cmpl $0x0, 0x4(%rdx) movq %rdi, %r15 sete %al movq 0x20(%rdx), %r14 addq %rax, %r14 movl $0x0, 0x10(%rsi) movq 0x10(%rdi), %rcx movq %rcx, (%rsi) movq 0xd8(%rdi), %rcx movq 0x8(%rcx), %rsi movq 0x10(%rdx), %rdx addq %rsi, %rax subq %rax, %rdx movq %rbx, %rdi callq 0x858708 testb %al, %al jne 0xa4b277 movq 0x8(%r12), %rsi movl 0x10(%r12), %edx movq %rbx, %rdi callq 0x858708 testb %al, %al je 0xa4b282 movb $0x1, %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0xd8(%r15), %rax movl 0x10(%rax), %edx addq 0x8(%rax), %rdx subq %r14, %rdx movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x858708
_ZN20Item_func_xml_update14collect_resultEP6StringPK14my_xml_node_stPKS0_: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r12, rcx mov rbx, rsi xor eax, eax cmp dword ptr [rdx+4], 0 mov r15, rdi setz al mov r14, [rdx+20h] add r14, rax mov dword ptr [rsi+10h], 0 mov rcx, [rdi+10h] mov [rsi], rcx mov rcx, [rdi+0D8h] mov rsi, [rcx+8]; char * mov rdx, [rdx+10h] add rax, rsi sub rdx, rax; unsigned __int64 mov rdi, rbx; this call _ZN6String6appendEPKcm; String::append(char const*,ulong) test al, al jnz short loc_A4B277 mov rsi, [r12+8]; char * mov edx, [r12+10h]; unsigned __int64 mov rdi, rbx; this call _ZN6String6appendEPKcm; String::append(char const*,ulong) test al, al jz short loc_A4B282 loc_A4B277: mov al, 1 pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A4B282: mov rax, [r15+0D8h] mov edx, [rax+10h] add rdx, [rax+8] sub rdx, r14; unsigned __int64 mov rdi, rbx; this mov rsi, r14; char * pop rbx pop r12 pop r14 pop r15 pop rbp jmp _ZN6String6appendEPKcm; String::append(char const*,ulong)
char Item_func_xml_update::collect_result(long long a1, String *a2, long long a3, long long a4) { _BOOL8 v5; // rax const char *v6; // r14 v5 = *(_DWORD *)(a3 + 4) == 0; v6 = (const char *)(v5 + *(_QWORD *)(a3 + 32)); *((_DWORD *)a2 + 4) = 0; *(_QWORD *)a2 = *(_QWORD *)(a1 + 16); if ( String::append( a2, *(const char **)(*(_QWORD *)(a1 + 216) + 8LL), *(_QWORD *)(a3 + 16) - (*(_QWORD *)(*(_QWORD *)(a1 + 216) + 8LL) + v5)) || String::append(a2, *(const char **)(a4 + 8), *(_DWORD *)(a4 + 16)) ) { return 1; } else { return String::append( a2, v6, *(_DWORD *)(*(_QWORD *)(a1 + 216) + 8LL) + *(_DWORD *)(*(_QWORD *)(a1 + 216) + 16LL) - (_DWORD)v6); } }
61,444
bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&))
nickolajgrishuk[P]metricz-cpp/build_O0/_deps/httplib-src/httplib.h
inline bool parse_header(const char *beg, const char *end, T fn) { // Skip trailing spaces and tabs. while (beg < end && is_space_or_tab(end[-1])) { end--; } auto p = beg; while (p < end && *p != ':') { p++; } if (p == end) { return false; } auto key_end = p; if (*p++ != ':') { return false; } while (p < end && is_space_or_tab(*p)) { p++; } if (p < end) { fn(std::string(beg, key_end), decode_url(std::string(p, end), false)); return true; } return false; }
O0
c
bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdx, -0x10(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0xaa(%rbp) jae 0x3dc4c movq -0x20(%rbp), %rax movsbl -0x1(%rax), %edi callq 0x3dec0 movb %al, -0xaa(%rbp) movb -0xaa(%rbp), %al testb $0x1, %al jne 0x3dc58 jmp 0x3dc66 movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x3dc27 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0xab(%rbp) jae 0x3dc93 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax setne %al movb %al, -0xab(%rbp) movb -0xab(%rbp), %al testb $0x1, %al jne 0x3dc9f jmp 0x3dcad movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x3dc6e movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x3dcc0 movb $0x0, -0x1(%rbp) jmp 0x3dea3 movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movsbl (%rax), %eax cmpl $0x3a, %eax je 0x3dce8 movb $0x0, -0x1(%rbp) jmp 0x3dea3 jmp 0x3dcea movq -0x28(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0xac(%rbp) jae 0x3dd0e movq -0x28(%rbp), %rax movsbl (%rax), %edi callq 0x3dec0 movb %al, -0xac(%rbp) movb -0xac(%rbp), %al testb $0x1, %al jne 0x3dd1a jmp 0x3dd28 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x3dcea movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x3de9f movq -0x18(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0x30(%rbp), %rax movq %rax, -0xc0(%rbp) leaq -0x51(%rbp), %rdi movq %rdi, -0xb8(%rbp) callq 0xabf0 movq -0xc8(%rbp), %rsi movq -0xc0(%rbp), %rdx movq -0xb8(%rbp), %rcx leaq -0x50(%rbp), %rdi callq 0x3df30 jmp 0x3dd7c movq -0x28(%rbp), %rax movq %rax, -0xe0(%rbp) movq -0x20(%rbp), %rax movq %rax, -0xd8(%rbp) leaq -0xa9(%rbp), %rdi movq %rdi, -0xd0(%rbp) callq 0xabf0 movq -0xe0(%rbp), %rsi movq -0xd8(%rbp), %rdx movq -0xd0(%rbp), %rcx leaq -0xa8(%rbp), %rdi callq 0x3df30 jmp 0x3ddc8 leaq -0x88(%rbp), %rdi leaq -0xa8(%rbp), %rsi xorl %edx, %edx callq 0x3dfa0 jmp 0x3dddf leaq -0x10(%rbp), %rdi leaq -0x50(%rbp), %rsi leaq -0x88(%rbp), %rdx callq 0x3def0 jmp 0x3ddf5 leaq -0x88(%rbp), %rdi callq 0xaec8 leaq -0xa8(%rbp), %rdi callq 0xaec8 leaq -0xa9(%rbp), %rdi callq 0xaeb0 leaq -0x50(%rbp), %rdi callq 0xaec8 leaq -0x51(%rbp), %rdi callq 0xaeb0 movb $0x1, -0x1(%rbp) jmp 0x3dea3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x3de94 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x3de7f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x3de73 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) leaq -0x88(%rbp), %rdi callq 0xaec8 leaq -0xa8(%rbp), %rdi callq 0xaec8 leaq -0xa9(%rbp), %rdi callq 0xaeb0 leaq -0x50(%rbp), %rdi callq 0xaec8 leaq -0x51(%rbp), %rdi callq 0xaeb0 jmp 0x3deb1 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xe0, %rsp popq %rbp retq movq -0x60(%rbp), %rdi callq 0xa850 nopw (%rax,%rax)
_ZN7httplib6detail12parse_headerIZNS0_12read_headersERNS_6StreamERSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_NS0_2ciESaISt4pairIKSA_SA_EEEEUlOSA_SI_E_EEbPKcSL_T_: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_10], rdx mov [rbp+var_18], rdi mov [rbp+var_20], rsi loc_3DC27: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_AA], al jnb short loc_3DC4C mov rax, [rbp+var_20] movsx edi, byte ptr [rax-1]; this call _ZN7httplib6detail15is_space_or_tabEc; httplib::detail::is_space_or_tab(char) mov [rbp+var_AA], al loc_3DC4C: mov al, [rbp+var_AA] test al, 1 jnz short loc_3DC58 jmp short loc_3DC66 loc_3DC58: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_3DC27 loc_3DC66: mov rax, [rbp+var_18] mov [rbp+var_28], rax loc_3DC6E: mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_AB], al jnb short loc_3DC93 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' setnz al mov [rbp+var_AB], al loc_3DC93: mov al, [rbp+var_AB] test al, 1 jnz short loc_3DC9F jmp short loc_3DCAD loc_3DC9F: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_3DC6E loc_3DCAD: mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnz short loc_3DCC0 mov [rbp+var_1], 0 jmp loc_3DEA3 loc_3DCC0: mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_3DCE8 mov [rbp+var_1], 0 jmp loc_3DEA3 loc_3DCE8: jmp short $+2 loc_3DCEA: mov rcx, [rbp+var_28] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_AC], al jnb short loc_3DD0E mov rax, [rbp+var_28] movsx edi, byte ptr [rax]; this call _ZN7httplib6detail15is_space_or_tabEc; httplib::detail::is_space_or_tab(char) mov [rbp+var_AC], al loc_3DD0E: mov al, [rbp+var_AC] test al, 1 jnz short loc_3DD1A jmp short loc_3DD28 loc_3DD1A: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_3DCEA loc_3DD28: mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb loc_3DE9F mov rax, [rbp+var_18] mov [rbp+var_C8], rax mov rax, [rbp+var_30] mov [rbp+var_C0], rax lea rdi, [rbp+var_51] mov [rbp+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_C8] mov rdx, [rbp+var_C0] mov rcx, [rbp+var_B8] lea rdi, [rbp+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_3DD7C: mov rax, [rbp+var_28] mov [rbp+var_E0], rax mov rax, [rbp+var_20] mov [rbp+var_D8], rax lea rdi, [rbp+var_A9] mov [rbp+var_D0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_E0] mov rdx, [rbp+var_D8] mov rcx, [rbp+var_D0] lea rdi, [rbp+var_A8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_3DDC8: lea rdi, [rbp+var_88] lea rsi, [rbp+var_A8] xor edx, edx call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool) jmp short $+2 loc_3DDDF: lea rdi, [rbp+var_10] lea rsi, [rbp+var_50] lea rdx, [rbp+var_88] call _ZZN7httplib6detail12read_headersERNS_6StreamERSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_NS0_2ciESaISt4pairIKS9_S9_EEEENKUlOS9_SH_E_clESH_SH_; httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1}::operator()(std::string&,std::string&) jmp short $+2 loc_3DDF5: lea rdi, [rbp+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_A9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_1], 1 jmp short loc_3DEA3 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_3DE94 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_3DE7F mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_3DE73 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax lea rdi, [rbp+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3DE73: lea rdi, [rbp+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3DE7F: lea rdi, [rbp+var_A9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3DE94: lea rdi, [rbp+var_51] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_3DEB1 loc_3DE9F: mov [rbp+var_1], 0 loc_3DEA3: mov al, [rbp+var_1] and al, 1 add rsp, 0E0h pop rbp retn loc_3DEB1: mov rdi, [rbp+var_60] call __Unwind_Resume
char httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1}>( _BYTE *a1, _BYTE *a2, long long a3) { _BYTE *v3; // rax long long v4; // rdx _BYTE *v6; // [rsp+0h] [rbp-E0h] _BYTE *v7; // [rsp+8h] [rbp-D8h] _BYTE *v8; // [rsp+18h] [rbp-C8h] _BYTE *v9; // [rsp+20h] [rbp-C0h] char v10; // [rsp+34h] [rbp-ACh] bool v11; // [rsp+35h] [rbp-ABh] char is_space_or_tab; // [rsp+36h] [rbp-AAh] char v13; // [rsp+37h] [rbp-A9h] BYREF _BYTE v14[32]; // [rsp+38h] [rbp-A8h] BYREF _BYTE v15[36]; // [rsp+58h] [rbp-88h] BYREF char v16; // [rsp+8Fh] [rbp-51h] BYREF _BYTE v17[32]; // [rsp+90h] [rbp-50h] BYREF _BYTE *v18; // [rsp+B0h] [rbp-30h] _BYTE *j; // [rsp+B8h] [rbp-28h] _BYTE *i; // [rsp+C0h] [rbp-20h] _BYTE *v21; // [rsp+C8h] [rbp-18h] long long v22; // [rsp+D0h] [rbp-10h] BYREF v22 = a3; v21 = a1; for ( i = a2; ; --i ) { is_space_or_tab = 0; if ( v21 < i ) is_space_or_tab = httplib::detail::is_space_or_tab((httplib::detail *)(unsigned int)(char)*(i - 1), (char)a2); if ( (is_space_or_tab & 1) == 0 ) break; } for ( j = v21; ; ++j ) { v11 = 0; if ( j < i ) v11 = *j != 58; if ( !v11 ) break; } if ( j == i ) return 0; v18 = j; v3 = j++; if ( *v3 != 58 ) return 0; while ( 1 ) { v10 = 0; if ( j < i ) v10 = httplib::detail::is_space_or_tab((httplib::detail *)(unsigned int)(char)*j, (char)a2); if ( (v10 & 1) == 0 ) break; ++j; } if ( j >= i ) return 0; v8 = v21; v9 = v18; std::allocator<char>::allocator(&v16, a2, a3); std::string::basic_string<char const*,void>(v17, v8, v9, &v16); v6 = j; v7 = i; std::allocator<char>::allocator(&v13, v8, v4); std::string::basic_string<char const*,void>(v14, v6, v7, &v13); httplib::detail::decode_url(v15, v14, 0LL); httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1}::operator()( &v22, v17, v15); std::string::~string(v15); std::string::~string(v14); std::allocator<char>::~allocator(&v13); std::string::~string(v17); std::allocator<char>::~allocator(&v16); return 1; }
parse_header<httplib::detail::read_headers(httplib::Stream&,std::multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::{lambda(std::__cxx11::string&&,std::__cxx11::string&&)#1}>: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI LAB_0013dc27: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0xaa],AL JNC 0x0013dc4c MOV RAX,qword ptr [RBP + -0x20] MOVSX EDI,byte ptr [RAX + -0x1] CALL 0x0013dec0 MOV byte ptr [RBP + -0xaa],AL LAB_0013dc4c: MOV AL,byte ptr [RBP + -0xaa] TEST AL,0x1 JNZ 0x0013dc58 JMP 0x0013dc66 LAB_0013dc58: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0013dc27 LAB_0013dc66: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_0013dc6e: MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0xab],AL JNC 0x0013dc93 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a SETNZ AL MOV byte ptr [RBP + -0xab],AL LAB_0013dc93: MOV AL,byte ptr [RBP + -0xab] TEST AL,0x1 JNZ 0x0013dc9f JMP 0x0013dcad LAB_0013dc9f: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0013dc6e LAB_0013dcad: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0013dcc0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013dea3 LAB_0013dcc0: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x0013dce8 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013dea3 LAB_0013dce8: JMP 0x0013dcea LAB_0013dcea: MOV RCX,qword ptr [RBP + -0x28] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0xac],AL JNC 0x0013dd0e MOV RAX,qword ptr [RBP + -0x28] MOVSX EDI,byte ptr [RAX] CALL 0x0013dec0 MOV byte ptr [RBP + -0xac],AL LAB_0013dd0e: MOV AL,byte ptr [RBP + -0xac] TEST AL,0x1 JNZ 0x0013dd1a JMP 0x0013dd28 LAB_0013dd1a: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0013dcea LAB_0013dd28: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0013de9f MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0xc0],RAX LEA RDI,[RBP + -0x51] MOV qword ptr [RBP + -0xb8],RDI CALL 0x0010abf0 MOV RSI,qword ptr [RBP + -0xc8] MOV RDX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xb8] LAB_0013dd71: LEA RDI,[RBP + -0x50] CALL 0x0013df30 JMP 0x0013dd7c LAB_0013dd7c: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xe0],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xd8],RAX LEA RDI,[RBP + -0xa9] MOV qword ptr [RBP + -0xd0],RDI CALL 0x0010abf0 MOV RSI,qword ptr [RBP + -0xe0] MOV RDX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RBP + -0xd0] LAB_0013ddba: LEA RDI,[RBP + -0xa8] CALL 0x0013df30 JMP 0x0013ddc8 LAB_0013ddc8: LEA RDI,[RBP + -0x88] LEA RSI,[RBP + -0xa8] XOR EDX,EDX CALL 0x0013dfa0 JMP 0x0013dddf LAB_0013dddf: LEA RDI,[RBP + -0x10] LEA RSI,[RBP + -0x50] LEA RDX,[RBP + -0x88] CALL 0x0013def0 LAB_0013ddf3: JMP 0x0013ddf5 LAB_0013ddf5: LEA RDI,[RBP + -0x88] CALL 0x0010aec8 LEA RDI,[RBP + -0xa8] CALL 0x0010aec8 LEA RDI,[RBP + -0xa9] CALL 0x0010aeb0 LEA RDI,[RBP + -0x50] CALL 0x0010aec8 LEA RDI,[RBP + -0x51] CALL 0x0010aeb0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013dea3 LAB_0013de9f: MOV byte ptr [RBP + -0x1],0x0 LAB_0013dea3: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xe0 POP RBP RET
/* bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >&)::{lambda(std::__cxx11::string&&, std::__cxx11::string&&)#1}>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >&)::{lambda(std::__cxx11::string&&, std::__cxx11::string&&)#1}) */ bool httplib::detail:: parse_header<httplib::detail::read_headers(httplib::Stream&,std::multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::_lambda(std::__cxx11::string&&,std::__cxx11::string&&)_1_> (char *param_1,char *param_2,int8 param_3) { char *pcVar1; char *pcVar2; bool bVar3; byte local_b4; byte local_b2; allocator local_b1; string local_b0 [32]; detail local_90 [55]; allocator local_59; string local_58 [32]; char *local_38; char *local_30; char *local_28; char *local_20; int8 local_18; bool local_9; local_28 = param_2; local_20 = param_1; local_18 = param_3; while( true ) { local_b2 = 0; if (local_20 < local_28) { local_b2 = is_space_or_tab(local_28[-1]); } if ((local_b2 & 1) == 0) break; local_28 = local_28 + -1; } local_30 = local_20; while( true ) { bVar3 = false; if (local_30 < local_28) { bVar3 = *local_30 != ':'; } if (!bVar3) break; local_30 = local_30 + 1; } if (local_30 == local_28) { local_9 = false; } else { local_38 = local_30; if (*local_30 == ':') { do { local_30 = local_30 + 1; local_b4 = 0; if (local_30 < local_28) { local_b4 = is_space_or_tab(*local_30); } pcVar2 = local_20; pcVar1 = local_38; } while ((local_b4 & 1) != 0); if (local_30 < local_28) { std::allocator<char>::allocator(); /* try { // try from 0013dd71 to 0013dd79 has its CatchHandler @ 0013de31 */ std::__cxx11::string::string<char_const*,void>(local_58,pcVar2,pcVar1,&local_59); pcVar2 = local_28; pcVar1 = local_30; std::allocator<char>::allocator(); /* try { // try from 0013ddba to 0013ddc5 has its CatchHandler @ 0013de3f */ std::__cxx11::string::string<char_const*,void>(local_b0,pcVar1,pcVar2,&local_b1); /* try { // try from 0013ddc8 to 0013dddc has its CatchHandler @ 0013de4d */ decode_url(local_90,local_b0,false); /* try { // try from 0013dddf to 0013ddf2 has its CatchHandler @ 0013de5b */ read_headers(httplib::Stream&,std::multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&) ::{lambda(std::__cxx11::string&&,std::__cxx11::string&&)#1}::operator() ((_lambda_std____cxx11__string___std____cxx11__string____1_ *)&local_18,local_58, (string *)local_90); std::__cxx11::string::~string((string *)local_90); std::__cxx11::string::~string(local_b0); std::allocator<char>::~allocator((allocator<char> *)&local_b1); std::__cxx11::string::~string(local_58); std::allocator<char>::~allocator((allocator<char> *)&local_59); local_9 = true; } else { local_9 = false; } } else { local_9 = false; } } return local_9; }
61,445
ggml_vec_dot_q8_0_q8_0
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-quants.c
void ggml_vec_dot_q8_0_q8_0(int n, float * restrict s, size_t bs, const void * restrict vx, size_t bx, const void * restrict vy, size_t by, int nrc) { const int qk = QK8_0; const int nb = n / qk; assert(n % qk == 0); #if defined(__ARM_FEATURE_MATMUL_INT8) assert((nrc == 2) || (nrc == 1)); #else assert(nrc == 1); #endif UNUSED(nrc); UNUSED(bx); UNUSED(by); UNUSED(bs); const block_q8_0 * restrict x = vx; const block_q8_0 * restrict y = vy; #if defined(__ARM_FEATURE_MATMUL_INT8) if (nrc == 2) { const block_q8_0 * restrict vx0 = vx; const block_q8_0 * restrict vx1 = (const block_q8_0 *) ((const uint8_t*)vx + bx); const block_q8_0 * restrict vy0 = vy; const block_q8_0 * restrict vy1 = (const block_q8_0 *) ((const uint8_t*)vy + by); float32x4_t sumv0 = vdupq_n_f32(0.0f); for (int i = 0; i < nb; i++) { const block_q8_0 * restrict b_x0 = &vx0[i]; const block_q8_0 * restrict b_y0 = &vy0[i]; const block_q8_0 * restrict b_x1 = &vx1[i]; const block_q8_0 * restrict b_y1 = &vy1[i]; const int8x16_t x0_l = vld1q_s8(b_x0->qs); const int8x16_t x0_h = vld1q_s8(b_x0->qs + 16); const int8x16_t x1_l = vld1q_s8(b_x1->qs); const int8x16_t x1_h = vld1q_s8(b_x1->qs + 16); // load y const int8x16_t y0_l = vld1q_s8(b_y0->qs); const int8x16_t y0_h = vld1q_s8(b_y0->qs + 16); const int8x16_t y1_l = vld1q_s8(b_y1->qs); const int8x16_t y1_h = vld1q_s8(b_y1->qs + 16); float32_t _scale[4] = { GGML_FP16_TO_FP32(b_x0->d)*GGML_FP16_TO_FP32(b_y0->d), GGML_FP16_TO_FP32(b_x0->d)*GGML_FP16_TO_FP32(b_y1->d), GGML_FP16_TO_FP32(b_x1->d)*GGML_FP16_TO_FP32(b_y0->d), GGML_FP16_TO_FP32(b_x1->d)*GGML_FP16_TO_FP32(b_y1->d) }; float32x4_t scale = vld1q_f32(_scale); int8x16_t l0 = vreinterpretq_s8_s64(vzip1q_s64(vreinterpretq_s64_s8(x0_l), vreinterpretq_s64_s8(x1_l))); int8x16_t l1 = vreinterpretq_s8_s64(vzip2q_s64(vreinterpretq_s64_s8(x0_l), vreinterpretq_s64_s8(x1_l))); int8x16_t l2 = vreinterpretq_s8_s64(vzip1q_s64(vreinterpretq_s64_s8(x0_h), vreinterpretq_s64_s8(x1_h))); int8x16_t l3 = vreinterpretq_s8_s64(vzip2q_s64(vreinterpretq_s64_s8(x0_h), vreinterpretq_s64_s8(x1_h))); int8x16_t r0 = vreinterpretq_s8_s64(vzip1q_s64(vreinterpretq_s64_s8(y0_l), vreinterpretq_s64_s8(y1_l))); int8x16_t r1 = vreinterpretq_s8_s64(vzip2q_s64(vreinterpretq_s64_s8(y0_l), vreinterpretq_s64_s8(y1_l))); int8x16_t r2 = vreinterpretq_s8_s64(vzip1q_s64(vreinterpretq_s64_s8(y0_h), vreinterpretq_s64_s8(y1_h))); int8x16_t r3 = vreinterpretq_s8_s64(vzip2q_s64(vreinterpretq_s64_s8(y0_h), vreinterpretq_s64_s8(y1_h))); sumv0 = vmlaq_f32(sumv0,(vcvtq_f32_s32(vmmlaq_s32((vmmlaq_s32((vmmlaq_s32((vmmlaq_s32(vdupq_n_s32(0), l0, r0)), l1, r1)), l2, r2)), l3, r3))), scale); } float32x4_t sumv1 = vextq_f32 (sumv0, sumv0, 2); float32x4_t sumv2 = vzip1q_f32(sumv0, sumv1); vst1_f32(s, vget_low_f32 (sumv2)); vst1_f32(s + bs, vget_high_f32(sumv2)); return; } #endif int ib = 0; float sumf = 0; #if defined(__ARM_FEATURE_SVE) svfloat32_t sumv0 = svdup_n_f32(0.0f); svfloat32_t sumv1 = svdup_n_f32(0.0f); const int vector_length = ggml_cpu_get_sve_cnt()*8; //VLA Implemenation for SVE switch (vector_length) { case 128: { // predicate for activating lanes for 16 Int8 elements const svbool_t ph16 = svptrue_pat_b8 (SV_VL16); const svbool_t pl16 = svptrue_pat_b32(SV_VL4); for (; ib + 1 < nb; ib += 2) { const block_q8_0 * restrict x0 = &x[ib + 0]; const block_q8_0 * restrict x1 = &x[ib + 1]; const block_q8_0 * restrict y0 = &y[ib + 0]; const block_q8_0 * restrict y1 = &y[ib + 1]; // load x const svint8_t qx0_0 = svld1_s8(ph16, x0->qs); const svint8_t qx0_1 = svld1_s8(ph16, x0->qs+16); const svint8_t qx1_0 = svld1_s8(ph16, x1->qs); const svint8_t qx1_1 = svld1_s8(ph16, x1->qs+16); // load y const svint8_t qy0_0 = svld1_s8(ph16, y0->qs); const svint8_t qy0_1 = svld1_s8(ph16, y0->qs+16); const svint8_t qy1_0 = svld1_s8(ph16, y1->qs); const svint8_t qy1_1 = svld1_s8(ph16, y1->qs+16); sumv0 = svmla_n_f32_x(pl16, sumv0, svcvt_f32_s32_x(pl16, svadd_x(pl16, svdot_s32(svdup_n_s32(0), qx0_0, qy0_0), svdot_s32(svdup_n_s32(0), qx0_1, qy0_1))), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d)); sumv1 = svmla_n_f32_x(pl16, sumv1, svcvt_f32_s32_x(pl16, svadd_x(pl16, svdot_s32(svdup_n_s32(0), qx1_0, qy1_0), svdot_s32(svdup_n_s32(0), qx1_1, qy1_1))), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d)); } sumf = svaddv_f32(pl16, svadd_f32_x(pl16, sumv0, sumv1)); } break; case 256: { //printf("sve256"); for (; ib + 1 < nb; ib += 2) { const block_q8_0 * restrict x0 = &x[ib + 0]; const block_q8_0 * restrict x1 = &x[ib + 1]; const block_q8_0 * restrict y0 = &y[ib + 0]; const block_q8_0 * restrict y1 = &y[ib + 1]; // load x const svint8_t qx0 = svld1_s8(svptrue_b8(), x0->qs); const svint8_t qx1 = svld1_s8(svptrue_b8(), x1->qs); // load y const svint8_t qy0 = svld1_s8(svptrue_b8(), y0->qs); const svint8_t qy1 = svld1_s8(svptrue_b8(), y1->qs); sumv0 = svmla_n_f32_x(svptrue_b32(), sumv0, svcvt_f32_s32_x(svptrue_b32(), svdot_s32(svdup_n_s32(0), qx0, qy0)), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d)); sumv1 = svmla_n_f32_x(svptrue_b32(), sumv1, svcvt_f32_s32_x(svptrue_b32(), svdot_s32(svdup_n_s32(0), qx1, qy1)), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d)); } sumf = svaddv_f32(svptrue_b32(), svadd_f32_x(svptrue_b32(), sumv0, sumv1)); } break; case 512: { // predicate for activating high 256 bit const svbool_t ph32 = svptrue_pat_b8(SV_VL32); // predicate for activating low 256 bit const svbool_t pl32 = svnot_b_z(svptrue_b8(), ph32); // predicate for activating high lanes for 8 float32 elements const svbool_t ph8 = svptrue_pat_b32(SV_VL8); // predicate for activating low lanes for 8 float32 elements const svbool_t pl8 = svnot_b_z(svptrue_b32(), ph8); svfloat32_t sumv00 = svdup_n_f32(0.0f); for (; ib + 1 < nb; ib += 2) { const block_q8_0 * restrict x0 = &x[ib + 0]; const block_q8_0 * restrict x1 = &x[ib + 1]; const block_q8_0 * restrict y0 = &y[ib + 0]; const block_q8_0 * restrict y1 = &y[ib + 1]; //load 32 int8_t in first half of vector and put another 32 int8_t in second vector lower bits // and add them to make one 64 element vector // load x const svint8_t qx_32 = svld1_s8(ph32, x0->qs); svint8_t qx_64 = svld1_s8(pl32, x0->qs + 2); qx_64 = svadd_s8_x(svptrue_b8(), qx_32, qx_64); // load y const svint8_t qy_32 = svld1_s8(ph32, y0->qs); svint8_t qy_64 = svld1_s8(pl32, y0->qs + 2); qy_64 = svadd_s8_x(svptrue_b8(), qy_32, qy_64); // scale creation const float32_t deq1 = GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d); const float32_t deq2 = GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d); // duplicate deq1 in first half of vector and deq2 in second half of vector const svfloat32_t temp = svdup_f32_m(svdup_f32_z(ph8, deq1), pl8, deq2); const svfloat32_t sumvt = svcvt_f32_s32_x(svptrue_b32(), svdot_s32(svdup_n_s32(0), qx_64, qy_64)); sumv00 = svmla_f32_m(svptrue_b32(), sumv00, sumvt, temp); } sumf = svaddv_f32(svptrue_b32(), sumv00); break; } default: assert(false && "Unsupported vector length"); break; } #elif defined(__ARM_NEON) float32x4_t sumv0 = vdupq_n_f32(0.0f); float32x4_t sumv1 = vdupq_n_f32(0.0f); for (; ib + 1 < nb; ib += 2) { const block_q8_0 * restrict x0 = &x[ib + 0]; const block_q8_0 * restrict x1 = &x[ib + 1]; const block_q8_0 * restrict y0 = &y[ib + 0]; const block_q8_0 * restrict y1 = &y[ib + 1]; const int8x16_t x0_0 = vld1q_s8(x0->qs); const int8x16_t x0_1 = vld1q_s8(x0->qs + 16); const int8x16_t x1_0 = vld1q_s8(x1->qs); const int8x16_t x1_1 = vld1q_s8(x1->qs + 16); // load y const int8x16_t y0_0 = vld1q_s8(y0->qs); const int8x16_t y0_1 = vld1q_s8(y0->qs + 16); const int8x16_t y1_0 = vld1q_s8(y1->qs); const int8x16_t y1_1 = vld1q_s8(y1->qs + 16); sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(vaddq_s32( ggml_vdotq_s32(vdupq_n_s32(0), x0_0, y0_0), ggml_vdotq_s32(vdupq_n_s32(0), x0_1, y0_1))), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d)); sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(vaddq_s32( ggml_vdotq_s32(vdupq_n_s32(0), x1_0, y1_0), ggml_vdotq_s32(vdupq_n_s32(0), x1_1, y1_1))), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d)); } sumf = vaddvq_f32(sumv0) + vaddvq_f32(sumv1); #elif defined(__AVX2__) // Initialize accumulator with zeros __m256 acc = _mm256_setzero_ps(); // Main loop for (; ib < nb; ++ib) { // Compute combined scale for the block const __m256 d = _mm256_set1_ps(GGML_FP16_TO_FP32(x[ib].d) * GGML_FP16_TO_FP32(y[ib].d)); __m256i qx = _mm256_loadu_si256((const __m256i *)x[ib].qs); __m256i qy = _mm256_loadu_si256((const __m256i *)y[ib].qs); const __m256 q = mul_sum_i8_pairs_float(qx, qy); // Multiply q with scale and accumulate acc = _mm256_fmadd_ps( d, q, acc ); } sumf = hsum_float_8(acc); #elif defined(__AVX__) __m256 accum = _mm256_setzero_ps(); for (; ib + 1 < nb; ib += 2) { const __m128i qx_1_0 = _mm_loadu_si128((const __m128i *)x[ib].qs); const __m128i qx_1_1 = _mm_loadu_si128((const __m128i *)x[ib].qs + 1); const __m128i qx_2_0 = _mm_loadu_si128((const __m128i *)x[ib + 1].qs); const __m128i qx_2_1 = _mm_loadu_si128((const __m128i *)x[ib + 1].qs + 1); const __m128i qy_1_0 = _mm_loadu_si128((const __m128i *)y[ib].qs); const __m128i qy_1_1 = _mm_loadu_si128((const __m128i *)y[ib].qs + 1); const __m128i qy_2_0 = _mm_loadu_si128((const __m128i *)y[ib + 1].qs); const __m128i qy_2_1 = _mm_loadu_si128((const __m128i *)y[ib + 1].qs + 1); const __m256 p = mul_sum_i8_quad_float(qx_1_0, qx_1_1, qx_2_0, qx_2_1, qy_1_0, qy_1_1, qy_2_0, qy_2_1); const __m256 deltas = quad_fp16_delta_float(x[ib].d, y[ib].d, x[ib + 1].d, y[ib + 1].d); accum = _mm256_add_ps(_mm256_mul_ps(deltas, p), accum); } sumf = hsum_float_8(accum); #elif defined(__riscv_v_intrinsic) size_t vl = __riscv_vsetvl_e8m1(qk); for (; ib < nb; ++ib) { // load elements vint8m1_t bx_0 = __riscv_vle8_v_i8m1(x[ib].qs, vl); vint8m1_t by_0 = __riscv_vle8_v_i8m1(y[ib].qs, vl); vint16m2_t vw_mul = __riscv_vwmul_vv_i16m2(bx_0, by_0, vl); vint32m1_t v_zero = __riscv_vmv_v_x_i32m1(0, vl); vint32m1_t v_sum = __riscv_vwredsum_vs_i16m2_i32m1(vw_mul, v_zero, vl); int sumi = __riscv_vmv_x_s_i32m1_i32(v_sum); sumf += sumi*(GGML_FP16_TO_FP32(x[ib].d)*GGML_FP16_TO_FP32(y[ib].d)); } #elif defined(__POWER9_VECTOR__) const vector signed int v0 = vec_splats((int32_t)0); vector float vsumf0 = vec_splats(0.0f); #pragma GCC unroll 8 for (; ib < nb; ++ib) { __builtin_prefetch(x[ib].qs, 0, 1); __builtin_prefetch(y[ib].qs, 0, 1); vector float vxd = vec_splats(GGML_FP16_TO_FP32(x[ib].d)); vector float vyd = vec_splats(GGML_FP16_TO_FP32(y[ib].d)); vector float vd = vec_mul(vxd, vyd); vector signed char q8x0 = vec_xl( 0, x[ib].qs); vector signed char q8x1 = vec_xl(16, x[ib].qs); vector signed char q8y0 = vec_xl( 0, y[ib].qs); vector signed char q8y1 = vec_xl(16, y[ib].qs); vector signed short qv0 = vec_mule(q8x0, q8y0); vector signed short qv1 = vec_mulo(q8x0, q8y0); vector signed short qv2 = vec_mule(q8x1, q8y1); vector signed short qv3 = vec_mulo(q8x1, q8y1); vector signed int vsumi0 = v0; vector signed int vsumi1 = v0; vsumi0 = vec_sum4s(qv0, vsumi0); vsumi1 = vec_sum4s(qv1, vsumi1); vsumi0 = vec_sum4s(qv2, vsumi0); vsumi1 = vec_sum4s(qv3, vsumi1); vsumi0 = vec_add(vsumi0, vsumi1); vsumf0 = vec_madd(vec_ctf(vsumi0, 0), vd, vsumf0); } vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 4)); vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 8)); sumf = vec_extract(vsumf0, 0); #elif defined(__loongarch_asx) // Initialize accumulator with zeros __m256 acc = (__m256)__lasx_xvldi(0); // Main loop for (; ib < nb; ++ib) { // Compute combined scale for the block const __m256 d = __lasx_xvreplfr2vr_s(GGML_FP16_TO_FP32(x[ib].d) * GGML_FP16_TO_FP32(y[ib].d)); __m256i qx = __lasx_xvld((const __m256i *)x[ib].qs, 0); __m256i qy = __lasx_xvld((const __m256i *)y[ib].qs, 0); const __m256 q = mul_sum_i8_pairs_float(qx, qy); // Multiply q with scale and accumulate acc = __lasx_xvfmadd_s( d, q, acc ); } sumf = hsum_float_8(acc); #endif for (; ib < nb; ++ib) { int sumi = 0; for (int j = 0; j < qk; j++) { sumi += x[ib].qs[j]*y[ib].qs[j]; } sumf += sumi*(GGML_FP16_TO_FP32(x[ib].d)*GGML_FP16_TO_FP32(y[ib].d)); } *s = sumf; }
O3
c
ggml_vec_dot_q8_0_q8_0: leal 0x1f(%rdi), %eax testl %edi, %edi cmovnsl %edi, %eax sarl $0x5, %eax cmpl $0x20, %edi jl 0x30d33 movl %eax, %edx movq %rdx, %rdi shlq $0x5, %rdi leaq (%rdi,%rdx,2), %rdx vxorps %xmm0, %xmm0, %xmm0 xorl %edi, %edi movq 0x34297(%rip), %r8 # 0x64f70 vpbroadcastw 0x24912(%rip), %ymm1 # 0x555f4 movzwl (%rcx,%rdi), %r10d vmovss (%r8,%r10,4), %xmm2 movzwl (%r9,%rdi), %r10d vmulss (%r8,%r10,4), %xmm2, %xmm2 vbroadcastss %xmm2, %ymm2 vmovdqu 0x2(%rcx,%rdi), %ymm3 vmovdqu 0x2(%r9,%rdi), %ymm4 vpsignb %ymm3, %ymm3, %ymm5 vpsignb %ymm3, %ymm4, %ymm3 vpmaddubsw %ymm3, %ymm5, %ymm3 vpmaddwd %ymm3, %ymm1, %ymm3 vcvtdq2ps %ymm3, %ymm3 vfmadd231ps %ymm3, %ymm2, %ymm0 # ymm0 = (ymm2 * ymm3) + ymm0 addq $0x22, %rdi cmpq %rdi, %rdx jne 0x30ce2 movl %eax, %edx jmp 0x30d39 xorl %edx, %edx vxorps %xmm0, %xmm0, %xmm0 pushq %rbx vextractf128 $0x1, %ymm0, %xmm1 vaddps %xmm0, %xmm1, %xmm0 vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0] vaddps %xmm1, %xmm0, %xmm0 vhaddps %xmm0, %xmm0, %xmm0 cmpl %eax, %edx jge 0x30def movl %edx, %edx movq %rdx, %rdi shlq $0x5, %rdi leaq (%rdi,%rdx,2), %r8 leaq (%rcx,%r8), %rdi addq $0x2, %rdi addq %r9, %r8 addq $0x2, %r8 movq 0x341f4(%rip), %r10 # 0x64f70 vxorps %xmm1, %xmm1, %xmm1 xorl %r11d, %r11d vpmovsxbw (%rdi,%r11), %xmm2 vpmovsxbw (%r8,%r11), %xmm3 vpmaddwd %xmm2, %xmm3, %xmm2 vpaddd %ymm1, %ymm2, %ymm1 addq $0x8, %r11 cmpq $0x20, %r11 jne 0x30d83 vextracti128 $0x1, %ymm1, %xmm2 vphaddd %xmm1, %xmm2, %xmm1 vphaddd %xmm1, %xmm1, %xmm1 vphaddd %xmm1, %xmm1, %xmm1 movq %rdx, %r11 shlq $0x5, %r11 leaq (%r11,%rdx,2), %r11 movzwl (%rcx,%r11), %ebx vmovss (%r10,%rbx,4), %xmm2 movzwl (%r9,%r11), %r11d vmulss (%r10,%r11,4), %xmm2, %xmm2 vcvtdq2ps %xmm1, %xmm1 vfmadd231ss %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm2) + xmm0 incq %rdx addq $0x22, %rdi addq $0x22, %r8 cmpl %edx, %eax jg 0x30d7c vmovss %xmm0, (%rsi) popq %rbx vzeroupper retq
ggml_vec_dot_q8_0_q8_0: lea eax, [rdi+1Fh] test edi, edi cmovns eax, edi sar eax, 5 cmp edi, 20h ; ' ' jl short loc_30D33 mov edx, eax mov rdi, rdx shl rdi, 5 lea rdx, [rdi+rdx*2] vxorps xmm0, xmm0, xmm0 xor edi, edi mov r8, cs:ggml_table_f32_f16_ptr vpbroadcastw ymm1, cs:word_555F4 loc_30CE2: movzx r10d, word ptr [rcx+rdi] vmovss xmm2, dword ptr [r8+r10*4] movzx r10d, word ptr [r9+rdi] vmulss xmm2, xmm2, dword ptr [r8+r10*4] vbroadcastss ymm2, xmm2 vmovdqu ymm3, ymmword ptr [rcx+rdi+2] vmovdqu ymm4, ymmword ptr [r9+rdi+2] vpsignb ymm5, ymm3, ymm3 vpsignb ymm3, ymm4, ymm3 vpmaddubsw ymm3, ymm5, ymm3 vpmaddwd ymm3, ymm1, ymm3 vcvtdq2ps ymm3, ymm3 vfmadd231ps ymm0, ymm2, ymm3 add rdi, 22h ; '"' cmp rdx, rdi jnz short loc_30CE2 mov edx, eax jmp short loc_30D39 loc_30D33: xor edx, edx vxorps xmm0, xmm0, xmm0 loc_30D39: push rbx vextractf128 xmm1, ymm0, 1 vaddps xmm0, xmm1, xmm0 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 cmp edx, eax jge loc_30DEF mov edx, edx mov rdi, rdx shl rdi, 5 lea r8, [rdi+rdx*2] lea rdi, [rcx+r8] add rdi, 2 add r8, r9 add r8, 2 mov r10, cs:ggml_table_f32_f16_ptr loc_30D7C: vxorps xmm1, xmm1, xmm1 xor r11d, r11d loc_30D83: vpmovsxbw xmm2, qword ptr [rdi+r11] vpmovsxbw xmm3, qword ptr [r8+r11] vpmaddwd xmm2, xmm3, xmm2 vpaddd ymm1, ymm2, ymm1 add r11, 8 cmp r11, 20h ; ' ' jnz short loc_30D83 vextracti128 xmm2, ymm1, 1 vphaddd xmm1, xmm2, xmm1 vphaddd xmm1, xmm1, xmm1 vphaddd xmm1, xmm1, xmm1 mov r11, rdx shl r11, 5 lea r11, [r11+rdx*2] movzx ebx, word ptr [rcx+r11] vmovss xmm2, dword ptr [r10+rbx*4] movzx r11d, word ptr [r9+r11] vmulss xmm2, xmm2, dword ptr [r10+r11*4] vcvtdq2ps xmm1, xmm1 vfmadd231ss xmm0, xmm1, xmm2 inc rdx add rdi, 22h ; '"' add r8, 22h ; '"' cmp eax, edx jg short loc_30D7C loc_30DEF: vmovss dword ptr [rsi], xmm0 pop rbx vzeroupper retn
long long ggml_vec_dot_q8_0_q8_0( int a1, long long _RSI, __m128 _XMM0, long long a4, long long _RCX, long long a6, long long _R9) { long long result; // rax long long v24; // rdx long long v31; // r8 result = (unsigned int)(a1 / 32); if ( a1 < 32 ) { LODWORD(v24) = 0; __asm { vxorps xmm0, xmm0, xmm0 } } else { __asm { vxorps xmm0, xmm0, xmm0 } _RDI = 0LL; _R8 = &ggml_table_f32_f16; __asm { vpbroadcastw ymm1, cs:word_555F4 } do { _R10 = *(unsigned __int16 *)(_RCX + _RDI); __asm { vmovss xmm2, dword ptr [r8+r10*4] vmulss xmm2, xmm2, dword ptr [r8+r10*4] vbroadcastss ymm2, xmm2 vmovdqu ymm3, ymmword ptr [rcx+rdi+2] vmovdqu ymm4, ymmword ptr [r9+rdi+2] vpsignb ymm5, ymm3, ymm3 vpsignb ymm3, ymm4, ymm3 vpmaddubsw ymm3, ymm5, ymm3 vpmaddwd ymm3, ymm1, ymm3 vcvtdq2ps ymm3, ymm3 vfmadd231ps ymm0, ymm2, ymm3 } _RDI += 34LL; } while ( 34LL * (unsigned int)result != _RDI ); LODWORD(v24) = result; } __asm { vextractf128 xmm1, ymm0, 1 vaddps xmm0, xmm1, xmm0 vshufpd xmm1, xmm0, xmm0, 1 vaddps xmm0, xmm0, xmm1 vhaddps xmm0, xmm0, xmm0 } if ( (int)v24 < (int)result ) { v24 = (unsigned int)v24; v31 = 34LL * (unsigned int)v24; _RDI = _RCX + v31 + 2; _R8 = _R9 + v31 + 2; _R10 = &ggml_table_f32_f16; do { __asm { vxorps xmm1, xmm1, xmm1 } for ( _R11 = 0LL; _R11 != 32; _R11 += 8LL ) { __asm { vpmovsxbw xmm2, qword ptr [rdi+r11] vpmovsxbw xmm3, qword ptr [r8+r11] vpmaddwd xmm2, xmm3, xmm2 vpaddd ymm1, ymm2, ymm1 } } __asm { vextracti128 xmm2, ymm1, 1 vphaddd xmm1, xmm2, xmm1 vphaddd xmm1, xmm1, xmm1 vphaddd xmm1, xmm1, xmm1 } _RBX = *(unsigned __int16 *)(_RCX + 34 * v24); __asm { vmovss xmm2, dword ptr [r10+rbx*4] vmulss xmm2, xmm2, dword ptr [r10+r11*4] vcvtdq2ps xmm1, xmm1 vfmadd231ss xmm0, xmm1, xmm2 } ++v24; _RDI += 34LL; _R8 += 34LL; } while ( (int)result > (int)v24 ); } __asm { vmovss dword ptr [rsi], xmm0 vzeroupper } return result; }
ggml_vec_dot_q8_0_q8_0: LEA EAX,[RDI + 0x1f] TEST EDI,EDI CMOVNS EAX,EDI SAR EAX,0x5 CMP EDI,0x20 JL 0x00130d33 MOV EDX,EAX MOV RDI,RDX SHL RDI,0x5 LEA RDX,[RDI + RDX*0x2] VXORPS XMM0,XMM0,XMM0 XOR EDI,EDI MOV R8,qword ptr [0x00164f70] VPBROADCASTW YMM1,word ptr [0x001555f4] LAB_00130ce2: MOVZX R10D,word ptr [RCX + RDI*0x1] VMOVSS XMM2,dword ptr [R8 + R10*0x4] MOVZX R10D,word ptr [R9 + RDI*0x1] VMULSS XMM2,XMM2,dword ptr [R8 + R10*0x4] VBROADCASTSS YMM2,XMM2 VMOVDQU YMM3,ymmword ptr [RCX + RDI*0x1 + 0x2] VMOVDQU YMM4,ymmword ptr [R9 + RDI*0x1 + 0x2] VPSIGNB YMM5,YMM3,YMM3 VPSIGNB YMM3,YMM4,YMM3 VPMADDUBSW YMM3,YMM5,YMM3 VPMADDWD YMM3,YMM1,YMM3 VCVTDQ2PS YMM3,YMM3 VFMADD231PS YMM0,YMM2,YMM3 ADD RDI,0x22 CMP RDX,RDI JNZ 0x00130ce2 MOV EDX,EAX JMP 0x00130d39 LAB_00130d33: XOR EDX,EDX VXORPS XMM0,XMM0,XMM0 LAB_00130d39: PUSH RBX VEXTRACTF128 XMM1,YMM0,0x1 VADDPS XMM0,XMM1,XMM0 VSHUFPD XMM1,XMM0,XMM0,0x1 VADDPS XMM0,XMM0,XMM1 VHADDPS XMM0,XMM0,XMM0 CMP EDX,EAX JGE 0x00130def MOV EDX,EDX MOV RDI,RDX SHL RDI,0x5 LEA R8,[RDI + RDX*0x2] LEA RDI,[RCX + R8*0x1] ADD RDI,0x2 ADD R8,R9 ADD R8,0x2 MOV R10,qword ptr [0x00164f70] LAB_00130d7c: VXORPS XMM1,XMM1,XMM1 XOR R11D,R11D LAB_00130d83: VPMOVSXBW XMM2,qword ptr [RDI + R11*0x1] VPMOVSXBW XMM3,qword ptr [R8 + R11*0x1] VPMADDWD XMM2,XMM3,XMM2 VPADDD YMM1,YMM2,YMM1 ADD R11,0x8 CMP R11,0x20 JNZ 0x00130d83 VEXTRACTI128 XMM2,YMM1,0x1 VPHADDD XMM1,XMM2,XMM1 VPHADDD XMM1,XMM1,XMM1 VPHADDD XMM1,XMM1,XMM1 MOV R11,RDX SHL R11,0x5 LEA R11,[R11 + RDX*0x2] MOVZX EBX,word ptr [RCX + R11*0x1] VMOVSS XMM2,dword ptr [R10 + RBX*0x4] MOVZX R11D,word ptr [R9 + R11*0x1] VMULSS XMM2,XMM2,dword ptr [R10 + R11*0x4] VCVTDQ2PS XMM1,XMM1 VFMADD231SS XMM0,XMM1,XMM2 INC RDX ADD RDI,0x22 ADD R8,0x22 CMP EAX,EDX JG 0x00130d7c LAB_00130def: VMOVSS dword ptr [RSI],XMM0 POP RBX VZEROUPPER RET
void ggml_vec_dot_q8_0_q8_0 (int param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5, long param_6) { int1 auVar1 [16]; float fVar2; int1 auVar3 [32]; int1 auVar4 [16]; uint uVar5; uint uVar7; ulong uVar8; long lVar9; long lVar10; long lVar11; int1 auVar12 [16]; int1 auVar13 [16]; int1 auVar14 [32]; int1 auVar15 [64]; int1 auVar16 [32]; int1 auVar17 [64]; int1 auVar18 [32]; int iVar6; iVar6 = param_1 + 0x1f; if (-1 < param_1) { iVar6 = param_1; } uVar5 = iVar6 >> 5; if (param_1 < 0x20) { auVar14 = SUB6432(ZEXT864(0),0); uVar7 = 0; } else { auVar15 = ZEXT864(0); lVar9 = 0; auVar16._2_2_ = DAT_001555f4; auVar16._0_2_ = DAT_001555f4; auVar16._4_2_ = DAT_001555f4; auVar16._6_2_ = DAT_001555f4; auVar16._8_2_ = DAT_001555f4; auVar16._10_2_ = DAT_001555f4; auVar16._12_2_ = DAT_001555f4; auVar16._14_2_ = DAT_001555f4; auVar16._16_2_ = DAT_001555f4; auVar16._18_2_ = DAT_001555f4; auVar16._20_2_ = DAT_001555f4; auVar16._22_2_ = DAT_001555f4; auVar16._24_2_ = DAT_001555f4; auVar16._26_2_ = DAT_001555f4; auVar16._28_2_ = DAT_001555f4; auVar16._30_2_ = DAT_001555f4; do { fVar2 = *(float *)(PTR_ggml_table_f32_f16_00164f70 + (ulong)*(ushort *)(param_4 + lVar9) * 4) * *(float *)(PTR_ggml_table_f32_f16_00164f70 + (ulong)*(ushort *)(param_6 + lVar9) * 4 ); auVar18._4_4_ = fVar2; auVar18._0_4_ = fVar2; auVar18._8_4_ = fVar2; auVar18._12_4_ = fVar2; auVar18._16_4_ = fVar2; auVar18._20_4_ = fVar2; auVar18._24_4_ = fVar2; auVar18._28_4_ = fVar2; auVar14 = *(int1 (*) [32])(param_4 + 2 + lVar9); auVar3 = vpsignb_avx2(auVar14,auVar14); auVar14 = vpsignb_avx2(*(int1 (*) [32])(param_6 + 2 + lVar9),auVar14); auVar14 = vpmaddubsw_avx2(auVar3,auVar14); auVar14 = vpmaddwd_avx2(auVar16,auVar14); auVar14 = vcvtdq2ps_avx(auVar14); auVar4 = vfmadd231ps_fma(auVar15._0_32_,auVar18,auVar14); auVar15 = ZEXT1664(auVar4); auVar14 = ZEXT1632(auVar4); lVar9 = lVar9 + 0x22; uVar7 = uVar5; } while ((ulong)uVar5 * 0x22 != lVar9); } auVar12._0_4_ = auVar14._16_4_ + auVar14._0_4_; auVar12._4_4_ = auVar14._20_4_ + auVar14._4_4_; auVar12._8_4_ = auVar14._24_4_ + auVar14._8_4_; auVar12._12_4_ = auVar14._28_4_ + auVar14._12_4_; auVar4 = vshufpd_avx(auVar12,auVar12,1); auVar13._0_4_ = auVar12._0_4_ + auVar4._0_4_; auVar13._4_4_ = auVar12._4_4_ + auVar4._4_4_; auVar13._8_4_ = auVar12._8_4_ + auVar4._8_4_; auVar13._12_4_ = auVar12._12_4_ + auVar4._12_4_; auVar4 = vhaddps_avx(auVar13,auVar13); auVar15 = ZEXT1664(auVar4); if ((int)uVar7 < (int)uVar5) { uVar8 = (ulong)uVar7; lVar9 = param_4 + uVar8 * 0x22 + 2; lVar10 = uVar8 * 0x22 + param_6 + 2; do { auVar17 = ZEXT1664(ZEXT816(0) << 0x40); lVar11 = 0; do { auVar4._8_8_ = 0; auVar4._0_8_ = *(ulong *)(lVar9 + lVar11); auVar4 = vpmovsxbw_avx(auVar4); auVar1._8_8_ = 0; auVar1._0_8_ = *(ulong *)(lVar10 + lVar11); auVar12 = vpmovsxbw_avx(auVar1); auVar4 = vpmaddwd_avx(auVar12,auVar4); auVar14 = vpaddd_avx2(ZEXT1632(auVar4),auVar17._0_32_); auVar17 = ZEXT3264(auVar14); lVar11 = lVar11 + 8; } while (lVar11 != 0x20); auVar4 = vphaddd_avx(auVar14._16_16_,auVar14._0_16_); auVar4 = vphaddd_avx(auVar4,auVar4); auVar4 = vphaddd_avx(auVar4,auVar4); auVar4 = vcvtdq2ps_avx(auVar4); auVar4 = vfmadd231ss_fma(auVar15._0_16_,auVar4, ZEXT416((uint)(*(float *)(PTR_ggml_table_f32_f16_00164f70 + (ulong)*(ushort *)(param_4 + uVar8 * 0x22) * 4) * *(float *)(PTR_ggml_table_f32_f16_00164f70 + (ulong)*(ushort *)(param_6 + uVar8 * 0x22) * 4)))); auVar15 = ZEXT1664(auVar4); uVar8 = uVar8 + 1; lVar9 = lVar9 + 0x22; lVar10 = lVar10 + 0x22; } while ((int)uVar8 < (int)uVar5); } *param_2 = auVar15._0_4_; return; }
61,446
ggml_compute_forward_repeat_back
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_repeat_back( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_repeat_back_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_repeat_back: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x149fa jmp 0x149eb movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x276b0 jmp 0x14a14 leaq 0x5f161(%rip), %rdi # 0x73b62 movl $0x1799, %esi # imm = 0x1799 leaq 0x5f3b0(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_repeat_back: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] test eax, eax jnz short loc_149FA jmp short $+2 loc_149EB: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_repeat_back_f32 jmp short loc_14A14 loc_149FA: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1799h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_14A14: add rsp, 20h pop rbp retn
double ggml_compute_forward_repeat_back(long long a1, long long a2) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 6041LL, "fatal error"); ggml_compute_forward_repeat_back_f32(a1, a2); return result; }
ggml_compute_forward_repeat_back: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x001149fa JMP 0x001149eb LAB_001149eb: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001276b0 JMP 0x00114a14 LAB_001149fa: LEA RDI,[0x173b62] MOV ESI,0x1799 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00114a14: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_repeat_back(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_repeat_back_f32(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1799,"fatal error"); } return; }
61,447
ssz_is_type
corpus-core[P]colibri-stateless/src/util/ssz.c
bool ssz_is_type(ssz_ob_t* ob, const ssz_def_t* def) { if (!ob || !ob->def || !def) return false; if (ob->def == def) return true; if (ob->def->type == SSZ_TYPE_UNION) { ssz_ob_t union_ob = ssz_union(*ob); return ssz_is_type(&union_ob, def); } if (ob->def->type == SSZ_TYPE_CONTAINER) return ob->def->def.container.elements == def; if (ob->def->type == SSZ_TYPE_LIST) return ob->def->def.vector.type == def; switch (def->type) { case SSZ_TYPE_UINT: return def->type == SSZ_TYPE_UINT && ob->def->def.uint.len == def->def.uint.len; case SSZ_TYPE_BOOLEAN: return def->type == SSZ_TYPE_BOOLEAN; case SSZ_TYPE_BIT_LIST: return def->type == SSZ_TYPE_BIT_LIST && ob->def->def.uint.len == def->def.uint.len; case SSZ_TYPE_BIT_VECTOR: return def->type == SSZ_TYPE_BIT_VECTOR && ob->def->def.uint.len == def->def.uint.len; case SSZ_TYPE_CONTAINER: return ob->def->def.container.elements == def; case SSZ_TYPE_VECTOR: { ssz_ob_t el = {.def = ob->def->def.vector.type, .bytes = ob->bytes}; return def->type == SSZ_TYPE_VECTOR && ob->def->def.uint.len == def->def.uint.len && ssz_is_type(&el, def->def.vector.type); } case SSZ_TYPE_LIST: { ssz_ob_t el = {.def = ob->def->def.vector.type, .bytes = ob->bytes}; return def->type == SSZ_TYPE_LIST && ob->def->def.uint.len == def->def.uint.len && ssz_is_type(&el, def->def.vector.type); } default: return false; } }
O0
c
ssz_is_type: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1b51c movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x1b51c cmpq $0x0, -0x18(%rbp) jne 0x1b525 movb $0x0, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x18(%rbp), %rax jne 0x1b53c movb $0x1, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax cmpl $0x7, 0x8(%rax) jne 0x1b587 movq -0x10(%rbp), %rax leaq -0x30(%rbp), %rdi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x1b2b0 movq -0x18(%rbp), %rsi leaq -0x30(%rbp), %rdi callq 0x1b4f0 andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax cmpl $0x2, 0x8(%rax) jne 0x1b5b2 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax cmpq -0x18(%rbp), %rax sete %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax cmpl $0x4, 0x8(%rax) jne 0x1b5dd movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax cmpq -0x18(%rbp), %rax sete %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movq %rax, -0x68(%rbp) subq $0x6, %rax ja 0x1b7a6 movq -0x68(%rbp), %rax leaq 0x38aaf(%rip), %rcx # 0x540ac movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x8(%rcx) movb %al, -0x69(%rbp) jne 0x1b62d movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movl 0x10(%rax), %eax movq -0x18(%rbp), %rcx cmpl 0x10(%rcx), %eax sete %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x18(%rbp), %rax cmpl $0x1, 0x8(%rax) sete %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x6, 0x8(%rcx) movb %al, -0x6a(%rbp) jne 0x1b676 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movl 0x10(%rax), %eax movq -0x18(%rbp), %rcx cmpl 0x10(%rcx), %eax sete %al movb %al, -0x6a(%rbp) movb -0x6a(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x5, 0x8(%rcx) movb %al, -0x6b(%rbp) jne 0x1b6aa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movl 0x10(%rax), %eax movq -0x18(%rbp), %rcx cmpl 0x10(%rcx), %eax sete %al movb %al, -0x6b(%rbp) movb -0x6b(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax cmpq -0x18(%rbp), %rax sete %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x48(%rbp) movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x3, 0x8(%rcx) movb %al, -0x6c(%rbp) jne 0x1b733 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movl 0x10(%rax), %ecx movq -0x18(%rbp), %rdx xorl %eax, %eax cmpl 0x10(%rdx), %ecx movb %al, -0x6c(%rbp) jne 0x1b733 movq -0x18(%rbp), %rax movq 0x10(%rax), %rsi leaq -0x48(%rbp), %rdi callq 0x1b4f0 movb %al, -0x6c(%rbp) movb -0x6c(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movq -0x10(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x60(%rbp) movq 0x8(%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x4, 0x8(%rcx) movb %al, -0x6d(%rbp) jne 0x1b79c movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movl 0x10(%rax), %ecx movq -0x18(%rbp), %rdx xorl %eax, %eax cmpl 0x10(%rdx), %ecx movb %al, -0x6d(%rbp) jne 0x1b79c movq -0x18(%rbp), %rax movq 0x10(%rax), %rsi leaq -0x60(%rbp), %rdi callq 0x1b4f0 movb %al, -0x6d(%rbp) movb -0x6d(%rbp), %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1b7aa movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x90, %rsp popq %rbp retq nopl (%rax,%rax)
ssz_is_type: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_1B51C mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jz short loc_1B51C cmp [rbp+var_18], 0 jnz short loc_1B525 loc_1B51C: mov [rbp+var_1], 0 jmp loc_1B7AA loc_1B525: mov rax, [rbp+var_10] mov rax, [rax+10h] cmp rax, [rbp+var_18] jnz short loc_1B53C mov [rbp+var_1], 1 jmp loc_1B7AA loc_1B53C: mov rax, [rbp+var_10] mov rax, [rax+10h] cmp dword ptr [rax+8], 7 jnz short loc_1B587 mov rax, [rbp+var_10] lea rdi, [rbp+var_30] mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call ssz_union mov rsi, [rbp+var_18] lea rdi, [rbp+var_30] call ssz_is_type and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B587: mov rax, [rbp+var_10] mov rax, [rax+10h] cmp dword ptr [rax+8], 2 jnz short loc_1B5B2 mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+10h] cmp rax, [rbp+var_18] setz al and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B5B2: mov rax, [rbp+var_10] mov rax, [rax+10h] cmp dword ptr [rax+8], 4 jnz short loc_1B5DD mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+10h] cmp rax, [rbp+var_18] setz al and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B5DD: mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_68], rax sub rax, 6; switch 7 cases ja def_1B604; jumptable 000000000001B604 default case mov rax, [rbp+var_68] lea rcx, jpt_1B604 movsxd rax, ds:(jpt_1B604 - 540ACh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1B606: mov rcx, [rbp+var_18]; jumptable 000000000001B604 case 0 xor eax, eax cmp dword ptr [rcx+8], 0 mov [rbp+var_69], al jnz short loc_1B62D mov rax, [rbp+var_10] mov rax, [rax+10h] mov eax, [rax+10h] mov rcx, [rbp+var_18] cmp eax, [rcx+10h] setz al mov [rbp+var_69], al loc_1B62D: mov al, [rbp+var_69] and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B63A: mov rax, [rbp+var_18]; jumptable 000000000001B604 case 1 cmp dword ptr [rax+8], 1 setz al and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B64F: mov rcx, [rbp+var_18]; jumptable 000000000001B604 case 6 xor eax, eax cmp dword ptr [rcx+8], 6 mov [rbp+var_6A], al jnz short loc_1B676 mov rax, [rbp+var_10] mov rax, [rax+10h] mov eax, [rax+10h] mov rcx, [rbp+var_18] cmp eax, [rcx+10h] setz al mov [rbp+var_6A], al loc_1B676: mov al, [rbp+var_6A] and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B683: mov rcx, [rbp+var_18]; jumptable 000000000001B604 case 5 xor eax, eax cmp dword ptr [rcx+8], 5 mov [rbp+var_6B], al jnz short loc_1B6AA mov rax, [rbp+var_10] mov rax, [rax+10h] mov eax, [rax+10h] mov rcx, [rbp+var_18] cmp eax, [rcx+10h] setz al mov [rbp+var_6B], al loc_1B6AA: mov al, [rbp+var_6B] and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B6B7: mov rax, [rbp+var_10]; jumptable 000000000001B604 case 2 mov rax, [rax+10h] mov rax, [rax+10h] cmp rax, [rbp+var_18] setz al and al, 1 mov [rbp+var_1], al jmp loc_1B7AA loc_1B6D4: mov rax, [rbp+var_10]; jumptable 000000000001B604 case 3 mov rcx, [rax] mov [rbp+var_48], rcx mov rax, [rax+8] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+10h] mov [rbp+var_38], rax mov rcx, [rbp+var_18] xor eax, eax cmp dword ptr [rcx+8], 3 mov [rbp+var_6C], al jnz short loc_1B733 mov rax, [rbp+var_10] mov rax, [rax+10h] mov ecx, [rax+10h] mov rdx, [rbp+var_18] xor eax, eax cmp ecx, [rdx+10h] mov [rbp+var_6C], al jnz short loc_1B733 mov rax, [rbp+var_18] mov rsi, [rax+10h] lea rdi, [rbp+var_48] call ssz_is_type mov [rbp+var_6C], al loc_1B733: mov al, [rbp+var_6C] and al, 1 mov [rbp+var_1], al jmp short loc_1B7AA loc_1B73D: mov rax, [rbp+var_10]; jumptable 000000000001B604 case 4 mov rcx, [rax] mov [rbp+var_60], rcx mov rax, [rax+8] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+10h] mov [rbp+var_50], rax mov rcx, [rbp+var_18] xor eax, eax cmp dword ptr [rcx+8], 4 mov [rbp+var_6D], al jnz short loc_1B79C mov rax, [rbp+var_10] mov rax, [rax+10h] mov ecx, [rax+10h] mov rdx, [rbp+var_18] xor eax, eax cmp ecx, [rdx+10h] mov [rbp+var_6D], al jnz short loc_1B79C mov rax, [rbp+var_18] mov rsi, [rax+10h] lea rdi, [rbp+var_60] call ssz_is_type mov [rbp+var_6D], al loc_1B79C: mov al, [rbp+var_6D] and al, 1 mov [rbp+var_1], al jmp short loc_1B7AA def_1B604: mov [rbp+var_1], 0; jumptable 000000000001B604 default case loc_1B7AA: mov al, [rbp+var_1] and al, 1 add rsp, 90h pop rbp retn
char ssz_is_type(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { char v7; // [rsp+23h] [rbp-6Dh] char is_type; // [rsp+24h] [rbp-6Ch] bool v9; // [rsp+25h] [rbp-6Bh] bool v10; // [rsp+26h] [rbp-6Ah] bool v11; // [rsp+27h] [rbp-69h] _QWORD v12[3]; // [rsp+30h] [rbp-60h] BYREF _QWORD v13[3]; // [rsp+48h] [rbp-48h] BYREF _QWORD v14[3]; // [rsp+60h] [rbp-30h] BYREF long long v15; // [rsp+78h] [rbp-18h] _QWORD *v16; // [rsp+80h] [rbp-10h] char v17; // [rsp+8Fh] [rbp-1h] v16 = a1; v15 = a2; if ( a1 && v16[2] && v15 ) { if ( v16[2] == v15 ) { v17 = 1; } else { switch ( *(_DWORD *)(v16[2] + 8LL) ) { case 7: ssz_union(v14, a2, a3, v16[1], a5, a6, *v16, (unsigned __int8 *)v16[1], v16[2]); v17 = ssz_is_type(v14, v15) & 1; break; case 2: v17 = *(_QWORD *)(v16[2] + 16LL) == v15; break; case 4: v17 = *(_QWORD *)(v16[2] + 16LL) == v15; break; default: switch ( *(_DWORD *)(v15 + 8) ) { case 0: v11 = 0; if ( !*(_DWORD *)(v15 + 8) ) v11 = *(_DWORD *)(v16[2] + 16LL) == *(_DWORD *)(v15 + 16); v17 = v11; break; case 1: v17 = *(_DWORD *)(v15 + 8) == 1; break; case 2: v17 = *(_QWORD *)(v16[2] + 16LL) == v15; break; case 3: v13[0] = *v16; v13[1] = v16[1]; v13[2] = *(_QWORD *)(v16[2] + 16LL); is_type = 0; if ( *(_DWORD *)(v15 + 8) == 3 ) { is_type = 0; if ( *(_DWORD *)(v16[2] + 16LL) == *(_DWORD *)(v15 + 16) ) is_type = ssz_is_type(v13, *(_QWORD *)(v15 + 16)); } v17 = is_type & 1; break; case 4: v12[0] = *v16; v12[1] = v16[1]; v12[2] = *(_QWORD *)(v16[2] + 16LL); v7 = 0; if ( *(_DWORD *)(v15 + 8) == 4 ) { v7 = 0; if ( *(_DWORD *)(v16[2] + 16LL) == *(_DWORD *)(v15 + 16) ) v7 = ssz_is_type(v12, *(_QWORD *)(v15 + 16)); } v17 = v7 & 1; break; case 5: v9 = 0; if ( *(_DWORD *)(v15 + 8) == 5 ) v9 = *(_DWORD *)(v16[2] + 16LL) == *(_DWORD *)(v15 + 16); v17 = v9; break; case 6: v10 = 0; if ( *(_DWORD *)(v15 + 8) == 6 ) v10 = *(_DWORD *)(v16[2] + 16LL) == *(_DWORD *)(v15 + 16); v17 = v10; break; default: v17 = 0; break; } break; } } } else { v17 = 0; } return v17 & 1; }
ssz_is_type: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011b51c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JZ 0x0011b51c CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0011b525 LAB_0011b51c: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0011b7aa LAB_0011b525: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0011b53c MOV byte ptr [RBP + -0x1],0x1 JMP 0x0011b7aa LAB_0011b53c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] CMP dword ptr [RAX + 0x8],0x7 JNZ 0x0011b587 MOV RAX,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x30] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0011b2b0 MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x30] CALL 0x0011b4f0 AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa LAB_0011b587: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] CMP dword ptr [RAX + 0x8],0x2 JNZ 0x0011b5b2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x18] SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa LAB_0011b5b2: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x0011b5dd MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x18] SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa LAB_0011b5dd: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x68],RAX SUB RAX,0x6 JA 0x0011b7a6 MOV RAX,qword ptr [RBP + -0x68] LEA RCX,[0x1540ac] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x8],0x0 MOV byte ptr [RBP + -0x69],AL JNZ 0x0011b62d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x10] SETZ AL MOV byte ptr [RBP + -0x69],AL LAB_0011b62d: MOV AL,byte ptr [RBP + -0x69] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa caseD_1: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0x1 SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa caseD_6: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x8],0x6 MOV byte ptr [RBP + -0x6a],AL JNZ 0x0011b676 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x10] SETZ AL MOV byte ptr [RBP + -0x6a],AL LAB_0011b676: MOV AL,byte ptr [RBP + -0x6a] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa caseD_5: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x8],0x5 MOV byte ptr [RBP + -0x6b],AL JNZ 0x0011b6aa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x10] SETZ AL MOV byte ptr [RBP + -0x6b],AL LAB_0011b6aa: MOV AL,byte ptr [RBP + -0x6b] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa caseD_2: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x18] SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa caseD_3: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x8],0x3 MOV byte ptr [RBP + -0x6c],AL JNZ 0x0011b733 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP ECX,dword ptr [RDX + 0x10] MOV byte ptr [RBP + -0x6c],AL JNZ 0x0011b733 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x10] LEA RDI,[RBP + -0x48] CALL 0x0011b4f0 MOV byte ptr [RBP + -0x6c],AL LAB_0011b733: MOV AL,byte ptr [RBP + -0x6c] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa caseD_4: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX + 0x8],0x4 MOV byte ptr [RBP + -0x6d],AL JNZ 0x0011b79c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP ECX,dword ptr [RDX + 0x10] MOV byte ptr [RBP + -0x6d],AL JNZ 0x0011b79c MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x10] LEA RDI,[RBP + -0x60] CALL 0x0011b4f0 MOV byte ptr [RBP + -0x6d],AL LAB_0011b79c: MOV AL,byte ptr [RBP + -0x6d] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011b7aa default: MOV byte ptr [RBP + -0x1],0x0 LAB_0011b7aa: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x90 POP RBP RET
bool ssz_is_type(int8 *param_1,long param_2) { byte bVar1; byte local_75; byte local_74; bool local_73; bool local_72; bool local_71; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int1 local_38 [24]; long local_20; int8 *local_18; bool local_9; if (((param_1 == (int8 *)0x0) || (param_1[2] == 0)) || (param_2 == 0)) { local_9 = false; } else if (param_1[2] == param_2) { local_9 = true; } else { local_20 = param_2; local_18 = param_1; if (*(int *)(param_1[2] + 8) == 7) { ssz_union(local_38); bVar1 = ssz_is_type(local_38,local_20); local_9 = (bool)(bVar1 & 1); } else if (*(int *)(param_1[2] + 8) == 2) { local_9 = *(long *)(param_1[2] + 0x10) == param_2; } else if (*(int *)(param_1[2] + 8) == 4) { local_9 = *(long *)(param_1[2] + 0x10) == param_2; } else { switch(*(int4 *)(param_2 + 8)) { case 0: local_71 = false; if (*(int *)(param_2 + 8) == 0) { local_71 = *(int *)(param_1[2] + 0x10) == *(int *)(param_2 + 0x10); } local_9 = local_71; break; case 1: local_9 = *(int *)(param_2 + 8) == 1; break; case 2: local_9 = *(long *)(param_1[2] + 0x10) == param_2; break; case 3: local_50 = *param_1; local_48 = param_1[1]; local_40 = *(int8 *)(param_1[2] + 0x10); local_74 = 0; if ((*(int *)(param_2 + 8) == 3) && (local_74 = 0, *(int *)(param_1[2] + 0x10) == *(int *)(param_2 + 0x10))) { local_74 = ssz_is_type(&local_50,*(int8 *)(param_2 + 0x10)); } local_9 = (bool)(local_74 & 1); break; case 4: local_68 = *param_1; local_60 = param_1[1]; local_58 = *(int8 *)(param_1[2] + 0x10); local_75 = 0; if ((*(int *)(param_2 + 8) == 4) && (local_75 = 0, *(int *)(param_1[2] + 0x10) == *(int *)(param_2 + 0x10))) { local_75 = ssz_is_type(&local_68,*(int8 *)(param_2 + 0x10)); } local_9 = (bool)(local_75 & 1); break; case 5: local_73 = false; if (*(int *)(param_2 + 8) == 5) { local_73 = *(int *)(param_1[2] + 0x10) == *(int *)(param_2 + 0x10); } local_9 = local_73; break; case 6: local_72 = false; if (*(int *)(param_2 + 8) == 6) { local_72 = *(int *)(param_1[2] + 0x10) == *(int *)(param_2 + 0x10); } local_9 = local_72; break; default: local_9 = false; } } } return local_9; }
61,448
ssz_is_type
corpus-core[P]colibri-stateless/src/util/ssz.c
bool ssz_is_type(ssz_ob_t* ob, const ssz_def_t* def) { if (!ob || !ob->def || !def) return false; if (ob->def == def) return true; if (ob->def->type == SSZ_TYPE_UNION) { ssz_ob_t union_ob = ssz_union(*ob); return ssz_is_type(&union_ob, def); } if (ob->def->type == SSZ_TYPE_CONTAINER) return ob->def->def.container.elements == def; if (ob->def->type == SSZ_TYPE_LIST) return ob->def->def.vector.type == def; switch (def->type) { case SSZ_TYPE_UINT: return def->type == SSZ_TYPE_UINT && ob->def->def.uint.len == def->def.uint.len; case SSZ_TYPE_BOOLEAN: return def->type == SSZ_TYPE_BOOLEAN; case SSZ_TYPE_BIT_LIST: return def->type == SSZ_TYPE_BIT_LIST && ob->def->def.uint.len == def->def.uint.len; case SSZ_TYPE_BIT_VECTOR: return def->type == SSZ_TYPE_BIT_VECTOR && ob->def->def.uint.len == def->def.uint.len; case SSZ_TYPE_CONTAINER: return ob->def->def.container.elements == def; case SSZ_TYPE_VECTOR: { ssz_ob_t el = {.def = ob->def->def.vector.type, .bytes = ob->bytes}; return def->type == SSZ_TYPE_VECTOR && ob->def->def.uint.len == def->def.uint.len && ssz_is_type(&el, def->def.vector.type); } case SSZ_TYPE_LIST: { ssz_ob_t el = {.def = ob->def->def.vector.type, .bytes = ob->bytes}; return def->type == SSZ_TYPE_LIST && ob->def->def.uint.len == def->def.uint.len && ssz_is_type(&el, def->def.vector.type); } default: return false; } }
O1
c
ssz_is_type: subq $0x18, %rsp testq %rdi, %rdi je 0x144a4 movq 0x10(%rdi), %rcx testq %rcx, %rcx sete %al testq %rsi, %rsi sete %dl orb %al, %dl jne 0x144a4 movb $0x1, %al cmpq %rsi, %rcx je 0x144a6 movl 0x8(%rcx), %edx cmpl $0x2, %edx je 0x14475 cmpl $0x4, %edx je 0x14475 cmpl $0x7, %edx jne 0x14454 movl (%rdi), %eax movq 0x8(%rdi), %rdx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) cmpl $0x7, 0x8(%rcx) sete %dil testq %rdx, %rdx setne %r8b testl %eax, %eax setne %r9b andb %r8b, %r9b andb %dil, %r9b cmpb $0x1, %r9b jne 0x1449a movzbl (%rdx), %edi cmpl %edi, 0x18(%rcx) jbe 0x1449a movq 0x10(%rcx), %rcx shll $0x5, %edi leaq (%rcx,%rdi), %r8 movq %r8, 0x10(%rsp) cmpl $0x8, 0x8(%rcx,%rdi) je 0x1449a decl %eax incq %rdx movl %eax, (%rsp) movq %rdx, 0x8(%rsp) jmp 0x1449a movl 0x8(%rsi), %edx cmpq $0x6, %rdx ja 0x144a4 leaq 0x2abf8(%rip), %r8 # 0x3f05c movslq (%r8,%rdx,4), %rdx addq %r8, %rdx jmpq *%rdx movl 0x10(%rcx), %eax cmpl 0x10(%rsi), %eax jmp 0x14479 cmpq %rsi, 0x10(%rcx) sete %al jmp 0x144a6 movups (%rdi), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%rcx), %rax movq %rax, 0x10(%rsp) movl 0x10(%rcx), %eax cmpl 0x10(%rsi), %eax jne 0x144a4 movq 0x10(%rsi), %rsi movq %rsp, %rdi callq 0x143a5 jmp 0x144a6 xorl %eax, %eax addq $0x18, %rsp retq
ssz_is_type: sub rsp, 18h test rdi, rdi jz def_1446B; jumptable 000000000001446B default case mov rcx, [rdi+10h] test rcx, rcx setz al test rsi, rsi setz dl or dl, al jnz def_1446B; jumptable 000000000001446B default case mov al, 1 cmp rcx, rsi jz loc_144A6; jumptable 000000000001446B case 1 mov edx, [rcx+8] cmp edx, 2 jz loc_14475; jumptable 000000000001446B case 2 cmp edx, 4 jz loc_14475; jumptable 000000000001446B case 2 cmp edx, 7 jnz short loc_14454 mov eax, [rdi] mov rdx, [rdi+8] xorps xmm0, xmm0 movaps [rsp+18h+var_18], xmm0 mov [rsp+18h+var_8], 0 cmp dword ptr [rcx+8], 7 setz dil test rdx, rdx setnz r8b test eax, eax setnz r9b and r9b, r8b and r9b, dil cmp r9b, 1 jnz short loc_1449A movzx edi, byte ptr [rdx] cmp [rcx+18h], edi jbe short loc_1449A mov rcx, [rcx+10h] shl edi, 5 lea r8, [rcx+rdi] mov [rsp+18h+var_8], r8 cmp dword ptr [rcx+rdi+8], 8 jz short loc_1449A dec eax inc rdx mov dword ptr [rsp+18h+var_18], eax mov qword ptr [rsp+18h+var_18+8], rdx jmp short loc_1449A loc_14454: mov edx, [rsi+8] cmp rdx, 6; switch 7 cases ja short def_1446B; jumptable 000000000001446B default case lea r8, jpt_1446B movsxd rdx, ds:(jpt_1446B - 3F05Ch)[r8+rdx*4] add rdx, r8 jmp rdx; switch jump loc_1446D: mov eax, [rcx+10h]; jumptable 000000000001446B cases 0,5,6 cmp eax, [rsi+10h] jmp short loc_14479 loc_14475: cmp [rcx+10h], rsi; jumptable 000000000001446B case 2 loc_14479: setz al jmp short loc_144A6; jumptable 000000000001446B case 1 loc_1447E: movups xmm0, xmmword ptr [rdi]; jumptable 000000000001446B cases 3,4 movaps [rsp+18h+var_18], xmm0 mov rax, [rcx+10h] mov [rsp+18h+var_8], rax mov eax, [rcx+10h] cmp eax, [rsi+10h] jnz short def_1446B; jumptable 000000000001446B default case mov rsi, [rsi+10h] loc_1449A: mov rdi, rsp call ssz_is_type jmp short loc_144A6; jumptable 000000000001446B case 1 def_1446B: xor eax, eax; jumptable 000000000001446B default case loc_144A6: add rsp, 18h; jumptable 000000000001446B case 1 retn
char ssz_is_type(__int128 *a1, long long a2) { long long v2; // rcx char result; // al int v4; // edx int v5; // eax unsigned __int8 *v6; // rdx unsigned int v7; // edi __int128 v9; // [rsp+0h] [rbp-18h] BYREF long long v10; // [rsp+10h] [rbp-8h] if ( !a1 ) return 0; v2 = *((_QWORD *)a1 + 2); if ( v2 == 0 || a2 == 0 ) return 0; result = 1; if ( v2 != a2 ) { v4 = *(_DWORD *)(v2 + 8); if ( v4 == 2 || v4 == 4 ) { return *(_QWORD *)(v2 + 16) == a2; } else { if ( v4 != 7 ) { switch ( *(_DWORD *)(a2 + 8) ) { case 0: case 5: case 6: return *(_DWORD *)(v2 + 16) == *(_DWORD *)(a2 + 16); case 1: return result; case 2: return *(_QWORD *)(v2 + 16) == a2; case 3: case 4: v9 = *a1; v10 = *(_QWORD *)(v2 + 16); if ( *(_DWORD *)(v2 + 16) != *(_DWORD *)(a2 + 16) ) return 0; a2 = *(_QWORD *)(a2 + 16); return ssz_is_type(&v9, a2); default: return 0; } } v5 = *(_DWORD *)a1; v6 = (unsigned __int8 *)*((_QWORD *)a1 + 1); v9 = 0LL; v10 = 0LL; if ( *(_DWORD *)(v2 + 8) == 7 && v6 != 0LL && v5 != 0 ) { v7 = *v6; if ( *(_DWORD *)(v2 + 24) > v7 ) { v10 = *(_QWORD *)(v2 + 16) + 32 * v7; if ( *(_DWORD *)(v10 + 8) != 8 ) { LODWORD(v9) = v5 - 1; *((_QWORD *)&v9 + 1) = v6 + 1; } } } return ssz_is_type(&v9, a2); } } return result; }
ssz_is_type: SUB RSP,0x18 TEST RDI,RDI JZ 0x001144a4 MOV RCX,qword ptr [RDI + 0x10] TEST RCX,RCX SETZ AL TEST RSI,RSI SETZ DL OR DL,AL JNZ 0x001144a4 MOV AL,0x1 CMP RCX,RSI JZ 0x001144a6 MOV EDX,dword ptr [RCX + 0x8] CMP EDX,0x2 JZ 0x00114475 CMP EDX,0x4 JZ 0x00114475 CMP EDX,0x7 JNZ 0x00114454 MOV EAX,dword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 CMP dword ptr [RCX + 0x8],0x7 SETZ DIL TEST RDX,RDX SETNZ R8B TEST EAX,EAX SETNZ R9B AND R9B,R8B AND R9B,DIL CMP R9B,0x1 JNZ 0x0011449a MOVZX EDI,byte ptr [RDX] CMP dword ptr [RCX + 0x18],EDI JBE 0x0011449a MOV RCX,qword ptr [RCX + 0x10] SHL EDI,0x5 LEA R8,[RCX + RDI*0x1] MOV qword ptr [RSP + 0x10],R8 CMP dword ptr [RCX + RDI*0x1 + 0x8],0x8 JZ 0x0011449a DEC EAX INC RDX MOV dword ptr [RSP],EAX MOV qword ptr [RSP + 0x8],RDX JMP 0x0011449a LAB_00114454: MOV EDX,dword ptr [RSI + 0x8] CMP RDX,0x6 JA 0x001144a4 LEA R8,[0x13f05c] MOVSXD RDX,dword ptr [R8 + RDX*0x4] ADD RDX,R8 switchD: JMP RDX caseD_0: MOV EAX,dword ptr [RCX + 0x10] CMP EAX,dword ptr [RSI + 0x10] JMP 0x00114479 caseD_2: CMP qword ptr [RCX + 0x10],RSI LAB_00114479: SETZ AL JMP 0x001144a6 caseD_3: MOVUPS XMM0,xmmword ptr [RDI] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [RCX + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV EAX,dword ptr [RCX + 0x10] CMP EAX,dword ptr [RSI + 0x10] JNZ 0x001144a4 MOV RSI,qword ptr [RSI + 0x10] LAB_0011449a: MOV RDI,RSP CALL 0x001143a5 JMP 0x001144a6 default: XOR EAX,EAX caseD_1: ADD RSP,0x18 RET
bool ssz_is_type(ulong *param_1,ulong param_2) { int iVar1; ulong uVar2; byte *pbVar3; int1 uVar4; long lVar5; bool bVar6; ulong local_18; byte *pbStack_10; long local_8; if ((param_1 == (ulong *)0x0) || (uVar2 = param_1[2], param_2 == 0 || uVar2 == 0)) goto switchD_0011446b_default; bVar6 = true; if (uVar2 == param_2) { return true; } iVar1 = *(int *)(uVar2 + 8); if ((iVar1 == 2) || (iVar1 == 4)) { switchD_0011446b_caseD_2: bVar6 = *(ulong *)(uVar2 + 0x10) == param_2; } else { if (iVar1 == 7) { pbVar3 = (byte *)param_1[1]; local_18 = 0; pbStack_10 = (byte *)0x0; local_8 = 0; if (((((int)*param_1 != 0 && pbVar3 != (byte *)0x0) && *(int *)(uVar2 + 8) == 7) && ((uint)*pbVar3 < *(uint *)(uVar2 + 0x18))) && (lVar5 = (ulong)*pbVar3 * 0x20, local_8 = *(long *)(uVar2 + 0x10) + lVar5, *(int *)(*(long *)(uVar2 + 0x10) + 8 + lVar5) != 8)) { pbStack_10 = pbVar3 + 1; local_18 = (ulong)((int)*param_1 - 1); } LAB_0011449a: uVar4 = ssz_is_type(&local_18,param_2); return (bool)uVar4; } switch(*(int4 *)(param_2 + 8)) { case 0: case 5: case 6: bVar6 = *(int *)(uVar2 + 0x10) == *(int *)(param_2 + 0x10); break; case 1: break; case 2: goto switchD_0011446b_caseD_2; case 3: case 4: local_18 = *param_1; pbStack_10 = (byte *)param_1[1]; local_8 = *(long *)(uVar2 + 0x10); if (*(int *)(uVar2 + 0x10) == *(int *)(param_2 + 0x10)) { param_2 = *(ulong *)(param_2 + 0x10); goto LAB_0011449a; } default: switchD_0011446b_default: bVar6 = false; } } return bVar6; }
61,449
SDL::DrawTexture(SDL::Rect2f const&, SDL::Rect2f const&, unsigned long)
SDL3Lite/source/OpenGL/GLUtils.cpp
void DrawTexture(const Rect2f& dst, const Rect2f& src, size_t textureSize) { GLfloat x = dst.x; GLfloat y = dst.y; GLfloat w = dst.w; GLfloat h = dst.h; GLfloat cx = src.x; GLfloat cy = src.y; GLfloat cw = src.w; GLfloat ch = src.h; GLfloat dcx = cx / textureSize; GLfloat dcy = cy / textureSize; GLfloat dcw = (cx + cw) / textureSize; GLfloat dch = (cy + ch) / textureSize; glBegin(GL_QUADS); glTexCoord2f(dcx, dcy); glVertex2f(x, y); glTexCoord2f(dcw, dcy); glVertex2f(x + cw + (w - cw), y); glTexCoord2f(dcw, dch); glVertex2f(x + cw + (w - cw), y + ch + (h - ch)); glTexCoord2f(dcx, dch); glVertex2f(x, y + ch + (h - ch)); glEnd(); }
O0
cpp
SDL::DrawTexture(SDL::Rect2f const&, SDL::Rect2f const&, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movss (%rax), %xmm0 movss %xmm0, -0x1c(%rbp) movq -0x8(%rbp), %rax movss 0x4(%rax), %xmm0 movss %xmm0, -0x20(%rbp) movq -0x8(%rbp), %rax movss 0x8(%rax), %xmm0 movss %xmm0, -0x24(%rbp) movq -0x8(%rbp), %rax movss 0xc(%rax), %xmm0 movss %xmm0, -0x28(%rbp) movq -0x10(%rbp), %rax movss (%rax), %xmm0 movss %xmm0, -0x2c(%rbp) movq -0x10(%rbp), %rax movss 0x4(%rax), %xmm0 movss %xmm0, -0x30(%rbp) movq -0x10(%rbp), %rax movss 0x8(%rax), %xmm0 movss %xmm0, -0x34(%rbp) movq -0x10(%rbp), %rax movss 0xc(%rax), %xmm0 movss %xmm0, -0x38(%rbp) movss -0x2c(%rbp), %xmm0 movss %xmm0, -0x54(%rbp) movq -0x18(%rbp), %rax movq %rax, %rdx shrq %rdx movl %eax, %ecx andl $0x1, %ecx orq %rdx, %rcx cvtsi2ss %rcx, %xmm0 addss %xmm0, %xmm0 cvtsi2ss %rax, %xmm1 movss %xmm1, -0x50(%rbp) testq %rax, %rax movss %xmm0, -0x4c(%rbp) js 0x1d448 movss -0x50(%rbp), %xmm0 movss %xmm0, -0x4c(%rbp) movss -0x54(%rbp), %xmm0 movss -0x4c(%rbp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x3c(%rbp) movss -0x30(%rbp), %xmm0 movss %xmm0, -0x60(%rbp) movq -0x18(%rbp), %rax movq %rax, %rdx shrq %rdx movl %eax, %ecx andl $0x1, %ecx orq %rdx, %rcx cvtsi2ss %rcx, %xmm0 addss %xmm0, %xmm0 cvtsi2ss %rax, %xmm1 movss %xmm1, -0x5c(%rbp) testq %rax, %rax movss %xmm0, -0x58(%rbp) js 0x1d49e movss -0x5c(%rbp), %xmm0 movss %xmm0, -0x58(%rbp) movss -0x60(%rbp), %xmm0 movss -0x58(%rbp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x40(%rbp) movss -0x2c(%rbp), %xmm0 movss -0x34(%rbp), %xmm1 addss %xmm1, %xmm0 movss %xmm0, -0x6c(%rbp) movq -0x18(%rbp), %rax movq %rax, %rdx shrq %rdx movl %eax, %ecx andl $0x1, %ecx orq %rdx, %rcx cvtsi2ss %rcx, %xmm0 addss %xmm0, %xmm0 cvtsi2ss %rax, %xmm1 movss %xmm1, -0x68(%rbp) testq %rax, %rax movss %xmm0, -0x64(%rbp) js 0x1d4fd movss -0x68(%rbp), %xmm0 movss %xmm0, -0x64(%rbp) movss -0x6c(%rbp), %xmm0 movss -0x64(%rbp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x44(%rbp) movss -0x30(%rbp), %xmm0 movss -0x38(%rbp), %xmm1 addss %xmm1, %xmm0 movss %xmm0, -0x78(%rbp) movq -0x18(%rbp), %rax movq %rax, %rdx shrq %rdx movl %eax, %ecx andl $0x1, %ecx orq %rdx, %rcx cvtsi2ss %rcx, %xmm0 addss %xmm0, %xmm0 cvtsi2ss %rax, %xmm1 movss %xmm1, -0x74(%rbp) testq %rax, %rax movss %xmm0, -0x70(%rbp) js 0x1d55c movss -0x74(%rbp), %xmm0 movss %xmm0, -0x70(%rbp) movss -0x78(%rbp), %xmm0 movss -0x70(%rbp), %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x48(%rbp) movl $0x7, %edi leaq 0x1df75(%rip), %rax # 0x3b4f0 callq *(%rax) leaq 0x1e274(%rip), %rax # 0x3b7f8 movq (%rax), %rax movss -0x3c(%rbp), %xmm0 movss -0x40(%rbp), %xmm1 callq *%rax leaq 0x1e31e(%rip), %rax # 0x3b8b8 movq (%rax), %rax movss -0x1c(%rbp), %xmm0 movss -0x20(%rbp), %xmm1 callq *%rax leaq 0x1e248(%rip), %rax # 0x3b7f8 movq (%rax), %rax movss -0x44(%rbp), %xmm0 movss -0x40(%rbp), %xmm1 callq *%rax leaq 0x1e2f2(%rip), %rax # 0x3b8b8 movq (%rax), %rax movss -0x1c(%rbp), %xmm0 addss -0x34(%rbp), %xmm0 movss -0x24(%rbp), %xmm1 subss -0x34(%rbp), %xmm1 addss %xmm1, %xmm0 movss -0x20(%rbp), %xmm1 callq *%rax leaq 0x1e209(%rip), %rax # 0x3b7f8 movq (%rax), %rax movss -0x44(%rbp), %xmm0 movss -0x48(%rbp), %xmm1 callq *%rax leaq 0x1e2b3(%rip), %rax # 0x3b8b8 movq (%rax), %rax movss -0x1c(%rbp), %xmm0 addss -0x34(%rbp), %xmm0 movss -0x24(%rbp), %xmm1 subss -0x34(%rbp), %xmm1 addss %xmm1, %xmm0 movss -0x20(%rbp), %xmm1 addss -0x38(%rbp), %xmm1 movss -0x28(%rbp), %xmm2 subss -0x38(%rbp), %xmm2 addss %xmm2, %xmm1 callq *%rax leaq 0x1e1b7(%rip), %rax # 0x3b7f8 movq (%rax), %rax movss -0x3c(%rbp), %xmm0 movss -0x48(%rbp), %xmm1 callq *%rax leaq 0x1e261(%rip), %rax # 0x3b8b8 movq (%rax), %rax movss -0x1c(%rbp), %xmm0 movss -0x20(%rbp), %xmm1 addss -0x38(%rbp), %xmm1 movss -0x28(%rbp), %xmm2 subss -0x38(%rbp), %xmm2 addss %xmm2, %xmm1 callq *%rax leaq 0x1df90(%rip), %rax # 0x3b610 callq *(%rax) addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN3SDL11DrawTextureERKNS_6Rect2fES2_m: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] movss xmm0, dword ptr [rax] movss [rbp+var_1C], xmm0 mov rax, [rbp+var_8] movss xmm0, dword ptr [rax+4] movss [rbp+var_20], xmm0 mov rax, [rbp+var_8] movss xmm0, dword ptr [rax+8] movss [rbp+var_24], xmm0 mov rax, [rbp+var_8] movss xmm0, dword ptr [rax+0Ch] movss [rbp+var_28], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax] movss [rbp+var_2C], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+4] movss [rbp+var_30], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+8] movss [rbp+var_34], xmm0 mov rax, [rbp+var_10] movss xmm0, dword ptr [rax+0Ch] movss [rbp+var_38], xmm0 movss xmm0, [rbp+var_2C] movss [rbp+var_54], xmm0 mov rax, [rbp+var_18] mov rdx, rax shr rdx, 1 mov ecx, eax and ecx, 1 or rcx, rdx cvtsi2ss xmm0, rcx addss xmm0, xmm0 cvtsi2ss xmm1, rax movss [rbp+var_50], xmm1 test rax, rax movss [rbp+var_4C], xmm0 js short loc_1D448 movss xmm0, [rbp+var_50] movss [rbp+var_4C], xmm0 loc_1D448: movss xmm0, [rbp+var_54] movss xmm1, [rbp+var_4C] divss xmm0, xmm1 movss [rbp+var_3C], xmm0 movss xmm0, [rbp+var_30] movss [rbp+var_60], xmm0 mov rax, [rbp+var_18] mov rdx, rax shr rdx, 1 mov ecx, eax and ecx, 1 or rcx, rdx cvtsi2ss xmm0, rcx addss xmm0, xmm0 cvtsi2ss xmm1, rax movss [rbp+var_5C], xmm1 test rax, rax movss [rbp+var_58], xmm0 js short loc_1D49E movss xmm0, [rbp+var_5C] movss [rbp+var_58], xmm0 loc_1D49E: movss xmm0, [rbp+var_60] movss xmm1, [rbp+var_58] divss xmm0, xmm1 movss [rbp+var_40], xmm0 movss xmm0, [rbp+var_2C] movss xmm1, [rbp+var_34] addss xmm0, xmm1 movss [rbp+var_6C], xmm0 mov rax, [rbp+var_18] mov rdx, rax shr rdx, 1 mov ecx, eax and ecx, 1 or rcx, rdx cvtsi2ss xmm0, rcx addss xmm0, xmm0 cvtsi2ss xmm1, rax movss [rbp+var_68], xmm1 test rax, rax movss [rbp+var_64], xmm0 js short loc_1D4FD movss xmm0, [rbp+var_68] movss [rbp+var_64], xmm0 loc_1D4FD: movss xmm0, [rbp+var_6C] movss xmm1, [rbp+var_64] divss xmm0, xmm1 movss [rbp+var_44], xmm0 movss xmm0, [rbp+var_30] movss xmm1, [rbp+var_38] addss xmm0, xmm1 movss [rbp+var_78], xmm0 mov rax, [rbp+var_18] mov rdx, rax shr rdx, 1 mov ecx, eax and ecx, 1 or rcx, rdx cvtsi2ss xmm0, rcx addss xmm0, xmm0 cvtsi2ss xmm1, rax movss [rbp+var_74], xmm1 test rax, rax movss [rbp+var_70], xmm0 js short loc_1D55C movss xmm0, [rbp+var_74] movss [rbp+var_70], xmm0 loc_1D55C: movss xmm0, [rbp+var_78] movss xmm1, [rbp+var_70] divss xmm0, xmm1 movss [rbp+var_48], xmm0 mov edi, 7 lea rax, glBegin call qword ptr [rax] lea rax, glTexCoord2f mov rax, [rax] movss xmm0, [rbp+var_3C] movss xmm1, [rbp+var_40] call rax lea rax, glVertex2f mov rax, [rax] movss xmm0, [rbp+var_1C] movss xmm1, [rbp+var_20] call rax lea rax, glTexCoord2f mov rax, [rax] movss xmm0, [rbp+var_44] movss xmm1, [rbp+var_40] call rax lea rax, glVertex2f mov rax, [rax] movss xmm0, [rbp+var_1C] addss xmm0, [rbp+var_34] movss xmm1, [rbp+var_24] subss xmm1, [rbp+var_34] addss xmm0, xmm1 movss xmm1, [rbp+var_20] call rax lea rax, glTexCoord2f mov rax, [rax] movss xmm0, [rbp+var_44] movss xmm1, [rbp+var_48] call rax lea rax, glVertex2f mov rax, [rax] movss xmm0, [rbp+var_1C] addss xmm0, [rbp+var_34] movss xmm1, [rbp+var_24] subss xmm1, [rbp+var_34] addss xmm0, xmm1 movss xmm1, [rbp+var_20] addss xmm1, [rbp+var_38] movss xmm2, [rbp+var_28] subss xmm2, [rbp+var_38] addss xmm1, xmm2 call rax lea rax, glTexCoord2f mov rax, [rax] movss xmm0, [rbp+var_3C] movss xmm1, [rbp+var_48] call rax lea rax, glVertex2f mov rax, [rax] movss xmm0, [rbp+var_1C] movss xmm1, [rbp+var_20] addss xmm1, [rbp+var_38] movss xmm2, [rbp+var_28] subss xmm2, [rbp+var_38] addss xmm1, xmm2 call rax lea rax, glEnd call qword ptr [rax] add rsp, 80h pop rbp retn
long long SDL::DrawTexture(SDL *this, const SDL::Rect2f *a2, long long a3) { float v4; // [rsp+8h] [rbp-78h] float v5; // [rsp+10h] [rbp-70h] float v6; // [rsp+1Ch] [rbp-64h] float v7; // [rsp+28h] [rbp-58h] float v8; // [rsp+34h] [rbp-4Ch] float v9; // [rsp+3Ch] [rbp-44h] float v10; // [rsp+40h] [rbp-40h] float v11; // [rsp+44h] [rbp-3Ch] float v12; // [rsp+48h] [rbp-38h] float v13; // [rsp+4Ch] [rbp-34h] float v14; // [rsp+50h] [rbp-30h] float v15; // [rsp+58h] [rbp-28h] float v16; // [rsp+5Ch] [rbp-24h] float v17; // [rsp+60h] [rbp-20h] float v18; // [rsp+64h] [rbp-1Ch] v18 = *(float *)this; v17 = *((float *)this + 1); v16 = *((float *)this + 2); v15 = *((float *)this + 3); v14 = *((float *)a2 + 1); v13 = *((float *)a2 + 2); v12 = *((float *)a2 + 3); v8 = (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1) + (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1); if ( a3 >= 0 ) v8 = (float)(int)a3; v11 = *(float *)a2 / v8; v7 = (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1) + (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1); if ( a3 >= 0 ) v7 = (float)(int)a3; v10 = v14 / v7; v6 = (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1) + (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1); if ( a3 >= 0 ) v6 = (float)(int)a3; v9 = (float)(*(float *)a2 + v13) / v6; v4 = v14 + v12; v5 = (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1) + (float)(int)(((unsigned long long)a3 >> 1) | a3 & 1); if ( a3 >= 0 ) v5 = (float)(int)a3; glBegin(7LL); glTexCoord2f(v11, v10); glVertex2f(v18, v17); glTexCoord2f(v9, v10); glVertex2f((float)(v18 + v13) + (float)(v16 - v13), v17); glTexCoord2f(v9, v4 / v5); glVertex2f((float)(v18 + v13) + (float)(v16 - v13), (float)(v17 + v12) + (float)(v15 - v12)); glTexCoord2f(v11, v4 / v5); glVertex2f(v18, (float)(v17 + v12) + (float)(v15 - v12)); return glEnd(); }
DrawTexture: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX] MOVSS dword ptr [RBP + -0x1c],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX + 0x4] MOVSS dword ptr [RBP + -0x20],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX + 0x8] MOVSS dword ptr [RBP + -0x24],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX + 0xc] MOVSS dword ptr [RBP + -0x28],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX] MOVSS dword ptr [RBP + -0x2c],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x4] MOVSS dword ptr [RBP + -0x30],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0x8] MOVSS dword ptr [RBP + -0x34],XMM0 MOV RAX,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RAX + 0xc] MOVSS dword ptr [RBP + -0x38],XMM0 MOVSS XMM0,dword ptr [RBP + -0x2c] MOVSS dword ptr [RBP + -0x54],XMM0 MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX SHR RDX,0x1 MOV ECX,EAX AND ECX,0x1 OR RCX,RDX CVTSI2SS XMM0,RCX ADDSS XMM0,XMM0 CVTSI2SS XMM1,RAX MOVSS dword ptr [RBP + -0x50],XMM1 TEST RAX,RAX MOVSS dword ptr [RBP + -0x4c],XMM0 JS 0x0011d448 MOVSS XMM0,dword ptr [RBP + -0x50] MOVSS dword ptr [RBP + -0x4c],XMM0 LAB_0011d448: MOVSS XMM0,dword ptr [RBP + -0x54] MOVSS XMM1,dword ptr [RBP + -0x4c] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x3c],XMM0 MOVSS XMM0,dword ptr [RBP + -0x30] MOVSS dword ptr [RBP + -0x60],XMM0 MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX SHR RDX,0x1 MOV ECX,EAX AND ECX,0x1 OR RCX,RDX CVTSI2SS XMM0,RCX ADDSS XMM0,XMM0 CVTSI2SS XMM1,RAX MOVSS dword ptr [RBP + -0x5c],XMM1 TEST RAX,RAX MOVSS dword ptr [RBP + -0x58],XMM0 JS 0x0011d49e MOVSS XMM0,dword ptr [RBP + -0x5c] MOVSS dword ptr [RBP + -0x58],XMM0 LAB_0011d49e: MOVSS XMM0,dword ptr [RBP + -0x60] MOVSS XMM1,dword ptr [RBP + -0x58] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x40],XMM0 MOVSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM1,dword ptr [RBP + -0x34] ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x6c],XMM0 MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX SHR RDX,0x1 MOV ECX,EAX AND ECX,0x1 OR RCX,RDX CVTSI2SS XMM0,RCX ADDSS XMM0,XMM0 CVTSI2SS XMM1,RAX MOVSS dword ptr [RBP + -0x68],XMM1 TEST RAX,RAX MOVSS dword ptr [RBP + -0x64],XMM0 JS 0x0011d4fd MOVSS XMM0,dword ptr [RBP + -0x68] MOVSS dword ptr [RBP + -0x64],XMM0 LAB_0011d4fd: MOVSS XMM0,dword ptr [RBP + -0x6c] MOVSS XMM1,dword ptr [RBP + -0x64] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x44],XMM0 MOVSS XMM0,dword ptr [RBP + -0x30] MOVSS XMM1,dword ptr [RBP + -0x38] ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x78],XMM0 MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX SHR RDX,0x1 MOV ECX,EAX AND ECX,0x1 OR RCX,RDX CVTSI2SS XMM0,RCX ADDSS XMM0,XMM0 CVTSI2SS XMM1,RAX MOVSS dword ptr [RBP + -0x74],XMM1 TEST RAX,RAX MOVSS dword ptr [RBP + -0x70],XMM0 JS 0x0011d55c MOVSS XMM0,dword ptr [RBP + -0x74] MOVSS dword ptr [RBP + -0x70],XMM0 LAB_0011d55c: MOVSS XMM0,dword ptr [RBP + -0x78] MOVSS XMM1,dword ptr [RBP + -0x70] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x48],XMM0 MOV EDI,0x7 LEA RAX,[0x13b4f0] CALL qword ptr [RAX] LEA RAX,[0x13b7f8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x3c] MOVSS XMM1,dword ptr [RBP + -0x40] CALL RAX LEA RAX,[0x13b8b8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM1,dword ptr [RBP + -0x20] CALL RAX LEA RAX,[0x13b7f8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x44] MOVSS XMM1,dword ptr [RBP + -0x40] CALL RAX LEA RAX,[0x13b8b8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x1c] ADDSS XMM0,dword ptr [RBP + -0x34] MOVSS XMM1,dword ptr [RBP + -0x24] SUBSS XMM1,dword ptr [RBP + -0x34] ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x20] CALL RAX LEA RAX,[0x13b7f8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x44] MOVSS XMM1,dword ptr [RBP + -0x48] CALL RAX LEA RAX,[0x13b8b8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x1c] ADDSS XMM0,dword ptr [RBP + -0x34] MOVSS XMM1,dword ptr [RBP + -0x24] SUBSS XMM1,dword ptr [RBP + -0x34] ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x20] ADDSS XMM1,dword ptr [RBP + -0x38] MOVSS XMM2,dword ptr [RBP + -0x28] SUBSS XMM2,dword ptr [RBP + -0x38] ADDSS XMM1,XMM2 CALL RAX LEA RAX,[0x13b7f8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x3c] MOVSS XMM1,dword ptr [RBP + -0x48] CALL RAX LEA RAX,[0x13b8b8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM1,dword ptr [RBP + -0x20] ADDSS XMM1,dword ptr [RBP + -0x38] MOVSS XMM2,dword ptr [RBP + -0x28] SUBSS XMM2,dword ptr [RBP + -0x38] ADDSS XMM1,XMM2 CALL RAX LEA RAX,[0x13b610] CALL qword ptr [RAX] ADD RSP,0x80 POP RBP RET
/* SDL::DrawTexture(SDL::Rect2f const&, SDL::Rect2f const&, unsigned long) */ void SDL::DrawTexture(Rect2f *param_1,Rect2f *param_2,ulong param_3) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float local_78; float local_6c; float local_60; float local_54; fVar1 = *(float *)param_1; fVar2 = *(float *)(param_1 + 4); fVar3 = *(float *)(param_1 + 8); fVar4 = *(float *)(param_1 + 0xc); fVar5 = *(float *)(param_2 + 8); fVar6 = *(float *)(param_2 + 0xc); local_54 = (float)param_3; local_54 = *(float *)param_2 / local_54; local_60 = (float)param_3; local_60 = *(float *)(param_2 + 4) / local_60; local_6c = (float)param_3; local_6c = (*(float *)param_2 + fVar5) / local_6c; local_78 = (float)param_3; local_78 = (*(float *)(param_2 + 4) + fVar6) / local_78; (*glBegin)(7); (*glTexCoord2f)(local_54,local_60); (*glVertex2f)(fVar1,fVar2); (*glTexCoord2f)(local_6c,local_60); (*glVertex2f)(fVar1 + fVar5 + (fVar3 - fVar5),fVar2); (*glTexCoord2f)(local_6c,local_78); (*glVertex2f)(fVar1 + fVar5 + (fVar3 - fVar5),fVar2 + fVar6 + (fVar4 - fVar6)); (*glTexCoord2f)(local_54,local_78); (*glVertex2f)(fVar1,fVar2 + fVar6 + (fVar4 - fVar6)); (*glEnd)(); return; }
61,450
ma_state_info_write
eloqsql/storage/maria/ma_open.c
uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite) { uint res; if (share->options & HA_OPTION_READ_ONLY_DATA) return 0; if (pWrite & MA_STATE_INFO_WRITE_LOCK) mysql_mutex_lock(&share->intern_lock); else if (maria_multi_threaded && !share->temporary) mysql_mutex_assert_owner(&share->intern_lock); if (share->base.born_transactional && translog_status == TRANSLOG_OK && !maria_in_recovery) { /* In a recovery, we want to set is_of_horizon to the LSN of the last record executed by Recovery, not the current EOF of the log (which is too new). Recovery does it by itself. */ share->state.is_of_horizon= translog_get_horizon(); DBUG_PRINT("info", ("is_of_horizon set to LSN " LSN_FMT "", LSN_IN_PARTS(share->state.is_of_horizon))); } res= _ma_state_info_write_sub(share->kfile.file, &share->state, pWrite); if (pWrite & MA_STATE_INFO_WRITE_LOCK) mysql_mutex_unlock(&share->intern_lock); /* If open_count != 0 we have to write the state again at close */ share->changed= share->state.open_count != 0; return res; }
O0
c
ma_state_info_write: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movq 0x720(%rax), %rax andq $0x10000, %rax # imm = 0x10000 cmpq $0x0, %rax je 0x8fea2 movl $0x0, -0x4(%rbp) jmp 0x8ff89 movl -0x14(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x8fecb movq -0x10(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0xc2950(%rip), %rsi # 0x15280f movl $0x5e3, %edx # imm = 0x5E3 callq 0x8cfd0 jmp 0x8feef leaq 0x3e7b57(%rip), %rax # 0x477a29 movsbl (%rax), %eax cmpl $0x0, %eax je 0x8feed movq -0x10(%rbp), %rax cmpb $0x0, 0x7d9(%rax) jne 0x8feed jmp 0x8fee9 jmp 0x8feeb jmp 0x8feed jmp 0x8feef movq -0x10(%rbp), %rax movsbl 0x44c(%rax), %eax cmpl $0x0, %eax je 0x8ff30 leaq 0x3e7b5a(%rip), %rax # 0x477a60 cmpl $0x1, (%rax) jne 0x8ff30 leaq 0x3e7b18(%rip), %rax # 0x477a2a cmpb $0x0, (%rax) jne 0x8ff30 movb $0x0, %al callq 0x32a20 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x180(%rax) jmp 0x8ff2e jmp 0x8ff30 movq -0x10(%rbp), %rax movl 0x760(%rax), %edi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq 0x8ffa0 movl %eax, -0x18(%rbp) movl -0x14(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x8ff64 movq -0x10(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x8fc80 movq -0x10(%rbp), %rax cmpl $0x0, 0x16c(%rax) setne %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x7de(%rax) movl -0x18(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_state_info_write: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov rax, [rax+720h] and rax, 10000h cmp rax, 0 jz short loc_8FEA2 mov [rbp+var_4], 0 jmp loc_8FF89 loc_8FEA2: mov eax, [rbp+var_14] and eax, 4 cmp eax, 0 jz short loc_8FECB mov rdi, [rbp+var_10] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 5E3h call inline_mysql_mutex_lock_13 jmp short loc_8FEEF loc_8FECB: lea rax, maria_multi_threaded movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_8FEED mov rax, [rbp+var_10] cmp byte ptr [rax+7D9h], 0 jnz short loc_8FEED jmp short $+2 loc_8FEE9: jmp short $+2 loc_8FEEB: jmp short $+2 loc_8FEED: jmp short $+2 loc_8FEEF: mov rax, [rbp+var_10] movsx eax, byte ptr [rax+44Ch] cmp eax, 0 jz short loc_8FF30 lea rax, translog_status cmp dword ptr [rax], 1 jnz short loc_8FF30 lea rax, maria_in_recovery cmp byte ptr [rax], 0 jnz short loc_8FF30 mov al, 0 call translog_get_horizon mov rcx, rax mov rax, [rbp+var_10] mov [rax+180h], rcx jmp short $+2 loc_8FF2E: jmp short $+2 loc_8FF30: mov rax, [rbp+var_10] mov edi, [rax+760h] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call _ma_state_info_write_sub mov [rbp+var_18], eax mov eax, [rbp+var_14] and eax, 4 cmp eax, 0 jz short loc_8FF64 mov rdi, [rbp+var_10] add rdi, 8F0h call inline_mysql_mutex_unlock_14 loc_8FF64: mov rax, [rbp+var_10] cmp dword ptr [rax+16Ch], 0 setnz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_10] mov [rax+7DEh], cl mov eax, [rbp+var_18] mov [rbp+var_4], eax loc_8FF89: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_state_info_write(long long a1, unsigned int a2) { unsigned int v3; // [rsp+8h] [rbp-18h] if ( (*(_QWORD *)(a1 + 1824) & 0x10000LL) != 0 ) { return 0; } else { if ( (a2 & 4) != 0 ) inline_mysql_mutex_lock_13( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x5E3u); if ( *(_BYTE *)(a1 + 1100) && translog_status == 1 && !maria_in_recovery ) *(_QWORD *)(a1 + 384) = translog_get_horizon(); v3 = ma_state_info_write_sub(*(unsigned int *)(a1 + 1888), a1, a2); if ( (a2 & 4) != 0 ) inline_mysql_mutex_unlock_14(a1 + 2288); *(_BYTE *)(a1 + 2014) = *(_DWORD *)(a1 + 364) != 0; return v3; } }
_ma_state_info_write: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x720] AND RAX,0x10000 CMP RAX,0x0 JZ 0x0018fea2 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018ff89 LAB_0018fea2: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x4 CMP EAX,0x0 JZ 0x0018fecb MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8f0 LEA RSI,[0x25280f] MOV EDX,0x5e3 CALL 0x0018cfd0 JMP 0x0018feef LAB_0018fecb: LEA RAX,[0x577a29] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0018feed MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7d9],0x0 JNZ 0x0018feed JMP 0x0018fee9 LAB_0018fee9: JMP 0x0018feeb LAB_0018feeb: JMP 0x0018feed LAB_0018feed: JMP 0x0018feef LAB_0018feef: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x44c] CMP EAX,0x0 JZ 0x0018ff30 LEA RAX,[0x577a60] CMP dword ptr [RAX],0x1 JNZ 0x0018ff30 LEA RAX,[0x577a2a] CMP byte ptr [RAX],0x0 JNZ 0x0018ff30 MOV AL,0x0 CALL 0x00132a20 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x180],RCX JMP 0x0018ff2e LAB_0018ff2e: JMP 0x0018ff30 LAB_0018ff30: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x760] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL 0x0018ffa0 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x4 CMP EAX,0x0 JZ 0x0018ff64 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8f0 CALL 0x0018fc80 LAB_0018ff64: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x16c],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7de],CL MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX LAB_0018ff89: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 _ma_state_info_write(long param_1,uint param_2) { int8 uVar1; int4 local_c; if ((*(ulong *)(param_1 + 0x720) & 0x10000) == 0) { if ((param_2 & 4) != 0) { inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x5e3); } if (((*(char *)(param_1 + 0x44c) != '\0') && (translog_status == 1)) && (maria_in_recovery == '\0')) { uVar1 = translog_get_horizon(); *(int8 *)(param_1 + 0x180) = uVar1; } local_c = _ma_state_info_write_sub(*(int4 *)(param_1 + 0x760),param_1,param_2); if ((param_2 & 4) != 0) { inline_mysql_mutex_unlock(param_1 + 0x8f0); } *(bool *)(param_1 + 0x7de) = *(int *)(param_1 + 0x16c) != 0; } else { local_c = 0; } return local_c; }
61,451
my_strnxfrm_tis620_nopad
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620_nopad(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; memset(dst + len, 0x00, fill_length); len= dstlen0; } return len; }
O0
c
my_strnxfrm_tis620_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x7d0ee movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x7d0f6 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x26280 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x7ce90 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0x7d133 movl -0x1c(%rbp), %eax movq %rax, -0x18(%rbp) jmp 0x7d135 jmp 0x7d137 movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x7d149 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x7d14b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax subq -0x38(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x77610 movq %rax, -0x38(%rbp) movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x7d1c2 movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x7d1c2 movq -0x40(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi addq -0x38(%rbp), %rdi movq -0x48(%rbp), %rdx xorl %esi, %esi callq 0x261c0 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_tis620_nopad: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb short loc_7D0EE mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_7D0F6 loc_7D0EE: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_7D0F6: mov rax, [rbp+var_50] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _memcpy mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] call thai2sortable mov [rbp+var_38], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_7D133 mov eax, [rbp+var_1C] mov [rbp+var_18], rax loc_7D133: jmp short $+2 loc_7D135: jmp short $+2 loc_7D137: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jbe short loc_7D149 mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_7D149: jmp short $+2 loc_7D14B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_38] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov rax, [rbp+var_18] sub rax, [rbp+var_38] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse_nopad mov [rbp+var_38], rax mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_7D1C2 mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_7D1C2 mov rax, [rbp+var_40] sub rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, [rbp+var_10] add rdi, [rbp+var_38] mov rdx, [rbp+var_48] xor esi, esi call _memset mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_7D1C2: mov rax, [rbp+var_38] add rsp, 60h pop rbp retn
unsigned long long my_strnxfrm_tis620_nopad( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { long long v8; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+28h] [rbp-38h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v13; // [rsp+48h] [rbp-18h] v13 = a3; if ( a3 >= a6 ) v8 = a6; else v8 = a3; memcpy(a2, a5, v8); v10 = thai2sortable(a2, v8); if ( v13 > a4 ) v13 = a4; if ( v10 > v13 ) v10 = v13; v11 = my_strxfrm_pad_desc_and_reverse_nopad( a1, (long long)a2, (unsigned long long)&a2[v10], (unsigned long long)&a2[v13], (int)v13 - (int)v10, a7, 0); if ( (a7 & 0x80) != 0 && v11 < a3 ) { memset(&a2[v11], 0LL, a3 - v11); return a3; } return v11; }
my_strnxfrm_tis620_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0017d0ee MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x0017d0f6 LAB_0017d0ee: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX LAB_0017d0f6: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00126280 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0017ce90 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x0017d133 MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x18],RAX LAB_0017d133: JMP 0x0017d135 LAB_0017d135: JMP 0x0017d137 LAB_0017d137: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JBE 0x0017d149 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX LAB_0017d149: JMP 0x0017d14b LAB_0017d14b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RBP + -0x38] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x00177610 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x0017d1c2 MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0017d1c2 MOV RAX,qword ptr [RBP + -0x40] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] XOR ESI,ESI CALL 0x001261c0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_0017d1c2: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x60 POP RBP RET
ulong my_strnxfrm_tis620_nopad (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,uint param_7) { size_t local_58; ulong local_40; ulong local_20; local_58 = param_6; if (param_3 < param_6) { local_58 = param_3; } memcpy(param_2,param_5,local_58); local_40 = thai2sortable(param_2,local_58); local_20 = param_3; if (param_4 < param_3) { local_20 = (ulong)param_4; } if (local_20 < local_40) { local_40 = local_20; } local_40 = my_strxfrm_pad_desc_and_reverse_nopad (param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20, (int)local_20 - (int)local_40,param_7,0); if (((param_7 & 0x80) != 0) && (local_40 < param_3)) { memset((void *)((long)param_2 + local_40),0,param_3 - local_40); local_40 = param_3; } return local_40; }
61,452
ma_read_rnd_static_record
eloqsql/storage/maria/ma_statrec.c
int _ma_read_rnd_static_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks) { int locked,error,cache_read; uint cache_length; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_read_rnd_static_record"); cache_read=0; cache_length=0; if (info->opt_flag & READ_CACHE_USED) { /* Cache in use */ if (filepos == my_b_tell(&info->rec_cache) && (skip_deleted_blocks || !filepos)) { cache_read=1; /* Read record using cache */ cache_length= (uint) (info->rec_cache.read_end - info->rec_cache.read_pos); } else info->rec_cache.seek_not_done=1; /* Filepos is changed */ } locked=0; if (info->lock_type == F_UNLCK) { if (filepos >= info->state->data_file_length) { /* Test if new records */ if (_ma_readinfo(info,F_RDLCK,0)) DBUG_RETURN(my_errno); locked=1; } else { /* We don't nead new info */ #ifndef UNSAFE_LOCKING if ((! cache_read || share->base.reclength > cache_length) && share->tot_locks == 0) { /* record not in cache */ locked=1; } #else info->tmp_lock_type=F_RDLCK; #endif } } if (filepos >= info->state->data_file_length) { DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld", (long) filepos/share->base.reclength, (long) filepos, (long) info->state->records, (long) info->state->del)); fast_ma_writeinfo(info); DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE); } info->cur_row.lastpos= filepos; info->cur_row.nextpos= filepos+share->base.pack_reclength; if (! cache_read) /* No cacheing */ { error= _ma_read_static_record(info, buf, filepos); DBUG_RETURN(error); } /* Read record with cacheing */ error=my_b_read(&info->rec_cache, buf, share->base.reclength); if (info->s->base.pack_reclength != info->s->base.reclength && !error) { uchar tmp[8]; /* Skill fill bytes */ error=my_b_read(&info->rec_cache, tmp, info->s->base.pack_reclength - info->s->base.reclength); } if (locked) _ma_writeinfo(info,0); /* Unlock keyfile */ if (!error) { if (!buf[0]) { /* Record is removed */ DBUG_RETURN(my_errno=HA_ERR_RECORD_DELETED); } /* Found and may be updated */ info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN(0); } /* my_errno should be set if rec_cache.error == -1 */ if (info->rec_cache.error != -1 || my_errno == 0) _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(my_errno); /* Something wrong (EOF?) */ }
O3
c
ma_read_rnd_static_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %r8 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movb $0x1, %r13b testb $0x2, 0x61c(%rdi) je 0x70617 leaq 0x4c8(%rbx), %rax leaq 0x4f8(%rbx), %rdx cmpl $0x2, 0x568(%rbx) movq 0x4b8(%rbx), %rsi cmoveq %rdx, %rax subq 0x4e0(%rbx), %rsi addq (%rax), %rsi cmpq %r15, %rsi jne 0x7060d testb %cl, %cl sete %al testq %r15, %r15 setne %cl testb %al, %cl je 0x70724 movl $0x1, 0x598(%rbx) xorl %eax, %eax movb $0x1, %r12b movq (%rbx), %r14 cmpl $0x2, 0x664(%rbx) jne 0x7066b movq 0x20(%rbx), %rcx cmpq %r15, 0x28(%rcx) jbe 0x7064e testb %r12b, %r12b jne 0x70640 cmpq %rax, 0x398(%r14) jbe 0x7066b cmpl $0x0, 0x7b8(%r14) setne %r13b jmp 0x7066b movq %r8, %r13 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x42936 testl %eax, %eax jne 0x707f4 movq %r13, %r8 xorl %r13d, %r13d movq 0x20(%rbx), %rax cmpq %r15, 0x28(%rax) jbe 0x706c1 movq %r15, 0x98(%rbx) movq 0x3a0(%r14), %rax addq %r15, %rax movq %rax, 0xa0(%rbx) testb %r12b, %r12b je 0x706ec movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x7082b movq %rbx, %rdi movq %r8, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x704ca movq (%rbx), %rax cmpl $0x0, 0x7b8(%rax) jne 0x706d7 movq %rbx, %rdi xorl %esi, %esi callq 0x4293e callq 0xa1c92 movl $0x89, (%rax) movl $0x89, %eax jmp 0x707fb leaq 0x4b8(%rbx), %r15 movq 0x398(%r14), %r12 movq 0x4c8(%rbx), %rsi leaq (%rsi,%r12), %rax cmpq 0x4d0(%rbx), %rax jbe 0x70738 movq %r15, %rdi movq %r8, %r14 movq %r8, %rsi movq %r12, %rdx callq 0x9578e movl %eax, %r12d jmp 0x70750 movl 0x4d0(%rbx), %eax subl 0x4c8(%rbx), %eax xorl %r12d, %r12d jmp 0x7061c movq %r8, %r14 movq %r8, %rdi movq %r12, %rdx callq 0x29080 addq %r12, 0x4c8(%rbx) xorl %r12d, %r12d movq (%rbx), %rax movq 0x3a0(%rax), %rdx subq 0x398(%rax), %rdx je 0x707ad testl %r12d, %r12d jne 0x707ad movq %r14, -0x40(%rbp) movq 0x4c8(%rbx), %rsi leaq (%rsi,%rdx), %r14 cmpq 0x4d0(%rbx), %r14 jbe 0x70791 leaq -0x38(%rbp), %rsi movq %r15, %rdi callq 0x9578e movl %eax, %r12d jmp 0x707a9 leaq -0x38(%rbp), %rdi movl $0x8, %ecx callq 0x29420 movq %r14, 0x4c8(%rbx) xorl %r12d, %r12d movq -0x40(%rbp), %r14 testb %r13b, %r13b jne 0x707bc movq %rbx, %rdi xorl %esi, %esi callq 0x4293e testl %r12d, %r12d je 0x707d9 cmpl $-0x1, 0x59c(%rbx) je 0x707ea movq %rbx, %rdi movl $0x7f, %esi callq 0x3fe24 jmp 0x707f4 cmpb $0x0, (%r14) je 0x70819 orb $-0x7e, 0x624(%rbx) xorl %eax, %eax jmp 0x707fb callq 0xa1c92 cmpl $0x0, (%rax) je 0x707ca callq 0xa1c92 movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x7082b addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa1c92 movl $0x86, (%rax) movl $0x86, %eax jmp 0x707fb callq 0x29260
_ma_read_rnd_static_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov r8, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r13b, 1 test byte ptr [rdi+61Ch], 2 jz short loc_70617 lea rax, [rbx+4C8h] lea rdx, [rbx+4F8h] cmp dword ptr [rbx+568h], 2 mov rsi, [rbx+4B8h] cmovz rax, rdx sub rsi, [rbx+4E0h] add rsi, [rax] cmp rsi, r15 jnz short loc_7060D test cl, cl setz al test r15, r15 setnz cl test cl, al jz loc_70724 loc_7060D: mov dword ptr [rbx+598h], 1 loc_70617: xor eax, eax mov r12b, 1 loc_7061C: mov r14, [rbx] cmp dword ptr [rbx+664h], 2 jnz short loc_7066B mov rcx, [rbx+20h] cmp [rcx+28h], r15 jbe short loc_7064E test r12b, r12b jnz short loc_70640 cmp [r14+398h], rax jbe short loc_7066B loc_70640: cmp dword ptr [r14+7B8h], 0 setnz r13b jmp short loc_7066B loc_7064E: mov r13, r8 mov rdi, rbx xor esi, esi xor edx, edx call _ma_readinfo test eax, eax jnz loc_707F4 mov r8, r13 xor r13d, r13d loc_7066B: mov rax, [rbx+20h] cmp [rax+28h], r15 jbe short loc_706C1 mov [rbx+98h], r15 mov rax, [r14+3A0h] add rax, r15 mov [rbx+0A0h], rax test r12b, r12b jz short loc_706EC mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_7082B mov rdi, rbx mov rsi, r8 mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ma_read_static_record loc_706C1: mov rax, [rbx] cmp dword ptr [rax+7B8h], 0 jnz short loc_706D7 mov rdi, rbx xor esi, esi call _ma_writeinfo loc_706D7: call _my_thread_var mov dword ptr [rax], 89h mov eax, 89h jmp loc_707FB loc_706EC: lea r15, [rbx+4B8h] mov r12, [r14+398h] mov rsi, [rbx+4C8h] lea rax, [rsi+r12] cmp rax, [rbx+4D0h] jbe short loc_70738 mov rdi, r15 mov r14, r8 mov rsi, r8 mov rdx, r12 call _my_b_read mov r12d, eax jmp short loc_70750 loc_70724: mov eax, [rbx+4D0h] sub eax, [rbx+4C8h] xor r12d, r12d jmp loc_7061C loc_70738: mov r14, r8 mov rdi, r8 mov rdx, r12 call _memcpy add [rbx+4C8h], r12 xor r12d, r12d loc_70750: mov rax, [rbx] mov rdx, [rax+3A0h] sub rdx, [rax+398h] jz short loc_707AD test r12d, r12d jnz short loc_707AD mov [rbp+var_40], r14 mov rsi, [rbx+4C8h] lea r14, [rsi+rdx] cmp r14, [rbx+4D0h] jbe short loc_70791 lea rsi, [rbp+var_38] mov rdi, r15 call _my_b_read mov r12d, eax jmp short loc_707A9 loc_70791: lea rdi, [rbp+var_38] mov ecx, 8 call ___memcpy_chk mov [rbx+4C8h], r14 xor r12d, r12d loc_707A9: mov r14, [rbp+var_40] loc_707AD: test r13b, r13b jnz short loc_707BC mov rdi, rbx xor esi, esi call _ma_writeinfo loc_707BC: test r12d, r12d jz short loc_707D9 cmp dword ptr [rbx+59Ch], 0FFFFFFFFh jz short loc_707EA loc_707CA: mov rdi, rbx mov esi, 7Fh call _ma_set_fatal_error jmp short loc_707F4 loc_707D9: cmp byte ptr [r14], 0 jz short loc_70819 or byte ptr [rbx+624h], 82h xor eax, eax jmp short loc_707FB loc_707EA: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_707CA loc_707F4: call _my_thread_var mov eax, [rax] loc_707FB: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_7082B add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_70819: call _my_thread_var mov dword ptr [rax], 86h mov eax, 86h jmp short loc_707FB loc_7082B: call ___stack_chk_fail
long long ma_read_rnd_static_record(_BYTE *a1, _BYTE *a2, unsigned long long a3, char a4) { _BYTE *v5; // r8 _QWORD *v6; // rbx bool v7; // r13 _QWORD *v8; // rax unsigned long long v9; // rax char v10; // r12 long long v11; // r14 long long v13; // r12 long long v14; // rsi _BYTE *v15; // r14 long long v16; // rcx long long v17; // r8 int v18; // r9d int v19; // r12d long long v20; // rdx long long v21; // rsi long long v22; // r14 _BYTE *v23; // [rsp+0h] [rbp-40h] _BYTE v24[8]; // [rsp+8h] [rbp-38h] BYREF unsigned long long v25; // [rsp+10h] [rbp-30h] v5 = a2; v6 = a1; v25 = __readfsqword(0x28u); v7 = 1; if ( (a1[1564] & 2) == 0 ) goto LABEL_7; v8 = a1 + 1224; if ( *((_DWORD *)a1 + 346) == 2 ) v8 = a1 + 1272; if ( *v8 + *((_QWORD *)a1 + 151) - *((_QWORD *)a1 + 156) != a3 || a4 == 0 && a3 != 0 ) { *((_DWORD *)a1 + 358) = 1; LABEL_7: v9 = 0LL; v10 = 1; goto LABEL_8; } v9 = (unsigned int)(*((_DWORD *)a1 + 308) - *((_DWORD *)a1 + 306)); v10 = 0; LABEL_8: v11 = *(_QWORD *)a1; if ( *((_DWORD *)a1 + 409) == 2 ) { if ( *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) <= a3 ) { if ( (unsigned int)ma_readinfo() ) return *(unsigned int *)my_thread_var(a1); v5 = a2; v7 = 0; } else if ( v10 || *(_QWORD *)(v11 + 920) > v9 ) { v7 = *(_DWORD *)(v11 + 1976) != 0; } } if ( *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) <= a3 ) { if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo((long long *)a1, 0); *(_DWORD *)my_thread_var(a1) = 137; return 137LL; } else { *((_QWORD *)a1 + 19) = a3; *((_QWORD *)a1 + 20) = a3 + *(_QWORD *)(v11 + 928); if ( v10 ) return ma_read_static_record((long long)a1, v5, a3); v13 = *(_QWORD *)(v11 + 920); v14 = *((_QWORD *)a1 + 153); if ( (unsigned long long)(v14 + v13) <= *((_QWORD *)a1 + 154) ) { v15 = v5; a1 = v5; memcpy(v5, v14, v13); v6[153] += v13; v19 = 0; } else { a1 += 1208; v15 = v5; v19 = my_b_read(a1, v5, v13); } v20 = *(_QWORD *)(*v6 + 928LL) - *(_QWORD *)(*v6 + 920LL); if ( v20 && !v19 ) { v23 = v15; v21 = v6[153]; v22 = v21 + v20; if ( (unsigned long long)(v21 + v20) <= v6[154] ) { a1 = v24; __memcpy_chk(v24, v21, v20, 8LL); v6[153] = v22; v19 = 0; } else { a1 = v6 + 151; v19 = my_b_read(v6 + 151, v24, v20); } v15 = v23; } if ( !v7 ) { a1 = v6; ma_writeinfo(v6, 0); } if ( v19 ) { if ( *((_DWORD *)v6 + 359) != -1 || !*(_DWORD *)my_thread_var(a1) ) { a1 = v6; ma_set_fatal_error(v6, 127, v20, v16, v17, v18); } return *(unsigned int *)my_thread_var(a1); } if ( *v15 ) { *((_BYTE *)v6 + 1572) |= 0x82u; return 0LL; } else { *(_DWORD *)my_thread_var(a1) = 134; return 134LL; } } }
_ma_read_rnd_static_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV R8,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13B,0x1 TEST byte ptr [RDI + 0x61c],0x2 JZ 0x00170617 LEA RAX,[RBX + 0x4c8] LEA RDX,[RBX + 0x4f8] CMP dword ptr [RBX + 0x568],0x2 MOV RSI,qword ptr [RBX + 0x4b8] CMOVZ RAX,RDX SUB RSI,qword ptr [RBX + 0x4e0] ADD RSI,qword ptr [RAX] CMP RSI,R15 JNZ 0x0017060d TEST CL,CL SETZ AL TEST R15,R15 SETNZ CL TEST CL,AL JZ 0x00170724 LAB_0017060d: MOV dword ptr [RBX + 0x598],0x1 LAB_00170617: XOR EAX,EAX MOV R12B,0x1 LAB_0017061c: MOV R14,qword ptr [RBX] CMP dword ptr [RBX + 0x664],0x2 JNZ 0x0017066b MOV RCX,qword ptr [RBX + 0x20] CMP qword ptr [RCX + 0x28],R15 JBE 0x0017064e TEST R12B,R12B JNZ 0x00170640 CMP qword ptr [R14 + 0x398],RAX JBE 0x0017066b LAB_00170640: CMP dword ptr [R14 + 0x7b8],0x0 SETNZ R13B JMP 0x0017066b LAB_0017064e: MOV R13,R8 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x00142936 TEST EAX,EAX JNZ 0x001707f4 MOV R8,R13 XOR R13D,R13D LAB_0017066b: MOV RAX,qword ptr [RBX + 0x20] CMP qword ptr [RAX + 0x28],R15 JBE 0x001706c1 MOV qword ptr [RBX + 0x98],R15 MOV RAX,qword ptr [R14 + 0x3a0] ADD RAX,R15 MOV qword ptr [RBX + 0xa0],RAX TEST R12B,R12B JZ 0x001706ec MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0017082b MOV RDI,RBX MOV RSI,R8 MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001704ca LAB_001706c1: MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x001706d7 MOV RDI,RBX XOR ESI,ESI CALL 0x0014293e LAB_001706d7: CALL 0x001a1c92 MOV dword ptr [RAX],0x89 MOV EAX,0x89 JMP 0x001707fb LAB_001706ec: LEA R15,[RBX + 0x4b8] MOV R12,qword ptr [R14 + 0x398] MOV RSI,qword ptr [RBX + 0x4c8] LEA RAX,[RSI + R12*0x1] CMP RAX,qword ptr [RBX + 0x4d0] JBE 0x00170738 MOV RDI,R15 MOV R14,R8 MOV RSI,R8 MOV RDX,R12 CALL 0x0019578e MOV R12D,EAX JMP 0x00170750 LAB_00170724: MOV EAX,dword ptr [RBX + 0x4d0] SUB EAX,dword ptr [RBX + 0x4c8] XOR R12D,R12D JMP 0x0017061c LAB_00170738: MOV R14,R8 MOV RDI,R8 MOV RDX,R12 CALL 0x00129080 ADD qword ptr [RBX + 0x4c8],R12 XOR R12D,R12D LAB_00170750: MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RAX + 0x3a0] SUB RDX,qword ptr [RAX + 0x398] JZ 0x001707ad TEST R12D,R12D JNZ 0x001707ad MOV qword ptr [RBP + -0x40],R14 MOV RSI,qword ptr [RBX + 0x4c8] LEA R14,[RSI + RDX*0x1] CMP R14,qword ptr [RBX + 0x4d0] JBE 0x00170791 LEA RSI,[RBP + -0x38] MOV RDI,R15 CALL 0x0019578e MOV R12D,EAX JMP 0x001707a9 LAB_00170791: LEA RDI,[RBP + -0x38] MOV ECX,0x8 CALL 0x00129420 MOV qword ptr [RBX + 0x4c8],R14 XOR R12D,R12D LAB_001707a9: MOV R14,qword ptr [RBP + -0x40] LAB_001707ad: TEST R13B,R13B JNZ 0x001707bc MOV RDI,RBX XOR ESI,ESI CALL 0x0014293e LAB_001707bc: TEST R12D,R12D JZ 0x001707d9 CMP dword ptr [RBX + 0x59c],-0x1 JZ 0x001707ea LAB_001707ca: MOV RDI,RBX MOV ESI,0x7f CALL 0x0013fe24 JMP 0x001707f4 LAB_001707d9: CMP byte ptr [R14],0x0 JZ 0x00170819 OR byte ptr [RBX + 0x624],0x82 XOR EAX,EAX JMP 0x001707fb LAB_001707ea: CALL 0x001a1c92 CMP dword ptr [RAX],0x0 JZ 0x001707ca LAB_001707f4: CALL 0x001a1c92 MOV EAX,dword ptr [RAX] LAB_001707fb: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0017082b ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00170819: CALL 0x001a1c92 MOV dword ptr [RAX],0x86 MOV EAX,0x86 JMP 0x001707fb LAB_0017082b: CALL 0x00129260
ulong _ma_read_rnd_static_record(long *param_1,char *param_2,ulong param_3,char param_4) { size_t __n; bool bVar1; int iVar2; long *plVar3; ulong uVar4; int *piVar5; uint *puVar6; int4 *puVar7; long lVar8; long in_FS_OFFSET; bool bVar9; int1 local_40 [8]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); bVar9 = true; if ((*(byte *)((long)param_1 + 0x61c) & 2) == 0) { LAB_00170617: uVar4 = 0; bVar1 = true; } else { plVar3 = param_1 + 0x99; if ((int)param_1[0xad] == 2) { plVar3 = param_1 + 0x9f; } if (((param_1[0x97] - param_1[0x9c]) + *plVar3 != param_3) || (param_3 != 0 && param_4 == '\0')) { *(int4 *)(param_1 + 0xb3) = 1; goto LAB_00170617; } uVar4 = (ulong)(uint)((int)param_1[0x9a] - (int)param_1[0x99]); bVar1 = false; } lVar8 = *param_1; if (*(int *)((long)param_1 + 0x664) == 2) { if (param_3 < *(ulong *)(param_1[4] + 0x28)) { if ((bVar1) || (uVar4 < *(ulong *)(lVar8 + 0x398))) { bVar9 = *(int *)(lVar8 + 0x7b8) != 0; } goto LAB_0017066b; } iVar2 = _ma_readinfo(param_1,0,0); if (iVar2 == 0) { bVar9 = false; goto LAB_0017066b; } LAB_001707f4: puVar6 = (uint *)_my_thread_var(); uVar4 = (ulong)*puVar6; } else { LAB_0017066b: if (param_3 < *(ulong *)(param_1[4] + 0x28)) { param_1[0x13] = param_3; param_1[0x14] = *(long *)(lVar8 + 0x3a0) + param_3; if (bVar1) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { uVar4 = _ma_read_static_record(param_1,param_2,param_3); return uVar4; } goto LAB_0017082b; } __n = *(size_t *)(lVar8 + 0x398); if ((ulong)param_1[0x9a] < param_1[0x99] + __n) { iVar2 = _my_b_read(param_1 + 0x97,param_2,__n); } else { memcpy(param_2,(void *)param_1[0x99],__n); param_1[0x99] = param_1[0x99] + __n; iVar2 = 0; } lVar8 = *(long *)(*param_1 + 0x3a0) - *(long *)(*param_1 + 0x398); if ((lVar8 != 0) && (iVar2 == 0)) { uVar4 = param_1[0x99] + lVar8; if ((ulong)param_1[0x9a] < uVar4) { iVar2 = _my_b_read(param_1 + 0x97,local_40); } else { __memcpy_chk(local_40,param_1[0x99],lVar8,8); param_1[0x99] = uVar4; iVar2 = 0; } } if (!bVar9) { _ma_writeinfo(param_1,0); } if (iVar2 != 0) { if ((*(int *)((long)param_1 + 0x59c) != -1) || (piVar5 = (int *)_my_thread_var(), *piVar5 == 0)) { _ma_set_fatal_error(param_1,0x7f); } goto LAB_001707f4; } if (*param_2 == '\0') { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x86; uVar4 = 0x86; } else { *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 0x82; uVar4 = 0; } } else { if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x89; uVar4 = 0x89; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar4; } LAB_0017082b: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,453
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>::type_name() const
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_RETURNS_NON_NULL const char* type_name() const noexcept { switch (m_data.m_type) { case value_t::null: return "null"; case value_t::object: return "object"; case value_t::array: return "array"; case value_t::string: return "string"; case value_t::boolean: return "boolean"; case value_t::binary: return "binary"; case value_t::discarded: return "discarded"; case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: default: return "number"; } }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const: movzbl (%rdi), %eax cmpq $0x9, %rax ja 0x61834 leaq 0x8ebe8(%rip), %rcx # 0xf0414 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x8dcf2(%rip), %rax # 0xef52d retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv: movzx eax, byte ptr [rdi] cmp rax, 9 ja short loc_61834 lea rcx, unk_F0414 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_61834: lea rax, aNumber; "number" retn
const char * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name( unsigned __int8 *a1) { unsigned long long v1; // rax v1 = *a1; if ( v1 > 9 ) return "number"; else return (char *)dword_F0414 + dword_F0414[v1]; }
type_name: MOVZX EAX,byte ptr [RDI] CMP RAX,0x9 JA 0x00161834 LEA RCX,[0x1f0414] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_00161834: LEA RAX,[0x1ef52d] RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::type_name() const */ char * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::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> *this) { if ((ulong)(byte)*this < 10) { return &DAT_001f0414 + *(int *)(&DAT_001f0414 + (ulong)(byte)*this * 4); } return "number"; }
61,454
js_typed_array_find
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_find(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int mode) { JSValue func, this_arg; JSValue args[3]; JSValue val, index_val, res; int len, k, end; int dir; val = JS_UNDEFINED; len = js_typed_array_get_length_unsafe(ctx, this_val); if (len < 0) goto exception; func = argv[0]; if (check_function(ctx, func)) goto exception; this_arg = JS_UNDEFINED; if (argc > 1) this_arg = argv[1]; k = 0; dir = 1; end = len; if (mode == ArrayFindLast || mode == ArrayFindLastIndex) { k = len - 1; dir = -1; end = -1; } for(; k != end; k += dir) { index_val = js_int32(k); val = JS_GetPropertyValue(ctx, this_val, index_val); if (JS_IsException(val)) goto exception; args[0] = val; args[1] = index_val; args[2] = this_val; res = JS_Call(ctx, func, this_arg, 3, args); if (JS_IsException(res)) goto exception; if (JS_ToBoolFree(ctx, res)) { if (mode == ArrayFindIndex || mode == ArrayFindLastIndex) { JS_FreeValue(ctx, val); return index_val; } else { return val; } } JS_FreeValue(ctx, val); } if (mode == ArrayFindIndex || mode == ArrayFindLastIndex) return js_int32(-1); else return JS_UNDEFINED; exception: JS_FreeValue(ctx, val); return JS_EXCEPTION; }
O1
c
js_typed_array_find: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r9d, %r12d movq %r8, %r15 movl %ecx, %r14d movq %rdi, %rbx movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) callq 0x77f2d movl $0x3, %r13d testl %eax, %eax js 0x81344 movl %eax, %ebp movl %r12d, 0x24(%rsp) movl %r14d, 0x28(%rsp) movq (%r15), %r14 movq 0x8(%r15), %r12 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x415b1 testl %eax, %eax je 0x8137d xorl %esi, %esi xorl %eax, %eax orq %rax, %rsi movq 0x18(%rbx), %rdi movq %r13, %rdx callq 0x1d8c6 movl $0x6, %r13d xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %r13, %rdx addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, 0x50(%rsp) movq %r14, 0x58(%rsp) xorl %r14d, %r14d cmpl $0x2, 0x28(%rsp) jl 0x813b4 movq 0x10(%r15), %rax movq 0x18(%r15), %rcx movq %rcx, 0x48(%rsp) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movq %rcx, 0x28(%rsp) movl %eax, %eax jmp 0x813c9 movl $0x3, %eax movq %rax, 0x48(%rsp) xorl %eax, %eax movq $0x0, 0x28(%rsp) movq 0x38(%rsp), %r12 movq 0x30(%rsp), %r15 movl 0x24(%rsp), %edi andl $-0x2, %edi leal -0x1(%rbp), %r8d xorl %ecx, %ecx cmpl $0x2, %edi movl $0xffffffff, %r9d # imm = 0xFFFFFFFF cmovnel %ebp, %r9d setne %dil cmovel %r8d, %r14d movl %r9d, 0x44(%rsp) cmpl %r9d, %r14d jne 0x8141f movl 0x24(%rsp), %eax orl $0x2, %eax cmpl $0x3, %eax jne 0x8152e movl $0xffffffff, %r14d # imm = 0xFFFFFFFF xorl %ecx, %ecx xorl %r13d, %r13d jmp 0x81362 movb %dil, %cl leal -0x1(,%rcx,2), %ecx movl %ecx, 0x40(%rsp) orq %rax, 0x28(%rsp) movl %r14d, %r14d movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x3fe2d movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x81517 movq %rbp, 0x70(%rsp) movq %r13, 0x78(%rsp) movq %r14, 0x80(%rsp) movq $0x0, 0x88(%rsp) movq %r15, 0x90(%rsp) movq %r12, 0x98(%rsp) movl $0x0, 0x60(%rsp) movq $0x3, 0x68(%rsp) movups 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movq %rbx, %rdi movq 0x58(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x28(%rsp), %rcx movq 0x48(%rsp), %r8 movl $0x3, %r9d callq 0x284ca cmpl $0x6, %edx je 0x81517 movq %rbx, %rdi movq %rax, %rsi callq 0x22d0d testl %eax, %eax jne 0x81539 movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 addl 0x40(%rsp), %r14d cmpl %r14d, 0x44(%rsp) movq 0x38(%rsp), %r12 movq 0x30(%rsp), %r15 jne 0x81432 jmp 0x813ff movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %rbp, %rax andq %rcx, %rax movl %ebp, %esi jmp 0x81348 movl $0x3, %r13d jmp 0x8135d movl 0x24(%rsp), %eax orl $0x2, %eax cmpl $0x3, %eax jne 0x81559 movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 jmp 0x81415 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbp, %rcx andq %rax, %rcx movq %rbp, %r14 jmp 0x81362
js_typed_array_find: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r12d, r9d mov r15, r8 mov r14d, ecx mov rbx, rdi mov [rsp+0D8h+var_A8], rsi mov [rsp+0D8h+var_A0], rdx call js_typed_array_get_length_unsafe mov r13d, 3 test eax, eax js short loc_81344 mov ebp, eax mov [rsp+0D8h+var_B4], r12d mov dword ptr [rsp+0D8h+var_B0], r14d mov r14, [r15] mov r12, [r15+8] mov rdi, rbx mov rsi, r14 mov rdx, r12 call check_function test eax, eax jz short loc_8137D loc_81344: xor esi, esi xor eax, eax loc_81348: or rsi, rax mov rdi, [rbx+18h] mov rdx, r13 call JS_FreeValueRT mov r13d, 6 loc_8135D: xor r14d, r14d xor ecx, ecx loc_81362: mov eax, r14d or rax, rcx mov rdx, r13 add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8137D: mov [rsp+0D8h+var_88], r12 mov [rsp+0D8h+var_80], r14 xor r14d, r14d cmp dword ptr [rsp+0D8h+var_B0], 2 jl short loc_813B4 mov rax, [r15+10h] mov rcx, [r15+18h] mov [rsp+0D8h+var_90], rcx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov [rsp+0D8h+var_B0], rcx mov eax, eax jmp short loc_813C9 loc_813B4: mov eax, 3 mov [rsp+0D8h+var_90], rax xor eax, eax mov [rsp+0D8h+var_B0], 0 loc_813C9: mov r12, [rsp+0D8h+var_A0] mov r15, [rsp+0D8h+var_A8] mov edi, [rsp+0D8h+var_B4] and edi, 0FFFFFFFEh lea r8d, [rbp-1] xor ecx, ecx cmp edi, 2 mov r9d, 0FFFFFFFFh cmovnz r9d, ebp setnz dil cmovz r14d, r8d mov [rsp+0D8h+var_94], r9d cmp r14d, r9d jnz short loc_8141F loc_813FF: mov eax, [rsp+0D8h+var_B4] or eax, 2 cmp eax, 3 jnz loc_8152E mov r14d, 0FFFFFFFFh loc_81415: xor ecx, ecx xor r13d, r13d jmp loc_81362 loc_8141F: mov cl, dil lea ecx, ds:0FFFFFFFFFFFFFFFFh[rcx*2] mov [rsp+0D8h+var_98], ecx or [rsp+0D8h+var_B0], rax loc_81432: mov r14d, r14d mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, r14 xor r8d, r8d call JS_GetPropertyValue mov rbp, rax mov r13, rdx cmp r13d, 6 jz loc_81517 mov [rsp+0D8h+var_68], rbp mov [rsp+0D8h+var_60], r13 mov [rsp+0D8h+var_58], r14 mov [rsp+0D8h+var_50], 0 mov [rsp+0D8h+var_48], r15 mov [rsp+0D8h+var_40], r12 mov dword ptr [rsp+0D8h+var_78], 0 mov qword ptr [rsp+0D8h+var_78+8], 3 movups xmm0, [rsp+0D8h+var_78] movups [rsp+0D8h+var_D8], xmm0 lea rax, [rsp+0D8h+var_68] mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_C0], 2 mov rdi, rbx mov rsi, [rsp+0D8h+var_80] mov rdx, [rsp+0D8h+var_88] mov rcx, [rsp+0D8h+var_B0] mov r8, [rsp+0D8h+var_90] mov r9d, 3 call JS_CallInternal cmp edx, 6 jz short loc_81517 mov rdi, rbx mov rsi, rax call JS_ToBoolFree test eax, eax jnz short loc_81539 mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT add r14d, [rsp+0D8h+var_98] cmp [rsp+0D8h+var_94], r14d mov r12, [rsp+0D8h+var_A0] mov r15, [rsp+0D8h+var_A8] jnz loc_81432 jmp loc_813FF loc_81517: mov rcx, 0FFFFFFFF00000000h mov rax, rbp and rax, rcx mov esi, ebp jmp loc_81348 loc_8152E: mov r13d, 3 jmp loc_8135D loc_81539: mov eax, [rsp+0D8h+var_B4] or eax, 2 cmp eax, 3 jnz short loc_81559 mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT jmp loc_81415 loc_81559: mov rax, 0FFFFFFFF00000000h mov rcx, rbp and rcx, rax mov r14, rbp jmp loc_81362
unsigned long long js_typed_array_find( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v14; // r12d int v16; // r14d int length_unsafe; // eax double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // r13 int v21; // ebp long long v22; // r14 long long v23; // r12 double v24; // xmm4_8 double v25; // xmm5_8 long long v26; // rsi unsigned long long v27; // rax unsigned int v28; // r14d unsigned long long v29; // rcx long long v31; // rax long long v32; // r12 long long v33; // r15 int v34; // ecx int v35; // r9d long long PropertyValue; // rax long long v37; // rdx __m128 v38; // xmm4 __m128 v39; // xmm5 long long v40; // rbp unsigned long long v41; // rax long long v42; // rdx int v43; // [rsp+24h] [rbp-B4h] int v44; // [rsp+28h] [rbp-B0h] unsigned long long v45; // [rsp+28h] [rbp-B0h] long long v46; // [rsp+28h] [rbp-B0h] int v48; // [rsp+40h] [rbp-98h] int v49; // [rsp+44h] [rbp-94h] long long v50; // [rsp+48h] [rbp-90h] long long v51; // [rsp+50h] [rbp-88h] long long v52; // [rsp+58h] [rbp-80h] __m128 v53; // [rsp+60h] [rbp-78h] _QWORD v54[13]; // [rsp+70h] [rbp-68h] BYREF v14 = a6; v16 = a4; length_unsafe = js_typed_array_get_length_unsafe(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v20 = 3LL; if ( length_unsafe < 0 || (v21 = length_unsafe, v43 = v14, v44 = v16, v22 = *a5, v23 = a5[1], (unsigned int)check_function(a1, *a5, v23, a7, a8, a9, a10, v18, v19, a13, a14)) ) { v26 = 0LL; v27 = 0LL; LABEL_4: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)(v27 | v26), v20); goto LABEL_5; } v51 = v23; v52 = v22; v28 = 0; if ( v44 < 2 ) { v50 = 3LL; v31 = 0LL; v45 = 0LL; } else { v31 = a5[2]; v50 = a5[3]; v45 = v31 & 0xFFFFFFFF00000000LL; v31 = (unsigned int)v31; } v32 = a3; v33 = a2; v34 = 0; v35 = -1; if ( (v43 & 0xFFFFFFFE) == 2 ) v28 = v21 - 1; else v35 = v21; v49 = v35; if ( v28 != v35 ) { LOBYTE(v34) = (v43 & 0xFFFFFFFE) != 2; v48 = 2 * v34 - 1; v46 = v31 | v45; while ( 1 ) { PropertyValue = JS_GetPropertyValue(a1, v33, v32, (_DWORD *)v28, 0LL, a7, a8, a9, a10, v24, v25, a13, a14); v40 = PropertyValue; v20 = v37; if ( (_DWORD)v37 == 6 ) goto LABEL_23; v54[0] = PropertyValue; v54[1] = v37; v54[2] = v28; v54[3] = 0LL; v54[4] = v33; v54[5] = v32; v53.m128_i32[0] = 0; v53.m128_u64[1] = 3LL; a7 = v53; v41 = JS_CallInternal( a1, v52, v51, v46, v50, 3LL, v53, a8, a9, a10, v38, v39, a13, a14, v53.m128_i8[0], 3, (long long)v54, 2u); if ( (_DWORD)v42 == 6 ) { LABEL_23: v27 = v40 & 0xFFFFFFFF00000000LL; v26 = (unsigned int)v40; goto LABEL_4; } if ( (unsigned int)JS_ToBoolFree(a1, v41, v42) ) break; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v40, v20); v28 += v48; v32 = a3; v33 = a2; if ( v49 == v28 ) goto LABEL_14; } if ( (v43 | 2) != 3 ) { v29 = v40 & 0xFFFFFFFF00000000LL; v28 = v40; return v29 | v28; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v40, v20); goto LABEL_16; } LABEL_14: if ( (v43 | 2) == 3 ) { v28 = -1; LABEL_16: v29 = 0LL; return v29 | v28; } LABEL_5: v28 = 0; v29 = 0LL; return v29 | v28; }
61,455
js_typed_array_find
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_find(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int mode) { JSValue func, this_arg; JSValue args[3]; JSValue val, index_val, res; int len, k, end; int dir; val = JS_UNDEFINED; len = js_typed_array_get_length_unsafe(ctx, this_val); if (len < 0) goto exception; func = argv[0]; if (check_function(ctx, func)) goto exception; this_arg = JS_UNDEFINED; if (argc > 1) this_arg = argv[1]; k = 0; dir = 1; end = len; if (mode == ArrayFindLast || mode == ArrayFindLastIndex) { k = len - 1; dir = -1; end = -1; } for(; k != end; k += dir) { index_val = js_int32(k); val = JS_GetPropertyValue(ctx, this_val, index_val); if (JS_IsException(val)) goto exception; args[0] = val; args[1] = index_val; args[2] = this_val; res = JS_Call(ctx, func, this_arg, 3, args); if (JS_IsException(res)) goto exception; if (JS_ToBoolFree(ctx, res)) { if (mode == ArrayFindIndex || mode == ArrayFindLastIndex) { JS_FreeValue(ctx, val); return index_val; } else { return val; } } JS_FreeValue(ctx, val); } if (mode == ArrayFindIndex || mode == ArrayFindLastIndex) return js_int32(-1); else return JS_UNDEFINED; exception: JS_FreeValue(ctx, val); return JS_EXCEPTION; }
O3
c
js_typed_array_find: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r9d, %ebx movq %r8, %rbp movl %ecx, %r12d movq %rsi, %r13 movq %rdi, %r15 movq %rdx, 0x38(%rsp) callq 0x7a99c movl $0x6, %edx testl %eax, %eax js 0x84016 movl %eax, %r14d movl %ebx, 0x24(%rsp) movq %r13, 0x28(%rsp) movq (%rbp), %r13 movq 0x8(%rbp), %rbx movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x42f63 testl %eax, %eax je 0x83e3c xorl %ebx, %ebx xorl %ecx, %ecx movl $0x6, %edx jmp 0x8401a movq %rbx, 0x50(%rsp) movq %r13, 0x58(%rsp) xorl %ebx, %ebx cmpl $0x2, %r12d jl 0x83e71 movq 0x10(%rbp), %rax movq 0x18(%rbp), %rcx movq %rcx, 0x48(%rsp) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movq %rcx, 0x30(%rsp) movl %eax, %eax jmp 0x83e86 movl $0x3, %eax movq %rax, 0x48(%rsp) xorl %eax, %eax movq $0x0, 0x30(%rsp) movq 0x38(%rsp), %r12 movq 0x28(%rsp), %r13 movl 0x24(%rsp), %edi andl $-0x2, %edi leal -0x1(%r14), %esi xorl %ecx, %ecx cmpl $0x2, %edi movl $0xffffffff, %r8d # imm = 0xFFFFFFFF cmovnel %r14d, %r8d setne %dil cmovel %esi, %ebx movl %r8d, 0x28(%rsp) cmpl %r8d, %ebx jne 0x83ed9 movl 0x24(%rsp), %eax orl $0x2, %eax cmpl $0x3, %eax jne 0x84011 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF xorl %ecx, %ecx xorl %edx, %edx jmp 0x8401a movb %dil, %cl leal -0x1(,%rcx,2), %ecx movl %ecx, 0x44(%rsp) orq %rax, 0x30(%rsp) movl %ebx, %ebx movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %rbx, %rcx xorl %r8d, %r8d callq 0x416b3 movq %rax, %rbp movq %rdx, %r14 cmpl $0x6, %r14d je 0x83fe1 movq %rbp, 0x70(%rsp) movq %r14, 0x78(%rsp) movq %rbx, 0x80(%rsp) movq $0x0, 0x88(%rsp) movq %r13, 0x90(%rsp) movq %r12, 0x98(%rsp) movl $0x0, 0x60(%rsp) movq $0x3, 0x68(%rsp) movups 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movq %r15, %rdi movq 0x58(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x48(%rsp), %r8 movl $0x3, %r9d callq 0x28b06 cmpl $0x6, %edx je 0x83fe1 movq %r15, %rdi movq %rax, %rsi callq 0x2356a testl %eax, %eax jne 0x84031 cmpl $-0x9, %r14d jb 0x83fc9 movq 0x18(%r15), %rdi movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x83fc9 movq %rbp, %rsi movq %r14, %rdx callq 0x219cc addl 0x44(%rsp), %ebx cmpl %ebx, 0x28(%rsp) movq 0x38(%rsp), %r12 jne 0x83eec jmp 0x83ebb cmpl $-0x9, %r14d jb 0x83e2e movq 0x18(%r15), %rdi movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x83e2e movq %rbp, %rsi movq %r14, %rdx callq 0x219cc jmp 0x83e2e movl $0x3, %edx xorl %ebx, %ebx xorl %ecx, %ecx movl %ebx, %eax orq %rcx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x24(%rsp), %eax orl $0x2, %eax cmpl $0x3, %eax jne 0x8406d cmpl $-0x9, %r14d jb 0x83ed0 movq 0x18(%r15), %rdi movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x83ed0 movq %rbp, %rsi movq %r14, %rdx callq 0x219cc jmp 0x83ed0 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbp, %rcx andq %rax, %rcx movq %rbp, %rbx movq %r14, %rdx jmp 0x8401a
js_typed_array_find: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov ebx, r9d mov rbp, r8 mov r12d, ecx mov r13, rsi mov r15, rdi mov [rsp+0D8h+var_A0], rdx call js_typed_array_get_length_unsafe mov edx, 6 test eax, eax js loc_84016 mov r14d, eax mov [rsp+0D8h+var_B4], ebx mov [rsp+0D8h+var_B0], r13 mov r13, [rbp+0] mov rbx, [rbp+8] mov rdi, r15 mov rsi, r13 mov rdx, rbx call check_function test eax, eax jz short loc_83E3C loc_83E2E: xor ebx, ebx xor ecx, ecx mov edx, 6 jmp loc_8401A loc_83E3C: mov [rsp+0D8h+var_88], rbx mov [rsp+0D8h+var_80], r13 xor ebx, ebx cmp r12d, 2 jl short loc_83E71 mov rax, [rbp+10h] mov rcx, [rbp+18h] mov [rsp+0D8h+var_90], rcx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov [rsp+0D8h+var_A8], rcx mov eax, eax jmp short loc_83E86 loc_83E71: mov eax, 3 mov [rsp+0D8h+var_90], rax xor eax, eax mov [rsp+0D8h+var_A8], 0 loc_83E86: mov r12, [rsp+0D8h+var_A0] mov r13, [rsp+0D8h+var_B0] mov edi, [rsp+0D8h+var_B4] and edi, 0FFFFFFFEh lea esi, [r14-1] xor ecx, ecx cmp edi, 2 mov r8d, 0FFFFFFFFh cmovnz r8d, r14d setnz dil cmovz ebx, esi mov dword ptr [rsp+0D8h+var_B0], r8d cmp ebx, r8d jnz short loc_83ED9 loc_83EBB: mov eax, [rsp+0D8h+var_B4] or eax, 2 cmp eax, 3 jnz loc_84011 mov ebx, 0FFFFFFFFh loc_83ED0: xor ecx, ecx xor edx, edx jmp loc_8401A loc_83ED9: mov cl, dil lea ecx, ds:0FFFFFFFFFFFFFFFFh[rcx*2] mov [rsp+0D8h+var_94], ecx or [rsp+0D8h+var_A8], rax loc_83EEC: mov ebx, ebx mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, rbx xor r8d, r8d call JS_GetPropertyValue mov rbp, rax mov r14, rdx cmp r14d, 6 jz loc_83FE1 mov [rsp+0D8h+var_68], rbp mov [rsp+0D8h+var_60], r14 mov [rsp+0D8h+var_58], rbx mov [rsp+0D8h+var_50], 0 mov [rsp+0D8h+var_48], r13 mov [rsp+0D8h+var_40], r12 mov dword ptr [rsp+0D8h+var_78], 0 mov qword ptr [rsp+0D8h+var_78+8], 3 movups xmm0, [rsp+0D8h+var_78] movups [rsp+0D8h+var_D8], xmm0 lea rax, [rsp+0D8h+var_68] mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_C0], 2 mov rdi, r15 mov rsi, [rsp+0D8h+var_80] mov rdx, [rsp+0D8h+var_88] mov rcx, [rsp+0D8h+var_A8] mov r8, [rsp+0D8h+var_90] mov r9d, 3 call JS_CallInternal cmp edx, 6 jz short loc_83FE1 mov rdi, r15 mov rsi, rax call JS_ToBoolFree test eax, eax jnz loc_84031 cmp r14d, 0FFFFFFF7h jb short loc_83FC9 mov rdi, [r15+18h] mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg short loc_83FC9 mov rsi, rbp mov rdx, r14 call js_free_value_rt loc_83FC9: add ebx, [rsp+0D8h+var_94] cmp dword ptr [rsp+0D8h+var_B0], ebx mov r12, [rsp+0D8h+var_A0] jnz loc_83EEC jmp loc_83EBB loc_83FE1: cmp r14d, 0FFFFFFF7h jb loc_83E2E mov rdi, [r15+18h] mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg loc_83E2E mov rsi, rbp mov rdx, r14 call js_free_value_rt jmp loc_83E2E loc_84011: mov edx, 3 loc_84016: xor ebx, ebx xor ecx, ecx loc_8401A: mov eax, ebx or rax, rcx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_84031: mov eax, [rsp+0D8h+var_B4] or eax, 2 cmp eax, 3 jnz short loc_8406D cmp r14d, 0FFFFFFF7h jb loc_83ED0 mov rdi, [r15+18h] mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg loc_83ED0 mov rsi, rbp mov rdx, r14 call js_free_value_rt jmp loc_83ED0 loc_8406D: mov rax, 0FFFFFFFF00000000h mov rcx, rbp and rcx, rax mov rbx, rbp mov rdx, r14 jmp short loc_8401A
unsigned long long js_typed_array_find( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v14; // ebx int v16; // r12d int length_unsafe; // eax long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 int v24; // r14d long long v25; // r13 long long v26; // rbx long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 unsigned int v30; // ebx unsigned long long v31; // rcx long long v32; // rax long long v33; // r12 int v34; // ecx int v35; // r8d unsigned long long PropertyValue; // rax long long v37; // rdx __m128 v38; // xmm4 __m128 v39; // xmm5 unsigned long long v40; // rbp unsigned int v41; // r14d unsigned long long v42; // rax unsigned int v43; // edx long long v44; // rdi int v45; // eax long long v46; // rdi int v47; // eax long long v49; // rdi int v50; // eax int v51; // [rsp+24h] [rbp-B4h] int v52; // [rsp+28h] [rbp-B0h] unsigned long long v53; // [rsp+30h] [rbp-A8h] long long v54; // [rsp+30h] [rbp-A8h] int v56; // [rsp+44h] [rbp-94h] long long v57; // [rsp+48h] [rbp-90h] long long v58; // [rsp+50h] [rbp-88h] __m128i v59; // [rsp+60h] [rbp-78h] _QWORD v60[13]; // [rsp+70h] [rbp-68h] BYREF v14 = a6; v16 = a4; length_unsafe = js_typed_array_get_length_unsafe(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( length_unsafe < 0 ) goto LABEL_26; v24 = length_unsafe; v51 = v14; v25 = *a5; v26 = a5[1]; if ( !(unsigned int)check_function(a1, *a5, v26, v19, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14) ) { v58 = v26; v30 = 0; if ( v16 < 2 ) { v57 = 3LL; v32 = 0LL; v53 = 0LL; } else { v32 = a5[2]; v57 = a5[3]; v53 = v32 & 0xFFFFFFFF00000000LL; v32 = (unsigned int)v32; } v33 = a3; v34 = 0; v35 = -1; if ( (v51 & 0xFFFFFFFE) == 2 ) v30 = v24 - 1; else v35 = v24; v52 = v35; if ( v30 != v35 ) { LOBYTE(v34) = (v51 & 0xFFFFFFFE) != 2; v56 = 2 * v34 - 1; v54 = v32 | v53; while ( 1 ) { PropertyValue = JS_GetPropertyValue(a1, a2, v33, v30, 0LL, v27, a7, a8, a9, a10, v28, v29, a13, a14); v40 = PropertyValue; v41 = v37; if ( (_DWORD)v37 == 6 ) goto LABEL_35; v60[0] = PropertyValue; v60[1] = v37; v60[2] = v30; v60[3] = 0LL; v60[4] = a2; v60[5] = v33; v59.m128i_i32[0] = 0; v59.m128i_i64[1] = 3LL; a7 = (__m128)v59; v42 = JS_CallInternal( a1, v25, v58, v54, v57, 3LL, v59, a8, a9, a10, v38, v39, a13, a14, v59.m128i_i8[0], 3, (long long)v60, 2u); if ( v43 == 6 ) { LABEL_35: if ( v41 >= 0xFFFFFFF7 ) { v46 = *(_QWORD *)(a1 + 24); v47 = (*(_DWORD *)v40)--; if ( v47 <= 1 ) js_free_value_rt(v46, (_QWORD *)v40, v41); } goto LABEL_3; } if ( (unsigned int)JS_ToBoolFree(a1, v42, v43) ) break; if ( v41 >= 0xFFFFFFF7 ) { v44 = *(_QWORD *)(a1 + 24); v45 = (*(_DWORD *)v40)--; if ( v45 <= 1 ) js_free_value_rt(v44, (_QWORD *)v40, v41); } v30 += v56; v33 = a3; if ( v52 == v30 ) goto LABEL_11; } if ( (v51 | 2) != 3 ) { v31 = v40 & 0xFFFFFFFF00000000LL; v30 = v40; return v31 | v30; } if ( v41 >= 0xFFFFFFF7 ) { v49 = *(_QWORD *)(a1 + 24); v50 = (*(_DWORD *)v40)--; if ( v50 <= 1 ) js_free_value_rt(v49, (_QWORD *)v40, v41); } goto LABEL_13; } LABEL_11: if ( (v51 | 2) == 3 ) { v30 = -1; LABEL_13: v31 = 0LL; return v31 | v30; } LABEL_26: v30 = 0; v31 = 0LL; return v31 | v30; } LABEL_3: v30 = 0; v31 = 0LL; return v31 | v30; }
js_typed_array_find: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV EBX,R9D MOV RBP,R8 MOV R12D,ECX MOV R13,RSI MOV R15,RDI MOV qword ptr [RSP + 0x38],RDX CALL 0x0017a99c MOV EDX,0x6 TEST EAX,EAX JS 0x00184016 MOV R14D,EAX MOV dword ptr [RSP + 0x24],EBX MOV qword ptr [RSP + 0x28],R13 MOV R13,qword ptr [RBP] MOV RBX,qword ptr [RBP + 0x8] MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX CALL 0x00142f63 TEST EAX,EAX JZ 0x00183e3c LAB_00183e2e: XOR EBX,EBX XOR ECX,ECX MOV EDX,0x6 JMP 0x0018401a LAB_00183e3c: MOV qword ptr [RSP + 0x50],RBX MOV qword ptr [RSP + 0x58],R13 XOR EBX,EBX CMP R12D,0x2 JL 0x00183e71 MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RBP + 0x18] MOV qword ptr [RSP + 0x48],RCX MOV RCX,-0x100000000 AND RCX,RAX MOV qword ptr [RSP + 0x30],RCX MOV EAX,EAX JMP 0x00183e86 LAB_00183e71: MOV EAX,0x3 MOV qword ptr [RSP + 0x48],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x30],0x0 LAB_00183e86: MOV R12,qword ptr [RSP + 0x38] MOV R13,qword ptr [RSP + 0x28] MOV EDI,dword ptr [RSP + 0x24] AND EDI,0xfffffffe LEA ESI,[R14 + -0x1] XOR ECX,ECX CMP EDI,0x2 MOV R8D,0xffffffff CMOVNZ R8D,R14D SETNZ DIL CMOVZ EBX,ESI MOV dword ptr [RSP + 0x28],R8D CMP EBX,R8D JNZ 0x00183ed9 LAB_00183ebb: MOV EAX,dword ptr [RSP + 0x24] OR EAX,0x2 CMP EAX,0x3 JNZ 0x00184011 MOV EBX,0xffffffff LAB_00183ed0: XOR ECX,ECX XOR EDX,EDX JMP 0x0018401a LAB_00183ed9: MOV CL,DIL LEA ECX,[-0x1 + RCX*0x2] MOV dword ptr [RSP + 0x44],ECX OR qword ptr [RSP + 0x30],RAX LAB_00183eec: MOV EBX,EBX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,RBX XOR R8D,R8D CALL 0x001416b3 MOV RBP,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x00183fe1 MOV qword ptr [RSP + 0x70],RBP MOV qword ptr [RSP + 0x78],R14 MOV qword ptr [RSP + 0x80],RBX MOV qword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],R13 MOV qword ptr [RSP + 0x98],R12 MOV dword ptr [RSP + 0x60],0x0 MOV qword ptr [RSP + 0x68],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x2 MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x48] MOV R9D,0x3 CALL 0x00128b06 CMP EDX,0x6 JZ 0x00183fe1 MOV RDI,R15 MOV RSI,RAX CALL 0x0012356a TEST EAX,EAX JNZ 0x00184031 CMP R14D,-0x9 JC 0x00183fc9 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00183fc9 MOV RSI,RBP MOV RDX,R14 CALL 0x001219cc LAB_00183fc9: ADD EBX,dword ptr [RSP + 0x44] CMP dword ptr [RSP + 0x28],EBX MOV R12,qword ptr [RSP + 0x38] JNZ 0x00183eec JMP 0x00183ebb LAB_00183fe1: CMP R14D,-0x9 JC 0x00183e2e MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00183e2e MOV RSI,RBP MOV RDX,R14 CALL 0x001219cc JMP 0x00183e2e LAB_00184011: MOV EDX,0x3 LAB_00184016: XOR EBX,EBX XOR ECX,ECX LAB_0018401a: MOV EAX,EBX OR RAX,RCX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00184031: MOV EAX,dword ptr [RSP + 0x24] OR EAX,0x2 CMP EAX,0x3 JNZ 0x0018406d CMP R14D,-0x9 JC 0x00183ed0 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00183ed0 MOV RSI,RBP MOV RDX,R14 CALL 0x001219cc JMP 0x00183ed0 LAB_0018406d: MOV RAX,-0x100000000 MOV RCX,RBP AND RCX,RAX MOV RBX,RBP MOV RDX,R14 JMP 0x0018401a
int1 [16] js_typed_array_find(long param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5,uint param_6) { int8 uVar1; int8 uVar2; int8 uVar3; int1 auVar4 [16]; uint uVar5; int iVar6; ulong uVar8; ulong uVar9; uint uVar11; bool bVar12; int1 auVar13 [12]; int1 auVar14 [16]; int1 auVar15 [16]; ulong local_a8; int8 local_90; int1 local_68 [16]; ulong local_58; int8 local_50; int8 local_48; int8 local_40; int *piVar7; int8 uVar10; uVar5 = js_typed_array_get_length_unsafe(); uVar9 = 6; if (-1 < (int)uVar5) { uVar1 = *param_5; uVar2 = param_5[1]; iVar6 = check_function(param_1,uVar1,uVar2); if (iVar6 != 0) { LAB_00183e2e: uVar8 = 0; auVar14 = ZEXT816(6) << 0x40; goto LAB_0018401a; } uVar9 = 0; if (param_4 < 2) { local_90 = 3; uVar8 = 0; local_a8 = 0; } else { local_90 = param_5[3]; local_a8 = param_5[2] & 0xffffffff00000000; uVar8 = param_5[2] & 0xffffffff; } bVar12 = (param_6 & 0xfffffffe) != 2; if (!bVar12) { uVar9 = (ulong)(uVar5 - 1); uVar5 = 0xffffffff; } if ((uint)uVar9 != uVar5) { do { auVar14 = JS_GetPropertyValue(param_1,param_2,param_3,uVar9,0); uVar10 = auVar14._8_8_; piVar7 = auVar14._0_8_; uVar11 = auVar14._8_4_; if (uVar11 == 6) { LAB_00183fe1: if (0xfffffff6 < uVar11) { uVar1 = *(int8 *)(param_1 + 0x18); iVar6 = *piVar7; *piVar7 = iVar6 + -1; if (iVar6 < 2) { js_free_value_rt(uVar1,piVar7,uVar10); } } goto LAB_00183e2e; } local_50 = 0; local_58 = uVar9; local_48 = param_2; local_40 = param_3; local_68 = auVar14; auVar13 = JS_CallInternal(param_1,uVar1,uVar2,local_a8 | uVar8,local_90,3,0,3,local_68,2); if (auVar13._8_4_ == 6) goto LAB_00183fe1; iVar6 = JS_ToBoolFree(param_1,auVar13._0_8_); if (iVar6 != 0) { if ((param_6 | 2) == 3) { if (0xfffffff6 < uVar11) { uVar1 = *(int8 *)(param_1 + 0x18); iVar6 = *piVar7; *piVar7 = iVar6 + -1; if (iVar6 < 2) { js_free_value_rt(uVar1,piVar7,uVar10); } } goto LAB_00183ed0; } uVar8 = (ulong)piVar7 & 0xffffffff00000000; goto LAB_0018401a; } if (0xfffffff6 < uVar11) { uVar3 = *(int8 *)(param_1 + 0x18); iVar6 = *piVar7; *piVar7 = iVar6 + -1; if (iVar6 < 2) { js_free_value_rt(uVar3,piVar7,uVar10); } } uVar11 = (int)uVar9 + (uint)bVar12 * 2 + -1; uVar9 = (ulong)uVar11; } while (uVar5 != uVar11); } if ((param_6 | 2) == 3) { uVar9 = 0xffffffff; LAB_00183ed0: uVar8 = 0; auVar14._8_8_ = 0; auVar14._0_8_ = uVar9; goto LAB_0018401a; } uVar9 = 3; } auVar4._8_8_ = 0; auVar4._0_8_ = uVar9; auVar14 = auVar4 << 0x40; uVar8 = 0; LAB_0018401a: auVar15._8_8_ = auVar14._8_8_; auVar15._0_8_ = auVar14._0_8_ & 0xffffffff | uVar8; return auVar15; }
61,456
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/primitive_field.cc
void PrimitiveFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); format( "$deprecated_attr$$type$ ${1$$name$$}$() const;\n" "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n" "private:\n" "$type$ ${1$_internal_$name$$}$() const;\n" "void ${1$_internal_set_$name$$}$($type$ value);\n" "public:\n", descriptor_); }
O0
cpp
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations(google::protobuf::io::Printer*) const: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rdx movq %rdx, (%rsp) movq 0x58(%rsp), %rsi addq $0x18, %rdx leaq 0x20(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xdf0d0 movq (%rsp), %rdx movq 0x8(%rsp), %rdi addq $0x8, %rdx leaq 0x24b612(%rip), %rsi # 0x3daa45 callq 0x10e250 jmp 0x18f43a leaq 0x20(%rsp), %rdi callq 0xdf130 addq $0x68, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x20(%rsp), %rdi callq 0xdf130 movq 0x18(%rsp), %rdi callq 0x21700 nopl (%rax,%rax)
_ZNK6google8protobuf8compiler3cpp23PrimitiveFieldGenerator28GenerateAccessorDeclarationsEPNS0_2io7PrinterE: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov rdx, [rsp+68h+var_8] mov [rsp+68h+var_68], rdx mov rsi, [rsp+68h+var_10] add rdx, 18h lea rdi, [rsp+68h+var_48] mov [rsp+68h+var_60], rdi call _ZN6google8protobuf8compiler3cpp9FormatterC2EPNS0_2io7PrinterERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEE; google::protobuf::compiler::cpp::Formatter::Formatter(google::protobuf::io::Printer *,std::map<std::string,std::string> const&) mov rdx, [rsp+68h+var_68] mov rdi, [rsp+68h+var_60] add rdx, 8 lea rsi, aDeprecatedAttr_10; "$deprecated_attr$$type$ ${1$$name$$}$()"... call _ZNK6google8protobuf8compiler3cpp9FormatterclIJPKNS0_15FieldDescriptorEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::FieldDescriptor const*>(char const*,google::protobuf::FieldDescriptor const* const&) jmp short $+2 loc_18F43A: lea rdi, [rsp+68h+var_48]; this call _ZN6google8protobuf8compiler3cpp9FormatterD2Ev; google::protobuf::compiler::cpp::Formatter::~Formatter() add rsp, 68h retn mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_18]; this call _ZN6google8protobuf8compiler3cpp9FormatterD2Ev; google::protobuf::compiler::cpp::Formatter::~Formatter() mov rdi, [rsp+arg_10] call __Unwind_Resume
void google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations( google::protobuf::compiler::cpp::PrimitiveFieldGenerator *this, google::protobuf::io::Printer *a2, long long a3, long long a4, long long a5, long long a6) { _QWORD v6[9]; // [rsp+20h] [rbp-48h] BYREF v6[8] = this; v6[7] = a2; google::protobuf::compiler::cpp::Formatter::Formatter(v6, (long long)a2, (long long)this + 24, a4, a5, a6); google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::FieldDescriptor const*>( v6, (long long)"$deprecated_attr$$type$ ${1$$name$$}$() const;\n" "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n" "private:\n" "$type$ ${1$_internal_$name$$}$() const;\n" "void ${1$_internal_set_$name$$}$($type$ value);\n" "public:\n", (_QWORD *)this + 1); google::protobuf::compiler::cpp::Formatter::~Formatter((google::protobuf::compiler::cpp::Formatter *)v6); }
__relocate_object_a<std::pair<int,std::__cxx11::string>,std::pair<int,std::__cxx11::string>,std::allocator<std::pair<int,std::__cxx11::string>>>: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP],RDX MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0018ed70 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0018f430 ADD RSP,0x18 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* void std::__relocate_object_a<std::pair<int, std::__cxx11::string >, std::pair<int, std::__cxx11::string >, std::allocator<std::pair<int, std::__cxx11::string > > >(std::pair<int, std::__cxx11::string >*, std::pair<int, std::__cxx11::string >*, std::allocator<std::pair<int, std::__cxx11::string > >&) */ void std:: __relocate_object_a<std::pair<int,std::__cxx11::string>,std::pair<int,std::__cxx11::string>,std::allocator<std::pair<int,std::__cxx11::string>>> (pair *param_1,pair *param_2,allocator *param_3) { allocator_traits<std::allocator<std::pair<int,std::__cxx11::string>>>:: construct<std::pair<int,std::__cxx11::string>,std::pair<int,std::__cxx11::string>> (param_3,param_1,param_2); allocator_traits<std::allocator<std::pair<int,std::__cxx11::string>>>:: destroy<std::pair<int,std::__cxx11::string>>(param_3,param_2); return; }
61,457
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/primitive_field.cc
void PrimitiveFieldGenerator::GenerateAccessorDeclarations( io::Printer* printer) const { Formatter format(printer, variables_); format( "$deprecated_attr$$type$ ${1$$name$$}$() const;\n" "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n" "private:\n" "$type$ ${1$_internal_$name$$}$() const;\n" "void ${1$_internal_set_$name$$}$($type$ value);\n" "public:\n", descriptor_); }
O3
cpp
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations(google::protobuf::io::Printer*) const: pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %r14 leaq 0x18(%rdi), %rax leaq 0x8(%rsp), %rbx movq %rsi, -0x8(%rbx) movq %rbx, %rdi movq %rax, %rsi callq 0x7e61e addq $0x8, %r14 leaq 0x1014a5(%rip), %rsi # 0x1cb9f2 movq %rsp, %rdi movq %r14, %rdx callq 0x8f96c movq %rbx, %rdi callq 0x2e5e0 addq $0x38, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x2e5e0 movq %r14, %rdi callq 0x1f860 nop
_ZNK6google8protobuf8compiler3cpp23PrimitiveFieldGenerator28GenerateAccessorDeclarationsEPNS0_2io7PrinterE: push r14 push rbx sub rsp, 38h mov r14, rdi lea rax, [rdi+18h] lea rbx, [rsp+48h+var_40] mov [rbx-8], rsi mov rdi, rbx mov rsi, rax call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&) add r14, 8 lea rsi, aDeprecatedAttr_8; "$deprecated_attr$$type$ ${1$$name$$}$()"... mov rdi, rsp mov rdx, r14 call _ZNK6google8protobuf8compiler3cpp9FormatterclIJPKNS0_15FieldDescriptorEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::FieldDescriptor const*>(char const*,google::protobuf::FieldDescriptor const* const&) mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() add rsp, 38h pop rbx pop r14 retn mov r14, rax mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
void google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations( google::protobuf::compiler::cpp::PrimitiveFieldGenerator *this, google::protobuf::io::Printer *a2) { int v2; // ecx int v3; // r8d int v4; // r9d google::protobuf::io::Printer *v5; // [rsp+0h] [rbp-48h] BYREF _BYTE v6[64]; // [rsp+8h] [rbp-40h] BYREF v5 = a2; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree( (long long)v6, (long long)this + 24); google::protobuf::compiler::cpp::Formatter::operator()<google::protobuf::FieldDescriptor const*>( &v5, (long long)"$deprecated_attr$$type$ ${1$$name$$}$() const;\n" "$deprecated_attr$void ${1$set_$name$$}$($type$ value);\n" "private:\n" "$type$ ${1$_internal_$name$$}$() const;\n" "void ${1$_internal_set_$name$$}$($type$ value);\n" "public:\n", (_QWORD *)this + 1, v2, v3, v4); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v6); }
GenerateAccessorDeclarations: PUSH R14 PUSH RBX SUB RSP,0x38 MOV R14,RDI LEA RAX,[RDI + 0x18] LEA RBX,[RSP + 0x8] MOV qword ptr [RBX + -0x8],RSI MOV RDI,RBX MOV RSI,RAX CALL 0x0017e61e ADD R14,0x8 LAB_001ca546: LEA RSI,[0x2cb9f2] MOV RDI,RSP MOV RDX,R14 CALL 0x0018f96c LAB_001ca558: MOV RDI,RBX CALL 0x0012e5e0 ADD RSP,0x38 POP RBX POP R14 RET
/* google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateAccessorDeclarations (PrimitiveFieldGenerator *this,Printer *param_1) { Printer *local_48; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_40 [48]; local_48 = param_1; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18)); /* try { // try from 001ca546 to 001ca557 has its CatchHandler @ 001ca568 */ Formatter::operator() ((Formatter *)&local_48, "$deprecated_attr$$type$ ${1$$name$$}$() const;\n$deprecated_attr$void ${1$set_$name$$}$($type$ value);\nprivate:\n$type$ ${1$_internal_$name$$}$() const;\nvoid ${1$_internal_set_$name$$}$($type$ value);\npublic:\n" ,(FieldDescriptor **)(this + 8)); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_40); return; }
61,458
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O0
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x127f90 movl %eax, %ecx movq -0x10(%rbp), %rax orl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x95(%rax) movq -0x10(%rbp), %rax movb $0x20, 0xb0(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x128d52 movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x128d52 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x128d52 movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x128d58 movb $0x1, -0x1(%rbp) jmp 0x128d68 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x128e40 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_cset_init_8bit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call my_8bit_charset_flags_from_data mov ecx, eax mov rax, [rbp+var_10] or ecx, [rax+0Ch] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+95h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+0B0h], 20h ; ' ' mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_128D52 mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_128D52 mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_128D52 mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_128D58 loc_128D52: mov [rbp+var_1], 1 jmp short loc_128D68 loc_128D58: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call create_fromuni mov [rbp+var_1], al loc_128D68: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { *(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1); *(_BYTE *)(a1 + 148) = 1; *(_BYTE *)(a1 + 149) = 1; *(_BYTE *)(a1 + 176) = 32; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) ) return create_fromuni(a1, a2); else return 1; }
61,459
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O3
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1808, %rsp # imm = 0x1808 movq %rsi, -0x30(%rbp) movq %rdi, %rbx movq 0x68(%rdi), %r15 xorl %eax, %eax testq %r15, %r15 je 0xbf1c1 xorl %ecx, %ecx cmpw $0x80, (%r15,%rcx,2) jae 0xbf1a2 incq %rcx cmpq $0x100, %rcx # imm = 0x100 jne 0xbf188 movl $0x1000, %eax # imm = 0x1000 xorl %ecx, %ecx movzwl (%r15,%rcx,2), %edx cmpq %rdx, %rcx jne 0xbf1bc incq %rcx cmpq $0x80, %rcx jne 0xbf1a4 jmp 0xbf1c1 orl $0x2000, %eax # imm = 0x2000 orl %eax, 0xc(%rbx) movw $0x101, 0x94(%rbx) # imm = 0x101 movb $0x20, 0xb0(%rbx) movb $0x1, %al cmpq $0x0, 0x48(%rbx) je 0xbf3b1 cmpq $0x0, 0x50(%rbx) je 0xbf3b1 testq %r15, %r15 je 0xbf3b1 cmpq $0x0, 0x40(%rbx) je 0xbf3b1 leaq -0x1830(%rbp), %rdi xorl %r12d, %r12d movl $0x1800, %edx # imm = 0x1800 xorl %esi, %esi callq 0x2a290 movzwl (%r15,%r12,2), %eax testq %rax, %rax sete %cl testq %r12, %r12 setne %dl testb %cl, %dl jne 0xbf26e movl %eax, %ecx shrl $0x8, %ecx leaq (%rcx,%rcx,2), %rcx leaq -0x1830(,%rcx,8), %rcx addq %rbp, %rcx movl (%rcx), %edx testl %edx, %edx je 0xbf262 movl 0x8(%rcx), %esi movl %eax, %edi cmpw %si, %ax jb 0xbf251 movl %esi, %edi movw %di, 0x8(%rcx) movzwl 0xa(%rcx), %esi cmpw %si, %ax ja 0xbf266 movl %esi, %eax jmp 0xbf266 movw %ax, 0x8(%rcx) movw %ax, 0xa(%rcx) incl %edx movl %edx, (%rcx) incq %r12 cmpq $0x100, %r12 # imm = 0x100 jne 0xbf216 leaq 0x1b0(%rip), %rcx # 0xbf431 leaq -0x1830(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx callq 0x2a5c0 xorl %r13d, %r13d leaq (,%r13,2), %rax addq %r13, %rax cmpl $0x0, -0x1830(%rbp,%rax,8) je 0xbf348 leaq -0x1830(,%rax,8), %r14 addq %rbp, %r14 movzwl 0xa(%r14), %r12d movzwl 0x8(%r14), %eax subq %rax, %r12 incq %r12 movq %r12, %rdi movq -0x30(%rbp), %rax callq *0x80(%rax) movq %rax, 0x10(%r14) testq %rax, %rax je 0xbf39c movq %rax, %r15 movq %rax, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x2a290 movl $0x1, %eax movq 0x68(%rbx), %rcx movzwl (%rcx,%rax,2), %ecx movzwl 0x8(%r14), %edx cmpw %dx, %cx jb 0xbf327 leal -0x1(%rcx), %esi cmpw 0xa(%r14), %si jae 0xbf327 subq %rdx, %rcx cmpb $0x0, (%r15,%rcx) jg 0xbf327 movb %al, (%r15,%rcx) incq %rax cmpq $0x100, %rax # imm = 0x100 jne 0xbf2fd incq %r13 cmpq $0x100, %r13 # imm = 0x100 jne 0xbf29a movl $0x100, %r13d # imm = 0x100 movl %r13d, %r14d movq %r14, %rdi shlq $0x4, %rdi addq $0x10, %rdi movq -0x30(%rbp), %rax callq *0x80(%rax) movq %rax, 0x70(%rbx) testq %rax, %rax je 0xbf39c testl %r13d, %r13d je 0xbf3a0 movq %r14, %rax shlq $0x4, %rax leaq -0x1828(%rbp), %rcx xorl %edx, %edx movq 0x70(%rbx), %rsi movups (%rcx), %xmm0 movups %xmm0, (%rsi,%rdx) addq $0x10, %rdx addq $0x18, %rcx cmpq %rdx, %rax jne 0xbf37e movq 0x70(%rbx), %rax jmp 0xbf3a3 movb $0x1, %al jmp 0xbf3b1 xorl %r14d, %r14d shlq $0x4, %r14 xorps %xmm0, %xmm0 movups %xmm0, (%rax,%r14) xorl %eax, %eax addq $0x1808, %rsp # imm = 0x1808 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_cset_init_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1808h mov [rbp+var_30], rsi mov rbx, rdi mov r15, [rdi+68h] xor eax, eax test r15, r15 jz short loc_BF1C1 xor ecx, ecx loc_BF188: cmp word ptr [r15+rcx*2], 80h jnb short loc_BF1A2 inc rcx cmp rcx, 100h jnz short loc_BF188 mov eax, 1000h loc_BF1A2: xor ecx, ecx loc_BF1A4: movzx edx, word ptr [r15+rcx*2] cmp rcx, rdx jnz short loc_BF1BC inc rcx cmp rcx, 80h jnz short loc_BF1A4 jmp short loc_BF1C1 loc_BF1BC: or eax, 2000h loc_BF1C1: or [rbx+0Ch], eax mov word ptr [rbx+94h], 101h mov byte ptr [rbx+0B0h], 20h ; ' ' mov al, 1 cmp qword ptr [rbx+48h], 0 jz loc_BF3B1 cmp qword ptr [rbx+50h], 0 jz loc_BF3B1 test r15, r15 jz loc_BF3B1 cmp qword ptr [rbx+40h], 0 jz loc_BF3B1 lea rdi, [rbp+var_1830] xor r12d, r12d mov edx, 1800h xor esi, esi call _memset loc_BF216: movzx eax, word ptr [r15+r12*2] test rax, rax setz cl test r12, r12 setnz dl test dl, cl jnz short loc_BF26E mov ecx, eax shr ecx, 8 lea rcx, [rcx+rcx*2] lea rcx, ds:0FFFFFFFFFFFFE7D0h[rcx*8] add rcx, rbp mov edx, [rcx] test edx, edx jz short loc_BF262 mov esi, [rcx+8] mov edi, eax cmp ax, si jb short loc_BF251 mov edi, esi loc_BF251: mov [rcx+8], di movzx esi, word ptr [rcx+0Ah] cmp ax, si ja short loc_BF266 mov eax, esi jmp short loc_BF266 loc_BF262: mov [rcx+8], ax loc_BF266: mov [rcx+0Ah], ax inc edx mov [rcx], edx loc_BF26E: inc r12 cmp r12, 100h jnz short loc_BF216 lea rcx, pcmp lea rdi, [rbp+var_1830] mov esi, 100h mov edx, 18h call _qsort xor r13d, r13d loc_BF29A: lea rax, ds:0[r13*2] add rax, r13 cmp [rbp+rax*8+var_1830], 0 jz loc_BF348 lea r14, ds:0FFFFFFFFFFFFE7D0h[rax*8] add r14, rbp movzx r12d, word ptr [r14+0Ah] movzx eax, word ptr [r14+8] sub r12, rax inc r12 mov rdi, r12 mov rax, [rbp+var_30] call qword ptr [rax+80h] mov [r14+10h], rax test rax, rax jz loc_BF39C mov r15, rax mov rdi, rax xor esi, esi mov rdx, r12 call _memset mov eax, 1 loc_BF2FD: mov rcx, [rbx+68h] movzx ecx, word ptr [rcx+rax*2] movzx edx, word ptr [r14+8] cmp cx, dx jb short loc_BF327 lea esi, [rcx-1] cmp si, [r14+0Ah] jnb short loc_BF327 sub rcx, rdx cmp byte ptr [r15+rcx], 0 jg short loc_BF327 mov [r15+rcx], al loc_BF327: inc rax cmp rax, 100h jnz short loc_BF2FD inc r13 cmp r13, 100h jnz loc_BF29A mov r13d, 100h loc_BF348: mov r14d, r13d mov rdi, r14 shl rdi, 4 add rdi, 10h mov rax, [rbp+var_30] call qword ptr [rax+80h] mov [rbx+70h], rax test rax, rax jz short loc_BF39C test r13d, r13d jz short loc_BF3A0 mov rax, r14 shl rax, 4 lea rcx, [rbp+var_1828] xor edx, edx loc_BF37E: mov rsi, [rbx+70h] movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi+rdx], xmm0 add rdx, 10h add rcx, 18h cmp rax, rdx jnz short loc_BF37E mov rax, [rbx+70h] jmp short loc_BF3A3 loc_BF39C: mov al, 1 jmp short loc_BF3B1 loc_BF3A0: xor r14d, r14d loc_BF3A3: shl r14, 4 xorps xmm0, xmm0 movups xmmword ptr [rax+r14], xmm0 xor eax, eax loc_BF3B1: add rsp, 1808h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { long long v3; // r15 int v4; // eax long long v5; // rcx long long v6; // rcx char result; // al long long v8; // r12 long long v9; // rax long long *v10; // rcx int v11; // edx __int16 v12; // di long long v13; // r13 long long *v14; // r14 unsigned long long v15; // r12 long long v16; // rax long long v17; // r15 long long i; // rax long long v19; // rcx long long v20; // rdx long long v21; // rcx long long v22; // r14 long long v23; // rax char *v24; // rcx long long v25; // rdx _DWORD v26[2]; // [rsp+0h] [rbp-1830h] BYREF char v27; // [rsp+8h] [rbp-1828h] BYREF long long v28; // [rsp+1800h] [rbp-30h] long long savedregs; // [rsp+1830h] [rbp+0h] BYREF _UNKNOWN *retaddr; // [rsp+1838h] [rbp+8h] v28 = a2; v3 = *(_QWORD *)(a1 + 104); v4 = 0; if ( v3 ) { v5 = 0LL; while ( *(_WORD *)(v3 + 2 * v5) < 0x80u ) { if ( ++v5 == 256 ) { v4 = 4096; break; } } v6 = 0LL; while ( v6 == *(unsigned __int16 *)(v3 + 2 * v6) ) { if ( ++v6 == 128 ) goto LABEL_11; } v4 |= 0x2000u; } LABEL_11: *(_DWORD *)(a1 + 12) |= v4; *(_WORD *)(a1 + 148) = 257; *(_BYTE *)(a1 + 176) = 32; result = 1; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && v3 && *(_QWORD *)(a1 + 64) ) { v8 = 0LL; memset(v26, 0LL, 6144LL); do { v9 = *(unsigned __int16 *)(v3 + 2 * v8); if ( v9 != 0 || v8 == 0 ) { v10 = &savedregs + 3 * ((unsigned int)v9 >> 8) - 774; v11 = *(_DWORD *)v10; if ( *(_DWORD *)v10 ) { v12 = *(_WORD *)(v3 + 2 * v8); if ( (unsigned __int16)v9 >= (unsigned __int16)*((_DWORD *)v10 + 2) ) v12 = *((_DWORD *)v10 + 2); *((_WORD *)v10 + 4) = v12; if ( (unsigned __int16)v9 <= *((_WORD *)v10 + 5) ) LOWORD(v9) = *((_WORD *)v10 + 5); } else { *((_WORD *)v10 + 4) = v9; } *((_WORD *)v10 + 5) = v9; *(_DWORD *)v10 = v11 + 1; } ++v8; } while ( v8 != 256 ); qsort(v26, 256LL, 24LL, pcmp); v13 = 0LL; while ( v26[6 * v13] ) { v14 = &savedregs + 3 * v13 - 774; v15 = *((unsigned __int16 *)&retaddr + 12 * v13 - 3095) - (unsigned long long)*((unsigned __int16 *)&retaddr + 12 * v13 - 3096) + 1; v16 = (*(long long ( **)(unsigned long long))(v28 + 128))(v15); v14[2] = v16; if ( !v16 ) return 1; v17 = v16; memset(v16, 0LL, v15); for ( i = 1LL; i != 256; ++i ) { v19 = *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i); v20 = *((unsigned __int16 *)v14 + 4); if ( (unsigned __int16)v19 >= (unsigned __int16)v20 && (unsigned __int16)(v19 - 1) < *((_WORD *)v14 + 5) ) { v21 = v19 - v20; if ( *(char *)(v17 + v21) <= 0 ) *(_BYTE *)(v17 + v21) = i; } } if ( ++v13 == 256 ) { LODWORD(v13) = 256; break; } } v22 = (unsigned int)v13; v23 = (*(long long ( **)(long long))(v28 + 128))(16LL * (unsigned int)v13 + 16); *(_QWORD *)(a1 + 112) = v23; if ( !v23 ) return 1; if ( (_DWORD)v13 ) { v24 = &v27; v25 = 0LL; do { *(_OWORD *)(*(_QWORD *)(a1 + 112) + v25) = *(_OWORD *)v24; v25 += 16LL; v24 += 24; } while ( 16LL * (unsigned int)v13 != v25 ); v23 = *(_QWORD *)(a1 + 112); } else { v22 = 0LL; } *(_OWORD *)(v23 + 16 * v22) = 0LL; return 0; } return result; }
my_cset_init_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1808 MOV qword ptr [RBP + -0x30],RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x68] XOR EAX,EAX TEST R15,R15 JZ 0x001bf1c1 XOR ECX,ECX LAB_001bf188: CMP word ptr [R15 + RCX*0x2],0x80 JNC 0x001bf1a2 INC RCX CMP RCX,0x100 JNZ 0x001bf188 MOV EAX,0x1000 LAB_001bf1a2: XOR ECX,ECX LAB_001bf1a4: MOVZX EDX,word ptr [R15 + RCX*0x2] CMP RCX,RDX JNZ 0x001bf1bc INC RCX CMP RCX,0x80 JNZ 0x001bf1a4 JMP 0x001bf1c1 LAB_001bf1bc: OR EAX,0x2000 LAB_001bf1c1: OR dword ptr [RBX + 0xc],EAX MOV word ptr [RBX + 0x94],0x101 MOV byte ptr [RBX + 0xb0],0x20 MOV AL,0x1 CMP qword ptr [RBX + 0x48],0x0 JZ 0x001bf3b1 CMP qword ptr [RBX + 0x50],0x0 JZ 0x001bf3b1 TEST R15,R15 JZ 0x001bf3b1 CMP qword ptr [RBX + 0x40],0x0 JZ 0x001bf3b1 LEA RDI,[RBP + -0x1830] XOR R12D,R12D MOV EDX,0x1800 XOR ESI,ESI CALL 0x0012a290 LAB_001bf216: MOVZX EAX,word ptr [R15 + R12*0x2] TEST RAX,RAX SETZ CL TEST R12,R12 SETNZ DL TEST DL,CL JNZ 0x001bf26e MOV ECX,EAX SHR ECX,0x8 LEA RCX,[RCX + RCX*0x2] LEA RCX,[-0x1830 + RCX*0x8] ADD RCX,RBP MOV EDX,dword ptr [RCX] TEST EDX,EDX JZ 0x001bf262 MOV ESI,dword ptr [RCX + 0x8] MOV EDI,EAX CMP AX,SI JC 0x001bf251 MOV EDI,ESI LAB_001bf251: MOV word ptr [RCX + 0x8],DI MOVZX ESI,word ptr [RCX + 0xa] CMP AX,SI JA 0x001bf266 MOV EAX,ESI JMP 0x001bf266 LAB_001bf262: MOV word ptr [RCX + 0x8],AX LAB_001bf266: MOV word ptr [RCX + 0xa],AX INC EDX MOV dword ptr [RCX],EDX LAB_001bf26e: INC R12 CMP R12,0x100 JNZ 0x001bf216 LEA RCX,[0x1bf431] LEA RDI,[RBP + -0x1830] MOV ESI,0x100 MOV EDX,0x18 CALL 0x0012a5c0 XOR R13D,R13D LAB_001bf29a: LEA RAX,[R13*0x2] ADD RAX,R13 CMP dword ptr [RBP + RAX*0x8 + -0x1830],0x0 JZ 0x001bf348 LEA R14,[-0x1830 + RAX*0x8] ADD R14,RBP MOVZX R12D,word ptr [R14 + 0xa] MOVZX EAX,word ptr [R14 + 0x8] SUB R12,RAX INC R12 MOV RDI,R12 MOV RAX,qword ptr [RBP + -0x30] CALL qword ptr [RAX + 0x80] MOV qword ptr [R14 + 0x10],RAX TEST RAX,RAX JZ 0x001bf39c MOV R15,RAX MOV RDI,RAX XOR ESI,ESI MOV RDX,R12 CALL 0x0012a290 MOV EAX,0x1 LAB_001bf2fd: MOV RCX,qword ptr [RBX + 0x68] MOVZX ECX,word ptr [RCX + RAX*0x2] MOVZX EDX,word ptr [R14 + 0x8] CMP CX,DX JC 0x001bf327 LEA ESI,[RCX + -0x1] CMP SI,word ptr [R14 + 0xa] JNC 0x001bf327 SUB RCX,RDX CMP byte ptr [R15 + RCX*0x1],0x0 JG 0x001bf327 MOV byte ptr [R15 + RCX*0x1],AL LAB_001bf327: INC RAX CMP RAX,0x100 JNZ 0x001bf2fd INC R13 CMP R13,0x100 JNZ 0x001bf29a MOV R13D,0x100 LAB_001bf348: MOV R14D,R13D MOV RDI,R14 SHL RDI,0x4 ADD RDI,0x10 MOV RAX,qword ptr [RBP + -0x30] CALL qword ptr [RAX + 0x80] MOV qword ptr [RBX + 0x70],RAX TEST RAX,RAX JZ 0x001bf39c TEST R13D,R13D JZ 0x001bf3a0 MOV RAX,R14 SHL RAX,0x4 LEA RCX,[RBP + -0x1828] XOR EDX,EDX LAB_001bf37e: MOV RSI,qword ptr [RBX + 0x70] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI + RDX*0x1],XMM0 ADD RDX,0x10 ADD RCX,0x18 CMP RAX,RDX JNZ 0x001bf37e MOV RAX,qword ptr [RBX + 0x70] JMP 0x001bf3a3 LAB_001bf39c: MOV AL,0x1 JMP 0x001bf3b1 LAB_001bf3a0: XOR R14D,R14D LAB_001bf3a3: SHL R14,0x4 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + R14*0x1],XMM0 XOR EAX,EAX LAB_001bf3b1: ADD RSP,0x1808 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_cset_init_8bit(long param_1,long param_2) { int8 *puVar1; int iVar2; ushort uVar3; uint uVar4; int8 uVar5; void *__s; long lVar6; long lVar7; ulong uVar8; ushort *puVar9; ushort uVar10; size_t __n; ulong uVar11; int local_1838 [2]; ushort local_1830 [4]; int8 auStack_1828 [766]; long local_38; lVar6 = *(long *)(param_1 + 0x68); uVar4 = 0; if (lVar6 != 0) { lVar7 = 0; do { if (0x7f < *(ushort *)(lVar6 + lVar7 * 2)) goto LAB_001bf1a2; lVar7 = lVar7 + 1; } while (lVar7 != 0x100); uVar4 = 0x1000; LAB_001bf1a2: uVar8 = 0; do { if (uVar8 != *(ushort *)(lVar6 + uVar8 * 2)) { uVar4 = uVar4 | 0x2000; break; } uVar8 = uVar8 + 1; } while (uVar8 != 0x80); } *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | uVar4; *(int2 *)(param_1 + 0x94) = 0x101; *(int1 *)(param_1 + 0xb0) = 0x20; uVar5 = 1; if ((((*(long *)(param_1 + 0x48) != 0) && (*(long *)(param_1 + 0x50) != 0)) && (lVar6 != 0)) && (*(long *)(param_1 + 0x40) != 0)) { lVar7 = 0; local_38 = param_2; memset(local_1838,0,0x1800); do { uVar3 = *(ushort *)(lVar6 + lVar7 * 2); if (lVar7 == 0 || uVar3 != 0) { uVar8 = (ulong)(uVar3 >> 8); iVar2 = local_1838[uVar8 * 6]; if (iVar2 == 0) { local_1830[uVar8 * 0xc] = uVar3; } else { uVar10 = uVar3; if ((ushort)*(int4 *)(local_1830 + uVar8 * 0xc) <= uVar3) { uVar10 = (ushort)*(int4 *)(local_1830 + uVar8 * 0xc); } local_1830[uVar8 * 0xc] = uVar10; if (uVar3 <= local_1830[uVar8 * 0xc + 1]) { uVar3 = local_1830[uVar8 * 0xc + 1]; } } local_1830[uVar8 * 0xc + 1] = uVar3; local_1838[uVar8 * 6] = iVar2 + 1; } lVar7 = lVar7 + 1; } while (lVar7 != 0x100); qsort(local_1838,0x100,0x18,pcmp); uVar8 = 0; do { if (local_1838[uVar8 * 6] == 0) goto LAB_001bf348; __n = ((ulong)local_1830[uVar8 * 0xc + 1] - (ulong)local_1830[uVar8 * 0xc]) + 1; __s = (void *)(**(code **)(local_38 + 0x80))(__n); auStack_1828[uVar8 * 3] = __s; if (__s == (void *)0x0) goto LAB_001bf39c; memset(__s,0,__n); lVar6 = 1; do { uVar3 = *(ushort *)(*(long *)(param_1 + 0x68) + lVar6 * 2); if (((local_1830[uVar8 * 0xc] <= uVar3) && ((ushort)(uVar3 - 1) < local_1830[uVar8 * 0xc + 1])) && (lVar7 = (ulong)uVar3 - (ulong)local_1830[uVar8 * 0xc], *(char *)((long)__s + lVar7) < '\x01')) { *(char *)((long)__s + lVar7) = (char)lVar6; } lVar6 = lVar6 + 1; } while (lVar6 != 0x100); uVar8 = uVar8 + 1; } while (uVar8 != 0x100); uVar8 = 0x100; LAB_001bf348: uVar11 = uVar8 & 0xffffffff; lVar6 = (**(code **)(local_38 + 0x80))(uVar11 * 0x10 + 0x10); *(long *)(param_1 + 0x70) = lVar6; if (lVar6 == 0) { LAB_001bf39c: uVar5 = 1; } else { if ((int)uVar8 == 0) { uVar11 = 0; } else { puVar9 = local_1830; lVar6 = 0; do { uVar5 = *(int8 *)(puVar9 + 4); puVar1 = (int8 *)(*(long *)(param_1 + 0x70) + lVar6); *puVar1 = *(int8 *)puVar9; puVar1[1] = uVar5; lVar6 = lVar6 + 0x10; puVar9 = puVar9 + 0xc; } while (uVar11 << 4 != lVar6); lVar6 = *(long *)(param_1 + 0x70); } puVar1 = (int8 *)(lVar6 + uVar11 * 0x10); *puVar1 = 0; puVar1[1] = 0; uVar5 = 0; } } return uVar5; }
61,460
google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field_lite.cc
void RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List<java.lang.String>\n" " get$capitalized_name$List();\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$java.lang.String get$capitalized_name$(int index);\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$com.google.protobuf.ByteString\n" " get$capitalized_name$Bytes(int index);\n"); }
O0
cpp
google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi movq 0x8(%rax), %rsi movl $0x5, %edx xorl %ecx, %ecx callq 0x19a830 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x10, %rsi leaq 0x2274a6(%rip), %rdx # 0x3f1f06 callq 0x3235f0 movq (%rsp), %rax movq 0x8(%rsp), %rdi movq 0x8(%rax), %rsi movl $0x4, %edx xorl %ecx, %ecx callq 0x19a830 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x10, %rsi leaq 0x21f65f(%rip), %rdx # 0x3ea0f1 callq 0x3235f0 movq (%rsp), %rax movq 0x8(%rsp), %rdi movq 0x8(%rax), %rsi movl $0x6, %edx xorl %ecx, %ecx callq 0x19a830 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x10, %rsi leaq 0x227492(%rip), %rdx # 0x3f1f56 callq 0x3235f0 movq (%rsp), %rax movq 0x8(%rsp), %rdi movq 0x8(%rax), %rsi movl $0x6, %edx xorl %ecx, %ecx callq 0x19a830 movq (%rsp), %rsi movq 0x8(%rsp), %rdi addq $0x10, %rsi leaq 0x2274a1(%rip), %rdx # 0x3f1f97 callq 0x3235f0 addq $0x18, %rsp retq
_ZNK6google8protobuf8compiler4java41RepeatedImmutableStringFieldLiteGenerator24GenerateInterfaceMembersEPNS0_2io7PrinterE: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax mov rdi, [rsp+18h+var_10] mov rsi, [rax+8] mov edx, 5 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 10h lea rdx, aDeprecationJav_6; "$deprecation$java.util.List<java.lang.S"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rax, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] mov rsi, [rax+8] mov edx, 4 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 10h lea rdx, aDeprecationInt_0; "$deprecation$int get$capitalized_name$C"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rax, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] mov rsi, [rax+8] mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 10h lea rdx, aDeprecationJav_7; "$deprecation$java.lang.String get$capit"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rax, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] mov rsi, [rax+8] mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) mov rsi, [rsp+18h+var_18] mov rdi, [rsp+18h+var_10] add rsi, 10h lea rdx, aDeprecationCom_0; "$deprecation$com.google.protobuf.ByteSt"... call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) add rsp, 18h retn
61,461
google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field_lite.cc
void RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers( io::Printer* printer) const { WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$java.util.List<java.lang.String>\n" " get$capitalized_name$List();\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print(variables_, "$deprecation$int get$capitalized_name$Count();\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print( variables_, "$deprecation$java.lang.String get$capitalized_name$(int index);\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$com.google.protobuf.ByteString\n" " get$capitalized_name$Bytes(int index);\n"); }
O3
cpp
google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rsi movq %rbx, %rdi movl $0x5, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0x10(%r14), %r15 leaq 0xf8996(%rip), %rdx # 0x1e2da5 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x4, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf0c89(%rip), %rdx # 0x1db0bd movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x6, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf899c(%rip), %rdx # 0x1e2df5 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x6, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf89b8(%rip), %rdx # 0x1e2e36 movq %rbx, %rdi movq %r15, %rsi popq %rbx popq %r14 popq %r15 jmp 0x16cd32
_ZNK6google8protobuf8compiler4java41RepeatedImmutableStringFieldLiteGenerator24GenerateInterfaceMembersEPNS0_2io7PrinterE: push r15; int push r14; char push rbx; int mov rbx, rsi mov r14, rdi mov rsi, [rdi+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 5 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea r15, [r14+10h] lea rdx, aDeprecationJav_6; "$deprecation$java.util.List<java.lang.S"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 4 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationInt_0; "$deprecation$int get$capitalized_name$C"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationJav_7; "$deprecation$java.lang.String get$capit"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationCom_0; "$deprecation$com.google.protobuf.ByteSt"... mov rdi, rbx; this mov rsi, r15 pop rbx pop r14 pop r15 jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
GenerateInterfaceMembers: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RDI + 0x8] MOV RDI,RBX MOV EDX,0x5 XOR ECX,ECX CALL 0x001cff9a LEA R15,[R14 + 0x10] LEA RDX,[0x2e2da5] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x4 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2db0bd] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x6 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e2df5] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x6 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e2e36] MOV RDI,RBX MOV RSI,R15 POP RBX POP R14 POP R15 JMP 0x0026cd32
/* google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator:: GenerateInterfaceMembers(RepeatedImmutableStringFieldLiteGenerator *this,Printer *param_1) { map *pmVar1; WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),5,0); pmVar1 = (map *)(this + 0x10); io::Printer::Print(param_1,pmVar1, "$deprecation$java.util.List<java.lang.String>\n get$capitalized_name$List();\n" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),4,0); io::Printer::Print(param_1,pmVar1,"$deprecation$int get$capitalized_name$Count();\n"); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),6,0); io::Printer::Print(param_1,pmVar1, "$deprecation$java.lang.String get$capitalized_name$(int index);\n"); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),6,0); io::Printer::Print(param_1,pmVar1, "$deprecation$com.google.protobuf.ByteString\n get$capitalized_name$Bytes(int index);\n" ); return; }
61,462
js_map_mark
bluesky950520[P]quickjs/quickjs.c
static void js_map_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSMapState *s; struct list_head *el; JSMapRecord *mr; s = p->u.map_state; if (s) { list_for_each(el, &s->records) { mr = list_entry(el, JSMapRecord, link); if (!s->is_weak) JS_MarkValue(rt, mr->key, mark_func); JS_MarkValue(rt, mr->value, mark_func); } } }
O2
c
js_map_mark: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x30(%rsi), %r15 testq %r15, %r15 je 0x37a0b movq %rcx, %rbx movq %rdi, %r14 movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE leaq 0x8(%r15), %r13 leaq 0x10(%r15), %rbp movq (%rbp), %rbp cmpq %r13, %rbp je 0x37a0b cmpl $0x0, (%r15) jne 0x379f1 movl 0x28(%rbp), %eax andl $-0x2, %eax cmpl %r12d, %eax jne 0x379f1 movq 0x20(%rbp), %rsi movq %r14, %rdi callq *%rbx movl 0x38(%rbp), %eax andl $-0x2, %eax cmpl %r12d, %eax jne 0x37a05 movq 0x30(%rbp), %rsi movq %r14, %rdi callq *%rbx addq $0x8, %rbp jmp 0x379ce addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_map_mark: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, [rsi+30h] test r15, r15 jz short loc_37A0B mov rbx, rcx mov r14, rdi mov r12d, 0FFFFFFFEh lea r13, [r15+8] lea rbp, [r15+10h] loc_379CE: mov rbp, [rbp+0] cmp rbp, r13 jz short loc_37A0B cmp dword ptr [r15], 0 jnz short loc_379F1 mov eax, [rbp+28h] and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_379F1 mov rsi, [rbp+20h] mov rdi, r14 call rbx loc_379F1: mov eax, [rbp+38h] and eax, 0FFFFFFFEh cmp eax, r12d jnz short loc_37A05 mov rsi, [rbp+30h] mov rdi, r14 call rbx loc_37A05: add rbp, 8 jmp short loc_379CE loc_37A0B: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_map_mark(long long a1, long long a2, long long a3, void ( *a4)(long long, _QWORD)) { _DWORD *v4; // r15 long long *i; // rbp long long v7; // rbp long long result; // rax v4 = *(_DWORD **)(a2 + 48); if ( v4 ) { for ( i = (long long *)(v4 + 4); ; i = (long long *)(v7 + 8) ) { v7 = *i; if ( (_DWORD *)v7 == v4 + 2 ) break; if ( !*v4 && (*(_DWORD *)(v7 + 40) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 32)); result = *(_DWORD *)(v7 + 56) & 0xFFFFFFFE; if ( (_DWORD)result == -2 ) result = ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v7 + 48)); } } return result; }
js_map_mark: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RSI + 0x30] TEST R15,R15 JZ 0x00137a0b MOV RBX,RCX MOV R14,RDI MOV R12D,0xfffffffe LEA R13,[R15 + 0x8] LEA RBP,[R15 + 0x10] LAB_001379ce: MOV RBP,qword ptr [RBP] CMP RBP,R13 JZ 0x00137a0b CMP dword ptr [R15],0x0 JNZ 0x001379f1 MOV EAX,dword ptr [RBP + 0x28] AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x001379f1 MOV RSI,qword ptr [RBP + 0x20] MOV RDI,R14 CALL RBX LAB_001379f1: MOV EAX,dword ptr [RBP + 0x38] AND EAX,0xfffffffe CMP EAX,R12D JNZ 0x00137a05 MOV RSI,qword ptr [RBP + 0x30] MOV RDI,R14 CALL RBX LAB_00137a05: ADD RBP,0x8 JMP 0x001379ce LAB_00137a0b: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void js_map_mark(int8 param_1,long param_2,int8 param_3,code *param_4) { int *piVar1; int *piVar2; piVar1 = *(int **)(param_2 + 0x30); if (piVar1 != (int *)0x0) { for (piVar2 = piVar1 + 4; piVar2 = *(int **)piVar2, piVar2 != piVar1 + 2; piVar2 = piVar2 + 2) { if ((*piVar1 == 0) && ((piVar2[10] & 0xfffffffeU) == 0xfffffffe)) { (*param_4)(param_1,*(int8 *)(piVar2 + 8)); } if ((piVar2[0xe] & 0xfffffffeU) == 0xfffffffe) { (*param_4)(param_1,*(int8 *)(piVar2 + 0xc)); } } } return; }
61,463
POINTonE2_affine_Serialize_BE
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
static limb_t POINTonE2_affine_Serialize_BE(unsigned char out[192], const POINTonE2_affine *in) { vec384x temp; from_fp(temp[1], in->X[1]); be_bytes_from_limbs(out, temp[1], sizeof(temp[1])); from_fp(temp[0], in->X[0]); be_bytes_from_limbs(out + 48, temp[0], sizeof(temp[0])); from_fp(temp[1], in->Y[1]); be_bytes_from_limbs(out + 96, temp[1], sizeof(temp[1])); from_fp(temp[0], in->Y[0]); be_bytes_from_limbs(out + 144, temp[0], sizeof(temp[0])); return sgn0_pty_mod_384x(temp, BLS12_381_P); }
O1
c
POINTonE2_affine_Serialize_BE: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movq %rsi, %r15 movq %rdi, %rbx movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD leaq -0x50(%rbp), %r12 addq $0x30, %rsi leaq 0x2fd28(%rip), %rdx # 0x8e8b0 movq %r12, %rdi movq %r14, %rcx callq 0x76c00 movl $0x2f, %eax movl $0x178, %edx # imm = 0x178 movq %rbx, %rsi movq %rax, %rcx andq $-0x8, %rcx movq -0x50(%rbp,%rcx), %rdi movl %edx, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rsi) incq %rsi addq $-0x8, %rdx addq $-0x1, %rax jb 0x5eba0 leaq 0x2fce5(%rip), %rdx # 0x8e8b0 leaq -0x80(%rbp), %rdi movq %r15, %rsi movq %r14, %rcx callq 0x76c00 leaq 0x30(%rbx), %rax movl $0x2f, %edx movl $0x178, %esi # imm = 0x178 movq %rdx, %rcx andq $-0x8, %rcx movq -0x80(%rbp,%rcx), %rdi movl %esi, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rax) incq %rax addq $-0x8, %rsi addq $-0x1, %rdx jb 0x5ebe8 leaq 0x90(%r15), %rsi leaq 0x2fc96(%rip), %rdx # 0x8e8b0 movq %r12, %rdi movq %r14, %rcx callq 0x76c00 leaq 0x60(%rbx), %rax movl $0x2f, %edx movl $0x178, %esi # imm = 0x178 movq %rdx, %rcx andq $-0x8, %rcx movq -0x50(%rbp,%rcx), %rdi movl %esi, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rax) incq %rax addq $-0x8, %rsi addq $-0x1, %rdx jb 0x5ec33 addq $0x60, %r15 leaq 0x2fc4e(%rip), %rdx # 0x8e8b0 leaq -0x80(%rbp), %rdi movq %r15, %rsi movq %r14, %rcx callq 0x76c00 addq $0x90, %rbx movl $0x2f, %eax movl $0x178, %edx # imm = 0x178 movq %rax, %rcx andq $-0x8, %rcx movq -0x80(%rbp,%rcx), %rsi movl %edx, %ecx andb $0x38, %cl shrq %cl, %rsi movb %sil, (%rbx) incq %rbx addq $-0x8, %rdx addq $-0x1, %rax jb 0x5ec82 leaq 0x2fc03(%rip), %rsi # 0x8e8b0 leaq -0x80(%rbp), %rdi callq 0x72520 addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
POINTonE2_affine_Serialize_BE: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 60h mov r15, rsi mov rbx, rdi mov r14, 89F3FFFCFFFCFFFDh lea r12, [rbp+var_50] add rsi, 30h ; '0' lea rdx, BLS12_381_P mov rdi, r12 mov rcx, r14 call from_mont_384 mov eax, 2Fh ; '/' mov edx, 178h mov rsi, rbx loc_5EBA0: mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_50] mov ecx, edx and cl, 38h shr rdi, cl mov [rsi], dil inc rsi add rdx, 0FFFFFFFFFFFFFFF8h add rax, 0FFFFFFFFFFFFFFFFh jb short loc_5EBA0 lea rdx, BLS12_381_P lea rdi, [rbp+var_80] mov rsi, r15 mov rcx, r14 call from_mont_384 lea rax, [rbx+30h] mov edx, 2Fh ; '/' mov esi, 178h loc_5EBE8: mov rcx, rdx and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_80] mov ecx, esi and cl, 38h shr rdi, cl mov [rax], dil inc rax add rsi, 0FFFFFFFFFFFFFFF8h add rdx, 0FFFFFFFFFFFFFFFFh jb short loc_5EBE8 lea rsi, [r15+90h] lea rdx, BLS12_381_P mov rdi, r12 mov rcx, r14 call from_mont_384 lea rax, [rbx+60h] mov edx, 2Fh ; '/' mov esi, 178h loc_5EC33: mov rcx, rdx and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_50] mov ecx, esi and cl, 38h shr rdi, cl mov [rax], dil inc rax add rsi, 0FFFFFFFFFFFFFFF8h add rdx, 0FFFFFFFFFFFFFFFFh jb short loc_5EC33 add r15, 60h ; '`' lea rdx, BLS12_381_P lea rdi, [rbp+var_80] mov rsi, r15 mov rcx, r14 call from_mont_384 add rbx, 90h mov eax, 2Fh ; '/' mov edx, 178h loc_5EC82: mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF8h mov rsi, [rbp+rcx+var_80] mov ecx, edx and cl, 38h shr rsi, cl mov [rbx], sil inc rbx add rdx, 0FFFFFFFFFFFFFFF8h add rax, 0FFFFFFFFFFFFFFFFh jb short loc_5EC82 lea rsi, BLS12_381_P lea rdi, [rbp+var_80] call sgn0_pty_mod_384x add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long POINTonE2_affine_Serialize_BE(_BYTE *a1, long long a2) { long long v3; // rax long long v4; // rdx _BYTE *v5; // rsi bool v6; // cf _BYTE *v7; // rax long long v8; // rdx long long v9; // rsi _BYTE *v10; // rax long long v11; // rdx long long v12; // rsi _BYTE *v13; // rbx long long v14; // rax long long v15; // rdx _QWORD v17[6]; // [rsp+0h] [rbp-80h] BYREF _QWORD v18[10]; // [rsp+30h] [rbp-50h] BYREF from_mont_384(v18, a2 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v3 = 47LL; v4 = 376LL; v5 = a1; do { *v5++ = *(_QWORD *)((char *)v18 + (v3 & 0xFFFFFFFFFFFFFFF8LL)) >> (v4 & 0x38); v4 -= 8LL; v6 = v3-- != 0; } while ( v6 ); from_mont_384(v17, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v7 = a1 + 48; v8 = 47LL; v9 = 376LL; do { *v7++ = *(_QWORD *)((char *)v17 + (v8 & 0xFFFFFFFFFFFFFFF8LL)) >> (v9 & 0x38); v9 -= 8LL; v6 = v8-- != 0; } while ( v6 ); from_mont_384(v18, a2 + 144, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v10 = a1 + 96; v11 = 47LL; v12 = 376LL; do { *v10++ = *(_QWORD *)((char *)v18 + (v11 & 0xFFFFFFFFFFFFFFF8LL)) >> (v12 & 0x38); v12 -= 8LL; v6 = v11-- != 0; } while ( v6 ); from_mont_384(v17, a2 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v13 = a1 + 144; v14 = 47LL; v15 = 376LL; do { *v13++ = *(_QWORD *)((char *)v17 + (v14 & 0xFFFFFFFFFFFFFFF8LL)) >> (v15 & 0x38); v15 -= 8LL; v6 = v14-- != 0; } while ( v6 ); return sgn0_pty_mod_384x(v17, &BLS12_381_P, v15); }
POINTonE2_affine_Serialize_BE: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV R15,RSI MOV RBX,RDI MOV R14,-0x760c000300030003 LEA R12,[RBP + -0x50] ADD RSI,0x30 LEA RDX,[0x18e8b0] MOV RDI,R12 MOV RCX,R14 CALL 0x00176c00 MOV EAX,0x2f MOV EDX,0x178 MOV RSI,RBX LAB_0015eba0: MOV RCX,RAX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x50] MOV ECX,EDX AND CL,0x38 SHR RDI,CL MOV byte ptr [RSI],DIL INC RSI ADD RDX,-0x8 ADD RAX,-0x1 JC 0x0015eba0 LEA RDX,[0x18e8b0] LEA RDI,[RBP + -0x80] MOV RSI,R15 MOV RCX,R14 CALL 0x00176c00 LEA RAX,[RBX + 0x30] MOV EDX,0x2f MOV ESI,0x178 LAB_0015ebe8: MOV RCX,RDX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x80] MOV ECX,ESI AND CL,0x38 SHR RDI,CL MOV byte ptr [RAX],DIL INC RAX ADD RSI,-0x8 ADD RDX,-0x1 JC 0x0015ebe8 LEA RSI,[R15 + 0x90] LEA RDX,[0x18e8b0] MOV RDI,R12 MOV RCX,R14 CALL 0x00176c00 LEA RAX,[RBX + 0x60] MOV EDX,0x2f MOV ESI,0x178 LAB_0015ec33: MOV RCX,RDX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x50] MOV ECX,ESI AND CL,0x38 SHR RDI,CL MOV byte ptr [RAX],DIL INC RAX ADD RSI,-0x8 ADD RDX,-0x1 JC 0x0015ec33 ADD R15,0x60 LEA RDX,[0x18e8b0] LEA RDI,[RBP + -0x80] MOV RSI,R15 MOV RCX,R14 CALL 0x00176c00 ADD RBX,0x90 MOV EAX,0x2f MOV EDX,0x178 LAB_0015ec82: MOV RCX,RAX AND RCX,-0x8 MOV RSI,qword ptr [RBP + RCX*0x1 + -0x80] MOV ECX,EDX AND CL,0x38 SHR RSI,CL MOV byte ptr [RBX],SIL INC RBX ADD RDX,-0x8 ADD RAX,-0x1 JC 0x0015ec82 LEA RSI,[0x18e8b0] LEA RDI,[RBP + -0x80] CALL 0x00172520 ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void POINTonE2_affine_Serialize_BE(int1 *param_1,long param_2) { ulong uVar1; byte bVar2; int1 *puVar3; bool bVar4; ulong local_88 [6]; ulong local_58 [6]; from_mont_384(local_58,param_2 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd); uVar1 = 0x2f; bVar2 = 0x78; puVar3 = param_1; do { *puVar3 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_88,param_2,BLS12_381_P,0x89f3fffcfffcfffd); puVar3 = param_1 + 0x30; uVar1 = 0x2f; bVar2 = 0x78; do { *puVar3 = (char)(*(ulong *)((long)local_88 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_58,param_2 + 0x90,BLS12_381_P,0x89f3fffcfffcfffd); puVar3 = param_1 + 0x60; uVar1 = 0x2f; bVar2 = 0x78; do { *puVar3 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_88,param_2 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd); param_1 = param_1 + 0x90; uVar1 = 0x2f; bVar2 = 0x78; do { *param_1 = (char)(*(ulong *)((long)local_88 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); param_1 = param_1 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); sgn0_pty_mod_384x(local_88,BLS12_381_P); return; }
61,464
OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator()(float&, float&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/nodeBase.h
inline unsigned char NodeBase::LoopWinding::operator()(float& u, float& v) { median *= 0.5f; if (!rotated) { if (u >= median) { u -= median; return 1; } if (v >= median) { v -= median; return 3; } if ((u + v) >= median) { rotated = true; return 2; } } else { if (u < median) { v -= median; return 1; } if (v < median) { u -= median; return 3; } u -= median; v -= median; if ((u + v) < median) { rotated = true; return 2; } } return 0; }
O0
c
OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator()(float&, float&): pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movss 0x1ea0c(%rip), %xmm0 # 0x1edfbc mulss 0x4(%rax), %xmm0 movss %xmm0, 0x4(%rax) testb $0x1, (%rax) jne 0x1cf65a movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movss (%rcx), %xmm0 ucomiss 0x4(%rax), %xmm0 jb 0x1cf5f7 movq -0x28(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x18(%rbp), %rax movss (%rax), %xmm0 subss %xmm1, %xmm0 movss %xmm0, (%rax) movb $0x1, -0x1(%rbp) jmp 0x1cf722 movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx movss (%rcx), %xmm0 ucomiss 0x4(%rax), %xmm0 jb 0x1cf62b movq -0x28(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x20(%rbp), %rax movss (%rax), %xmm0 subss %xmm1, %xmm0 movss %xmm0, (%rax) movb $0x3, -0x1(%rbp) jmp 0x1cf722 movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movss (%rcx), %xmm0 movq -0x20(%rbp), %rcx addss (%rcx), %xmm0 ucomiss 0x4(%rax), %xmm0 jb 0x1cf655 movq -0x28(%rbp), %rax movb $0x1, (%rax) movb $0x2, -0x1(%rbp) jmp 0x1cf722 jmp 0x1cf71e movq -0x28(%rbp), %rax movq -0x18(%rbp), %rcx movss (%rcx), %xmm1 movss 0x4(%rax), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x1cf692 movq -0x28(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x20(%rbp), %rax movss (%rax), %xmm0 subss %xmm1, %xmm0 movss %xmm0, (%rax) movb $0x1, -0x1(%rbp) jmp 0x1cf722 movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx movss (%rcx), %xmm1 movss 0x4(%rax), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x1cf6c7 movq -0x28(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x18(%rbp), %rax movss (%rax), %xmm0 subss %xmm1, %xmm0 movss %xmm0, (%rax) movb $0x3, -0x1(%rbp) jmp 0x1cf722 movq -0x28(%rbp), %rax movss 0x4(%rax), %xmm1 movq -0x18(%rbp), %rcx movss (%rcx), %xmm0 subss %xmm1, %xmm0 movss %xmm0, (%rcx) movss 0x4(%rax), %xmm1 movq -0x20(%rbp), %rcx movss (%rcx), %xmm0 subss %xmm1, %xmm0 movss %xmm0, (%rcx) movq -0x18(%rbp), %rcx movss (%rcx), %xmm1 movq -0x20(%rbp), %rcx addss (%rcx), %xmm1 movss 0x4(%rax), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x1cf71c movq -0x28(%rbp), %rax movb $0x1, (%rax) movb $0x2, -0x1(%rbp) jmp 0x1cf722 jmp 0x1cf71e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopw (%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Tmr8NodeBase11LoopWindingclERfS4_: 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 [rbp+var_28], rax movss xmm0, cs:dword_1EDFBC mulss xmm0, dword ptr [rax+4] movss dword ptr [rax+4], xmm0 test byte ptr [rax], 1 jnz loc_1CF65A mov rax, [rbp+var_28] mov rcx, [rbp+var_18] movss xmm0, dword ptr [rcx] ucomiss xmm0, dword ptr [rax+4] jb short loc_1CF5F7 mov rax, [rbp+var_28] movss xmm1, dword ptr [rax+4] mov rax, [rbp+var_18] movss xmm0, dword ptr [rax] subss xmm0, xmm1 movss dword ptr [rax], xmm0 mov [rbp+var_1], 1 jmp loc_1CF722 loc_1CF5F7: mov rax, [rbp+var_28] mov rcx, [rbp+var_20] movss xmm0, dword ptr [rcx] ucomiss xmm0, dword ptr [rax+4] jb short loc_1CF62B mov rax, [rbp+var_28] movss xmm1, dword ptr [rax+4] mov rax, [rbp+var_20] movss xmm0, dword ptr [rax] subss xmm0, xmm1 movss dword ptr [rax], xmm0 mov [rbp+var_1], 3 jmp loc_1CF722 loc_1CF62B: mov rax, [rbp+var_28] mov rcx, [rbp+var_18] movss xmm0, dword ptr [rcx] mov rcx, [rbp+var_20] addss xmm0, dword ptr [rcx] ucomiss xmm0, dword ptr [rax+4] jb short loc_1CF655 mov rax, [rbp+var_28] mov byte ptr [rax], 1 mov [rbp+var_1], 2 jmp loc_1CF722 loc_1CF655: jmp loc_1CF71E loc_1CF65A: mov rax, [rbp+var_28] mov rcx, [rbp+var_18] movss xmm1, dword ptr [rcx] movss xmm0, dword ptr [rax+4] ucomiss xmm0, xmm1 jbe short loc_1CF692 mov rax, [rbp+var_28] movss xmm1, dword ptr [rax+4] mov rax, [rbp+var_20] movss xmm0, dword ptr [rax] subss xmm0, xmm1 movss dword ptr [rax], xmm0 mov [rbp+var_1], 1 jmp loc_1CF722 loc_1CF692: mov rax, [rbp+var_28] mov rcx, [rbp+var_20] movss xmm1, dword ptr [rcx] movss xmm0, dword ptr [rax+4] ucomiss xmm0, xmm1 jbe short loc_1CF6C7 mov rax, [rbp+var_28] movss xmm1, dword ptr [rax+4] mov rax, [rbp+var_18] movss xmm0, dword ptr [rax] subss xmm0, xmm1 movss dword ptr [rax], xmm0 mov [rbp+var_1], 3 jmp short loc_1CF722 loc_1CF6C7: mov rax, [rbp+var_28] movss xmm1, dword ptr [rax+4] mov rcx, [rbp+var_18] movss xmm0, dword ptr [rcx] subss xmm0, xmm1 movss dword ptr [rcx], xmm0 movss xmm1, dword ptr [rax+4] mov rcx, [rbp+var_20] movss xmm0, dword ptr [rcx] subss xmm0, xmm1 movss dword ptr [rcx], xmm0 mov rcx, [rbp+var_18] movss xmm1, dword ptr [rcx] mov rcx, [rbp+var_20] addss xmm1, dword ptr [rcx] movss xmm0, dword ptr [rax+4] ucomiss xmm0, xmm1 jbe short loc_1CF71C mov rax, [rbp+var_28] mov byte ptr [rax], 1 mov [rbp+var_1], 2 jmp short loc_1CF722 loc_1CF71C: jmp short $+2 loc_1CF71E: mov [rbp+var_1], 0 loc_1CF722: mov al, [rbp+var_1] pop rbp retn
char OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator()(long long a1, float *a2, float *a3) { *(float *)(a1 + 4) = 0.5 * *(float *)(a1 + 4); if ( (*(_BYTE *)a1 & 1) != 0 ) { if ( *(float *)(a1 + 4) > *a2 ) { *a3 = *a3 - *(float *)(a1 + 4); return 1; } if ( *(float *)(a1 + 4) > *a3 ) { *a2 = *a2 - *(float *)(a1 + 4); return 3; } *a2 = *a2 - *(float *)(a1 + 4); *a3 = *a3 - *(float *)(a1 + 4); if ( *(float *)(a1 + 4) > (float)(*a2 + *a3) ) { *(_BYTE *)a1 = 1; return 2; } return 0; } if ( *a2 < *(float *)(a1 + 4) ) { if ( *a3 >= *(float *)(a1 + 4) ) { *a3 = *a3 - *(float *)(a1 + 4); return 3; } if ( (float)(*a2 + *a3) >= *(float *)(a1 + 4) ) { *(_BYTE *)a1 = 1; return 2; } return 0; } *a2 = *a2 - *(float *)(a1 + 4); return 1; }
61,465
OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator()(float&, float&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/nodeBase.h
inline unsigned char NodeBase::LoopWinding::operator()(float& u, float& v) { median *= 0.5f; if (!rotated) { if (u >= median) { u -= median; return 1; } if (v >= median) { v -= median; return 3; } if ((u + v) >= median) { rotated = true; return 2; } } else { if (u < median) { v -= median; return 1; } if (v < median) { u -= median; return 3; } u -= median; v -= median; if ((u + v) < median) { rotated = true; return 2; } } return 0; }
O2
c
OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator()(float&, float&): movss 0x4(%rdi), %xmm0 mulss 0xd8e5(%rip), %xmm0 # 0xc00b0 movss %xmm0, 0x4(%rdi) movss (%rsi), %xmm1 cmpb $0x0, (%rdi) je 0xb27ec ucomiss %xmm1, %xmm0 movss (%rdx), %xmm2 jbe 0xb2806 subss %xmm0, %xmm2 movss %xmm2, (%rdx) jmp 0xb283e ucomiss %xmm0, %xmm1 jae 0xb2836 movss (%rdx), %xmm2 ucomiss %xmm0, %xmm2 jae 0xb2841 addss %xmm2, %xmm1 ucomiss %xmm0, %xmm1 jae 0xb2830 xorl %eax, %eax retq ucomiss %xmm2, %xmm0 subss %xmm0, %xmm1 movss %xmm1, (%rsi) movb $0x3, %al ja 0xb2805 movss (%rdx), %xmm0 subss 0x4(%rdi), %xmm0 movss %xmm0, (%rdx) addss (%rsi), %xmm0 movss 0x4(%rdi), %xmm1 ucomiss %xmm0, %xmm1 jbe 0xb2803 movb $0x1, (%rdi) movb $0x2, %al retq subss %xmm0, %xmm1 movss %xmm1, (%rsi) movb $0x1, %al retq subss %xmm0, %xmm2 movss %xmm2, (%rdx) movb $0x3, %al retq
_ZN10OpenSubdiv6v3_6_03Tmr8NodeBase11LoopWindingclERfS4_: movss xmm0, dword ptr [rdi+4] mulss xmm0, cs:dword_C00B0 movss dword ptr [rdi+4], xmm0 movss xmm1, dword ptr [rsi] cmp byte ptr [rdi], 0 jz short loc_B27EC ucomiss xmm0, xmm1 movss xmm2, dword ptr [rdx] jbe short loc_B2806 subss xmm2, xmm0 movss dword ptr [rdx], xmm2 jmp short loc_B283E loc_B27EC: ucomiss xmm1, xmm0 jnb short loc_B2836 movss xmm2, dword ptr [rdx] ucomiss xmm2, xmm0 jnb short loc_B2841 addss xmm1, xmm2 ucomiss xmm1, xmm0 jnb short loc_B2830 loc_B2803: xor eax, eax locret_B2805: retn loc_B2806: ucomiss xmm0, xmm2 subss xmm1, xmm0 movss dword ptr [rsi], xmm1 mov al, 3 ja short locret_B2805 movss xmm0, dword ptr [rdx] subss xmm0, dword ptr [rdi+4] movss dword ptr [rdx], xmm0 addss xmm0, dword ptr [rsi] movss xmm1, dword ptr [rdi+4] ucomiss xmm1, xmm0 jbe short loc_B2803 loc_B2830: mov byte ptr [rdi], 1 mov al, 2 retn loc_B2836: subss xmm1, xmm0 movss dword ptr [rsi], xmm1 loc_B283E: mov al, 1 retn loc_B2841: subss xmm2, xmm0 movss dword ptr [rdx], xmm2 mov al, 3 retn
char OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator()(long long a1, float *a2, float *a3) { float v3; // xmm0_4 float v4; // xmm1_4 float v5; // xmm2_4 float v6; // xmm2_4 char result; // al float v8; // xmm0_4 v3 = *(float *)(a1 + 4) * 0.5; *(float *)(a1 + 4) = v3; v4 = *a2; if ( !*(_BYTE *)a1 ) { if ( v4 >= v3 ) { *a2 = v4 - v3; return 1; } v6 = *a3; if ( *a3 >= v3 ) { *a3 = v6 - v3; return 3; } if ( (float)(v4 + v6) >= v3 ) { LABEL_11: *(_BYTE *)a1 = 1; return 2; } return 0; } v5 = *a3; if ( v3 > v4 ) { *a3 = v5 - v3; return 1; } *a2 = v4 - v3; result = 3; if ( v3 <= v5 ) { v8 = *a3 - *(float *)(a1 + 4); *a3 = v8; if ( *(float *)(a1 + 4) > (float)(v8 + *a2) ) goto LABEL_11; return 0; } return result; }
operator(): MOVSS XMM0,dword ptr [RDI + 0x4] MULSS XMM0,dword ptr [0x001c00b0] MOVSS dword ptr [RDI + 0x4],XMM0 MOVSS XMM1,dword ptr [RSI] CMP byte ptr [RDI],0x0 JZ 0x001b27ec UCOMISS XMM0,XMM1 MOVSS XMM2,dword ptr [RDX] JBE 0x001b2806 SUBSS XMM2,XMM0 MOVSS dword ptr [RDX],XMM2 JMP 0x001b283e LAB_001b27ec: UCOMISS XMM1,XMM0 JNC 0x001b2836 MOVSS XMM2,dword ptr [RDX] UCOMISS XMM2,XMM0 JNC 0x001b2841 ADDSS XMM1,XMM2 UCOMISS XMM1,XMM0 JNC 0x001b2830 LAB_001b2803: XOR EAX,EAX LAB_001b2805: RET LAB_001b2806: UCOMISS XMM0,XMM2 SUBSS XMM1,XMM0 MOVSS dword ptr [RSI],XMM1 MOV AL,0x3 JA 0x001b2805 MOVSS XMM0,dword ptr [RDX] SUBSS XMM0,dword ptr [RDI + 0x4] MOVSS dword ptr [RDX],XMM0 ADDSS XMM0,dword ptr [RSI] MOVSS XMM1,dword ptr [RDI + 0x4] UCOMISS XMM1,XMM0 JBE 0x001b2803 LAB_001b2830: MOV byte ptr [RDI],0x1 MOV AL,0x2 RET LAB_001b2836: SUBSS XMM1,XMM0 MOVSS dword ptr [RSI],XMM1 LAB_001b283e: MOV AL,0x1 RET LAB_001b2841: SUBSS XMM2,XMM0 MOVSS dword ptr [RDX],XMM2 MOV AL,0x3 RET
/* OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::TEMPNAMEPLACEHOLDERVALUE(float&, float&) */ int8 __thiscall OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding::operator() (LoopWinding *this,float *param_1,float *param_2) { float fVar1; float fVar2; float fVar3; fVar3 = *(float *)(this + 4) * DAT_001c00b0; *(float *)(this + 4) = fVar3; fVar1 = *param_1; if (*this == (LoopWinding)0x0) { if (fVar3 <= fVar1) { *param_1 = fVar1 - fVar3; return 1; } fVar2 = *param_2; if (fVar3 <= fVar2) { *param_2 = fVar2 - fVar3; return 3; } if (fVar3 <= fVar1 + fVar2) goto LAB_001b2830; } else { fVar2 = *param_2; if (fVar1 < fVar3) { *param_2 = fVar2 - fVar3; return 1; } *param_1 = fVar1 - fVar3; if (fVar2 < fVar3) { return 3; } fVar1 = *param_2; fVar3 = *(float *)(this + 4); *param_2 = fVar1 - fVar3; if ((fVar1 - fVar3) + *param_1 < *(float *)(this + 4)) { LAB_001b2830: *this = (LoopWinding)0x1; return 2; } } return 0; }
61,466
my_coll_parser_scan_shift
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_shift(MY_COLL_RULE_PARSER *p) { if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_SHIFT) { my_coll_rule_shift_at_level(&p->rule, my_coll_parser_curr(p)->diff); return my_coll_parser_scan(p); } return 0; }
O3
c
my_coll_parser_scan_shift: xorl %eax, %eax cmpl $0x1, (%rdi) jne 0x5ff4e movl 0x20(%rdi), %eax decl %eax cmpl $0x3, %eax ja 0x5ff21 leaq 0x1a55e0(%rip), %rcx # 0x2054b0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax incl 0xd0(%rdi) movl $0x0, 0xdc(%rdi) movq $0x0, 0xd4(%rdi) jmp 0x5ff21 incl 0xd8(%rdi) movl $0x0, 0xdc(%rdi) jmp 0x5ff21 incl 0xdc(%rdi) jmp 0x5ff21 incl 0xd4(%rdi) movq $0x0, 0xd8(%rdi) pushq %rbp movq %rsp, %rbp leaq 0x28(%rdi), %rax movq 0x48(%rdi), %rcx movq %rcx, 0x20(%rdi) movups 0x28(%rdi), %xmm0 movups 0x38(%rdi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rax, %rdi callq 0x5fc1b movl $0x1, %eax popq %rbp retq
my_coll_parser_scan_shift: xor eax, eax cmp dword ptr [rdi], 1 jnz locret_5FF4E mov eax, [rdi+20h] dec eax; switch 4 cases cmp eax, 3 ja short def_5FED7; jumptable 000000000005FED7 default case lea rcx, jpt_5FED7 movsxd rax, ds:(jpt_5FED7 - 2054B0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5FED9: inc dword ptr [rdi+0D0h]; jumptable 000000000005FED7 case 1 mov dword ptr [rdi+0DCh], 0 mov qword ptr [rdi+0D4h], 0 jmp short def_5FED7; jumptable 000000000005FED7 default case loc_5FEF6: inc dword ptr [rdi+0D8h]; jumptable 000000000005FED7 case 3 mov dword ptr [rdi+0DCh], 0 jmp short def_5FED7; jumptable 000000000005FED7 default case loc_5FF08: inc dword ptr [rdi+0DCh]; jumptable 000000000005FED7 case 4 jmp short def_5FED7; jumptable 000000000005FED7 default case loc_5FF10: inc dword ptr [rdi+0D4h]; jumptable 000000000005FED7 case 2 mov qword ptr [rdi+0D8h], 0 def_5FED7: push rbp; jumptable 000000000005FED7 default case mov rbp, rsp lea rax, [rdi+28h] mov rcx, [rdi+48h] mov [rdi+20h], rcx movups xmm0, xmmword ptr [rdi+28h] movups xmm1, xmmword ptr [rdi+38h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov rdi, rax call my_coll_lexem_next mov eax, 1 pop rbp locret_5FF4E: retn
long long my_coll_parser_scan_shift(long long a1) { long long result; // rax __int128 v2; // xmm0 result = 0LL; if ( *(_DWORD *)a1 == 1 ) { switch ( *(_DWORD *)(a1 + 32) ) { case 1: ++*(_DWORD *)(a1 + 208); *(_DWORD *)(a1 + 220) = 0; *(_QWORD *)(a1 + 212) = 0LL; break; case 2: ++*(_DWORD *)(a1 + 212); *(_QWORD *)(a1 + 216) = 0LL; break; case 3: ++*(_DWORD *)(a1 + 216); *(_DWORD *)(a1 + 220) = 0; break; case 4: ++*(_DWORD *)(a1 + 220); break; default: break; } *(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 72); v2 = *(_OWORD *)(a1 + 40); *(_OWORD *)(a1 + 16) = *(_OWORD *)(a1 + 56); *(_OWORD *)a1 = v2; my_coll_lexem_next(a1 + 40); return 1LL; } return result; }
my_coll_parser_scan_shift: XOR EAX,EAX CMP dword ptr [RDI],0x1 JNZ 0x0015ff4e MOV EAX,dword ptr [RDI + 0x20] DEC EAX CMP EAX,0x3 JA 0x0015ff21 LEA RCX,[0x3054b0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: INC dword ptr [RDI + 0xd0] MOV dword ptr [RDI + 0xdc],0x0 MOV qword ptr [RDI + 0xd4],0x0 JMP 0x0015ff21 caseD_3: INC dword ptr [RDI + 0xd8] MOV dword ptr [RDI + 0xdc],0x0 JMP 0x0015ff21 caseD_4: INC dword ptr [RDI + 0xdc] JMP 0x0015ff21 caseD_2: INC dword ptr [RDI + 0xd4] MOV qword ptr [RDI + 0xd8],0x0 default: PUSH RBP MOV RBP,RSP LEA RAX,[RDI + 0x28] MOV RCX,qword ptr [RDI + 0x48] MOV qword ptr [RDI + 0x20],RCX MOVUPS XMM0,xmmword ptr [RDI + 0x28] MOVUPS XMM1,xmmword ptr [RDI + 0x38] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,RAX CALL 0x0015fc1b MOV EAX,0x1 POP RBP LAB_0015ff4e: RET
int8 my_coll_parser_scan_shift(int *param_1) { int8 uVar1; uVar1 = 0; if (*param_1 == 1) { switch(param_1[8]) { case 1: param_1[0x34] = param_1[0x34] + 1; param_1[0x37] = 0; param_1[0x35] = 0; param_1[0x36] = 0; break; case 2: param_1[0x35] = param_1[0x35] + 1; param_1[0x36] = 0; param_1[0x37] = 0; break; case 3: param_1[0x36] = param_1[0x36] + 1; param_1[0x37] = 0; break; case 4: param_1[0x37] = param_1[0x37] + 1; } *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12); param_1[4] = param_1[0xe]; param_1[5] = param_1[0xf]; param_1[6] = param_1[0x10]; param_1[7] = param_1[0x11]; *param_1 = param_1[10]; param_1[1] = param_1[0xb]; param_1[2] = param_1[0xc]; param_1[3] = param_1[0xd]; my_coll_lexem_next(param_1 + 10); uVar1 = 1; } return uVar1; }
61,467
get_charset_name
eloqsql/mysys/charset.c
const char *get_charset_name(uint charset_number) { my_pthread_once(&charsets_initialized, init_available_charsets); if (charset_number < array_elements(all_charsets)) { CHARSET_INFO *cs= all_charsets[charset_number]; if (cs && (cs->number == charset_number) && cs->coll_name.str) return cs->coll_name.str; } return "?"; /* this mimics find_type() */ }
O0
c
get_charset_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) leaq 0x3a3752(%rip), %rdi # 0x477204 leaq -0x479(%rip), %rsi # 0xd3640 callq 0x3a280 cmpl $0x800, -0xc(%rbp) # imm = 0x800 jae 0xd3b08 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x39b6bd(%rip), %rax # 0x46f190 movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xd3b06 movq -0x18(%rbp), %rax movl (%rax), %eax cmpl -0xc(%rbp), %eax jne 0xd3b06 movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0xd3b06 movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x8(%rbp) jmp 0xd3b13 jmp 0xd3b08 leaq 0x664c5(%rip), %rax # 0x139fd4 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
get_charset_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_C], 800h jnb short loc_D3B08 mov eax, [rbp+var_C] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_D3B06 mov rax, [rbp+var_18] mov eax, [rax] cmp eax, [rbp+var_C] jnz short loc_D3B06 mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jz short loc_D3B06 mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_8], rax jmp short loc_D3B13 loc_D3B06: jmp short $+2 loc_D3B08: lea rax, aSelect_1+0Ah; "?" mov [rbp+var_8], rax loc_D3B13: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
char * get_charset_name(unsigned int a1) { long long v2; // [rsp+8h] [rbp-18h] pthread_once(&charsets_initialized, init_available_charsets); if ( a1 < 0x800 && (v2 = all_charsets[a1]) != 0 && *(_DWORD *)v2 == a1 && *(_QWORD *)(v2 + 32) ) return *(char **)(v2 + 32); else return "?"; }
get_charset_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI LEA RDI,[0x577204] LEA RSI,[0x1d3640] CALL 0x0013a280 CMP dword ptr [RBP + -0xc],0x800 JNC 0x001d3b08 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x56f190] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001d3b06 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x001d3b06 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001d3b06 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x001d3b13 LAB_001d3b06: JMP 0x001d3b08 LAB_001d3b08: LEA RAX,[0x239fd4] MOV qword ptr [RBP + -0x8],RAX LAB_001d3b13: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
char * get_charset_name(uint param_1) { uint *puVar1; char *local_10; pthread_once(&charsets_initialized,init_available_charsets); if ((((param_1 < 0x800) && (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 != (uint *)0x0)) && (*puVar1 == param_1)) && (*(long *)(puVar1 + 8) != 0)) { local_10 = *(char **)(puVar1 + 8); } else { local_10 = "?"; } return local_10; }
61,468
get_charset_name
eloqsql/mysys/charset.c
const char *get_charset_name(uint charset_number) { my_pthread_once(&charsets_initialized, init_available_charsets); if (charset_number < array_elements(all_charsets)) { CHARSET_INFO *cs= all_charsets[charset_number]; if (cs && (cs->number == charset_number) && cs->coll_name.str) return cs->coll_name.str; } return "?"; /* this mimics find_type() */ }
O3
c
get_charset_name: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx leaq 0x381c7a(%rip), %rdi # 0x4271e0 leaq -0x302(%rip), %rsi # 0xa526b callq 0x39270 leaq 0x45bb2(%rip), %rcx # 0xeb12b cmpl $0x7ff, %ebx # imm = 0x7FF ja 0xa55a0 movl %ebx, %eax leaq 0x379be6(%rip), %rdx # 0x41f170 movq (%rdx,%rax,8), %rax testq %rax, %rax je 0xa55a0 cmpl %ebx, (%rax) jne 0xa55a0 movq 0x20(%rax), %rax testq %rax, %rax jne 0xa55a3 movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
get_charset_name: push rbp mov rbp, rsp push rbx push rax mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once lea rcx, aSelect_0+0Ah; "?" cmp ebx, 7FFh ja short loc_A55A0 mov eax, ebx lea rdx, all_charsets mov rax, [rdx+rax*8] test rax, rax jz short loc_A55A0 cmp [rax], ebx jnz short loc_A55A0 mov rax, [rax+20h] test rax, rax jnz short loc_A55A3 loc_A55A0: mov rax, rcx loc_A55A3: add rsp, 8 pop rbx pop rbp retn
char * get_charset_name(unsigned int a1) { long long v1; // rax char *result; // rax pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) return "?"; v1 = all_charsets[a1]; if ( !v1 ) return "?"; if ( *(_DWORD *)v1 != a1 ) return "?"; result = *(char **)(v1 + 32); if ( !result ) return "?"; return result; }
get_charset_name: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI LEA RDI,[0x5271e0] LEA RSI,[0x1a526b] CALL 0x00139270 LEA RCX,[0x1eb12b] CMP EBX,0x7ff JA 0x001a55a0 MOV EAX,EBX LEA RDX,[0x51f170] MOV RAX,qword ptr [RDX + RAX*0x8] TEST RAX,RAX JZ 0x001a55a0 CMP dword ptr [RAX],EBX JNZ 0x001a55a0 MOV RAX,qword ptr [RAX + 0x20] TEST RAX,RAX JNZ 0x001a55a3 LAB_001a55a0: MOV RAX,RCX LAB_001a55a3: ADD RSP,0x8 POP RBX POP RBP RET
char * get_charset_name(uint param_1) { uint *puVar1; char *pcVar2; pthread_once(&charsets_initialized,init_available_charsets); if ((((0x7ff < param_1) || (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 == (uint *)0x0)) || (*puVar1 != param_1)) || (pcVar2 = *(char **)(puVar1 + 8), pcVar2 == (char *)0x0)) { pcVar2 = "?"; } return pcVar2; }
61,469
testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper()
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-test-part.cc
HasNewFatalFailureHelper::HasNewFatalFailureHelper() : has_new_fatal_failure_(false), original_reporter_( GetUnitTestImpl()->GetTestPartResultReporterForCurrentThread()) { GetUnitTestImpl()->SetTestPartResultReporterForCurrentThread(this); }
O2
cpp
testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper(): pushq %rbx movq %rdi, %rbx leaq 0x39f99(%rip), %rax # 0x4cf98 movq %rax, (%rdi) movb $0x0, 0x8(%rdi) callq 0x24477 movq %rax, %rdi callq 0x1302e movq %rax, 0x10(%rbx) callq 0x24477 leaq 0x90(%rax), %rdi callq 0x2b71c movq %rbx, (%rax) popq %rbx retq nop
_ZN7testing8internal24HasNewFatalFailureHelperC2Ev: push rbx mov rbx, rdi lea rax, off_4CF98 mov [rdi], rax mov byte ptr [rdi+8], 0 call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void) mov rdi, rax; this call _ZN7testing8internal12UnitTestImpl41GetTestPartResultReporterForCurrentThreadEv; testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(void) mov [rbx+10h], rax call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void) lea rdi, [rax+90h] call _ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv; testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::GetOrCreateValue(void) mov [rax], rbx pop rbx retn
_QWORD * testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper( testing::internal::HasNewFatalFailureHelper *this, int a2) { testing::internal::UnitTestImpl *UnitTestImpl; // rdi int v4; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d _QWORD *result; // rax *(_QWORD *)this = off_4CF98; *((_BYTE *)this + 8) = 0; UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(this); *((_QWORD *)this + 2) = testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(UnitTestImpl); v4 = testing::internal::GetUnitTestImpl(UnitTestImpl); result = (_QWORD *)testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::GetOrCreateValue( v4 + 144, a2, v5, v6, v7, v8); *result = this; return result; }
HasNewFatalFailureHelper: PUSH RBX MOV RBX,RDI LEA RAX,[0x14cf98] MOV qword ptr [RDI],RAX MOV byte ptr [RDI + 0x8],0x0 CALL 0x00124477 MOV RDI,RAX CALL 0x0011302e MOV qword ptr [RBX + 0x10],RAX CALL 0x00124477 LEA RDI,[RAX + 0x90] CALL 0x0012b71c MOV qword ptr [RAX],RBX POP RBX RET
/* testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper() */ void __thiscall testing::internal::HasNewFatalFailureHelper::HasNewFatalFailureHelper (HasNewFatalFailureHelper *this) { UnitTestImpl *this_00; int8 uVar1; long lVar2; int8 *puVar3; *(int ***)this = &PTR__HasNewFatalFailureHelper_0014cf98; this[8] = (HasNewFatalFailureHelper)0x0; this_00 = (UnitTestImpl *)GetUnitTestImpl(); uVar1 = UnitTestImpl::GetTestPartResultReporterForCurrentThread(this_00); *(int8 *)(this + 0x10) = uVar1; lVar2 = GetUnitTestImpl(); puVar3 = (int8 *) ThreadLocal<testing::TestPartResultReporterInterface*>::GetOrCreateValue ((ThreadLocal<testing::TestPartResultReporterInterface*> *)(lVar2 + 0x90)); *puVar3 = this; return; }
61,470
net_stmt_close
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static my_bool net_stmt_close(MYSQL_STMT *stmt, my_bool remove) { char stmt_id[STMT_ID_LENGTH]; MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; /* clear memory */ ma_free_root(&stmt->result.alloc, MYF(0)); /* allocated in mysql_stmt_store_result */ ma_free_root(&stmt->mem_root,MYF(0)); ma_free_root(fields_ma_alloc_root, MYF(0)); if (stmt->mysql) { CLEAR_CLIENT_ERROR(stmt->mysql); /* remove from stmt list */ if (remove) stmt->mysql->stmts= list_delete(stmt->mysql->stmts, &stmt->list); /* check if all data are fetched */ if (stmt->mysql->status != MYSQL_STATUS_READY) { do { stmt->mysql->methods->db_stmt_flush_unbuffered(stmt); } while(mysql_stmt_more_results(stmt)); stmt->mysql->status= MYSQL_STATUS_READY; } if (stmt->state > MYSQL_STMT_INITTED) { int4store(stmt_id, stmt->stmt_id); if (stmt->mysql->methods->db_command(stmt->mysql,COM_STMT_CLOSE, stmt_id, sizeof(stmt_id), 1, stmt)) { UPDATE_STMT_ERROR(stmt); return 1; } } } return 0; }
O3
c
net_stmt_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %r14d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq 0x340(%rdi), %r12 addq $0x90, %rdi xorl %r15d, %r15d xorl %esi, %esi callq 0x1e797 movq %rbx, %rdi xorl %esi, %esi callq 0x1e797 movq %r12, %rdi xorl %esi, %esi callq 0x1e797 movq 0x38(%rbx), %rax testq %rax, %rax je 0x20922 movl $0x0, 0x90(%rax) movq 0x38(%rbx), %rax movw $0x30, 0x29b(%rax) movl $0x30303030, 0x297(%rax) # imm = 0x30303030 movq 0x38(%rbx), %rax movb $0x0, 0x97(%rax) movq 0x38(%rbx), %rax movq 0x2a0(%rax), %rcx testq %rcx, %rcx je 0x20830 movl $0x0, 0x4(%rcx) movq 0x38(%rbx), %rax testb %r14b, %r14b je 0x20857 movq 0x4c8(%rax), %rdi leaq 0x320(%rbx), %rsi callq 0x1d834 movq 0x38(%rbx), %rcx movq %rax, 0x4c8(%rcx) movq 0x38(%rbx), %rax cmpl $0x0, 0x488(%rax) je 0x2088f movq 0x4d0(%rax), %rax movq %rbx, %rdi callq *0x78(%rax) movq 0x38(%rbx), %rax testq %rax, %rax je 0x20885 movzwl 0x380(%rax), %ecx testl $0x1008, %ecx # imm = 0x1008 jne 0x20860 movl $0x0, 0x488(%rax) cmpl $0x0, 0x50(%rbx) je 0x2091f movl 0x40(%rbx), %eax leaq -0x2c(%rbp), %rdx movl %eax, (%rdx) movq 0x38(%rbx), %rdi movq 0x4d0(%rdi), %rax movl $0x4, %ecx movl $0x19, %esi movl $0x1, %r8d movq %rbx, %r9 callq *0x10(%rax) testl %eax, %eax je 0x2091f movq 0x38(%rbx), %rsi movl 0x90(%rsi), %eax movl %eax, 0x108(%rbx) leaq 0x30d(%rbx), %rdi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movl $0x97, %esi addq 0x38(%rbx), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movb $0x1, %r15b jmp 0x20922 xorl %r15d, %r15d movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x20941 movl %r15d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x13500
net_stmt_close: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r14d, esi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax mov r12, [rdi+340h] add rdi, 90h xor r15d, r15d xor esi, esi call ma_free_root mov rdi, rbx xor esi, esi call ma_free_root mov rdi, r12 xor esi, esi call ma_free_root mov rax, [rbx+38h] test rax, rax jz loc_20922 mov dword ptr [rax+90h], 0 mov rax, [rbx+38h] mov word ptr [rax+29Bh], 30h ; '0' mov dword ptr [rax+297h], 30303030h mov rax, [rbx+38h] mov byte ptr [rax+97h], 0 mov rax, [rbx+38h] mov rcx, [rax+2A0h] test rcx, rcx jz short loc_20830 mov dword ptr [rcx+4], 0 mov rax, [rbx+38h] loc_20830: test r14b, r14b jz short loc_20857 mov rdi, [rax+4C8h] lea rsi, [rbx+320h] call list_delete mov rcx, [rbx+38h] mov [rcx+4C8h], rax mov rax, [rbx+38h] loc_20857: cmp dword ptr [rax+488h], 0 jz short loc_2088F loc_20860: mov rax, [rax+4D0h] mov rdi, rbx call qword ptr [rax+78h] mov rax, [rbx+38h] test rax, rax jz short loc_20885 movzx ecx, word ptr [rax+380h] test ecx, 1008h jnz short loc_20860 loc_20885: mov dword ptr [rax+488h], 0 loc_2088F: cmp dword ptr [rbx+50h], 0 jz loc_2091F mov eax, [rbx+40h] lea rdx, [rbp+var_2C] mov [rdx], eax mov rdi, [rbx+38h] mov rax, [rdi+4D0h] mov ecx, 4 mov esi, 19h mov r8d, 1 mov r9, rbx call qword ptr [rax+10h] test eax, eax jz short loc_2091F mov rsi, [rbx+38h] mov eax, [rsi+90h] mov [rbx+108h], eax lea rdi, [rbx+30Dh] add rsi, 297h mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] mov esi, 97h add rsi, [rbx+38h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r15b, 1 jmp short loc_20922 loc_2091F: xor r15d, r15d loc_20922: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_20941 mov eax, r15d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_20941: call ___stack_chk_fail
long long net_stmt_close(long long a1, char a2) { long long v2; // r12 unsigned int v3; // r15d long long v4; // rax long long v5; // rax long long v6; // rcx long long v7; // rsi int v9; // [rsp+4h] [rbp-2Ch] BYREF unsigned long long v10; // [rsp+8h] [rbp-28h] v10 = __readfsqword(0x28u); v2 = *(_QWORD *)(a1 + 832); v3 = 0; ma_free_root(a1 + 144, 0); ma_free_root(a1, 0); ma_free_root(v2, 0); v4 = *(_QWORD *)(a1 + 56); if ( v4 ) { *(_DWORD *)(v4 + 144) = 0; strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; v5 = *(_QWORD *)(a1 + 56); v6 = *(_QWORD *)(v5 + 672); if ( v6 ) { *(_DWORD *)(v6 + 4) = 0; v5 = *(_QWORD *)(a1 + 56); } if ( a2 ) { *(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL) = list_delete(*(_QWORD **)(v5 + 1224), (_QWORD *)(a1 + 800)); v5 = *(_QWORD *)(a1 + 56); } if ( *(_DWORD *)(v5 + 1160) ) { do { (*(void ( **)(long long))(*(_QWORD *)(v5 + 1232) + 120LL))(a1); v5 = *(_QWORD *)(a1 + 56); } while ( v5 && (*(_WORD *)(v5 + 896) & 0x1008) != 0 ); *(_DWORD *)(v5 + 1160) = 0; } if ( *(_DWORD *)(a1 + 80) && (v9 = *(_DWORD *)(a1 + 64), (*(unsigned int ( **)(_QWORD, long long, int *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 16LL))( *(_QWORD *)(a1 + 56), 25LL, &v9, 4LL, 1LL, a1)) ) { v7 = *(_QWORD *)(a1 + 56); *(_DWORD *)(a1 + 264) = *(_DWORD *)(v7 + 144); strncpy(a1 + 781, v7 + 663, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL); *(_BYTE *)(a1 + 779) = 0; LOBYTE(v3) = 1; } else { return 0; } } return v3; }
net_stmt_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14D,ESI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV R12,qword ptr [RDI + 0x340] ADD RDI,0x90 XOR R15D,R15D XOR ESI,ESI CALL 0x0011e797 MOV RDI,RBX XOR ESI,ESI CALL 0x0011e797 MOV RDI,R12 XOR ESI,ESI CALL 0x0011e797 MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x00120922 MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBX + 0x38] MOV word ptr [RAX + 0x29b],0x30 MOV dword ptr [RAX + 0x297],0x30303030 MOV RAX,qword ptr [RBX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBX + 0x38] MOV RCX,qword ptr [RAX + 0x2a0] TEST RCX,RCX JZ 0x00120830 MOV dword ptr [RCX + 0x4],0x0 MOV RAX,qword ptr [RBX + 0x38] LAB_00120830: TEST R14B,R14B JZ 0x00120857 MOV RDI,qword ptr [RAX + 0x4c8] LEA RSI,[RBX + 0x320] CALL 0x0011d834 MOV RCX,qword ptr [RBX + 0x38] MOV qword ptr [RCX + 0x4c8],RAX MOV RAX,qword ptr [RBX + 0x38] LAB_00120857: CMP dword ptr [RAX + 0x488],0x0 JZ 0x0012088f LAB_00120860: MOV RAX,qword ptr [RAX + 0x4d0] MOV RDI,RBX CALL qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x00120885 MOVZX ECX,word ptr [RAX + 0x380] TEST ECX,0x1008 JNZ 0x00120860 LAB_00120885: MOV dword ptr [RAX + 0x488],0x0 LAB_0012088f: CMP dword ptr [RBX + 0x50],0x0 JZ 0x0012091f MOV EAX,dword ptr [RBX + 0x40] LEA RDX,[RBP + -0x2c] MOV dword ptr [RDX],EAX MOV RDI,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RDI + 0x4d0] MOV ECX,0x4 MOV ESI,0x19 MOV R8D,0x1 MOV R9,RBX CALL qword ptr [RAX + 0x10] TEST EAX,EAX JZ 0x0012091f MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI + 0x90] MOV dword ptr [RBX + 0x108],EAX LEA RDI,[RBX + 0x30d] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] MOV ESI,0x97 ADD RSI,qword ptr [RBX + 0x38] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV R15B,0x1 JMP 0x00120922 LAB_0012091f: XOR R15D,R15D LAB_00120922: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00120941 MOV EAX,R15D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00120941: CALL 0x00113500
int8 net_stmt_close(long param_1,char param_2) { int iVar1; int8 uVar2; long lVar3; int8 uVar4; long in_FS_OFFSET; int4 local_34; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *(int8 *)(param_1 + 0x340); uVar4 = 0; ma_free_root(param_1 + 0x90,0); ma_free_root(param_1,0); ma_free_root(uVar2,0); if (*(long *)(param_1 + 0x38) != 0) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; lVar3 = *(long *)(param_1 + 0x38); *(int2 *)(lVar3 + 0x29b) = 0x30; *(int4 *)(lVar3 + 0x297) = 0x30303030; *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; lVar3 = *(long *)(param_1 + 0x38); if (*(long *)(lVar3 + 0x2a0) != 0) { *(int4 *)(*(long *)(lVar3 + 0x2a0) + 4) = 0; lVar3 = *(long *)(param_1 + 0x38); } if (param_2 != '\0') { uVar2 = list_delete(*(int8 *)(lVar3 + 0x4c8),param_1 + 800); *(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8) = uVar2; lVar3 = *(long *)(param_1 + 0x38); } if (*(int *)(lVar3 + 0x488) != 0) { do { (**(code **)(*(long *)(lVar3 + 0x4d0) + 0x78))(param_1); lVar3 = *(long *)(param_1 + 0x38); if (lVar3 == 0) break; } while ((*(ushort *)(lVar3 + 0x380) & 0x1008) != 0); *(int4 *)(lVar3 + 0x488) = 0; } if (*(int *)(param_1 + 0x50) != 0) { local_34 = *(int4 *)(param_1 + 0x40); iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10)) (*(long *)(param_1 + 0x38),0x19,&local_34,4,1,param_1); if (iVar1 != 0) { *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar4 = 1; goto LAB_00120922; } } uVar4 = 0; } LAB_00120922: if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return uVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,471
CLI::IncorrectConstruction::MissingOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Error.hpp
static IncorrectConstruction MissingOption(std::string name) { return IncorrectConstruction("Option " + name + " is not defined"); }
O3
cpp
CLI::IncorrectConstruction::MissingOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rdx movq %rdi, %rbx leaq 0x9a53(%rip), %rsi # 0x37f43 leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x11e48 leaq 0x9a47(%rip), %rsi # 0x37f4b movq %r14, %rdi callq 0x77e0 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x2e533 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x2e53a movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx leaq 0x8(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi callq 0x1d41a movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x2e575 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2e590 movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x2e5ba movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x2e5ba movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2e5d5 movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0x7780 nop
_ZN3CLI21IncorrectConstruction13MissingOptionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx sub rsp, 48h mov rdx, rsi mov rbx, rdi lea rsi, aOption; "Option " lea r14, [rsp+58h+var_30] mov rdi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aIsNotDefined; " is not defined" mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r14, [rsp+58h+var_40] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_2E533 mov [rsp+58h+var_50], rdx mov rdx, [rcx] mov [rsp+58h+var_40], rdx jmp short loc_2E53A loc_2E533: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_2E53A: mov rdx, [rax+8] lea rsi, [rsp+58h+var_50] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx; int call _ZN3CLI21IncorrectConstructionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::IncorrectConstruction::IncorrectConstruction(std::string) mov rdi, [rsp+58h+var_50]; void * cmp rdi, r14 jz short loc_2E575 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E575: lea rax, [rsp+58h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2E590 mov rsi, [rsp+58h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E590: mov rax, rbx add rsp, 48h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_2E5BA mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2E5BA mov rbx, rax loc_2E5BA: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2E5D5 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E5D5: mov rdi, rbx call __Unwind_Resume
long long CLI::IncorrectConstruction::MissingOption(long long a1, _QWORD *a2) { long long v2; // rax __int128 *v3; // rcx void *v5[2]; // [rsp+8h] [rbp-50h] BYREF __int128 v6; // [rsp+18h] [rbp-40h] BYREF void *v7[2]; // [rsp+28h] [rbp-30h] BYREF long long v8; // [rsp+38h] [rbp-20h] BYREF std::operator+<char>((long long)v7, (long long)"Option ", a2); v2 = std::string::append(v7, " is not defined"); v5[0] = &v6; v3 = (__int128 *)(v2 + 16); if ( *(_QWORD *)v2 == v2 + 16 ) { v6 = *v3; } else { v5[0] = *(void **)v2; *(_QWORD *)&v6 = *(_QWORD *)v3; } v5[1] = *(void **)(v2 + 8); *(_QWORD *)v2 = v3; *(_QWORD *)(v2 + 8) = 0LL; *(_BYTE *)(v2 + 16) = 0; CLI::IncorrectConstruction::IncorrectConstruction(a1, (long long)v5); if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); if ( v7[0] != &v8 ) operator delete(v7[0], v8 + 1); return a1; }
MissingOption: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RDX,RSI MOV RBX,RDI LEA RSI,[0x137f43] LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00111e48 LAB_0012e4fd: LEA RSI,[0x137f4b] MOV RDI,R14 CALL 0x001077e0 LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0012e533 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x0012e53a LAB_0012e533: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_0012e53a: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0012e556: MOV RDI,RBX CALL 0x0011d41a LAB_0012e55e: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0012e575 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_0012e575: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012e590 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00107430 LAB_0012e590: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET
/* CLI::IncorrectConstruction::MissingOption(std::__cxx11::string) */ IncorrectConstruction * CLI::IncorrectConstruction::MissingOption(IncorrectConstruction *param_1) { long *plVar1; long *plVar2; long *local_50; long local_40; int4 uStack_38; int4 uStack_34; long *local_30 [2]; long local_20 [2]; std::operator+((char *)local_30,(string *)"Option "); /* try { // try from 0012e4fd to 0012e50b has its CatchHandler @ 0012e5b7 */ plVar1 = (long *)std::__cxx11::string::append((char *)local_30); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_40 = *plVar2; uStack_38 = (int4)plVar1[3]; uStack_34 = *(int4 *)((long)plVar1 + 0x1c); local_50 = &local_40; } else { local_40 = *plVar2; local_50 = (long *)*plVar1; } *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 0012e556 to 0012e55d has its CatchHandler @ 0012e59b */ IncorrectConstruction(param_1); if (local_50 != &local_40) { operator_delete(local_50,local_40 + 1); } if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return param_1; }
61,472
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [22], char const*>(char const (&) [22], char const*&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [22], char const*>(char const (&) [22], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a3d0 movq %rax, %r12 movq (%r14), %rdi callq 0x1a3d0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1ad20 movq %rbx, %rdi movq %r15, %rsi callq 0x1b070 movq (%r14), %rsi movq %rbx, %rdi callq 0x1b070 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xb1bab movq (%r13), %rsi incq %rsi callq 0x1a890 movq %r14, %rdi callq 0x1af20
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_B1BAB mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B1BAB: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[56],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011a3d0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011a3d0 ADD R12,RAX LAB_001b1b66: MOV RDI,RBX MOV RSI,R12 CALL 0x0011ad20 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b070 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011b070 LAB_001b1b87: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [56], char const*>(char const (&) [56], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001b1b66 to 001b1b86 has its CatchHandler @ 001b1b94 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
61,473
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [22], char const*>(char const (&) [22], char const*&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [22], char const*>(char const (&) [22], char const*&&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x429db movq %rbx, %rdi movq %rax, %rsi callq 0x23d20 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x7d95b movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x24158 movq %r14, %rdi callq 0x23f10
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA51_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3); std::string::reserve(a1, v4); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA51_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_( a1, a2, a3); return a1; }
concat<std::__cxx11::string,char_const(&)[51],char_const*>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI MOV RSI,RDX CALL 0x001429db LAB_0017d926: MOV RDI,RBX MOV RSI,RAX CALL 0x00123d20 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0017d95b LAB_0017d93f: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [51], char const*>(char const (&) [51], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; concat_length<char_const*>(param_1,param_2); /* try { // try from 0017d926 to 0017d93e has its CatchHandler @ 0017d948 */ std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA51_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ (this,param_1,param_2); return this; }
61,474
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [22], char const*>(char const (&) [22], char const*&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [22], char const*>(char const (&) [22], char const*&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a3d0 movq %rax, %r12 movq (%r14), %rdi callq 0x1a3d0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1ad20 movq %rbx, %rdi movq %r15, %rsi callq 0x1b070 movq (%r14), %rsi movq %rbx, %rdi callq 0x1b070 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xc5319 movq (%r13), %rsi incq %rsi callq 0x1a890 movq %r14, %rdi callq 0x1af20 nop
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_C5319 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5319: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[28],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011a3d0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011a3d0 ADD R12,RAX LAB_001c52d4: MOV RDI,RBX MOV RSI,R12 CALL 0x0011ad20 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b070 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011b070 LAB_001c52f5: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [28], char const*>(char const (&) [28], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001c52d4 to 001c52f4 has its CatchHandler @ 001c5302 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
61,475
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x7d80d movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x80f9c movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x7d86b addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x24520 movq %rax, %rbx movq %r14, %rdi callq 0x45c5c leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x398ef(%rip), %rsi # 0xb711e leaq 0x8(%rsp), %rdi callq 0x805c1 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x65cd0 xorl %ebp, %ebp leaq 0x816ee(%rip), %rsi # 0xfef48 leaq -0x3af5f(%rip), %rdx # 0x42902 movq %rbx, %rdi callq 0x25150 jmp 0x7d8d5 pushq $0x20 popq %rdi callq 0x24520 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x283ac leaq 0x398bf(%rip), %rsi # 0xb714e leaq 0x398be(%rip), %rcx # 0xb7154 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x80bcb movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x81036 xorl %ebp, %ebp leaq 0x81602(%rip), %rsi # 0xfeec8 leaq -0x3afcb(%rip), %rdx # 0x42902 movq %rbx, %rdi callq 0x25150 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25478 jmp 0x7d8ea movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x7d8fb jmp 0x7d907 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25478 testb %bpl, %bpl jne 0x7d90a jmp 0x7d912 movq %rax, %r14 movq %rbx, %rdi callq 0x247a0 movq %r14, %rdi callq 0x251e0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_7D80D mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_7D86B add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_7D80D: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_7D8D5 loc_7D86B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7D8D5: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7D8EA mov r14, rax mov bpl, 1 loc_7D8EA: lea rdi, [rsp+68h+var_40] jmp short loc_7D8FB jmp short loc_7D907 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_7D8FB: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7D90A jmp short loc_7D912 loc_7D907: mov r14, rax loc_7D90A: mov rdi, rbx; void * call ___cxa_free_exception loc_7D912: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx char v6; // [rsp+0h] [rbp-68h] int v7[6]; // [rsp+8h] [rbp-60h] BYREF char v8; // [rsp+20h] [rbp-48h] const char *v9; // [rsp+28h] [rbp-40h] BYREF int v10; // [rsp+30h] [rbp-38h] int v11; // [rsp+38h] [rbp-30h] char v12; // [rsp+40h] [rbp-28h] int v13; // [rsp+48h] [rbp-20h] int v14; // [rsp+50h] [rbp-18h] int v15; // [rsp+58h] [rbp-10h] char v16; // [rsp+60h] [rbp-8h] if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v7, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, (long long)v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(&v9, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v7, "key '", &v9, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, v6, v7[0], v7[2], v7[4], v8, (int)v9, v10, v11, v12, v13, v14, v15, v16); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0017d80d MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x00180f9c MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0017d86b ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0017d80d: PUSH 0x20 POP RDI CALL 0x00124520 MOV RBX,RAX MOV RDI,R14 CALL 0x00145c5c LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0017d828: LEA RSI,[0x1b711e] LEA RDI,[RSP + 0x8] CALL 0x001805c1 MOV BPL,0x1 LAB_0017d83c: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00165cd0 XOR EBP,EBP LEA RSI,[0x1fef48] LEA RDX,[0x142902] MOV RDI,RBX CALL 0x00125150 LAB_0017d86b: PUSH 0x20 POP RDI CALL 0x00124520 MOV RBX,RAX LAB_0017d876: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x001283ac LAB_0017d888: LEA RSI,[0x1b714e] LEA RCX,[0x1b7154] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00180bcb MOV BPL,0x1 LAB_0017d8a8: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00181036 XOR EBP,EBP LEA RSI,[0x1feec8] LEA RDX,[0x142902] MOV RDI,RBX CALL 0x00125150
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0017d828 to 0017d838 has its CatchHandler @ 0017d907 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0017d83c to 0017d868 has its CatchHandler @ 0017d8f3 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0017d876 to 0017d887 has its CatchHandler @ 0017d8f1 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0017d888 to 0017d8a4 has its CatchHandler @ 0017d8e4 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0017d8a8 to 0017d8d4 has its CatchHandler @ 0017d8d5 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
61,476
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xa819d movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xa8187 movq %rbx, %rdi movq %r15, %rsi callq 0x1b260 testl %eax, %eax je 0xa817c addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xa815d jmp 0xa817f movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xa81fb addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b4f0 movq %rax, %rbx movq %r14, %rdi callq 0x6195a movq %rsp, %rdx movq %rax, (%rdx) leaq 0x4af6f(%rip), %rsi # 0xf312e leaq 0x20(%rsp), %rdi callq 0xad9cf movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x89334 xorl %ebp, %ebp leaq 0x83d5e(%rip), %rsi # 0x12bf48 leaq -0x4a5a9(%rip), %rdx # 0x5dc48 movq %rbx, %rdi callq 0x1c150 jmp 0xa8274 movl $0x20, %edi callq 0x1b4f0 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b460 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x22b0c leaq 0x4af2e(%rip), %rsi # 0xf315e leaq 0x4af2d(%rip), %rcx # 0xf3164 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xadfac movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xae324 xorl %ebp, %ebp leaq 0x83c63(%rip), %rsi # 0x12bec8 leaq -0x4a624(%rip), %rdx # 0x5dc48 movq %rbx, %rdi callq 0x1c150 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa8292 movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba20 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa82dd movq 0x10(%rsp), %rsi jmp 0xa82d5 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa82e7 movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba20 jmp 0xa82e7 jmp 0xa82e4 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa82dd movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba20 testb %bpl, %bpl jne 0xa82e7 jmp 0xa82ef movq %rax, %r14 movq %rbx, %rdi callq 0x1b770 movq %r14, %rdi callq 0x1c1e0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_A819D mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_A8187 loc_A815D: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_A817C add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_A815D jmp short loc_A817F loc_A817C: mov rax, rbx loc_A817F: mov rcx, [r14+8] mov rbx, [rcx+8] loc_A8187: cmp rax, rbx jz short loc_A81FB add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A819D: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_A8274 loc_A81FB: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_A8274: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A8292 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A8292: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_A82DD mov rsi, [rsp+68h+var_58] jmp short loc_A82D5 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_A82E7 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A82E7 jmp short loc_A82E4 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A82DD mov rsi, [rsp+68h+var_38] loc_A82D5: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A82DD: test bpl, bpl jnz short loc_A82E7 jmp short loc_A82EF loc_A82E4: mov r14, rax loc_A82E7: mov rdi, rbx; void * call ___cxa_free_exception loc_A82EF: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001a819d MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001a8187 LAB_001a815d: MOV RDI,RBX MOV RSI,R15 CALL 0x0011b260 TEST EAX,EAX JZ 0x001a817c ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001a815d JMP 0x001a817f LAB_001a817c: MOV RAX,RBX LAB_001a817f: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001a8187: CMP RAX,RBX JZ 0x001a81fb ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a819d: MOV EDI,0x20 CALL 0x0011b4f0 MOV RBX,RAX MOV RDI,R14 CALL 0x0016195a MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001a81b8: LEA RSI,[0x1f312e] LEA RDI,[RSP + 0x20] CALL 0x001ad9cf MOV BPL,0x1 LAB_001a81cc: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x00189334 XOR EBP,EBP LEA RSI,[0x22bf48] LEA RDX,[0x15dc48] MOV RDI,RBX CALL 0x0011c150 LAB_001a81fb: MOV EDI,0x20 CALL 0x0011b4f0 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b460 LEA RDX,[RAX + R15*0x1] LAB_001a821e: MOV RDI,RSP MOV RSI,R15 CALL 0x00122b0c LAB_001a8229: LEA RSI,[0x1f315e] LEA RCX,[0x1f3164] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001adfac MOV BPL,0x1 LAB_001a8247: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001ae324 XOR EBP,EBP LEA RSI,[0x22bec8] LEA RDX,[0x15dc48] MOV RDI,RBX CALL 0x0011c150
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001a81b8 to 001a81c8 has its CatchHandler @ 001a82e4 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001a81cc to 001a81f8 has its CatchHandler @ 001a82bf */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001a821e to 001a8228 has its CatchHandler @ 001a82bd */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001a8229 to 001a8243 has its CatchHandler @ 001a82a2 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001a8247 to 001a8273 has its CatchHandler @ 001a8274 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
61,477
translog_file_init
eloqsql/storage/maria/ma_loghandler.c
static void translog_file_init(TRANSLOG_FILE *file, uint32 number, my_bool is_sync) { pagecache_file_set_null_hooks(&file->handler); file->handler.post_read_hook= translog_page_validator; file->handler.flush_log_callback= maria_flush_log_for_page_none; file->handler.callback_data= (uchar*)file; file->number= number; file->was_recovered= 0; file->is_sync= is_sync; }
O0
c
translog_file_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movb %al, -0xd(%rbp) movq -0x8(%rbp), %rdi addq $0x8, %rdi callq 0x57860 movq -0x8(%rbp), %rax leaq 0x6994(%rip), %rcx # 0x4e630 movq %rcx, 0x28(%rax) movq -0x8(%rbp), %rax leaq 0x1b0e5(%rip), %rcx # 0x62d90 movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movb $0x0, 0x50(%rax) movb -0xd(%rbp), %cl movq -0x8(%rbp), %rax movb %cl, 0x51(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax)
translog_file_init: push rbp mov rbp, rsp sub rsp, 10h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_D], al mov rdi, [rbp+var_8] add rdi, 8 call pagecache_file_set_null_hooks mov rax, [rbp+var_8] lea rcx, translog_page_validator mov [rax+28h], rcx mov rax, [rbp+var_8] lea rcx, maria_flush_log_for_page_none mov [rax+40h], rcx mov rcx, [rbp+var_8] mov rax, [rbp+var_8] mov [rax+48h], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_8] mov byte ptr [rax+50h], 0 mov cl, [rbp+var_D] mov rax, [rbp+var_8] mov [rax+51h], cl add rsp, 10h pop rbp retn
long long translog_file_init(long long a1, int a2, char a3) { long long result; // rax pagecache_file_set_null_hooks(a1 + 8); *(_QWORD *)(a1 + 40) = translog_page_validator; *(_QWORD *)(a1 + 64) = maria_flush_log_for_page_none; *(_QWORD *)(a1 + 72) = a1; *(_DWORD *)a1 = a2; *(_BYTE *)(a1 + 80) = 0; result = a1; *(_BYTE *)(a1 + 81) = a3; return result; }
translog_file_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV byte ptr [RBP + -0xd],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8 CALL 0x00157860 MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x14e630] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x162d90] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x50],0x0 MOV CL,byte ptr [RBP + -0xd] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x51],CL ADD RSP,0x10 POP RBP RET
void translog_file_init(int4 *param_1,int4 param_2,int1 param_3) { pagecache_file_set_null_hooks(param_1 + 2); *(code **)(param_1 + 10) = translog_page_validator; *(code **)(param_1 + 0x10) = maria_flush_log_for_page_none; *(int4 **)(param_1 + 0x12) = param_1; *param_1 = param_2; *(int1 *)(param_1 + 0x14) = 0; *(int1 *)((long)param_1 + 0x51) = param_3; return; }
61,478
u7toa_shift
bluesky950520[P]quickjs/tests/test_conv.c
size_t u7toa_shift(char dest[minimum_length(8)], uint32_t n) { size_t len = 1; uint64_t buf = 0; while (n >= 10) { uint32_t quo = n % 10; n /= 10; gen_digit(buf, '0' + quo); len++; } gen_digit(buf, '0' + n); memcpy(dest, &buf, sizeof buf); return len; }
O0
c
u7toa_shift: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movq $0x1, 0x10(%rsp) movq $0x0, 0x8(%rsp) cmpl $0xa, 0x1c(%rsp) jb 0x22bb movl 0x1c(%rsp), %eax movl $0xa, %ecx xorl %edx, %edx divl %ecx movl %edx, 0x4(%rsp) movl 0x1c(%rsp), %eax movl $0xa, %ecx xorl %edx, %edx divl %ecx movl %eax, 0x1c(%rsp) callq 0x2320 cmpb $0x0, %al je 0x2291 movq 0x8(%rsp), %rax shrq $0x8, %rax movl 0x4(%rsp), %ecx addl $0x30, %ecx movl %ecx, %ecx shlq $0x38, %rcx orq %rcx, %rax movq %rax, 0x8(%rsp) jmp 0x22ab movq 0x8(%rsp), %rax shlq $0x8, %rax movl 0x4(%rsp), %ecx addl $0x30, %ecx movl %ecx, %ecx orq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x223f callq 0x2320 cmpb $0x0, %al je 0x22e4 movq 0x8(%rsp), %rax shrq $0x8, %rax movl 0x1c(%rsp), %ecx addl $0x30, %ecx movl %ecx, %ecx shlq $0x38, %rcx orq %rcx, %rax movq %rax, 0x8(%rsp) jmp 0x22fe movq 0x8(%rsp), %rax shlq $0x8, %rax movl 0x1c(%rsp), %ecx addl $0x30, %ecx movl %ecx, %ecx orq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, (%rax) movq 0x10(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
u7toa_shift: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi mov [rsp+28h+var_18], 1 mov [rsp+28h+var_20], 0 loc_223F: cmp [rsp+28h+var_C], 0Ah jb short loc_22BB mov eax, [rsp+28h+var_C] mov ecx, 0Ah xor edx, edx div ecx mov [rsp+28h+var_24], edx mov eax, [rsp+28h+var_C] mov ecx, 0Ah xor edx, edx div ecx mov [rsp+28h+var_C], eax call is_be cmp al, 0 jz short loc_2291 mov rax, [rsp+28h+var_20] shr rax, 8 mov ecx, [rsp+28h+var_24] add ecx, 30h ; '0' mov ecx, ecx shl rcx, 38h or rax, rcx mov [rsp+28h+var_20], rax jmp short loc_22AB loc_2291: mov rax, [rsp+28h+var_20] shl rax, 8 mov ecx, [rsp+28h+var_24] add ecx, 30h ; '0' mov ecx, ecx or rax, rcx mov [rsp+28h+var_20], rax loc_22AB: mov rax, [rsp+28h+var_18] add rax, 1 mov [rsp+28h+var_18], rax jmp short loc_223F loc_22BB: call is_be cmp al, 0 jz short loc_22E4 mov rax, [rsp+28h+var_20] shr rax, 8 mov ecx, [rsp+28h+var_C] add ecx, 30h ; '0' mov ecx, ecx shl rcx, 38h or rax, rcx mov [rsp+28h+var_20], rax jmp short loc_22FE loc_22E4: mov rax, [rsp+28h+var_20] shl rax, 8 mov ecx, [rsp+28h+var_C] add ecx, 30h ; '0' mov ecx, ecx or rax, rcx mov [rsp+28h+var_20], rax loc_22FE: mov rax, [rsp+28h+var_8] mov rcx, [rsp+28h+var_20] mov [rax], rcx mov rax, [rsp+28h+var_18] add rsp, 28h retn
long long u7toa_shift(unsigned long long *a1, long long a2) { unsigned int v2; // edx unsigned int v4; // [rsp+4h] [rbp-24h] unsigned long long v5; // [rsp+8h] [rbp-20h] unsigned long long v6; // [rsp+8h] [rbp-20h] long long v7; // [rsp+10h] [rbp-18h] unsigned int v8; // [rsp+1Ch] [rbp-Ch] v8 = a2; v7 = 1LL; v5 = 0LL; while ( v8 >= 0xA ) { v4 = v8 % 0xA; v2 = v8 % 0xA; v8 /= 0xAu; if ( (unsigned __int8)is_be(a1, a2, v2) ) v5 = ((unsigned long long)(v4 + 48) << 56) | (v5 >> 8); else v5 = (v4 + 48) | (v5 << 8); ++v7; } if ( (unsigned __int8)((long long (*)(void))is_be)() ) v6 = ((unsigned long long)(v8 + 48) << 56) | (v5 >> 8); else v6 = (v8 + 48) | (v5 << 8); *a1 = v6; return v7; }
u7toa_shift: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI MOV qword ptr [RSP + 0x10],0x1 MOV qword ptr [RSP + 0x8],0x0 LAB_0010223f: CMP dword ptr [RSP + 0x1c],0xa JC 0x001022bb MOV EAX,dword ptr [RSP + 0x1c] MOV ECX,0xa XOR EDX,EDX DIV ECX MOV dword ptr [RSP + 0x4],EDX MOV EAX,dword ptr [RSP + 0x1c] MOV ECX,0xa XOR EDX,EDX DIV ECX MOV dword ptr [RSP + 0x1c],EAX CALL 0x00102320 CMP AL,0x0 JZ 0x00102291 MOV RAX,qword ptr [RSP + 0x8] SHR RAX,0x8 MOV ECX,dword ptr [RSP + 0x4] ADD ECX,0x30 MOV ECX,ECX SHL RCX,0x38 OR RAX,RCX MOV qword ptr [RSP + 0x8],RAX JMP 0x001022ab LAB_00102291: MOV RAX,qword ptr [RSP + 0x8] SHL RAX,0x8 MOV ECX,dword ptr [RSP + 0x4] ADD ECX,0x30 MOV ECX,ECX OR RAX,RCX MOV qword ptr [RSP + 0x8],RAX LAB_001022ab: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x0010223f LAB_001022bb: CALL 0x00102320 CMP AL,0x0 JZ 0x001022e4 MOV RAX,qword ptr [RSP + 0x8] SHR RAX,0x8 MOV ECX,dword ptr [RSP + 0x1c] ADD ECX,0x30 MOV ECX,ECX SHL RCX,0x38 OR RAX,RCX MOV qword ptr [RSP + 0x8],RAX JMP 0x001022fe LAB_001022e4: MOV RAX,qword ptr [RSP + 0x8] SHL RAX,0x8 MOV ECX,dword ptr [RSP + 0x1c] ADD ECX,0x30 MOV ECX,ECX OR RAX,RCX MOV qword ptr [RSP + 0x8],RAX LAB_001022fe: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x28 RET
long u7toa_shift(ulong *param_1,uint param_2) { char cVar1; uint uVar2; int8 local_20; int8 local_18; int4 local_c; local_18 = 1; local_20 = 0; local_c = param_2; while (9 < local_c) { uVar2 = local_c % 10; local_c = local_c / 10; cVar1 = is_be(); if (cVar1 == '\0') { local_20 = local_20 << 8 | (ulong)(uVar2 + 0x30); } else { local_20 = local_20 >> 8 | (ulong)(uVar2 + 0x30) << 0x38; } local_18 = local_18 + 1; } cVar1 = is_be(); if (cVar1 == '\0') { local_20 = local_20 << 8 | (ulong)(local_c + 0x30); } else { local_20 = local_20 >> 8 | (ulong)(local_c + 0x30) << 0x38; } *param_1 = local_20; return local_18; }
61,479
u7toa_shift
bluesky950520[P]quickjs/tests/test_conv.c
size_t u7toa_shift(char dest[minimum_length(8)], uint32_t n) { size_t len = 1; uint64_t buf = 0; while (n >= 10) { uint32_t quo = n % 10; n /= 10; gen_digit(buf, '0' + quo); len++; } gen_digit(buf, '0' + n); memcpy(dest, &buf, sizeof buf); return len; }
O2
c
u7toa_shift: movl %esi, %eax pushq $0x1 popq %rcx xorl %esi, %esi pushq $0xa popq %r8 cmpl $0xa, %eax jb 0x2241 xorl %edx, %edx divl %r8d shlq $0x8, %rsi addq %rdx, %rsi addq $0x30, %rsi incq %rcx jmp 0x2227 shlq $0x8, %rsi movl %eax, %eax addq %rsi, %rax addq $0x30, %rax movq %rax, (%rdi) movq %rcx, %rax retq
u7toa_shift: mov eax, esi push 1 pop rcx xor esi, esi push 0Ah pop r8 loc_2227: cmp eax, 0Ah jb short loc_2241 xor edx, edx div r8d shl rsi, 8 add rsi, rdx add rsi, 30h ; '0' inc rcx jmp short loc_2227 loc_2241: shl rsi, 8 mov eax, eax add rax, rsi add rax, 30h ; '0' mov [rdi], rax mov rax, rcx retn
long long u7toa_shift(_QWORD *a1, unsigned int a2) { long long v3; // rcx long long v4; // rsi long long v5; // rdx v3 = 1LL; v4 = 0LL; while ( a2 >= 0xA ) { v5 = a2 % 0xA; a2 /= 0xAu; v4 = v5 + (v4 << 8) + 48; ++v3; } *a1 = (v4 << 8) + a2 + 48; return v3; }
u7toa_shift: MOV EAX,ESI PUSH 0x1 POP RCX XOR ESI,ESI PUSH 0xa POP R8 LAB_00102227: CMP EAX,0xa JC 0x00102241 XOR EDX,EDX DIV R8D SHL RSI,0x8 ADD RSI,RDX ADD RSI,0x30 INC RCX JMP 0x00102227 LAB_00102241: SHL RSI,0x8 MOV EAX,EAX ADD RAX,RSI ADD RAX,0x30 MOV qword ptr [RDI],RAX MOV RAX,RCX RET
long u7toa_shift(long *param_1,uint param_2) { long lVar1; long lVar2; lVar1 = 1; lVar2 = 0; for (; 9 < param_2; param_2 = param_2 / 10) { lVar2 = lVar2 * 0x100 + (ulong)param_2 % 10 + 0x30; lVar1 = lVar1 + 1; } *param_1 = (ulong)param_2 + lVar2 * 0x100 + 0x30; return lVar1; }
61,480
init_events_transactions_history_long(unsigned int)
eloqsql/storage/perfschema/pfs_events_transactions.cc
int init_events_transactions_history_long(uint events_transactions_history_long_sizing) { events_transactions_history_long_size= events_transactions_history_long_sizing; events_transactions_history_long_full= false; PFS_atomic::store_u32(&events_transactions_history_long_index.m_u32, 0); if (events_transactions_history_long_size == 0) return 0; events_transactions_history_long_array= PFS_MALLOC_ARRAY(& builtin_memory_transactions_history_long, events_transactions_history_long_size, sizeof(PFS_events_transactions), PFS_events_transactions, MYF(MY_ZEROFILL)); return (events_transactions_history_long_array ? 0 : 1); }
O3
cpp
init_events_transactions_history_long(unsigned int): movl %edi, %esi movq %rsi, 0x38daab(%rip) # 0x3d0940 movb $0x0, 0x38dba4(%rip) # 0x3d0a40 xorl %eax, %eax xorl %ecx, %ecx xchgl %ecx, 0x38dbda(%rip) # 0x3d0a80 testl %edi, %edi je 0x42ed7 pushq %rbp movq %rsp, %rbp leaq 0x38944b(%rip), %rdi # 0x3cc300 movl $0x140, %edx # imm = 0x140 movl $0x20, %ecx callq 0x2cd6c movq %rax, %rcx movq %rax, 0x38dbf2(%rip) # 0x3d0ac0 xorl %eax, %eax testq %rcx, %rcx sete %al popq %rbp retq
_Z37init_events_transactions_history_longj: mov esi, edi mov cs:events_transactions_history_long_size, rsi mov cs:events_transactions_history_long_full, 0 xor eax, eax xor ecx, ecx xchg ecx, cs:events_transactions_history_long_index test edi, edi jz short locret_42ED7 push rbp mov rbp, rsp lea rdi, builtin_memory_transactions_history_long mov edx, 140h mov ecx, 20h ; ' ' call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov rcx, rax mov cs:events_transactions_history_long_array, rax xor eax, eax test rcx, rcx setz al pop rbp locret_42ED7: retn
_BOOL8 init_events_transactions_history_long(unsigned int a1) { _BOOL8 result; // rax events_transactions_history_long_size = a1; events_transactions_history_long_full = 0; result = 0LL; _InterlockedExchange(&events_transactions_history_long_index, 0); if ( a1 ) { events_transactions_history_long_array = pfs_malloc_array( (long long)&builtin_memory_transactions_history_long, a1, 0x140uLL); return events_transactions_history_long_array == 0; } return result; }
init_events_transactions_history_long: MOV ESI,EDI MOV qword ptr [0x004d0940],RSI MOV byte ptr [0x004d0a40],0x0 XOR EAX,EAX XOR ECX,ECX XCHG dword ptr [0x004d0a80],ECX TEST EDI,EDI JZ 0x00142ed7 PUSH RBP MOV RBP,RSP LEA RDI,[0x4cc300] MOV EDX,0x140 MOV ECX,0x20 CALL 0x0012cd6c MOV RCX,RAX MOV qword ptr [0x004d0ac0],RAX XOR EAX,EAX TEST RCX,RCX SETZ AL POP RBP LAB_00142ed7: RET
/* init_events_transactions_history_long(unsigned int) */ bool init_events_transactions_history_long(uint param_1) { bool bVar1; events_transactions_history_long_size = (ulong)param_1; events_transactions_history_long_full = 0; bVar1 = false; LOCK(); events_transactions_history_long_index = 0; UNLOCK(); if (param_1 != 0) { events_transactions_history_long_array = pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_transactions_history_long, events_transactions_history_long_size,0x140,0x20); bVar1 = events_transactions_history_long_array == 0; } return bVar1; }
61,481
mp_div1_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_div1_dec(limb_t *tabr, const limb_t *taba, mp_size_t na, limb_t b, limb_t r) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t t0, t1, q; int shift; #if (BF_DEC_BASE % 2) == 0 if (b == 2) { limb_t base_div2; /* Note: only works if base is even */ base_div2 = base >> 1; if (r) r = base_div2; for(i = na - 1; i >= 0; i--) { t0 = taba[i]; tabr[i] = (t0 >> 1) + r; r = 0; if (t0 & 1) r = base_div2; } if (r) r = 1; } else #endif if (na >= UDIV1NORM_THRESHOLD) { shift = clz(b); if (shift == 0) { /* normalized case: b >= 2^(LIMB_BITS-1) */ limb_t b_inv; b_inv = udiv1norm_init(b); for(i = na - 1; i >= 0; i--) { muldq(t1, t0, r, base); adddq(t1, t0, 0, taba[i]); q = udiv1norm(&r, t1, t0, b, b_inv); tabr[i] = q; } } else { limb_t b_inv; b <<= shift; b_inv = udiv1norm_init(b); for(i = na - 1; i >= 0; i--) { muldq(t1, t0, r, base); adddq(t1, t0, 0, taba[i]); t1 = (t1 << shift) | (t0 >> (LIMB_BITS - shift)); t0 <<= shift; q = udiv1norm(&r, t1, t0, b, b_inv); r >>= shift; tabr[i] = q; } } } else { for(i = na - 1; i >= 0; i--) { muldq(t1, t0, r, base); adddq(t1, t0, 0, taba[i]); divdq(q, r, t1, t0, b); tabr[i] = q; } } return r; }
O2
c
mp_div1_dec: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r13 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %r8, 0x8(%rsp) cmpq $0x2, %rcx jne 0x7a2ae movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000 testq %r15, %r15 jle 0x7a291 testq %r13, %r13 cmovneq %rax, %r13 movq -0x8(%rbx,%r15,8), %rcx movq %rcx, %rdx shrq %rdx addq %r13, %rdx movq %rdx, -0x8(%r14,%r15,8) decq %r15 andl $0x1, %ecx movq %rcx, %r13 jmp 0x7a267 xorl %eax, %eax testq %r13, %r13 setne %al movq %rax, %r13 movq %r13, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rcx, %r12 cmpq $0x2, %r15 jle 0x7a2c6 testq %r12, %r12 je 0x7a316 bsrq %r12, %rbp xorq $0x3f, %rbp jmp 0x7a319 movq %r12, 0x10(%rsp) movq 0x10(%rsp), %rbp testq %r15, %r15 jle 0x7a29c movq %r13, %rax movabsq $-0x7538dcfb76180000, %rcx # imm = 0x8AC7230489E80000 mulq %rcx movq %rax, %r13 addq -0x8(%rbx,%r15,8), %r13 leaq -0x1(%r15), %r12 adcq $0x0, %rdx movq %r13, %rdi movq %rdx, %rsi movq %rbp, %rdx xorl %ecx, %ecx callq 0x84d00 movq %rax, -0x8(%r14,%r15,8) imulq %rbp, %rax subq %rax, %r13 movq %r12, %r15 jmp 0x7a2d0 pushq $0x40 popq %rbp testq %rbp, %rbp je 0x7a3bd movl %ebp, %ecx shlq %cl, %r12 movq %r12, %rsi notq %rsi pushq $-0x1 popq %rdi movq %r12, 0x10(%rsp) movq %r12, %rdx xorl %ecx, %ecx callq 0x84d00 movq %rax, 0x20(%rsp) pushq $0x40 popq %rax subq %rbp, %rax movq %rax, 0x18(%rsp) testq %r15, %r15 jle 0x7a29c movq %r13, %rax movabsq $-0x7538dcfb76180000, %rcx # imm = 0x8AC7230489E80000 mulq %rcx addq -0x8(%rbx,%r15,8), %rax adcq $0x0, %rdx movl %ebp, %ecx shlq %cl, %rdx leaq -0x1(%r15), %r12 movq %rax, %rsi movq 0x18(%rsp), %rcx shrq %cl, %rsi orq %rdx, %rsi movl %ebp, %ecx shlq %cl, %rax leaq 0x8(%rsp), %rdi movq %rax, %rdx movq 0x10(%rsp), %rcx movq 0x20(%rsp), %r8 callq 0x7a41e movq 0x8(%rsp), %r13 movl %ebp, %ecx shrq %cl, %r13 movq %r13, 0x8(%rsp) movq %rax, -0x8(%r14,%r15,8) movq %r12, %r15 jmp 0x7a34f movq %r12, %rsi notq %rsi pushq $-0x1 popq %rdi movq %r12, %rdx xorl %ecx, %ecx callq 0x84d00 movq %rax, %r13 testq %r15, %r15 jle 0x7a414 movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000 mulq 0x8(%rsp) addq -0x8(%rbx,%r15,8), %rax leaq -0x1(%r15), %rbp adcq $0x0, %rdx leaq 0x8(%rsp), %rdi movq %rdx, %rsi movq %rax, %rdx movq %r12, %rcx movq %r13, %r8 callq 0x7a41e movq %rax, -0x8(%r14,%r15,8) movq %rbp, %r15 jmp 0x7a3d3 movq 0x8(%rsp), %r13 jmp 0x7a29c
mp_div1_dec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13, r8 mov r15, rdx mov rbx, rsi mov r14, rdi mov [rsp+58h+var_50], r8 cmp rcx, 2 jnz short loc_7A2AE mov rax, 4563918244F40000h loc_7A267: test r15, r15 jle short loc_7A291 test r13, r13 cmovnz r13, rax mov rcx, [rbx+r15*8-8] mov rdx, rcx shr rdx, 1 add rdx, r13 mov [r14+r15*8-8], rdx dec r15 and ecx, 1 mov r13, rcx jmp short loc_7A267 loc_7A291: xor eax, eax test r13, r13 setnz al mov r13, rax loc_7A29C: mov rax, r13 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7A2AE: mov r12, rcx cmp r15, 2 jle short loc_7A2C6 test r12, r12 jz short loc_7A316 bsr rbp, r12 xor rbp, 3Fh jmp short loc_7A319 loc_7A2C6: mov [rsp+58h+var_48], r12 mov rbp, [rsp+58h+var_48] loc_7A2D0: test r15, r15 jle short loc_7A29C mov rax, r13 mov rcx, 8AC7230489E80000h mul rcx mov r13, rax add r13, [rbx+r15*8-8] lea r12, [r15-1] adc rdx, 0 mov rdi, r13 mov rsi, rdx mov rdx, rbp xor ecx, ecx call __udivti3 mov [r14+r15*8-8], rax imul rax, rbp sub r13, rax mov r15, r12 jmp short loc_7A2D0 loc_7A316: push 40h ; '@' pop rbp loc_7A319: test rbp, rbp jz loc_7A3BD mov ecx, ebp shl r12, cl mov rsi, r12 not rsi push 0FFFFFFFFFFFFFFFFh pop rdi mov [rsp+58h+var_48], r12 mov rdx, r12 xor ecx, ecx call __udivti3 mov [rsp+58h+var_38], rax push 40h ; '@' pop rax sub rax, rbp mov [rsp+58h+var_40], rax loc_7A34F: test r15, r15 jle loc_7A29C mov rax, r13 mov rcx, 8AC7230489E80000h mul rcx add rax, [rbx+r15*8-8] adc rdx, 0 mov ecx, ebp shl rdx, cl lea r12, [r15-1] mov rsi, rax mov rcx, [rsp+58h+var_40] shr rsi, cl or rsi, rdx mov ecx, ebp shl rax, cl lea rdi, [rsp+58h+var_50] mov rdx, rax mov rcx, [rsp+58h+var_48] mov r8, [rsp+58h+var_38] call udiv1norm mov r13, [rsp+58h+var_50] mov ecx, ebp shr r13, cl mov [rsp+58h+var_50], r13 mov [r14+r15*8-8], rax mov r15, r12 jmp short loc_7A34F loc_7A3BD: mov rsi, r12 not rsi push 0FFFFFFFFFFFFFFFFh pop rdi mov rdx, r12 xor ecx, ecx call __udivti3 mov r13, rax loc_7A3D3: test r15, r15 jle short loc_7A414 mov rax, 8AC7230489E80000h mul [rsp+58h+var_50] add rax, [rbx+r15*8-8] lea rbp, [r15-1] adc rdx, 0 lea rdi, [rsp+58h+var_50] mov rsi, rdx mov rdx, rax mov rcx, r12 mov r8, r13 call udiv1norm mov [r14+r15*8-8], rax mov r15, rbp jmp short loc_7A3D3 loc_7A414: mov r13, [rsp+58h+var_50] jmp loc_7A29C
_BOOL8 mp_div1_dec(long long a1, long long a2, long long a3, unsigned long long a4, long long a5) { long long v5; // r13 long long v6; // r15 unsigned long long v7; // rcx unsigned long long v10; // rbp unsigned long long v11; // rbp long long v13; // rdx long long v14; // r13 long long v15; // rax long long v16; // rax long long v17; // r13 unsigned long long v18; // [rsp+8h] [rbp-50h] BYREF unsigned long long v19; // [rsp+10h] [rbp-48h] unsigned long long v20; // [rsp+18h] [rbp-40h] long long v21; // [rsp+20h] [rbp-38h] v5 = a5; v6 = a3; v18 = a5; if ( a4 == 2 ) { while ( v6 > 0 ) { if ( v5 ) v5 = 5000000000000000000LL; v7 = *(_QWORD *)(a2 + 8 * v6 - 8); *(_QWORD *)(a1 + 8 * v6-- - 8) = v5 + (v7 >> 1); v5 = v7 & 1; } return v5 != 0; } else if ( a3 <= 2 ) { v19 = a4; while ( v6 > 0 ) { v13 = (*(unsigned long long *)(a2 + 8 * v6 - 8) + 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64; v14 = *(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v5; v15 = _udivti3(v14, v13, a4, 0LL); *(_QWORD *)(a1 + 8 * v6 - 8) = v15; v5 = v14 - a4 * v15; --v6; } } else { if ( a4 ) { _BitScanReverse64(&v10, a4); v11 = v10 ^ 0x3F; } else { v11 = 64LL; } if ( v11 ) { v19 = a4 << v11; v21 = _udivti3(-1LL, ~(a4 << v11), a4 << v11, 0LL); v20 = 64 - v11; while ( v6 > 0 ) { v16 = udiv1norm( &v18, ((*(unsigned long long *)(a2 + 8 * v6 - 8) + 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64 << v11) | ((unsigned long long)(*(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v5) >> v20), (*(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v5) << v11, v19, v21); v5 = v18 >> v11; v18 >>= v11; *(_QWORD *)(a1 + 8 * v6-- - 8) = v16; } } else { v17 = _udivti3(-1LL, ~a4, a4, 0LL); while ( v6 > 0 ) { *(_QWORD *)(a1 + 8 * v6 - 8) = udiv1norm( &v18, (*(unsigned long long *)(a2 + 8 * v6 - 8) + v18 * (unsigned __int128)0x8AC7230489E80000LL) >> 64, *(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v18, a4, v17); --v6; } return v18; } } return v5; }
mp_div1_dec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13,R8 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV qword ptr [RSP + 0x8],R8 CMP RCX,0x2 JNZ 0x0017a2ae MOV RAX,0x4563918244f40000 LAB_0017a267: TEST R15,R15 JLE 0x0017a291 TEST R13,R13 CMOVNZ R13,RAX MOV RCX,qword ptr [RBX + R15*0x8 + -0x8] MOV RDX,RCX SHR RDX,0x1 ADD RDX,R13 MOV qword ptr [R14 + R15*0x8 + -0x8],RDX DEC R15 AND ECX,0x1 MOV R13,RCX JMP 0x0017a267 LAB_0017a291: XOR EAX,EAX TEST R13,R13 SETNZ AL MOV R13,RAX LAB_0017a29c: MOV RAX,R13 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017a2ae: MOV R12,RCX CMP R15,0x2 JLE 0x0017a2c6 TEST R12,R12 JZ 0x0017a316 BSR RBP,R12 XOR RBP,0x3f JMP 0x0017a319 LAB_0017a2c6: MOV qword ptr [RSP + 0x10],R12 MOV RBP,qword ptr [RSP + 0x10] LAB_0017a2d0: TEST R15,R15 JLE 0x0017a29c MOV RAX,R13 MOV RCX,-0x7538dcfb76180000 MUL RCX MOV R13,RAX ADD R13,qword ptr [RBX + R15*0x8 + -0x8] LEA R12,[R15 + -0x1] ADC RDX,0x0 MOV RDI,R13 MOV RSI,RDX MOV RDX,RBP XOR ECX,ECX CALL 0x00184d00 MOV qword ptr [R14 + R15*0x8 + -0x8],RAX IMUL RAX,RBP SUB R13,RAX MOV R15,R12 JMP 0x0017a2d0 LAB_0017a316: PUSH 0x40 POP RBP LAB_0017a319: TEST RBP,RBP JZ 0x0017a3bd MOV ECX,EBP SHL R12,CL MOV RSI,R12 NOT RSI PUSH -0x1 POP RDI MOV qword ptr [RSP + 0x10],R12 MOV RDX,R12 XOR ECX,ECX CALL 0x00184d00 MOV qword ptr [RSP + 0x20],RAX PUSH 0x40 POP RAX SUB RAX,RBP MOV qword ptr [RSP + 0x18],RAX LAB_0017a34f: TEST R15,R15 JLE 0x0017a29c MOV RAX,R13 MOV RCX,-0x7538dcfb76180000 MUL RCX ADD RAX,qword ptr [RBX + R15*0x8 + -0x8] ADC RDX,0x0 MOV ECX,EBP SHL RDX,CL LEA R12,[R15 + -0x1] MOV RSI,RAX MOV RCX,qword ptr [RSP + 0x18] SHR RSI,CL OR RSI,RDX MOV ECX,EBP SHL RAX,CL LEA RDI,[RSP + 0x8] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x20] CALL 0x0017a41e MOV R13,qword ptr [RSP + 0x8] MOV ECX,EBP SHR R13,CL MOV qword ptr [RSP + 0x8],R13 MOV qword ptr [R14 + R15*0x8 + -0x8],RAX MOV R15,R12 JMP 0x0017a34f LAB_0017a3bd: MOV RSI,R12 NOT RSI PUSH -0x1 POP RDI MOV RDX,R12 XOR ECX,ECX CALL 0x00184d00 MOV R13,RAX LAB_0017a3d3: TEST R15,R15 JLE 0x0017a414 MOV RAX,-0x7538dcfb76180000 MUL qword ptr [RSP + 0x8] ADD RAX,qword ptr [RBX + R15*0x8 + -0x8] LEA RBP,[R15 + -0x1] ADC RDX,0x0 LEA RDI,[RSP + 0x8] MOV RSI,RDX MOV RDX,RAX MOV RCX,R12 MOV R8,R13 CALL 0x0017a41e MOV qword ptr [R14 + R15*0x8 + -0x8],RAX MOV R15,RBP JMP 0x0017a3d3 LAB_0017a414: MOV R13,qword ptr [RSP + 0x8] JMP 0x0017a29c
ulong mp_div1_dec(long param_1,long param_2,long param_3,ulong param_4,ulong param_5) { ulong *puVar1; int1 auVar2 [16]; int1 auVar3 [16]; int1 auVar4 [16]; byte bVar5; long lVar6; ulong uVar7; int8 uVar8; int8 uVar9; ulong uVar10; long lVar11; ulong local_50; ulong local_48; long lStack_40; int8 uStack_38; if (param_4 == 2) { for (; 0 < param_3; param_3 = param_3 + -1) { if (param_5 != 0) { param_5 = 5000000000000000000; } uVar10 = *(ulong *)(param_2 + -8 + param_3 * 8); *(ulong *)(param_1 + -8 + param_3 * 8) = (uVar10 >> 1) + param_5; param_5 = (ulong)((uint)uVar10 & 1); } param_5 = (ulong)(param_5 != 0); } else { local_50 = param_5; local_48 = param_4; if (param_3 < 3) { for (; 0 < param_3; param_3 = param_3 + -1) { auVar2._8_8_ = 0; auVar2._0_8_ = param_5; uVar10 = SUB168(auVar2 * ZEXT816(10000000000000000000),0); puVar1 = (ulong *)(param_2 + -8 + param_3 * 8); lVar11 = uVar10 + *puVar1; lVar6 = __udivti3(lVar11,SUB168(auVar2 * ZEXT816(10000000000000000000),8) + (ulong)CARRY8(uVar10,*puVar1),param_4,0); *(long *)(param_1 + -8 + param_3 * 8) = lVar6; param_5 = lVar11 - lVar6 * param_4; } } else { if (param_4 == 0) { uVar10 = 0x40; } else { uVar10 = 0x3f; if (param_4 != 0) { for (; param_4 >> uVar10 == 0; uVar10 = uVar10 - 1) { } } uVar10 = uVar10 ^ 0x3f; } if (uVar10 == 0) { uVar8 = __udivti3(0xffffffffffffffff,~param_4,param_4,0); for (; param_5 = local_50, 0 < param_3; param_3 = param_3 + -1) { auVar4._8_8_ = 0; auVar4._0_8_ = local_50; uVar10 = SUB168(ZEXT816(10000000000000000000) * auVar4,0); puVar1 = (ulong *)(param_2 + -8 + param_3 * 8); uVar9 = udiv1norm(&local_50, SUB168(ZEXT816(10000000000000000000) * auVar4,8) + (ulong)CARRY8(uVar10,*puVar1),uVar10 + *puVar1,param_4,uVar8); *(int8 *)(param_1 + -8 + param_3 * 8) = uVar9; } } else { bVar5 = (byte)uVar10; local_48 = param_4 << (bVar5 & 0x3f); uStack_38 = __udivti3(0xffffffffffffffff,~local_48,local_48,0); lStack_40 = 0x40 - uVar10; for (; 0 < param_3; param_3 = param_3 + -1) { auVar3._8_8_ = 0; auVar3._0_8_ = param_5; uVar10 = SUB168(auVar3 * ZEXT816(10000000000000000000),0); puVar1 = (ulong *)(param_2 + -8 + param_3 * 8); uVar7 = uVar10 + *puVar1; uVar8 = udiv1norm(&local_50, uVar7 >> ((byte)lStack_40 & 0x3f) | SUB168(auVar3 * ZEXT816(10000000000000000000),8) + (ulong)CARRY8(uVar10,*puVar1) << (bVar5 & 0x3f),uVar7 << (bVar5 & 0x3f), local_48,uStack_38); param_5 = local_50 >> (bVar5 & 0x3f); *(int8 *)(param_1 + -8 + param_3 * 8) = uVar8; local_50 = param_5; } } } } return param_5; }
61,482
ma_report_error
eloqsql/storage/maria/ma_info.c
void _ma_report_error(int errcode, const LEX_STRING *name, myf flags) { size_t length; const char *file_name= name->str; DBUG_ENTER("_ma_report_error"); DBUG_PRINT("enter",("error: %d table: '%s'", errcode, file_name)); if ((length= name->length) > 64) { /* we first remove the directory */ size_t dir_length= dirname_length(file_name); file_name+= dir_length; if ((length-= dir_length) > 64) { /* still too long, chop start of table name */ file_name+= length - 64; } } my_printf_error(errcode, "Got error '%M' for '%s'", flags, (int) errcode, file_name); DBUG_VOID_RETURN; }
O0
c
ma_report_error: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0x33780 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x40, %rax jbe 0x337d2 movq -0x28(%rbp), %rdi callq 0xdf620 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $0x40, %rax jbe 0x337d0 movq -0x20(%rbp), %rax subq $0x40, %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x337d2 movl -0x4(%rbp), %edi movq -0x18(%rbp), %rdx movl -0x4(%rbp), %ecx movq -0x28(%rbp), %r8 leaq 0x11dd23(%rip), %rsi # 0x15150a movb $0x0, %al callq 0xefcc0 jmp 0x337f0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_report_error: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax jmp short $+2 loc_33780: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax cmp rax, 40h ; '@' jbe short loc_337D2 mov rdi, [rbp+var_28] call dirname_length mov [rbp+var_30], rax mov rax, [rbp+var_30] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax cmp rax, 40h ; '@' jbe short loc_337D0 mov rax, [rbp+var_20] sub rax, 40h ; '@' add rax, [rbp+var_28] mov [rbp+var_28], rax loc_337D0: jmp short $+2 loc_337D2: mov edi, [rbp+var_4] mov rdx, [rbp+var_18] mov ecx, [rbp+var_4] mov r8, [rbp+var_28] lea rsi, aGotErrorMForS; "Got error '%M' for '%s'" mov al, 0 call my_printf_error jmp short $+2 loc_337F0: add rsp, 30h pop rbp retn
long long ma_report_error(int a1, long long *a2, int a3, long long a4, long long a5, int a6) { long long v7; // [rsp+0h] [rbp-30h] long long v8; // [rsp+8h] [rbp-28h] unsigned long long v9; // [rsp+10h] [rbp-20h] unsigned long long v10; // [rsp+10h] [rbp-20h] v8 = *a2; v9 = a2[1]; if ( v9 > 0x40 ) { v7 = dirname_length(v8); LODWORD(v8) = v8 + v7; v10 = v9 - v7; if ( v10 > 0x40 ) LODWORD(v8) = v8 + v10 - 64; } return my_printf_error(a1, (unsigned int)"Got error '%M' for '%s'", a3, a1, v8, a6, v7); }
_ma_report_error: 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 RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x00133780 LAB_00133780: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x40 JBE 0x001337d2 MOV RDI,qword ptr [RBP + -0x28] CALL 0x001df620 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x40 JBE 0x001337d0 MOV RAX,qword ptr [RBP + -0x20] SUB RAX,0x40 ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_001337d0: JMP 0x001337d2 LAB_001337d2: MOV EDI,dword ptr [RBP + -0x4] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x4] MOV R8,qword ptr [RBP + -0x28] LEA RSI,[0x25150a] MOV AL,0x0 CALL 0x001efcc0 JMP 0x001337f0 LAB_001337f0: ADD RSP,0x30 POP RBP RET
void _ma_report_error(int4 param_1,long *param_2,int8 param_3) { long lVar1; ulong uVar2; long local_30; local_30 = *param_2; uVar2 = param_2[1]; if (0x40 < uVar2) { lVar1 = dirname_length(local_30); local_30 = lVar1 + local_30; uVar2 = uVar2 - lVar1; if (0x40 < uVar2) { local_30 = (uVar2 - 0x40) + local_30; } } my_printf_error(param_1,"Got error \'%M\' for \'%s\'",param_3,param_1,local_30); return; }
61,483
ma_report_error
eloqsql/storage/maria/ma_info.c
void _ma_report_error(int errcode, const LEX_STRING *name, myf flags) { size_t length; const char *file_name= name->str; DBUG_ENTER("_ma_report_error"); DBUG_PRINT("enter",("error: %d table: '%s'", errcode, file_name)); if ((length= name->length) > 64) { /* we first remove the directory */ size_t dir_length= dirname_length(file_name); file_name+= dir_length; if ((length-= dir_length) > 64) { /* still too long, chop start of table name */ file_name+= length - 64; } } my_printf_error(errcode, "Got error '%M' for '%s'", flags, (int) errcode, file_name); DBUG_VOID_RETURN; }
O3
c
ma_report_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movl %edi, %r14d movq (%rsi), %r15 movq 0x8(%rsi), %r12 cmpq $0x41, %r12 jb 0x369cc movq %r15, %rdi callq 0x94900 leaq (%r15,%rax), %rcx addq %r12, %r15 addq $-0x40, %r15 subq %rax, %r12 cmpq $0x41, %r12 cmovbq %rcx, %r15 leaq 0xa2cbf(%rip), %rsi # 0xd9692 movl %r14d, %edi movq %rbx, %rdx movl %r14d, %ecx movq %r15, %r8 xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x9e2f1
_ma_report_error: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14d, edi mov r15, [rsi] mov r12, [rsi+8] cmp r12, 41h ; 'A' jb short loc_369CC mov rdi, r15 call dirname_length lea rcx, [r15+rax] add r15, r12 add r15, 0FFFFFFFFFFFFFFC0h sub r12, rax cmp r12, 41h ; 'A' cmovb r15, rcx loc_369CC: lea rsi, aGotErrorMForS; "Got error '%M' for '%s'" mov edi, r14d mov rdx, rbx mov ecx, r14d mov r8, r15 xor eax, eax pop rbx pop r12 pop r14 pop r15 pop rbp jmp my_printf_error
long long ma_report_error(int a1, _QWORD *a2, int a3, long long a4, long long a5, int a6) { long long v7; // r15 unsigned long long v8; // r12 long long v9; // rax int v10; // ecx v7 = *a2; v8 = a2[1]; if ( v8 >= 0x41 ) { v9 = dirname_length(*a2); v10 = v7 + v9; LODWORD(v7) = v8 + v7 - 64; if ( v8 - v9 < 0x41 ) LODWORD(v7) = v10; } return my_printf_error(a1, (unsigned int)"Got error '%M' for '%s'", a3, a1, v7, a6); }
_ma_report_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14D,EDI MOV R15,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] CMP R12,0x41 JC 0x001369cc MOV RDI,R15 CALL 0x00194900 LEA RCX,[R15 + RAX*0x1] ADD R15,R12 ADD R15,-0x40 SUB R12,RAX CMP R12,0x41 CMOVC R15,RCX LAB_001369cc: LEA RSI,[0x1d9692] MOV EDI,R14D MOV RDX,RBX MOV ECX,R14D MOV R8,R15 XOR EAX,EAX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0019e2f1
void _ma_report_error(int4 param_1,long *param_2,int8 param_3) { long lVar1; ulong uVar2; long lVar3; long lVar4; lVar1 = *param_2; uVar2 = param_2[1]; lVar4 = lVar1; if (0x40 < uVar2) { lVar3 = dirname_length(lVar1); lVar4 = lVar1 + uVar2 + -0x40; if (uVar2 - lVar3 < 0x41) { lVar4 = lVar1 + lVar3; } } my_printf_error(param_1,"Got error \'%M\' for \'%s\'",param_3,param_1,lVar4); return; }
61,484
ggml_conv_transpose_1d
llama.cpp/ggml/src/ggml.c
ggml_tensor * ggml_conv_transpose_1d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int p0, int d0) { GGML_ASSERT(ggml_is_matrix(b)); GGML_ASSERT(a->ne[2] == b->ne[1]); GGML_ASSERT(a->ne[3] == 1); GGML_ASSERT(p0 == 0); GGML_ASSERT(d0 == 1); const int64_t ne[4] = { ggml_calc_conv_transpose_1d_output_size(b->ne[0], a->ne[0], s0, 0 /*p0*/, 1 /*d0*/), a->ne[1], b->ne[2], 1, }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); int32_t params[] = { s0, p0, d0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_CONV_TRANSPOSE_1D; result->src[0] = a; result->src[1] = b; return result; }
O3
c
ggml_conv_transpose_1d: pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp cmpq $0x1, 0x20(%rdx) jne 0x1d430 movq %rdx, %rbx cmpq $0x1, 0x28(%rdx) jne 0x1d430 movq %rsi, %r14 movq 0x20(%rsi), %rax cmpq 0x18(%rbx), %rax jne 0x1d44f cmpq $0x1, 0x28(%r14) jne 0x1d46b testl %r8d, %r8d jne 0x1d487 cmpl $0x1, %r9d jne 0x1d4a3 movl %ecx, %ebp movq 0x10(%rbx), %rax decq %rax movslq %ecx, %rdx imulq %rax, %rdx addq 0x10(%r14), %rdx movq %rsp, %rcx movq %rdx, (%rcx) movq 0x18(%r14), %rax movq %rax, 0x8(%rcx) movl $0x1, %eax movq %rax, 0x10(%rcx) movq %rax, 0x18(%rcx) xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19be7 testq %rax, %rax je 0x1d4bf movl %ebp, 0x54(%rax) movabsq $0x100000000, %rcx # imm = 0x100000000 movq %rcx, 0x58(%rax) movl $0x30, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x2d1dc(%rip), %rdi # 0x4a613 leaq 0x2d210(%rip), %rdx # 0x4a64e leaq 0x2d89c(%rip), %rcx # 0x4ace1 movl $0xf76, %esi # imm = 0xF76 jmp 0x1d4d9 leaq 0x2d1bd(%rip), %rdi # 0x4a613 leaq 0x2d1f1(%rip), %rdx # 0x4a64e leaq 0x2d6eb(%rip), %rcx # 0x4ab4f movl $0xf77, %esi # imm = 0xF77 jmp 0x1d4d9 leaq 0x2d1a1(%rip), %rdi # 0x4a613 leaq 0x2d1d5(%rip), %rdx # 0x4a64e leaq 0x2d873(%rip), %rcx # 0x4acf3 movl $0xf78, %esi # imm = 0xF78 jmp 0x1d4d9 leaq 0x2d185(%rip), %rdi # 0x4a613 leaq 0x2d1b9(%rip), %rdx # 0x4a64e leaq 0x2d865(%rip), %rcx # 0x4ad01 movl $0xf7a, %esi # imm = 0xF7A jmp 0x1d4d9 leaq 0x2d169(%rip), %rdi # 0x4a613 leaq 0x2d19d(%rip), %rdx # 0x4a64e leaq 0x2d851(%rip), %rcx # 0x4ad09 movl $0xf7b, %esi # imm = 0xF7B jmp 0x1d4d9 leaq 0x2f2bd(%rip), %rdi # 0x4c783 leaq 0x2d181(%rip), %rdx # 0x4a64e leaq 0x2f2ef(%rip), %rcx # 0x4c7c3 movl $0x70, %esi xorl %eax, %eax callq 0x17c80
ggml_conv_transpose_1d: push rbp push r14 push rbx sub rsp, 20h cmp qword ptr [rdx+20h], 1 jnz loc_1D430 mov rbx, rdx cmp qword ptr [rdx+28h], 1 jnz loc_1D430 mov r14, rsi mov rax, [rsi+20h] cmp rax, [rbx+18h] jnz loc_1D44F cmp qword ptr [r14+28h], 1 jnz loc_1D46B test r8d, r8d jnz loc_1D487 cmp r9d, 1 jnz loc_1D4A3 mov ebp, ecx mov rax, [rbx+10h] dec rax movsxd rdx, ecx imul rdx, rax add rdx, [r14+10h] mov rcx, rsp mov [rcx], rdx mov rax, [r14+18h] mov [rcx+8], rax mov eax, 1 mov [rcx+10h], rax mov [rcx+18h], rax xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl test rax, rax jz loc_1D4BF mov [rax+54h], ebp mov rcx, 100000000h mov [rax+58h], rcx mov dword ptr [rax+50h], 30h ; '0' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 20h pop rbx pop r14 pop rbp retn loc_1D430: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixB; "ggml_is_matrix(b)" mov esi, 0F76h jmp loc_1D4D9 loc_1D44F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe2BNe1; "a->ne[2] == b->ne[1]" mov esi, 0F77h jmp short loc_1D4D9 loc_1D46B: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe31; "a->ne[3] == 1" mov esi, 0F78h jmp short loc_1D4D9 loc_1D487: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP00; "p0 == 0" mov esi, 0F7Ah jmp short loc_1D4D9 loc_1D4A3: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD01; "d0 == 1" mov esi, 0F7Bh jmp short loc_1D4D9 loc_1D4BF: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1D4D9: xor eax, eax call _ggml_abort
long long ggml_conv_transpose_1d(long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6) { long long result; // rax const char *v9; // rdi const char *v10; // rcx int v11; // esi _QWORD v12[7]; // [rsp+0h] [rbp-38h] BYREF if ( a3[4] != 1LL || a3[5] != 1LL ) { v9 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v10 = "ggml_is_matrix(b)"; v11 = 3958; goto LABEL_15; } if ( a2[4] != a3[3] ) { v9 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v10 = "a->ne[2] == b->ne[1]"; v11 = 3959; goto LABEL_15; } if ( a2[5] != 1LL ) { v9 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v10 = "a->ne[3] == 1"; v11 = 3960; goto LABEL_15; } if ( a5 ) { v9 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v10 = "p0 == 0"; v11 = 3962; goto LABEL_15; } if ( a6 != 1 ) { v9 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v10 = "d0 == 1"; v11 = 3963; goto LABEL_15; } v12[0] = a2[2] + (a3[2] - 1LL) * a4; v12[1] = a2[3]; v12[2] = 1LL; v12[3] = 1LL; result = ggml_new_tensor_impl(a1, 0, 4u, v12, 0LL, 0LL); if ( !result ) { v9 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h"; v10 = "tensor != NULL"; v11 = 112; LABEL_15: ggml_abort((_DWORD)v9, v11, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v10, a5, a6); } *(_DWORD *)(result + 84) = a4; *(_QWORD *)(result + 88) = 0x100000000LL; *(_DWORD *)(result + 80) = 48; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_conv_transpose_1d: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 CMP qword ptr [RDX + 0x20],0x1 JNZ 0x0011d430 MOV RBX,RDX CMP qword ptr [RDX + 0x28],0x1 JNZ 0x0011d430 MOV R14,RSI MOV RAX,qword ptr [RSI + 0x20] CMP RAX,qword ptr [RBX + 0x18] JNZ 0x0011d44f CMP qword ptr [R14 + 0x28],0x1 JNZ 0x0011d46b TEST R8D,R8D JNZ 0x0011d487 CMP R9D,0x1 JNZ 0x0011d4a3 MOV EBP,ECX MOV RAX,qword ptr [RBX + 0x10] DEC RAX MOVSXD RDX,ECX IMUL RDX,RAX ADD RDX,qword ptr [R14 + 0x10] MOV RCX,RSP MOV qword ptr [RCX],RDX MOV RAX,qword ptr [R14 + 0x18] MOV qword ptr [RCX + 0x8],RAX MOV EAX,0x1 MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],RAX XOR ESI,ESI MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119be7 TEST RAX,RAX JZ 0x0011d4bf MOV dword ptr [RAX + 0x54],EBP MOV RCX,0x100000000 MOV qword ptr [RAX + 0x58],RCX MOV dword ptr [RAX + 0x50],0x30 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_0011d430: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ace1] MOV ESI,0xf76 JMP 0x0011d4d9 LAB_0011d44f: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ab4f] MOV ESI,0xf77 JMP 0x0011d4d9 LAB_0011d46b: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14acf3] MOV ESI,0xf78 JMP 0x0011d4d9 LAB_0011d487: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ad01] MOV ESI,0xf7a JMP 0x0011d4d9 LAB_0011d4a3: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ad09] MOV ESI,0xf7b JMP 0x0011d4d9 LAB_0011d4bf: LEA RDI,[0x14c783] LEA RDX,[0x14a64e] LEA RCX,[0x14c7c3] MOV ESI,0x70 LAB_0011d4d9: XOR EAX,EAX CALL 0x00117c80
void ggml_conv_transpose_1d (int8 param_1,long param_2,long param_3,int param_4,int param_5,int param_6) { long lVar1; char *pcVar2; int8 uVar3; char *pcVar4; long local_38; int8 local_30; int8 local_28; int8 local_20; if ((*(long *)(param_3 + 0x20) == 1) && (*(long *)(param_3 + 0x28) == 1)) { if (*(long *)(param_2 + 0x20) == *(long *)(param_3 + 0x18)) { if (*(long *)(param_2 + 0x28) == 1) { if (param_5 == 0) { if (param_6 == 1) { local_38 = (long)param_4 * (*(long *)(param_3 + 0x10) + -1) + *(long *)(param_2 + 0x10); local_30 = *(int8 *)(param_2 + 0x18); local_28 = 1; local_20 = 1; lVar1 = ggml_new_tensor_impl(param_1,0,4,&local_38,0,0); if (lVar1 != 0) { *(int *)(lVar1 + 0x54) = param_4; *(int8 *)(lVar1 + 0x58) = 0x100000000; *(int4 *)(lVar1 + 0x50) = 0x30; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return; } pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h"; pcVar2 = "tensor != NULL"; uVar3 = 0x70; } else { pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar2 = "d0 == 1"; uVar3 = 0xf7b; } } else { pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar2 = "p0 == 0"; uVar3 = 0xf7a; } } else { pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar2 = "a->ne[3] == 1"; uVar3 = 0xf78; } } else { pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar2 = "a->ne[2] == b->ne[1]"; uVar3 = 0xf77; } } else { pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar2 = "ggml_is_matrix(b)"; uVar3 = 0xf76; } /* WARNING: Subroutine does not return */ ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
61,485
ma_ft_update
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_update(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *oldrec, const uchar *newrec, my_off_t pos) { int error= -1; FT_WORD *oldlist,*newlist, *old_word, *new_word; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; int cmp, cmp2; DBUG_ENTER("_ma_ft_update"); if (!(old_word=oldlist=_ma_ft_parserecord(info, keynr, oldrec, &info->ft_memroot)) || !(new_word=newlist=_ma_ft_parserecord(info, keynr, newrec, &info->ft_memroot))) goto err; error=0; while(old_word->pos && new_word->pos) { cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len, (uchar*) new_word->pos,new_word->len,0); cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5); if (cmp < 0 || cmp2) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, old_word, pos); if (_ma_ck_delete(info, &key)) { error= -1; goto err; } } if (cmp > 0 || cmp2) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, new_word,pos); if ((error= _ma_ck_write(info, &key))) goto err; } if (cmp<=0) old_word++; if (cmp>=0) new_word++; } if (old_word->pos) error= _ma_ft_erase(info,keynr,keybuf,old_word,pos); else if (new_word->pos) error= _ma_ft_store(info,keynr,keybuf,new_word,pos); err: free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_RETURN(error); }
O3
c
ma_ft_update: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, -0x48(%rbp) movq %r8, %rbx movq %rdx, -0x40(%rbp) movl %esi, %r12d movq %rdi, %r13 movq (%rdi), %rax movq 0x570(%rax), %rax movl %esi, %edx imulq $0x118, %rdx, %rdx # imm = 0x118 movq 0xc0(%rax,%rdx), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) leaq 0x328(%rdi), %r15 movq %rcx, %rdx movq %r15, %rcx callq 0x60bac testq %rax, %rax je 0x60eaf movq %rax, %r14 movq %r13, %rdi movl %r12d, %esi movq %rbx, %rdx movq %r15, -0x30(%rbp) movq %r15, %rcx callq 0x60bac testq %rax, %rax je 0x60eab movq %rax, %r15 movq (%r14), %rsi testq %rsi, %rsi je 0x60e8d movl %r12d, -0x34(%rbp) movq %r13, -0x50(%rbp) movq (%r15), %rcx testq %rcx, %rcx je 0x60eba movl 0x8(%r14), %edx movl 0x8(%r15), %r8d xorl %r12d, %r12d movq -0x58(%rbp), %rdi xorl %r9d, %r9d callq 0xa8c28 movl %eax, %ebx testl %eax, %eax jne 0x60df6 movsd 0x10(%r14), %xmm0 subsd 0x10(%r15), %xmm0 andpd 0x823e6(%rip), %xmm0 # 0xe31d0 ucomisd 0x82246(%rip), %xmm0 # 0xe3038 seta %r12b testl %ebx, %ebx js 0x60dff testb %r12b, %r12b je 0x60e2d movq -0x50(%rbp), %r13 movq %r13, %rdi leaq -0x78(%rbp), %rsi movl -0x34(%rbp), %edx movq -0x40(%rbp), %rcx movq %r14, %r8 movq -0x48(%rbp), %r9 callq 0x60ef9 movq %r13, %rdi leaq -0x78(%rbp), %rsi callq 0x59cdd testb %al, %al jne 0x60eab testl %ebx, %ebx setg %al orb %r12b, %al testb $0x1, %al movl -0x34(%rbp), %r12d movq -0x50(%rbp), %r13 je 0x60e6f movq %r13, %rdi leaq -0x78(%rbp), %rsi movl %r12d, %edx movq -0x40(%rbp), %rcx movq %r15, %r8 movq -0x48(%rbp), %r9 callq 0x60ef9 movq %r13, %rdi leaq -0x78(%rbp), %rsi callq 0x56b5c testb %al, %al jne 0x60ef4 leaq 0x18(%r14), %rax leaq 0x18(%r15), %rcx testl %ebx, %ebx cmovleq %rax, %r14 cmovnsq %rcx, %r15 movq (%r14), %rsi testq %rsi, %rsi jne 0x60dad cmpq $0x0, (%r15) je 0x60eb6 movq %r13, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movq %r15, %rcx movq -0x48(%rbp), %r8 callq 0x61026 jmp 0x60ed0 movq -0x30(%rbp), %r15 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x60ed6 xorl %ebx, %ebx jmp 0x60ed2 movq %r13, %rdi movl %r12d, %esi movq -0x40(%rbp), %rdx movq %r14, %rcx movq -0x48(%rbp), %r8 callq 0x60fa7 movl %eax, %ebx movq -0x30(%rbp), %r15 movl $0x2, %esi movq %r15, %rdi callq 0xa468b movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movsbl %al, %ebx jmp 0x60ed2
_ma_ft_update: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_48], r9 mov rbx, r8 mov [rbp+var_40], rdx mov r12d, esi mov r13, rdi mov rax, [rdi] mov rax, [rax+570h] mov edx, esi imul rdx, 118h mov rax, [rax+rdx+0C0h] mov rax, [rax] mov [rbp+var_58], rax lea r15, [rdi+328h] mov rdx, rcx mov rcx, r15 call _ma_ft_parserecord test rax, rax jz loc_60EAF mov r14, rax mov rdi, r13 mov esi, r12d mov rdx, rbx mov [rbp+var_30], r15 mov rcx, r15 call _ma_ft_parserecord test rax, rax jz loc_60EAB mov r15, rax mov rsi, [r14] test rsi, rsi jz loc_60E8D mov [rbp+var_34], r12d mov [rbp+var_50], r13 loc_60DAD: mov rcx, [r15] test rcx, rcx jz loc_60EBA mov edx, [r14+8] mov r8d, [r15+8] xor r12d, r12d mov rdi, [rbp+var_58] xor r9d, r9d call ha_compare_text mov ebx, eax test eax, eax jnz short loc_60DF6 movsd xmm0, qword ptr [r14+10h] subsd xmm0, qword ptr [r15+10h] andpd xmm0, cs:xmmword_E31D0 ucomisd xmm0, cs:qword_E3038 setnbe r12b loc_60DF6: test ebx, ebx js short loc_60DFF test r12b, r12b jz short loc_60E2D loc_60DFF: mov r13, [rbp+var_50] mov rdi, r13 lea rsi, [rbp+var_78] mov edx, [rbp+var_34] mov rcx, [rbp+var_40] mov r8, r14 mov r9, [rbp+var_48] call _ma_ft_make_key mov rdi, r13 lea rsi, [rbp+var_78] call _ma_ck_delete test al, al jnz short loc_60EAB loc_60E2D: test ebx, ebx setnle al or al, r12b test al, 1 mov r12d, [rbp+var_34] mov r13, [rbp+var_50] jz short loc_60E6F mov rdi, r13 lea rsi, [rbp+var_78] mov edx, r12d mov rcx, [rbp+var_40] mov r8, r15 mov r9, [rbp+var_48] call _ma_ft_make_key mov rdi, r13 lea rsi, [rbp+var_78] call _ma_ck_write test al, al jnz loc_60EF4 loc_60E6F: lea rax, [r14+18h] lea rcx, [r15+18h] test ebx, ebx cmovle r14, rax cmovns r15, rcx mov rsi, [r14] test rsi, rsi jnz loc_60DAD loc_60E8D: cmp qword ptr [r15], 0 jz short loc_60EB6 mov rdi, r13 mov esi, r12d mov rdx, [rbp+var_40] mov rcx, r15 mov r8, [rbp+var_48] call _ma_ft_store jmp short loc_60ED0 loc_60EAB: mov r15, [rbp+var_30] loc_60EAF: mov ebx, 0FFFFFFFFh jmp short loc_60ED6 loc_60EB6: xor ebx, ebx jmp short loc_60ED2 loc_60EBA: mov rdi, r13 mov esi, r12d mov rdx, [rbp+var_40] mov rcx, r14 mov r8, [rbp+var_48] call _ma_ft_erase loc_60ED0: mov ebx, eax loc_60ED2: mov r15, [rbp+var_30] loc_60ED6: mov esi, 2 mov rdi, r15 call free_root mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_60EF4: movsx ebx, al jmp short loc_60ED2
long long ma_ft_update(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6) { unsigned int v7; // r12d long long v8; // r13 _QWORD *v9; // r15 double *v10; // rax double *v11; // r14 double *v12; // rax double *v13; // r15 double v14; // rsi bool v15; // r12 int v16; // ebx _QWORD **v17; // r13 bool v18; // zf char v19; // al unsigned int v20; // eax unsigned int v21; // ebx long long v23[4]; // [rsp+8h] [rbp-78h] BYREF long long v24; // [rsp+28h] [rbp-58h] _QWORD **v25; // [rsp+30h] [rbp-50h] long long v26; // [rsp+38h] [rbp-48h] long long v27; // [rsp+40h] [rbp-40h] unsigned int v28; // [rsp+4Ch] [rbp-34h] _QWORD *v29; // [rsp+50h] [rbp-30h] v26 = a6; v27 = a3; v7 = a2; v8 = (long long)a1; v24 = **(_QWORD **)(*(_QWORD *)(*a1 + 1392LL) + 280LL * a2 + 192); v9 = a1 + 101; v10 = (double *)ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101)); if ( !v10 ) goto LABEL_21; v11 = v10; v29 = a1 + 101; v12 = (double *)ma_ft_parserecord(a1, a2, a5, (long long)(a1 + 101)); if ( !v12 ) { LABEL_20: v9 = v29; LABEL_21: v21 = -1; goto LABEL_26; } v13 = v12; v14 = *v11; if ( *(_QWORD *)v11 ) { v28 = v7; v25 = (_QWORD **)a1; while ( 1 ) { if ( !*(_QWORD *)v13 ) { v20 = ma_ft_erase(v8, v7, v27, v11, v26); goto LABEL_24; } v15 = 0; v16 = ha_compare_text( v24, *(_QWORD *)&v14, *((unsigned int *)v11 + 2), *(_QWORD *)v13, *((unsigned int *)v13 + 2), 0LL); if ( !v16 ) v15 = fabs(v11[2] - v13[2]) > 0.00001; if ( v16 < 0 || v15 ) { v17 = v25; ma_ft_make_key(v25, v23, v28, v27, v11, v26); if ( ma_ck_delete(v17, v23) ) goto LABEL_20; } v18 = !v15 && v16 <= 0; v7 = v28; v8 = (long long)v25; if ( !v18 ) { ma_ft_make_key(v25, v23, v28, v27, v13, v26); v19 = ma_ck_write(v8, (long long)v23); if ( v19 ) break; } if ( v16 <= 0 ) v11 += 3; if ( v16 >= 0 ) v13 += 3; v14 = *v11; if ( !*(_QWORD *)v11 ) goto LABEL_18; } v21 = v19; } else { LABEL_18: if ( *(_QWORD *)v13 ) { v20 = ma_ft_store(v8, v7, v27, v13, v26); LABEL_24: v21 = v20; } else { v21 = 0; } } v9 = v29; LABEL_26: free_root(v9, 2LL); return v21; }
_ma_ft_update: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x48],R9 MOV RBX,R8 MOV qword ptr [RBP + -0x40],RDX MOV R12D,ESI MOV R13,RDI MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x570] MOV EDX,ESI IMUL RDX,RDX,0x118 MOV RAX,qword ptr [RAX + RDX*0x1 + 0xc0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LEA R15,[RDI + 0x328] MOV RDX,RCX MOV RCX,R15 CALL 0x00160bac TEST RAX,RAX JZ 0x00160eaf MOV R14,RAX MOV RDI,R13 MOV ESI,R12D MOV RDX,RBX MOV qword ptr [RBP + -0x30],R15 MOV RCX,R15 CALL 0x00160bac TEST RAX,RAX JZ 0x00160eab MOV R15,RAX MOV RSI,qword ptr [R14] TEST RSI,RSI JZ 0x00160e8d MOV dword ptr [RBP + -0x34],R12D MOV qword ptr [RBP + -0x50],R13 LAB_00160dad: MOV RCX,qword ptr [R15] TEST RCX,RCX JZ 0x00160eba MOV EDX,dword ptr [R14 + 0x8] MOV R8D,dword ptr [R15 + 0x8] XOR R12D,R12D MOV RDI,qword ptr [RBP + -0x58] XOR R9D,R9D CALL 0x001a8c28 MOV EBX,EAX TEST EAX,EAX JNZ 0x00160df6 MOVSD XMM0,qword ptr [R14 + 0x10] SUBSD XMM0,qword ptr [R15 + 0x10] ANDPD XMM0,xmmword ptr [0x001e31d0] UCOMISD XMM0,qword ptr [0x001e3038] SETA R12B LAB_00160df6: TEST EBX,EBX JS 0x00160dff TEST R12B,R12B JZ 0x00160e2d LAB_00160dff: MOV R13,qword ptr [RBP + -0x50] MOV RDI,R13 LEA RSI,[RBP + -0x78] MOV EDX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + -0x40] MOV R8,R14 MOV R9,qword ptr [RBP + -0x48] CALL 0x00160ef9 MOV RDI,R13 LEA RSI,[RBP + -0x78] CALL 0x00159cdd TEST AL,AL JNZ 0x00160eab LAB_00160e2d: TEST EBX,EBX SETG AL OR AL,R12B TEST AL,0x1 MOV R12D,dword ptr [RBP + -0x34] MOV R13,qword ptr [RBP + -0x50] JZ 0x00160e6f MOV RDI,R13 LEA RSI,[RBP + -0x78] MOV EDX,R12D MOV RCX,qword ptr [RBP + -0x40] MOV R8,R15 MOV R9,qword ptr [RBP + -0x48] CALL 0x00160ef9 MOV RDI,R13 LEA RSI,[RBP + -0x78] CALL 0x00156b5c TEST AL,AL JNZ 0x00160ef4 LAB_00160e6f: LEA RAX,[R14 + 0x18] LEA RCX,[R15 + 0x18] TEST EBX,EBX CMOVLE R14,RAX CMOVNS R15,RCX MOV RSI,qword ptr [R14] TEST RSI,RSI JNZ 0x00160dad LAB_00160e8d: CMP qword ptr [R15],0x0 JZ 0x00160eb6 MOV RDI,R13 MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R15 MOV R8,qword ptr [RBP + -0x48] CALL 0x00161026 JMP 0x00160ed0 LAB_00160eab: MOV R15,qword ptr [RBP + -0x30] LAB_00160eaf: MOV EBX,0xffffffff JMP 0x00160ed6 LAB_00160eb6: XOR EBX,EBX JMP 0x00160ed2 LAB_00160eba: MOV RDI,R13 MOV ESI,R12D MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R14 MOV R8,qword ptr [RBP + -0x48] CALL 0x00160fa7 LAB_00160ed0: MOV EBX,EAX LAB_00160ed2: MOV R15,qword ptr [RBP + -0x30] LAB_00160ed6: MOV ESI,0x2 MOV RDI,R15 CALL 0x001a468b MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00160ef4: MOVSX EBX,AL JMP 0x00160ed2
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int _ma_ft_update(long *param_1,ulong param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { long lVar1; bool bVar2; uint uVar3; uint uVar4; long *plVar5; char cVar6; int iVar7; long *plVar8; long *plVar9; ulong uVar10; long *plVar11; int1 local_80 [32]; int8 local_60; long *local_58; int8 local_50; int8 local_48; uint local_3c; long *local_38; uVar10 = param_2 & 0xffffffff; local_60 = **(int8 **)(*(long *)(*param_1 + 0x570) + 0xc0 + (param_2 & 0xffffffff) * 0x118); plVar11 = param_1 + 0x65; local_50 = param_6; local_48 = param_3; plVar8 = (long *)_ma_ft_parserecord(param_1,param_2,param_4,plVar11); if ((plVar8 == (long *)0x0) || (local_38 = plVar11, plVar9 = (long *)_ma_ft_parserecord(param_1,uVar10,param_5,plVar11), plVar11 = local_38, plVar9 == (long *)0x0)) { LAB_00160eaf: iVar7 = -1; } else { lVar1 = *plVar8; uVar4 = (uint)param_2; plVar5 = param_1; plVar11 = local_58; uVar3 = local_3c; while (local_58 = plVar5, local_3c = uVar4, lVar1 != 0) { if (*plVar9 == 0) { iVar7 = _ma_ft_erase(param_1,uVar10,local_48,plVar8,local_50); plVar11 = local_38; goto LAB_00160ed6; } bVar2 = false; iVar7 = ha_compare_text(local_60,lVar1,(int)plVar8[1],*plVar9,(int)plVar9[1],0); plVar11 = local_58; if (iVar7 == 0) { bVar2 = _DAT_001e3038 < (double)((ulong)((double)plVar8[2] - (double)plVar9[2]) & _DAT_001e31d0); } if ((iVar7 < 0) || (bVar2)) { _ma_ft_make_key(local_58,local_80,local_3c,local_48,plVar8); cVar6 = _ma_ck_delete(plVar11,local_80); plVar11 = local_38; if (cVar6 != '\0') goto LAB_00160eaf; } param_1 = local_58; uVar10 = (ulong)local_3c; if (0 < iVar7 || bVar2) { _ma_ft_make_key(local_58,local_80,uVar10,local_48,plVar9); cVar6 = _ma_ck_write(param_1,local_80); if (cVar6 != '\0') { iVar7 = (int)cVar6; plVar11 = local_38; goto LAB_00160ed6; } } if (iVar7 < 1) { plVar8 = plVar8 + 3; } if (-1 < iVar7) { plVar9 = plVar9 + 3; } uVar4 = local_3c; plVar5 = local_58; plVar11 = local_58; uVar3 = local_3c; lVar1 = *plVar8; } local_58 = plVar11; local_3c = uVar3; if (*plVar9 == 0) { iVar7 = 0; plVar11 = local_38; } else { iVar7 = _ma_ft_store(param_1,uVar10,local_48,plVar9,local_50); plVar11 = local_38; } } LAB_00160ed6: free_root(plVar11,2); return iVar7; }
61,486
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&)
monkey531[P]llama/common/./minja.hpp
LiteralExpr(const Location & location, const Value& v) : Expression(location), value(v) {}
O3
cpp
minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x9ef41(%rip), %r15 # 0xee288 movq %r15, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x4f373 movq 0xa0c3b(%rip), %rcx # 0xeffa0 cmpb $0x0, (%rcx) je 0x4f36f incl 0x8(%rax) jmp 0x4f373 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x9f1c6(%rip), %rax # 0xee548 movq %rax, (%rbx) leaq 0x20(%rbx), %rdi movq %rdx, %rsi callq 0x4ed98 popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x4f3ab callq 0x2f80e movq %r14, %rdi callq 0x18b90 nop
_ZN5minja11LiteralExprC2ERKNS_8LocationERKNS_5ValueE: push r15 push r14 push rbx mov rbx, rdi lea r15, off_EE288 mov [rdi], r15 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_4F373 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_4F36F inc dword ptr [rax+8] jmp short loc_4F373 loc_4F36F: lock inc dword ptr [rax+8] loc_4F373: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, off_EE548 mov [rbx], rax lea rdi, [rbx+20h]; this mov rsi, rdx; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+10h] test rdi, rdi jz short loc_4F3AB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4F3AB: mov rdi, r14 call __Unwind_Resume
long long minja::LiteralExpr::LiteralExpr(_QWORD *a1, _QWORD *a2, const minja::Value *a3) { long long v3; // rax *a1 = &off_EE288; a1[1] = *a2; v3 = a2[1]; a1[2] = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v3 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v3 + 8)); } a1[3] = a2[2]; *a1 = &off_EE548; return minja::Value::Value((minja::Value *)(a1 + 4), a3); }
LiteralExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[0x1ee288] MOV qword ptr [RDI],R15 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 0x0014f373 MOV RCX,qword ptr [0x001effa0] CMP byte ptr [RCX],0x0 JZ 0x0014f36f INC dword ptr [RAX + 0x8] JMP 0x0014f373 LAB_0014f36f: INC.LOCK dword ptr [RAX + 0x8] LAB_0014f373: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x1ee548] MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LAB_0014f389: MOV RSI,RDX CALL 0x0014ed98 LAB_0014f391: POP RBX POP R14 POP R15 RET
/* minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) */ void __thiscall minja::LiteralExpr::LiteralExpr(LiteralExpr *this,Location *param_1,Value *param_2) { long lVar1; *(int ***)this = &PTR___cxa_pure_virtual_001ee288; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001effa0 == '\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_evaluate_001ee548; /* try { // try from 0014f389 to 0014f390 has its CatchHandler @ 0014f397 */ minja::Value::Value((Value *)(this + 0x20),param_2); return; }
61,487
ma_check_bitmap_data
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_check_bitmap_data(MARIA_HA *info, enum en_page_type page_type, uint empty_space, uint bitmap_pattern) { uint bits; switch (page_type) { case UNALLOCATED_PAGE: case MAX_PAGE_TYPE: bits= 0; break; case HEAD_PAGE: bits= _ma_free_size_to_head_pattern(&info->s->bitmap, empty_space); break; case TAIL_PAGE: bits= free_size_to_tail_pattern(&info->s->bitmap, empty_space); break; case BLOB_PAGE: bits= FULL_TAIL_PAGE; break; default: bits= 0; /* to satisfy compiler */ DBUG_ASSERT(0); } return (bitmap_pattern != bits); }
O0
c
ma_check_bitmap_data: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x20(%rbp) subq $0x4, %rax ja 0x64a7e movq -0x20(%rbp), %rax leaq 0xf438b(%rip), %rcx # 0x158db8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x0, -0x18(%rbp) jmp 0x64a89 movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0xa10, %rdi # imm = 0xA10 movl -0x10(%rbp), %esi callq 0x62e00 movl %eax, -0x18(%rbp) jmp 0x64a89 movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0xa10, %rdi # imm = 0xA10 movl -0x10(%rbp), %esi callq 0x64780 movl %eax, -0x18(%rbp) jmp 0x64a89 movl $0x7, -0x18(%rbp) jmp 0x64a89 movl $0x0, -0x18(%rbp) jmp 0x64a87 jmp 0x64a89 movl -0x14(%rbp), %eax cmpl -0x18(%rbp), %eax setne %al andb $0x1, %al movzbl %al, %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ma_check_bitmap_data: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov eax, [rbp+var_C] mov [rbp+var_20], rax sub rax, 4; switch 5 cases ja short def_64A34; jumptable 0000000000064A34 default case mov rax, [rbp+var_20] lea rcx, jpt_64A34 movsxd rax, ds:(jpt_64A34 - 158DB8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_64A36: mov [rbp+var_18], 0; jumptable 0000000000064A34 cases 0,4 jmp short loc_64A89 loc_64A3F: mov rax, [rbp+var_8]; jumptable 0000000000064A34 case 1 mov rdi, [rax] add rdi, 0A10h mov esi, [rbp+var_10] call _ma_free_size_to_head_pattern mov [rbp+var_18], eax jmp short loc_64A89 loc_64A5A: mov rax, [rbp+var_8]; jumptable 0000000000064A34 case 2 mov rdi, [rax] add rdi, 0A10h mov esi, [rbp+var_10] call free_size_to_tail_pattern mov [rbp+var_18], eax jmp short loc_64A89 loc_64A75: mov [rbp+var_18], 7; jumptable 0000000000064A34 case 3 jmp short loc_64A89 def_64A34: mov [rbp+var_18], 0; jumptable 0000000000064A34 default case jmp short $+2 loc_64A87: jmp short $+2 loc_64A89: mov eax, [rbp+var_14] cmp eax, [rbp+var_18] setnz al and al, 1 movzx eax, al add rsp, 20h pop rbp retn
_BOOL8 ma_check_bitmap_data(long long a1, int a2, unsigned int a3, int a4) { int v5; // [rsp+8h] [rbp-18h] switch ( a2 ) { case 0: case 4: v5 = 0; break; case 1: v5 = ma_free_size_to_head_pattern((_DWORD *)(*(_QWORD *)a1 + 2576LL), a3); break; case 2: v5 = free_size_to_tail_pattern((_DWORD *)(*(_QWORD *)a1 + 2576LL), a3); break; case 3: v5 = 7; break; default: v5 = 0; break; } return a4 != v5; }
_ma_check_bitmap_data: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x20],RAX SUB RAX,0x4 JA 0x00164a7e MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x258db8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV dword ptr [RBP + -0x18],0x0 JMP 0x00164a89 caseD_1: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0xa10 MOV ESI,dword ptr [RBP + -0x10] CALL 0x00162e00 MOV dword ptr [RBP + -0x18],EAX JMP 0x00164a89 caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0xa10 MOV ESI,dword ptr [RBP + -0x10] CALL 0x00164780 MOV dword ptr [RBP + -0x18],EAX JMP 0x00164a89 caseD_3: MOV dword ptr [RBP + -0x18],0x7 JMP 0x00164a89 default: MOV dword ptr [RBP + -0x18],0x0 JMP 0x00164a87 LAB_00164a87: JMP 0x00164a89 LAB_00164a89: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x18] SETNZ AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0x20 POP RBP RET
bool _ma_check_bitmap_data(long *param_1,int4 param_2,int4 param_3,int param_4) { int local_20; switch(param_2) { case 0: case 4: local_20 = 0; break; case 1: local_20 = _ma_free_size_to_head_pattern(*param_1 + 0xa10,param_3); break; case 2: local_20 = free_size_to_tail_pattern(*param_1 + 0xa10,param_3); break; case 3: local_20 = 7; break; default: local_20 = 0; } return param_4 != local_20; }
61,488
my_error_unregister
eloqsql/mysys/my_error.c
my_bool my_error_unregister(uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; /* Search for the registration in the list. */ for (search_meh_pp= &my_errmsgs_list; *search_meh_pp; search_meh_pp= &(*search_meh_pp)->meh_next) { if (((*search_meh_pp)->meh_first == first) && ((*search_meh_pp)->meh_last == last)) break; } if (! *search_meh_pp) return TRUE; /* Remove header from the chain. */ meh_p= *search_meh_pp; *search_meh_pp= meh_p->meh_next; my_free(meh_p); return FALSE; }
O0
c
my_error_unregister: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) leaq 0x1a0a43(%rip), %rax # 0x1d5c78 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, (%rax) je 0x35272 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax cmpl -0x8(%rbp), %eax jne 0x35263 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x14(%rax), %eax cmpl -0xc(%rbp), %eax jne 0x35263 jmp 0x35272 jmp 0x35265 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x35239 movq -0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x35282 movb $0x1, -0x1(%rbp) jmp 0x352a8 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rdi callq 0x29060 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_error_unregister: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], edi mov [rbp+var_C], esi lea rax, my_errmsgs_list mov [rbp+var_20], rax loc_35239: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jz short loc_35272 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] cmp eax, [rbp+var_8] jnz short loc_35263 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+14h] cmp eax, [rbp+var_C] jnz short loc_35263 jmp short loc_35272 loc_35263: jmp short $+2 loc_35265: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_20], rax jmp short loc_35239 loc_35272: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jnz short loc_35282 mov [rbp+var_1], 1 jmp short loc_352A8 loc_35282: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rax] mov rax, [rbp+var_20] mov [rax], rcx mov rdi, [rbp+var_18] call my_free mov [rbp+var_1], 0 loc_352A8: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_error_unregister(int a1, int a2) { long long **i; // [rsp+0h] [rbp-20h] long long v4; // [rsp+8h] [rbp-18h] for ( i = &my_errmsgs_list; *i && (*((_DWORD *)*i + 4) != a1 || *((_DWORD *)*i + 5) != a2); i = (long long **)*i ) ; if ( !*i ) return 1; v4 = (long long)*i; *i = (long long *)**i; my_free(v4); return 0; }
my_error_unregister: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI LEA RAX,[0x2d5c78] MOV qword ptr [RBP + -0x20],RAX LAB_00135239: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JZ 0x00135272 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] CMP EAX,dword ptr [RBP + -0x8] JNZ 0x00135263 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x14] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x00135263 JMP 0x00135272 LAB_00135263: JMP 0x00135265 LAB_00135265: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00135239 LAB_00135272: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JNZ 0x00135282 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001352a8 LAB_00135282: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00129060 MOV byte ptr [RBP + -0x1],0x0 LAB_001352a8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
bool my_error_unregister(int param_1,int param_2) { long *plVar1; int *puVar2; int **local_28; bool local_9; for (local_28 = &my_errmsgs_list; (*local_28 != (int *)0x0 && ((*(int *)(*local_28 + 0x10) != param_1 || (*(int *)(*local_28 + 0x14) != param_2)))); local_28 = (int **)*local_28) { } puVar2 = *local_28; if (puVar2 != (int *)0x0) { plVar1 = (long *)*local_28; *local_28 = (int *)*plVar1; my_free(plVar1); } local_9 = puVar2 == (int *)0x0; return local_9; }
61,489
my_error_unregister
eloqsql/mysys/my_error.c
my_bool my_error_unregister(uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; /* Search for the registration in the list. */ for (search_meh_pp= &my_errmsgs_list; *search_meh_pp; search_meh_pp= &(*search_meh_pp)->meh_next) { if (((*search_meh_pp)->meh_first == first) && ((*search_meh_pp)->meh_last == last)) break; } if (! *search_meh_pp) return TRUE; /* Remove header from the chain. */ meh_p= *search_meh_pp; *search_meh_pp= meh_p->meh_next; my_free(meh_p); return FALSE; }
O3
c
my_error_unregister: movq 0x2c5165(%rip), %r8 # 0x2f3c28 movb $0x1, %al testq %r8, %r8 je 0x2eb01 pushq %rbp movq %rsp, %rbp leaq 0x2c5153(%rip), %rdx # 0x2f3c28 movq %r8, %rcx cmpl %edi, 0x10(%r8) jne 0x2eae3 cmpl %esi, 0x14(%rcx) je 0x2eaf0 movq (%rcx), %r8 movq %rcx, %rdx testq %r8, %r8 jne 0x2ead5 jmp 0x2eb00 movq (%rcx), %rax movq %rax, (%rdx) movq %rcx, %rdi callq 0x284b6 xorl %eax, %eax popq %rbp retq
my_error_unregister: mov r8, cs:my_errmsgs_list mov al, 1 test r8, r8 jz short locret_2EB01 push rbp mov rbp, rsp lea rdx, my_errmsgs_list loc_2EAD5: mov rcx, r8 cmp [r8+10h], edi jnz short loc_2EAE3 cmp [rcx+14h], esi jz short loc_2EAF0 loc_2EAE3: mov r8, [rcx] mov rdx, rcx test r8, r8 jnz short loc_2EAD5 jmp short loc_2EB00 loc_2EAF0: mov rax, [rcx] mov [rdx], rax mov rdi, rcx call my_free xor eax, eax loc_2EB00: pop rbp locret_2EB01: retn
char my_error_unregister(int a1, int a2) { long long *v2; // r8 char result; // al long long **v4; // rdx long long *v5; // rcx v2 = my_errmsgs_list; result = 1; if ( my_errmsgs_list ) { v4 = &my_errmsgs_list; while ( 1 ) { v5 = v2; if ( *((_DWORD *)v2 + 4) == a1 && *((_DWORD *)v2 + 5) == a2 ) break; v2 = (long long *)*v2; v4 = (long long **)v5; if ( !*v5 ) return result; } *v4 = (long long *)*v2; my_free((long long)v2); return 0; } return result; }
my_error_unregister: MOV R8,qword ptr [0x003f3c28] MOV AL,0x1 TEST R8,R8 JZ 0x0012eb01 PUSH RBP MOV RBP,RSP LEA RDX,[0x3f3c28] LAB_0012ead5: MOV RCX,R8 CMP dword ptr [R8 + 0x10],EDI JNZ 0x0012eae3 CMP dword ptr [RCX + 0x14],ESI JZ 0x0012eaf0 LAB_0012eae3: MOV R8,qword ptr [RCX] MOV RDX,RCX TEST R8,R8 JNZ 0x0012ead5 JMP 0x0012eb00 LAB_0012eaf0: MOV RAX,qword ptr [RCX] MOV qword ptr [RDX],RAX MOV RDI,RCX CALL 0x001284b6 XOR EAX,EAX LAB_0012eb00: POP RBP LAB_0012eb01: RET
int8 my_error_unregister(int param_1,int param_2) { int **ppuVar1; int **ppuVar2; int **ppuVar3; if (my_errmsgs_list != (int *)0x0) { ppuVar2 = &my_errmsgs_list; ppuVar3 = (int **)my_errmsgs_list; do { if ((*(int *)(ppuVar3 + 2) == param_1) && (*(int *)((long)ppuVar3 + 0x14) == param_2)) { *ppuVar2 = *ppuVar3; my_free(ppuVar3); return 0; } ppuVar1 = (int **)*ppuVar3; ppuVar2 = ppuVar3; ppuVar3 = ppuVar1; } while (ppuVar1 != (int **)0x0); } return 1; }
61,490
sanitize_table_share(PFS_table_share*)
eloqsql/storage/perfschema/pfs_instr_class.cc
PFS_table_share *sanitize_table_share(PFS_table_share *unsafe) { return global_table_share_container.sanitize(unsafe); }
O3
cpp
sanitize_table_share(PFS_table_share*): pushq %rbp movq %rsp, %rbp movq %rdi, %rax xorl %ecx, %ecx leaq 0x3734a9(%rip), %rdx # 0x3a55c8 movq 0xa8(%rdx,%rcx,8), %rdi testq %rdi, %rdi je 0x32151 movq 0x48(%rdi), %rsi cmpq %rax, %rsi ja 0x32151 movq 0x50(%rdi), %rdi shlq $0xa, %rdi addq %rsi, %rdi cmpq %rax, %rdi jbe 0x32151 movl %eax, %edi subl %esi, %edi testl $0x3ff, %edi # imm = 0x3FF je 0x3215f incq %rcx cmpq $0x1000, %rcx # imm = 0x1000 jne 0x3211f xorl %eax, %eax popq %rbp retq
_Z20sanitize_table_shareP15PFS_table_share: push rbp mov rbp, rsp mov rax, rdi xor ecx, ecx lea rdx, global_table_share_container loc_3211F: mov rdi, [rdx+rcx*8+0A8h] test rdi, rdi jz short loc_32151 mov rsi, [rdi+48h] cmp rsi, rax ja short loc_32151 mov rdi, [rdi+50h] shl rdi, 0Ah add rdi, rsi cmp rdi, rax jbe short loc_32151 mov edi, eax sub edi, esi test edi, 3FFh jz short loc_3215F loc_32151: inc rcx cmp rcx, 1000h jnz short loc_3211F xor eax, eax loc_3215F: pop rbp retn
PFS_table_share * sanitize_table_share(PFS_table_share *a1) { PFS_table_share *result; // rax long long v2; // rcx long long v3; // rdi unsigned long long v4; // rsi result = a1; v2 = 0LL; while ( 1 ) { v3 = global_table_share_container[v2 + 21]; if ( v3 ) { v4 = *(_QWORD *)(v3 + 72); if ( v4 <= (unsigned long long)result && v4 + (*(_QWORD *)(v3 + 80) << 10) > (unsigned long long)result && (((_WORD)result - (_WORD)v4) & 0x3FF) == 0 ) { break; } } if ( ++v2 == 4096 ) return 0LL; } return result; }
sanitize_table_share: PUSH RBP MOV RBP,RSP MOV RAX,RDI XOR ECX,ECX LEA RDX,[0x4a55c8] LAB_0013211f: MOV RDI,qword ptr [RDX + RCX*0x8 + 0xa8] TEST RDI,RDI JZ 0x00132151 MOV RSI,qword ptr [RDI + 0x48] CMP RSI,RAX JA 0x00132151 MOV RDI,qword ptr [RDI + 0x50] SHL RDI,0xa ADD RDI,RSI CMP RDI,RAX JBE 0x00132151 MOV EDI,EAX SUB EDI,ESI TEST EDI,0x3ff JZ 0x0013215f LAB_00132151: INC RCX CMP RCX,0x1000 JNZ 0x0013211f XOR EAX,EAX LAB_0013215f: POP RBP RET
/* sanitize_table_share(PFS_table_share*) */ PFS_table_share * sanitize_table_share(PFS_table_share *param_1) { long lVar1; PFS_table_share *pPVar2; long lVar3; lVar3 = 0; while( true ) { lVar1 = *(long *)(&DAT_004a5670 + lVar3 * 8); if ((((lVar1 != 0) && (pPVar2 = *(PFS_table_share **)(lVar1 + 0x48), pPVar2 <= param_1)) && (param_1 < pPVar2 + *(long *)(lVar1 + 0x50) * 0x400)) && (((int)param_1 - (int)pPVar2 & 0x3ffU) == 0)) break; lVar3 = lVar3 + 1; if (lVar3 == 0x1000) { return (PFS_table_share *)0x0; } } return param_1; }
61,491
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O0
c
my_register_filename: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq %r8, -0x20(%rbp) cmpl $0x0, -0x8(%rbp) jl 0x32e46 movl $0x1, -0x24(%rbp) movl -0x24(%rbp), %eax leaq 0x373450(%rip), %rcx # 0x3a61f4 lock xaddl %eax, (%rcx) movl %eax, -0x28(%rbp) movl -0x8(%rbp), %eax leaq 0x1b0bcb(%rip), %rcx # 0x1e3980 cmpl (%rcx), %eax jae 0x32dc9 movq -0x20(%rbp), %rax andq $0x2004, %rax # imm = 0x2004 cmpq $0x0, %rax je 0x32dd6 jmp 0x32dcb movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x32ebd leaq 0x373947(%rip), %rax # 0x3a6724 movl (%rax), %edi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x326f0 movq %rax, %rcx leaq 0x1b0b92(%rip), %rax # 0x1e3988 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, (%rax) leaq 0x3733d2(%rip), %rax # 0x3a61e0 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3733c4(%rip), %rax # 0x3a61e0 movq %rcx, (%rax) movl -0x14(%rbp), %ecx leaq 0x1b0b5f(%rip), %rax # 0x1e3988 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x8(%rax) jmp 0x32e3c jmp 0x32e3e movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x32ebd callq 0x25050 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0x33e30 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) jmp 0x32e5c movq -0x20(%rbp), %rax andq $0x19, %rax cmpq $0x0, %rax je 0x32eb4 callq 0x33e30 cmpl $0x18, (%rax) jne 0x32e7b movl $0x17, -0x18(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) callq 0x33e30 movl -0x44(%rbp), %edi movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx movl (%rax), %ecx movb $0x0, %al callq 0x2ca80 jmp 0x32eb6 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_register_filename: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov [rbp+var_20], r8 cmp [rbp+var_8], 0 jl loc_32E46 mov [rbp+var_24], 1 mov eax, [rbp+var_24] lea rcx, my_file_opened lock xadd [rcx], eax mov [rbp+var_28], eax mov eax, [rbp+var_8] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_32DC9 mov rax, [rbp+var_20] and rax, 2004h cmp rax, 0 jz short loc_32DD6 loc_32DC9: jmp short $+2 loc_32DCB: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp loc_32EBD loc_32DD6: lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_20] call my_strdup mov rcx, rax lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax], rcx lea rax, my_file_total_opened mov rcx, [rax] add rcx, 1 lea rax, my_file_total_opened mov [rax], rcx mov ecx, [rbp+var_14] lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax+8], ecx jmp short $+2 loc_32E3C: jmp short $+2 loc_32E3E: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp short loc_32EBD loc_32E46: call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx jmp short $+2 loc_32E5C: mov rax, [rbp+var_20] and rax, 19h cmp rax, 0 jz short loc_32EB4 call _my_thread_var cmp dword ptr [rax], 18h jnz short loc_32E7B mov [rbp+var_18], 17h loc_32E7B: mov eax, [rbp+var_18] mov [rbp+var_44], eax mov rax, [rbp+var_20] and rax, 440h or rax, 4 mov [rbp+var_40], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax call _my_thread_var mov edi, [rbp+var_44] mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] mov ecx, [rax] mov al, 0 call my_error loc_32EB4: jmp short $+2 loc_32EB6: mov [rbp+var_4], 0FFFFFFFFh loc_32EBD: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_register_filename(unsigned int a1, long long a2, int a3, unsigned int a4, __int16 a5) { unsigned int *v5; // rax int v7; // [rsp+24h] [rbp-2Ch] if ( (a1 & 0x80000000) != 0 ) { v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v7; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var() == 24 ) a4 = 23; v5 = (unsigned int *)my_thread_var(); my_error(a4, a5 & 0x440 | 4LL, a2, *v5); } return (unsigned int)-1; } else { _InterlockedExchangeAdd(my_file_opened, 1u); if ( a1 >= my_file_limit || (a5 & 0x2004) != 0 ) { return a1; } else { *((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, a2, a5); ++my_file_total_opened; *((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3; return a1; } } }
my_register_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV qword ptr [RBP + -0x20],R8 CMP dword ptr [RBP + -0x8],0x0 JL 0x00132e46 MOV dword ptr [RBP + -0x24],0x1 MOV EAX,dword ptr [RBP + -0x24] LEA RCX,[0x4a61f4] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x8] LEA RCX,[0x2e3980] CMP EAX,dword ptr [RCX] JNC 0x00132dc9 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x2004 CMP RAX,0x0 JZ 0x00132dd6 LAB_00132dc9: JMP 0x00132dcb LAB_00132dcb: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x00132ebd LAB_00132dd6: LEA RAX,[0x4a6724] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001326f0 MOV RCX,RAX LEA RAX,[0x2e3988] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX],RCX LEA RAX,[0x4a61e0] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x4a61e0] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x14] LEA RAX,[0x2e3988] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x8],ECX JMP 0x00132e3c LAB_00132e3c: JMP 0x00132e3e LAB_00132e3e: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x00132ebd LAB_00132e46: CALL 0x00125050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x00133e30 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX JMP 0x00132e5c LAB_00132e5c: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x19 CMP RAX,0x0 JZ 0x00132eb4 CALL 0x00133e30 CMP dword ptr [RAX],0x18 JNZ 0x00132e7b MOV dword ptr [RBP + -0x18],0x17 LAB_00132e7b: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX CALL 0x00133e30 MOV EDI,dword ptr [RBP + -0x44] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV AL,0x0 CALL 0x0012ca80 LAB_00132eb4: JMP 0x00132eb6 LAB_00132eb6: MOV dword ptr [RBP + -0x4],0xffffffff LAB_00132ebd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; int4 local_20; uint local_c; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); local_20 = param_4; if (*piVar3 == 0x18) { local_20 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4); } local_c = 0xffffffff; } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); local_c = param_1; if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3; } } return local_c; }
61,492
ma_seq_search
eloqsql/storage/maria/ma_search.c
int _ma_seq_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page, uint32 comp_flag, uchar **ret_pos, uchar *buff, my_bool *last_key) { int UNINIT_VAR(flag); uint page_flag, nod_flag, UNINIT_VAR(length), not_used[2]; uchar t_buff[MARIA_MAX_KEY_BUFF], *end; uchar *page; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_SHARE *share= keyinfo->share; MARIA_KEY tmp_key; DBUG_ENTER("_ma_seq_search"); page_flag= ma_page->flag; nod_flag= ma_page->node; page= ma_page->buff; end= page + ma_page->size; page+= share->keypage_header + nod_flag; *ret_pos= page; t_buff[0]=0; /* Avoid bugs */ tmp_key.data= t_buff; tmp_key.keyinfo= keyinfo; while (page < end) { length=(*keyinfo->get_key)(&tmp_key, page_flag, nod_flag, &page); if (length == 0 || page > end) { _ma_set_fatal_error_with_share(share, HA_ERR_CRASHED); DBUG_PRINT("error", ("Found wrong key: length: %u page: %p end: %p", length, page, end)); DBUG_RETURN(MARIA_FOUND_WRONG_KEY); } if ((flag= ha_key_cmp(keyinfo->seg, t_buff, key->data, key->data_length + key->ref_length, comp_flag | tmp_key.flag, not_used)) >= 0) break; DBUG_PRINT("loop_extra",("page:%p key: '%s' flag: %d", page, t_buff, flag)); memcpy(buff,t_buff,length); *ret_pos=page; } if (flag == 0) memcpy(buff,t_buff,length); /* Result is first key */ *last_key= page == end; DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos)); DBUG_RETURN(flag); }
O0
c
ma_seq_search: pushq %rbp movq %rsp, %rbp subq $0xa80, %rsp # imm = 0xA80 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x9f0(%rbp) movq %rsi, -0x9f8(%rbp) movl %edx, -0x9fc(%rbp) movq %rcx, -0xa08(%rbp) movq %r8, -0xa10(%rbp) movq %r9, -0xa18(%rbp) movl -0xa1c(%rbp), %eax movl %eax, -0xa1c(%rbp) movl -0xa28(%rbp), %eax movl %eax, -0xa28(%rbp) movq -0x9f0(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0xa48(%rbp) movq -0xa48(%rbp), %rax movq (%rax), %rax movq %rax, -0xa50(%rbp) movq -0x9f8(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0xa20(%rbp) movq -0x9f8(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0xa24(%rbp) movq -0x9f8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0xa40(%rbp) movq -0xa40(%rbp), %rax movq -0x9f8(%rbp), %rcx movl 0x20(%rcx), %ecx addq %rcx, %rax movq %rax, -0xa38(%rbp) movq -0xa50(%rbp), %rax movl 0x744(%rax), %ecx addl -0xa24(%rbp), %ecx movq -0xa40(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0xa40(%rbp) movq -0xa40(%rbp), %rcx movq -0xa08(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x9e0(%rbp) leaq -0x9e0(%rbp), %rax movq %rax, -0xa70(%rbp) movq -0xa48(%rbp), %rax movq %rax, -0xa68(%rbp) movq -0xa40(%rbp), %rax cmpq -0xa38(%rbp), %rax jae 0x746a3 movq -0xa48(%rbp), %rax movq 0xe0(%rax), %rax movl -0xa20(%rbp), %esi movl -0xa24(%rbp), %edx leaq -0xa70(%rbp), %rdi leaq -0xa40(%rbp), %rcx callq *%rax movl %eax, -0xa28(%rbp) cmpl $0x0, -0xa28(%rbp) je 0x745f0 movq -0xa40(%rbp), %rax cmpq -0xa38(%rbp), %rax jbe 0x74614 movq -0xa50(%rbp), %rdi movl $0x7e, %esi callq 0x38ad0 jmp 0x74603 jmp 0x74605 movl $0x7fffffff, -0x9e4(%rbp) # imm = 0x7FFFFFFF jmp 0x746f8 movq -0xa48(%rbp), %rax movq 0xc0(%rax), %rdi leaq -0x9e0(%rbp), %rsi movq -0x9f0(%rbp), %rax movq (%rax), %rdx movq -0x9f0(%rbp), %rax movl 0x10(%rax), %ecx movq -0x9f0(%rbp), %rax addl 0x14(%rax), %ecx movl -0x9fc(%rbp), %r8d orl -0xa58(%rbp), %r8d leaq -0xa30(%rbp), %r9 callq 0xbb370 movl %eax, -0xa1c(%rbp) cmpl $0x0, %eax jl 0x7466e jmp 0x746a3 jmp 0x74670 jmp 0x74672 movq -0xa10(%rbp), %rdi leaq -0x9e0(%rbp), %rsi movl -0xa28(%rbp), %eax movl %eax, %edx callq 0x270d0 movq -0xa40(%rbp), %rcx movq -0xa08(%rbp), %rax movq %rcx, (%rax) jmp 0x74593 cmpl $0x0, -0xa1c(%rbp) jne 0x746c7 movq -0xa10(%rbp), %rdi leaq -0x9e0(%rbp), %rsi movl -0xa28(%rbp), %eax movl %eax, %edx callq 0x270d0 movq -0xa40(%rbp), %rax cmpq -0xa38(%rbp), %rax sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0xa18(%rbp), %rax movb %cl, (%rax) jmp 0x746ea jmp 0x746ec movl -0xa1c(%rbp), %eax movl %eax, -0x9e4(%rbp) movl -0x9e4(%rbp), %eax movl %eax, -0xa74(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x74725 movl -0xa74(%rbp), %eax addq $0xa80, %rsp # imm = 0xA80 popq %rbp retq callq 0x272b0 nopw (%rax,%rax)
_ma_seq_search: push rbp mov rbp, rsp sub rsp, 0A80h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_9F0], rdi mov [rbp+var_9F8], rsi mov [rbp+var_9FC], edx mov [rbp+var_A08], rcx mov [rbp+var_A10], r8 mov [rbp+var_A18], r9 mov eax, [rbp+var_A1C] mov [rbp+var_A1C], eax mov eax, [rbp+var_A28] mov [rbp+var_A28], eax mov rax, [rbp+var_9F0] mov rax, [rax+8] mov [rbp+var_A48], rax mov rax, [rbp+var_A48] mov rax, [rax] mov [rbp+var_A50], rax mov rax, [rbp+var_9F8] mov eax, [rax+2Ch] mov [rbp+var_A20], eax mov rax, [rbp+var_9F8] mov eax, [rax+28h] mov [rbp+var_A24], eax mov rax, [rbp+var_9F8] mov rax, [rax+10h] mov [rbp+var_A40], rax mov rax, [rbp+var_A40] mov rcx, [rbp+var_9F8] mov ecx, [rcx+20h] add rax, rcx mov [rbp+var_A38], rax mov rax, [rbp+var_A50] mov ecx, [rax+744h] add ecx, [rbp+var_A24] mov rax, [rbp+var_A40] mov ecx, ecx add rax, rcx mov [rbp+var_A40], rax mov rcx, [rbp+var_A40] mov rax, [rbp+var_A08] mov [rax], rcx mov [rbp+var_9E0], 0 lea rax, [rbp+var_9E0] mov [rbp+var_A70], rax mov rax, [rbp+var_A48] mov [rbp+var_A68], rax loc_74593: mov rax, [rbp+var_A40] cmp rax, [rbp+var_A38] jnb loc_746A3 mov rax, [rbp+var_A48] mov rax, [rax+0E0h] mov esi, [rbp+var_A20] mov edx, [rbp+var_A24] lea rdi, [rbp+var_A70] lea rcx, [rbp+var_A40] call rax mov [rbp+var_A28], eax cmp [rbp+var_A28], 0 jz short loc_745F0 mov rax, [rbp+var_A40] cmp rax, [rbp+var_A38] jbe short loc_74614 loc_745F0: mov rdi, [rbp+var_A50] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share jmp short $+2 loc_74603: jmp short $+2 loc_74605: mov [rbp+var_9E4], 7FFFFFFFh jmp loc_746F8 loc_74614: mov rax, [rbp+var_A48] mov rdi, [rax+0C0h] lea rsi, [rbp+var_9E0] mov rax, [rbp+var_9F0] mov rdx, [rax] mov rax, [rbp+var_9F0] mov ecx, [rax+10h] mov rax, [rbp+var_9F0] add ecx, [rax+14h] mov r8d, [rbp+var_9FC] or r8d, [rbp+var_A58] lea r9, [rbp+var_A30] call ha_key_cmp mov [rbp+var_A1C], eax cmp eax, 0 jl short loc_7466E jmp short loc_746A3 loc_7466E: jmp short $+2 loc_74670: jmp short $+2 loc_74672: mov rdi, [rbp+var_A10] lea rsi, [rbp+var_9E0] mov eax, [rbp+var_A28] mov edx, eax call _memcpy mov rcx, [rbp+var_A40] mov rax, [rbp+var_A08] mov [rax], rcx jmp loc_74593 loc_746A3: cmp [rbp+var_A1C], 0 jnz short loc_746C7 mov rdi, [rbp+var_A10] lea rsi, [rbp+var_9E0] mov eax, [rbp+var_A28] mov edx, eax call _memcpy loc_746C7: mov rax, [rbp+var_A40] cmp rax, [rbp+var_A38] setz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_A18] mov [rax], cl jmp short $+2 loc_746EA: jmp short $+2 loc_746EC: mov eax, [rbp+var_A1C] mov [rbp+var_9E4], eax loc_746F8: mov eax, [rbp+var_9E4] mov [rbp+var_A74], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_74725 mov eax, [rbp+var_A74] add rsp, 0A80h pop rbp retn loc_74725: call ___stack_chk_fail
long long ma_seq_search(long long a1, long long a2, unsigned int a3, unsigned long long *a4, long long a5, bool *a6) { long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d _QWORD v11[3]; // [rsp+10h] [rbp-A70h] BYREF int v12; // [rsp+28h] [rbp-A58h] long long v13; // [rsp+30h] [rbp-A50h] long long v14; // [rsp+38h] [rbp-A48h] unsigned long long v15; // [rsp+40h] [rbp-A40h] BYREF unsigned long long v16; // [rsp+48h] [rbp-A38h] char v17[8]; // [rsp+50h] [rbp-A30h] BYREF unsigned int v18; // [rsp+58h] [rbp-A28h] unsigned int v19; // [rsp+5Ch] [rbp-A24h] unsigned int v20; // [rsp+60h] [rbp-A20h] int v21; // [rsp+64h] [rbp-A1Ch] bool *v22; // [rsp+68h] [rbp-A18h] long long v23; // [rsp+70h] [rbp-A10h] unsigned long long *v24; // [rsp+78h] [rbp-A08h] unsigned int v25; // [rsp+84h] [rbp-9FCh] long long v26; // [rsp+88h] [rbp-9F8h] long long v27; // [rsp+90h] [rbp-9F0h] _BYTE v29[2520]; // [rsp+A0h] [rbp-9E0h] BYREF unsigned long long v30; // [rsp+A78h] [rbp-8h] v30 = __readfsqword(0x28u); v27 = a1; v26 = a2; v25 = a3; v24 = a4; v23 = a5; v22 = a6; v14 = *(_QWORD *)(a1 + 8); v13 = *(_QWORD *)v14; v20 = *(_DWORD *)(a2 + 44); v19 = *(_DWORD *)(a2 + 40); v15 = *(_QWORD *)(a2 + 16); v16 = *(unsigned int *)(a2 + 32) + v15; v15 += v19 + *(_DWORD *)(v13 + 1860); *a4 = v15; v29[0] = 0; v11[0] = v29; v11[1] = v14; while ( v15 < v16 ) { v18 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned long long *))(v14 + 224))(v11, v20, v19, &v15); if ( !v18 || v15 > v16 ) { ma_set_fatal_error_with_share(v13, 126, v6, v7, v8, v9); return 0x7FFFFFFF; } v21 = ha_key_cmp( *(_QWORD *)(v14 + 192), v29, *(_QWORD *)v27, (unsigned int)(*(_DWORD *)(v27 + 20) + *(_DWORD *)(v27 + 16)), v12 | v25, v17); if ( v21 >= 0 ) break; memcpy(v23, v29, v18); *v24 = v15; } if ( !v21 ) memcpy(v23, v29, v18); *v22 = v15 == v16; return (unsigned int)v21; }
_ma_seq_search: PUSH RBP MOV RBP,RSP SUB RSP,0xa80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x9f0],RDI MOV qword ptr [RBP + -0x9f8],RSI MOV dword ptr [RBP + -0x9fc],EDX MOV qword ptr [RBP + -0xa08],RCX MOV qword ptr [RBP + -0xa10],R8 MOV qword ptr [RBP + -0xa18],R9 MOV EAX,dword ptr [RBP + -0xa1c] MOV dword ptr [RBP + -0xa1c],EAX MOV EAX,dword ptr [RBP + -0xa28] MOV dword ptr [RBP + -0xa28],EAX MOV RAX,qword ptr [RBP + -0x9f0] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xa48],RAX MOV RAX,qword ptr [RBP + -0xa48] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa50],RAX MOV RAX,qword ptr [RBP + -0x9f8] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0xa20],EAX MOV RAX,qword ptr [RBP + -0x9f8] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0xa24],EAX MOV RAX,qword ptr [RBP + -0x9f8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xa40],RAX MOV RAX,qword ptr [RBP + -0xa40] MOV RCX,qword ptr [RBP + -0x9f8] MOV ECX,dword ptr [RCX + 0x20] ADD RAX,RCX MOV qword ptr [RBP + -0xa38],RAX MOV RAX,qword ptr [RBP + -0xa50] MOV ECX,dword ptr [RAX + 0x744] ADD ECX,dword ptr [RBP + -0xa24] MOV RAX,qword ptr [RBP + -0xa40] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0xa40],RAX MOV RCX,qword ptr [RBP + -0xa40] MOV RAX,qword ptr [RBP + -0xa08] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x9e0],0x0 LEA RAX,[RBP + -0x9e0] MOV qword ptr [RBP + -0xa70],RAX MOV RAX,qword ptr [RBP + -0xa48] MOV qword ptr [RBP + -0xa68],RAX LAB_00174593: MOV RAX,qword ptr [RBP + -0xa40] CMP RAX,qword ptr [RBP + -0xa38] JNC 0x001746a3 MOV RAX,qword ptr [RBP + -0xa48] MOV RAX,qword ptr [RAX + 0xe0] MOV ESI,dword ptr [RBP + -0xa20] MOV EDX,dword ptr [RBP + -0xa24] LEA RDI,[RBP + -0xa70] LEA RCX,[RBP + -0xa40] CALL RAX MOV dword ptr [RBP + -0xa28],EAX CMP dword ptr [RBP + -0xa28],0x0 JZ 0x001745f0 MOV RAX,qword ptr [RBP + -0xa40] CMP RAX,qword ptr [RBP + -0xa38] JBE 0x00174614 LAB_001745f0: MOV RDI,qword ptr [RBP + -0xa50] MOV ESI,0x7e CALL 0x00138ad0 JMP 0x00174603 LAB_00174603: JMP 0x00174605 LAB_00174605: MOV dword ptr [RBP + -0x9e4],0x7fffffff JMP 0x001746f8 LAB_00174614: MOV RAX,qword ptr [RBP + -0xa48] MOV RDI,qword ptr [RAX + 0xc0] LEA RSI,[RBP + -0x9e0] MOV RAX,qword ptr [RBP + -0x9f0] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x9f0] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x9f0] ADD ECX,dword ptr [RAX + 0x14] MOV R8D,dword ptr [RBP + -0x9fc] OR R8D,dword ptr [RBP + -0xa58] LEA R9,[RBP + -0xa30] CALL 0x001bb370 MOV dword ptr [RBP + -0xa1c],EAX CMP EAX,0x0 JL 0x0017466e JMP 0x001746a3 LAB_0017466e: JMP 0x00174670 LAB_00174670: JMP 0x00174672 LAB_00174672: MOV RDI,qword ptr [RBP + -0xa10] LEA RSI,[RBP + -0x9e0] MOV EAX,dword ptr [RBP + -0xa28] MOV EDX,EAX CALL 0x001270d0 MOV RCX,qword ptr [RBP + -0xa40] MOV RAX,qword ptr [RBP + -0xa08] MOV qword ptr [RAX],RCX JMP 0x00174593 LAB_001746a3: CMP dword ptr [RBP + -0xa1c],0x0 JNZ 0x001746c7 MOV RDI,qword ptr [RBP + -0xa10] LEA RSI,[RBP + -0x9e0] MOV EAX,dword ptr [RBP + -0xa28] MOV EDX,EAX CALL 0x001270d0 LAB_001746c7: MOV RAX,qword ptr [RBP + -0xa40] CMP RAX,qword ptr [RBP + -0xa38] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0xa18] MOV byte ptr [RAX],CL JMP 0x001746ea LAB_001746ea: JMP 0x001746ec LAB_001746ec: MOV EAX,dword ptr [RBP + -0xa1c] MOV dword ptr [RBP + -0x9e4],EAX LAB_001746f8: MOV EAX,dword ptr [RBP + -0x9e4] MOV dword ptr [RBP + -0xa74],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00174725 MOV EAX,dword ptr [RBP + -0xa74] ADD RSP,0xa80 POP RBP RET LAB_00174725: CALL 0x001272b0
int _ma_seq_search(int8 *param_1,long param_2,uint param_3,ulong *param_4,void *param_5, int8 param_6) { long in_FS_OFFSET; int1 *local_a78; long *local_a70; uint local_a60; long local_a58; long *local_a50; ulong local_a48; ulong local_a40; int1 local_a38 [8]; uint local_a30; int local_a2c; int4 local_a28; int local_a24; int8 local_a20; void *local_a18; ulong *local_a10; uint local_a04; long local_a00; int8 *local_9f8; int local_9ec; int1 local_9e8 [2520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_a70 = (long *)param_1[1]; local_a58 = *local_a70; local_a28 = *(int4 *)(param_2 + 0x2c); local_a2c = *(int *)(param_2 + 0x28); local_a40 = *(long *)(param_2 + 0x10) + (ulong)*(uint *)(param_2 + 0x20); local_a48 = *(long *)(param_2 + 0x10) + (ulong)(uint)(*(int *)(local_a58 + 0x744) + local_a2c); *param_4 = local_a48; local_9e8[0] = 0; local_a78 = local_9e8; local_a50 = local_a70; local_a20 = param_6; local_a18 = param_5; local_a10 = param_4; local_a04 = param_3; local_a00 = param_2; local_9f8 = param_1; while (local_a48 < local_a40) { local_a30 = (*(code *)local_a50[0x1c])(&local_a78,local_a28,local_a2c,&local_a48); if ((local_a30 == 0) || (local_a40 < local_a48)) { _ma_set_fatal_error_with_share(local_a58,0x7e); local_9ec = 0x7fffffff; goto LAB_001746f8; } local_a24 = ha_key_cmp(local_a50[0x18],local_9e8,*local_9f8, *(int *)(local_9f8 + 2) + *(int *)((long)local_9f8 + 0x14), local_a04 | local_a60,local_a38); if (-1 < local_a24) break; memcpy(local_a18,local_9e8,(ulong)local_a30); *local_a10 = local_a48; } if (local_a24 == 0) { memcpy(local_a18,local_9e8,(ulong)local_a30); } *(bool *)local_a20 = local_a48 == local_a40; local_9ec = local_a24; LAB_001746f8: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_9ec; }
61,493
google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*, google::protobuf::internal::ExtensionSet const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
void ExtensionSet::MergeFrom(const MessageLite* extendee, const ExtensionSet& other) { if (PROTOBUF_PREDICT_TRUE(!is_large())) { if (PROTOBUF_PREDICT_TRUE(!other.is_large())) { GrowCapacity(SizeOfUnion(flat_begin(), flat_end(), other.flat_begin(), other.flat_end())); } else { GrowCapacity(SizeOfUnion(flat_begin(), flat_end(), other.map_.large->begin(), other.map_.large->end())); } } other.ForEach([extendee, this, &other](int number, const Extension& ext) { this->InternalExtensionMergeFrom(extendee, number, ext, other.arena_); }); }
O3
cpp
google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*, google::protobuf::internal::ExtensionSet const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movswq 0xa(%rdi), %rdx testq %rdx, %rdx js 0x21da1 movswq 0xa(%rbx), %r8 movq 0x10(%r15), %rdi movq %rdx, %rsi shlq $0x5, %rsi addq %rdi, %rsi movq 0x10(%rbx), %rcx testq %r8, %r8 js 0x21d89 movq %r8, %rax shlq $0x5, %rax addq %rcx, %rax testw %dx, %dx sete %dl testw %r8w, %r8w sete %r8b orb %dl, %r8b jne 0x21d66 xorl %edx, %edx movl (%rcx), %r8d cmpl %r8d, (%rdi) jge 0x21d3c incq %rdx addq $0x20, %rdi jmp 0x21d5a jne 0x21d47 incq %rdx addq $0x20, %rdi jmp 0x21d56 movzbl 0x12(%rcx), %r8d notl %r8d andl $0x1, %r8d addq %r8, %rdx addq $0x20, %rcx cmpq %rsi, %rdi je 0x21d68 cmpq %rax, %rcx jne 0x21d2b jmp 0x21d68 xorl %edx, %edx subq %rdi, %rsi sarq $0x5, %rsi addq %rdx, %rsi cmpq %rax, %rcx je 0x21d99 movzbl 0x12(%rcx), %edx notl %edx andl $0x1, %edx addq %rdx, %rsi addq $0x20, %rcx jmp 0x21d72 movq 0x18(%rcx), %rdx addq $0x8, %rcx callq 0x193403 movq %rax, %rsi movq %r15, %rdi callq 0x21e24 movswq 0xa(%rbx), %r13 movq 0x10(%rbx), %r12 movq %r14, 0x20(%rsp) movq %r15, 0x28(%rsp) movq %rbx, 0x30(%rsp) testq %r13, %r13 js 0x21df9 testw %r13w, %r13w je 0x21deb shlq $0x5, %r13 addq %r12, %r13 movl (%r12), %edx leaq 0x8(%r12), %rcx movq (%rbx), %r8 movq %r15, %rdi movq %r14, %rsi callq 0x19349c addq $0x20, %r12 cmpq %r13, %r12 jne 0x21dcb addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq 0x18(%r12), %rsi addq $0x8, %r12 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x38(%rsp), %rdi movq %r12, %rdx callq 0x19770c jmp 0x21deb
_ZN6google8protobuf8internal12ExtensionSet9MergeFromEPKNS0_11MessageLiteERKS2_: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h mov rbx, rdx mov r14, rsi mov r15, rdi movsx rdx, word ptr [rdi+0Ah] test rdx, rdx js loc_21DA1 movsx r8, word ptr [rbx+0Ah] mov rdi, [r15+10h] mov rsi, rdx shl rsi, 5 add rsi, rdi mov rcx, [rbx+10h] test r8, r8 js short loc_21D89 mov rax, r8 shl rax, 5 add rax, rcx test dx, dx setz dl test r8w, r8w setz r8b or r8b, dl jnz short loc_21D66 xor edx, edx loc_21D2B: mov r8d, [rcx] cmp [rdi], r8d jge short loc_21D3C inc rdx add rdi, 20h ; ' ' jmp short loc_21D5A loc_21D3C: jnz short loc_21D47 inc rdx add rdi, 20h ; ' ' jmp short loc_21D56 loc_21D47: movzx r8d, byte ptr [rcx+12h] not r8d and r8d, 1 add rdx, r8 loc_21D56: add rcx, 20h ; ' ' loc_21D5A: cmp rdi, rsi jz short loc_21D68 cmp rcx, rax jnz short loc_21D2B jmp short loc_21D68 loc_21D66: xor edx, edx loc_21D68: sub rsi, rdi sar rsi, 5 add rsi, rdx loc_21D72: cmp rcx, rax jz short loc_21D99 movzx edx, byte ptr [rcx+12h] not edx and edx, 1 add rsi, rdx add rcx, 20h ; ' ' jmp short loc_21D72 loc_21D89: mov rdx, [rcx+18h] add rcx, 8 call _ZN6google8protobuf8internal12_GLOBAL__N_111SizeOfUnionIPNS1_12ExtensionSet8KeyValueESt17_Rb_tree_iteratorISt4pairIKiNS4_9ExtensionEEEEEmT_SD_T0_SE_; google::protobuf::internal::`anonymous namespace'::SizeOfUnion<google::protobuf::internal::ExtensionSet::KeyValue *,std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>>(google::protobuf::internal::ExtensionSet::KeyValue *,google::protobuf::internal::ExtensionSet::KeyValue *,std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>,std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>) mov rsi, rax; unsigned __int64 loc_21D99: mov rdi, r15; this call _ZN6google8protobuf8internal12ExtensionSet12GrowCapacityEm; google::protobuf::internal::ExtensionSet::GrowCapacity(ulong) loc_21DA1: movsx r13, word ptr [rbx+0Ah] mov r12, [rbx+10h] mov qword ptr [rsp+78h+var_58], r14 mov qword ptr [rsp+78h+var_58+8], r15 mov [rsp+78h+var_48], rbx test r13, r13 js short loc_21DF9 test r13w, r13w jz short loc_21DEB shl r13, 5 add r13, r12 loc_21DCB: mov edx, [r12]; int lea rcx, [r12+8]; google::protobuf::internal::ExtensionSet::Extension * mov r8, [rbx]; google::protobuf::Arena * mov rdi, r15; this mov rsi, r14; google::protobuf::MessageLite * call _ZN6google8protobuf8internal12ExtensionSet26InternalExtensionMergeFromEPKNS0_11MessageLiteEiRKNS2_9ExtensionEPNS0_5ArenaE; google::protobuf::internal::ExtensionSet::InternalExtensionMergeFrom(google::protobuf::MessageLite const*,int,google::protobuf::internal::ExtensionSet::Extension const&,google::protobuf::Arena *) add r12, 20h ; ' ' cmp r12, r13 jnz short loc_21DCB loc_21DEB: add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_21DF9: mov rsi, [r12+18h] add r12, 8 mov rax, [rsp+78h+var_48] mov [rsp+78h+var_68], rax movups xmm0, [rsp+78h+var_58] movups [rsp+78h+var_78], xmm0 lea rdi, [rsp+78h+var_40] mov rdx, r12 call _ZN6google8protobuf8internal12ExtensionSet7ForEachISt17_Rb_tree_iteratorISt4pairIKiNS2_9ExtensionEEEZNS2_9MergeFromEPKNS0_11MessageLiteERKS2_E3$_0EET0_T_SH_SG_; google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&)::$_0>(std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>,std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&)::$_0) jmp short loc_21DEB
void google::protobuf::internal::ExtensionSet::MergeFrom( google::protobuf::internal::ExtensionSet *this, const google::protobuf::MessageLite *a2, const google::protobuf::internal::ExtensionSet *a3, int a4, int a5, int a6) { long long v9; // rdx long long v10; // r8 char *v11; // rdi char *v12; // rsi long long v13; // rcx long long v14; // rax long long v15; // rdx unsigned long long v16; // rsi long long v17; // r13 long long v18; // r12 long long v19; // r13 char v20; // [rsp+38h] [rbp-40h] BYREF v9 = *((__int16 *)this + 5); if ( v9 >= 0 ) { v10 = *((__int16 *)a3 + 5); v11 = (char *)*((_QWORD *)this + 2); v12 = &v11[32 * v9]; v13 = *((_QWORD *)a3 + 2); if ( v10 < 0 ) { v16 = google::protobuf::internal::`anonymous namespace'::SizeOfUnion<google::protobuf::internal::ExtensionSet::KeyValue *,std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>>( v11, v12, *(_QWORD *)(v13 + 24), v13 + 8); } else { v14 = v13 + 32 * v10; if ( (_WORD)v9 == 0 || (_WORD)v10 == 0 ) { v15 = 0LL; } else { v15 = 0LL; do { if ( *(_DWORD *)v11 >= *(_DWORD *)v13 ) { if ( *(_DWORD *)v11 == *(_DWORD *)v13 ) { ++v15; v11 += 32; } else { v15 += (*(_BYTE *)(v13 + 18) & 1) == 0; } v13 += 32LL; } else { ++v15; v11 += 32; } } while ( v11 != v12 && v13 != v14 ); } v16 = v15 + ((v12 - v11) >> 5); while ( v13 != v14 ) { v16 += (*(_BYTE *)(v13 + 18) & 1) == 0; v13 += 32LL; } } google::protobuf::internal::ExtensionSet::GrowCapacity(this, v16); } v17 = *((__int16 *)a3 + 5); v18 = *((_QWORD *)a3 + 2); if ( v17 < 0 ) { google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*,google::protobuf::internal::ExtensionSet const&)::$_0>( (unsigned int)&v20, *(_QWORD *)(v18 + 24), v18 + 8, a4, a5, a6, a2, this, a3); } else if ( (_WORD)v17 ) { v19 = v18 + 32 * v17; do { google::protobuf::internal::ExtensionSet::InternalExtensionMergeFrom( this, a2, *(_DWORD *)v18, (const google::protobuf::internal::ExtensionSet::Extension *)(v18 + 8), *(google::protobuf::Arena **)a3); v18 += 32LL; } while ( v18 != v19 ); } }
MergeFrom: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOVSX RDX,word ptr [RDI + 0xa] TEST RDX,RDX JS 0x00121da1 MOVSX R8,word ptr [RBX + 0xa] MOV RDI,qword ptr [R15 + 0x10] MOV RSI,RDX SHL RSI,0x5 ADD RSI,RDI MOV RCX,qword ptr [RBX + 0x10] TEST R8,R8 JS 0x00121d89 MOV RAX,R8 SHL RAX,0x5 ADD RAX,RCX TEST DX,DX SETZ DL TEST R8W,R8W SETZ R8B OR R8B,DL JNZ 0x00121d66 XOR EDX,EDX LAB_00121d2b: MOV R8D,dword ptr [RCX] CMP dword ptr [RDI],R8D JGE 0x00121d3c INC RDX ADD RDI,0x20 JMP 0x00121d5a LAB_00121d3c: JNZ 0x00121d47 INC RDX ADD RDI,0x20 JMP 0x00121d56 LAB_00121d47: MOVZX R8D,byte ptr [RCX + 0x12] NOT R8D AND R8D,0x1 ADD RDX,R8 LAB_00121d56: ADD RCX,0x20 LAB_00121d5a: CMP RDI,RSI JZ 0x00121d68 CMP RCX,RAX JNZ 0x00121d2b JMP 0x00121d68 LAB_00121d66: XOR EDX,EDX LAB_00121d68: SUB RSI,RDI SAR RSI,0x5 ADD RSI,RDX LAB_00121d72: CMP RCX,RAX JZ 0x00121d99 MOVZX EDX,byte ptr [RCX + 0x12] NOT EDX AND EDX,0x1 ADD RSI,RDX ADD RCX,0x20 JMP 0x00121d72 LAB_00121d89: MOV RDX,qword ptr [RCX + 0x18] ADD RCX,0x8 CALL 0x00293403 MOV RSI,RAX LAB_00121d99: MOV RDI,R15 CALL 0x00121e24 LAB_00121da1: MOVSX R13,word ptr [RBX + 0xa] MOV R12,qword ptr [RBX + 0x10] MOV qword ptr [RSP + 0x20],R14 MOV qword ptr [RSP + 0x28],R15 MOV qword ptr [RSP + 0x30],RBX TEST R13,R13 JS 0x00121df9 TEST R13W,R13W JZ 0x00121deb SHL R13,0x5 ADD R13,R12 LAB_00121dcb: MOV EDX,dword ptr [R12] LEA RCX,[R12 + 0x8] MOV R8,qword ptr [RBX] MOV RDI,R15 MOV RSI,R14 CALL 0x0029349c ADD R12,0x20 CMP R12,R13 JNZ 0x00121dcb LAB_00121deb: ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00121df9: MOV RSI,qword ptr [R12 + 0x18] ADD R12,0x8 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0x38] MOV RDX,R12 CALL 0x0029770c JMP 0x00121deb
/* google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite const*, google::protobuf::internal::ExtensionSet const&) */ void __thiscall google::protobuf::internal::ExtensionSet::MergeFrom (ExtensionSet *this,MessageLite *param_1,ExtensionSet *param_2) { short sVar1; short sVar2; int *piVar3; int *piVar4; long lVar5; int *piVar6; ulong uVar7; int *piVar8; int1 local_40 [24]; sVar1 = *(short *)(this + 10); if (-1 < (long)sVar1) { sVar2 = *(short *)(param_2 + 10); piVar8 = *(int **)(this + 0x10); piVar6 = piVar8 + (long)sVar1 * 8; piVar4 = *(int **)(param_2 + 0x10); if ((long)sVar2 < 0) { uVar7 = (anonymous_namespace):: SizeOfUnion<google::protobuf::internal::ExtensionSet::KeyValue*,std::_Rb_tree_iterator<std::pair<int_const,google::protobuf::internal::ExtensionSet::Extension>>> (piVar8,piVar6,*(int8 *)(piVar4 + 6),piVar4 + 2); } else { piVar3 = piVar4 + (long)sVar2 * 8; if (sVar2 == 0 || sVar1 == 0) { lVar5 = 0; } else { lVar5 = 0; do { if (*piVar8 < *piVar4) { lVar5 = lVar5 + 1; piVar8 = piVar8 + 8; } else { if (*piVar8 == *piVar4) { lVar5 = lVar5 + 1; piVar8 = piVar8 + 8; } else { lVar5 = lVar5 + (ulong)(~(uint)*(byte *)((long)piVar4 + 0x12) & 1); } piVar4 = piVar4 + 8; } } while ((piVar8 != piVar6) && (piVar4 != piVar3)); } uVar7 = ((long)piVar6 - (long)piVar8 >> 5) + lVar5; for (; piVar4 != piVar3; piVar4 = piVar4 + 8) { uVar7 = uVar7 + (~(uint)*(byte *)((long)piVar4 + 0x12) & 1); } } GrowCapacity(this,uVar7); } sVar1 = *(short *)(param_2 + 10); piVar8 = *(int **)(param_2 + 0x10); if ((long)sVar1 < 0) { ForEach<std::_Rb_tree_iterator<std::pair<int_const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::MergeFrom(google::protobuf::MessageLite_const*,google::protobuf::internal::ExtensionSet_const&)::__0> (local_40,*(int8 *)(piVar8 + 6),piVar8 + 2); } else if (sVar1 != 0) { piVar4 = piVar8 + (long)sVar1 * 8; do { InternalExtensionMergeFrom(this,param_1,*piVar8,(Extension *)(piVar8 + 2),*(Arena **)param_2); piVar8 = piVar8 + 8; } while (piVar8 != piVar4); } return; }
61,494
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_validate_filename(const std::string & filename) { if (!filename.length()) { // Empty filename invalid return false; } if (filename.length() > 255) { // Limit at common largest possible filename on Linux filesystems // to avoid unnecessary further validation // (On systems with smaller limits it will be caught by the OS) return false; } std::u32string filename_utf32; try { #if defined(__clang__) // disable C++17 deprecation warning for std::codecvt_utf8 # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter; #if defined(__clang__) # pragma clang diagnostic pop #endif filename_utf32 = converter.from_bytes(filename); // If the reverse conversion mismatches, it means overlong UTF-8 sequences were used, // or invalid encodings were encountered. Reject such attempts std::string filename_reencoded = converter.to_bytes(filename_utf32); if (filename_reencoded != filename) { return false; } } catch (const std::exception &) { return false; } // Check for forbidden codepoints: // - Control characters // - Unicode equivalents of illegal characters // - UTF-16 surrogate pairs // - UTF-8 replacement character // - Byte order mark (BOM) // - Illegal characters: / \ : * ? " < > | for (char32_t c : filename_utf32) { if (c <= 0x1F // Control characters (C0) || c == 0x7F // Control characters (DEL) || (c >= 0x80 && c <= 0x9F) // Control characters (C1) || c == 0xFF0E // Fullwidth Full Stop (period equivalent) || c == 0x2215 // Division Slash (forward slash equivalent) || c == 0x2216 // Set Minus (backslash equivalent) || (c >= 0xD800 && c <= 0xDFFF) // UTF-16 surrogate pairs || c == 0xFFFD // Replacement Character (UTF-8) || c == 0xFEFF // Byte Order Mark (BOM) || c == '/' || c == '\\' || c == ':' || c == '*' // Illegal characters || c == '?' || c == '"' || c == '<' || c == '>' || c == '|') { return false; } } // Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename // Unicode and other whitespace is not affected, only 0x20 space if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') { return false; } // Reject any ".." (currently stricter than necessary, it should be fine to just check for == ".." instead) if (filename.find("..") != std::string::npos) { return false; } // Reject "." if (filename == ".") { return false; } return true; }
O2
cpp
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xa8, %rsp movq $-0x100, %rax addq 0x8(%rdi), %rax cmpq $-0xff, %rax jae 0xc1cce xorl %r14d, %r14d jmp 0xc1d63 movq %rdi, %rbx leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) andl $0x0, (%rax) leaq 0x48(%rsp), %rdi callq 0xc5ad6 leaq 0x28(%rsp), %rdi leaq 0x48(%rsp), %rsi movq %rbx, %rdx callq 0xc5b34 leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0xc5b50 movq %r15, %rdi callq 0xc5bfa leaq 0x28(%rsp), %rdi leaq 0x48(%rsp), %rsi movq %r14, %rdx callq 0xc5c0a leaq 0x28(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0xc5c26 movl %eax, %ebp movq %r14, %rdi callq 0x29678 leaq 0x48(%rsp), %rdi callq 0xc5c30 testb %bpl, %bpl je 0xc1d74 xorl %r14d, %r14d leaq 0x8(%rsp), %rdi callq 0xc5bfa movl %r14d, %eax addq $0xa8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx shlq $0x2, %rcx xorl %edx, %edx movabsq $0x400000035002101, %rsi # imm = 0x400000035002101 cmpq %rdx, %rcx je 0xc1e27 movl (%rax,%rdx), %edi xorl %r14d, %r14d cmpl $0x20, %edi jb 0xc1d59 cmpl $0x7f, %edi je 0xc1d59 movl %edi, %r8d andl $-0x20, %r8d cmpl $0x80, %r8d je 0xc1d59 xorl %r14d, %r14d leal -0x2215(%rdi), %r8d cmpl $0x2, %r8d jb 0xc1d59 cmpl $0xff0e, %edi # imm = 0xFF0E je 0xc1d59 movl %edi, %r8d andl $0xfffff800, %r8d # imm = 0xFFFFF800 cmpl $0xd800, %r8d # imm = 0xD800 je 0xc1d56 xorl %r14d, %r14d leal -0x22(%rdi), %r8d cmpl $0x3a, %r8d ja 0xc1dfd btq %r8, %rsi jb 0xc1d59 cmpl $0x7c, %edi je 0xc1d59 cmpl $0xfeff, %edi # imm = 0xFEFF je 0xc1d59 addq $0x4, %rdx cmpl $0xfffd, %edi # imm = 0xFFFD jne 0xc1d8e jmp 0xc1d59 movq (%rbx), %rax cmpb $0x20, (%rax) je 0xc1d56 movq 0x8(%rbx), %rcx movzbl -0x1(%rax,%rcx), %eax xorl %r14d, %r14d cmpl $0x20, %eax je 0xc1d59 cmpl $0x2e, %eax je 0xc1d59 leaq 0x3c575(%rip), %rsi # 0xfe3cd xorl %r14d, %r14d movq %rbx, %rdi xorl %edx, %edx callq 0x29600 cmpq $-0x1, %rax jne 0xc1d59 leaq 0x300fa(%rip), %rsi # 0xf1f70 movq %rbx, %rdi callq 0x40c7a movl %eax, %r14d xorb $0x1, %r14b jmp 0xc1d59 jmp 0xc1e8c movq %rdx, %r14 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0xc5c30 jmp 0xc1ea4 movq %rdx, %r14 movq %rax, %rbx cmpl $0x1, %r14d jne 0xc1ebf movq %rbx, %rdi callq 0x28480 callq 0x29210 jmp 0xc1d56 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xc5bfa movq %rbx, %rdi callq 0x293c0
_Z20fs_validate_filenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 0A8h mov rax, 0FFFFFFFFFFFFFF00h add rax, [rdi+8] cmp rax, 0FFFFFFFFFFFFFF01h jnb short loc_C1CCE xor r14d, r14d jmp loc_C1D63 loc_C1CCE: mov rbx, rdi lea rax, [rsp+0C8h+var_B0] mov [rax-10h], rax and qword ptr [rax-8], 0 and dword ptr [rax], 0 lea rdi, [rsp+0C8h+var_80] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(void) lea rdi, [rsp+0C8h+var_A0] lea rsi, [rsp+0C8h+var_80] mov rdx, rbx call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE10from_bytesERKNS_12basic_stringIcSt11char_traitsIcES5_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(std::string const&) lea r14, [rsp+0C8h+var_C0] lea r15, [rsp+0C8h+var_A0] mov rdi, r14 mov rsi, r15 call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSEOS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t>&&) mov rdi, r15 call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() lea rdi, [rsp+0C8h+var_A0] lea rsi, [rsp+0C8h+var_80] mov rdx, r14 call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE8to_bytesERKNS_12basic_stringIDiSt11char_traitsIDiES4_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(std::basic_string<char32_t> const&) lea r14, [rsp+0C8h+var_A0] mov rdi, r14 mov rsi, rbx call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&) mov ebp, eax mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_80] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() test bpl, bpl jz short loc_C1D74 loc_C1D56: xor r14d, r14d loc_C1D59: lea rdi, [rsp+0C8h+var_C0] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() loc_C1D63: mov eax, r14d add rsp, 0A8h pop rbx pop r14 pop r15 pop rbp retn loc_C1D74: mov rax, [rsp+0C8h+var_C0] mov rcx, [rsp+0C8h+var_B8] shl rcx, 2 xor edx, edx mov rsi, 400000035002101h loc_C1D8E: cmp rcx, rdx jz loc_C1E27 mov edi, [rax+rdx] xor r14d, r14d cmp edi, 20h ; ' ' jb short loc_C1D59 cmp edi, 7Fh jz short loc_C1D59 mov r8d, edi and r8d, 0FFFFFFE0h cmp r8d, 80h jz short loc_C1D59 xor r14d, r14d lea r8d, [rdi-2215h] cmp r8d, 2 jb short loc_C1D59 cmp edi, 0FF0Eh jz short loc_C1D59 mov r8d, edi and r8d, 0FFFFF800h cmp r8d, 0D800h jz loc_C1D56 xor r14d, r14d lea r8d, [rdi-22h] cmp r8d, 3Ah ; ':' ja short loc_C1DFD bt rsi, r8 jb loc_C1D59 loc_C1DFD: cmp edi, 7Ch ; '|' jz loc_C1D59 cmp edi, 0FEFFh jz loc_C1D59 add rdx, 4 cmp edi, 0FFFDh jnz loc_C1D8E jmp loc_C1D59 loc_C1E27: mov rax, [rbx] cmp byte ptr [rax], 20h ; ' ' jz loc_C1D56 mov rcx, [rbx+8] movzx eax, byte ptr [rax+rcx-1] xor r14d, r14d cmp eax, 20h ; ' ' jz loc_C1D59 cmp eax, 2Eh ; '.' jz loc_C1D59 lea rsi, aN0N1+7; ".." xor r14d, r14d mov rdi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_C1D59 lea rsi, asc_F1F6F+1; "." mov rdi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov r14d, eax xor r14b, 1 jmp loc_C1D59 jmp short $+2 loc_C1E8C: mov r14, rdx mov rbx, rax lea rdi, [rsp+0C8h+var_80] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() jmp short loc_C1EA4 mov r14, rdx mov rbx, rax loc_C1EA4: cmp r14d, 1 jnz short loc_C1EBF mov rdi, rbx; void * call ___cxa_begin_catch call ___cxa_end_catch jmp loc_C1D56 mov rbx, rax loc_C1EBF: lea rdi, [rsp+0C8h+var_C0] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() mov rdi, rbx call __Unwind_Resume
long long fs_validate_filename(_QWORD *a1) { unsigned int v1; // r14d char v3; // bp long long v5; // rdx long long v6; // rsi unsigned int v7; // edi unsigned long long v8; // r8 int v9; // eax unsigned int v10; // eax int *v11; // [rsp+8h] [rbp-C0h] BYREF long long v12; // [rsp+10h] [rbp-B8h] int v13; // [rsp+18h] [rbp-B0h] BYREF _BYTE v14[32]; // [rsp+28h] [rbp-A0h] BYREF _BYTE v15[128]; // [rsp+48h] [rbp-80h] BYREF if ( (unsigned long long)(a1[1] - 256LL) >= 0xFFFFFFFFFFFFFF01LL ) { v11 = &v13; v12 = 0LL; v13 = 0; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(v15); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes( v14, v15, a1); std::basic_string<char32_t>::operator=(&v11, v14); std::basic_string<char32_t>::~basic_string(v14); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes( v14, v15, &v11); v3 = std::operator!=<char>(v14, a1); std::string::~string(v14); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert(v15); if ( v3 ) goto LABEL_4; v5 = 0LL; v6 = 0x400000035002101LL; while ( v12 != v5 ) { v7 = v11[v5]; v1 = 0; if ( v7 >= 0x20 && v7 != 127 && (v7 & 0xFFFFFFE0) != 0x80 ) { v1 = 0; if ( v7 - 8725 >= 2 && v7 != 65294 ) { if ( (v7 & 0xFFFFF800) == 0xD800 ) goto LABEL_4; v1 = 0; v8 = v7 - 34; if ( ((unsigned int)v8 > 0x3A || !_bittest64(&v6, v8)) && v7 != 124 && v7 != 65279 ) { ++v5; if ( v7 != 65533 ) continue; } } } goto LABEL_5; } if ( *(_BYTE *)*a1 == 32 ) { LABEL_4: v1 = 0; } else { v9 = *(unsigned __int8 *)(*a1 + a1[1] - 1LL); v1 = 0; if ( v9 != 32 && v9 != 46 ) { v1 = 0; if ( std::string::find(a1, "..", 0LL) == -1 ) { LOBYTE(v10) = std::operator==<char>((long long)a1); v1 = v10; LOBYTE(v1) = v10 ^ 1; } } } LABEL_5: std::basic_string<char32_t>::~basic_string(&v11); } else { return 0; } return v1; }
fs_validate_filename: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa8 MOV RAX,-0x100 ADD RAX,qword ptr [RDI + 0x8] CMP RAX,-0xff JNC 0x001c1cce XOR R14D,R14D JMP 0x001c1d63 LAB_001c1cce: MOV RBX,RDI LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 AND dword ptr [RAX],0x0 LAB_001c1ce2: LEA RDI,[RSP + 0x48] CALL 0x001c5ad6 LAB_001c1cec: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDX,RBX CALL 0x001c5b34 LEA R14,[RSP + 0x8] LEA R15,[RSP + 0x28] MOV RDI,R14 MOV RSI,R15 CALL 0x001c5b50 MOV RDI,R15 CALL 0x001c5bfa LAB_001c1d1b: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDX,R14 CALL 0x001c5c0a LAB_001c1d2d: LEA R14,[RSP + 0x28] MOV RDI,R14 MOV RSI,RBX CALL 0x001c5c26 MOV EBP,EAX MOV RDI,R14 CALL 0x00129678 LEA RDI,[RSP + 0x48] CALL 0x001c5c30 TEST BPL,BPL JZ 0x001c1d74 LAB_001c1d56: XOR R14D,R14D LAB_001c1d59: LEA RDI,[RSP + 0x8] CALL 0x001c5bfa LAB_001c1d63: MOV EAX,R14D ADD RSP,0xa8 POP RBX POP R14 POP R15 POP RBP RET LAB_001c1d74: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] SHL RCX,0x2 XOR EDX,EDX MOV RSI,0x400000035002101 LAB_001c1d8e: CMP RCX,RDX JZ 0x001c1e27 MOV EDI,dword ptr [RAX + RDX*0x1] XOR R14D,R14D CMP EDI,0x20 JC 0x001c1d59 CMP EDI,0x7f JZ 0x001c1d59 MOV R8D,EDI AND R8D,0xffffffe0 CMP R8D,0x80 JZ 0x001c1d59 XOR R14D,R14D LEA R8D,[RDI + -0x2215] CMP R8D,0x2 JC 0x001c1d59 CMP EDI,0xff0e JZ 0x001c1d59 MOV R8D,EDI AND R8D,0xfffff800 CMP R8D,0xd800 JZ 0x001c1d56 XOR R14D,R14D LEA R8D,[RDI + -0x22] CMP R8D,0x3a JA 0x001c1dfd BT RSI,R8 JC 0x001c1d59 LAB_001c1dfd: CMP EDI,0x7c JZ 0x001c1d59 CMP EDI,0xfeff JZ 0x001c1d59 ADD RDX,0x4 CMP EDI,0xfffd JNZ 0x001c1d8e JMP 0x001c1d59 LAB_001c1e27: MOV RAX,qword ptr [RBX] CMP byte ptr [RAX],0x20 JZ 0x001c1d56 MOV RCX,qword ptr [RBX + 0x8] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] XOR R14D,R14D CMP EAX,0x20 JZ 0x001c1d59 CMP EAX,0x2e JZ 0x001c1d59 LEA RSI,[0x1fe3cd] XOR R14D,R14D MOV RDI,RBX XOR EDX,EDX CALL 0x00129600 CMP RAX,-0x1 JNZ 0x001c1d59 LEA RSI,[0x1f1f70] MOV RDI,RBX CALL 0x00140c7a MOV R14D,EAX XOR R14B,0x1 JMP 0x001c1d59
/* fs_validate_filename(std::__cxx11::string const&) */ ulong fs_validate_filename(string *param_1) { char cVar1; uint uVar2; bool bVar3; int7 extraout_var; long lVar4; ulong uVar5; int4 *local_c0; long local_b8; int4 local_b0 [4]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_a0 [32]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_80 [96]; if (*(long *)(param_1 + 8) - 0x100U < 0xffffffffffffff01) { uVar5 = 0; } else { local_c0 = local_b0; local_b8 = 0; local_b0[0] = 0; /* try { // try from 001c1ce2 to 001c1ceb has its CatchHandler @ 001c1e9e */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::wstring_convert(local_80); /* try { // try from 001c1cec to 001c1cfd has its CatchHandler @ 001c1e8c */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::from_bytes(local_a0,(string *)local_80); std::__cxx11::u32string::operator=((u32string *)&local_c0,(u32string *)local_a0); std::__cxx11::u32string::~u32string((u32string *)local_a0); /* try { // try from 001c1d1b to 001c1d2c has its CatchHandler @ 001c1e8a */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::to_bytes(local_a0,(u32string *)local_80); bVar3 = std::operator!=((string *)local_a0,param_1); std::__cxx11::string::~string((string *)local_a0); std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::~wstring_convert(local_80); if (bVar3) { LAB_001c1d56: uVar5 = 0; } else { lVar4 = 0; while (local_b8 << 2 != lVar4) { uVar2 = *(uint *)((long)local_c0 + lVar4); uVar5 = 0; if ((((uVar2 < 0x20) || (uVar2 == 0x7f)) || ((uVar2 & 0xffffffe0) == 0x80)) || ((uVar5 = 0, uVar2 - 0x2215 < 2 || (uVar2 == 0xff0e)))) goto LAB_001c1d59; if ((uVar2 & 0xfffff800) == 0xd800) goto LAB_001c1d56; uVar5 = 0; if (((uVar2 - 0x22 < 0x3b) && ((0x400000035002101U >> ((ulong)(uVar2 - 0x22) & 0x3f) & 1) != 0)) || ((uVar2 == 0x7c || ((uVar2 == 0xfeff || (lVar4 = lVar4 + 4, uVar2 == 0xfffd)))))) goto LAB_001c1d59; } if (**(char **)param_1 == ' ') goto LAB_001c1d56; cVar1 = (*(char **)param_1)[*(long *)(param_1 + 8) + -1]; uVar5 = 0; if ((cVar1 != ' ') && (cVar1 != '.')) { uVar5 = 0; lVar4 = std::__cxx11::string::find((char *)param_1,0x1fe3cd); if (lVar4 == -1) { bVar3 = std::operator==(param_1,"."); uVar5 = CONCAT71(extraout_var,bVar3) & 0xffffffff ^ 1; } } } LAB_001c1d59: std::__cxx11::u32string::~u32string((u32string *)&local_c0); } return uVar5; }
61,495
ma_pvio_has_data
eloqsql/libmariadb/libmariadb/ma_pvio.c
my_bool ma_pvio_has_data(MARIADB_PVIO *pvio, ssize_t *data_len) { /* check if we still have unread data in cache */ if (pvio && pvio->cache) if (pvio->cache_pos > pvio->cache) return test(pvio->cache_pos - pvio->cache); if (pvio && pvio->methods->has_data) return pvio->methods->has_data(pvio, data_len); return 1; }
O0
c
ma_pvio_has_data: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3e71c movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x3e71c movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x8(%rcx), %rax jbe 0x3e71a movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax subq %rax, %rdx xorl %eax, %eax movl $0x1, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax movb %al, -0x1(%rbp) jmp 0x3e751 jmp 0x3e71c cmpq $0x0, -0x10(%rbp) je 0x3e74d movq -0x10(%rbp), %rax movq 0x48(%rax), %rax cmpq $0x0, 0x78(%rax) je 0x3e74d movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq 0x78(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq *%rax movb %al, -0x1(%rbp) jmp 0x3e751 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ma_pvio_has_data: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_3E71C mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_3E71C mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_10] cmp rax, [rcx+8] jbe short loc_3E71A mov rax, [rbp+var_10] mov rdx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] sub rdx, rax xor eax, eax mov ecx, 1 cmp rdx, 0 cmovnz eax, ecx mov [rbp+var_1], al jmp short loc_3E751 loc_3E71A: jmp short $+2 loc_3E71C: cmp [rbp+var_10], 0 jz short loc_3E74D mov rax, [rbp+var_10] mov rax, [rax+48h] cmp qword ptr [rax+78h], 0 jz short loc_3E74D mov rax, [rbp+var_10] mov rax, [rax+48h] mov rax, [rax+78h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rax mov [rbp+var_1], al jmp short loc_3E751 loc_3E74D: mov [rbp+var_1], 1 loc_3E751: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_pvio_has_data(_QWORD *a1, long long a2) { if ( a1 && a1[1] && a1[2] > a1[1] ) return a1[2] != a1[1]; if ( a1 && *(_QWORD *)(a1[9] + 120LL) ) return (*(long long ( **)(_QWORD *, long long))(a1[9] + 120LL))(a1, a2); return 1; }
ma_pvio_has_data: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013e71c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0013e71c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x8] JBE 0x0013e71a MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] SUB RDX,RAX XOR EAX,EAX MOV ECX,0x1 CMP RDX,0x0 CMOVNZ EAX,ECX MOV byte ptr [RBP + -0x1],AL JMP 0x0013e751 LAB_0013e71a: JMP 0x0013e71c LAB_0013e71c: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013e74d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] CMP qword ptr [RAX + 0x78],0x0 JZ 0x0013e74d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x78] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL RAX MOV byte ptr [RBP + -0x1],AL JMP 0x0013e751 LAB_0013e74d: MOV byte ptr [RBP + -0x1],0x1 LAB_0013e751: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 ma_pvio_has_data(long param_1,int8 param_2) { int1 local_9; if (((param_1 == 0) || (*(long *)(param_1 + 8) == 0)) || (*(ulong *)(param_1 + 0x10) <= *(ulong *)(param_1 + 8))) { if ((param_1 == 0) || (*(long *)(*(long *)(param_1 + 0x48) + 0x78) == 0)) { local_9 = 1; } else { local_9 = (**(code **)(*(long *)(param_1 + 0x48) + 0x78))(param_1,param_2); } } else { local_9 = *(long *)(param_1 + 0x10) != *(long *)(param_1 + 8); } return local_9; }
61,496
my_mb_wc_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O0
c
my_mb_wc_euc_kr: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x4defe movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x4dfeb movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x4df26 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4dfeb movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x4df40 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x4dfeb movl -0x2c(%rbp), %eax movzbl %al, %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x4dfae movl -0x2c(%rbp), %eax movzbl %al, %eax cmpl $0xfe, %eax jg 0x4dfae movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x41, %eax jl 0x4df76 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x5a, %eax jle 0x4dfb7 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x61, %eax jl 0x4df90 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7a, %eax jle 0x4dfb7 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x81, %eax jl 0x4dfae movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jle 0x4dfb7 movl $0x0, -0x4(%rbp) jmp 0x4dfeb movl -0x2c(%rbp), %edi shll $0x8, %edi movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl %eax, %edi callq 0x4e360 cltq movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax jne 0x4dfe4 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x4dfeb movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_euc_kr: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_4DEFE mov [rbp+var_4], 0FFFFFF9Bh jmp loc_4DFEB loc_4DEFE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_4DF26 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_4DFEB loc_4DF26: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_4DF40 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_4DFEB loc_4DF40: mov eax, [rbp+var_2C] movzx ecx, al mov eax, 81h cmp eax, ecx jg short loc_4DFAE mov eax, [rbp+var_2C] movzx eax, al cmp eax, 0FEh jg short loc_4DFAE mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 41h ; 'A' jl short loc_4DF76 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 5Ah ; 'Z' jle short loc_4DFB7 loc_4DF76: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 61h ; 'a' jl short loc_4DF90 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 7Ah ; 'z' jle short loc_4DFB7 loc_4DF90: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 81h jl short loc_4DFAE mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jle short loc_4DFB7 loc_4DFAE: mov [rbp+var_4], 0 jmp short loc_4DFEB loc_4DFB7: mov edi, [rbp+var_2C] shl edi, 8 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add edi, eax call func_ksc5601_uni_onechar cdqe mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jnz short loc_4DFE4 mov [rbp+var_4], 0FFFFFFFEh jmp short loc_4DFEB loc_4DFE4: mov [rbp+var_4], 2 loc_4DFEB: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_mb_wc_euc_kr(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { int v4; // eax unsigned int v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v6 = *a3; if ( v6 >= 0x80 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (unsigned __int8)v6 < 0x81u || (unsigned __int8)v6 == 255 || (a3[1] < 0x41u || a3[1] > 0x5Au) && (a3[1] < 0x61u || a3[1] > 0x7Au) && (a3[1] < 0x81u || a3[1] == 255) ) { return 0; } else { v4 = func_ksc5601_uni_onechar(a3[1] + (v6 << 8)); *a2 = v4; if ( v4 ) return 2; else return (unsigned int)-2; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_euc_kr: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0014defe MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0014dfeb LAB_0014defe: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x0014df26 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014dfeb LAB_0014df26: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0014df40 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0014dfeb LAB_0014df40: MOV EAX,dword ptr [RBP + -0x2c] MOVZX ECX,AL MOV EAX,0x81 CMP EAX,ECX JG 0x0014dfae MOV EAX,dword ptr [RBP + -0x2c] MOVZX EAX,AL CMP EAX,0xfe JG 0x0014dfae MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x41 JL 0x0014df76 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x5a JLE 0x0014dfb7 LAB_0014df76: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x61 JL 0x0014df90 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7a JLE 0x0014dfb7 LAB_0014df90: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x81 JL 0x0014dfae MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JLE 0x0014dfb7 LAB_0014dfae: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014dfeb LAB_0014dfb7: MOV EDI,dword ptr [RBP + -0x2c] SHL EDI,0x8 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EDI,EAX CALL 0x0014e360 CDQE MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JNZ 0x0014dfe4 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0014dfeb LAB_0014dfe4: MOV dword ptr [RBP + -0x4],0x2 LAB_0014dfeb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_mb_wc_euc_kr(int8 param_1,long *param_2,byte *param_3,byte *param_4) { uint uVar1; int iVar2; int4 local_c; if (param_3 < param_4) { uVar1 = (uint)*param_3; if (uVar1 < 0x80) { *param_2 = (long)(int)uVar1; local_c = 1; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if (((uVar1 < 0x81) || (0xfe < uVar1)) || ((((param_3[1] < 0x41 || (0x5a < param_3[1])) && ((param_3[1] < 0x61 || (0x7a < param_3[1])))) && ((param_3[1] < 0x81 || (param_3[1] == 0xff)))))) { local_c = 0; } else { iVar2 = func_ksc5601_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]); *param_2 = (long)iVar2; if ((long)iVar2 == 0) { local_c = 0xfffffffe; } else { local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
61,497
skip_comments
bluesky950520[P]quickjs/run-test262.c
int skip_comments(const char *str, int line, int *pline) { const char *p; int c; p = str; while ((c = (unsigned char)*p++) != '\0') { if (isspace(c)) { if (c == '\n') line++; continue; } if (c == '/' && *p == '/') { while (*++p && *p != '\n') continue; continue; } if (c == '/' && *p == '*') { for (p += 1; *p; p++) { if (*p == '\n') { line++; continue; } if (*p == '*' && p[1] == '/') { p += 2; break; } } continue; } break; } if (pline) *pline = line; return p - str; }
O2
c
skip_comments: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq %rdi, %r15 movb (%r15), %r13b movq %r15, %r12 leaq 0x1(%r12), %r15 testb %r13b, %r13b je 0xfe4e callq 0xea60 movq (%rax), %rax movzbl %r13b, %ecx testb $0x20, 0x1(%rax,%rcx,2) jne 0xfe35 cmpb $0x2f, %r13b jne 0xfe4e movzbl (%r15), %eax cmpl $0x2f, %eax jne 0xfe05 movq %r15, %r12 movzbl 0x1(%r12), %r13d incq %r12 testl %r13d, %r13d je 0xfdbc cmpl $0xa, %r13d jne 0xfdef jmp 0xfdbc cmpl $0x2a, %eax jne 0xfe4e addq $0x2, %r12 movq %r12, %r15 movzbl (%r15), %eax cmpl $0xa, %eax je 0xfe2e cmpl $0x2a, %eax je 0xfe25 testl %eax, %eax jne 0xfe30 jmp 0xfdb6 cmpb $0x2f, 0x1(%r15) jne 0xfe30 jmp 0xfe45 incl %ebp incq %r15 jmp 0xfe11 xorl %eax, %eax cmpb $0xa, %r13b sete %al addl %eax, %ebp jmp 0xfdb6 addq $0x2, %r15 jmp 0xfdb6 testq %r14, %r14 je 0xfe56 movl %ebp, (%r14) subl %ebx, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
skip_comments: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov ebp, esi mov rbx, rdi mov r15, rdi loc_FDB6: mov r13b, [r15] mov r12, r15 loc_FDBC: lea r15, [r12+1] test r13b, r13b jz loc_FE4E call ___ctype_b_loc mov rax, [rax] movzx ecx, r13b test byte ptr [rax+rcx*2+1], 20h jnz short loc_FE35 cmp r13b, 2Fh ; '/' jnz short loc_FE4E movzx eax, byte ptr [r15] cmp eax, 2Fh ; '/' jnz short loc_FE05 mov r12, r15 loc_FDEF: movzx r13d, byte ptr [r12+1] inc r12 test r13d, r13d jz short loc_FDBC cmp r13d, 0Ah jnz short loc_FDEF jmp short loc_FDBC loc_FE05: cmp eax, 2Ah ; '*' jnz short loc_FE4E add r12, 2 mov r15, r12 loc_FE11: movzx eax, byte ptr [r15] cmp eax, 0Ah jz short loc_FE2E cmp eax, 2Ah ; '*' jz short loc_FE25 test eax, eax jnz short loc_FE30 jmp short loc_FDB6 loc_FE25: cmp byte ptr [r15+1], 2Fh ; '/' jnz short loc_FE30 jmp short loc_FE45 loc_FE2E: inc ebp loc_FE30: inc r15 jmp short loc_FE11 loc_FE35: xor eax, eax cmp r13b, 0Ah setz al add ebp, eax jmp loc_FDB6 loc_FE45: add r15, 2 jmp loc_FDB6 loc_FE4E: test r14, r14 jz short loc_FE56 mov [r14], ebp loc_FE56: sub r15d, ebx mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long skip_comments(unsigned __int8 *a1, int a2, _DWORD *a3) { unsigned __int8 *i; // r15 int v6; // r13d unsigned __int8 *v7; // r12 int v8; // eax int v9; // eax i = a1; LABEL_2: LOBYTE(v6) = *i; v7 = i; while ( 1 ) { i = v7 + 1; if ( !(_BYTE)v6 ) break; if ( (*(_BYTE *)(*(_QWORD *)__ctype_b_loc(a1) + 2LL * (unsigned __int8)v6 + 1) & 0x20) != 0 ) { a2 += (_BYTE)v6 == 10; goto LABEL_2; } if ( (_BYTE)v6 != 47 ) break; v8 = *i; if ( v8 != 47 ) { if ( v8 == 42 ) { for ( i = v7 + 2; ; ++i ) { v9 = *i; if ( v9 == 10 ) { ++a2; } else if ( v9 == 42 ) { if ( i[1] == 47 ) { i += 2; goto LABEL_2; } } else if ( !*i ) { goto LABEL_2; } } } break; } ++v7; do v6 = *++v7; while ( v6 && v6 != 10 ); } if ( a3 ) *a3 = a2; return (unsigned int)((_DWORD)i - (_DWORD)a1); }
skip_comments: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI MOV R15,RDI LAB_0010fdb6: MOV R13B,byte ptr [R15] MOV R12,R15 LAB_0010fdbc: LEA R15,[R12 + 0x1] TEST R13B,R13B JZ 0x0010fe4e CALL 0x0010ea60 MOV RAX,qword ptr [RAX] MOVZX ECX,R13B TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20 JNZ 0x0010fe35 CMP R13B,0x2f JNZ 0x0010fe4e MOVZX EAX,byte ptr [R15] CMP EAX,0x2f JNZ 0x0010fe05 MOV R12,R15 LAB_0010fdef: MOVZX R13D,byte ptr [R12 + 0x1] INC R12 TEST R13D,R13D JZ 0x0010fdbc CMP R13D,0xa JNZ 0x0010fdef JMP 0x0010fdbc LAB_0010fe05: CMP EAX,0x2a JNZ 0x0010fe4e ADD R12,0x2 MOV R15,R12 LAB_0010fe11: MOVZX EAX,byte ptr [R15] CMP EAX,0xa JZ 0x0010fe2e CMP EAX,0x2a JZ 0x0010fe25 TEST EAX,EAX JNZ 0x0010fe30 JMP 0x0010fdb6 LAB_0010fe25: CMP byte ptr [R15 + 0x1],0x2f JNZ 0x0010fe30 JMP 0x0010fe45 LAB_0010fe2e: INC EBP LAB_0010fe30: INC R15 JMP 0x0010fe11 LAB_0010fe35: XOR EAX,EAX CMP R13B,0xa SETZ AL ADD EBP,EAX JMP 0x0010fdb6 LAB_0010fe45: ADD R15,0x2 JMP 0x0010fdb6 LAB_0010fe4e: TEST R14,R14 JZ 0x0010fe56 MOV dword ptr [R14],EBP LAB_0010fe56: SUB R15D,EBX MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int skip_comments(byte *param_1,int param_2,int *param_3) { byte bVar1; ushort **ppuVar2; byte *pbVar3; byte *pbVar4; char cVar5; ulong uVar6; pbVar4 = param_1; LAB_0010fdb6: uVar6 = (ulong)*pbVar4; LAB_0010fdbc: pbVar3 = pbVar4 + 1; cVar5 = (char)uVar6; if (cVar5 == '\0') goto LAB_0010fe4e; ppuVar2 = __ctype_b_loc(); if ((*(byte *)((long)*ppuVar2 + uVar6 * 2 + 1) & 0x20) != 0) { param_2 = param_2 + (uint)(cVar5 == '\n'); pbVar4 = pbVar3; goto LAB_0010fdb6; } if (cVar5 != '/') goto LAB_0010fe4e; if (*pbVar3 == 0x2f) { do { bVar1 = pbVar3[1]; uVar6 = (ulong)bVar1; pbVar4 = pbVar3 + 1; if (bVar1 == 0) break; pbVar3 = pbVar4; } while (bVar1 != 10); goto LAB_0010fdbc; } if (*pbVar3 != 0x2a) { LAB_0010fe4e: if (param_3 != (int *)0x0) { *param_3 = param_2; } return (int)pbVar3 - (int)param_1; } pbVar4 = pbVar4 + 2; do { bVar1 = *pbVar4; if (bVar1 == 10) { param_2 = param_2 + 1; } else if (bVar1 == 0x2a) { if (pbVar4[1] == 0x2f) { pbVar4 = pbVar4 + 2; goto LAB_0010fdb6; } } else if (bVar1 == 0) goto LAB_0010fdb6; pbVar4 = pbVar4 + 1; } while( true ); }
61,498
multi_alloc_root
eloqsql/mysys/my_alloc.c
void *multi_alloc_root(MEM_ROOT *root, ...) { va_list args; char **ptr, *start, *res; size_t tot_length, length; DBUG_ENTER("multi_alloc_root"); /* We don't need to do DBUG_PRINT here as it will be done when alloc_root is called */ va_start(args, root); tot_length= 0; while ((ptr= va_arg(args, char **))) { length= va_arg(args, uint); tot_length+= ALIGN_SIZE(length); } va_end(args); if (!(start= (char*) alloc_root(root, tot_length))) DBUG_RETURN(0); /* purecov: inspected */ va_start(args, root); res= start; while ((ptr= va_arg(args, char **))) { *ptr= res; length= va_arg(args, uint); res+= ALIGN_SIZE(length); } va_end(args); DBUG_RETURN((void*) start); }
O3
c
multi_alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp leaq -0xe0(%rbp), %r14 movq %rsi, 0x8(%r14) movq %rdx, 0x10(%r14) movq %rcx, 0x18(%r14) movq %r8, 0x20(%r14) movq %r9, 0x28(%r14) testb %al, %al je 0xa4586 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movabsq $0x1fffffff8, %rbx # imm = 0x1FFFFFFF8 movq %r14, -0x20(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x28(%rbp) movabsq $0x3000000008, %r15 # imm = 0x3000000008 movq %r15, -0x30(%rbp) movl $0x8, %eax xorl %esi, %esi cmpl $0x28, %eax ja 0xa45c6 movq %rcx, %rdx movl %eax, %ecx addq %r14, %rcx addl $0x8, %eax movl %eax, -0x30(%rbp) jmp 0xa45ce leaq 0x8(%rcx), %rdx movq %rdx, -0x28(%rbp) cmpq $0x0, (%rcx) je 0xa45ff cmpl $0x28, %eax ja 0xa45e9 movq %rdx, %rcx movl %eax, %edx addq %r14, %rdx addl $0x8, %eax movl %eax, -0x30(%rbp) jmp 0xa45f1 leaq 0x8(%rdx), %rcx movq %rcx, -0x28(%rbp) movl (%rdx), %edx addq $0x7, %rdx andq %rbx, %rdx addq %rdx, %rsi jmp 0xa45b1 callq 0xa4413 testq %rax, %rax je 0xa467d movq %r14, -0x20(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x28(%rbp) movq %r15, -0x30(%rbp) movl $0x8, %edx movq %rax, %rcx cmpl $0x28, %edx ja 0xa4634 movl %edx, %esi addq -0x20(%rbp), %rsi addl $0x8, %edx movl %edx, -0x30(%rbp) jmp 0xa4640 movq -0x28(%rbp), %rsi leaq 0x8(%rsi), %rdx movq %rdx, -0x28(%rbp) movq (%rsi), %rdx testq %rdx, %rdx je 0xa467d movq %rcx, (%rdx) movl -0x30(%rbp), %edx cmpq $0x28, %rdx ja 0xa4663 movq %rdx, %rsi addq -0x20(%rbp), %rsi addl $0x8, %edx movl %edx, -0x30(%rbp) jmp 0xa466f movq -0x28(%rbp), %rsi leaq 0x8(%rsi), %rdi movq %rdi, -0x28(%rbp) movl (%rsi), %esi addq $0x7, %rsi andq %rbx, %rsi addq %rsi, %rcx jmp 0xa4621 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
multi_alloc_root: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h lea r14, [rbp+var_E0] mov [r14+8], rsi mov [r14+10h], rdx mov [r14+18h], rcx mov [r14+20h], r8 mov [r14+28h], r9 test al, al jz short loc_A4586 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_A4586: mov rbx, 1FFFFFFF8h mov [rbp+var_20], r14 lea rcx, [rbp+arg_0] mov [rbp+var_28], rcx mov r15, 3000000008h mov [rbp+var_30], r15 mov eax, 8 xor esi, esi loc_A45B1: cmp eax, 28h ; '(' ja short loc_A45C6 mov rdx, rcx mov ecx, eax add rcx, r14 add eax, 8 mov dword ptr [rbp+var_30], eax jmp short loc_A45CE loc_A45C6: lea rdx, [rcx+8] mov [rbp+var_28], rdx loc_A45CE: cmp qword ptr [rcx], 0 jz short loc_A45FF cmp eax, 28h ; '(' ja short loc_A45E9 mov rcx, rdx mov edx, eax add rdx, r14 add eax, 8 mov dword ptr [rbp+var_30], eax jmp short loc_A45F1 loc_A45E9: lea rcx, [rdx+8] mov [rbp+var_28], rcx loc_A45F1: mov edx, [rdx] add rdx, 7 and rdx, rbx add rsi, rdx jmp short loc_A45B1 loc_A45FF: call alloc_root test rax, rax jz short loc_A467D mov [rbp+var_20], r14 lea rcx, [rbp+arg_0] mov [rbp+var_28], rcx mov [rbp+var_30], r15 mov edx, 8 mov rcx, rax loc_A4621: cmp edx, 28h ; '(' ja short loc_A4634 mov esi, edx add rsi, [rbp+var_20] add edx, 8 mov dword ptr [rbp+var_30], edx jmp short loc_A4640 loc_A4634: mov rsi, [rbp+var_28] lea rdx, [rsi+8] mov [rbp+var_28], rdx loc_A4640: mov rdx, [rsi] test rdx, rdx jz short loc_A467D mov [rdx], rcx mov edx, dword ptr [rbp+var_30] cmp rdx, 28h ; '(' ja short loc_A4663 mov rsi, rdx add rsi, [rbp+var_20] add edx, 8 mov dword ptr [rbp+var_30], edx jmp short loc_A466F loc_A4663: mov rsi, [rbp+var_28] lea rdi, [rsi+8] mov [rbp+var_28], rdi loc_A466F: mov esi, [rsi] add rsi, 7 and rsi, rbx add rcx, rsi jmp short loc_A4621 loc_A467D: add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
char * multi_alloc_root( 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 *v15; // rcx unsigned int v16; // eax long long i; // rsi char *v18; // rdx char *result; // rax unsigned int v20; // edx char *j; // rcx char *v22; // rsi char *v23; // rsi _BYTE v24[8]; // [rsp+0h] [rbp-E0h] BYREF long long v25; // [rsp+8h] [rbp-D8h] long long v26; // [rsp+10h] [rbp-D0h] long long v27; // [rsp+18h] [rbp-C8h] long long v28; // [rsp+20h] [rbp-C0h] long long v29; // [rsp+28h] [rbp-B8h] __m128 v30; // [rsp+30h] [rbp-B0h] __m128 v31; // [rsp+40h] [rbp-A0h] __m128 v32; // [rsp+50h] [rbp-90h] __m128 v33; // [rsp+60h] [rbp-80h] __m128 v34; // [rsp+70h] [rbp-70h] __m128 v35; // [rsp+80h] [rbp-60h] __m128 v36; // [rsp+90h] [rbp-50h] __m128 v37; // [rsp+A0h] [rbp-40h] long long v38; // [rsp+B0h] [rbp-30h] char *v39; // [rsp+B8h] [rbp-28h] _BYTE *v40; // [rsp+C0h] [rbp-20h] v30 = a7; v31 = a8; v32 = a9; v33 = a10; v34 = a11; v35 = a12; v36 = a13; v37 = a14; v25 = a2; v26 = a3; v27 = a4; v28 = a5; v29 = a6; v40 = v24; v15 = &a15; v39 = &a15; v38 = 0x3000000008LL; v16 = 8; for ( i = 0LL; ; i += (*(unsigned int *)v18 + 7LL) & 0x1FFFFFFF8LL ) { if ( v16 > 0x28 ) { v18 = v15 + 8; v39 = v15 + 8; } else { v18 = v15; v15 = &v24[v16]; v16 += 8; LODWORD(v38) = v16; } if ( !*(_QWORD *)v15 ) break; if ( v16 > 0x28 ) { v15 = v18 + 8; v39 = v18 + 8; } else { v15 = v18; v18 = &v24[v16]; v16 += 8; LODWORD(v38) = v16; } } result = alloc_root(a1, i); if ( result ) { v40 = v24; v39 = &a15; v38 = 0x3000000008LL; v20 = 8; for ( j = result; ; j += (*(unsigned int *)v23 + 7LL) & 0x1FFFFFFF8LL ) { if ( v20 > 0x28 ) { v22 = v39; v39 += 8; } else { v22 = &v40[v20]; LODWORD(v38) = v20 + 8; } if ( !*(_QWORD *)v22 ) break; **(_QWORD **)v22 = j; v20 = v38; if ( (unsigned int)v38 > 0x28uLL ) { v23 = v39; v39 += 8; } else { v23 = &v40[(unsigned int)v38]; v20 = v38 + 8; LODWORD(v38) = v38 + 8; } } } return result; }
multi_alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 LEA R14,[RBP + -0xe0] MOV qword ptr [R14 + 0x8],RSI MOV qword ptr [R14 + 0x10],RDX MOV qword ptr [R14 + 0x18],RCX MOV qword ptr [R14 + 0x20],R8 MOV qword ptr [R14 + 0x28],R9 TEST AL,AL JZ 0x001a4586 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_001a4586: MOV RBX,0x1fffffff8 MOV qword ptr [RBP + -0x20],R14 LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RCX MOV R15,0x3000000008 MOV qword ptr [RBP + -0x30],R15 MOV EAX,0x8 XOR ESI,ESI LAB_001a45b1: CMP EAX,0x28 JA 0x001a45c6 MOV RDX,RCX MOV ECX,EAX ADD RCX,R14 ADD EAX,0x8 MOV dword ptr [RBP + -0x30],EAX JMP 0x001a45ce LAB_001a45c6: LEA RDX,[RCX + 0x8] MOV qword ptr [RBP + -0x28],RDX LAB_001a45ce: CMP qword ptr [RCX],0x0 JZ 0x001a45ff CMP EAX,0x28 JA 0x001a45e9 MOV RCX,RDX MOV EDX,EAX ADD RDX,R14 ADD EAX,0x8 MOV dword ptr [RBP + -0x30],EAX JMP 0x001a45f1 LAB_001a45e9: LEA RCX,[RDX + 0x8] MOV qword ptr [RBP + -0x28],RCX LAB_001a45f1: MOV EDX,dword ptr [RDX] ADD RDX,0x7 AND RDX,RBX ADD RSI,RDX JMP 0x001a45b1 LAB_001a45ff: CALL 0x001a4413 TEST RAX,RAX JZ 0x001a467d MOV qword ptr [RBP + -0x20],R14 LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R15 MOV EDX,0x8 MOV RCX,RAX LAB_001a4621: CMP EDX,0x28 JA 0x001a4634 MOV ESI,EDX ADD RSI,qword ptr [RBP + -0x20] ADD EDX,0x8 MOV dword ptr [RBP + -0x30],EDX JMP 0x001a4640 LAB_001a4634: MOV RSI,qword ptr [RBP + -0x28] LEA RDX,[RSI + 0x8] MOV qword ptr [RBP + -0x28],RDX LAB_001a4640: MOV RDX,qword ptr [RSI] TEST RDX,RDX JZ 0x001a467d MOV qword ptr [RDX],RCX MOV EDX,dword ptr [RBP + -0x30] CMP RDX,0x28 JA 0x001a4663 MOV RSI,RDX ADD RSI,qword ptr [RBP + -0x20] ADD EDX,0x8 MOV dword ptr [RBP + -0x30],EDX JMP 0x001a466f LAB_001a4663: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RSI + 0x8] MOV qword ptr [RBP + -0x28],RDI LAB_001a466f: MOV ESI,dword ptr [RSI] ADD RSI,0x7 AND RSI,RBX ADD RCX,RSI JMP 0x001a4621 LAB_001a467d: ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void multi_alloc_root(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; uint uVar1; uint *puVar2; uint *puVar3; ulong uVar4; long lVar5; uint *puVar6; uint local_e8 [2]; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; uint local_38; int4 uStack_34; uint *local_30; uint *local_28; local_e0 = param_10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_28 = local_e8; puVar6 = (uint *)&stack0x00000008; local_30 = puVar6; local_38 = 8; uStack_34 = 0x30; uVar1 = 8; lVar5 = 0; while( true ) { if (uVar1 < 0x29) { uVar4 = (ulong)uVar1; uVar1 = uVar1 + 8; local_38 = uVar1; puVar2 = (uint *)((long)local_e8 + uVar4); puVar3 = puVar6; } else { puVar3 = puVar6 + 2; local_30 = puVar3; puVar2 = puVar6; } if (*(long *)puVar2 == 0) break; if (uVar1 < 0x29) { uVar4 = (ulong)uVar1; uVar1 = uVar1 + 8; local_38 = uVar1; puVar6 = puVar3; puVar3 = (uint *)((long)local_e8 + uVar4); } else { puVar6 = puVar3 + 2; local_30 = puVar6; } lVar5 = lVar5 + ((ulong)*puVar3 + 7 & 0x1fffffff8); } lVar5 = alloc_root(param_9,lVar5); if (lVar5 != 0) { local_30 = (uint *)&stack0x00000008; uVar1 = 8; uVar4 = 8; while( true ) { if ((uint)uVar4 < 0x29) { uVar1 = (uint)uVar4 + 8; puVar6 = (uint *)((long)local_e8 + uVar4); } else { puVar6 = local_30; local_30 = local_30 + 2; } if (*(long **)puVar6 == (long *)0x0) break; **(long **)puVar6 = lVar5; uVar4 = (ulong)uVar1; if (uVar4 < 0x29) { puVar6 = (uint *)((long)local_e8 + uVar4); uVar1 = uVar1 + 8; uVar4 = (ulong)uVar1; } else { puVar6 = local_30; local_30 = local_30 + 2; } lVar5 = lVar5 + ((ulong)*puVar6 + 7 & 0x1fffffff8); } } return; }
61,499
pvio_socket_is_alive
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_is_alive(MARIADB_PVIO *pvio) { struct st_pvio_socket *csock= NULL; #ifndef _WIN32 struct pollfd poll_fd; #else FD_SET sfds; struct timeval tv= {0,0}; #endif int res; if (!pvio || !pvio->data) return 0; csock= (struct st_pvio_socket *)pvio->data; #ifndef _WIN32 memset(&poll_fd, 0, sizeof(struct pollfd)); poll_fd.events= POLLPRI | POLLIN; poll_fd.fd= csock->socket; res= poll(&poll_fd, 1, 0); if (res <= 0) /* timeout or error */ return FALSE; if (!(poll_fd.revents & (POLLIN | POLLPRI))) return FALSE; return TRUE; #else /* We can't use the WSAPoll function, it's broken :-( (see Windows 8 Bugs 309411 - WSAPoll does not report failed connections) Instead we need to use select function: If TIMEVAL is initialized to {0, 0}, select will return immediately; this is used to poll the state of the selected sockets. */ FD_ZERO(&sfds); FD_SET(csock->socket, &sfds); res= select((int)csock->socket + 1, &sfds, NULL, NULL, &tv); if (res > 0 && FD_ISSET(csock->socket, &sfds)) return TRUE; return FALSE; #endif }
O0
c
pvio_socket_is_alive: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq $0x0, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x42475 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x4247b movb $0x0, -0x1(%rbp) jmp 0x424da movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) leaq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x8, %edx callq 0x13250 movw $0x3, -0x1c(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) leaq -0x20(%rbp), %rdi movl $0x1, %esi xorl %edx, %edx callq 0x13690 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jg 0x424c4 movb $0x0, -0x1(%rbp) jmp 0x424da movswl -0x1a(%rbp), %eax andl $0x3, %eax cmpl $0x0, %eax jne 0x424d6 movb $0x0, -0x1(%rbp) jmp 0x424da movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pvio_socket_is_alive: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], 0 cmp [rbp+var_10], 0 jz short loc_42475 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_4247B loc_42475: mov [rbp+var_1], 0 jmp short loc_424DA loc_4247B: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax lea rdi, [rbp+var_20] xor esi, esi mov edx, 8 call _memset mov [rbp+var_1C], 3 mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_20], eax lea rdi, [rbp+var_20] mov esi, 1 xor edx, edx call _poll mov [rbp+var_24], eax cmp [rbp+var_24], 0 jg short loc_424C4 mov [rbp+var_1], 0 jmp short loc_424DA loc_424C4: movsx eax, [rbp+var_1A] and eax, 3 cmp eax, 0 jnz short loc_424D6 mov [rbp+var_1], 0 jmp short loc_424DA loc_424D6: mov [rbp+var_1], 1 loc_424DA: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
bool pvio_socket_is_alive(int **a1) { int v2; // [rsp+10h] [rbp-20h] BYREF __int16 v3; // [rsp+14h] [rbp-1Ch] __int16 v4; // [rsp+16h] [rbp-1Ah] int *v5; // [rsp+18h] [rbp-18h] int **v6; // [rsp+20h] [rbp-10h] v6 = a1; v5 = 0LL; if ( !a1 || !*v6 ) return 0; v5 = *v6; memset(&v2, 0LL, 8LL); v3 = 3; v2 = *v5; return (int)poll(&v2, 1LL, 0LL) > 0 && (v4 & 3) != 0; }
pvio_socket_is_alive: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x00142475 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0014247b LAB_00142475: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001424da LAB_0014247b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x20] XOR ESI,ESI MOV EDX,0x8 CALL 0x00113250 MOV word ptr [RBP + -0x1c],0x3 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX LEA RDI,[RBP + -0x20] MOV ESI,0x1 XOR EDX,EDX CALL 0x00113690 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JG 0x001424c4 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001424da LAB_001424c4: MOVSX EAX,word ptr [RBP + -0x1a] AND EAX,0x3 CMP EAX,0x0 JNZ 0x001424d6 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001424da LAB_001424d6: MOV byte ptr [RBP + -0x1],0x1 LAB_001424da: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 pvio_socket_is_alive(long *param_1) { int iVar1; pollfd local_28; int *local_20; long *local_18; int1 local_9; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_9 = 0; } else { local_20 = (int *)*param_1; local_18 = param_1; memset(&local_28,0,8); local_28.events = 3; local_28.fd = *local_20; iVar1 = poll(&local_28,1,0); if (iVar1 < 1) { local_9 = 0; } else if ((local_28.revents & 3U) == 0) { local_9 = 0; } else { local_9 = 1; } } return local_9; }