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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
22,700 | my_hash_reset | eloqsql/mysys/hash.c | void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
/* Set row pointers so that the hash can be reused at once */
hash->blength= 1;
DBUG_VOID_RETURN;
} | O0 | c | my_hash_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x2b50e
movq -0x8(%rbp), %rdi
callq 0x2b470
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x10(%rax)
jmp 0x2b530
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_reset:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_2B50E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov dword ptr [rax+30h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 1
jmp short $+2
loc_2B530:
add rsp, 10h
pop rbp
retn
| unsigned long long my_hash_reset(unsigned long long a1)
{
unsigned long long result; // rax
my_hash_free_elements(a1);
*(_DWORD *)(a1 + 48) = 0;
result = a1;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
| my_hash_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0012b50e
LAB_0012b50e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012b470
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x1
JMP 0x0012b530
LAB_0012b530:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_reset(long param_1)
{
my_hash_free_elements(param_1);
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
| |
22,701 | OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../vtr/componentInterfaces.h | float* GetSharpnessPerEdge(float pSharpness[]) const {
ConstIndexArray pEdges = _parent->getVertexEdges(_pIndex);
for (int i = 0; i < _eCount; ++i) {
pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]);
}
return pSharpness;
} | O0 | c | OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq (%rax), %rdi
movl 0x10(%rax), %esi
callq 0xd31e0
movl %edx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x1624c5
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %esi
leaq -0x20(%rbp), %rdi
callq 0xcabf0
movq -0x48(%rbp), %rdi
movl (%rax), %esi
callq 0xc6520
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x16247f
movq -0x10(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal15VertexInterface19GetSharpnessPerEdgeEPf:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov rdi, [rax]; this
mov esi, [rax+10h]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int)
mov [rbp+var_28], edx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
mov eax, [rbp+var_28]
mov [rbp+var_18], eax
mov [rbp+var_34], 0
loc_16247F:
mov rcx, [rbp+var_40]
mov eax, [rbp+var_34]
cmp eax, [rcx+18h]
jge short loc_1624C5
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_48], rax
mov esi, [rbp+var_34]
lea rdi, [rbp+var_20]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_48]; this
mov esi, [rax]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level16getEdgeSharpnessEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeSharpness(int)
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_34]
movss dword ptr [rax+rcx*4], xmm0
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp short loc_16247F
loc_1624C5:
mov rax, [rbp+var_10]
add rsp, 50h
pop rbp
retn
| float * OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(
OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface *this,
float *a2,
float a3)
{
int v3; // edx
int *v4; // rax
OpenSubdiv::v3_6_0::Vtr::internal::Level *v6; // [rsp+8h] [rbp-48h]
unsigned int i; // [rsp+1Ch] [rbp-34h]
long long VertexEdges; // [rsp+30h] [rbp-20h] BYREF
int v9; // [rsp+38h] [rbp-18h]
float *v10; // [rsp+40h] [rbp-10h]
OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface *v11; // [rsp+48h] [rbp-8h]
v11 = this;
v10 = a2;
VertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(
*(OpenSubdiv::v3_6_0::Vtr::internal::Level **)this,
*((_DWORD *)this + 4));
v9 = v3;
for ( i = 0; (signed int)i < *((_DWORD *)this + 6); ++i )
{
v6 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)this;
v4 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&VertexEdges, i);
OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeSharpness(v6, *v4);
v10[i] = a3;
}
return v10;
}
| |||
22,702 | OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../vtr/componentInterfaces.h | float* GetSharpnessPerEdge(float pSharpness[]) const {
ConstIndexArray pEdges = _parent->getVertexEdges(_pIndex);
for (int i = 0; i < _eCount; ++i) {
pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]);
}
return pSharpness;
} | O1 | c | OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const:
movq %rsi, %rax
movslq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x784de
movq (%rdi), %rsi
movslq 0x10(%rdi), %rdx
movq 0x150(%rsi), %rdi
movslq 0x4(%rdi,%rdx,8), %rdx
shlq $0x2, %rdx
addq 0x168(%rsi), %rdx
movq 0xd8(%rsi), %rsi
xorl %edi, %edi
movslq (%rdx,%rdi,4), %r8
movss (%rsi,%r8,4), %xmm0
movss %xmm0, (%rax,%rdi,4)
incq %rdi
cmpq %rdi, %rcx
jne 0x784c7
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal15VertexInterface19GetSharpnessPerEdgeEPf:
mov rax, rsi
movsxd rcx, dword ptr [rdi+18h]
test rcx, rcx
jle short locret_784DE
mov rsi, [rdi]
movsxd rdx, dword ptr [rdi+10h]
mov rdi, [rsi+150h]
movsxd rdx, dword ptr [rdi+rdx*8+4]
shl rdx, 2
add rdx, [rsi+168h]
mov rsi, [rsi+0D8h]
xor edi, edi
loc_784C7:
movsxd r8, dword ptr [rdx+rdi*4]
movss xmm0, dword ptr [rsi+r8*4]
movss dword ptr [rax+rdi*4], xmm0
inc rdi
cmp rcx, rdi
jnz short loc_784C7
locret_784DE:
retn
| float * OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(
OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface *this,
float *a2)
{
float *result; // rax
long long v3; // rcx
long long v4; // rdx
long long v5; // rsi
long long i; // rdi
result = a2;
v3 = *((int *)this + 6);
if ( v3 > 0 )
{
v4 = *(_QWORD *)(*(_QWORD *)this + 360LL)
+ 4LL * *(int *)(*(_QWORD *)(*(_QWORD *)this + 336LL) + 8LL * *((int *)this + 4) + 4);
v5 = *(_QWORD *)(*(_QWORD *)this + 216LL);
for ( i = 0LL; i != v3; ++i )
result[i] = *(float *)(v5 + 4LL * *(int *)(v4 + 4 * i));
}
return result;
}
| GetSharpnessPerEdge:
MOV RAX,RSI
MOVSXD RCX,dword ptr [RDI + 0x18]
TEST RCX,RCX
JLE 0x001784de
MOV RSI,qword ptr [RDI]
MOVSXD RDX,dword ptr [RDI + 0x10]
MOV RDI,qword ptr [RSI + 0x150]
MOVSXD RDX,dword ptr [RDI + RDX*0x8 + 0x4]
SHL RDX,0x2
ADD RDX,qword ptr [RSI + 0x168]
MOV RSI,qword ptr [RSI + 0xd8]
XOR EDI,EDI
LAB_001784c7:
MOVSXD R8,dword ptr [RDX + RDI*0x4]
MOVSS XMM0,dword ptr [RSI + R8*0x4]
MOVSS dword ptr [RAX + RDI*0x4],XMM0
INC RDI
CMP RCX,RDI
JNZ 0x001784c7
LAB_001784de:
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge
(VertexInterface *this,float *param_1)
{
int iVar1;
int iVar2;
long lVar3;
long lVar4;
long lVar5;
iVar1 = *(int *)(this + 0x18);
if (0 < (long)iVar1) {
lVar3 = *(long *)this;
iVar2 = *(int *)(*(long *)(lVar3 + 0x150) + 4 + (long)*(int *)(this + 0x10) * 8);
lVar4 = *(long *)(lVar3 + 0x168);
lVar3 = *(long *)(lVar3 + 0xd8);
lVar5 = 0;
do {
param_1[lVar5] = *(float *)(lVar3 + (long)*(int *)((long)iVar2 * 4 + lVar4 + lVar5 * 4) * 4);
lVar5 = lVar5 + 1;
} while (iVar1 != lVar5);
}
return;
}
| |
22,703 | OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../vtr/componentInterfaces.h | float* GetSharpnessPerEdge(float pSharpness[]) const {
ConstIndexArray pEdges = _parent->getVertexEdges(_pIndex);
for (int i = 0; i < _eCount; ++i) {
pSharpness[i] = _parent->getEdgeSharpness(pEdges[i]);
}
return pSharpness;
} | O2 | c | OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movl 0x10(%r14), %esi
callq 0x54550
movslq 0x18(%r14), %rcx
movq (%r14), %rdx
xorl %esi, %esi
cmpq %rcx, %rsi
jge 0x88e07
movslq (%rax,%rsi,4), %rdi
movq 0xd8(%rdx), %r8
movss (%r8,%rdi,4), %xmm0
movss %xmm0, (%rbx,%rsi,4)
incq %rsi
jmp 0x88de7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal15VertexInterface19GetSharpnessPerEdgeEPf:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi]; this
mov esi, [r14+10h]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int)
movsxd rcx, dword ptr [r14+18h]
mov rdx, [r14]
xor esi, esi
loc_88DE7:
cmp rsi, rcx
jge short loc_88E07
movsxd rdi, dword ptr [rax+rsi*4]
mov r8, [rdx+0D8h]
movss xmm0, dword ptr [r8+rdi*4]
movss dword ptr [rbx+rsi*4], xmm0
inc rsi
jmp short loc_88DE7
loc_88E07:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| float * OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(
OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface *this,
float *a2)
{
long long VertexEdges; // rax
long long v4; // rcx
OpenSubdiv::v3_6_0::Vtr::internal::Level *v5; // rdx
long long i; // rsi
VertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(
*(OpenSubdiv::v3_6_0::Vtr::internal::Level **)this,
*((_DWORD *)this + 4));
v4 = *((int *)this + 6);
v5 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)this;
for ( i = 0LL; i < v4; ++i )
a2[i] = *(float *)(*((_QWORD *)v5 + 27) + 4LL * *(int *)(VertexEdges + 4 * i));
return a2;
}
| GetSharpnessPerEdge:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI]
MOV ESI,dword ptr [R14 + 0x10]
CALL 0x00154550
MOVSXD RCX,dword ptr [R14 + 0x18]
MOV RDX,qword ptr [R14]
XOR ESI,ESI
LAB_00188de7:
CMP RSI,RCX
JGE 0x00188e07
MOVSXD RDI,dword ptr [RAX + RSI*0x4]
MOV R8,qword ptr [RDX + 0xd8]
MOVSS XMM0,dword ptr [R8 + RDI*0x4]
MOVSS dword ptr [RBX + RSI*0x4],XMM0
INC RSI
JMP 0x00188de7
LAB_00188e07:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge(float*) const */
float * __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::VertexInterface::GetSharpnessPerEdge
(VertexInterface *this,float *param_1)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
lVar3 = Level::getVertexEdges(*(Level **)this,*(int *)(this + 0x10));
iVar1 = *(int *)(this + 0x18);
lVar2 = *(long *)this;
for (lVar4 = 0; lVar4 < iVar1; lVar4 = lVar4 + 1) {
param_1[lVar4] = *(float *)(*(long *)(lVar2 + 0xd8) + (long)*(int *)(lVar3 + lVar4 * 4) * 4);
}
return param_1;
}
| |
22,704 | void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | Result HandleExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
const char* location) {
// NOTE: The user code can affect the way in which Google Test handles
// exceptions by setting GTEST_FLAG(catch_exceptions), but only before
// RUN_ALL_TESTS() starts. It is technically possible to check the flag
// after the exception is caught and either report or re-throw the
// exception based on the flag's value:
//
// try {
// // Perform the test method.
// } catch (...) {
// if (GTEST_FLAG_GET(catch_exceptions))
// // Report the exception as failure.
// else
// throw; // Re-throws the original exception.
// }
//
// However, the purpose of this flag is to allow the program to drop into
// the debugger when the exception is thrown. On most platforms, once the
// control enters the catch block, the exception origin information is
// lost and the debugger will stop the program at the point of the
// re-throw in this function -- instead of at the point of the original
// throw statement in the code under test. For this reason, we perform
// the check early, sacrificing the ability to affect Google Test's
// exception handling in the method where the exception is thrown.
if (internal::GetUnitTestImpl()->catch_exceptions()) {
#if GTEST_HAS_EXCEPTIONS
try {
return HandleSehExceptionsInMethodIfSupported(object, method, location);
} catch (const AssertionException&) { // NOLINT
// This failure was reported already.
} catch (const internal::GoogleTestFailureException&) { // NOLINT
// This exception type can only be thrown by a failed Google
// Test assertion with the intention of letting another testing
// framework catch it. Therefore we just re-throw it.
throw;
} catch (const std::exception& e) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(e.what(), location));
} catch (...) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(nullptr, location));
}
return static_cast<Result>(0);
#else
return HandleSehExceptionsInMethodIfSupported(object, method, location);
#endif // GTEST_HAS_EXCEPTIONS
} else {
return (object->*method)();
}
} | O1 | cpp | void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x19012
movq 0x24aee(%rip), %rax # 0x597b0
addq %r15, %r14
cmpb $0x1, 0x2c8(%rax)
jne 0x34cee
testb $0x1, %r12b
je 0x34cdc
movq (%r14), %rax
movq -0x1(%rax,%r12), %r12
movq %r14, %rdi
callq *%r12
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testb $0x1, %r12b
movq %r12, %rcx
je 0x34cff
movq (%r14), %rax
movq -0x1(%rax,%rcx), %rcx
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
movq %rdx, %r14
movq %rax, %rdi
cmpl $0x4, %r14d
jne 0x34d22
callq 0x81f0
jmp 0x34d96
cmpl $0x3, %r14d
je 0x34da2
callq 0x81f0
cmpl $0x2, %r14d
jne 0x34d5d
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30d5d
leaq 0x8(%rsp), %rsi
movl $0x2, %edi
callq 0x204e0
jmp 0x34d7b
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x30d5d
leaq 0x8(%rsp), %rsi
movl $0x2, %edi
callq 0x204e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34d96
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
callq 0x8910
xorl %eax, %eax
jmp 0x34ce2
callq 0x81f0
callq 0x87e0
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34dcf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x34dcf
movq %rax, %rbx
callq 0x8910
jmp 0x34e08
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34df9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x34df9
movq %rax, %rbx
callq 0x8910
jmp 0x34e08
movq %rax, %rbx
callq 0x8910
movq %rbx, %rdi
callq 0x8990
movq %rax, %rdi
callq 0x326a4
| _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov rax, cs:qword_597B0
add r14, r15
cmp byte ptr [rax+2C8h], 1
jnz short loc_34CEE
test r12b, 1
jz short loc_34CDC
mov rax, [r14]
mov r12, [rax+r12-1]
loc_34CDC:
mov rdi, r14
call r12
loc_34CE2:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_34CEE:
test r12b, 1
mov rcx, r12
jz short loc_34CFF
mov rax, [r14]
mov rcx, [rax+rcx-1]
loc_34CFF:
mov rdi, r14
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
jmp rcx
mov r14, rdx
mov rdi, rax; void *
cmp r14d, 4
jnz short loc_34D22
call ___cxa_begin_catch
jmp short loc_34D96
loc_34D22:
cmp r14d, 3
jz short loc_34DA2
call ___cxa_begin_catch
cmp r14d, 2
jnz short loc_34D5D
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+10h]
lea rdi, [rsp+48h+var_40]
mov rsi, rax
mov rdx, rbx
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
lea rsi, [rsp+48h+var_40]; int
mov edi, 2; int
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short loc_34D7B
loc_34D5D:
lea rdi, [rsp+48h+var_40]
xor esi, esi
mov rdx, rbx
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
lea rsi, [rsp+48h+var_40]; int
mov edi, 2; int
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
loc_34D7B:
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_34D96
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_34D96:
call ___cxa_end_catch
xor eax, eax
jmp loc_34CE2
loc_34DA2:
call ___cxa_begin_catch
call ___cxa_rethrow
mov rbx, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_34DCF
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_34DCF
mov rbx, rax
loc_34DCF:
call ___cxa_end_catch
jmp short loc_34E08
mov rbx, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_34DF9
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_34DF9
mov rbx, rax
loc_34DF9:
call ___cxa_end_catch
jmp short loc_34E08
mov rbx, rax
call ___cxa_end_catch
loc_34E08:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
testing::UnitTest *a1,
long long ( *a2)(_QWORD),
long long a3)
{
long long ( *v4)(_QWORD *); // r12
_QWORD *v5; // r14
long long ( *v7)(_QWORD *); // rcx
v4 = (long long ( *)(_QWORD *))a2;
testing::UnitTest::GetInstance(a1);
v5 = (_QWORD *)((char *)a1 + a3);
if ( *((_BYTE *)qword_597B0 + 712) == 1 )
{
if ( ((unsigned __int8)a2 & 1) != 0 )
v4 = *(long long ( **)(_QWORD *))((char *)a2 + *v5 - 1);
return v4(v5);
}
else
{
v7 = (long long ( *)(_QWORD *))a2;
if ( ((unsigned __int8)a2 & 1) != 0 )
v7 = *(long long ( **)(_QWORD *))((char *)a2 + *v5 - 1);
return v7(v5);
}
}
| HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RCX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x00119012
MOV RAX,qword ptr [0x001597b0]
ADD R14,R15
CMP byte ptr [RAX + 0x2c8],0x1
JNZ 0x00134cee
TEST R12B,0x1
JZ 0x00134cdc
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + R12*0x1 + -0x1]
LAB_00134cdc:
MOV RDI,R14
CALL R12
LAB_00134ce2:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00134cee:
TEST R12B,0x1
MOV RCX,R12
JZ 0x00134cff
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [RAX + RCX*0x1 + -0x1]
LAB_00134cff:
MOV RDI,R14
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
JMP RCX
|
/* bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
*/
bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(UnitTestImpl *param_1,_func_bool *param_2,char *param_3)
{
bool bVar1;
UnitTestImpl *pUVar2;
UnitTest::GetInstance();
pUVar2 = param_1 + (long)param_3;
if (*(char *)(UnitTest::GetInstance()::instance._64_8_ + 0x2c8) == '\x01') {
if (((ulong)param_2 & 1) != 0) {
param_2 = *(_func_bool **)(param_2 + *(long *)pUVar2 + -1);
}
/* try { // try from 00134cdc to 00134ce1 has its CatchHandler @ 00134d0f */
bVar1 = (*param_2)(pUVar2);
return bVar1;
}
if (((ulong)param_2 & 1) != 0) {
param_2 = *(_func_bool **)(param_2 + *(long *)pUVar2 + -1);
}
/* WARNING: Could not recover jumptable at 0x00134d0d. Too many branches */
/* WARNING: Treating indirect jump as call */
bVar1 = (*param_2)(pUVar2);
return bVar1;
}
| |
22,705 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O1 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x59098
leaq 0xf(%rsp), %rbp
xorl %r14d, %r14d
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
movq (%rbx), %rcx
movb (%rcx,%rax), %dl
cmpb $0x5c, %dl
jne 0x58fc1
leaq 0x1(%rax), %r15
cmpq %r13, %r15
jae 0x58fc1
movzbl (%rcx,%r15), %edx
cmpl $0x6d, %edx
jle 0x58fcd
cmpl $0x73, %edx
jg 0x58fe7
cmpl $0x6e, %edx
je 0x59038
cmpl $0x72, %edx
jne 0x5906f
movb $0xd, (%rcx,%r14)
jmp 0x5904b
movb %dl, (%rcx,%r14)
incq %r14
jmp 0x5908a
cmpl $0x22, %edx
je 0x59031
cmpl $0x27, %edx
je 0x59046
cmpl $0x5c, %edx
jne 0x5906f
movb $0x5c, (%rcx,%r14)
jmp 0x5904b
cmpl $0x74, %edx
je 0x5903f
cmpl $0x78, %edx
jne 0x5906f
leaq 0x3(%rax), %r12
cmpq %r13, %r12
jae 0x5906f
movb 0x2(%rcx,%rax), %dl
movb %dl, 0xd(%rsp)
movb 0x3(%rcx,%rax), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x10, %edx
callq 0x19980
movq 0x10(%rsp), %rcx
cmpq %rbp, %rcx
je 0x59050
movq %r15, %r12
jmp 0x5905d
movb $0x22, (%rcx,%r14)
jmp 0x5904b
movb $0xa, (%rcx,%r14)
jmp 0x5904b
movb $0x9, (%rcx,%r14)
jmp 0x5904b
movb $0x27, (%rcx,%r14)
incq %r14
jmp 0x59087
movq (%rbx), %rdx
movb %al, (%rdx,%r14)
incq %r14
movq %r12, %r15
movq %r12, %rax
cmpq %rbp, %rcx
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
je 0x5908a
movq (%rbx), %rax
movb $0x5c, (%rax,%r14)
movq (%rbx), %rax
movb (%rax,%r15), %cl
movb %cl, 0x1(%rax,%r14)
addq $0x2, %r14
movq %r15, %rax
incq %rax
cmpq %r13, %rax
jb 0x58f82
jmp 0x5909b
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x191c0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
test r13, r13
jz loc_59098
lea rbp, [rsp+48h+var_39]
xor r14d, r14d
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
xor eax, eax
loc_58F82:
mov rcx, [rbx]
mov dl, [rcx+rax]
cmp dl, 5Ch ; '\'
jnz short loc_58FC1
lea r15, [rax+1]
cmp r15, r13
jnb short loc_58FC1
movzx edx, byte ptr [rcx+r15]
cmp edx, 6Dh ; 'm'
jle short loc_58FCD
cmp edx, 73h ; 's'
jg short loc_58FE7
cmp edx, 6Eh ; 'n'
jz loc_59038
cmp edx, 72h ; 'r'
jnz loc_5906F
mov byte ptr [rcx+r14], 0Dh
jmp loc_5904B
loc_58FC1:
mov [rcx+r14], dl
inc r14
jmp loc_5908A
loc_58FCD:
cmp edx, 22h ; '"'
jz short loc_59031
cmp edx, 27h ; '''
jz short loc_59046
cmp edx, 5Ch ; '\'
jnz loc_5906F
mov byte ptr [rcx+r14], 5Ch ; '\'
jmp short loc_5904B
loc_58FE7:
cmp edx, 74h ; 't'
jz short loc_5903F
cmp edx, 78h ; 'x'
jnz short loc_5906F
lea r12, [rax+3]
cmp r12, r13
jnb short loc_5906F
mov dl, [rcx+rax+2]
mov [rsp+48h+var_3B], dl
mov al, [rcx+rax+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
mov [rsp+48h+var_38], 0
mov edx, 10h
call _strtol
mov rcx, [rsp+48h+var_38]
cmp rcx, rbp
jz short loc_59050
mov r12, r15
jmp short loc_5905D
loc_59031:
mov byte ptr [rcx+r14], 22h ; '"'
jmp short loc_5904B
loc_59038:
mov byte ptr [rcx+r14], 0Ah
jmp short loc_5904B
loc_5903F:
mov byte ptr [rcx+r14], 9
jmp short loc_5904B
loc_59046:
mov byte ptr [rcx+r14], 27h ; '''
loc_5904B:
inc r14
jmp short loc_59087
loc_59050:
mov rdx, [rbx]
mov [rdx+r14], al
inc r14
mov r15, r12
loc_5905D:
mov rax, r12
cmp rcx, rbp
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
jz short loc_5908A
loc_5906F:
mov rax, [rbx]
mov byte ptr [rax+r14], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+r15]
mov [rax+r14+1], cl
add r14, 2
loc_59087:
mov rax, r15
loc_5908A:
inc rax
cmp rax, r13
jb loc_58F82
jmp short loc_5909B
loc_59098:
xor r14d, r14d
loc_5909B:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_process_escapes(long long *a1)
{
unsigned long long v1; // r13
long long v2; // r14
long long v3; // rax
long long v4; // rcx
char v5; // dl
long long v6; // r15
unsigned int v7; // edx
long long v8; // r12
char v9; // al
char *v10; // rcx
_BYTE v12[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v13; // [rsp+Fh] [rbp-39h] BYREF
char *v14; // [rsp+10h] [rbp-38h] BYREF
v1 = a1[1];
if ( v1 )
{
v2 = 0LL;
v3 = 0LL;
while ( 1 )
{
v4 = *a1;
v5 = *(_BYTE *)(*a1 + v3);
if ( v5 == 92 )
{
v6 = v3 + 1;
if ( v3 + 1 < v1 )
break;
}
*(_BYTE *)(v4 + v2++) = v5;
LABEL_29:
if ( ++v3 >= v1 )
return std::string::resize(a1, v2, 0LL);
}
v7 = *(unsigned __int8 *)(v4 + v6);
if ( v7 <= 0x6D )
{
switch ( v7 )
{
case '"':
*(_BYTE *)(v4 + v2) = 34;
goto LABEL_24;
case '\'':
*(_BYTE *)(v4 + v2) = 39;
goto LABEL_24;
case '\\':
*(_BYTE *)(v4 + v2) = 92;
goto LABEL_24;
}
}
else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u )
{
if ( v7 == 116 )
{
*(_BYTE *)(v4 + v2) = 9;
goto LABEL_24;
}
if ( v7 == 120 )
{
v8 = v3 + 3;
if ( v3 + 3 < v1 )
{
v12[0] = *(_BYTE *)(v4 + v3 + 2);
v12[1] = *(_BYTE *)(v4 + v3 + 3);
v13 = 0;
v14 = 0LL;
v9 = strtol(v12, &v14, 16LL);
v10 = v14;
if ( v14 == &v13 )
{
*(_BYTE *)(*a1 + v2++) = v9;
v6 = v8;
}
else
{
v8 = v6;
}
v3 = v8;
if ( v10 == &v13 )
goto LABEL_29;
}
}
}
else
{
if ( v7 == 110 )
{
*(_BYTE *)(v4 + v2) = 10;
goto LABEL_24;
}
if ( v7 == 114 )
{
*(_BYTE *)(v4 + v2) = 13;
LABEL_24:
++v2;
LABEL_28:
v3 = v6;
goto LABEL_29;
}
}
*(_BYTE *)(*a1 + v2) = 92;
*(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6);
v2 += 2LL;
goto LABEL_28;
}
v2 = 0LL;
return std::string::resize(a1, v2, 0LL);
}
| string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
TEST R13,R13
JZ 0x00159098
LEA RBP,[RSP + 0xf]
XOR R14D,R14D
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
LAB_00158f82:
MOV RCX,qword ptr [RBX]
MOV DL,byte ptr [RCX + RAX*0x1]
CMP DL,0x5c
JNZ 0x00158fc1
LEA R15,[RAX + 0x1]
CMP R15,R13
JNC 0x00158fc1
MOVZX EDX,byte ptr [RCX + R15*0x1]
CMP EDX,0x6d
JLE 0x00158fcd
CMP EDX,0x73
JG 0x00158fe7
CMP EDX,0x6e
JZ 0x00159038
CMP EDX,0x72
JNZ 0x0015906f
MOV byte ptr [RCX + R14*0x1],0xd
JMP 0x0015904b
LAB_00158fc1:
MOV byte ptr [RCX + R14*0x1],DL
INC R14
JMP 0x0015908a
LAB_00158fcd:
CMP EDX,0x22
JZ 0x00159031
CMP EDX,0x27
JZ 0x00159046
CMP EDX,0x5c
JNZ 0x0015906f
MOV byte ptr [RCX + R14*0x1],0x5c
JMP 0x0015904b
LAB_00158fe7:
CMP EDX,0x74
JZ 0x0015903f
CMP EDX,0x78
JNZ 0x0015906f
LEA R12,[RAX + 0x3]
CMP R12,R13
JNC 0x0015906f
MOV DL,byte ptr [RCX + RAX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],DL
MOV AL,byte ptr [RCX + RAX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV EDX,0x10
CALL 0x00119980
MOV RCX,qword ptr [RSP + 0x10]
CMP RCX,RBP
JZ 0x00159050
MOV R12,R15
JMP 0x0015905d
LAB_00159031:
MOV byte ptr [RCX + R14*0x1],0x22
JMP 0x0015904b
LAB_00159038:
MOV byte ptr [RCX + R14*0x1],0xa
JMP 0x0015904b
LAB_0015903f:
MOV byte ptr [RCX + R14*0x1],0x9
JMP 0x0015904b
LAB_00159046:
MOV byte ptr [RCX + R14*0x1],0x27
LAB_0015904b:
INC R14
JMP 0x00159087
LAB_00159050:
MOV RDX,qword ptr [RBX]
MOV byte ptr [RDX + R14*0x1],AL
INC R14
MOV R15,R12
LAB_0015905d:
MOV RAX,R12
CMP RCX,RBP
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
JZ 0x0015908a
LAB_0015906f:
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX + R14*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + R15*0x1]
MOV byte ptr [RAX + R14*0x1 + 0x1],CL
ADD R14,0x2
LAB_00159087:
MOV RAX,R15
LAB_0015908a:
INC RAX
CMP RAX,R13
JC 0x00158f82
JMP 0x0015909b
LAB_00159098:
XOR R14D,R14D
LAB_0015909b:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x001191c0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
byte bVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
ulong uVar5;
uVar2 = *(ulong *)(param_1 + 8);
if (uVar2 == 0) {
lVar6 = 0;
}
else {
lVar6 = 0;
uVar4 = 0;
do {
lVar3 = *(long *)param_1;
if ((*(char *)(lVar3 + uVar4) == '\\') && (uVar5 = uVar4 + 1, uVar5 < uVar2)) {
bVar1 = *(byte *)(lVar3 + uVar5);
if (bVar1 < 0x6e) {
if (bVar1 == 0x22) {
*(int1 *)(lVar3 + lVar6) = 0x22;
}
else if (bVar1 == 0x27) {
*(int1 *)(lVar3 + lVar6) = 0x27;
}
else {
if (bVar1 != 0x5c) goto LAB_0015906f;
*(int1 *)(lVar3 + lVar6) = 0x5c;
}
}
else if (bVar1 < 0x74) {
if (bVar1 == 0x6e) {
*(int1 *)(lVar3 + lVar6) = 10;
}
else {
if (bVar1 != 0x72) goto LAB_0015906f;
*(int1 *)(lVar3 + lVar6) = 0xd;
}
}
else {
if (bVar1 != 0x74) {
if ((bVar1 == 0x78) && (uVar4 + 3 < uVar2)) {
local_3b = *(char *)(lVar3 + 2 + uVar4);
local_3a = *(int1 *)(lVar3 + 3 + uVar4);
local_39 = '\0';
local_38 = (char *)0x0;
lVar3 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar3;
lVar6 = lVar6 + 1;
uVar5 = uVar4 + 3;
goto LAB_0015908a;
}
}
LAB_0015906f:
*(int1 *)(*(long *)param_1 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) =
*(int1 *)(*(long *)param_1 + uVar5);
lVar6 = lVar6 + 2;
goto LAB_0015908a;
}
*(int1 *)(lVar3 + lVar6) = 9;
}
lVar6 = lVar6 + 1;
}
else {
*(char *)(lVar3 + lVar6) = *(char *)(lVar3 + uVar4);
lVar6 = lVar6 + 1;
uVar5 = uVar4;
}
LAB_0015908a:
uVar4 = uVar5 + 1;
} while (uVar4 < uVar2);
}
std::__cxx11::string::resize((ulong)param_1,(char)lVar6);
return;
}
| |
22,706 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O3 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x57faf
leaq 0xf(%rsp), %r12
xorl %r14d, %r14d
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %ecx, %ecx
movq (%rbx), %rax
movb (%rax,%rcx), %dl
cmpb $0x5c, %dl
jne 0x57ece
leaq 0x1(%rcx), %rbp
cmpq %r13, %rbp
jae 0x57ece
movzbl (%rax,%rbp), %edx
cmpl $0x6d, %edx
jle 0x57ee8
cmpl $0x73, %edx
jg 0x57f09
cmpl $0x6e, %edx
je 0x57f78
cmpl $0x72, %edx
jne 0x57f58
movb $0xd, (%rax,%r14)
jmp 0x57f8b
movb %dl, (%rax,%r14)
incq %r14
movq %rcx, %rbp
incq %rbp
movq %rbp, %rcx
cmpq %r13, %rbp
jb 0x57e90
jmp 0x57fb2
cmpl $0x22, %edx
je 0x57f71
cmpl $0x27, %edx
je 0x57f86
cmpl $0x5c, %edx
jne 0x57f58
movb $0x5c, (%rax,%r14)
jmp 0x57f8b
cmpl $0x74, %edx
je 0x57f7f
cmpl $0x78, %edx
jne 0x57f58
leaq 0x3(%rcx), %r15
cmpq %r13, %r15
jae 0x57f58
movb 0x2(%rax,%rcx), %dl
movb %dl, 0xd(%rsp)
movb 0x3(%rax,%rcx), %al
movb %al, 0xe(%rsp)
movb $0x0, 0xf(%rsp)
movq $0x0, 0x10(%rsp)
movl $0x10, %edx
callq 0x19980
cmpq %r12, 0x10(%rsp)
je 0x57f93
movq (%rbx), %rax
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movb $0x5c, (%rax,%r14)
movq (%rbx), %rax
movb (%rax,%rbp), %cl
movb %cl, 0x1(%rax,%r14)
addq $0x2, %r14
jmp 0x57ed8
movb $0x22, (%rax,%r14)
jmp 0x57f8b
movb $0xa, (%rax,%r14)
jmp 0x57f8b
movb $0x9, (%rax,%r14)
jmp 0x57f8b
movb $0x27, (%rax,%r14)
incq %r14
jmp 0x57ed8
movq (%rbx), %rcx
movb %al, (%rcx,%r14)
incq %r14
movq %r15, %rbp
leaq 0xd(%rsp), %rdi
leaq 0x10(%rsp), %rsi
jmp 0x57ed8
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x191c0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+8]
test r13, r13
jz loc_57FAF
lea r12, [rsp+48h+var_39]
xor r14d, r14d
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
xor ecx, ecx
loc_57E90:
mov rax, [rbx]
mov dl, [rax+rcx]
cmp dl, 5Ch ; '\'
jnz short loc_57ECE
lea rbp, [rcx+1]
cmp rbp, r13
jnb short loc_57ECE
movzx edx, byte ptr [rax+rbp]
cmp edx, 6Dh ; 'm'
jle short loc_57EE8
cmp edx, 73h ; 's'
jg short loc_57F09
cmp edx, 6Eh ; 'n'
jz loc_57F78
cmp edx, 72h ; 'r'
jnz loc_57F58
mov byte ptr [rax+r14], 0Dh
jmp loc_57F8B
loc_57ECE:
mov [rax+r14], dl
inc r14
mov rbp, rcx
loc_57ED8:
inc rbp
mov rcx, rbp
cmp rbp, r13
jb short loc_57E90
jmp loc_57FB2
loc_57EE8:
cmp edx, 22h ; '"'
jz loc_57F71
cmp edx, 27h ; '''
jz loc_57F86
cmp edx, 5Ch ; '\'
jnz short loc_57F58
mov byte ptr [rax+r14], 5Ch ; '\'
jmp loc_57F8B
loc_57F09:
cmp edx, 74h ; 't'
jz short loc_57F7F
cmp edx, 78h ; 'x'
jnz short loc_57F58
lea r15, [rcx+3]
cmp r15, r13
jnb short loc_57F58
mov dl, [rax+rcx+2]
mov [rsp+48h+var_3B], dl
mov al, [rax+rcx+3]
mov [rsp+48h+var_3A], al
mov [rsp+48h+var_39], 0
mov [rsp+48h+var_38], 0
mov edx, 10h
call _strtol
cmp [rsp+48h+var_38], r12
jz short loc_57F93
mov rax, [rbx]
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
loc_57F58:
mov byte ptr [rax+r14], 5Ch ; '\'
mov rax, [rbx]
mov cl, [rax+rbp]
mov [rax+r14+1], cl
add r14, 2
jmp loc_57ED8
loc_57F71:
mov byte ptr [rax+r14], 22h ; '"'
jmp short loc_57F8B
loc_57F78:
mov byte ptr [rax+r14], 0Ah
jmp short loc_57F8B
loc_57F7F:
mov byte ptr [rax+r14], 9
jmp short loc_57F8B
loc_57F86:
mov byte ptr [rax+r14], 27h ; '''
loc_57F8B:
inc r14
jmp loc_57ED8
loc_57F93:
mov rcx, [rbx]
mov [rcx+r14], al
inc r14
mov rbp, r15
lea rdi, [rsp+48h+var_3B]
lea rsi, [rsp+48h+var_38]
jmp loc_57ED8
loc_57FAF:
xor r14d, r14d
loc_57FB2:
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long string_process_escapes(long long *a1)
{
unsigned long long v1; // r13
long long v2; // r14
long long v3; // rcx
long long v4; // rax
char v5; // dl
long long v6; // rbp
unsigned int v7; // edx
long long v8; // r15
char v9; // al
_BYTE v11[2]; // [rsp+Dh] [rbp-3Bh] BYREF
char v12; // [rsp+Fh] [rbp-39h] BYREF
char *v13; // [rsp+10h] [rbp-38h] BYREF
v1 = a1[1];
if ( v1 )
{
v2 = 0LL;
v3 = 0LL;
while ( 1 )
{
v4 = *a1;
v5 = *(_BYTE *)(*a1 + v3);
if ( v5 == 92 && (v6 = v3 + 1, v3 + 1 < v1) )
{
v7 = *(unsigned __int8 *)(v4 + v6);
if ( v7 <= 0x6D )
{
switch ( v7 )
{
case '"':
*(_BYTE *)(v4 + v2) = 34;
goto LABEL_27;
case '\'':
*(_BYTE *)(v4 + v2) = 39;
goto LABEL_27;
case '\\':
*(_BYTE *)(v4 + v2) = 92;
goto LABEL_27;
}
}
else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u )
{
if ( v7 == 116 )
{
*(_BYTE *)(v4 + v2) = 9;
goto LABEL_27;
}
if ( v7 == 120 )
{
v8 = v3 + 3;
if ( v3 + 3 < v1 )
{
v11[0] = *(_BYTE *)(v4 + v3 + 2);
v11[1] = *(_BYTE *)(v4 + v3 + 3);
v12 = 0;
v13 = 0LL;
v9 = strtol(v11, &v13, 16LL);
if ( v13 == &v12 )
{
*(_BYTE *)(*a1 + v2++) = v9;
v6 = v8;
goto LABEL_11;
}
v4 = *a1;
}
}
}
else
{
if ( v7 == 110 )
{
*(_BYTE *)(v4 + v2) = 10;
goto LABEL_27;
}
if ( v7 == 114 )
{
*(_BYTE *)(v4 + v2) = 13;
LABEL_27:
++v2;
goto LABEL_11;
}
}
*(_BYTE *)(v4 + v2) = 92;
*(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6);
v2 += 2LL;
}
else
{
*(_BYTE *)(v4 + v2++) = v5;
v6 = v3;
}
LABEL_11:
v3 = v6 + 1;
if ( v6 + 1 >= v1 )
return std::string::resize(a1, v2, 0LL);
}
}
v2 = 0LL;
return std::string::resize(a1, v2, 0LL);
}
| string_process_escapes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x8]
TEST R13,R13
JZ 0x00157faf
LEA R12,[RSP + 0xf]
XOR R14D,R14D
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
XOR ECX,ECX
LAB_00157e90:
MOV RAX,qword ptr [RBX]
MOV DL,byte ptr [RAX + RCX*0x1]
CMP DL,0x5c
JNZ 0x00157ece
LEA RBP,[RCX + 0x1]
CMP RBP,R13
JNC 0x00157ece
MOVZX EDX,byte ptr [RAX + RBP*0x1]
CMP EDX,0x6d
JLE 0x00157ee8
CMP EDX,0x73
JG 0x00157f09
CMP EDX,0x6e
JZ 0x00157f78
CMP EDX,0x72
JNZ 0x00157f58
MOV byte ptr [RAX + R14*0x1],0xd
JMP 0x00157f8b
LAB_00157ece:
MOV byte ptr [RAX + R14*0x1],DL
INC R14
MOV RBP,RCX
LAB_00157ed8:
INC RBP
MOV RCX,RBP
CMP RBP,R13
JC 0x00157e90
JMP 0x00157fb2
LAB_00157ee8:
CMP EDX,0x22
JZ 0x00157f71
CMP EDX,0x27
JZ 0x00157f86
CMP EDX,0x5c
JNZ 0x00157f58
MOV byte ptr [RAX + R14*0x1],0x5c
JMP 0x00157f8b
LAB_00157f09:
CMP EDX,0x74
JZ 0x00157f7f
CMP EDX,0x78
JNZ 0x00157f58
LEA R15,[RCX + 0x3]
CMP R15,R13
JNC 0x00157f58
MOV DL,byte ptr [RAX + RCX*0x1 + 0x2]
MOV byte ptr [RSP + 0xd],DL
MOV AL,byte ptr [RAX + RCX*0x1 + 0x3]
MOV byte ptr [RSP + 0xe],AL
MOV byte ptr [RSP + 0xf],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV EDX,0x10
CALL 0x00119980
CMP qword ptr [RSP + 0x10],R12
JZ 0x00157f93
MOV RAX,qword ptr [RBX]
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
LAB_00157f58:
MOV byte ptr [RAX + R14*0x1],0x5c
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX + RBP*0x1]
MOV byte ptr [RAX + R14*0x1 + 0x1],CL
ADD R14,0x2
JMP 0x00157ed8
LAB_00157f71:
MOV byte ptr [RAX + R14*0x1],0x22
JMP 0x00157f8b
LAB_00157f78:
MOV byte ptr [RAX + R14*0x1],0xa
JMP 0x00157f8b
LAB_00157f7f:
MOV byte ptr [RAX + R14*0x1],0x9
JMP 0x00157f8b
LAB_00157f86:
MOV byte ptr [RAX + R14*0x1],0x27
LAB_00157f8b:
INC R14
JMP 0x00157ed8
LAB_00157f93:
MOV RCX,qword ptr [RBX]
MOV byte ptr [RCX + R14*0x1],AL
INC R14
MOV RBP,R15
LEA RDI,[RSP + 0xd]
LEA RSI,[RSP + 0x10]
JMP 0x00157ed8
LAB_00157faf:
XOR R14D,R14D
LAB_00157fb2:
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x001191c0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
ulong uVar1;
byte bVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
long lVar6;
char local_3b;
int1 local_3a;
char local_39;
char *local_38;
uVar3 = *(ulong *)(param_1 + 8);
if (uVar3 == 0) {
lVar6 = 0;
}
else {
lVar6 = 0;
uVar5 = 0;
do {
lVar4 = *(long *)param_1;
if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) {
bVar2 = *(byte *)(lVar4 + uVar1);
if (bVar2 < 0x6e) {
if (bVar2 == 0x22) {
*(int1 *)(lVar4 + lVar6) = 0x22;
}
else if (bVar2 == 0x27) {
*(int1 *)(lVar4 + lVar6) = 0x27;
}
else {
if (bVar2 != 0x5c) goto LAB_00157f58;
*(int1 *)(lVar4 + lVar6) = 0x5c;
}
}
else if (bVar2 < 0x74) {
if (bVar2 == 0x6e) {
*(int1 *)(lVar4 + lVar6) = 10;
}
else {
if (bVar2 != 0x72) goto LAB_00157f58;
*(int1 *)(lVar4 + lVar6) = 0xd;
}
}
else {
if (bVar2 != 0x74) {
if ((bVar2 == 0x78) && (uVar5 + 3 < uVar3)) {
local_3b = *(char *)(lVar4 + 2 + uVar5);
local_3a = *(int1 *)(lVar4 + 3 + uVar5);
local_39 = '\0';
local_38 = (char *)0x0;
lVar4 = strtol(&local_3b,&local_38,0x10);
if (local_38 == &local_39) {
*(char *)(*(long *)param_1 + lVar6) = (char)lVar4;
lVar6 = lVar6 + 1;
uVar5 = uVar5 + 3;
goto LAB_00157ed8;
}
lVar4 = *(long *)param_1;
}
LAB_00157f58:
*(int1 *)(lVar4 + lVar6) = 0x5c;
*(int1 *)(*(long *)param_1 + 1 + lVar6) =
*(int1 *)(*(long *)param_1 + uVar1);
lVar6 = lVar6 + 2;
uVar5 = uVar1;
goto LAB_00157ed8;
}
*(int1 *)(lVar4 + lVar6) = 9;
}
lVar6 = lVar6 + 1;
uVar5 = uVar1;
}
else {
*(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5);
lVar6 = lVar6 + 1;
}
LAB_00157ed8:
uVar5 = uVar5 + 1;
} while (uVar5 < uVar3);
}
std::__cxx11::string::resize((ulong)param_1,(char)lVar6);
return;
}
| |
22,707 | testing::AssertionResult::AssertionResult(testing::AssertionResult const&) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-assertion-result.cc | AssertionResult::AssertionResult(const AssertionResult& other)
: success_(other.success_),
message_(other.message_ != nullptr
? new ::std::string(*other.message_)
: static_cast< ::std::string*>(nullptr)) {} | O0 | cpp | testing::AssertionResult::AssertionResult(testing::AssertionResult const&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, (%rax)
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xfa70
xorb $-0x1, %al
movb $0x0, 0x3f(%rsp)
testb $0x1, %al
jne 0x13067
jmp 0x130b5
movl $0x20, %edi
callq 0xb480
movq %rax, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x40(%rsp)
movb $0x1, 0x3f(%rsp)
movq 0x48(%rsp), %rdi
addq $0x8, %rdi
callq 0x44e40
movq %rax, 0x18(%rsp)
jmp 0x13098
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x44e70
jmp 0x130a9
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x130be
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x130be
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x11820
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
testb $0x1, 0x3f(%rsp)
jne 0x130e9
jmp 0x130f8
movq 0x40(%rsp), %rdi
movl $0x20, %esi
callq 0xb4a0
jmp 0x130fa
movq 0x30(%rsp), %rdi
callq 0xb910
nopw %cs:(%rax,%rax)
| _ZN7testing15AssertionResultC2ERKS0_:
sub rsp, 58h; Alternative name is 'testing::AssertionResult::AssertionResult(testing::AssertionResult const&)'
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rax, [rsp+58h+var_8]
mov rcx, [rsp+58h+var_10]
mov cl, [rcx]
and cl, 1
mov [rax], cl
add rax, 8
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_10]
add rdi, 8
xor eax, eax
mov esi, eax
call _ZSteqINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEbRKSt10unique_ptrIT_T0_EDn; std::operator==<std::string,std::default_delete<std::string>>(std::unique_ptr<std::string> const&,decltype(nullptr))
xor al, 0FFh
mov [rsp+58h+var_19], 0
test al, 1
jnz short loc_13067
jmp short loc_130B5
loc_13067:
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
mov [rsp+58h+var_48], rcx
mov [rsp+58h+var_18], rax
mov [rsp+58h+var_19], 1
mov rdi, [rsp+58h+var_10]
add rdi, 8
call _ZNKSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEdeEv; std::unique_ptr<std::string>::operator*(void)
mov [rsp+58h+var_40], rax
jmp short $+2
loc_13098:
mov rsi, [rsp+58h+var_40]
mov rdi, [rsp+58h+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_130A9:
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_50], rax
jmp short loc_130BE
loc_130B5:
xor eax, eax
mov [rsp+58h+var_50], rax
jmp short $+2
loc_130BE:
mov rdi, [rsp+58h+var_38]
mov rsi, [rsp+58h+var_50]
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EEC2IS7_vEEPS5_; std::unique_ptr<std::string>::unique_ptr<std::default_delete<std::string>,void>(std::string*)
add rsp, 58h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
test [rsp+arg_37], 1
jnz short loc_130E9
jmp short loc_130F8
loc_130E9:
mov rdi, [rsp+arg_38]; void *
mov esi, 20h ; ' '; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_130F8:
jmp short $+2
loc_130FA:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long testing::AssertionResult::AssertionResult(
testing::AssertionResult *this,
const testing::AssertionResult *a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v7; // [rsp+18h] [rbp-40h]
int v8; // [rsp+40h] [rbp-18h]
*(_BYTE *)this = *(_BYTE *)a2 & 1;
if ( !std::operator==<std::string,std::default_delete<std::string>>((long long)a2 + 8) )
{
v8 = operator new(0x20uLL);
v7 = std::unique_ptr<std::string>::operator*((char *)a2 + 8, 0LL);
std::string::basic_string(v8, v7, v2, v3, v4, v5);
}
return std::unique_ptr<std::string>::unique_ptr<std::default_delete<std::string>,void>();
}
| AssertionResult:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RCX]
AND CL,0x1
MOV byte ptr [RAX],CL
ADD RAX,0x8
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x48]
ADD RDI,0x8
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010fa70
XOR AL,0xff
MOV byte ptr [RSP + 0x3f],0x0
TEST AL,0x1
JNZ 0x00113067
JMP 0x001130b5
LAB_00113067:
MOV EDI,0x20
CALL 0x0010b480
MOV RCX,RAX
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x40],RAX
MOV byte ptr [RSP + 0x3f],0x1
MOV RDI,qword ptr [RSP + 0x48]
ADD RDI,0x8
LAB_0011308c:
CALL 0x00144e40
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00113098
LAB_00113098:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00144e70
LAB_001130a7:
JMP 0x001130a9
LAB_001130a9:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001130be
LAB_001130b5:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001130be
LAB_001130be:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00111820
ADD RSP,0x58
RET
|
/* testing::AssertionResult::AssertionResult(testing::AssertionResult const&) */
void __thiscall
testing::AssertionResult::AssertionResult(AssertionResult *this,AssertionResult *param_1)
{
bool bVar1;
string *psVar2;
string *local_50;
*this = (AssertionResult)((byte)*param_1 & 1);
bVar1 = std::operator==((unique_ptr *)(param_1 + 8),(_func_decltype_nullptr *)0x0);
if (((bVar1 ^ 0xffU) & 1) == 0) {
local_50 = (string *)0x0;
}
else {
local_50 = (string *)operator_new(0x20);
/* try { // try from 0011308c to 001130a6 has its CatchHandler @ 001130d2 */
psVar2 = (string *)
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::
operator*((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *
)(param_1 + 8));
std::__cxx11::string::string(local_50,psVar2);
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::
unique_ptr<std::default_delete<std::__cxx11::string>,void>
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
(this + 8),local_50);
return;
}
| |
22,708 | plan | eloqsql/unittest/mytap/tap.c | void
plan(int count)
{
char *config= getenv("MYTAP_CONFIG");
size_t i;
start_time= start_timer();
if (config)
skip_big_tests= strcmp(config, "big");
setvbuf(tapout, 0, _IONBF, 0); /* provide output at once */
/*
Install signal handler
*/
for (i= 0; i < sizeof(install_signal)/sizeof(*install_signal); ++i)
signal(install_signal[i].signo, install_signal[i].handler);
g_test.plan= count;
switch (count)
{
case NO_PLAN:
break;
default:
if (count > 0)
{
fprintf(tapout, "1..%d\n", count);
fflush(tapout);
}
break;
}
} | O0 | c | plan:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq 0x7a1e1(%rip), %rdi # 0x153be3
callq 0x2a5d0
movq %rax, -0x10(%rbp)
callq 0xd9af0
movq %rax, 0xba0949(%rip) # 0xc7a360
cmpq $0x0, -0x10(%rbp)
je 0xd9a34
movq -0x10(%rbp), %rdi
leaq 0x7eabc(%rip), %rsi # 0x1584e5
callq 0x2a640
movl %eax, 0x1e5e1c(%rip) # 0x2bf850
movq 0x1e3595(%rip), %rax # 0x2bcfd0
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x2, %edx
movq %rcx, %rsi
callq 0x2a390
movq $0x0, -0x18(%rbp)
cmpq $0xb, -0x18(%rbp)
jae 0xd9a9b
movq -0x18(%rbp), %rcx
leaq 0x1e5df7(%rip), %rax # 0x2bf860
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edi
movq -0x18(%rbp), %rcx
leaq 0x1e5de3(%rip), %rax # 0x2bf860
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x2a2e0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xd9a57
movl -0x4(%rbp), %eax
movl %eax, 0xba082c(%rip) # 0xc7a2d0
movl -0x4(%rbp), %eax
testl %eax, %eax
jne 0xd9aaf
jmp 0xd9aad
jmp 0xd9ae1
cmpl $0x0, -0x4(%rbp)
jle 0xd9adf
movq 0x1e3514(%rip), %rax # 0x2bcfd0
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0x7a127(%rip), %rsi # 0x153bf0
movb $0x0, %al
callq 0x2a160
movq 0x1e34f9(%rip), %rax # 0x2bcfd0
movq (%rax), %rdi
callq 0x2a3d0
jmp 0xd9ae1
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| plan:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
lea rdi, aMytapConfig; "MYTAP_CONFIG"
call _getenv
mov [rbp+var_10], rax
call start_timer
mov cs:start_time, rax
cmp [rbp+var_10], 0
jz short loc_D9A34
mov rdi, [rbp+var_10]
lea rsi, aUndoRecordTooB+10h; "big"
call _strcmp
mov cs:skip_big_tests, eax
loc_D9A34:
mov rax, cs:stdout_ptr
mov rdi, [rax]
xor eax, eax
mov ecx, eax
mov edx, 2
mov rsi, rcx
call _setvbuf
mov [rbp+var_18], 0
loc_D9A57:
cmp [rbp+var_18], 0Bh
jnb short loc_D9A9B
mov rcx, [rbp+var_18]
lea rax, install_signal
shl rcx, 4
add rax, rcx
mov edi, [rax]
mov rcx, [rbp+var_18]
lea rax, install_signal
shl rcx, 4
add rax, rcx
mov rsi, [rax+8]
call _signal
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_D9A57
loc_D9A9B:
mov eax, [rbp+var_4]
mov cs:g_test, eax
mov eax, [rbp+var_4]
test eax, eax
jnz short loc_D9AAF
jmp short $+2
loc_D9AAD:
jmp short loc_D9AE1
loc_D9AAF:
cmp [rbp+var_4], 0
jle short loc_D9ADF
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, [rbp+var_4]
lea rsi, a1D; "1..%d\n"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_D9ADF:
jmp short $+2
loc_D9AE1:
add rsp, 20h
pop rbp
retn
| long long plan(int a1)
{
long long result; // rax
unsigned long long i; // [rsp+8h] [rbp-18h]
long long v3; // [rsp+10h] [rbp-10h]
v3 = getenv("MYTAP_CONFIG");
start_time = start_timer();
if ( v3 )
skip_big_tests = strcmp(v3, "big");
setvbuf(stdout, 0LL, 2LL);
for ( i = 0LL; i < 0xB; ++i )
signal(*((unsigned int *)&install_signal + 4 * i), *((_QWORD *)&install_signal + 2 * i + 1));
g_test = a1;
result = (unsigned int)a1;
if ( a1 > 0 )
{
fprintf(stdout, "1..%d\n", a1);
return fflush(stdout);
}
return result;
}
| plan:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
LEA RDI,[0x253be3]
CALL 0x0012a5d0
MOV qword ptr [RBP + -0x10],RAX
CALL 0x001d9af0
MOV qword ptr [0x00d7a360],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001d9a34
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x2584e5]
CALL 0x0012a640
MOV dword ptr [0x003bf850],EAX
LAB_001d9a34:
MOV RAX,qword ptr [0x003bcfd0]
MOV RDI,qword ptr [RAX]
XOR EAX,EAX
MOV ECX,EAX
MOV EDX,0x2
MOV RSI,RCX
CALL 0x0012a390
MOV qword ptr [RBP + -0x18],0x0
LAB_001d9a57:
CMP qword ptr [RBP + -0x18],0xb
JNC 0x001d9a9b
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x3bf860]
SHL RCX,0x4
ADD RAX,RCX
MOV EDI,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x3bf860]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0012a2e0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001d9a57
LAB_001d9a9b:
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [0x00d7a2d0],EAX
MOV EAX,dword ptr [RBP + -0x4]
TEST EAX,EAX
JNZ 0x001d9aaf
JMP 0x001d9aad
LAB_001d9aad:
JMP 0x001d9ae1
LAB_001d9aaf:
CMP dword ptr [RBP + -0x4],0x0
JLE 0x001d9adf
MOV RAX,qword ptr [0x003bcfd0]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x4]
LEA RSI,[0x253bf0]
MOV AL,0x0
CALL 0x0012a160
MOV RAX,qword ptr [0x003bcfd0]
MOV RDI,qword ptr [RAX]
CALL 0x0012a3d0
LAB_001d9adf:
JMP 0x001d9ae1
LAB_001d9ae1:
ADD RSP,0x20
POP RBP
RET
|
void plan(uint param_1)
{
char *__s1;
ulong local_20;
__s1 = getenv("MYTAP_CONFIG");
start_time = start_timer();
if (__s1 != (char *)0x0) {
skip_big_tests = strcmp(__s1,"big");
}
setvbuf(*(FILE **)PTR_stdout_003bcfd0,(char *)0x0,2,0);
for (local_20 = 0; local_20 < 0xb; local_20 = local_20 + 1) {
signal(*(int *)(install_signal + local_20 * 0x10),
*(__sighandler_t *)(install_signal + local_20 * 0x10 + 8));
}
g_test = param_1;
if ((param_1 != 0) && (0 < (int)param_1)) {
fprintf(*(FILE **)PTR_stdout_003bcfd0,"1..%d\n",(ulong)param_1);
fflush(*(FILE **)PTR_stdout_003bcfd0);
}
return;
}
| |
22,709 | ma_free_size_to_head_pattern | eloqsql/storage/maria/ma_bitmap.c | uint _ma_free_size_to_head_pattern(MARIA_FILE_BITMAP *bitmap, uint size)
{
if (size < bitmap->sizes[3])
return 4;
if (size < bitmap->sizes[2])
return 3;
if (size < bitmap->sizes[1])
return 2;
return (size < bitmap->sizes[0]) ? 1 : 0;
} | O3 | c | ma_free_size_to_head_pattern:
pushq %rbp
movq %rsp, %rbp
movl $0x4, %eax
cmpl %esi, 0x114(%rdi)
ja 0x402b8
movl $0x3, %eax
cmpl %esi, 0x110(%rdi)
ja 0x402b8
movl $0x2, %eax
cmpl %esi, 0x10c(%rdi)
ja 0x402b8
xorl %eax, %eax
cmpl %esi, 0x108(%rdi)
seta %al
popq %rbp
retq
| _ma_free_size_to_head_pattern:
push rbp
mov rbp, rsp
mov eax, 4
cmp [rdi+114h], esi
ja short loc_402B8
mov eax, 3
cmp [rdi+110h], esi
ja short loc_402B8
mov eax, 2
cmp [rdi+10Ch], esi
ja short loc_402B8
xor eax, eax
cmp [rdi+108h], esi
setnbe al
loc_402B8:
pop rbp
retn
| long long ma_free_size_to_head_pattern(_DWORD *a1, unsigned int a2)
{
long long result; // rax
result = 4LL;
if ( a1[69] <= a2 )
{
result = 3LL;
if ( a1[68] <= a2 )
{
result = 2LL;
if ( a1[67] <= a2 )
return a1[66] > a2;
}
}
return result;
}
| _ma_free_size_to_head_pattern:
PUSH RBP
MOV RBP,RSP
MOV EAX,0x4
CMP dword ptr [RDI + 0x114],ESI
JA 0x001402b8
MOV EAX,0x3
CMP dword ptr [RDI + 0x110],ESI
JA 0x001402b8
MOV EAX,0x2
CMP dword ptr [RDI + 0x10c],ESI
JA 0x001402b8
XOR EAX,EAX
CMP dword ptr [RDI + 0x108],ESI
SETA AL
LAB_001402b8:
POP RBP
RET
|
int1 _ma_free_size_to_head_pattern(long param_1,uint param_2)
{
int1 uVar1;
uVar1 = 4;
if (((*(uint *)(param_1 + 0x114) <= param_2) && (uVar1 = 3, *(uint *)(param_1 + 0x110) <= param_2)
) && (uVar1 = 2, *(uint *)(param_1 + 0x10c) <= param_2)) {
uVar1 = param_2 < *(uint *)(param_1 + 0x108);
}
return uVar1;
}
| |
22,710 | thr_lock_delete | eloqsql/mysys/thr_lock.c | void thr_lock_delete(THR_LOCK *lock)
{
DBUG_ENTER("thr_lock_delete");
mysql_mutex_lock(&THR_LOCK_lock);
thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list);
mysql_mutex_unlock(&THR_LOCK_lock);
mysql_mutex_destroy(&lock->mutex);
DBUG_VOID_RETURN;
} | O0 | c | thr_lock_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xb8b9c5(%rip), %rdi # 0xc83378
leaq 0x5ccc5(%rip), %rsi # 0x15467f
movl $0x1bb, %edx # imm = 0x1BB
callq 0xf78d0
leaq 0xb8bc5d(%rip), %rax # 0xc83628
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0xdf3d0
movq %rax, %rcx
leaq 0xb8bc47(%rip), %rax # 0xc83628
movq %rcx, (%rax)
leaq 0xb8b98d(%rip), %rdi # 0xc83378
callq 0xf7940
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7a10
jmp 0xf79ff
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| thr_lock_delete:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
lea rdi, THR_LOCK_lock
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1BBh
call inline_mysql_mutex_lock_27
lea rax, thr_lock_thread_list
mov rdi, [rax]
mov rsi, [rbp+var_8]
call list_delete
mov rcx, rax
lea rax, thr_lock_thread_list
mov [rax], rcx
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock_28
mov rdi, [rbp+var_8]
add rdi, 18h
call inline_mysql_mutex_destroy_10
jmp short $+2
loc_F79FF:
add rsp, 10h
pop rbp
retn
| long long thr_lock_delete(_QWORD *a1)
{
inline_mysql_mutex_lock_27(
(long long)&THR_LOCK_lock,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x1BBu);
thr_lock_thread_list = list_delete(thr_lock_thread_list, a1);
inline_mysql_mutex_unlock_28((long long)&THR_LOCK_lock);
return inline_mysql_mutex_destroy_10(a1 + 3);
}
| thr_lock_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0xd83378]
LEA RSI,[0x25467f]
MOV EDX,0x1bb
CALL 0x001f78d0
LEA RAX,[0xd83628]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001df3d0
MOV RCX,RAX
LEA RAX,[0xd83628]
MOV qword ptr [RAX],RCX
LEA RDI,[0xd83378]
CALL 0x001f7940
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
CALL 0x001f7a10
JMP 0x001f79ff
LAB_001f79ff:
ADD RSP,0x10
POP RBP
RET
|
void thr_lock_delete(long param_1)
{
inline_mysql_mutex_lock
(THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x1bb);
thr_lock_thread_list = list_delete(thr_lock_thread_list,param_1);
inline_mysql_mutex_unlock(THR_LOCK_lock);
inline_mysql_mutex_destroy(param_1 + 0x18);
return;
}
| |
22,711 | utf8_encode_buf8 | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_buf8(char *dest, size_t dest_len, const uint8_t *src, size_t src_len)
{
size_t i, j;
uint32_t c;
for (i = j = 0; i < src_len; i++) {
c = src[i];
if (c < 0x80) {
if (j + 1 >= dest_len)
goto overflow;
dest[j++] = c;
} else {
if (j + 2 >= dest_len)
goto overflow;
dest[j++] = (c >> 6) | 0xC0;
dest[j++] = (c & 0x3F) | 0x80;
}
}
if (j < dest_len)
dest[j] = '\0';
return j;
overflow:
if (j < dest_len)
dest[j] = '\0';
while (i < src_len)
j += 1 + (src[i++] >= 0x80);
return j;
} | O0 | c | utf8_encode_buf8:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq %rcx, -0x28(%rsp)
movq $0x0, -0x38(%rsp)
movq $0x0, -0x30(%rsp)
movq -0x30(%rsp), %rax
cmpq -0x28(%rsp), %rax
jae 0x1f390
movq -0x20(%rsp), %rax
movq -0x30(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x3c(%rsp)
cmpl $0x80, -0x3c(%rsp)
jae 0x1f318
movq -0x38(%rsp), %rax
addq $0x1, %rax
cmpq -0x18(%rsp), %rax
jb 0x1f2f7
jmp 0x1f3b6
movl -0x3c(%rsp), %eax
movb %al, %dl
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x38(%rsp)
movb %dl, (%rax,%rcx)
jmp 0x1f37b
movq -0x38(%rsp), %rax
addq $0x2, %rax
cmpq -0x18(%rsp), %rax
jb 0x1f32d
jmp 0x1f3b6
movl -0x3c(%rsp), %eax
shrl $0x6, %eax
orl $0xc0, %eax
movb %al, %dl
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x38(%rsp)
movb %dl, (%rax,%rcx)
movl -0x3c(%rsp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %dl
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x38(%rsp)
movb %dl, (%rax,%rcx)
jmp 0x1f37d
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x1f2b6
movq -0x38(%rsp), %rax
cmpq -0x18(%rsp), %rax
jae 0x1f3aa
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rsp), %rax
movq %rax, -0x8(%rsp)
jmp 0x1f420
movq -0x38(%rsp), %rax
cmpq -0x18(%rsp), %rax
jae 0x1f3d0
movq -0x10(%rsp), %rax
movq -0x38(%rsp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x1f3d2
movq -0x30(%rsp), %rax
cmpq -0x28(%rsp), %rax
jae 0x1f416
movq -0x20(%rsp), %rax
movq -0x30(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rsp)
movzbl (%rax,%rcx), %eax
cmpl $0x80, %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
addl $0x1, %eax
cltq
addq -0x38(%rsp), %rax
movq %rax, -0x38(%rsp)
jmp 0x1f3d2
movq -0x38(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
| utf8_encode_buf8:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_20], rdx
mov [rsp+var_28], rcx
mov [rsp+var_38], 0
mov [rsp+var_30], 0
loc_1F2B6:
mov rax, [rsp+var_30]
cmp rax, [rsp+var_28]
jnb loc_1F390
mov rax, [rsp+var_20]
mov rcx, [rsp+var_30]
movzx eax, byte ptr [rax+rcx]
mov [rsp+var_3C], eax
cmp [rsp+var_3C], 80h
jnb short loc_1F318
mov rax, [rsp+var_38]
add rax, 1
cmp rax, [rsp+var_18]
jb short loc_1F2F7
jmp loc_1F3B6
loc_1F2F7:
mov eax, [rsp+var_3C]
mov dl, al
mov rax, [rsp+var_10]
mov rcx, [rsp+var_38]
mov rsi, rcx
add rsi, 1
mov [rsp+var_38], rsi
mov [rax+rcx], dl
jmp short loc_1F37B
loc_1F318:
mov rax, [rsp+var_38]
add rax, 2
cmp rax, [rsp+var_18]
jb short loc_1F32D
jmp loc_1F3B6
loc_1F32D:
mov eax, [rsp+var_3C]
shr eax, 6
or eax, 0C0h
mov dl, al
mov rax, [rsp+var_10]
mov rcx, [rsp+var_38]
mov rsi, rcx
add rsi, 1
mov [rsp+var_38], rsi
mov [rax+rcx], dl
mov eax, [rsp+var_3C]
and eax, 3Fh
or eax, 80h
mov dl, al
mov rax, [rsp+var_10]
mov rcx, [rsp+var_38]
mov rsi, rcx
add rsi, 1
mov [rsp+var_38], rsi
mov [rax+rcx], dl
loc_1F37B:
jmp short $+2
loc_1F37D:
mov rax, [rsp+var_30]
add rax, 1
mov [rsp+var_30], rax
jmp loc_1F2B6
loc_1F390:
mov rax, [rsp+var_38]
cmp rax, [rsp+var_18]
jnb short loc_1F3AA
mov rax, [rsp+var_10]
mov rcx, [rsp+var_38]
mov byte ptr [rax+rcx], 0
loc_1F3AA:
mov rax, [rsp+var_38]
mov [rsp+var_8], rax
jmp short loc_1F420
loc_1F3B6:
mov rax, [rsp+var_38]
cmp rax, [rsp+var_18]
jnb short loc_1F3D0
mov rax, [rsp+var_10]
mov rcx, [rsp+var_38]
mov byte ptr [rax+rcx], 0
loc_1F3D0:
jmp short $+2
loc_1F3D2:
mov rax, [rsp+var_30]
cmp rax, [rsp+var_28]
jnb short loc_1F416
mov rax, [rsp+var_20]
mov rcx, [rsp+var_30]
mov rdx, rcx
add rdx, 1
mov [rsp+var_30], rdx
movzx eax, byte ptr [rax+rcx]
cmp eax, 80h
setnl al
and al, 1
movzx eax, al
add eax, 1
cdqe
add rax, [rsp+var_38]
mov [rsp+var_38], rax
jmp short loc_1F3D2
loc_1F416:
mov rax, [rsp+var_38]
mov [rsp+var_8], rax
loc_1F420:
mov rax, [rsp+var_8]
retn
| unsigned long long utf8_encode_buf8(long long a1, unsigned long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // rcx
unsigned long long v5; // rcx
long long v6; // rcx
unsigned int v8; // [rsp+0h] [rbp-3Ch]
unsigned long long v9; // [rsp+4h] [rbp-38h]
unsigned long long i; // [rsp+Ch] [rbp-30h]
v9 = 0LL;
for ( i = 0LL; i < a4; ++i )
{
v8 = *(unsigned __int8 *)(a3 + i);
if ( v8 >= 0x80 )
{
if ( v9 + 2 >= a2 )
{
LABEL_12:
if ( v9 < a2 )
*(_BYTE *)(a1 + v9) = 0;
while ( i < a4 )
{
v6 = i++;
v9 += (*(unsigned __int8 *)(a3 + v6) >= 0x80u) + 1;
}
return v9;
}
*(_BYTE *)(a1 + v9) = (*(_BYTE *)(a3 + i) >> 6) | 0xC0;
v5 = v9 + 1;
v9 += 2LL;
*(_BYTE *)(a1 + v5) = v8 & 0x3F | 0x80;
}
else
{
if ( v9 + 1 >= a2 )
goto LABEL_12;
v4 = v9++;
*(_BYTE *)(a1 + v4) = v8;
}
}
if ( v9 < a2 )
*(_BYTE *)(a1 + v9) = 0;
return v9;
}
| utf8_encode_buf8:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV qword ptr [RSP + -0x20],RDX
MOV qword ptr [RSP + -0x28],RCX
MOV qword ptr [RSP + -0x38],0x0
MOV qword ptr [RSP + -0x30],0x0
LAB_0011f2b6:
MOV RAX,qword ptr [RSP + -0x30]
CMP RAX,qword ptr [RSP + -0x28]
JNC 0x0011f390
MOV RAX,qword ptr [RSP + -0x20]
MOV RCX,qword ptr [RSP + -0x30]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + -0x3c],EAX
CMP dword ptr [RSP + -0x3c],0x80
JNC 0x0011f318
MOV RAX,qword ptr [RSP + -0x38]
ADD RAX,0x1
CMP RAX,qword ptr [RSP + -0x18]
JC 0x0011f2f7
JMP 0x0011f3b6
LAB_0011f2f7:
MOV EAX,dword ptr [RSP + -0x3c]
MOV DL,AL
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RSP + -0x38]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RSP + -0x38],RSI
MOV byte ptr [RAX + RCX*0x1],DL
JMP 0x0011f37b
LAB_0011f318:
MOV RAX,qword ptr [RSP + -0x38]
ADD RAX,0x2
CMP RAX,qword ptr [RSP + -0x18]
JC 0x0011f32d
JMP 0x0011f3b6
LAB_0011f32d:
MOV EAX,dword ptr [RSP + -0x3c]
SHR EAX,0x6
OR EAX,0xc0
MOV DL,AL
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RSP + -0x38]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RSP + -0x38],RSI
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RSP + -0x3c]
AND EAX,0x3f
OR EAX,0x80
MOV DL,AL
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RSP + -0x38]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RSP + -0x38],RSI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0011f37b:
JMP 0x0011f37d
LAB_0011f37d:
MOV RAX,qword ptr [RSP + -0x30]
ADD RAX,0x1
MOV qword ptr [RSP + -0x30],RAX
JMP 0x0011f2b6
LAB_0011f390:
MOV RAX,qword ptr [RSP + -0x38]
CMP RAX,qword ptr [RSP + -0x18]
JNC 0x0011f3aa
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RSP + -0x38]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0011f3aa:
MOV RAX,qword ptr [RSP + -0x38]
MOV qword ptr [RSP + -0x8],RAX
JMP 0x0011f420
LAB_0011f3b6:
MOV RAX,qword ptr [RSP + -0x38]
CMP RAX,qword ptr [RSP + -0x18]
JNC 0x0011f3d0
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RSP + -0x38]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0011f3d0:
JMP 0x0011f3d2
LAB_0011f3d2:
MOV RAX,qword ptr [RSP + -0x30]
CMP RAX,qword ptr [RSP + -0x28]
JNC 0x0011f416
MOV RAX,qword ptr [RSP + -0x20]
MOV RCX,qword ptr [RSP + -0x30]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RSP + -0x30],RDX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x80
SETGE AL
AND AL,0x1
MOVZX EAX,AL
ADD EAX,0x1
CDQE
ADD RAX,qword ptr [RSP + -0x38]
MOV qword ptr [RSP + -0x38],RAX
JMP 0x0011f3d2
LAB_0011f416:
MOV RAX,qword ptr [RSP + -0x38]
MOV qword ptr [RSP + -0x8],RAX
LAB_0011f420:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
ulong utf8_encode_buf8(long param_1,ulong param_2,long param_3,ulong param_4)
{
byte bVar1;
long lVar2;
ulong local_38;
ulong local_30;
local_38 = 0;
local_30 = 0;
do {
if (param_4 <= local_30) {
if (local_38 < param_2) {
*(int1 *)(param_1 + local_38) = 0;
}
return local_38;
}
bVar1 = *(byte *)(param_3 + local_30);
if (bVar1 < 0x80) {
if (param_2 <= local_38 + 1) {
LAB_0011f3b6:
if (local_38 < param_2) {
*(int1 *)(param_1 + local_38) = 0;
}
for (; local_30 < param_4; local_30 = local_30 + 1) {
local_38 = (long)(int)((0x7f < *(byte *)(param_3 + local_30)) + 1) + local_38;
}
return local_38;
}
*(byte *)(param_1 + local_38) = bVar1;
local_38 = local_38 + 1;
}
else {
if (param_2 <= local_38 + 2) goto LAB_0011f3b6;
lVar2 = local_38 + 1;
*(byte *)(param_1 + local_38) = bVar1 >> 6 | 0xc0;
local_38 = local_38 + 2;
*(byte *)(param_1 + lVar2) = bVar1 & 0x3f | 0x80;
}
local_30 = local_30 + 1;
} while( true );
}
| |
22,712 | utf8_encode_buf8 | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_buf8(char *dest, size_t dest_len, const uint8_t *src, size_t src_len)
{
size_t i, j;
uint32_t c;
for (i = j = 0; i < src_len; i++) {
c = src[i];
if (c < 0x80) {
if (j + 1 >= dest_len)
goto overflow;
dest[j++] = c;
} else {
if (j + 2 >= dest_len)
goto overflow;
dest[j++] = (c >> 6) | 0xC0;
dest[j++] = (c & 0x3F) | 0x80;
}
}
if (j < dest_len)
dest[j] = '\0';
return j;
overflow:
if (j < dest_len)
dest[j] = '\0';
while (i < src_len)
j += 1 + (src[i++] >= 0x80);
return j;
} | O1 | c | utf8_encode_buf8:
testq %rcx, %rcx
je 0x1ba70
xorl %r9d, %r9d
xorl %r8d, %r8d
movb (%rdx,%r8), %r10b
testb %r10b, %r10b
js 0x1ba42
leaq 0x1(%r9), %rax
cmpq %rsi, %rax
jae 0x1ba7c
movb %r10b, (%rdi,%r9)
jmp 0x1ba63
leaq 0x2(%r9), %rax
cmpq %rsi, %rax
jae 0x1ba7c
movl %r10d, %r11d
shrb $0x6, %r11b
orb $-0x40, %r11b
movb %r11b, (%rdi,%r9)
andb $-0x41, %r10b
movb %r10b, 0x1(%rdi,%r9)
incq %r8
movq %rax, %r9
cmpq %r8, %rcx
jne 0x1ba2a
jmp 0x1ba72
xorl %eax, %eax
cmpq %rsi, %rax
jae 0x1baa1
movb $0x0, (%rdi,%rax)
retq
cmpq %rsi, %r9
jae 0x1ba86
movb $0x0, (%rdi,%r9)
movq %r9, %rax
cmpq %rcx, %r8
jae 0x1baa1
movzbl (%rdx,%r8), %esi
incq %r8
shrl $0x7, %esi
addq %rsi, %rax
incq %rax
jmp 0x1ba89
retq
| utf8_encode_buf8:
test rcx, rcx
jz short loc_1BA70
xor r9d, r9d
xor r8d, r8d
loc_1BA2A:
mov r10b, [rdx+r8]
test r10b, r10b
js short loc_1BA42
lea rax, [r9+1]
cmp rax, rsi
jnb short loc_1BA7C
mov [rdi+r9], r10b
jmp short loc_1BA63
loc_1BA42:
lea rax, [r9+2]
cmp rax, rsi
jnb short loc_1BA7C
mov r11d, r10d
shr r11b, 6
or r11b, 0C0h
mov [rdi+r9], r11b
and r10b, 0BFh
mov [rdi+r9+1], r10b
loc_1BA63:
inc r8
mov r9, rax
cmp rcx, r8
jnz short loc_1BA2A
jmp short loc_1BA72
loc_1BA70:
xor eax, eax
loc_1BA72:
cmp rax, rsi
jnb short locret_1BAA1
mov byte ptr [rdi+rax], 0
retn
loc_1BA7C:
cmp r9, rsi
jnb short loc_1BA86
mov byte ptr [rdi+r9], 0
loc_1BA86:
mov rax, r9
loc_1BA89:
cmp r8, rcx
jnb short locret_1BAA1
movzx esi, byte ptr [rdx+r8]
inc r8
shr esi, 7
add rax, rsi
inc rax
jmp short loc_1BA89
locret_1BAA1:
retn
| unsigned long long utf8_encode_buf8(long long a1, unsigned long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r9
unsigned long long v5; // r8
char v6; // r10
unsigned long long result; // rax
unsigned int v8; // esi
if ( a4 )
{
v4 = 0LL;
v5 = 0LL;
while ( 1 )
{
v6 = *(_BYTE *)(a3 + v5);
if ( v6 < 0 )
{
result = v4 + 2;
if ( v4 + 2 >= a2 )
{
LABEL_13:
if ( v4 < a2 )
*(_BYTE *)(a1 + v4) = 0;
result = v4;
while ( v5 < a4 )
{
v8 = *(unsigned __int8 *)(a3 + v5++);
result += (v8 >> 7) + 1LL;
}
return result;
}
*(_BYTE *)(a1 + v4) = ((unsigned __int8)v6 >> 6) | 0xC0;
*(_BYTE *)(a1 + v4 + 1) = v6 & 0xBF;
}
else
{
result = v4 + 1;
if ( v4 + 1 >= a2 )
goto LABEL_13;
*(_BYTE *)(a1 + v4) = v6;
}
++v5;
v4 = result;
if ( a4 == v5 )
goto LABEL_11;
}
}
result = 0LL;
LABEL_11:
if ( result < a2 )
*(_BYTE *)(a1 + result) = 0;
return result;
}
| |||
22,713 | utf8_encode_buf8 | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_buf8(char *dest, size_t dest_len, const uint8_t *src, size_t src_len)
{
size_t i, j;
uint32_t c;
for (i = j = 0; i < src_len; i++) {
c = src[i];
if (c < 0x80) {
if (j + 1 >= dest_len)
goto overflow;
dest[j++] = c;
} else {
if (j + 2 >= dest_len)
goto overflow;
dest[j++] = (c >> 6) | 0xC0;
dest[j++] = (c & 0x3F) | 0x80;
}
}
if (j < dest_len)
dest[j] = '\0';
return j;
overflow:
if (j < dest_len)
dest[j] = '\0';
while (i < src_len)
j += 1 + (src[i++] >= 0x80);
return j;
} | O3 | c | utf8_encode_buf8:
testq %rcx, %rcx
je 0x1c39f
xorl %eax, %eax
xorl %r8d, %r8d
movb (%rdx,%r8), %r10b
testb %r10b, %r10b
js 0x1c371
leaq 0x1(%rax), %r9
cmpq %rsi, %r9
jae 0x1c3b5
movb %r10b, (%rdi,%rax)
jmp 0x1c392
leaq 0x2(%rax), %r9
cmpq %rsi, %r9
jae 0x1c3b5
movl %r10d, %r11d
shrb $0x6, %r11b
orb $-0x40, %r11b
movb %r11b, (%rdi,%rax)
andb $-0x41, %r10b
movb %r10b, 0x1(%rdi,%rax)
incq %r8
movq %r9, %rax
cmpq %r8, %rcx
jne 0x1c359
jmp 0x1c3ac
xorl %r9d, %r9d
movl $0x0, %eax
testq %rsi, %rsi
je 0x1c3d6
movb $0x0, (%rdi,%r9)
movq %r9, %rax
retq
cmpq %rsi, %rax
jae 0x1c3d1
movb $0x0, (%rdi,%rax)
jmp 0x1c3d1
movzbl (%rdx,%r8), %esi
incq %r8
shrl $0x7, %esi
addq %rsi, %rax
incq %rax
cmpq %rcx, %r8
jb 0x1c3c0
retq
| utf8_encode_buf8:
test rcx, rcx
jz short loc_1C39F
xor eax, eax
xor r8d, r8d
loc_1C359:
mov r10b, [rdx+r8]
test r10b, r10b
js short loc_1C371
lea r9, [rax+1]
cmp r9, rsi
jnb short loc_1C3B5
mov [rdi+rax], r10b
jmp short loc_1C392
loc_1C371:
lea r9, [rax+2]
cmp r9, rsi
jnb short loc_1C3B5
mov r11d, r10d
shr r11b, 6
or r11b, 0C0h
mov [rdi+rax], r11b
and r10b, 0BFh
mov [rdi+rax+1], r10b
loc_1C392:
inc r8
mov rax, r9
cmp rcx, r8
jnz short loc_1C359
jmp short loc_1C3AC
loc_1C39F:
xor r9d, r9d
mov eax, 0
test rsi, rsi
jz short locret_1C3D6
loc_1C3AC:
mov byte ptr [rdi+r9], 0
mov rax, r9
retn
loc_1C3B5:
cmp rax, rsi
jnb short loc_1C3D1
mov byte ptr [rdi+rax], 0
jmp short loc_1C3D1
loc_1C3C0:
movzx esi, byte ptr [rdx+r8]
inc r8
shr esi, 7
add rax, rsi
inc rax
loc_1C3D1:
cmp r8, rcx
jb short loc_1C3C0
locret_1C3D6:
retn
| unsigned long long utf8_encode_buf8(long long a1, unsigned long long a2, long long a3, unsigned long long a4)
{
unsigned long long result; // rax
unsigned long long v5; // r8
char v6; // r10
unsigned long long v7; // r9
unsigned int v8; // esi
if ( a4 )
{
result = 0LL;
v5 = 0LL;
while ( 1 )
{
v6 = *(_BYTE *)(a3 + v5);
if ( v6 < 0 )
{
v7 = result + 2;
if ( result + 2 >= a2 )
{
LABEL_12:
if ( result < a2 )
*(_BYTE *)(a1 + result) = 0;
while ( v5 < a4 )
{
v8 = *(unsigned __int8 *)(a3 + v5++);
result += (v8 >> 7) + 1LL;
}
return result;
}
*(_BYTE *)(a1 + result) = ((unsigned __int8)v6 >> 6) | 0xC0;
*(_BYTE *)(a1 + result + 1) = v6 & 0xBF;
}
else
{
v7 = result + 1;
if ( result + 1 >= a2 )
goto LABEL_12;
*(_BYTE *)(a1 + result) = v6;
}
++v5;
result = v7;
if ( a4 == v5 )
goto LABEL_11;
}
}
v7 = 0LL;
result = 0LL;
if ( a2 )
{
LABEL_11:
*(_BYTE *)(a1 + v7) = 0;
return v7;
}
return result;
}
| utf8_encode_buf8:
TEST RCX,RCX
JZ 0x0011c39f
XOR EAX,EAX
XOR R8D,R8D
LAB_0011c359:
MOV R10B,byte ptr [RDX + R8*0x1]
TEST R10B,R10B
JS 0x0011c371
LEA R9,[RAX + 0x1]
CMP R9,RSI
JNC 0x0011c3b5
MOV byte ptr [RDI + RAX*0x1],R10B
JMP 0x0011c392
LAB_0011c371:
LEA R9,[RAX + 0x2]
CMP R9,RSI
JNC 0x0011c3b5
MOV R11D,R10D
SHR R11B,0x6
OR R11B,0xc0
MOV byte ptr [RDI + RAX*0x1],R11B
AND R10B,0xbf
MOV byte ptr [RDI + RAX*0x1 + 0x1],R10B
LAB_0011c392:
INC R8
MOV RAX,R9
CMP RCX,R8
JNZ 0x0011c359
JMP 0x0011c3ac
LAB_0011c39f:
XOR R9D,R9D
MOV EAX,0x0
TEST RSI,RSI
JZ 0x0011c3d6
LAB_0011c3ac:
MOV byte ptr [RDI + R9*0x1],0x0
MOV RAX,R9
RET
LAB_0011c3b5:
CMP RAX,RSI
JNC 0x0011c3d1
MOV byte ptr [RDI + RAX*0x1],0x0
JMP 0x0011c3d1
LAB_0011c3c0:
MOVZX ESI,byte ptr [RDX + R8*0x1]
INC R8
SHR ESI,0x7
ADD RAX,RSI
INC RAX
LAB_0011c3d1:
CMP R8,RCX
JC 0x0011c3c0
LAB_0011c3d6:
RET
|
ulong utf8_encode_buf8(long param_1,ulong param_2,long param_3,ulong param_4)
{
byte bVar1;
ulong uVar2;
ulong uVar3;
if (param_4 == 0) {
uVar2 = 0;
if (param_2 == 0) {
return 0;
}
}
else {
uVar2 = 0;
uVar3 = 0;
do {
bVar1 = *(byte *)(param_3 + uVar3);
if ((char)bVar1 < '\0') {
if (param_2 <= uVar2 + 2) goto LAB_0011c3b5;
*(byte *)(param_1 + uVar2) = bVar1 >> 6 | 0xc0;
*(byte *)(param_1 + 1 + uVar2) = bVar1 & 0xbf;
uVar2 = uVar2 + 2;
}
else {
if (param_2 <= uVar2 + 1) {
LAB_0011c3b5:
if (uVar2 < param_2) {
*(int1 *)(param_1 + uVar2) = 0;
}
for (; uVar3 < param_4; uVar3 = uVar3 + 1) {
uVar2 = uVar2 + (*(byte *)(param_3 + uVar3) >> 7) + 1;
}
return uVar2;
}
*(byte *)(param_1 + uVar2) = bVar1;
uVar2 = uVar2 + 1;
}
uVar3 = uVar3 + 1;
} while (param_4 != uVar3);
}
*(int1 *)(param_1 + uVar2) = 0;
return uVar2;
}
| |
22,714 | my_strnncoll_8bit_bin | eloqsql/strings/ctype-bin.c | static int my_strnncoll_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len=MY_MIN(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
} | O0 | c | my_strnncoll_8bit_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3e856
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x3e85e
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x24130
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x3e888
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x3e8ae
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x3e89b
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x3e8a3
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_strnncoll_8bit_bin:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r9b
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_29], al
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_3E856
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short loc_3E85E
loc_3E856:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_3E85E:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
call _memcmp
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_3E888
mov eax, [rbp+var_3C]
mov [rbp+var_4C], eax
jmp short loc_3E8AE
loc_3E888:
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_3E89B
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
jmp short loc_3E8A3
loc_3E89B:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_3E8A3:
mov rax, [rbp+var_58]
sub rax, [rbp+var_28]
mov [rbp+var_4C], eax
loc_3E8AE:
mov eax, [rbp+var_4C]
add rsp, 60h
pop rbp
retn
| long long my_strnncoll_8bit_bin(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
int v7; // [rsp+8h] [rbp-58h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned int v10; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+48h] [rbp-18h]
v13 = a3;
v12 = a5;
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
v10 = memcmp(a2, a4, v9);
if ( v10 )
{
return v10;
}
else
{
if ( a6 )
v7 = v9;
else
v7 = v13;
return (unsigned int)(v7 - v12);
}
}
| my_strnncoll_8bit_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R9B
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 + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0013e856
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013e85e
LAB_0013e856:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_0013e85e:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00124130
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0013e888
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0013e8ae
LAB_0013e888:
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x0013e89b
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013e8a3
LAB_0013e89b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_0013e8a3:
MOV RAX,qword ptr [RBP + -0x58]
SUB RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4c],EAX
LAB_0013e8ae:
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncoll_8bit_bin
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
ulong local_60;
int local_54;
size_t local_50;
local_50 = param_5;
if (param_3 < param_5) {
local_50 = param_3;
}
local_54 = memcmp(param_2,param_4,local_50);
if (local_54 == 0) {
local_60 = param_3;
if (param_6 != '\0') {
local_60 = local_50;
}
local_54 = (int)local_60 - (int)param_5;
}
return local_54;
}
| |
22,715 | cxxopts::values::abstract_value<bool>::parse() const | zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp | void
parse() const override
{
parse_value(m_default_value, *m_store);
} | O1 | cpp | cxxopts::values::abstract_value<bool>::parse() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r14
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x2ef41
testb %al, %al
je 0x2ebb1
movb $0x1, (%r14)
jmp 0x2ebc1
movq %rbx, %rdi
callq 0x2f043
testb %al, %al
je 0x2ebc9
movb $0x0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2f145
| _ZNK7cxxopts6values14abstract_valueIbE5parseEv:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+28h]
add rbx, 38h ; '8'
mov rdi, rbx
call _ZN7cxxopts6values11parser_tool10IsTrueTextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::values::parser_tool::IsTrueText(std::string const&)
test al, al
jz short loc_2EBB1
mov byte ptr [r14], 1
jmp short loc_2EBC1
loc_2EBB1:
mov rdi, rbx
call _ZN7cxxopts6values11parser_tool11IsFalseTextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::values::parser_tool::IsFalseText(std::string const&)
test al, al
jz short loc_2EBC9
mov byte ptr [r14], 0
loc_2EBC1:
add rsp, 8
pop rbx
pop r14
retn
loc_2EBC9:
mov rdi, rbx; int
add rsp, 8
pop rbx
pop r14
jmp _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&)
| long long cxxopts::values::abstract_value<bool>::parse(long long a1, int a2, int a3, int a4, int a5, int a6)
{
int v6; // eax
_BYTE *v7; // r14
int v8; // ebx
long long result; // rax
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v14; // [rsp-8h] [rbp-18h]
v7 = *(_BYTE **)(a1 + 40);
v8 = a1 + 56;
result = cxxopts::values::parser_tool::IsTrueText((int)a1 + 56, a2, a3, a4, a5, a6, v6);
if ( (_BYTE)result )
{
*v7 = 1;
}
else
{
result = cxxopts::values::parser_tool::IsFalseText(v8, a2, v10, v11, v12, v13, v14);
if ( !(_BYTE)result )
cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(v8);
*v7 = 0;
}
return result;
}
| parse:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x28]
ADD RBX,0x38
MOV RDI,RBX
CALL 0x0012ef41
TEST AL,AL
JZ 0x0012ebb1
MOV byte ptr [R14],0x1
JMP 0x0012ebc1
LAB_0012ebb1:
MOV RDI,RBX
CALL 0x0012f043
TEST AL,AL
JZ 0x0012ebc9
MOV byte ptr [R14],0x0
LAB_0012ebc1:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0012ebc9:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0012f145
|
/* cxxopts::values::abstract_value<bool>::parse() const */
void __thiscall cxxopts::values::abstract_value<bool>::parse(abstract_value<bool> *this)
{
int1 *puVar1;
char cVar2;
string *psVar3;
puVar1 = *(int1 **)(this + 0x28);
psVar3 = (string *)(this + 0x38);
cVar2 = parser_tool::IsTrueText(psVar3);
if (cVar2 == '\0') {
cVar2 = parser_tool::IsFalseText(psVar3);
if (cVar2 == '\0') {
throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(psVar3);
return;
}
*puVar1 = 0;
}
else {
*puVar1 = 1;
}
return;
}
| |
22,716 | testing::internal::StreamingListener::AbstractSocketWriter::SendLn(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-internal-inl.h | void SendLn(const std::string& message) { Send(message + "\n"); } | O1 | c | testing::internal::StreamingListener::AbstractSocketWriter::SendLn(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x39594
leaq 0x9e87(%rip), %rsi # 0x432dd
movq %r14, %rdi
callq 0x8a50
movq (%rbx), %rax
movq %rsp, %rsi
movq %rbx, %rdi
callq *0x10(%rax)
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x39480
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3948c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x394a5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7testing8internal17StreamingListener20AbstractSocketWriter6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
lea r15, [rsp+38h+var_28]
mov [r15-10h], r15
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov r14, rsp
mov rdi, r14
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aSFromSSMsTotal+19h; "\n"
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, [rbx]
mov rsi, rsp
mov rdi, rbx
call qword ptr [rax+10h]
mov rdi, [rsp+38h+var_38]; void *
cmp rdi, r15
jz short loc_39480
mov rsi, [rsp+38h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39480:
add rsp, 20h
pop rbx
pop r14
pop r15
retn
jmp short $+2
loc_3948C:
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r15
jz short loc_394A5
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_394A5:
mov rdi, rbx
call __Unwind_Resume
| void testing::internal::StreamingListener::AbstractSocketWriter::SendLn(long long a1, _QWORD *a2)
{
void *v2[2]; // [rsp+0h] [rbp-38h] BYREF
_QWORD v3[5]; // [rsp+10h] [rbp-28h] BYREF
v2[0] = v3;
std::string::_M_construct<char *>(v2, *a2, *a2 + a2[1]);
std::string::append(v2, "\n");
(*(void ( **)(long long, void **))(*(_QWORD *)a1 + 16LL))(a1, v2);
if ( v2[0] != v3 )
operator delete(v2[0], v3[0] + 1LL);
}
| SendLn:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV R14,RSP
MOV RDI,R14
MOV RSI,RAX
CALL 0x00139594
LAB_0013944f:
LEA RSI,[0x1432dd]
MOV RDI,R14
CALL 0x00108a50
MOV RAX,qword ptr [RBX]
LAB_00139461:
MOV RSI,RSP
MOV RDI,RBX
CALL qword ptr [RAX + 0x10]
LAB_0013946a:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00139480
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_00139480:
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::StreamingListener::AbstractSocketWriter::SendLn(std::__cxx11::string const&)
*/
void __thiscall
testing::internal::StreamingListener::AbstractSocketWriter::SendLn
(AbstractSocketWriter *this,string *param_1)
{
long *local_38 [2];
long local_28 [2];
local_38[0] = local_28;
std::__cxx11::string::_M_construct<char*>
(local_38,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 0013944f to 0013945d has its CatchHandler @ 0013948c */
std::__cxx11::string::append((char *)local_38);
/* try { // try from 00139461 to 00139469 has its CatchHandler @ 0013948a */
(**(code **)(*(long *)this + 0x10))(this,local_38);
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
return;
}
| |
22,717 | mysql_real_query | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, unsigned long length)
{
my_bool skip_result= OPT_EXT_VAL(mysql, multi_command);
if (length == (unsigned long)-1)
length= (unsigned long)strlen(query);
free_old_query(mysql);
if (ma_simple_command(mysql, COM_QUERY,query,length,1,0))
return(-1);
if (!skip_result && !mysql->options.extension->skip_read_response)
return(mysql->methods->db_read_query_result(mysql));
return(0);
} | O0 | c | mysql_real_query:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x21cf0
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0xa8(%rax), %eax
cmpl $0x0, %eax
je 0x21cf0
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0xa8(%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0x21cf7
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x21cf7
movl -0x28(%rbp), %eax
movb %al, -0x21(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x21d11
movq -0x18(%rbp), %rdi
callq 0x131a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22e20
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x3, %esi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x1bad0
cmpl $0x0, %eax
je 0x21d49
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x21d84
cmpb $0x0, -0x21(%rbp)
jne 0x21d7d
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpb $0x0, 0x148(%rax)
jne 0x21d7d
movq -0x10(%rbp), %rax
movq 0x4d0(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x21d84
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_real_query:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_21CF0
mov rax, [rbp+var_10]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+0A8h]
cmp eax, 0
jz short loc_21CF0
mov rax, [rbp+var_10]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+0A8h]
mov [rbp+var_28], eax
jmp short loc_21CF7
loc_21CF0:
xor eax, eax
mov [rbp+var_28], eax
jmp short $+2
loc_21CF7:
mov eax, [rbp+var_28]
mov [rbp+var_21], al
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_21D11
mov rdi, [rbp+var_18]
call _strlen
mov [rbp+var_20], rax
loc_21D11:
mov rdi, [rbp+var_10]
call free_old_query
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov esi, 3
mov r8d, 1
xor eax, eax
mov r9d, eax
call ma_simple_command
cmp eax, 0
jz short loc_21D49
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_21D84
loc_21D49:
cmp [rbp+var_21], 0
jnz short loc_21D7D
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_21D7D
mov rax, [rbp+var_10]
mov rax, [rax+4D0h]
mov rax, [rax+20h]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_4], eax
jmp short loc_21D84
loc_21D7D:
mov [rbp+var_4], 0
loc_21D84:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_real_query(long long a1, long long a2, long long a3)
{
char v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = a3;
if ( *(_QWORD *)(a1 + 1152) && *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL) )
v4 = *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 168LL);
else
v4 = 0;
if ( a3 == -1 )
v5 = strlen(a2);
free_old_query(a1);
if ( (unsigned int)ma_simple_command(a1, 3u, a2, v5, 1, 0LL) )
{
return (unsigned int)-1;
}
else if ( v4 || *(_BYTE *)(*(_QWORD *)(a1 + 1152) + 328LL) )
{
return 0;
}
else
{
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(a1 + 1232) + 32LL))(a1);
}
}
| mysql_real_query:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00121cf0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOVSX EAX,byte ptr [RAX + 0xa8]
CMP EAX,0x0
JZ 0x00121cf0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOVSX EAX,byte ptr [RAX + 0xa8]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00121cf7
LAB_00121cf0:
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00121cf7
LAB_00121cf7:
MOV EAX,dword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x00121d11
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001131a0
MOV qword ptr [RBP + -0x20],RAX
LAB_00121d11:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00122e20
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0x3
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
CALL 0x0011bad0
CMP EAX,0x0
JZ 0x00121d49
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00121d84
LAB_00121d49:
CMP byte ptr [RBP + -0x21],0x0
JNZ 0x00121d7d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x00121d7d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x20]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00121d84
LAB_00121d7d:
MOV dword ptr [RBP + -0x4],0x0
LAB_00121d84:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_real_query(long param_1,char *param_2,size_t param_3)
{
char cVar1;
int iVar2;
int8 local_28;
int4 local_c;
if ((*(long *)(param_1 + 0x480) == 0) || (*(char *)(*(long *)(param_1 + 0x480) + 0xa8) == '\0')) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(param_1 + 0x480) + 0xa8);
}
local_28 = param_3;
if (param_3 == 0xffffffffffffffff) {
local_28 = strlen(param_2);
}
free_old_query(param_1);
iVar2 = ma_simple_command(param_1,3,param_2,local_28,1,0);
if (iVar2 == 0) {
if ((cVar1 == '\0') && (*(char *)(*(long *)(param_1 + 0x480) + 0x148) == '\0')) {
local_c = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x20))(param_1);
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffffff;
}
return local_c;
}
| |
22,718 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::start_array(unsigned long) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | bool start_array(std::size_t len)
{
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded);
keep_stack.push_back(keep);
auto val = handle_value(BasicJsonType::value_t::array, true);
ref_stack.push_back(val.second);
if (ref_stack.back())
{
#if JSON_DIAGNOSTIC_POSITIONS
// Manually set the start position of the array here.
// Ensure this is after the call to handle_value to ensure correct start position.
if (m_lexer_ref)
{
// Lexer has read the first character of the array, so
// subtract 1 from the position to get the correct start position.
ref_stack.back()->start_position = m_lexer_ref->get_position() - 1;
}
#endif
// check array limit
if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
}
}
return true;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::start_array(unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x90(%rbp)
addq $0x8, %rdi
callq 0x5f6f0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rcx
movl %eax, %esi
addq $0xa8, %rcx
movl $0x2, %edx
callq 0x5d470
movq -0x88(%rbp), %rdi
andb $0x1, %al
movb %al, -0x11(%rbp)
addq $0x20, %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x5f480
movq -0x88(%rbp), %rdi
movb $0x2, -0x29(%rbp)
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x5c740
movq -0x88(%rbp), %rdi
movb %al, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
addq $0x8, %rdi
leaq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x5f140
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x60240
cmpq $0x0, (%rax)
je 0x7dda0
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
callq 0x5e610
movq -0xa0(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x91(%rbp)
je 0x7dcb7
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
addq $0x8, %rdi
callq 0x60240
movq (%rax), %rdi
callq 0x5f6a0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
seta %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x7dcca
jmp 0x7dd9e
movb $0x1, -0x7d(%rbp)
movl $0x20, %edi
callq 0x5c6c0
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x5c060
jmp 0x7dcee
leaq 0x12a7c(%rip), %rsi # 0x90771
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x5e450
jmp 0x7dd04
movq -0x88(%rbp), %rdi
addq $0x8, %rdi
callq 0x60240
movq -0xb0(%rbp), %rdi
movq (%rax), %rcx
movl $0x198, %esi # imm = 0x198
leaq -0x50(%rbp), %rdx
callq 0x5d990
jmp 0x7dd2e
movq -0xb0(%rbp), %rdi
movb $0x0, -0x7d(%rbp)
movq 0x29260(%rip), %rsi # 0xa6fa0
movq 0x291f1(%rip), %rdx # 0xa6f38
callq 0x60f20
jmp 0x7ddb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x7dd88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x7dd7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5cfd0
leaq -0x70(%rbp), %rdi
callq 0x5cfd0
testb $0x1, -0x7d(%rbp)
jne 0x7dd90
jmp 0x7dd9c
movq -0xb0(%rbp), %rdi
callq 0x5d520
jmp 0x7ddad
jmp 0x7dda0
movb $0x1, %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x611b0
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11start_arrayEm:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_88], rdi
mov rax, rdi
add rax, 80h
mov [rbp+var_90], rax
add rdi, 8
call __ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::size(void)
mov rdi, [rbp+var_90]
mov rcx, [rbp+var_88]
mov esi, eax
add rcx, 0A8h
mov edx, 2
call __ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov rdi, [rbp+var_88]
and al, 1
mov [rbp+var_11], al
add rdi, 20h ; ' '
mov al, [rbp+var_11]
and al, 1
movzx esi, al
call __ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
mov rdi, [rbp+var_88]
mov [rbp+var_29], 2
lea rsi, [rbp+var_29]
mov edx, 1
call __ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool)
mov rdi, [rbp+var_88]
mov [rbp+var_28], al
mov [rbp+var_20], rdx
add rdi, 8
lea rsi, [rbp+var_28]
add rsi, 8
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&)
mov rdi, [rbp+var_88]
add rdi, 8; this
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
cmp qword ptr [rax], 0
jz loc_7DDA0
mov rax, [rbp+var_10]
mov [rbp+var_A0], rax
call __ZN8nlohmann16json_abi_v3_11_36detail12unknown_sizeEv; nlohmann::json_abi_v3_11_3::detail::unknown_size(void)
mov rcx, [rbp+var_A0]
mov rdx, rax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_91], al
jz short loc_7DCB7
mov rdi, [rbp+var_88]
mov rax, [rbp+var_10]
mov [rbp+var_A8], rax
add rdi, 8
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rdi, [rax]
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void)
mov rcx, rax
mov rax, [rbp+var_A8]
cmp rax, rcx
setnbe al
mov [rbp+var_91], al
loc_7DCB7:
mov al, [rbp+var_91]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_7DCCA
jmp loc_7DD9E
loc_7DCCA:
mov [rbp+var_7D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_B0], rax
mov rsi, [rbp+var_10]; unsigned __int64
lea rdi, [rbp+var_70]; this
call __ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_7DCEE:
lea rsi, aExcessiveArray; "excessive array size: "
lea rdi, [rbp+var_50]
lea rdx, [rbp+var_70]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&)
jmp short $+2
loc_7DD04:
mov rdi, [rbp+var_88]
add rdi, 8
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rdi, [rbp+var_B0]
mov rcx, [rax]
mov esi, 198h
lea rdx, [rbp+var_50]
call __ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_7DD2E:
mov rdi, [rbp+var_B0]; void *
mov [rbp+var_7D], 0
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp short loc_7DDB6
mov rcx, rax
mov eax, edx
mov [rbp+var_78], rcx
mov [rbp+var_7C], eax
jmp short loc_7DD88
mov rcx, rax
mov eax, edx
mov [rbp+var_78], rcx
mov [rbp+var_7C], eax
jmp short loc_7DD7F
mov rcx, rax
mov eax, edx
mov [rbp+var_78], rcx
mov [rbp+var_7C], eax
lea rdi, [rbp+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_7DD7F:
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_7DD88:
test [rbp+var_7D], 1
jnz short loc_7DD90
jmp short loc_7DD9C
loc_7DD90:
mov rdi, [rbp+var_B0]; void *
call ___cxa_free_exception
loc_7DD9C:
jmp short loc_7DDAD
loc_7DD9E:
jmp short $+2
loc_7DDA0:
mov al, 1
and al, 1
add rsp, 0B0h
pop rbp
retn
loc_7DDAD:
mov rdi, [rbp+var_78]
call __Unwind_Resume
loc_7DDB6:
nop word ptr [rax+rax+00000000h]
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::start_array(
long long a1,
unsigned long long a2)
{
unsigned int v2; // eax
long long v3; // rdx
nlohmann::json_abi_v3_11_3::detail *v4; // rdi
_QWORD *v5; // rax
_QWORD *v6; // rax
void *exception; // [rsp+0h] [rbp-B0h]
unsigned long long v9; // [rsp+8h] [rbp-A8h]
unsigned long long v10; // [rsp+10h] [rbp-A0h]
bool v11; // [rsp+1Fh] [rbp-91h]
_BYTE v13[32]; // [rsp+40h] [rbp-70h] BYREF
_BYTE v14[39]; // [rsp+60h] [rbp-50h] BYREF
_BYTE v15[9]; // [rsp+87h] [rbp-29h] BYREF
long long v16; // [rsp+90h] [rbp-20h] BYREF
unsigned __int8 v17; // [rsp+9Fh] [rbp-11h]
unsigned long long v18; // [rsp+A0h] [rbp-10h]
long long v19; // [rsp+A8h] [rbp-8h]
v19 = a1;
v18 = a2;
v2 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::size(a1 + 8);
v17 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
v2,
2LL,
a1 + 168) & 1;
std::vector<bool>::push_back(a1 + 32, v17);
v15[0] = 2;
v15[1] = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v15,
1LL);
v16 = v3;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back(
a1 + 8,
&v16);
v4 = (nlohmann::json_abi_v3_11_3::detail *)(a1 + 8);
if ( *(_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(v4) )
{
v10 = v18;
v11 = 0;
if ( v10 != nlohmann::json_abi_v3_11_3::detail::unknown_size(v4) )
{
v9 = v18;
v5 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
v11 = v9 > nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*v5);
}
if ( v11 )
{
exception = __cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v13, v18);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(
v14,
"excessive array size: ",
v13);
v6 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408LL,
v14,
*v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range);
}
}
return 1;
}
| start_array:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,RDI
ADD RAX,0x80
MOV qword ptr [RBP + -0x90],RAX
ADD RDI,0x8
CALL 0x0015f6f0
MOV RDI,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x88]
MOV ESI,EAX
ADD RCX,0xa8
MOV EDX,0x2
CALL 0x0015d470
MOV RDI,qword ptr [RBP + -0x88]
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
ADD RDI,0x20
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOVZX ESI,AL
CALL 0x0015f480
MOV RDI,qword ptr [RBP + -0x88]
MOV byte ptr [RBP + -0x29],0x2
LEA RSI,[RBP + -0x29]
MOV EDX,0x1
CALL 0x0015c740
MOV RDI,qword ptr [RBP + -0x88]
MOV byte ptr [RBP + -0x28],AL
MOV qword ptr [RBP + -0x20],RDX
ADD RDI,0x8
LEA RSI,[RBP + -0x28]
ADD RSI,0x8
CALL 0x0015f140
MOV RDI,qword ptr [RBP + -0x88]
ADD RDI,0x8
CALL 0x00160240
CMP qword ptr [RAX],0x0
JZ 0x0017dda0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa0],RAX
CALL 0x0015e610
MOV RCX,qword ptr [RBP + -0xa0]
MOV RDX,RAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x91],AL
JZ 0x0017dcb7
MOV RDI,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xa8],RAX
ADD RDI,0x8
CALL 0x00160240
MOV RDI,qword ptr [RAX]
CALL 0x0015f6a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xa8]
CMP RAX,RCX
SETA AL
MOV byte ptr [RBP + -0x91],AL
LAB_0017dcb7:
MOV AL,byte ptr [RBP + -0x91]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0017dcca
JMP 0x0017dd9e
LAB_0017dcca:
MOV byte ptr [RBP + -0x7d],0x1
MOV EDI,0x20
CALL 0x0015c6c0
MOV qword ptr [RBP + -0xb0],RAX
MOV RSI,qword ptr [RBP + -0x10]
LAB_0017dce3:
LEA RDI,[RBP + -0x70]
CALL 0x0015c060
JMP 0x0017dcee
LAB_0017dcee:
LEA RSI,[0x190771]
LEA RDI,[RBP + -0x50]
LEA RDX,[RBP + -0x70]
CALL 0x0015e450
JMP 0x0017dd04
LAB_0017dd04:
MOV RDI,qword ptr [RBP + -0x88]
ADD RDI,0x8
CALL 0x00160240
MOV RDI,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RAX]
LAB_0017dd1e:
MOV ESI,0x198
LEA RDX,[RBP + -0x50]
CALL 0x0015d990
JMP 0x0017dd2e
LAB_0017dd2e:
MOV RDI,qword ptr [RBP + -0xb0]
MOV byte ptr [RBP + -0x7d],0x0
MOV RSI,qword ptr [0x001a6fa0]
MOV RDX,qword ptr [0x001a6f38]
CALL 0x00160f20
LAB_0017dd9e:
JMP 0x0017dda0
LAB_0017dda0:
MOV AL,0x1
AND AL,0x1
ADD RSP,0xb0
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::start_array(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::start_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
byte bVar3;
int4 uVar4;
long *plVar5;
ulong uVar6;
int8 *puVar7;
ulong uVar8;
int8 uVar9;
basic_json *extraout_RDX;
__cxx11 local_78 [32];
detail local_58 [39];
value_t local_31;
int1 local_30;
basic_json *local_28;
int1 local_19;
ulong local_18;
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*local_10;
local_18 = param_1;
local_10 = this;
uVar4 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::size((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
bVar3 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),uVar4,2,this + 0xa8);
local_19 = bVar3 & 1;
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),(bool)local_19);
local_31 = 2;
local_30 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_31,true);
local_28 = extraout_RDX;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),&local_28);
plVar5 = (long *)std::
vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar8 = local_18;
if (*plVar5 != 0) {
uVar6 = unknown_size();
uVar2 = local_18;
bVar1 = false;
if (uVar8 != uVar6) {
puVar7 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar8 = basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_size((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*puVar7);
bVar1 = uVar8 < uVar2;
}
if (bVar1) {
uVar9 = __cxa_allocate_exception(0x20);
/* try { // try from 0017dce3 to 0017dceb has its CatchHandler @ 0017dd4e */
std::__cxx11::to_string(local_78,local_18);
/* try { // try from 0017dcee to 0017dd01 has its CatchHandler @ 0017dd5c */
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>
(local_58,"excessive array size: ",(string *)local_78);
puVar7 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
/* try { // try from 0017dd1e to 0017dd4b has its CatchHandler @ 0017dd6a */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar9,0x198,local_58,*puVar7);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar9,PTR_typeinfo_001a6fa0,PTR__out_of_range_001a6f38);
}
}
return 1;
}
| |
22,719 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::start_array(unsigned long) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | bool start_array(std::size_t len)
{
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded);
keep_stack.push_back(keep);
auto val = handle_value(BasicJsonType::value_t::array, true);
ref_stack.push_back(val.second);
if (ref_stack.back())
{
#if JSON_DIAGNOSTIC_POSITIONS
// Manually set the start position of the array here.
// Ensure this is after the call to handle_value to ensure correct start position.
if (m_lexer_ref)
{
// Lexer has read the first character of the array, so
// subtract 1 from the position to get the correct start position.
ref_stack.back()->start_position = m_lexer_ref->get_position() - 1;
}
#endif
// check array limit
if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
}
}
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::start_array(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %r14
addq $0x80, %rdi
leaq 0x8(%r14), %rbx
movq 0x10(%r14), %rsi
subq 0x8(%r14), %rsi
shrq $0x3, %rsi
leaq 0xa8(%r14), %rcx
pushq $0x2
popq %rdx
callq 0x1cbe0
leaq 0x20(%r14), %rdi
movzbl %al, %esi
callq 0x1d4d0
leaq 0x8(%rsp), %rsi
movb $0x2, (%rsi)
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x1c7c0
leaq 0x50(%rsp), %rsi
movb %al, -0x8(%rsi)
movq %rdx, (%rsi)
movq %rbx, %rdi
callq 0x1d430
movq 0x10(%r14), %rax
movq -0x8(%rax), %rdi
testq %rdi, %rdi
sete %al
cmpq $-0x1, %r15
sete %cl
orb %al, %cl
jne 0x2657d
callq 0x1d560
cmpq %r15, %rax
jb 0x2658a
movb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x1c790
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1c560
leaq 0x7d08(%rip), %rsi # 0x2e2b1
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x1d080
movq 0x10(%r14), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x198, %esi # imm = 0x198
callq 0x1cdd0
xorl %ebp, %ebp
movq 0x129d2(%rip), %rsi # 0x38fb0
movq 0x1296b(%rip), %rdx # 0x38f50
movq %rbx, %rdi
callq 0x1dc20
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1c6f0
jmp 0x26602
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
callq 0x1c6f0
testb %bpl, %bpl
jne 0x26616
jmp 0x2661e
movq %rax, %r14
movq %rbx, %rdi
callq 0x1cc30
movq %r14, %rdi
callq 0x1dcb0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11start_arrayEm:
push rbp
push r15
push r14; char
push rbx; int
sub rsp, 58h
mov r15, rsi
mov r14, rdi
add rdi, 80h
lea rbx, [r14+8]
mov rsi, [r14+10h]
sub rsi, [r14+8]
shr rsi, 3
lea rcx, [r14+0A8h]
push 2
pop rdx
call __ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
lea rdi, [r14+20h]
movzx esi, al
call __ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
lea rsi, [rsp+78h+var_70]
mov byte ptr [rsi], 2
push 1
pop rdx
mov rdi, r14
call __ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool)
lea rsi, [rsp+78h+var_28]
mov [rsi-8], al
mov [rsi], rdx
mov rdi, rbx
call __ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&)
mov rax, [r14+10h]
mov rdi, [rax-8]
test rdi, rdi
setz al
cmp r15, 0FFFFFFFFFFFFFFFFh
setz cl
or cl, al
jnz short loc_2657D
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void)
cmp rax, r15
jb short loc_2658A
loc_2657D:
mov al, 1
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2658A:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_50]; this
mov rsi, r15; unsigned __int64
call __ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aExcessiveArray; "excessive array size: "
lea rdi, [rsp+78h+var_70]
lea rdx, [rsp+78h+var_50]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&)
mov rax, [r14+10h]
mov rcx, [rax-8]
mov bpl, 1
lea rdx, [rsp+78h+var_70]
mov rdi, rbx; this
mov esi, 198h; int
call __ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_26602
mov r14, rax
mov bpl, 1
loc_26602:
lea rdi, [rsp+78h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_26616
jmp short loc_2661E
mov r14, rax
loc_26616:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_2661E:
mov rdi, r14
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::start_array(
long long a1,
unsigned long long a2)
{
unsigned __int8 v2; // al
long long v3; // rdx
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx
char v6; // [rsp+0h] [rbp-78h]
int v7[6]; // [rsp+8h] [rbp-70h] BYREF
char v8; // [rsp+20h] [rbp-58h]
int v9[6]; // [rsp+28h] [rbp-50h] BYREF
char v10; // [rsp+40h] [rbp-38h]
int v11; // [rsp+48h] [rbp-30h]
long long v12; // [rsp+50h] [rbp-28h]
int v13; // [rsp+58h] [rbp-20h]
char v14; // [rsp+60h] [rbp-18h]
v2 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
2LL,
a1 + 168);
std::vector<bool>::push_back(a1 + 32, v2);
LOBYTE(v7[0]) = 2;
LOBYTE(v11) = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v7,
1LL);
v12 = v3;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back(a1 + 8);
if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) != 0LL
&& a2 != -1LL
&& nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size() < a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v9, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(
v7,
"excessive array size: ",
v9);
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
v6,
v7[0],
v7[2],
v7[4],
v8,
v9[0],
v9[2],
v9[4],
v10,
v11,
v12,
v13,
v14);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 1;
}
| start_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV R14,RDI
ADD RDI,0x80
LEA RBX,[R14 + 0x8]
MOV RSI,qword ptr [R14 + 0x10]
SUB RSI,qword ptr [R14 + 0x8]
SHR RSI,0x3
LEA RCX,[R14 + 0xa8]
PUSH 0x2
POP RDX
CALL 0x0011cbe0
LEA RDI,[R14 + 0x20]
MOVZX ESI,AL
CALL 0x0011d4d0
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x2
PUSH 0x1
POP RDX
MOV RDI,R14
CALL 0x0011c7c0
LEA RSI,[RSP + 0x50]
MOV byte ptr [RSI + -0x8],AL
MOV qword ptr [RSI],RDX
MOV RDI,RBX
CALL 0x0011d430
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
TEST RDI,RDI
SETZ AL
CMP R15,-0x1
SETZ CL
OR CL,AL
JNZ 0x0012657d
CALL 0x0011d560
CMP RAX,R15
JC 0x0012658a
LAB_0012657d:
MOV AL,0x1
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012658a:
PUSH 0x20
POP RDI
CALL 0x0011c790
MOV RBX,RAX
LAB_00126595:
LEA RDI,[RSP + 0x28]
MOV RSI,R15
CALL 0x0011c560
LAB_001265a2:
LEA RSI,[0x12e2b1]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0011d080
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
LAB_001265c3:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x198
CALL 0x0011cdd0
XOR EBP,EBP
MOV RSI,qword ptr [0x00138fb0]
MOV RDX,qword ptr [0x00138f50]
MOV RDI,RBX
CALL 0x0011dc20
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::start_array(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::start_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
int8 uVar3;
basic_json *extraout_RDX;
detail local_70 [32];
__cxx11 local_50 [32];
int1 local_30;
basic_json *local_28;
bVar1 = (bool)std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,
2,this + 0xa8);
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),bVar1);
local_70[0] = (detail)0x2;
local_30 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_70,true);
local_28 = extraout_RDX;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),&local_28);
if (param_1 != 0xffffffffffffffff &&
*(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8) !=
(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)0x0) {
uVar2 = basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_size(*(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8));
if (uVar2 < param_1) {
uVar3 = __cxa_allocate_exception(0x20);
/* try { // try from 00126595 to 001265a1 has its CatchHandler @ 00126613 */
std::__cxx11::to_string(local_50,param_1);
/* try { // try from 001265a2 to 001265b7 has its CatchHandler @ 001265fc */
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>
(local_70,"excessive array size: ",(string *)local_50);
/* try { // try from 001265c3 to 001265ec has its CatchHandler @ 001265ed */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x198,local_70,*(int8 *)(*(long *)(this + 0x10) + -8));
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,PTR_typeinfo_00138fb0,PTR__exception_00138f50);
}
}
return 1;
}
| |
22,720 | js_parse_regexp | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_regexp(JSParseState *s)
{
const uint8_t *p, *p_next;
BOOL in_class;
StringBuffer b_s, *b = &b_s;
StringBuffer b2_s, *b2 = &b2_s;
uint32_t c;
p = s->buf_ptr;
p++;
in_class = FALSE;
if (string_buffer_init(s->ctx, b, 32))
return -1;
if (string_buffer_init(s->ctx, b2, 1))
goto fail;
for(;;) {
if (p >= s->buf_end) {
eof_error:
js_parse_error(s, "unexpected end of regexp");
goto fail;
}
c = *p++;
if (c == '\n' || c == '\r') {
goto eol_error;
} else if (c == '/') {
if (!in_class)
break;
} else if (c == '[') {
in_class = TRUE;
} else if (c == ']') {
/* XXX: incorrect as the first character in a class */
in_class = FALSE;
} else if (c == '\\') {
if (string_buffer_putc8(b, c))
goto fail;
c = *p++;
if (c == '\n' || c == '\r')
goto eol_error;
else if (c == '\0' && p >= s->buf_end)
goto eof_error;
else if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
goto invalid_utf8;
}
p = p_next;
if (c == CP_LS || c == CP_PS)
goto eol_error;
}
} else if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
invalid_utf8:
js_parse_error(s, "invalid UTF-8 sequence");
goto fail;
}
p = p_next;
/* LS or PS are considered as line terminator */
if (c == CP_LS || c == CP_PS) {
eol_error:
js_parse_error(s, "unexpected line terminator in regexp");
goto fail;
}
}
if (string_buffer_putc(b, c))
goto fail;
}
/* flags */
for(;;) {
c = utf8_decode(p, &p_next);
/* no need to test for invalid UTF-8, 0xFFFD is not ident_next */
if (!lre_js_is_ident_next(c))
break;
if (string_buffer_putc(b2, c))
goto fail;
p = p_next;
}
s->token.val = TOK_REGEXP;
s->token.u.regexp.body = string_buffer_end(b);
s->token.u.regexp.flags = string_buffer_end(b2);
s->buf_ptr = p;
return 0;
fail:
string_buffer_free(b);
string_buffer_free(b2);
return -1;
} | O1 | c | js_parse_regexp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x70(%rbx), %r13
movq %rdi, 0x28(%rsp)
movsd 0x389ad(%rip), %xmm0 # 0x9d070
movups %xmm0, 0x38(%rsp)
movl $0x20, %esi
xorl %edx, %edx
callq 0x1ff5f
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x64948
movq (%rbx), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x389fe(%rip), %xmm0 # 0x9d0f0
movups %xmm0, 0x18(%rsp)
xorl %r12d, %r12d
movl $0x1, %esi
xorl %edx, %edx
callq 0x1ff5f
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x6495d
incq %r13
leaq 0x28(%rsp), %r15
cmpq 0x78(%rbx), %r13
jae 0x6483e
leaq 0x1(%r13), %r14
movzbl (%r13), %esi
movl $0x1, %ebp
cmpl $0x5a, %esi
jg 0x64751
cmpl $0x2f, %esi
jne 0x64770
movl $0x2f, %esi
testl %r12d, %r12d
jne 0x64826
jmp 0x64896
cmpl $0x5b, %esi
je 0x64826
cmpl $0x5c, %esi
je 0x647be
cmpl $0x5d, %esi
jne 0x64782
xorl %ebp, %ebp
movl $0x5d, %esi
jmp 0x64826
cmpl $0xa, %esi
je 0x64847
cmpl $0xd, %esi
je 0x64847
testb %sil, %sil
jns 0x64823
movq %r13, %rdi
movq %rsp, %rsi
callq 0x1ab15
movl %eax, %esi
movq (%rsp), %rax
cmpq %r14, %rax
je 0x6493c
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0x2028, %ecx # imm = 0x2028
je 0x64847
movl %r12d, %ebp
movq %rax, %r14
jmp 0x64826
movq %r15, %rdi
movl $0x5c, %esi
callq 0x4ac4d
testl %eax, %eax
jne 0x64858
movzbl 0x1(%r13), %esi
addq $0x2, %r13
testl %esi, %esi
je 0x647ec
cmpl $0xa, %esi
je 0x64847
cmpl $0xd, %esi
jne 0x647f2
jmp 0x64847
cmpq 0x78(%rbx), %r13
jae 0x6483e
testb %sil, %sil
js 0x647ff
movl %r12d, %ebp
movq %r13, %r14
jmp 0x64826
movq %r14, %rdi
movq %rsp, %rsi
callq 0x1ab15
movq (%rsp), %r14
cmpq %r13, %r14
je 0x6493c
movl %eax, %esi
andl $-0x2, %eax
cmpl $0x2028, %eax # imm = 0x2028
je 0x64847
movl %r12d, %ebp
movq %r15, %rdi
callq 0x327dc
movl %ebp, %r12d
movq %r14, %r13
testl %eax, %eax
je 0x6471c
jmp 0x64858
leaq 0x3ab67(%rip), %rsi # 0x9f3ac
jmp 0x6484e
leaq 0x3ab77(%rip), %rsi # 0x9f3c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2f0d5
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x1bf85
xorl %ebx, %ebx
movq %rbx, 0x30(%rsp)
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1bf85
movq %rbx, 0x10(%rsp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r15
leaq 0x3d400(%rip), %r13 # 0xa1ca0
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ab15
movl %eax, %ebp
cmpl $0x7f, %eax
ja 0x648cb
movl %ebp, %eax
shrl $0x5, %eax
movl (%r13,%rax,4), %ecx
xorl %eax, %eax
btl %ebp, %ecx
setb %al
jmp 0x648ea
movl %ebp, %edi
callq 0x97d4e
testl %eax, %eax
setne %al
movl %ebp, %ecx
andl $-0x2, %ecx
cmpl $0x200c, %ecx # imm = 0x200C
sete %cl
orb %al, %cl
movzbl %cl, %eax
testl %eax, %eax
je 0x64906
movq %r12, %rdi
movl %ebp, %esi
callq 0x327dc
testl %eax, %eax
jne 0x64858
movq (%rsp), %r14
jmp 0x648a5
movl $0xffffff84, 0x20(%rbx) # imm = 0xFFFFFF84
leaq 0x28(%rsp), %rdi
callq 0x32830
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x32830
movq %rax, 0x48(%rbx)
movq %rdx, 0x50(%rbx)
movq %r14, 0x70(%rbx)
xorl %eax, %eax
jmp 0x64887
leaq 0x3a7d5(%rip), %rsi # 0x9f118
jmp 0x6484e
movl $0x0, 0x3c(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x64882
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x64858
| js_parse_regexp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rdi, [rdi]
mov r13, [rbx+70h]
mov [rsp+78h+var_50], rdi
movsd xmm0, cs:qword_9D070
movups [rsp+78h+var_40], xmm0
mov esi, 20h ; ' '
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_48], rax
test rax, rax
jz loc_64948
mov rdi, [rbx]
mov [rsp+78h+var_70], rdi
movsd xmm0, cs:qword_9D0F0
movups [rsp+78h+var_60], xmm0
xor r12d, r12d
mov esi, 1
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_68], rax
test rax, rax
jz loc_6495D
inc r13
lea r15, [rsp+78h+var_50]
loc_6471C:
cmp r13, [rbx+78h]
jnb loc_6483E
lea r14, [r13+1]
movzx esi, byte ptr [r13+0]
mov ebp, 1
cmp esi, 5Ah ; 'Z'
jg short loc_64751
cmp esi, 2Fh ; '/'
jnz short loc_64770
mov esi, 2Fh ; '/'
test r12d, r12d
jnz loc_64826
jmp loc_64896
loc_64751:
cmp esi, 5Bh ; '['
jz loc_64826
cmp esi, 5Ch ; '\'
jz short loc_647BE
cmp esi, 5Dh ; ']'
jnz short loc_64782
xor ebp, ebp
mov esi, 5Dh ; ']'
jmp loc_64826
loc_64770:
cmp esi, 0Ah
jz loc_64847
cmp esi, 0Dh
jz loc_64847
loc_64782:
test sil, sil
jns loc_64823
mov rdi, r13
mov rsi, rsp
call utf8_decode
mov esi, eax
mov rax, [rsp+78h+var_78]
cmp rax, r14
jz loc_6493C
mov ecx, esi
and ecx, 0FFFFFFFEh
cmp ecx, 2028h
jz loc_64847
mov ebp, r12d
mov r14, rax
jmp short loc_64826
loc_647BE:
mov rdi, r15
mov esi, 5Ch ; '\'
call string_buffer_putc8
test eax, eax
jnz loc_64858
movzx esi, byte ptr [r13+1]
add r13, 2
test esi, esi
jz short loc_647EC
cmp esi, 0Ah
jz short loc_64847
cmp esi, 0Dh
jnz short loc_647F2
jmp short loc_64847
loc_647EC:
cmp r13, [rbx+78h]
jnb short loc_6483E
loc_647F2:
test sil, sil
js short loc_647FF
mov ebp, r12d
mov r14, r13
jmp short loc_64826
loc_647FF:
mov rdi, r14
mov rsi, rsp
call utf8_decode
mov r14, [rsp+78h+var_78]
cmp r14, r13
jz loc_6493C
mov esi, eax
and eax, 0FFFFFFFEh
cmp eax, 2028h
jz short loc_64847
loc_64823:
mov ebp, r12d
loc_64826:
mov rdi, r15
call string_buffer_putc
mov r12d, ebp
mov r13, r14
test eax, eax
jz loc_6471C
jmp short loc_64858
loc_6483E:
lea rsi, aUnexpectedEndO_3; "unexpected end of regexp"
jmp short loc_6484E
loc_64847:
lea rsi, aUnexpectedLine; "unexpected line terminator in regexp"
loc_6484E:
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_64858:
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call js_free
xor ebx, ebx
mov [rsp+78h+var_48], rbx
mov rdi, [rsp+78h+var_70]
mov rsi, [rsp+78h+var_68]
call js_free
mov [rsp+78h+var_68], rbx
loc_64882:
mov eax, 0FFFFFFFFh
loc_64887:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_64896:
mov r15, rsp
lea r13, lre_id_continue_table_ascii
lea r12, [rsp+78h+var_70]
loc_648A5:
mov rdi, r14
mov rsi, r15
call utf8_decode
mov ebp, eax
cmp eax, 7Fh
ja short loc_648CB
mov eax, ebp
shr eax, 5
mov ecx, [r13+rax*4+0]
xor eax, eax
bt ecx, ebp
setb al
jmp short loc_648EA
loc_648CB:
mov edi, ebp
call lre_is_id_continue
test eax, eax
setnz al
mov ecx, ebp
and ecx, 0FFFFFFFEh
cmp ecx, 200Ch
setz cl
or cl, al
movzx eax, cl
loc_648EA:
test eax, eax
jz short loc_64906
mov rdi, r12
mov esi, ebp
call string_buffer_putc
test eax, eax
jnz loc_64858
mov r14, [rsp+78h+var_78]
jmp short loc_648A5
loc_64906:
mov dword ptr [rbx+20h], 0FFFFFF84h
lea rdi, [rsp+78h+var_50]
call string_buffer_end
mov [rbx+38h], rax
mov [rbx+40h], rdx
lea rdi, [rsp+78h+var_70]
call string_buffer_end
mov [rbx+48h], rax
mov [rbx+50h], rdx
mov [rbx+70h], r14
xor eax, eax
jmp loc_64887
loc_6493C:
lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence"
jmp loc_6484E
loc_64948:
mov dword ptr [rsp+78h+var_40+4], 0
mov dword ptr [rsp+78h+var_40+0Ch], 0FFFFFFFFh
jmp loc_64882
loc_6495D:
mov dword ptr [rsp+78h+var_60+4], 0
mov dword ptr [rsp+78h+var_60+0Ch], 0FFFFFFFFh
jmp loc_64858
| long long js_parse_regexp(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // r13
int v10; // r12d
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
char *v17; // r13
char *v18; // r14
unsigned int v19; // esi
int v20; // ebp
char *v21; // r13
unsigned int v22; // eax
const char *v23; // rsi
unsigned int v25; // eax
unsigned int v26; // ebp
int v27; // ecx
int v28; // eax
long long v29; // rdx
long long v30; // rdx
char *v31; // [rsp+0h] [rbp-78h] BYREF
long long v32; // [rsp+8h] [rbp-70h] BYREF
long long v33; // [rsp+10h] [rbp-68h]
__int128 v34; // [rsp+18h] [rbp-60h]
long long v35; // [rsp+28h] [rbp-50h] BYREF
long long v36; // [rsp+30h] [rbp-48h]
__int128 v37; // [rsp+38h] [rbp-40h]
v9 = *(_QWORD *)(a1 + 112);
v35 = *(_QWORD *)a1;
v37 = 0x2000000000uLL;
v36 = js_alloc_string(v35, 32LL, 0);
if ( !v36 )
{
DWORD1(v37) = 0;
HIDWORD(v37) = -1;
return 0xFFFFFFFFLL;
}
v32 = *(_QWORD *)a1;
v34 = 0x100000000uLL;
v10 = 0;
v33 = js_alloc_string(v32, 1LL, 0);
if ( !v33 )
{
DWORD1(v34) = 0;
HIDWORD(v34) = -1;
LABEL_35:
js_free(v35, v36);
v36 = 0LL;
js_free(v32, v33);
v33 = 0LL;
return 0xFFFFFFFFLL;
}
v17 = (char *)(v9 + 1);
while ( 1 )
{
if ( (unsigned long long)v17 >= *(_QWORD *)(a1 + 120) )
{
LABEL_32:
v23 = "unexpected end of regexp";
LABEL_34:
js_parse_error(
(long long *)a1,
(long long)v23,
v11,
v12,
v13,
v14,
(__m128)0x100000000uLL,
a3,
a4,
a5,
v15,
v16,
a8,
a9,
(char)v31);
goto LABEL_35;
}
v18 = v17 + 1;
v19 = (unsigned __int8)*v17;
v20 = 1;
if ( v19 <= 0x5A )
break;
if ( v19 == 91 )
goto LABEL_30;
if ( v19 != 92 )
{
if ( v19 == 93 )
{
v20 = 0;
v19 = 93;
goto LABEL_30;
}
goto LABEL_15;
}
if ( (unsigned int)string_buffer_putc8(
(long long)&v35,
0x5Cu,
(__m128)0x100000000uLL,
a3,
a4,
a5,
v15,
v16,
a8,
a9,
v11,
v12,
v13,
v14) )
goto LABEL_35;
v19 = (unsigned __int8)v17[1];
v21 = v17 + 2;
if ( v19 )
{
if ( v19 == 10 || v19 == 13 )
goto LABEL_33;
}
else if ( (unsigned long long)v21 >= *(_QWORD *)(a1 + 120) )
{
goto LABEL_32;
}
if ( (v19 & 0x80u) != 0 )
{
v22 = utf8_decode(v18, &v31);
v18 = v31;
if ( v31 == v21 )
{
LABEL_44:
v23 = "invalid UTF-8 sequence";
goto LABEL_34;
}
v19 = v22;
if ( (v22 & 0xFFFFFFFE) == 0x2028 )
goto LABEL_33;
LABEL_29:
v20 = v10;
goto LABEL_30;
}
v20 = v10;
v18 = v21;
LABEL_30:
v10 = v20;
v17 = v18;
if ( (unsigned int)string_buffer_putc((long long)&v35, v19) )
goto LABEL_35;
}
if ( v19 != 47 )
{
if ( v19 == 10 || v19 == 13 )
goto LABEL_33;
LABEL_15:
if ( (v19 & 0x80u) == 0 )
goto LABEL_29;
v19 = utf8_decode(v17, &v31);
if ( v31 == v18 )
goto LABEL_44;
v12 = v19 & 0xFFFFFFFE;
if ( (_DWORD)v12 == 8232 )
{
LABEL_33:
v23 = "unexpected line terminator in regexp";
goto LABEL_34;
}
v20 = v10;
v18 = v31;
goto LABEL_30;
}
v19 = 47;
if ( v10 )
goto LABEL_30;
while ( 1 )
{
v25 = utf8_decode(v18, &v31);
v26 = v25;
if ( v25 > 0x7F )
{
v28 = (unsigned int)lre_is_id_continue(v25) != 0 || (v25 & 0xFFFFFFFE) == 8204;
}
else
{
v27 = lre_id_continue_table_ascii[v25 >> 5];
v28 = _bittest(&v27, v25);
}
if ( !v28 )
break;
if ( (unsigned int)string_buffer_putc((long long)&v32, v26) )
goto LABEL_35;
v18 = v31;
}
*(_DWORD *)(a1 + 32) = -124;
*(_QWORD *)(a1 + 56) = string_buffer_end((long long)&v35);
*(_QWORD *)(a1 + 64) = v29;
*(_QWORD *)(a1 + 72) = string_buffer_end((long long)&v32);
*(_QWORD *)(a1 + 80) = v30;
*(_QWORD *)(a1 + 112) = v18;
return 0LL;
}
| js_parse_regexp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV R13,qword ptr [RBX + 0x70]
MOV qword ptr [RSP + 0x28],RDI
MOVSD XMM0,qword ptr [0x0019d070]
MOVUPS xmmword ptr [RSP + 0x38],XMM0
MOV ESI,0x20
XOR EDX,EDX
CALL 0x0011ff5f
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x00164948
MOV RDI,qword ptr [RBX]
MOV qword ptr [RSP + 0x8],RDI
MOVSD XMM0,qword ptr [0x0019d0f0]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
XOR R12D,R12D
MOV ESI,0x1
XOR EDX,EDX
CALL 0x0011ff5f
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0016495d
INC R13
LEA R15,[RSP + 0x28]
LAB_0016471c:
CMP R13,qword ptr [RBX + 0x78]
JNC 0x0016483e
LEA R14,[R13 + 0x1]
MOVZX ESI,byte ptr [R13]
MOV EBP,0x1
CMP ESI,0x5a
JG 0x00164751
CMP ESI,0x2f
JNZ 0x00164770
MOV ESI,0x2f
TEST R12D,R12D
JNZ 0x00164826
JMP 0x00164896
LAB_00164751:
CMP ESI,0x5b
JZ 0x00164826
CMP ESI,0x5c
JZ 0x001647be
CMP ESI,0x5d
JNZ 0x00164782
XOR EBP,EBP
MOV ESI,0x5d
JMP 0x00164826
LAB_00164770:
CMP ESI,0xa
JZ 0x00164847
CMP ESI,0xd
JZ 0x00164847
LAB_00164782:
TEST SIL,SIL
JNS 0x00164823
MOV RDI,R13
MOV RSI,RSP
CALL 0x0011ab15
MOV ESI,EAX
MOV RAX,qword ptr [RSP]
CMP RAX,R14
JZ 0x0016493c
MOV ECX,ESI
AND ECX,0xfffffffe
CMP ECX,0x2028
JZ 0x00164847
MOV EBP,R12D
MOV R14,RAX
JMP 0x00164826
LAB_001647be:
MOV RDI,R15
MOV ESI,0x5c
CALL 0x0014ac4d
TEST EAX,EAX
JNZ 0x00164858
MOVZX ESI,byte ptr [R13 + 0x1]
ADD R13,0x2
TEST ESI,ESI
JZ 0x001647ec
CMP ESI,0xa
JZ 0x00164847
CMP ESI,0xd
JNZ 0x001647f2
JMP 0x00164847
LAB_001647ec:
CMP R13,qword ptr [RBX + 0x78]
JNC 0x0016483e
LAB_001647f2:
TEST SIL,SIL
JS 0x001647ff
MOV EBP,R12D
MOV R14,R13
JMP 0x00164826
LAB_001647ff:
MOV RDI,R14
MOV RSI,RSP
CALL 0x0011ab15
MOV R14,qword ptr [RSP]
CMP R14,R13
JZ 0x0016493c
MOV ESI,EAX
AND EAX,0xfffffffe
CMP EAX,0x2028
JZ 0x00164847
LAB_00164823:
MOV EBP,R12D
LAB_00164826:
MOV RDI,R15
CALL 0x001327dc
MOV R12D,EBP
MOV R13,R14
TEST EAX,EAX
JZ 0x0016471c
JMP 0x00164858
LAB_0016483e:
LEA RSI,[0x19f3ac]
JMP 0x0016484e
LAB_00164847:
LEA RSI,[0x19f3c5]
LAB_0016484e:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012f0d5
LAB_00164858:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0011bf85
XOR EBX,EBX
MOV qword ptr [RSP + 0x30],RBX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011bf85
MOV qword ptr [RSP + 0x10],RBX
LAB_00164882:
MOV EAX,0xffffffff
LAB_00164887:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00164896:
MOV R15,RSP
LEA R13,[0x1a1ca0]
LEA R12,[RSP + 0x8]
LAB_001648a5:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011ab15
MOV EBP,EAX
CMP EAX,0x7f
JA 0x001648cb
MOV EAX,EBP
SHR EAX,0x5
MOV ECX,dword ptr [R13 + RAX*0x4]
XOR EAX,EAX
BT ECX,EBP
SETC AL
JMP 0x001648ea
LAB_001648cb:
MOV EDI,EBP
CALL 0x00197d4e
TEST EAX,EAX
SETNZ AL
MOV ECX,EBP
AND ECX,0xfffffffe
CMP ECX,0x200c
SETZ CL
OR CL,AL
MOVZX EAX,CL
LAB_001648ea:
TEST EAX,EAX
JZ 0x00164906
MOV RDI,R12
MOV ESI,EBP
CALL 0x001327dc
TEST EAX,EAX
JNZ 0x00164858
MOV R14,qword ptr [RSP]
JMP 0x001648a5
LAB_00164906:
MOV dword ptr [RBX + 0x20],0xffffff84
LEA RDI,[RSP + 0x28]
CALL 0x00132830
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
LEA RDI,[RSP + 0x8]
CALL 0x00132830
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RDX
MOV qword ptr [RBX + 0x70],R14
XOR EAX,EAX
JMP 0x00164887
LAB_0016493c:
LEA RSI,[0x19f118]
JMP 0x0016484e
LAB_00164948:
MOV dword ptr [RSP + 0x3c],0x0
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00164882
LAB_0016495d:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00164858
|
int8 js_parse_regexp(int8 *param_1)
{
byte bVar1;
long lVar2;
bool bVar3;
uint uVar4;
int iVar5;
char *pcVar6;
byte *pbVar7;
byte *pbVar8;
byte *pbVar9;
bool bVar10;
int1 auVar11 [16];
byte *local_78;
int8 local_70;
long local_68;
ulong local_60;
int8 uStack_58;
int8 local_50;
long local_48;
int8 local_40;
int8 uStack_38;
local_50 = *param_1;
lVar2 = param_1[0xe];
local_40 = DAT_0019d070;
uStack_38 = 0;
local_48 = js_alloc_string(local_50,0x20,0);
if (local_48 != 0) {
local_70 = *param_1;
local_60 = DAT_0019d0f0;
uStack_58 = 0;
bVar10 = false;
local_68 = js_alloc_string(local_70,1,0);
if (local_68 == 0) {
local_60 = local_60 & 0xffffffff;
uStack_58 = CONCAT44(0xffffffff,(int4)uStack_58);
}
else {
pbVar7 = (byte *)(lVar2 + 1);
do {
if ((byte *)param_1[0xf] <= pbVar7) {
LAB_0016483e:
pcVar6 = "unexpected end of regexp";
LAB_0016484e:
js_parse_error(param_1,pcVar6);
break;
}
pbVar9 = pbVar7 + 1;
bVar1 = *pbVar7;
uVar4 = (uint)bVar1;
pbVar8 = pbVar9;
bVar3 = true;
if (bVar1 < 0x5b) {
if (bVar1 != 0x2f) {
if ((bVar1 == 10) || (bVar1 == 0xd)) {
LAB_00164847:
pcVar6 = "unexpected line terminator in regexp";
}
else {
LAB_00164782:
bVar3 = bVar10;
if (-1 < (char)bVar1) goto LAB_00164826;
uVar4 = utf8_decode(pbVar7,&local_78);
if (local_78 != pbVar9) goto joined_r0x00164821;
LAB_0016493c:
pcVar6 = "invalid UTF-8 sequence";
}
goto LAB_0016484e;
}
uVar4 = 0x2f;
if (bVar10) goto LAB_00164826;
do {
uVar4 = utf8_decode(pbVar9,&local_78);
if (uVar4 < 0x80) {
bVar10 = (*(uint *)(lre_id_continue_table_ascii + (ulong)(uVar4 >> 5) * 4) >>
(uVar4 & 0x1f) & 1) != 0;
}
else {
iVar5 = lre_is_id_continue(uVar4);
bVar10 = (uVar4 & 0xfffffffe) == 0x200c || iVar5 != 0;
}
if (!bVar10) {
*(int4 *)(param_1 + 4) = 0xffffff84;
auVar11 = string_buffer_end(&local_50);
*(int1 (*) [16])(param_1 + 7) = auVar11;
auVar11 = string_buffer_end(&local_70);
*(int1 (*) [16])(param_1 + 9) = auVar11;
param_1[0xe] = pbVar9;
return 0;
}
iVar5 = string_buffer_putc(&local_70,uVar4);
pbVar9 = local_78;
} while (iVar5 == 0);
break;
}
if (bVar1 == 0x5b) goto LAB_00164826;
if (bVar1 == 0x5c) {
iVar5 = string_buffer_putc8(&local_50,0x5c);
if (iVar5 != 0) break;
bVar1 = pbVar7[1];
uVar4 = (uint)bVar1;
pbVar8 = pbVar7 + 2;
if (bVar1 == 0) {
if ((byte *)param_1[0xf] <= pbVar8) goto LAB_0016483e;
}
else if ((bVar1 == 10) || (bVar1 == 0xd)) goto LAB_00164847;
bVar3 = bVar10;
if ((char)bVar1 < '\0') {
uVar4 = utf8_decode(pbVar9,&local_78);
if (local_78 == pbVar8) goto LAB_0016493c;
joined_r0x00164821:
pbVar8 = local_78;
bVar3 = bVar10;
if ((uVar4 & 0xfffffffe) == 0x2028) goto LAB_00164847;
}
}
else {
if (bVar1 != 0x5d) goto LAB_00164782;
uVar4 = 0x5d;
bVar3 = false;
}
LAB_00164826:
bVar10 = bVar3;
pbVar7 = pbVar8;
iVar5 = string_buffer_putc(&local_50,uVar4);
} while (iVar5 == 0);
}
js_free(local_50,local_48);
local_48 = 0;
js_free(local_70,local_68);
}
return 0xffffffff;
}
| |
22,721 | js_parse_regexp | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_regexp(JSParseState *s)
{
const uint8_t *p, *p_next;
BOOL in_class;
StringBuffer b_s, *b = &b_s;
StringBuffer b2_s, *b2 = &b2_s;
uint32_t c;
p = s->buf_ptr;
p++;
in_class = FALSE;
if (string_buffer_init(s->ctx, b, 32))
return -1;
if (string_buffer_init(s->ctx, b2, 1))
goto fail;
for(;;) {
if (p >= s->buf_end) {
eof_error:
js_parse_error(s, "unexpected end of regexp");
goto fail;
}
c = *p++;
if (c == '\n' || c == '\r') {
goto eol_error;
} else if (c == '/') {
if (!in_class)
break;
} else if (c == '[') {
in_class = TRUE;
} else if (c == ']') {
/* XXX: incorrect as the first character in a class */
in_class = FALSE;
} else if (c == '\\') {
if (string_buffer_putc8(b, c))
goto fail;
c = *p++;
if (c == '\n' || c == '\r')
goto eol_error;
else if (c == '\0' && p >= s->buf_end)
goto eof_error;
else if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
goto invalid_utf8;
}
p = p_next;
if (c == CP_LS || c == CP_PS)
goto eol_error;
}
} else if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
invalid_utf8:
js_parse_error(s, "invalid UTF-8 sequence");
goto fail;
}
p = p_next;
/* LS or PS are considered as line terminator */
if (c == CP_LS || c == CP_PS) {
eol_error:
js_parse_error(s, "unexpected line terminator in regexp");
goto fail;
}
}
if (string_buffer_putc(b, c))
goto fail;
}
/* flags */
for(;;) {
c = utf8_decode(p, &p_next);
/* no need to test for invalid UTF-8, 0xFFFD is not ident_next */
if (!lre_js_is_ident_next(c))
break;
if (string_buffer_putc(b2, c))
goto fail;
p = p_next;
}
s->token.val = TOK_REGEXP;
s->token.u.regexp.body = string_buffer_end(b);
s->token.u.regexp.flags = string_buffer_end(b2);
s->buf_ptr = p;
return 0;
fail:
string_buffer_free(b);
string_buffer_free(b2);
return -1;
} | O3 | c | js_parse_regexp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x70(%rbx), %r12
movq %rdi, 0x28(%rsp)
movsd 0x8e0f6(%rip), %xmm0 # 0xa0010
movups %xmm0, 0x38(%rsp)
pushq $0x20
popq %rsi
xorl %edx, %edx
callq 0x20686
movq %rax, 0x30(%rsp)
pushq $-0x1
popq %rcx
testq %rax, %rax
je 0x120b5
movq (%rbx), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x8e176(%rip), %xmm0 # 0xa00c0
movups %xmm0, 0x18(%rsp)
pushq $0x1
popq %r14
xorl %r15d, %r15d
movl %r14d, %esi
xorl %edx, %edx
callq 0x20686
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x12094
incq %r12
leaq 0x28(%rsp), %r13
cmpq 0x78(%rbx), %r12
jae 0x1207a
leaq 0x1(%r12), %rbp
movzbl (%r12), %esi
cmpl $0x2f, %esi
je 0x1204a
cmpl $0x5b, %esi
je 0x12052
cmpl $0x5c, %esi
je 0x11fee
cmpl $0x5d, %esi
je 0x12057
cmpl $0xa, %esi
je 0x12083
cmpl $0xd, %esi
je 0x12083
testb %sil, %sil
jns 0x1205d
movq %r12, %rdi
movq %rsp, %rsi
callq 0x1b41e
movq (%rsp), %r12
cmpq %rbp, %r12
je 0x1213c
movl %eax, %esi
andl $-0x2, %eax
cmpl $0x2028, %eax # imm = 0x2028
jne 0x12060
jmp 0x12083
movq %r13, %rdi
pushq $0x5c
popq %rsi
callq 0x4cb90
testl %eax, %eax
jne 0x12094
movzbl 0x1(%r12), %esi
addq $0x2, %r12
testl %esi, %esi
je 0x12072
cmpl $0xa, %esi
je 0x12083
cmpl $0xd, %esi
je 0x12083
testb %sil, %sil
jns 0x12060
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x1b41e
movl %eax, %esi
movq (%rsp), %rax
cmpq %r12, %rax
je 0x1213c
movl %esi, %ecx
andl $-0x2, %ecx
cmpl $0x2028, %ecx # imm = 0x2028
je 0x12083
movq %rax, %r12
jmp 0x12060
testl %r15d, %r15d
je 0x120c6
pushq $0x2f
popq %rsi
movl %r14d, %r15d
jmp 0x1205d
xorl %r15d, %r15d
pushq $0x5d
popq %rsi
movq %rbp, %r12
movq %r13, %rdi
callq 0x33621
testl %eax, %eax
je 0x11f76
jmp 0x12094
xorl %esi, %esi
cmpq 0x78(%rbx), %r12
jb 0x12060
leaq 0x902e5(%rip), %rsi # 0xa2366
jmp 0x1208a
leaq 0x902f5(%rip), %rsi # 0xa237f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2fed1
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x1c845
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1c845
pushq $-0x1
popq %rcx
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r14
leaq 0x92b80(%rip), %r13 # 0xa4c50
leaq 0x8(%rsp), %r15
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1b41e
movl %eax, %r12d
cmpl $0x7f, %eax
ja 0x120fe
movl %r12d, %eax
shrl $0x5, %eax
movl (%r13,%rax,4), %ecx
xorl %eax, %eax
btl %r12d, %ecx
setb %al
jmp 0x1211f
movl %r12d, %edi
callq 0x9a63c
testl %eax, %eax
setne %al
movl %r12d, %ecx
andl $-0x2, %ecx
cmpl $0x200c, %ecx # imm = 0x200C
sete %cl
orb %al, %cl
movzbl %cl, %eax
testl %eax, %eax
je 0x12148
movq %r15, %rdi
movl %r12d, %esi
callq 0x33621
testl %eax, %eax
jne 0x12094
movq (%rsp), %rbp
jmp 0x120d5
leaq 0x8ff8f(%rip), %rsi # 0xa20d2
jmp 0x1208a
movl $0xffffff84, 0x20(%rbx) # imm = 0xFFFFFF84
leaq 0x28(%rsp), %rdi
callq 0x33675
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x33675
movq %rax, 0x48(%rbx)
movq %rdx, 0x50(%rbx)
movq %rbp, 0x70(%rbx)
xorl %ecx, %ecx
jmp 0x120b5
| js_parse_regexp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rdi, [rdi]
mov r12, [rbx+70h]
mov [rsp+78h+var_50], rdi
movsd xmm0, cs:qword_A0010
movups [rsp+78h+var_40], xmm0
push 20h ; ' '
pop rsi
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_48], rax
push 0FFFFFFFFFFFFFFFFh
pop rcx
test rax, rax
jz loc_120B5
mov rdi, [rbx]
mov [rsp+78h+var_70], rdi
movsd xmm0, cs:qword_A00C0
movups [rsp+78h+var_60], xmm0
push 1
pop r14
xor r15d, r15d
mov esi, r14d
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_68], rax
test rax, rax
jz loc_12094
inc r12
lea r13, [rsp+78h+var_50]
loc_11F76:
cmp r12, [rbx+78h]
jnb loc_1207A
lea rbp, [r12+1]
movzx esi, byte ptr [r12]
cmp esi, 2Fh ; '/'
jz loc_1204A
cmp esi, 5Bh ; '['
jz loc_12052
cmp esi, 5Ch ; '\'
jz short loc_11FEE
cmp esi, 5Dh ; ']'
jz loc_12057
cmp esi, 0Ah
jz loc_12083
cmp esi, 0Dh
jz loc_12083
test sil, sil
jns loc_1205D
mov rdi, r12
mov rsi, rsp
call utf8_decode
mov r12, [rsp+78h+var_78]
cmp r12, rbp
jz loc_1213C
mov esi, eax
and eax, 0FFFFFFFEh
cmp eax, 2028h
jnz short loc_12060
jmp loc_12083
loc_11FEE:
mov rdi, r13
push 5Ch ; '\'
pop rsi
call string_buffer_putc8
test eax, eax
jnz loc_12094
movzx esi, byte ptr [r12+1]
add r12, 2
test esi, esi
jz short loc_12072
cmp esi, 0Ah
jz short loc_12083
cmp esi, 0Dh
jz short loc_12083
test sil, sil
jns short loc_12060
mov rdi, rbp
mov rsi, rsp
call utf8_decode
mov esi, eax
mov rax, [rsp+78h+var_78]
cmp rax, r12
jz loc_1213C
mov ecx, esi
and ecx, 0FFFFFFFEh
cmp ecx, 2028h
jz short loc_12083
mov r12, rax
jmp short loc_12060
loc_1204A:
test r15d, r15d
jz short loc_120C6
push 2Fh ; '/'
pop rsi
loc_12052:
mov r15d, r14d
jmp short loc_1205D
loc_12057:
xor r15d, r15d
push 5Dh ; ']'
pop rsi
loc_1205D:
mov r12, rbp
loc_12060:
mov rdi, r13
call string_buffer_putc
test eax, eax
jz loc_11F76
jmp short loc_12094
loc_12072:
xor esi, esi
cmp r12, [rbx+78h]
jb short loc_12060
loc_1207A:
lea rsi, aUnexpectedEndO; "unexpected end of regexp"
jmp short loc_1208A
loc_12083:
lea rsi, aUnexpectedLine; "unexpected line terminator in regexp"
loc_1208A:
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_12094:
mov rdi, [rsp+78h+var_50]
mov rsi, [rsp+78h+var_48]
call js_free
mov rdi, [rsp+78h+var_70]
mov rsi, [rsp+78h+var_68]
call js_free
push 0FFFFFFFFFFFFFFFFh
pop rcx
loc_120B5:
mov eax, ecx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_120C6:
mov r14, rsp
lea r13, lre_id_continue_table_ascii
lea r15, [rsp+78h+var_70]
loc_120D5:
mov rdi, rbp
mov rsi, r14
call utf8_decode
mov r12d, eax
cmp eax, 7Fh
ja short loc_120FE
mov eax, r12d
shr eax, 5
mov ecx, [r13+rax*4+0]
xor eax, eax
bt ecx, r12d
setb al
jmp short loc_1211F
loc_120FE:
mov edi, r12d
call lre_is_id_continue
test eax, eax
setnz al
mov ecx, r12d
and ecx, 0FFFFFFFEh
cmp ecx, 200Ch
setz cl
or cl, al
movzx eax, cl
loc_1211F:
test eax, eax
jz short loc_12148
mov rdi, r15
mov esi, r12d
call string_buffer_putc
test eax, eax
jnz loc_12094
mov rbp, [rsp+78h+var_78]
jmp short loc_120D5
loc_1213C:
lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence"
jmp loc_1208A
loc_12148:
mov dword ptr [rbx+20h], 0FFFFFF84h
lea rdi, [rsp+78h+var_50]
call string_buffer_end
mov [rbx+38h], rax
mov [rbx+40h], rdx
lea rdi, [rsp+78h+var_70]
call string_buffer_end
mov [rbx+48h], rax
mov [rbx+50h], rdx
mov [rbx+70h], rbp
xor ecx, ecx
jmp loc_120B5
| long long js_parse_regexp(long long *a1)
{
long long v1; // r12
unsigned int v2; // ecx
int v3; // r15d
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
unsigned __int8 *v8; // r12
unsigned __int8 *v9; // rbp
long long v10; // rsi
unsigned int v11; // eax
const char *v12; // rsi
unsigned int v14; // eax
unsigned int v15; // r12d
int v16; // ecx
int v17; // eax
long long v18; // rdx
long long v19; // rdx
unsigned __int8 *v20; // [rsp+0h] [rbp-78h] BYREF
long long v21; // [rsp+8h] [rbp-70h] BYREF
long long v22; // [rsp+10h] [rbp-68h]
__int128 v23; // [rsp+18h] [rbp-60h]
long long v24; // [rsp+28h] [rbp-50h] BYREF
long long v25; // [rsp+30h] [rbp-48h]
__int128 v26; // [rsp+38h] [rbp-40h]
v1 = a1[14];
v24 = *a1;
v26 = 0x2000000000uLL;
v25 = js_alloc_string(v24);
v2 = -1;
if ( !v25 )
return v2;
v21 = *a1;
v23 = 0x100000000uLL;
v3 = 0;
v22 = js_alloc_string(v21);
if ( !v22 )
{
LABEL_34:
js_free(v24, v25);
js_free(v21, v22);
return (unsigned int)-1;
}
v8 = (unsigned __int8 *)(v1 + 1);
while ( 1 )
{
if ( (unsigned long long)v8 >= a1[15] )
{
LABEL_31:
v12 = "unexpected end of regexp";
LABEL_33:
js_parse_error((_DWORD)a1, (_DWORD)v12, v4, v5, v6, v7, (char)v20);
goto LABEL_34;
}
v9 = v8 + 1;
v10 = *v8;
if ( (_DWORD)v10 == 47 )
break;
switch ( (_DWORD)v10 )
{
case 0x5B:
goto LABEL_25;
case 0x5C:
if ( (unsigned int)string_buffer_putc8(&v24, 92LL) )
goto LABEL_34;
v10 = v8[1];
v8 += 2;
if ( (_DWORD)v10 )
{
if ( (_DWORD)v10 == 10 || (_DWORD)v10 == 13 )
goto LABEL_32;
if ( (v10 & 0x80u) != 0LL )
{
v10 = (unsigned int)utf8_decode(v9, &v20);
if ( v20 == v8 )
{
LABEL_42:
v12 = "invalid UTF-8 sequence";
goto LABEL_33;
}
v5 = v10 & 0xFFFFFFFE;
if ( (v10 & 0xFFFFFFFE) == 0x2028 )
goto LABEL_32;
v8 = v20;
}
}
else
{
v10 = 0LL;
if ( (unsigned long long)v8 >= a1[15] )
goto LABEL_31;
}
break;
case 0x5D:
v3 = 0;
v10 = 93LL;
goto LABEL_27;
case 0xA:
case 0xD:
goto LABEL_32;
default:
if ( (v10 & 0x80u) == 0LL )
goto LABEL_27;
v11 = utf8_decode(v8, &v20);
v8 = v20;
if ( v20 == v9 )
goto LABEL_42;
v10 = v11;
if ( (v11 & 0xFFFFFFFE) == 0x2028 )
{
LABEL_32:
v12 = "unexpected line terminator in regexp";
goto LABEL_33;
}
break;
}
LABEL_28:
if ( (unsigned int)string_buffer_putc(&v24, v10) )
goto LABEL_34;
}
if ( v3 )
{
v10 = 47LL;
LABEL_25:
v3 = 1;
LABEL_27:
++v8;
goto LABEL_28;
}
while ( 1 )
{
v14 = utf8_decode(v9, &v20);
v15 = v14;
if ( v14 > 0x7F )
{
v17 = (unsigned int)lre_is_id_continue(v14) != 0 || (v14 & 0xFFFFFFFE) == 8204;
}
else
{
v16 = lre_id_continue_table_ascii[v14 >> 5];
v17 = _bittest(&v16, v14);
}
if ( !v17 )
break;
if ( (unsigned int)string_buffer_putc(&v21, v15) )
goto LABEL_34;
v9 = v20;
}
*((_DWORD *)a1 + 8) = -124;
a1[7] = string_buffer_end(&v24);
a1[8] = v18;
a1[9] = string_buffer_end(&v21);
a1[10] = v19;
a1[14] = (long long)v9;
return 0;
}
| js_parse_regexp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV R12,qword ptr [RBX + 0x70]
MOV qword ptr [RSP + 0x28],RDI
MOVSD XMM0,qword ptr [0x001a0010]
MOVUPS xmmword ptr [RSP + 0x38],XMM0
PUSH 0x20
POP RSI
XOR EDX,EDX
CALL 0x00120686
MOV qword ptr [RSP + 0x30],RAX
PUSH -0x1
POP RCX
TEST RAX,RAX
JZ 0x001120b5
MOV RDI,qword ptr [RBX]
MOV qword ptr [RSP + 0x8],RDI
MOVSD XMM0,qword ptr [0x001a00c0]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
PUSH 0x1
POP R14
XOR R15D,R15D
MOV ESI,R14D
XOR EDX,EDX
CALL 0x00120686
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x00112094
INC R12
LEA R13,[RSP + 0x28]
LAB_00111f76:
CMP R12,qword ptr [RBX + 0x78]
JNC 0x0011207a
LEA RBP,[R12 + 0x1]
MOVZX ESI,byte ptr [R12]
CMP ESI,0x2f
JZ 0x0011204a
CMP ESI,0x5b
JZ 0x00112052
CMP ESI,0x5c
JZ 0x00111fee
CMP ESI,0x5d
JZ 0x00112057
CMP ESI,0xa
JZ 0x00112083
CMP ESI,0xd
JZ 0x00112083
TEST SIL,SIL
JNS 0x0011205d
MOV RDI,R12
MOV RSI,RSP
CALL 0x0011b41e
MOV R12,qword ptr [RSP]
CMP R12,RBP
JZ 0x0011213c
MOV ESI,EAX
AND EAX,0xfffffffe
CMP EAX,0x2028
JNZ 0x00112060
JMP 0x00112083
LAB_00111fee:
MOV RDI,R13
PUSH 0x5c
POP RSI
CALL 0x0014cb90
TEST EAX,EAX
JNZ 0x00112094
MOVZX ESI,byte ptr [R12 + 0x1]
ADD R12,0x2
TEST ESI,ESI
JZ 0x00112072
CMP ESI,0xa
JZ 0x00112083
CMP ESI,0xd
JZ 0x00112083
TEST SIL,SIL
JNS 0x00112060
MOV RDI,RBP
MOV RSI,RSP
CALL 0x0011b41e
MOV ESI,EAX
MOV RAX,qword ptr [RSP]
CMP RAX,R12
JZ 0x0011213c
MOV ECX,ESI
AND ECX,0xfffffffe
CMP ECX,0x2028
JZ 0x00112083
MOV R12,RAX
JMP 0x00112060
LAB_0011204a:
TEST R15D,R15D
JZ 0x001120c6
PUSH 0x2f
POP RSI
LAB_00112052:
MOV R15D,R14D
JMP 0x0011205d
LAB_00112057:
XOR R15D,R15D
PUSH 0x5d
POP RSI
LAB_0011205d:
MOV R12,RBP
LAB_00112060:
MOV RDI,R13
CALL 0x00133621
TEST EAX,EAX
JZ 0x00111f76
JMP 0x00112094
LAB_00112072:
XOR ESI,ESI
CMP R12,qword ptr [RBX + 0x78]
JC 0x00112060
LAB_0011207a:
LEA RSI,[0x1a2366]
JMP 0x0011208a
LAB_00112083:
LEA RSI,[0x1a237f]
LAB_0011208a:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012fed1
LAB_00112094:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0011c845
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011c845
PUSH -0x1
POP RCX
LAB_001120b5:
MOV EAX,ECX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001120c6:
MOV R14,RSP
LEA R13,[0x1a4c50]
LEA R15,[RSP + 0x8]
LAB_001120d5:
MOV RDI,RBP
MOV RSI,R14
CALL 0x0011b41e
MOV R12D,EAX
CMP EAX,0x7f
JA 0x001120fe
MOV EAX,R12D
SHR EAX,0x5
MOV ECX,dword ptr [R13 + RAX*0x4]
XOR EAX,EAX
BT ECX,R12D
SETC AL
JMP 0x0011211f
LAB_001120fe:
MOV EDI,R12D
CALL 0x0019a63c
TEST EAX,EAX
SETNZ AL
MOV ECX,R12D
AND ECX,0xfffffffe
CMP ECX,0x200c
SETZ CL
OR CL,AL
MOVZX EAX,CL
LAB_0011211f:
TEST EAX,EAX
JZ 0x00112148
MOV RDI,R15
MOV ESI,R12D
CALL 0x00133621
TEST EAX,EAX
JNZ 0x00112094
MOV RBP,qword ptr [RSP]
JMP 0x001120d5
LAB_0011213c:
LEA RSI,[0x1a20d2]
JMP 0x0011208a
LAB_00112148:
MOV dword ptr [RBX + 0x20],0xffffff84
LEA RDI,[RSP + 0x28]
CALL 0x00133675
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
LEA RDI,[RSP + 0x8]
CALL 0x00133675
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RDX
MOV qword ptr [RBX + 0x70],RBP
XOR ECX,ECX
JMP 0x001120b5
|
int4 js_parse_regexp(int8 *param_1)
{
byte bVar1;
long lVar2;
bool bVar3;
uint uVar4;
int iVar5;
byte *pbVar6;
char *pcVar7;
byte *pbVar8;
byte *pbVar9;
bool bVar10;
int1 auVar11 [16];
byte *local_78;
int8 local_70;
long local_68;
int8 local_60;
int8 uStack_58;
int8 local_50;
long local_48;
int8 local_40;
int8 uStack_38;
local_50 = *param_1;
lVar2 = param_1[0xe];
local_40 = DAT_001a0010;
uStack_38 = 0;
local_48 = js_alloc_string(local_50,0x20,0);
if (local_48 == 0) {
return 0xffffffff;
}
local_70 = *param_1;
local_60 = DAT_001a00c0;
uStack_58 = 0;
bVar10 = false;
local_68 = js_alloc_string(local_70,1,0);
if (local_68 != 0) {
pbVar8 = (byte *)(lVar2 + 1);
do {
if ((byte *)param_1[0xf] <= pbVar8) {
LAB_0011207a:
pcVar7 = "unexpected end of regexp";
LAB_0011208a:
js_parse_error(param_1,pcVar7);
break;
}
pbVar6 = pbVar8 + 1;
bVar1 = *pbVar8;
uVar4 = (uint)bVar1;
pbVar9 = pbVar6;
bVar3 = true;
if (bVar1 == 0x2f) {
if (!bVar10) {
do {
uVar4 = utf8_decode(pbVar6,&local_78);
if (uVar4 < 0x80) {
bVar10 = (*(uint *)(lre_id_continue_table_ascii + (ulong)(uVar4 >> 5) * 4) >>
(uVar4 & 0x1f) & 1) != 0;
}
else {
iVar5 = lre_is_id_continue(uVar4);
bVar10 = (uVar4 & 0xfffffffe) == 0x200c || iVar5 != 0;
}
if (!bVar10) {
*(int4 *)(param_1 + 4) = 0xffffff84;
auVar11 = string_buffer_end(&local_50);
*(int1 (*) [16])(param_1 + 7) = auVar11;
auVar11 = string_buffer_end(&local_70);
*(int1 (*) [16])(param_1 + 9) = auVar11;
param_1[0xe] = pbVar6;
return 0;
}
iVar5 = string_buffer_putc(&local_70,uVar4);
pbVar6 = local_78;
} while (iVar5 == 0);
break;
}
uVar4 = 0x2f;
}
else if (bVar1 != 0x5b) {
bVar3 = bVar10;
if (bVar1 == 0x5c) {
iVar5 = string_buffer_putc8(&local_50,0x5c);
if (iVar5 != 0) break;
bVar1 = pbVar8[1];
uVar4 = (uint)bVar1;
pbVar9 = pbVar8 + 2;
if (bVar1 == 0) {
uVar4 = 0;
if ((byte *)param_1[0xf] <= pbVar9) goto LAB_0011207a;
}
else {
if ((bVar1 == 10) || (bVar1 == 0xd)) goto LAB_00112083;
if ((char)bVar1 < '\0') {
uVar4 = utf8_decode(pbVar6,&local_78);
if (local_78 != pbVar9) goto joined_r0x00111fe7;
LAB_0011213c:
pcVar7 = "invalid UTF-8 sequence";
goto LAB_0011208a;
}
}
}
else if (bVar1 == 0x5d) {
uVar4 = 0x5d;
bVar3 = false;
}
else {
if ((bVar1 == 10) || (bVar1 == 0xd)) {
LAB_00112083:
pcVar7 = "unexpected line terminator in regexp";
goto LAB_0011208a;
}
if ((char)bVar1 < '\0') {
uVar4 = utf8_decode(pbVar8,&local_78);
if (local_78 == pbVar6) goto LAB_0011213c;
joined_r0x00111fe7:
pbVar9 = local_78;
if ((uVar4 & 0xfffffffe) == 0x2028) goto LAB_00112083;
}
}
}
bVar10 = bVar3;
iVar5 = string_buffer_putc(&local_50,uVar4);
pbVar8 = pbVar9;
} while (iVar5 == 0);
}
js_free(local_50,local_48);
js_free(local_70,local_68);
return 0xffffffff;
}
| |
22,722 | mysql_set_server_option_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_set_server_option_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_set_server_option,
(parms->mysql, parms->option),
parms->mysql,
int,
r_int)
} | O0 | c | mysql_set_server_option_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x242d0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_set_server_option_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov esi, [rax+8]
call mysql_set_server_option
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_set_server_option_start_internal(long long a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
v2[2] = mysql_set_server_option(*(_QWORD *)a1, *(_DWORD *)(a1 + 8));
result = v2;
*v2 = 0;
return result;
}
| mysql_set_server_option_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x8]
CALL 0x001242d0
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_set_server_option_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_set_server_option(*param_1,(int)param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
22,723 | minja::Value::operator-() const | monkey531[P]llama/common/minja.hpp | Value operator-() const {
if (is_number_integer())
return -get<int64_t>();
else
return -get<double>();
} | O3 | cpp | minja::Value::operator-() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
leaq 0x40(%rdi), %r14
movq %rsi, %rdi
cmpb $0x1, %al
ja 0x89c70
callq 0x89e32
negq %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x6421a
jmp 0x89c9a
callq 0x89f7c
xorps 0x68014(%rip), %xmm0 # 0xf1c90
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movq %r14, %rdi
callq 0x637e2
movq %r14, %rdi
movl $0x1, %esi
callq 0x5c5ee
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZNK5minja5ValuengEv:
push r14
push rbx
push rax
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
lea r14, [rdi+40h]
mov rdi, rsi
cmp al, 1
ja short loc_89C70
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
neg rax
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+40h], xmm0
mov rdi, r14
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_integer_t)
jmp short loc_89C9A
loc_89C70:
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
xorps xmm0, cs:xmmword_F1C90
xorps xmm1, xmm1
movups xmmword ptr [rbx], xmm1
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm1
movups xmmword ptr [rbx+30h], xmm1
movups xmmword ptr [rbx+40h], xmm1
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_float_t)
loc_89C9A:
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| _OWORD * minja::Value::operator-(_OWORD *a1, long long a2)
{
unsigned __int8 *v2; // r14
long long v3; // rax
double v4; // xmm0_8
v2 = (unsigned __int8 *)(a1 + 4);
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u )
{
v4 = minja::Value::get<double>(a2);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
a1[3] = 0LL;
a1[4] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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>>(
v2,
-v4);
}
else
{
v3 = minja::Value::get<long>(a2);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
a1[3] = 0LL;
a1[4] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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>>(
v2,
-v3);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v2);
return a1;
}
| operator-:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
LEA R14,[RDI + 0x40]
MOV RDI,RSI
CMP AL,0x1
JA 0x00189c70
CALL 0x00189e32
NEG RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOV RSI,RAX
CALL 0x0016421a
JMP 0x00189c9a
LAB_00189c70:
CALL 0x00189f7c
XORPS XMM0,xmmword ptr [0x001f1c90]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX],XMM1
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM1
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOVUPS xmmword ptr [RBX + 0x40],XMM1
MOV RDI,R14
CALL 0x001637e2
LAB_00189c9a:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015c5ee
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE() const */
Value * __thiscall minja::Value::operator-(Value *this)
{
Value *pVVar1;
double dVar2;
long lVar3;
Value *in_RSI;
uint uVar4;
pVVar1 = this + 0x40;
if ((byte)((char)in_RSI[0x40] - 5U) < 2) {
lVar3 = get<long>(in_RSI);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<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>>
(pVVar1,-lVar3);
}
else {
dVar2 = get<double>(in_RSI);
uVar4 = SUB84(dVar2,0) ^ _DAT_001f1c90;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<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>>
(uVar4,pVVar1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(pVVar1,0));
return this;
}
| |
22,724 | prune_sel_arg_graph(SEL_ARG*, unsigned int) | eloqsql/sql/opt_range.cc | void prune_sel_arg_graph(SEL_ARG *sel_arg, uint max_part)
{
SEL_ARG *cur;
DBUG_ASSERT(max_part >= sel_arg->part);
for (cur= sel_arg->first(); cur ; cur=cur->next)
{
if (cur->next_key_part)
{
if (cur->next_key_part->part > max_part)
{
// Remove cur->next_key_part.
sel_arg->weight -= cur->next_key_part->weight;
cur->next_key_part= NULL;
}
else
{
uint old_weight= cur->next_key_part->weight;
prune_sel_arg_graph(cur->next_key_part, max_part);
sel_arg->weight -= (old_weight - cur->next_key_part->weight);
}
}
}
} | O0 | cpp | prune_sel_arg_graph(SEL_ARG*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xa4e001
movq -0x8(%rbp), %rdi
callq 0xa3cd00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xa4e0a7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa4e094
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x3(%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0xa4e05a
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x68(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x58(%rax)
jmp 0xa4e092
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x68(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xa4dff0
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
subl 0x68(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x68(%rax)
jmp 0xa4e094
jmp 0xa4e096
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xa4e00e
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| _Z19prune_sel_arg_graphP7SEL_ARGj:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_A4E001:
mov rdi, [rbp+var_8]; this
call _ZN7SEL_ARG5firstEv; SEL_ARG::first(void)
mov [rbp+var_18], rax
loc_A4E00E:
cmp [rbp+var_18], 0
jz loc_A4E0A7
mov rax, [rbp+var_18]
cmp qword ptr [rax+58h], 0
jz short loc_A4E094
mov rax, [rbp+var_18]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+3]
cmp eax, [rbp+var_C]
jbe short loc_A4E05A
mov rax, [rbp+var_18]
mov rax, [rax+58h]
mov edx, [rax+68h]
mov rax, [rbp+var_8]
mov ecx, [rax+68h]
sub ecx, edx
mov [rax+68h], ecx
mov rax, [rbp+var_18]
mov qword ptr [rax+58h], 0
jmp short loc_A4E092
loc_A4E05A:
mov rax, [rbp+var_18]
mov rax, [rax+58h]
mov eax, [rax+68h]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
mov rdi, [rax+58h]; SEL_ARG *
mov esi, [rbp+var_C]; unsigned int
call _Z19prune_sel_arg_graphP7SEL_ARGj; prune_sel_arg_graph(SEL_ARG *,uint)
mov edx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov rax, [rax+58h]
sub edx, [rax+68h]
mov rax, [rbp+var_8]
mov ecx, [rax+68h]
sub ecx, edx
mov [rax+68h], ecx
loc_A4E092:
jmp short $+2
loc_A4E094:
jmp short $+2
loc_A4E096:
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_18], rax
jmp loc_A4E00E
loc_A4E0A7:
add rsp, 20h
pop rbp
retn
| SEL_ARG * prune_sel_arg_graph(SEL_ARG *a1, unsigned int a2)
{
SEL_ARG *result; // rax
int v3; // [rsp+4h] [rbp-1Ch]
long long i; // [rsp+8h] [rbp-18h]
result = SEL_ARG::first(a1);
for ( i = (long long)result; i; i = (long long)result )
{
if ( *(_QWORD *)(i + 88) )
{
if ( *(unsigned __int8 *)(*(_QWORD *)(i + 88) + 3LL) <= a2 )
{
v3 = *(_DWORD *)(*(_QWORD *)(i + 88) + 104LL);
prune_sel_arg_graph(*(SEL_ARG **)(i + 88), a2);
*((_DWORD *)a1 + 26) -= v3 - *(_DWORD *)(*(_QWORD *)(i + 88) + 104LL);
}
else
{
*((_DWORD *)a1 + 26) -= *(_DWORD *)(*(_QWORD *)(i + 88) + 104LL);
*(_QWORD *)(i + 88) = 0LL;
}
}
result = *(SEL_ARG **)(i + 64);
}
return result;
}
| ~Create_func_log:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00a49300
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x8
CALL 0x00533290
ADD RSP,0x10
POP RBP
RET
|
/* Create_func_log::~Create_func_log() */
void __thiscall Create_func_log::~Create_func_log(Create_func_log *this)
{
~Create_func_log(this);
::operator_delete(this,8);
return;
}
| |
22,725 | engine_push | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/engine.c | int32_t
engine_push (PENGINE_T engine, int32_t value)
{
DBG_ENGINE_ASSERT (engine, "engine_push unexpected!") ;
engine_port_lock () ;
engine->stack_idx++ ;
if (engine->stack_idx >= ENGINE_ACCUMULATOR_STACK) engine->stack_idx = 0 ;
engine->stack[engine->stack_idx] = engine->reg[ENGINE_VARIABLE_ACCUMULATOR] ;
engine->reg[ENGINE_VARIABLE_ACCUMULATOR] = value ;
engine_port_unlock () ;
return ENGINE_OK ;
} | O3 | c | engine_push:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
testq %rdi, %rdi
je 0xe83d
callq 0xda0b
movl 0x8c(%r14), %eax
movl 0xc0(%r14), %ecx
leal 0x1(%rcx), %edx
xorl %esi, %esi
cmpl $0x7, %ecx
cmovgel %esi, %edx
movl %edx, 0xc0(%r14)
movslq %edx, %rcx
movl %eax, 0xa0(%r14,%rcx,4)
movl %ebx, 0x8c(%r14)
callq 0xda1c
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x32104(%rip), %rax # 0x40948
movq (%rax), %rax
testq %rax, %rax
je 0xe7fa
movq 0x18(%rax), %rax
testq %rax, %rax
je 0xe7fa
leaq 0x17b14(%rip), %rdi # 0x26370
callq *%rax
jmp 0xe7fa
| engine_push:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, esi
mov r14, rdi
test rdi, rdi
jz short loc_E83D
loc_E7FA:
call engine_port_lock
mov eax, [r14+8Ch]
mov ecx, [r14+0C0h]
lea edx, [rcx+1]
xor esi, esi
cmp ecx, 7
cmovge edx, esi
mov [r14+0C0h], edx
movsxd rcx, edx
mov [r14+rcx*4+0A0h], eax
mov [r14+8Ch], ebx
call engine_port_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
loc_E83D:
lea rax, _qoraal_instance
mov rax, [rax]
test rax, rax
jz short loc_E7FA
mov rax, [rax+18h]
test rax, rax
jz short loc_E7FA
lea rdi, aEnginePushUnex; "engine_push unexpected!"
call rax
jmp short loc_E7FA
| long long engine_push(char *a1, int a2)
{
char *v2; // r14
int v3; // eax
int v4; // ecx
long long v5; // rdx
void ( *v7)(char *); // rax
v2 = a1;
if ( !a1 )
{
if ( qoraal_instance )
{
v7 = *(void ( **)(char *))(qoraal_instance + 24);
if ( v7 )
{
a1 = aEnginePushUnex;
v7(aEnginePushUnex);
}
}
}
engine_port_lock();
v3 = *((_DWORD *)v2 + 35);
v4 = *((_DWORD *)v2 + 48);
v5 = (unsigned int)(v4 + 1);
if ( v4 >= 7 )
v5 = 0LL;
*((_DWORD *)v2 + 48) = v5;
*(_DWORD *)&v2[4 * (int)v5 + 160] = v3;
*((_DWORD *)v2 + 35) = a2;
engine_port_unlock(a1, 0LL, v5, (int)v5);
return 0LL;
}
| engine_push:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV R14,RDI
TEST RDI,RDI
JZ 0x0010e83d
LAB_0010e7fa:
CALL 0x0010da0b
MOV EAX,dword ptr [R14 + 0x8c]
MOV ECX,dword ptr [R14 + 0xc0]
LEA EDX,[RCX + 0x1]
XOR ESI,ESI
CMP ECX,0x7
CMOVGE EDX,ESI
MOV dword ptr [R14 + 0xc0],EDX
MOVSXD RCX,EDX
MOV dword ptr [R14 + RCX*0x4 + 0xa0],EAX
MOV dword ptr [R14 + 0x8c],EBX
CALL 0x0010da1c
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
LAB_0010e83d:
LEA RAX,[0x140948]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0010e7fa
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0010e7fa
LEA RDI,[0x126370]
CALL RAX
JMP 0x0010e7fa
|
int8 engine_push(long param_1,int4 param_2)
{
int iVar1;
if (((param_1 == 0) && (_qoraal_instance != 0)) &&
(*(code **)(_qoraal_instance + 0x18) != (code *)0x0)) {
(**(code **)(_qoraal_instance + 0x18))(s_engine_push_unexpected__00126370);
}
engine_port_lock();
iVar1 = *(int *)(param_1 + 0xc0) + 1;
if (6 < *(int *)(param_1 + 0xc0)) {
iVar1 = 0;
}
*(int *)(param_1 + 0xc0) = iVar1;
*(int4 *)(param_1 + 0xa0 + (long)iVar1 * 4) = *(int4 *)(param_1 + 0x8c);
*(int4 *)(param_1 + 0x8c) = param_2;
engine_port_unlock();
return 0;
}
| |
22,726 | sp_get_polygon_mbr | eloqsql/storage/myisam/sp_key.c | static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_linear_rings;
uint n_points;
n_linear_rings = uint4korr((*wkb));
(*wkb) += 4;
for (; n_linear_rings > 0; --n_linear_rings)
{
n_points = uint4korr((*wkb));
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
}
return 0;
} | O3 | c | sp_get_polygon_mbr:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movl (%rcx), %eax
addq $0x4, %rcx
movq %rcx, (%rdi)
testl %eax, %eax
je 0x483a0
addq $-0x8, %rsi
movq (%rdi), %r8
movl (%r8), %ecx
addq $0x4, %r8
movq %r8, (%rdi)
testl %ecx, %ecx
je 0x4839c
movb $0x1, %r8b
xorl %r9d, %r9d
movq (%rdi), %r10
cmpq %rsi, %r10
ja 0x483a4
movsd (%r10), %xmm0
addq $0x8, %r10
movq %r10, (%rdi)
movsd (%rdx,%r9), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x48373
movsd %xmm0, (%rdx,%r9)
ucomisd 0x8(%rdx,%r9), %xmm0
jbe 0x48386
orq $0x8, %r9
movsd %xmm0, (%rdx,%r9)
movl $0x10, %r9d
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x4834d
decl %ecx
jne 0x48347
decl %eax
jne 0x48336
xorl %eax, %eax
jmp 0x483a9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
nop
| sp_get_polygon_mbr:
push rbp
mov rbp, rsp
mov rcx, [rdi]
mov eax, [rcx]
add rcx, 4
mov [rdi], rcx
test eax, eax
jz short loc_483A0
add rsi, 0FFFFFFFFFFFFFFF8h
loc_48336:
mov r8, [rdi]
mov ecx, [r8]
add r8, 4
mov [rdi], r8
test ecx, ecx
jz short loc_4839C
loc_48347:
mov r8b, 1
xor r9d, r9d
loc_4834D:
mov r10, [rdi]
cmp r10, rsi
ja short loc_483A4
movsd xmm0, qword ptr [r10]
add r10, 8
mov [rdi], r10
movsd xmm1, qword ptr [rdx+r9]
ucomisd xmm1, xmm0
jbe short loc_48373
movsd qword ptr [rdx+r9], xmm0
loc_48373:
ucomisd xmm0, qword ptr [rdx+r9+8]
jbe short loc_48386
or r9, 8
movsd qword ptr [rdx+r9], xmm0
loc_48386:
mov r9d, 10h
test r8b, 1
mov r8d, 0
jnz short loc_4834D
dec ecx
jnz short loc_48347
loc_4839C:
dec eax
jnz short loc_48336
loc_483A0:
xor eax, eax
jmp short loc_483A9
loc_483A4:
mov eax, 0FFFFFFFFh
loc_483A9:
pop rbp
retn
| long long sp_get_polygon_mbr(double **a1, long long a2, long long a3)
{
int v3; // eax
unsigned long long v4; // rsi
int v5; // ecx
char v6; // r8
long long v7; // r9
double *v8; // r10
double v9; // xmm0_8
bool v10; // zf
v3 = *(_DWORD *)*a1;
*a1 = (double *)((char *)*a1 + 4);
if ( v3 )
{
v4 = a2 - 8;
do
{
v5 = *(_DWORD *)*a1;
*a1 = (double *)((char *)*a1 + 4);
if ( v5 )
{
while ( 2 )
{
v6 = 1;
v7 = 0LL;
do
{
v8 = *a1;
if ( (unsigned long long)*a1 > v4 )
return 0xFFFFFFFFLL;
v9 = *v8;
*a1 = v8 + 1;
if ( *(double *)(a3 + v7) > v9 )
*(double *)(a3 + v7) = v9;
if ( v9 > *(double *)(a3 + v7 + 8) )
*(double *)(a3 + (v7 | 8)) = v9;
v7 = 16LL;
v10 = (v6 & 1) == 0;
v6 = 0;
}
while ( !v10 );
if ( --v5 )
continue;
break;
}
}
--v3;
}
while ( v3 );
}
return 0LL;
}
| sp_get_polygon_mbr:
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI]
MOV EAX,dword ptr [RCX]
ADD RCX,0x4
MOV qword ptr [RDI],RCX
TEST EAX,EAX
JZ 0x001483a0
ADD RSI,-0x8
LAB_00148336:
MOV R8,qword ptr [RDI]
MOV ECX,dword ptr [R8]
ADD R8,0x4
MOV qword ptr [RDI],R8
TEST ECX,ECX
JZ 0x0014839c
LAB_00148347:
MOV R8B,0x1
XOR R9D,R9D
LAB_0014834d:
MOV R10,qword ptr [RDI]
CMP R10,RSI
JA 0x001483a4
MOVSD XMM0,qword ptr [R10]
ADD R10,0x8
MOV qword ptr [RDI],R10
MOVSD XMM1,qword ptr [RDX + R9*0x1]
UCOMISD XMM1,XMM0
JBE 0x00148373
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_00148373:
UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8]
JBE 0x00148386
OR R9,0x8
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_00148386:
MOV R9D,0x10
TEST R8B,0x1
MOV R8D,0x0
JNZ 0x0014834d
DEC ECX
JNZ 0x00148347
LAB_0014839c:
DEC EAX
JNZ 0x00148336
LAB_001483a0:
XOR EAX,EAX
JMP 0x001483a9
LAB_001483a4:
MOV EAX,0xffffffff
LAB_001483a9:
POP RBP
RET
|
int8 sp_get_polygon_mbr(int8 *param_1,long param_2,long param_3)
{
double dVar1;
double *pdVar2;
bool bVar3;
int iVar4;
int iVar5;
bool bVar6;
ulong uVar7;
iVar4 = *(int *)*param_1;
*param_1 = (int *)*param_1 + 1;
if (iVar4 != 0) {
do {
iVar5 = *(int *)*param_1;
*param_1 = (int *)*param_1 + 1;
for (; iVar5 != 0; iVar5 = iVar5 + -1) {
uVar7 = 0;
bVar3 = true;
do {
bVar6 = bVar3;
pdVar2 = (double *)*param_1;
if ((double *)(param_2 + -8) < pdVar2) {
return 0xffffffff;
}
dVar1 = *pdVar2;
*param_1 = pdVar2 + 1;
if (dVar1 < *(double *)(param_3 + uVar7)) {
*(double *)(param_3 + uVar7) = dVar1;
}
pdVar2 = (double *)(param_3 + 8 + uVar7);
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*(double *)(param_3 + (uVar7 | 8)) = dVar1;
}
uVar7 = 0x10;
bVar3 = false;
} while (bVar6);
}
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
}
return 0;
}
| |
22,727 | my_strntol_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
} | O3 | c | my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc3582
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0xc3552
cmpq $0x9, %rcx
je 0xc356a
cmpq $0x20, %rcx
je 0xc356a
jmp 0xc35b4
cmpq $0x2b, %rcx
je 0xc356a
cmpq $0x2d, %rcx
jne 0xc35b4
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0xc353a
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xc358e
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc367a
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %r8d, %r8d
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0xc3605
movq %rax, -0x30(%rbp)
jmp 0xc362a
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0xc3615
addq $-0x37, %rsi
jmp 0xc3623
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0xc368a
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0xc368a
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0xc364d
jne 0xc3644
movl -0x44(%rbp), %edi
cmpq -0x60(%rbp), %rax
ja 0xc364f
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %r8d, %esi
movl %ecx, %edi
movl %edi, -0x54(%rbp)
movl %esi, -0x58(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *%r12
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl %edi, %ecx
movl %esi, %r8d
testl %eax, %eax
jg 0xc35e9
jmp 0xc3681
xorl %edi, %edi
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0xc36e9
movl %esi, %r8d
movl %edi, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc3696
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0xc36da
cmpl $0x80000001, %ecx # imm = 0x80000001
movl $0x1, %eax
movl %r8d, %esi
cmovael %eax, %esi
testl %ecx, %ecx
cmovsl %eax, %r8d
movl -0x38(%rbp), %edi
testl %edi, %edi
cmovnel %esi, %r8d
testl %r8d, %r8d
je 0xc3704
testl %edi, %edi
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movq $-0x80000000, %rax # imm = 0x80000000
jmp 0xc370e
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0xc35a3
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc36f5
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0xc35a3
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
testl %edi, %edi
cmoveq %rcx, %rax
jmp 0xc35a5
| my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_C3582
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_C353A:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_C3552
cmp rcx, 9
jz short loc_C356A
cmp rcx, 20h ; ' '
jz short loc_C356A
jmp short loc_C35B4
loc_C3552:
cmp rcx, 2Bh ; '+'
jz short loc_C356A
cmp rcx, 2Dh ; '-'
jnz short loc_C35B4
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_C356A:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_C353A
loc_C3582:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_C358E
mov [rcx], r15
loc_C358E:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_C35A3:
xor eax, eax
loc_C35A5:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C35B4:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_C367A
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor r8d, r8d
loc_C35E9:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_C3605
mov [rbp+var_30], rax
jmp short loc_C362A
loc_C3605:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_C3615
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_C3623
loc_C3615:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_C368A
add rsi, 0FFFFFFFFFFFFFFA9h
loc_C3623:
mov [rbp+var_30], rsi
mov rax, rsi
loc_C362A:
cmp eax, [rbp+var_34]
jge short loc_C368A
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_C364D
jnz short loc_C3644
mov edi, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_C364F
loc_C3644:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, r8d
loc_C364D:
mov edi, ecx
loc_C364F:
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call r12
mov edi, [rbp+var_54]
mov esi, [rbp+var_58]
mov ecx, edi
mov r8d, esi
test eax, eax
jg loc_C35E9
jmp short loc_C3681
loc_C367A:
xor edi, edi
mov rbx, r15
xor esi, esi
loc_C3681:
test eax, eax
jz short loc_C36E9
mov r8d, esi
mov ecx, edi
loc_C368A:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C3696
mov [rax], rbx
loc_C3696:
cmp rbx, r15
jz short loc_C36DA
cmp ecx, 80000001h
mov eax, 1
mov esi, r8d
cmovnb esi, eax
test ecx, ecx
cmovs r8d, eax
mov edi, [rbp+var_38]
test edi, edi
cmovnz r8d, esi
test r8d, r8d
jz short loc_C3704
test edi, edi
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov ecx, 7FFFFFFFh
mov rax, 0FFFFFFFF80000000h
jmp short loc_C370E
loc_C36DA:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_C35A3
loc_C36E9:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C36F5
mov [rax], rbx
loc_C36F5:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_C35A3
loc_C3704:
mov ecx, ecx
mov rax, rcx
neg rax
test edi, edi
loc_C370E:
cmovz rax, rcx
jmp loc_C35A5
| long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r8
unsigned long long v17; // rax
long long v18; // rsi
unsigned int v19; // esi
unsigned int v20; // edi
int v21; // esi
bool v22; // zf
unsigned int v24; // [rsp+1Ch] [rbp-44h]
BOOL v26; // [rsp+28h] [rbp-38h]
_QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v28, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v26 = 0;
while ( 1 )
{
if ( v28[0] > 42LL )
{
if ( v28[0] != 43LL )
{
if ( v28[0] != 45LL )
break;
v26 = !v26;
}
goto LABEL_10;
}
if ( v28[0] != 9LL && v28[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v28, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v24 = 0xFFFFFFFF / a4;
v13 = v8(a1, v28, v6, v9);
if ( v13 > 0 )
{
LODWORD(v14) = 0;
v15 = v6;
v16 = 0LL;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v28[0] - 48LL;
if ( (unsigned long long)(v28[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v28[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v28[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v28[0] - 87LL;
}
else
{
v18 = v28[0] - 55LL;
}
v28[0] = v18;
v17 = v18;
}
else
{
v28[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( (unsigned int)v14 <= v24 )
{
if ( (_DWORD)v14 == v24 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
LODWORD(v14) = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16);
LODWORD(v14) = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
LODWORD(v16) = v19;
LODWORD(v14) = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
v21 = v16;
if ( (unsigned int)v14 >= 0x80000001 )
v21 = 1;
if ( (int)v14 < 0 )
LODWORD(v16) = 1;
if ( v26 )
LODWORD(v16) = v21;
if ( (_DWORD)v16 )
{
v22 = !v26;
*a6 = 34;
v14 = 0x7FFFFFFFLL;
result = 0xFFFFFFFF80000000LL;
}
else
{
v14 = (unsigned int)v14;
result = -(long long)(unsigned int)v14;
v22 = !v26;
}
if ( v22 )
return v14;
return result;
}
| my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c3582
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_001c353a:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x001c3552
CMP RCX,0x9
JZ 0x001c356a
CMP RCX,0x20
JZ 0x001c356a
JMP 0x001c35b4
LAB_001c3552:
CMP RCX,0x2b
JZ 0x001c356a
CMP RCX,0x2d
JNZ 0x001c35b4
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_001c356a:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x001c353a
LAB_001c3582:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001c358e
MOV qword ptr [RCX],R15
LAB_001c358e:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001c35a3:
XOR EAX,EAX
LAB_001c35a5:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c35b4:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c367a
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR R8D,R8D
LAB_001c35e9:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x001c3605
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c362a
LAB_001c3605:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x001c3615
ADD RSI,-0x37
JMP 0x001c3623
LAB_001c3615:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001c368a
ADD RSI,-0x57
LAB_001c3623:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_001c362a:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001c368a
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x001c364d
JNZ 0x001c3644
MOV EDI,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x001c364f
LAB_001c3644:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,R8D
LAB_001c364d:
MOV EDI,ECX
LAB_001c364f:
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL R12
MOV EDI,dword ptr [RBP + -0x54]
MOV ESI,dword ptr [RBP + -0x58]
MOV ECX,EDI
MOV R8D,ESI
TEST EAX,EAX
JG 0x001c35e9
JMP 0x001c3681
LAB_001c367a:
XOR EDI,EDI
MOV RBX,R15
XOR ESI,ESI
LAB_001c3681:
TEST EAX,EAX
JZ 0x001c36e9
MOV R8D,ESI
MOV ECX,EDI
LAB_001c368a:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c3696
MOV qword ptr [RAX],RBX
LAB_001c3696:
CMP RBX,R15
JZ 0x001c36da
CMP ECX,0x80000001
MOV EAX,0x1
MOV ESI,R8D
CMOVNC ESI,EAX
TEST ECX,ECX
CMOVS R8D,EAX
MOV EDI,dword ptr [RBP + -0x38]
TEST EDI,EDI
CMOVNZ R8D,ESI
TEST R8D,R8D
JZ 0x001c3704
TEST EDI,EDI
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV ECX,0x7fffffff
MOV RAX,-0x80000000
JMP 0x001c370e
LAB_001c36da:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001c35a3
LAB_001c36e9:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c36f5
MOV qword ptr [RAX],RBX
LAB_001c36f5:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001c35a3
LAB_001c3704:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
TEST EDI,EDI
LAB_001c370e:
CMOVZ RAX,RCX
JMP 0x001c35a5
|
ulong my_strntol_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
int4 uVar8;
uint uVar9;
ulong uVar10;
long lVar11;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001c35b4:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar11 = param_2;
if ((int)uVar6 < 1) {
uVar9 = 0;
bVar3 = false;
goto LAB_001c3681;
}
uVar9 = 0;
bVar3 = false;
goto LAB_001c35e9;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001c35b4;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar8 = 0x21;
if (uVar5 == 0) {
uVar8 = 0x54;
}
*param_6 = uVar8;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar7) goto LAB_001c368a;
uVar6 = uVar9;
bVar4 = true;
if ((uVar9 <= uVar5) &&
((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar9 * param_4 + (int)uVar7;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar9 = uVar6;
local_38 = uVar7;
uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3);
if ((int)uVar6 < 1) break;
LAB_001c35e9:
lVar11 = (ulong)uVar6 + lVar11;
uVar7 = local_38 - 0x30;
if (9 < uVar7) {
if (local_38 - 0x41 < 0x1a) {
uVar7 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001c368a;
uVar7 = local_38 - 0x57;
}
}
}
LAB_001c3681:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
*param_6 = 0x54;
}
else {
LAB_001c368a:
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
if (lVar11 != param_2) {
bVar4 = bVar3;
if (0x80000000 < uVar9) {
bVar4 = true;
}
if ((int)uVar9 < 0) {
bVar3 = true;
}
if (bVar2) {
bVar3 = bVar4;
}
if (bVar3) {
*param_6 = 0x22;
uVar10 = 0x7fffffff;
uVar7 = 0xffffffff80000000;
}
else {
uVar10 = (ulong)uVar9;
uVar7 = -uVar10;
}
if (!bVar2) {
return uVar10;
}
return uVar7;
}
*param_6 = 0x21;
}
return 0;
}
| |
22,728 | fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>> fmt::v10::detail::make_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>, __int128>(__int128&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h | FMT_CONSTEXPR auto make_arg(T& val) -> basic_format_arg<Context> {
auto arg = basic_format_arg<Context>();
arg.type_ = mapped_type_constant<T, Context>::value;
arg.value_ = make_arg<true, Context>(val);
return arg;
} | O0 | c | fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>> fmt::v10::detail::make_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>, __int128>(__int128&):
subq $0x78, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rsi, 0x28(%rsp)
callq 0xa16e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movl $0xa, 0x10(%rdi)
movq 0x28(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movb $0x1, 0x37(%rsp)
movb $0x1, 0x36(%rsp)
movb $0x1, 0x35(%rsp)
movq 0x38(%rsp), %rcx
movsd (%rcx), %xmm0
leaq 0x34(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
leaq 0x40(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movsd %xmm0, 0x68(%rsp)
movq 0x70(%rsp), %rcx
movsd 0x68(%rsp), %xmm0
movsd %xmm0, (%rcx)
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, (%rdi)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rdi)
addq $0x78, %rsp
retq
nopl (%rax,%rax)
| _ZN3fmt3v106detail8make_argINS0_20basic_format_contextINS0_8appenderEcEEdEENS0_16basic_format_argIT_EERT0_:
sub rsp, 78h
mov [rsp+78h+var_78], rdi
mov rax, rdi
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_50], rsi
call _ZN3fmt3v1016basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEC2Ev; fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg(void)
mov rdi, [rsp+78h+var_78]
mov rax, [rsp+78h+var_70]
mov dword ptr [rdi+10h], 0Ah
mov rcx, [rsp+78h+var_50]
mov [rsp+78h+var_40], rcx
mov [rsp+78h+var_41], 1
mov [rsp+78h+var_42], 1
mov [rsp+78h+var_43], 1
mov rcx, [rsp+78h+var_40]
movsd xmm0, qword ptr [rcx]
lea rcx, [rsp+78h+var_44]
mov [rsp+78h+var_18], rcx
movsd [rsp+78h+var_20], xmm0
movsd xmm0, [rsp+78h+var_20]
lea rcx, [rsp+78h+var_38]
mov [rsp+78h+var_8], rcx
movsd [rsp+78h+var_10], xmm0
mov rcx, [rsp+78h+var_8]
movsd xmm0, [rsp+78h+var_10]
movsd qword ptr [rcx], xmm0
mov rdx, [rsp+78h+var_38]
mov rcx, [rsp+78h+var_30]
mov [rsp+78h+var_68], rdx
mov [rsp+78h+var_60], rcx
mov rcx, [rsp+78h+var_68]
mov [rdi], rcx
mov rcx, [rsp+78h+var_60]
mov [rdi+8], rcx
add rsp, 78h
retn
| long long fmt::v10::detail::make_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,double>(
long long a1,
_QWORD *a2)
{
long long result; // rax
long long v3; // [rsp+48h] [rbp-30h]
fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg((fmt::v10::monostate *)a1);
result = a1;
*(_DWORD *)(a1 + 16) = 10;
*(_QWORD *)a1 = *a2;
*(_QWORD *)(a1 + 8) = v3;
return result;
}
| make_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,double>:
SUB RSP,0x78
MOV qword ptr [RSP],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x28],RSI
CALL 0x001a16e0
MOV RDI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RDI + 0x10],0xa
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x38],RCX
MOV byte ptr [RSP + 0x37],0x1
MOV byte ptr [RSP + 0x36],0x1
MOV byte ptr [RSP + 0x35],0x1
MOV RCX,qword ptr [RSP + 0x38]
MOVSD XMM0,qword ptr [RCX]
LEA RCX,[RSP + 0x34]
MOV qword ptr [RSP + 0x60],RCX
MOVSD qword ptr [RSP + 0x58],XMM0
MOVSD XMM0,qword ptr [RSP + 0x58]
LEA RCX,[RSP + 0x40]
MOV qword ptr [RSP + 0x70],RCX
MOVSD qword ptr [RSP + 0x68],XMM0
MOV RCX,qword ptr [RSP + 0x70]
MOVSD XMM0,qword ptr [RSP + 0x68]
MOVSD qword ptr [RCX],XMM0
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RDI],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RDI + 0x8],RCX
ADD RSP,0x78
RET
|
/* fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char> >
fmt::v10::detail::make_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>,
double>(double&) */
detail * __thiscall
fmt::v10::detail::make_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,double>
(detail *this,double *param_1)
{
int8 local_30;
basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg
((basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> *)this);
*(int4 *)(this + 0x10) = 10;
*(double *)this = *param_1;
*(int8 *)(this + 8) = local_30;
return this;
}
| |
22,729 | decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h | static const M& Get(const MatcherBase& m) {
return static_cast<Shared*>(m.buffer_.shared)->value;
} | O1 | c | decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*):
movq 0x10(%rdi), %rax
movq 0x8(%rsi), %rdx
cmpq 0x10(%rax), %rdx
jne 0x39b99
testq %rdx, %rdx
je 0x39b9c
pushq %rax
movq 0x8(%rax), %rax
movq (%rsi), %rdi
movq %rax, %rsi
callq 0x8500
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
| _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE19MatchAndExplainImplINSA_11ValuePolicyINS0_9EqMatcherIS7_EELb0EEEEEDTcldtclsrT_3Getfp_E15MatchAndExplainfp0_clptfp1_6streamEEERKSA_S9_PNS_19MatchResultListenerE:
mov rax, [rdi+10h]
mov rdx, [rsi+8]
cmp rdx, [rax+10h]
jnz short loc_39B99
test rdx, rdx
jz short loc_39B9C
push rax
mov rax, [rax+8]
mov rdi, [rsi]
mov rsi, rax
call _bcmp
test eax, eax
setz al
add rsp, 8
retn
loc_39B99:
xor eax, eax
retn
loc_39B9C:
mov al, 1
retn
| bool testing::internal::MatcherBase<std::string const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::string const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(
long long a1,
_QWORD *a2)
{
long long v2; // rax
long long v3; // rdx
v2 = *(_QWORD *)(a1 + 16);
v3 = a2[1];
if ( v3 != *(_QWORD *)(v2 + 16) )
return 0;
if ( v3 )
return (unsigned int)bcmp(*a2, *(_QWORD *)(v2 + 8)) == 0;
return 1;
}
| MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>:
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RSI + 0x8]
CMP RDX,qword ptr [RAX + 0x10]
JNZ 0x00139b99
TEST RDX,RDX
JZ 0x00139b9c
PUSH RAX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RSI]
MOV RSI,RAX
CALL 0x00108500
TEST EAX,EAX
SETZ AL
ADD RSP,0x8
RET
LAB_00139b99:
XOR EAX,EAX
RET
LAB_00139b9c:
MOV AL,0x1
RET
|
/* decltype (((testing::internal::MatcherBase<std::__cxx11::string
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >,
false>::Get({parm#1})).MatchAndExplain)({parm#2}, ({parm#3}->stream)()))
testing::internal::MatcherBase<std::__cxx11::string
const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >, false>
>(testing::internal::MatcherBase<std::__cxx11::string const&> const&, std::__cxx11::string
const&, testing::MatchResultListener*) */
int8
testing::internal::MatcherBase<std::__cxx11::string_const&>::
MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>
(MatcherBase *param_1,string *param_2,MatchResultListener *param_3)
{
long lVar1;
size_t __n;
int iVar2;
int4 extraout_var;
lVar1 = *(long *)(param_1 + 0x10);
__n = *(size_t *)(param_2 + 8);
if (__n != *(size_t *)(lVar1 + 0x10)) {
return 0;
}
if (__n != 0) {
iVar2 = bcmp(*(void **)param_2,*(void **)(lVar1 + 8),__n);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0);
}
return CONCAT71((int7)((ulong)lVar1 >> 8),1);
}
| |
22,730 | xml_parse_tag_end | eloqsql/storage/maria/libmarias3/src/xml.c | static struct xml_string* xml_parse_tag_end(struct xml_parser* parser) {
size_t start;
size_t length = 0;
struct xml_string* name;
xml_parser_info(parser, "tag_end");
start = parser->position;
/* Parse until `>' or a whitespace is reached
*/
while (start + length < parser->length) {
uint8_t current = xml_parser_peek(parser, CURRENT_CHARACTER);
if (('>' == current) || isspace(current)) {
break;
} else {
xml_parser_consume(parser, 1);
length++;
}
}
/* Consume `>'
*/
if ('>' != xml_parser_peek(parser, CURRENT_CHARACTER)) {
xml_parser_error(parser, CURRENT_CHARACTER, "xml_parse_tag_end::expected tag end");
return 0;
}
xml_parser_consume(parser, 1);
/* Return parsed tag name
*/
name = ms3_cmalloc(sizeof(struct xml_string));
name->buffer = &parser->buffer[start];
name->length = length;
return name;
} | O0 | c | xml_parse_tag_end:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x3358a
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x32dc0
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %ecx
movl $0x3e, %eax
cmpl %ecx, %eax
je 0x3356c
callq 0x27150
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x3356e
jmp 0x3358a
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x334b0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x33520
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x32dc0
movzbl %al, %ecx
movl $0x3e, %eax
cmpl %ecx, %eax
je 0x335bf
movq -0x10(%rbp), %rdi
xorl %esi, %esi
leaq 0xeb1d0(%rip), %rdx # 0x11e780
callq 0x32030
movq $0x0, -0x8(%rbp)
jmp 0x33605
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x334b0
movl $0x10, %edi
leaq 0x254397(%rip), %rax # 0x287970
callq *(%rax)
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
| xml_parse_tag_end:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_20], 0
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_33520:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jnb short loc_3358A
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call xml_parser_peek
mov [rbp+var_29], al
movzx ecx, [rbp+var_29]
mov eax, 3Eh ; '>'
cmp eax, ecx
jz short loc_3356C
call ___ctype_b_loc
mov rax, [rax]
movzx ecx, [rbp+var_29]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
jz short loc_3356E
loc_3356C:
jmp short loc_3358A
loc_3356E:
mov rdi, [rbp+var_10]
mov esi, 1
call xml_parser_consume
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_33520
loc_3358A:
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call xml_parser_peek
movzx ecx, al
mov eax, 3Eh ; '>'
cmp eax, ecx
jz short loc_335BF
mov rdi, [rbp+var_10]
xor esi, esi
lea rdx, aXmlParseTagEnd; "xml_parse_tag_end::expected tag end"
call xml_parser_error
mov [rbp+var_8], 0
jmp short loc_33605
loc_335BF:
mov rdi, [rbp+var_10]
mov esi, 1
call xml_parser_consume
mov edi, 10h
lea rax, ms3_cmalloc
call qword ptr [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+8], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_33605:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _QWORD * xml_parse_tag_end(_QWORD *a1)
{
unsigned __int8 v2; // [rsp+7h] [rbp-29h]
_QWORD *v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = 0LL;
v5 = a1[1];
while ( (unsigned long long)(v4 + v5) < a1[2] )
{
v2 = xml_parser_peek(a1, 0LL);
if ( v2 == 62 || (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * v2) & 0x2000) != 0 )
break;
xml_parser_consume((unsigned long long)a1, 1LL);
++v4;
}
if ( xml_parser_peek(a1, 0LL) == 62 )
{
xml_parser_consume((unsigned long long)a1, 1LL);
v3 = (_QWORD *)ms3_cmalloc(16LL);
*v3 = v5 + *a1;
v3[1] = v4;
return v3;
}
else
{
xml_parser_error(a1, 0, "xml_parse_tag_end::expected tag end");
return 0LL;
}
}
| xml_parse_tag_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00133520:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0013358a
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00132dc0
MOV byte ptr [RBP + -0x29],AL
MOVZX ECX,byte ptr [RBP + -0x29]
MOV EAX,0x3e
CMP EAX,ECX
JZ 0x0013356c
CALL 0x00127150
MOV RAX,qword ptr [RAX]
MOVZX ECX,byte ptr [RBP + -0x29]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x0013356e
LAB_0013356c:
JMP 0x0013358a
LAB_0013356e:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001334b0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00133520
LAB_0013358a:
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00132dc0
MOVZX ECX,AL
MOV EAX,0x3e
CMP EAX,ECX
JZ 0x001335bf
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
LEA RDX,[0x21e780]
CALL 0x00132030
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00133605
LAB_001335bf:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x001334b0
MOV EDI,0x10
LEA RAX,[0x387970]
CALL qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00133605:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long * xml_parse_tag_end(long *param_1)
{
long lVar1;
byte bVar2;
char cVar3;
ushort **ppuVar4;
long local_28;
long *local_10;
local_28 = 0;
lVar1 = param_1[1];
while ((((ulong)(lVar1 + local_28) < (ulong)param_1[2] &&
(bVar2 = xml_parser_peek(param_1,0), bVar2 != 0x3e)) &&
(ppuVar4 = __ctype_b_loc(), ((*ppuVar4)[(int)(uint)bVar2] & 0x2000) == 0))) {
xml_parser_consume(param_1,1);
local_28 = local_28 + 1;
}
cVar3 = xml_parser_peek(param_1,0);
if (cVar3 == '>') {
xml_parser_consume(param_1,1);
local_10 = (long *)(*(code *)ms3_cmalloc)(0x10);
*local_10 = *param_1 + lVar1;
local_10[1] = local_28;
}
else {
xml_parser_error(param_1,0,"xml_parse_tag_end::expected tag end");
local_10 = (long *)0x0;
}
return local_10;
}
| |
22,731 | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | hkr04[P]cpp-mcp/common/json.hpp | static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("parse_error", id_), "parse error",
position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0x110(%rsp)
movl %esi, 0x10c(%rsp)
movq %rdx, 0x100(%rsp)
movq %rcx, 0xf8(%rsp)
movq %r8, 0xf0(%rsp)
leaq 0x8f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xbe20
movq 0x30(%rsp), %rdx
leaq 0x1f924(%rip), %rsi # 0xd47fd
leaq 0x90(%rsp), %rdi
callq 0xf160
jmp 0xb4ee8
movl 0x10c(%rsp), %edx
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x11ca0
jmp 0xb4f06
movq 0x100(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0xbf2a0
jmp 0xb4f1a
xorl %eax, %eax
movl %eax, %esi
leaq 0x38(%rsp), %rdi
callq 0x6dbd0
jmp 0xb4f2a
movq 0xf8(%rsp), %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq 0x1f8ca(%rip), %rdx # 0xd4809
leaq 0x1a152(%rip), %r8 # 0xcf098
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x58(%rsp), %rcx
leaq 0x38(%rsp), %r9
callq 0xbf1b0
jmp 0xb4f67
leaq 0x38(%rsp), %rdi
callq 0xbfb0
leaq 0x58(%rsp), %rdi
callq 0xbfb0
leaq 0xb0(%rsp), %rdi
callq 0xbfb0
leaq 0x90(%rsp), %rdi
callq 0xbfb0
leaq 0x8f(%rsp), %rdi
callq 0xb8e0
movl 0x10c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x100(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xb2c0
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
callq 0xbf370
jmp 0xb4fe2
leaq 0xd0(%rsp), %rdi
callq 0xbfb0
movq 0x28(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xb5087
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xb507a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xb506d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xb5063
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xbfb0
leaq 0x58(%rsp), %rdi
callq 0xbfb0
leaq 0xb0(%rsp), %rdi
callq 0xbfb0
leaq 0x90(%rsp), %rdi
callq 0xbfb0
leaq 0x8f(%rsp), %rdi
callq 0xb8e0
jmp 0xb50b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xbfb0
movq 0x80(%rsp), %rdi
callq 0xbe10
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
sub rsp, 118h
mov [rsp+118h+var_F8], rdi; __int64
mov rax, rdi
mov qword ptr [rsp+118h+var_F0], rax; char
mov [rsp+118h+var_8], rdi
mov [rsp+118h+var_C], esi
mov [rsp+118h+var_18], rdx
mov [rsp+118h+var_20], rcx
mov [rsp+118h+var_28], r8
lea rdi, [rsp+118h+var_89]
mov [rsp+118h+var_E8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+118h+var_E8]
lea rsi, aParseError; "parse_error"
lea rdi, [rsp+118h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_B4EE8:
mov edx, [rsp+118h+var_C]
lea rdi, [rsp+118h+var_68]; int
lea rsi, [rsp+118h+var_88]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
jmp short $+2
loc_B4F06:
mov rsi, [rsp+118h+var_18]
lea rdi, [rsp+118h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&)
jmp short $+2
loc_B4F1A:
xor eax, eax
mov esi, eax
lea rdi, [rsp+118h+var_E0]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr))
jmp short $+2
loc_B4F2A:
mov rcx, [rsp+118h+var_20]
mov rax, rsp
mov [rax], rcx
lea rdx, aParseError_0; "parse error"
lea r8, aSubtype+9; int
lea rdi, [rsp+118h+var_48]; int
lea rsi, [rsp+118h+var_68]; int
lea rcx, [rsp+118h+var_C0]; int
lea r9, [rsp+118h+var_E0]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&)
jmp short $+2
loc_B4F67:
lea rdi, [rsp+118h+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_89]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, [rsp+118h+var_C]
mov [rsp+118h+var_104], eax
mov rax, [rsp+118h+var_18]
mov rax, [rax]
mov [rsp+118h+var_100], rax
lea rdi, [rsp+118h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+118h+var_F8]; this
mov esi, [rsp+118h+var_104]; int
mov rdx, [rsp+118h+var_100]; unsigned __int64
mov rcx, rax; char *
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorC2EimPKc; nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(int,ulong,char const*)
jmp short $+2
loc_B4FE2:
lea rdi, [rsp+118h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, qword ptr [rsp+118h+var_F0]
add rsp, 118h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_B5087
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_B507A
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_B506D
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_B5063
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B5063:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B506D:
lea rdi, [rsp+arg_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B507A:
lea rdi, [rsp+arg_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B5087:
lea rdi, [rsp+arg_87]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_B50B4
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B50B4:
mov rdi, [rsp+arg_78]
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
long long a1,
long long a2,
unsigned long long *a3,
void *a4,
long long a5)
{
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v9; // rdx
const char *v10; // rax
int v12; // [rsp+8h] [rbp-110h]
int v13; // [rsp+10h] [rbp-108h]
int v14; // [rsp+14h] [rbp-104h]
int v15; // [rsp+18h] [rbp-100h]
unsigned long long v16; // [rsp+18h] [rbp-100h]
nlohmann::json_abi_v3_11_3::detail::parse_error *v17; // [rsp+20h] [rbp-F8h]
int v18[8]; // [rsp+38h] [rbp-E0h] BYREF
int v19[13]; // [rsp+58h] [rbp-C0h] BYREF
char v20; // [rsp+8Fh] [rbp-89h] BYREF
_BYTE v21[32]; // [rsp+90h] [rbp-88h] BYREF
int v22[8]; // [rsp+B0h] [rbp-68h] BYREF
int v23[8]; // [rsp+D0h] [rbp-48h] BYREF
long long v24; // [rsp+F0h] [rbp-28h]
void *v25; // [rsp+F8h] [rbp-20h]
unsigned long long *v26; // [rsp+100h] [rbp-18h]
int v27; // [rsp+10Ch] [rbp-Ch]
long long v28; // [rsp+110h] [rbp-8h]
v28 = a1;
v27 = a2;
v26 = a3;
v25 = a4;
v24 = a5;
std::allocator<char>::allocator(&v20, a2, a3);
std::string::basic_string<std::allocator<char>>((long long)v21, (long long)"parse_error", (long long)&v20);
nlohmann::json_abi_v3_11_3::detail::exception::name(v22, (long long)v21, v27);
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](
(unsigned int)v19,
(_DWORD)v26,
v5,
v6,
v7,
v8);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v18, 0LL, v9);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(
(int)v23,
(int)v22,
(int)"parse error",
(int)v19,
(int)": ",
(int)v18,
v25,
v12,
v13,
v15,
a1);
std::string::~string(v18);
std::string::~string(v19);
std::string::~string(v22);
std::string::~string(v21);
std::allocator<char>::~allocator(&v20);
v14 = v27;
v16 = *v26;
v10 = (const char *)std::string::c_str(v23);
nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(v17, v14, v16, v10);
std::string::~string(v23);
return a1;
}
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
SUB RSP,0x118
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x110],RDI
MOV dword ptr [RSP + 0x10c],ESI
MOV qword ptr [RSP + 0x100],RDX
MOV qword ptr [RSP + 0xf8],RCX
MOV qword ptr [RSP + 0xf0],R8
LEA RDI,[RSP + 0x8f]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x0010be20
MOV RDX,qword ptr [RSP + 0x30]
LAB_001b4ed2:
LEA RSI,[0x1d47fd]
LEA RDI,[RSP + 0x90]
CALL 0x0010f160
JMP 0x001b4ee8
LAB_001b4ee8:
MOV EDX,dword ptr [RSP + 0x10c]
LAB_001b4eef:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x90]
CALL 0x00111ca0
JMP 0x001b4f06
LAB_001b4f06:
MOV RSI,qword ptr [RSP + 0x100]
LAB_001b4f0e:
LEA RDI,[RSP + 0x58]
CALL 0x001bf2a0
JMP 0x001b4f1a
LAB_001b4f1a:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x38]
CALL 0x0016dbd0
JMP 0x001b4f2a
LAB_001b4f2a:
MOV RCX,qword ptr [RSP + 0xf8]
LAB_001b4f32:
MOV RAX,RSP
MOV qword ptr [RAX],RCX
LEA RDX,[0x1d4809]
LEA R8,[0x1cf098]
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xb0]
LEA RCX,[RSP + 0x58]
LEA R9,[RSP + 0x38]
CALL 0x001bf1b0
JMP 0x001b4f67
LAB_001b4f67:
LEA RDI,[RSP + 0x38]
CALL 0x0010bfb0
LEA RDI,[RSP + 0x58]
CALL 0x0010bfb0
LEA RDI,[RSP + 0xb0]
CALL 0x0010bfb0
LEA RDI,[RSP + 0x90]
CALL 0x0010bfb0
LEA RDI,[RSP + 0x8f]
CALL 0x0010b8e0
MOV EAX,dword ptr [RSP + 0x10c]
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0xd0]
CALL 0x0010b2c0
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x14]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,RAX
LAB_001b4fdb:
CALL 0x001bf370
LAB_001b4fe0:
JMP 0x001b4fe2
LAB_001b4fe2:
LEA RDI,[RSP + 0xd0]
CALL 0x0010bfb0
MOV RAX,qword ptr [RSP + 0x28]
ADD RSP,0x118
RET
|
parse_error *
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(parse_error *param_1,int param_2,position_t *param_3,string *param_4,int8 param_5)
{
ulong uVar1;
int iVar2;
char *pcVar3;
exception local_e0 [32];
parse_error local_c0 [55];
allocator local_89;
string local_88 [32];
exception local_68 [32];
detail local_48 [32];
int8 local_28;
string *local_20;
position_t *local_18;
int local_c;
parse_error *local_8;
local_28 = param_5;
local_20 = param_4;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001b4ed2 to 001b4ee5 has its CatchHandler @ 001b4ffc */
std::__cxx11::string::string<std::allocator<char>>(local_88,"parse_error",&local_89);
/* try { // try from 001b4eef to 001b4f03 has its CatchHandler @ 001b500f */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_68,local_88,local_c);
/* try { // try from 001b4f0e to 001b4f17 has its CatchHandler @ 001b5022 */
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_(local_c0,local_18);
/* try { // try from 001b4f1a to 001b4f27 has its CatchHandler @ 001b5035 */
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_
(local_e0,(_func_decltype_nullptr *)0x0);
/* try { // try from 001b4f32 to 001b4f64 has its CatchHandler @ 001b5048 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&>
(local_48,(string *)local_68,"parse error",(string *)local_c0,": ",(string *)local_e0,
local_20);
std::__cxx11::string::~string((string *)local_e0);
std::__cxx11::string::~string((string *)local_c0);
std::__cxx11::string::~string((string *)local_68);
std::__cxx11::string::~string(local_88);
std::allocator<char>::~allocator((allocator<char> *)&local_89);
iVar2 = local_c;
uVar1 = *(ulong *)local_18;
pcVar3 = (char *)std::__cxx11::string::c_str();
/* try { // try from 001b4fdb to 001b4fdf has its CatchHandler @ 001b5096 */
nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(param_1,iVar2,uVar1,pcVar3);
std::__cxx11::string::~string((string *)local_48);
return param_1;
}
| |
22,732 | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | hkr04[P]cpp-mcp/common/json.hpp | static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("parse_error", id_), "parse error",
position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xaf37(%rip), %rsi # 0x3bb48
leaq 0x58(%rsp), %rdi
leaq 0x17(%rsp), %rdx
callq 0x99ce
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl %ebp, %edx
callq 0xa126
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x33d74
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0xb380
movq %r15, (%rsp)
leaq 0xaeff(%rip), %rdx # 0x3bb54
leaq 0x7832(%rip), %r8 # 0x3848e
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x38(%rsp), %rcx
leaq 0x18(%rsp), %r9
callq 0x33cdd
leaq 0x18(%rsp), %rdi
callq 0x8b18
leaq 0x38(%rsp), %rdi
callq 0x8b18
leaq 0x78(%rsp), %rdi
callq 0x8b18
leaq 0x58(%rsp), %rdi
callq 0x8b18
movq (%r14), %rdx
movq 0x98(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x33e04
leaq 0x98(%rsp), %rdi
callq 0x8b18
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x30d15
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x8b18
jmp 0x30cf2
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8b18
jmp 0x30d01
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x8b18
jmp 0x30d10
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x8b18
movq %rbx, %rdi
callq 0x89c0
movq %rax, %rbx
jmp 0x30d1a
nop
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push rbx
sub rsp, 0B8h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aParseError; "parse_error"
lea rdi, [rsp+0D8h+var_80]
lea rdx, [rsp+0D8h+var_C1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0D8h+var_60]
lea rsi, [rsp+0D8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0D8h+var_A0]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&)
lea rdi, [rsp+0D8h+var_C0]
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr))
mov [rsp+0D8h+var_D8], r15
lea rdx, aParseError_0; "parse error"
lea r8, aSubtype+9; ": "
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_60]
lea rcx, [rsp+0D8h+var_A0]
lea r9, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&)
lea rdi, [rsp+0D8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [r14]; unsigned __int64
mov rcx, [rsp+0D8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorC2EimPKc; nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(int,ulong,char const*)
lea rdi, [rsp+0D8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_90]
jmp short loc_30D15
mov rbx, rax
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_30CF2
mov rbx, rax
loc_30CF2:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_30D01
mov rbx, rax
loc_30D01:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_30D10
mov rbx, rax
loc_30D10:
lea rdi, [rsp+arg_50]; void *
loc_30D15:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_30D1A:
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_30D1A
| nlohmann::json_abi_v3_11_3::detail::parse_error * ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::parse_error *this,
int a2,
unsigned long long *a3,
long long a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
_QWORD v11[4]; // [rsp+18h] [rbp-C0h] BYREF
_BYTE v12[32]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v13[4]; // [rsp+58h] [rbp-80h] BYREF
_BYTE v14[32]; // [rsp+78h] [rbp-60h] BYREF
char *v15[8]; // [rsp+98h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v13, (long long)"parse_error");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v14, (long long)v13, a2);
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](
(unsigned int)v12,
(_DWORD)a3,
v6,
v7,
v8,
v9);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11](v11);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(
(unsigned int)v15,
(unsigned int)v14,
(unsigned int)"parse error",
(unsigned int)v12,
(unsigned int)": ",
(unsigned int)v11,
a4);
std::string::~string(v11);
std::string::~string(v12);
std::string::~string(v14);
std::string::~string(v13);
nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(this, a2, *a3, v15[0]);
std::string::~string(v15);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xb8
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_00130c0a:
LEA RSI,[0x13bb48]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x17]
CALL 0x001099ce
LAB_00130c20:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x58]
MOV EDX,EBP
CALL 0x0010a126
LAB_00130c31:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00133d74
LAB_00130c3e:
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
CALL 0x0010b380
LAB_00130c4a:
MOV qword ptr [RSP],R15
LEA RDX,[0x13bb54]
LEA R8,[0x13848e]
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x78]
LEA RCX,[RSP + 0x38]
LEA R9,[RSP + 0x18]
CALL 0x00133cdd
LEA RDI,[RSP + 0x18]
CALL 0x00108b18
LEA RDI,[RSP + 0x38]
CALL 0x00108b18
LEA RDI,[RSP + 0x78]
CALL 0x00108b18
LEA RDI,[RSP + 0x58]
CALL 0x00108b18
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [RSP + 0x98]
LAB_00130cab:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00133e04
LAB_00130cb5:
LEA RDI,[RSP + 0x98]
CALL 0x00108b18
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R14
POP R15
POP RBP
RET
|
parse_error *
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(parse_error *param_1,int param_2,position_t *param_3,string *param_4)
{
allocator local_c1;
string local_c0 [32];
parse_error local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 00130c0a to 00130c1f has its CatchHandler @ 00130d22 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"parse_error",&local_c1);
/* try { // try from 00130c20 to 00130c30 has its CatchHandler @ 00130d0d */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 00130c31 to 00130c3d has its CatchHandler @ 00130cfe */
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_(local_a0,param_3);
/* try { // try from 00130c3e to 00130c49 has its CatchHandler @ 00130cef */
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_
((_func_decltype_nullptr *)local_c0);
/* try { // try from 00130c4a to 00130c77 has its CatchHandler @ 00130ce0 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,"parse error",(string *)local_a0,": ",local_c0,
param_4);
std::__cxx11::string::~string(local_c0);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 00130cab to 00130cb4 has its CatchHandler @ 00130cd3 */
nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error
(param_1,param_2,*(ulong *)param_3,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
22,733 | qdevtools::PropertyView::PropertyView(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | PropertyView::PropertyView(QWidget* parent) : QWidget(parent), object_{nullptr}
{
if (typeEditor->empty())
registerBuildinEditor();
auto layout = new QGridLayout;
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
} | O3 | cpp | qdevtools::PropertyView::PropertyView(QWidget*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf760
leaq 0x19ad6(%rip), %rax # 0x2b8e0
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1c0, %rax # imm = 0x1C0
movq %rax, 0x10(%rbx)
movq $0x0, 0x28(%rbx)
callq 0x11d44
movq 0x1c0b9(%rip), %rax # 0x2dee8
testq %rax, %rax
je 0x11e3b
cmpq $0x0, 0x30(%rax)
jne 0x11e40
callq 0x11d5a
movl $0x20, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xf030
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf850
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf430
popq %rbx
popq %r14
popq %r15
retq
jmp 0x11e8d
movq %rax, %r15
movl $0x20, %esi
movq %r14, %rdi
callq 0xf0d0
jmp 0x11e90
movq %rax, %r15
movq %rbx, %rdi
callq 0xf340
movq %r15, %rdi
callq 0xf410
| _ZN9qdevtools12PropertyViewC2EP7QWidget:
push r15
push r14
push rbx
mov rbx, rdi
xor edx, edx
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
lea rax, _ZTVN9qdevtools12PropertyViewE; `vtable for'qdevtools::PropertyView
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1C0h
mov [rbx+10h], rax
mov qword ptr [rbx+28h], 0
call _ZN13QGlobalStaticI4QMapIiN9qdevtools14TypeEditorInfoEEL_ZNS1_12_GLOBAL__N_116Q_QGS_typeEditor13innerFunctionEvEL_ZNS5_5guardEEEptEv; QGlobalStatic<QMap<int,qdevtools::TypeEditorInfo>,qdevtools::`anonymous namespace'::Q_QGS_typeEditor::innerFunction(void),qdevtools::`anonymous namespace'::Q_QGS_typeEditor::guard>::operator->(void)
mov rax, cs:_ZZN9qdevtools12_GLOBAL__N_116Q_QGS_typeEditor13innerFunctionEvE6holder; qdevtools::`anonymous namespace'::Q_QGS_typeEditor::innerFunction(void)::holder
test rax, rax
jz short loc_11E3B
cmp qword ptr [rax+30h], 0
jnz short loc_11E40
loc_11E3B:
call _ZN9qdevtools21registerBuildinEditorEv; qdevtools::registerBuildinEditor(void)
loc_11E40:
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN11QGridLayoutC1EP7QWidget; QGridLayout::QGridLayout(QWidget *)
mov rdi, r14; this
xor esi, esi; int
xor edx, edx; int
xor ecx, ecx; int
xor r8d, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
mov rdi, rbx; this
mov rsi, r14; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
pop rbx
pop r14
pop r15
retn
jmp short loc_11E8D
mov r15, rax
mov esi, 20h ; ' '; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_11E90
loc_11E8D:
mov r15, rax
loc_11E90:
mov rdi, rbx; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, r15
call __Unwind_Resume
| long long qdevtools::PropertyView::PropertyView(qdevtools::PropertyView *this, QWidget *a2)
{
QGridLayout *v2; // r14
QWidget::QWidget(this, a2, 0LL);
*(_QWORD *)this = &`vtable for'qdevtools::PropertyView + 2;
*((_QWORD *)this + 2) = &`vtable for'qdevtools::PropertyView + 56;
*((_QWORD *)this + 5) = 0LL;
QGlobalStatic<QMap<int,qdevtools::TypeEditorInfo>,qdevtools::`anonymous namespace'::Q_QGS_typeEditor::innerFunction(void),qdevtools::`anonymous namespace'::Q_QGS_typeEditor::guard>::operator->();
if ( !qdevtools::`anonymous namespace'::Q_QGS_typeEditor::innerFunction(void)::holder
|| !*(_QWORD *)(qdevtools::`anonymous namespace'::Q_QGS_typeEditor::innerFunction(void)::holder + 48) )
{
qdevtools::registerBuildinEditor(this);
}
v2 = (QGridLayout *)operator new(0x20uLL);
QGridLayout::QGridLayout(v2, 0LL);
QLayout::setContentsMargins(v2, 0, 0, 0, 0);
return QWidget::setLayout(this, v2);
}
| PropertyView:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
XOR EDX,EDX
CALL 0x0010f760
LEA RAX,[0x12b8e0]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1c0
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x28],0x0
CALL 0x00111d44
MOV RAX,qword ptr [0x0012dee8]
TEST RAX,RAX
JZ 0x00111e3b
CMP qword ptr [RAX + 0x30],0x0
JNZ 0x00111e40
LAB_00111e3b:
CALL 0x00111d5a
LAB_00111e40:
MOV EDI,0x20
CALL 0x0010f910
LAB_00111e4a:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010f030
LAB_00111e57:
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0010f850
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f430
LAB_00111e73:
POP RBX
POP R14
POP R15
RET
|
/* qdevtools::PropertyView::PropertyView(QWidget*) */
void __thiscall qdevtools::PropertyView::PropertyView(PropertyView *this,QWidget *param_1)
{
QGridLayout *this_00;
PropertyView *this_01;
this_01 = this;
QWidget::QWidget((QWidget *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0012b8f0;
*(int ***)(this + 0x10) = &PTR__PropertyView_0012baa0;
*(int8 *)(this + 0x28) = 0;
QGlobalStatic<QMap<int,qdevtools::TypeEditorInfo>,qdevtools::(anonymous_namespace)::Q_QGS_typeEditor::innerFunction(),qdevtools::(anonymous_namespace)::Q_QGS_typeEditor::guard>
::operator->((QGlobalStatic<QMap<int,qdevtools::TypeEditorInfo>,qdevtools::(anonymous_namespace)::Q_QGS_typeEditor::innerFunction(),qdevtools::(anonymous_namespace)::Q_QGS_typeEditor::guard>
*)this_01);
if (((anonymous_namespace)::Q_QGS_typeEditor::innerFunction()::holder == 0) ||
(*(long *)((anonymous_namespace)::Q_QGS_typeEditor::innerFunction()::holder + 0x30) == 0)) {
/* try { // try from 00111e3b to 00111e3f has its CatchHandler @ 00111e79 */
registerBuildinEditor();
}
/* try { // try from 00111e40 to 00111e49 has its CatchHandler @ 00111e8d */
this_00 = (QGridLayout *)operator_new(0x20);
/* try { // try from 00111e4a to 00111e56 has its CatchHandler @ 00111e7b */
QGridLayout::QGridLayout(this_00,(QWidget *)0x0);
/* try { // try from 00111e57 to 00111e72 has its CatchHandler @ 00111e8d */
QLayout::setContentsMargins((int)this_00,0,0,0);
QWidget::setLayout((QLayout *)this);
return;
}
| |
22,734 | skip_trailing_space | eloqsql/strings/strings_def.h | static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
} | O0 | c | skip_trailing_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x14, -0x10(%rbp)
jbe 0x9282a
movq -0x18(%rbp), %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x9278d
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x92828
jmp 0x9279d
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x29(%rbp)
jbe 0x927bd
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x927c6
jmp 0x927d4
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9279d
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x92826
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x92826
jmp 0x927ed
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jbe 0x9280d
movq -0x18(%rbp), %rax
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x92816
jmp 0x92824
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x927ed
jmp 0x92826
jmp 0x92828
jmp 0x9282a
jmp 0x9282c
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x2b(%rbp)
jbe 0x9284c
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x92855
jmp 0x92863
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x9282c
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| skip_trailing_space_1:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_10], 14h
jbe loc_9282A
mov rax, [rbp+var_18]
shr rax, 2
shl rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
add rax, 4
sub rax, 1
shr rax, 2
shl rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_9278D:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_8]
jbe loc_92828
jmp short $+2
loc_9279D:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_29], al
jbe short loc_927BD
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_29], al
loc_927BD:
mov al, [rbp+var_29]
test al, 1
jnz short loc_927C6
jmp short loc_927D4
loc_927C6:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_9279D
loc_927D4:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
jnz short loc_92826
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_92826
jmp short $+2
loc_927ED:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_2A], al
jbe short loc_9280D
mov rax, [rbp+var_18]
cmp dword ptr [rax-4], 20202020h
setz al
mov [rbp+var_2A], al
loc_9280D:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_92816
jmp short loc_92824
loc_92816:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
jmp short loc_927ED
loc_92824:
jmp short $+2
loc_92826:
jmp short $+2
loc_92828:
jmp short $+2
loc_9282A:
jmp short $+2
loc_9282C:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_2B], al
jbe short loc_9284C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_2B], al
loc_9284C:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_92855
jmp short loc_92863
loc_92855:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_9282C
loc_92863:
mov rax, [rbp+var_18]
pop rbp
retn
| unsigned long long skip_trailing_space_1(unsigned long long a1, unsigned long long a2)
{
bool v3; // [rsp+1h] [rbp-2Bh]
bool v4; // [rsp+2h] [rbp-2Ah]
bool v5; // [rsp+3h] [rbp-29h]
unsigned long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+Ch] [rbp-20h]
unsigned long long v8; // [rsp+14h] [rbp-18h]
v8 = a2 + a1;
if ( a2 > 0x14 )
{
v7 = 4 * (v8 >> 2);
v6 = 4 * ((a1 + 3) >> 2);
if ( v7 > a1 )
{
while ( 1 )
{
v5 = 0;
if ( v8 > v7 )
v5 = *(_BYTE *)(v8 - 1) == 32;
if ( !v5 )
break;
--v8;
}
if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 )
{
while ( 1 )
{
v4 = 0;
if ( v8 > v6 )
v4 = *(_DWORD *)(v8 - 4) == 538976288;
if ( !v4 )
break;
v8 -= 4LL;
}
}
}
}
while ( 1 )
{
v3 = 0;
if ( v8 > a1 )
v3 = *(_BYTE *)(v8 - 1) == 32;
if ( !v3 )
break;
--v8;
}
return v8;
}
| skip_trailing_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x10],0x14
JBE 0x0019282a
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
SUB RAX,0x1
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0019278d
LAB_0019278d:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x00192828
JMP 0x0019279d
LAB_0019279d:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x29],AL
JBE 0x001927bd
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_001927bd:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x001927c6
JMP 0x001927d4
LAB_001927c6:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0019279d
LAB_001927d4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
JNZ 0x00192826
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00192826
JMP 0x001927ed
LAB_001927ed:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x2a],AL
JBE 0x0019280d
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + -0x4],0x20202020
SETZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_0019280d:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x00192816
JMP 0x00192824
LAB_00192816:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001927ed
LAB_00192824:
JMP 0x00192826
LAB_00192826:
JMP 0x00192828
LAB_00192828:
JMP 0x0019282a
LAB_0019282a:
JMP 0x0019282c
LAB_0019282c:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x2b],AL
JBE 0x0019284c
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_0019284c:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x00192855
JMP 0x00192863
LAB_00192855:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0019282c
LAB_00192863:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
ulong skip_trailing_space(ulong param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_20;
local_20 = param_1 + param_2;
if (0x14 < param_2) {
uVar1 = local_20 & 0xfffffffffffffffc;
uVar2 = param_1 + 3 & 0xfffffffffffffffc;
if (param_1 < uVar1) {
while( true ) {
bVar3 = false;
if (uVar1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) {
while( true ) {
bVar3 = false;
if (uVar2 < local_20) {
bVar3 = *(int *)(local_20 - 4) == 0x20202020;
}
if (!bVar3) break;
local_20 = local_20 - 4;
}
}
}
}
while( true ) {
bVar3 = false;
if (param_1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
return local_20;
}
| |
22,735 | foreach_function(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&, std::function<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&)> const&) | monkey531[P]llama/common/chat.cpp | static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) {
for (const auto & tool : tools) {
if (!tool.contains("type") || tool["type"] != "function" || !tool.contains("function")) {
LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str());
continue;
}
fn(tool);
}
} | O1 | cpp | foreach_function(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&, std::function<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&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x8e914
movq %r14, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
movzbl (%r14), %eax
cmpl $0x2, %eax
je 0xda993
cmpl $0x1, %eax
jne 0xda99e
movq $0x0, 0x8(%rsp)
jmp 0xda9a3
movq $0x0, 0x10(%rsp)
jmp 0xda9a3
movq %rbx, 0x18(%rsp)
cmpl $0x2, %eax
je 0xda9bc
cmpl $0x1, %eax
jne 0xda9cb
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0xda9d4
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0xda9d4
movq $0x1, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
callq 0x8e9d8
testb %al, %al
jne 0xdaaff
leaq 0x48(%rsp), %r14
leaq 0x116dc(%rip), %r15 # 0xec0d1
leaq 0x55a1c(%rip), %r12 # 0x130418
movq %rsp, %r13
movq %r14, %rdi
callq 0x8e618
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0xa61a6
testb %al, %al
je 0xdaa62
movq %rbp, %rdi
movq %r15, %rsi
callq 0xa7466
movq %rax, %rdi
leaq 0x158da(%rip), %rsi # 0xf0308
callq 0xa6ec1
testb %al, %al
jne 0xdaa62
movq %rbp, %rdi
leaq 0x158c7(%rip), %rsi # 0xf0308
callq 0xc5cb2
testb %al, %al
je 0xdaa62
movq 0x20(%rsp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0xdab0e
movq %rbp, %rsi
callq *0x18(%rdi)
jmp 0xdaac5
cmpl $0x0, (%r12)
js 0xdaac5
callq 0xcdefb
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
movl $0x2, %edx
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x81140
movq 0x28(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
leaq 0x1eee0(%rip), %rdx # 0xf9982
xorl %eax, %eax
callq 0xcdf96
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xdaac5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq 0x48(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xdaadf
cmpl $0x1, %eax
jne 0xdaae7
addq $0x30, 0x50(%rsp)
jmp 0xdaaec
addq $0x10, 0x58(%rsp)
jmp 0xdaaec
incq 0x60(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x8e9d8
testb %al, %al
je 0xda9ff
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1b320
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xdab32
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rdi
callq 0x1bf90
| _ZL16foreach_functionRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKSt8functionIFvSF_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_78], rsi
mov r14, rdi
mov rbx, 8000000000000000h
lea rdi, [rsp+98h+var_50]
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void)
mov [rsp+98h+var_98], r14
xorps xmm0, xmm0
movups [rsp+98h+var_90], xmm0
mov [rsp+98h+var_80], rbx
movzx eax, byte ptr [r14]
cmp eax, 2
jz short loc_DA993
cmp eax, 1
jnz short loc_DA99E
mov qword ptr [rsp+98h+var_90], 0
jmp short loc_DA9A3
loc_DA993:
mov qword ptr [rsp+98h+var_90+8], 0
jmp short loc_DA9A3
loc_DA99E:
mov [rsp+98h+var_80], rbx
loc_DA9A3:
cmp eax, 2
jz short loc_DA9BC
cmp eax, 1
jnz short loc_DA9CB
mov rax, [r14+8]
mov rax, [rax+8]
mov qword ptr [rsp+98h+var_90], rax
jmp short loc_DA9D4
loc_DA9BC:
mov rax, [r14+8]
mov rax, [rax+8]
mov qword ptr [rsp+98h+var_90+8], rax
jmp short loc_DA9D4
loc_DA9CB:
mov [rsp+98h+var_80], 1
loc_DA9D4:
lea rdi, [rsp+98h+var_50]
mov rsi, rsp
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_DAAFF
lea r14, [rsp+98h+var_50]
lea r15, aPplOutputType+0Dh; "type"
lea r12, common_log_verbosity_thold
mov r13, rsp
loc_DA9FF:
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rbp, rax
mov rdi, rax
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_DAA62
mov rdi, rbp
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *)
mov rdi, rax
lea rsi, aFailedToFindRp_0+1Eh; "function"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
test al, al
jnz short loc_DAA62
mov rdi, rbp
lea rsi, aFailedToFindRp_0+1Eh; "function"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_DAA62
mov rdi, [rsp+98h+var_78]
cmp qword ptr [rdi+10h], 0
jz loc_DAB0E
mov rsi, rbp
call qword ptr [rdi+18h]
jmp short loc_DAAC5
loc_DAA62:
cmp dword ptr [r12], 0
js short loc_DAAC5
call _Z15common_log_mainv; common_log_main(void)
mov rbx, rax
lea rdi, [rsp+98h+var_70]
mov rsi, rbp
mov edx, 2
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rcx, [rsp+98h+var_70]
mov rdi, rbx
mov esi, 2
lea rdx, aSkippingToolWi; "Skipping tool without function: %s"
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
mov rdi, [rsp+98h+var_70]; void *
lea rax, [rsp+98h+var_60]
cmp rdi, rax
jz short loc_DAAC5
mov rsi, [rsp+98h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DAAC5:
mov rax, [rsp+98h+var_50]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_DAADF
cmp eax, 1
jnz short loc_DAAE7
add [rsp+98h+var_48], 30h ; '0'
jmp short loc_DAAEC
loc_DAADF:
add [rsp+98h+var_40], 10h
jmp short loc_DAAEC
loc_DAAE7:
inc [rsp+98h+var_38]
loc_DAAEC:
mov rdi, r14
mov rsi, r13
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_DA9FF
loc_DAAFF:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_DAB0E:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
mov rdi, [rsp+98h+var_70]; void *
lea rax, [rsp+98h+var_60]
cmp rdi, rax
jz short loc_DAB32
mov rsi, [rsp+98h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DAB32:
mov rdi, rbx
call __Unwind_Resume
| long long foreach_function(
unsigned __int8 *a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
int v10; // eax
long long result; // rax
long long v12; // rbp
long long v13; // rax
void *v14; // rbx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
int v19; // eax
unsigned __int8 *v20; // [rsp+0h] [rbp-98h] BYREF
__int128 v21; // [rsp+8h] [rbp-90h]
long long v22; // [rsp+18h] [rbp-80h]
long long v23; // [rsp+20h] [rbp-78h]
void *v24; // [rsp+28h] [rbp-70h] BYREF
long long v25; // [rsp+38h] [rbp-60h] BYREF
unsigned __int8 *v26; // [rsp+48h] [rbp-50h] BYREF
long long v27; // [rsp+50h] [rbp-48h]
long long v28; // [rsp+58h] [rbp-40h]
long long v29; // [rsp+60h] [rbp-38h]
v23 = a2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin(
(long long)&v26,
a1);
v20 = a1;
v21 = 0LL;
v22 = 0x8000000000000000LL;
v10 = *a1;
if ( v10 == 2 )
{
*((_QWORD *)&v21 + 1) = 0LL;
}
else if ( v10 == 1 )
{
*(_QWORD *)&v21 = 0LL;
}
else
{
v22 = 0x8000000000000000LL;
}
if ( v10 == 2 )
{
*((_QWORD *)&v21 + 1) = *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
}
else if ( v10 == 1 )
{
*(_QWORD *)&v21 = *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
}
else
{
v22 = 1LL;
}
for ( result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v20);
!(_BYTE)result;
result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v20) )
{
v12 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v26);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v12,
(long long)"type")
&& (v13 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v12,
"type"),
!(unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
v13,
(long long)"function"))
&& ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v12,
(long long)"function") )
{
if ( !*(_QWORD *)(v23 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, long long))(v23 + 24))(v23, v12);
}
else if ( common_log_verbosity_thold[0] >= 0 )
{
v14 = common_log_main();
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>::dump(
(long long)&v24,
v12,
2,
32,
0,
0);
common_log_add(
(long long)v14,
2LL,
(long long)"Skipping tool without function: %s",
(long long)v24,
v15,
v16,
(__m128)0LL,
a4,
a5,
a6,
v17,
v18,
a9,
a10,
(char)v20);
if ( v24 != &v25 )
operator delete(v24, v25 + 1);
}
v19 = *v26;
if ( v19 == 2 )
{
v28 += 16LL;
}
else if ( v19 == 1 )
{
v27 += 48LL;
}
else
{
++v29;
}
}
return result;
}
| foreach_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x20],RSI
MOV R14,RDI
MOV RBX,-0x8000000000000000
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x0018e914
MOV qword ptr [RSP],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP + 0x18],RBX
MOVZX EAX,byte ptr [R14]
CMP EAX,0x2
JZ 0x001da993
CMP EAX,0x1
JNZ 0x001da99e
MOV qword ptr [RSP + 0x8],0x0
JMP 0x001da9a3
LAB_001da993:
MOV qword ptr [RSP + 0x10],0x0
JMP 0x001da9a3
LAB_001da99e:
MOV qword ptr [RSP + 0x18],RBX
LAB_001da9a3:
CMP EAX,0x2
JZ 0x001da9bc
CMP EAX,0x1
JNZ 0x001da9cb
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001da9d4
LAB_001da9bc:
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001da9d4
LAB_001da9cb:
MOV qword ptr [RSP + 0x18],0x1
LAB_001da9d4:
LEA RDI,[RSP + 0x48]
MOV RSI,RSP
CALL 0x0018e9d8
TEST AL,AL
JNZ 0x001daaff
LEA R14,[RSP + 0x48]
LEA R15,[0x1ec0d1]
LEA R12,[0x230418]
MOV R13,RSP
LAB_001da9ff:
MOV RDI,R14
CALL 0x0018e618
MOV RBP,RAX
MOV RDI,RAX
MOV RSI,R15
CALL 0x001a61a6
TEST AL,AL
JZ 0x001daa62
MOV RDI,RBP
MOV RSI,R15
CALL 0x001a7466
MOV RDI,RAX
LEA RSI,[0x1f0308]
CALL 0x001a6ec1
TEST AL,AL
JNZ 0x001daa62
MOV RDI,RBP
LEA RSI,[0x1f0308]
CALL 0x001c5cb2
TEST AL,AL
JZ 0x001daa62
MOV RDI,qword ptr [RSP + 0x20]
CMP qword ptr [RDI + 0x10],0x0
JZ 0x001dab0e
MOV RSI,RBP
CALL qword ptr [RDI + 0x18]
JMP 0x001daac5
LAB_001daa62:
CMP dword ptr [R12],0x0
JS 0x001daac5
CALL 0x001cdefb
MOV RBX,RAX
LEA RDI,[RSP + 0x28]
MOV RSI,RBP
MOV EDX,0x2
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00181140
MOV RCX,qword ptr [RSP + 0x28]
LAB_001daa93:
MOV RDI,RBX
MOV ESI,0x2
LEA RDX,[0x1f9982]
XOR EAX,EAX
CALL 0x001cdf96
LAB_001daaa9:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x001daac5
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8e0
LAB_001daac5:
MOV RAX,qword ptr [RSP + 0x48]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001daadf
CMP EAX,0x1
JNZ 0x001daae7
ADD qword ptr [RSP + 0x50],0x30
JMP 0x001daaec
LAB_001daadf:
ADD qword ptr [RSP + 0x58],0x10
JMP 0x001daaec
LAB_001daae7:
INC qword ptr [RSP + 0x60]
LAB_001daaec:
MOV RDI,R14
MOV RSI,R13
CALL 0x0018e9d8
TEST AL,AL
JZ 0x001da9ff
LAB_001daaff:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001dab0e:
CALL 0x0011b320
|
/* foreach_function(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&, std::function<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&)> const&) */
void foreach_function(basic_json *param_1,function *param_2)
{
char cVar1;
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;
basic_json *pbVar2;
int8 uVar3;
basic_json *local_98;
int8 local_90;
int8 uStack_88;
int8 local_80;
function *local_78;
long *local_70 [2];
long local_60 [2];
char *local_50;
long local_48;
long local_40;
long local_38;
local_78 = param_2;
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>
::cbegin();
local_80 = 0x8000000000000000;
uStack_88 = 0;
local_90 = 0;
if (*param_1 == (basic_json)0x2) {
uStack_88 = *(int8 *)(*(long *)(param_1 + 8) + 8);
}
else if (*param_1 == (basic_json)0x1) {
local_90 = *(int8 *)(*(long *)(param_1 + 8) + 8);
}
else {
local_80 = 1;
}
local_98 = param_1;
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_50,&local_98);
if (cVar1 == '\0') {
do {
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>
*)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50);
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,"type");
if (cVar1 == '\0') {
LAB_001daa62:
if (-1 < common_log_verbosity_thold) {
uVar3 = common_log_main();
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>
::dump(local_70,this,2,0x20,0,0);
/* try { // try from 001daa93 to 001daaa8 has its CatchHandler @ 001dab13 */
common_log_add(uVar3,2,"Skipping tool without function: %s",local_70[0]);
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
}
}
else {
pbVar2 = 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[]<char_const>(this,"type");
cVar1 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(pbVar2,"function");
if ((cVar1 != '\0') ||
(cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,"function"), cVar1 == '\0')) goto LAB_001daa62;
if (*(long *)(local_78 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
(**(code **)(local_78 + 0x18))(local_78,this);
}
if (*local_50 == '\x02') {
local_40 = local_40 + 0x10;
}
else if (*local_50 == '\x01') {
local_48 = local_48 + 0x30;
}
else {
local_38 = local_38 + 1;
}
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50,&local_98);
} while (cVar1 == '\0');
}
return;
}
| |
22,736 | my_xml_scan | eloqsql/strings/xml.c | static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
{
int lex;
for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++);
if (p->cur >= p->end)
{
a->beg=p->end;
a->end=p->end;
lex=MY_XML_EOF;
goto ret;
}
a->beg=p->cur;
a->end=p->cur;
if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--")))
{
for (; p->cur < p->end; p->cur++)
{
if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->")))
{
p->cur+= 3;
break;
}
}
a->end=p->cur;
lex=MY_XML_COMMENT;
}
else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA[")))
{
p->cur+= 9;
for (; p->cur < p->end - 2 ; p->cur++)
{
if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>')
{
p->cur+= 3;
a->end= p->cur;
break;
}
}
lex= MY_XML_CDATA;
}
else if (strchr("?=/<>!",p->cur[0]))
{
p->cur++;
a->end=p->cur;
lex=a->beg[0];
}
else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') )
{
/*
"string" or 'string' found.
Scan until the closing quote/doublequote, or until the END-OF-INPUT.
*/
p->cur++;
for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++)
{}
a->end=p->cur;
if (p->cur < p->end) /* Closing quote or doublequote has been found */
p->cur++;
a->beg++;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(a);
lex=MY_XML_STRING;
}
else if (my_xml_is_id0(p->cur[0]))
{
p->cur++;
while (p->cur < p->end && my_xml_is_id1(p->cur[0]))
p->cur++;
a->end=p->cur;
my_xml_norm_text(a);
lex=MY_XML_IDENT;
}
else
lex= MY_XML_UNKNOWN;
#if 0
printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg);
#endif
ret:
return lex;
} | O3 | c | my_xml_scan:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x130(%rdi), %rax
movq 0x138(%rdi), %rcx
cmpq %rcx, %rax
jae 0x93322
leaq 0x2827c6(%rip), %rbx # 0x315ad0
movzbl (%rax), %edx
testb $0x8, (%rdx,%rbx)
je 0x93348
incq %rax
movq %rax, 0x130(%r14)
cmpq %rcx, %rax
jne 0x9330a
movq %rcx, (%rsi)
movq 0x138(%r14), %rax
movq %rax, 0x8(%rsi)
movl $0x45, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%rsi)
movq 0x130(%r14), %r13
movq %r13, 0x8(%rsi)
movq 0x138(%r14), %r12
leaq 0x4(%r13), %rax
cmpq %r12, %rax
ja 0x93370
cmpl $0x2d2d213c, (%r13) # imm = 0x2D2D213C
je 0x933d9
leaq 0x9(%r13), %rax
cmpq %r12, %rax
ja 0x93399
movabsq $0x41544144435b213c, %rcx # imm = 0x41544144435B213C
xorq (%r13), %rcx
movzbl 0x8(%r13), %edx
xorq $0x5b, %rdx
orq %rcx, %rdx
je 0x93486
movq %rsi, -0x30(%rbp)
movsbl (%r13), %r15d
leaq 0x7c5e(%rip), %rdi # 0x9b007
movl $0x7, %edx
movl %r15d, %esi
callq 0x28430
testq %rax, %rax
je 0x93415
incq %r13
movq %r13, 0x130(%r14)
movq -0x30(%rbp), %rax
movq %r13, 0x8(%rax)
movq (%rax), %rax
movsbl (%rax), %r15d
jmp 0x93336
leaq 0x3(%r13), %rax
cmpq %r12, %rax
ja 0x933fe
movzwl (%r13), %ecx
xorl $0x2d2d, %ecx # imm = 0x2D2D
movzbl 0x2(%r13), %edx
xorl $0x3e, %edx
orw %cx, %dx
je 0x9351c
incq %r13
movq %r13, 0x130(%r14)
cmpq %r12, %r13
jne 0x933d9
movq %r12, %rax
jmp 0x93523
movzbl %r15b, %eax
cmpq $0x27, %rax
movq -0x30(%rbp), %rdi
je 0x9342c
cmpl $0x22, %eax
jne 0x934d9
incq %r13
movq %r13, %rax
movq %r13, 0x130(%r14)
cmpq %r12, %r13
jae 0x9344b
movb (%rax), %cl
movq (%rdi), %rdx
leaq 0x1(%rax), %r13
cmpb (%rdx), %cl
jne 0x9342f
movq %rax, 0x8(%rdi)
movq 0x130(%r14), %rax
cmpq 0x138(%r14), %rax
jae 0x93469
incq %rax
movq %rax, 0x130(%r14)
incq (%rdi)
movl $0x53, %r15d
testb $0x2, (%r14)
jne 0x93336
callq 0x93917
jmp 0x93336
leaq -0x2(%r12), %rcx
movq %rax, 0x130(%r14)
movl $0x44, %r15d
cmpq %rcx, %rax
jae 0x93336
subq %r13, %r12
addq $0xc, %r13
addq $-0xb, %r12
cmpb $0x5d, -0x3(%r13)
jne 0x934c1
cmpb $0x5d, -0x2(%r13)
jne 0x934c1
cmpb $0x3e, -0x1(%r13)
je 0x93532
leaq -0x2(%r13), %rax
movq %rax, 0x130(%r14)
incq %r13
decq %r12
jne 0x934ac
jmp 0x93336
movl $0x55, %r15d
testb $0x1, (%rax,%rbx)
je 0x93336
incq %r13
movq %r13, %rax
movq %r13, 0x130(%r14)
cmpq %r12, %r13
jae 0x93508
movzbl (%rax), %ecx
leaq 0x1(%rax), %r13
testb $0x2, (%rcx,%rbx)
jne 0x934ec
movq %rax, 0x8(%rdi)
callq 0x93917
movl $0x49, %r15d
jmp 0x93336
movq %rax, 0x130(%r14)
movq %rax, 0x8(%rsi)
movl $0x43, %r15d
jmp 0x93336
movq %r13, 0x130(%r14)
movq %r13, 0x8(%rsi)
jmp 0x93336
| my_xml_scan:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov rax, [rdi+130h]
mov rcx, [rdi+138h]
cmp rax, rcx
jnb short loc_93322
lea rbx, my_xml_ctype
loc_9330A:
movzx edx, byte ptr [rax]
test byte ptr [rdx+rbx], 8
jz short loc_93348
inc rax
mov [r14+130h], rax
cmp rax, rcx
jnz short loc_9330A
loc_93322:
mov [rsi], rcx
mov rax, [r14+138h]
mov [rsi+8], rax
mov r15d, 45h ; 'E'
loc_93336:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93348:
mov [rsi], rax
mov r13, [r14+130h]
mov [rsi+8], r13
mov r12, [r14+138h]
lea rax, [r13+4]
cmp rax, r12
ja short loc_93370
cmp dword ptr [r13+0], 2D2D213Ch
jz short loc_933D9
loc_93370:
lea rax, [r13+9]
cmp rax, r12
ja short loc_93399
mov rcx, 41544144435B213Ch
xor rcx, [r13+0]
movzx edx, byte ptr [r13+8]
xor rdx, 5Bh
or rdx, rcx
jz loc_93486
loc_93399:
mov [rbp+var_30], rsi
movsx r15d, byte ptr [r13+0]
lea rdi, asc_9B007; "?=/<>!"
mov edx, 7
mov esi, r15d
call _memchr
test rax, rax
jz short loc_93415
inc r13
mov [r14+130h], r13
mov rax, [rbp+var_30]
mov [rax+8], r13
mov rax, [rax]
movsx r15d, byte ptr [rax]
jmp loc_93336
loc_933D9:
lea rax, [r13+3]
cmp rax, r12
ja short loc_933FE
movzx ecx, word ptr [r13+0]
xor ecx, 2D2Dh
movzx edx, byte ptr [r13+2]
xor edx, 3Eh
or dx, cx
jz loc_9351C
loc_933FE:
inc r13
mov [r14+130h], r13
cmp r13, r12
jnz short loc_933D9
mov rax, r12
jmp loc_93523
loc_93415:
movzx eax, r15b
cmp rax, 27h ; '''
mov rdi, [rbp+var_30]
jz short loc_9342C
cmp eax, 22h ; '"'
jnz loc_934D9
loc_9342C:
inc r13
loc_9342F:
mov rax, r13
mov [r14+130h], r13
cmp r13, r12
jnb short loc_9344B
mov cl, [rax]
mov rdx, [rdi]
lea r13, [rax+1]
cmp cl, [rdx]
jnz short loc_9342F
loc_9344B:
mov [rdi+8], rax
mov rax, [r14+130h]
cmp rax, [r14+138h]
jnb short loc_93469
inc rax
mov [r14+130h], rax
loc_93469:
inc qword ptr [rdi]
mov r15d, 53h ; 'S'
test byte ptr [r14], 2
jnz loc_93336
call my_xml_norm_text
jmp loc_93336
loc_93486:
lea rcx, [r12-2]
mov [r14+130h], rax
mov r15d, 44h ; 'D'
cmp rax, rcx
jnb loc_93336
sub r12, r13
add r13, 0Ch
add r12, 0FFFFFFFFFFFFFFF5h
loc_934AC:
cmp byte ptr [r13-3], 5Dh ; ']'
jnz short loc_934C1
cmp byte ptr [r13-2], 5Dh ; ']'
jnz short loc_934C1
cmp byte ptr [r13-1], 3Eh ; '>'
jz short loc_93532
loc_934C1:
lea rax, [r13-2]
mov [r14+130h], rax
inc r13
dec r12
jnz short loc_934AC
jmp loc_93336
loc_934D9:
mov r15d, 55h ; 'U'
test byte ptr [rax+rbx], 1
jz loc_93336
inc r13
loc_934EC:
mov rax, r13
mov [r14+130h], r13
cmp r13, r12
jnb short loc_93508
movzx ecx, byte ptr [rax]
lea r13, [rax+1]
test byte ptr [rcx+rbx], 2
jnz short loc_934EC
loc_93508:
mov [rdi+8], rax
call my_xml_norm_text
mov r15d, 49h ; 'I'
jmp loc_93336
loc_9351C:
mov [r14+130h], rax
loc_93523:
mov [rsi+8], rax
mov r15d, 43h ; 'C'
jmp loc_93336
loc_93532:
mov [r14+130h], r13
mov [rsi+8], r13
jmp loc_93336
| long long my_xml_scan(long long a1, unsigned __int8 **a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 *v3; // rcx
unsigned int v4; // r15d
char *v6; // r13
unsigned long long v7; // r12
unsigned long long v8; // rax
unsigned __int8 v9; // r15
char *v10; // r13
char *v11; // rax
long long v12; // rax
char *v13; // r13
char *v14; // rax
unsigned long long v15; // rax
unsigned long long v16; // r12
char *v17; // r13
unsigned long long v18; // r12
char *v19; // r13
char *v20; // rax
long long v21; // rcx
v2 = *(unsigned __int8 **)(a1 + 304);
v3 = *(unsigned __int8 **)(a1 + 312);
if ( v2 >= v3 )
{
LABEL_4:
*a2 = v3;
a2[1] = *(unsigned __int8 **)(a1 + 312);
return 69;
}
else
{
while ( (my_xml_ctype[*v2] & 8) != 0 )
{
*(_QWORD *)(a1 + 304) = ++v2;
if ( v2 == v3 )
goto LABEL_4;
}
*a2 = v2;
v6 = *(char **)(a1 + 304);
a2[1] = (unsigned __int8 *)v6;
v7 = *(_QWORD *)(a1 + 312);
if ( (unsigned long long)(v6 + 4) <= v7 && *(_DWORD *)v6 == 757932348 )
{
while ( 1 )
{
v11 = v6 + 3;
if ( (unsigned long long)(v6 + 3) <= v7 && !(*(_WORD *)v6 ^ 0x2D2D | (unsigned __int8)v6[2] ^ 0x3E) )
break;
*(_QWORD *)(a1 + 304) = ++v6;
if ( v6 == (char *)v7 )
{
v11 = (char *)v7;
goto LABEL_38;
}
}
*(_QWORD *)(a1 + 304) = v11;
LABEL_38:
a2[1] = (unsigned __int8 *)v11;
return 67;
}
else
{
v8 = (unsigned long long)(v6 + 9);
if ( (unsigned long long)(v6 + 9) > v7 || *(_QWORD *)v6 ^ 0x41544144435B213CLL | (unsigned __int8)v6[8] ^ 0x5BLL )
{
v9 = *v6;
if ( memchr("?=/<>!", (unsigned int)*v6, 7LL) )
{
v10 = v6 + 1;
*(_QWORD *)(a1 + 304) = v10;
a2[1] = (unsigned __int8 *)v10;
return (unsigned int)(char)**a2;
}
else
{
v12 = v9;
if ( v9 == 39LL || v9 == 34 )
{
v13 = v6 + 1;
do
{
v14 = v13;
*(_QWORD *)(a1 + 304) = v13;
if ( (unsigned long long)v13 >= v7 )
break;
++v13;
}
while ( *v14 != **a2 );
a2[1] = (unsigned __int8 *)v14;
v15 = *(_QWORD *)(a1 + 304);
if ( v15 < *(_QWORD *)(a1 + 312) )
*(_QWORD *)(a1 + 304) = v15 + 1;
++*a2;
v4 = 83;
if ( (*(_BYTE *)a1 & 2) == 0 )
my_xml_norm_text(a2);
}
else
{
v4 = 85;
if ( (my_xml_ctype[v12] & 1) != 0 )
{
v19 = v6 + 1;
do
{
v20 = v19;
*(_QWORD *)(a1 + 304) = v19;
if ( (unsigned long long)v19 >= v7 )
break;
v21 = (unsigned __int8)*v19++;
}
while ( (my_xml_ctype[v21] & 2) != 0 );
a2[1] = (unsigned __int8 *)v20;
my_xml_norm_text(a2);
return 73;
}
}
}
}
else
{
*(_QWORD *)(a1 + 304) = v8;
v4 = 68;
if ( v8 < v7 - 2 )
{
v16 = v7 - (_QWORD)v6;
v17 = v6 + 12;
v18 = v16 - 11;
while ( *(v17 - 3) != 93 || *(v17 - 2) != 93 || *(v17 - 1) != 62 )
{
*(_QWORD *)(a1 + 304) = v17 - 2;
++v17;
if ( !--v18 )
return v4;
}
*(_QWORD *)(a1 + 304) = v17;
a2[1] = (unsigned __int8 *)v17;
}
}
}
}
return v4;
}
| my_xml_scan:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x130]
MOV RCX,qword ptr [RDI + 0x138]
CMP RAX,RCX
JNC 0x00193322
LEA RBX,[0x415ad0]
LAB_0019330a:
MOVZX EDX,byte ptr [RAX]
TEST byte ptr [RDX + RBX*0x1],0x8
JZ 0x00193348
INC RAX
MOV qword ptr [R14 + 0x130],RAX
CMP RAX,RCX
JNZ 0x0019330a
LAB_00193322:
MOV qword ptr [RSI],RCX
MOV RAX,qword ptr [R14 + 0x138]
MOV qword ptr [RSI + 0x8],RAX
MOV R15D,0x45
LAB_00193336:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193348:
MOV qword ptr [RSI],RAX
MOV R13,qword ptr [R14 + 0x130]
MOV qword ptr [RSI + 0x8],R13
MOV R12,qword ptr [R14 + 0x138]
LEA RAX,[R13 + 0x4]
CMP RAX,R12
JA 0x00193370
CMP dword ptr [R13],0x2d2d213c
JZ 0x001933d9
LAB_00193370:
LEA RAX,[R13 + 0x9]
CMP RAX,R12
JA 0x00193399
MOV RCX,0x41544144435b213c
XOR RCX,qword ptr [R13]
MOVZX EDX,byte ptr [R13 + 0x8]
XOR RDX,0x5b
OR RDX,RCX
JZ 0x00193486
LAB_00193399:
MOV qword ptr [RBP + -0x30],RSI
MOVSX R15D,byte ptr [R13]
LEA RDI,[0x19b007]
MOV EDX,0x7
MOV ESI,R15D
CALL 0x00128430
TEST RAX,RAX
JZ 0x00193415
INC R13
MOV qword ptr [R14 + 0x130],R13
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],R13
MOV RAX,qword ptr [RAX]
MOVSX R15D,byte ptr [RAX]
JMP 0x00193336
LAB_001933d9:
LEA RAX,[R13 + 0x3]
CMP RAX,R12
JA 0x001933fe
MOVZX ECX,word ptr [R13]
XOR ECX,0x2d2d
MOVZX EDX,byte ptr [R13 + 0x2]
XOR EDX,0x3e
OR DX,CX
JZ 0x0019351c
LAB_001933fe:
INC R13
MOV qword ptr [R14 + 0x130],R13
CMP R13,R12
JNZ 0x001933d9
MOV RAX,R12
JMP 0x00193523
LAB_00193415:
MOVZX EAX,R15B
CMP RAX,0x27
MOV RDI,qword ptr [RBP + -0x30]
JZ 0x0019342c
CMP EAX,0x22
JNZ 0x001934d9
LAB_0019342c:
INC R13
LAB_0019342f:
MOV RAX,R13
MOV qword ptr [R14 + 0x130],R13
CMP R13,R12
JNC 0x0019344b
MOV CL,byte ptr [RAX]
MOV RDX,qword ptr [RDI]
LEA R13,[RAX + 0x1]
CMP CL,byte ptr [RDX]
JNZ 0x0019342f
LAB_0019344b:
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [R14 + 0x130]
CMP RAX,qword ptr [R14 + 0x138]
JNC 0x00193469
INC RAX
MOV qword ptr [R14 + 0x130],RAX
LAB_00193469:
INC qword ptr [RDI]
MOV R15D,0x53
TEST byte ptr [R14],0x2
JNZ 0x00193336
CALL 0x00193917
JMP 0x00193336
LAB_00193486:
LEA RCX,[R12 + -0x2]
MOV qword ptr [R14 + 0x130],RAX
MOV R15D,0x44
CMP RAX,RCX
JNC 0x00193336
SUB R12,R13
ADD R13,0xc
ADD R12,-0xb
LAB_001934ac:
CMP byte ptr [R13 + -0x3],0x5d
JNZ 0x001934c1
CMP byte ptr [R13 + -0x2],0x5d
JNZ 0x001934c1
CMP byte ptr [R13 + -0x1],0x3e
JZ 0x00193532
LAB_001934c1:
LEA RAX,[R13 + -0x2]
MOV qword ptr [R14 + 0x130],RAX
INC R13
DEC R12
JNZ 0x001934ac
JMP 0x00193336
LAB_001934d9:
MOV R15D,0x55
TEST byte ptr [RAX + RBX*0x1],0x1
JZ 0x00193336
INC R13
LAB_001934ec:
MOV RAX,R13
MOV qword ptr [R14 + 0x130],R13
CMP R13,R12
JNC 0x00193508
MOVZX ECX,byte ptr [RAX]
LEA R13,[RAX + 0x1]
TEST byte ptr [RCX + RBX*0x1],0x2
JNZ 0x001934ec
LAB_00193508:
MOV qword ptr [RDI + 0x8],RAX
CALL 0x00193917
MOV R15D,0x49
JMP 0x00193336
LAB_0019351c:
MOV qword ptr [R14 + 0x130],RAX
LAB_00193523:
MOV qword ptr [RSI + 0x8],RAX
MOV R15D,0x43
JMP 0x00193336
LAB_00193532:
MOV qword ptr [R14 + 0x130],R13
MOV qword ptr [RSI + 0x8],R13
JMP 0x00193336
|
int my_xml_scan(byte *param_1,long *param_2)
{
byte bVar1;
uint uVar2;
byte *pbVar3;
void *pvVar4;
byte *pbVar5;
byte *pbVar6;
pbVar3 = *(byte **)(param_1 + 0x130);
pbVar5 = *(byte **)(param_1 + 0x138);
if (pbVar3 < pbVar5) {
do {
if ((my_xml_ctype[*pbVar3] & 8) == 0) {
*param_2 = (long)pbVar3;
pbVar3 = *(byte **)(param_1 + 0x130);
param_2[1] = (long)pbVar3;
pbVar5 = *(byte **)(param_1 + 0x138);
if ((pbVar3 + 4 <= pbVar5) && (*(int *)pbVar3 == 0x2d2d213c)) goto LAB_001933d9;
pbVar6 = pbVar3 + 9;
if ((pbVar6 <= pbVar5) && (pbVar3[8] == 0x5b && *(long *)pbVar3 == 0x41544144435b213c)) {
*(byte **)(param_1 + 0x130) = pbVar6;
if (pbVar5 + -2 <= pbVar6) {
return 0x44;
}
pbVar6 = pbVar3 + 0xc;
pbVar5 = pbVar5 + (-0xb - (long)pbVar3);
while (((pbVar6[-3] != 0x5d || (pbVar6[-2] != 0x5d)) || (pbVar6[-1] != 0x3e))) {
*(byte **)(param_1 + 0x130) = pbVar6 + -2;
pbVar6 = pbVar6 + 1;
pbVar5 = pbVar5 + -1;
if (pbVar5 == (byte *)0x0) {
return 0x44;
}
}
*(byte **)(param_1 + 0x130) = pbVar6;
param_2[1] = (long)pbVar6;
return 0x44;
}
bVar1 = *pbVar3;
pvVar4 = memchr("?=/<>!",(int)(char)bVar1,7);
if (pvVar4 != (void *)0x0) {
*(byte **)(param_1 + 0x130) = pbVar3 + 1;
param_2[1] = (long)(pbVar3 + 1);
return (int)*(char *)*param_2;
}
uVar2 = (uint)bVar1;
if (((ulong)uVar2 == 0x27) || (uVar2 == 0x22)) goto LAB_0019342f;
if ((my_xml_ctype[uVar2] & 1) == 0) {
return 0x55;
}
goto LAB_001934ec;
}
pbVar3 = pbVar3 + 1;
*(byte **)(param_1 + 0x130) = pbVar3;
} while (pbVar3 != pbVar5);
}
*param_2 = (long)pbVar5;
param_2[1] = *(long *)(param_1 + 0x138);
return 0x45;
LAB_001933d9:
pbVar6 = pbVar3 + 3;
if ((pbVar6 <= pbVar5) && (pbVar3[2] == 0x3e && *(short *)pbVar3 == 0x2d2d)) {
*(byte **)(param_1 + 0x130) = pbVar6;
pbVar5 = pbVar6;
goto LAB_00193523;
}
pbVar3 = pbVar3 + 1;
*(byte **)(param_1 + 0x130) = pbVar3;
if (pbVar3 == pbVar5) {
LAB_00193523:
param_2[1] = (long)pbVar5;
return 0x43;
}
goto LAB_001933d9;
while (*pbVar3 != *(byte *)*param_2) {
LAB_0019342f:
pbVar3 = pbVar3 + 1;
*(byte **)(param_1 + 0x130) = pbVar3;
if (pbVar5 <= pbVar3) break;
}
param_2[1] = (long)pbVar3;
if (*(ulong *)(param_1 + 0x130) < *(ulong *)(param_1 + 0x138)) {
*(ulong *)(param_1 + 0x130) = *(ulong *)(param_1 + 0x130) + 1;
}
*param_2 = *param_2 + 1;
if ((*param_1 & 2) != 0) {
return 0x53;
}
my_xml_norm_text();
return 0x53;
while ((my_xml_ctype[*pbVar3] & 2) != 0) {
LAB_001934ec:
pbVar3 = pbVar3 + 1;
*(byte **)(param_1 + 0x130) = pbVar3;
if (pbVar5 <= pbVar3) break;
}
param_2[1] = (long)pbVar3;
my_xml_norm_text();
return 0x49;
}
| |
22,737 | CheckCollisionCircleRec | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
{
bool collision = false;
float recCenterX = rec.x + rec.width/2.0f;
float recCenterY = rec.y + rec.height/2.0f;
float dx = fabsf(center.x - recCenterX);
float dy = fabsf(center.y - recCenterY);
if (dx > (rec.width/2.0f + radius)) { return false; }
if (dy > (rec.height/2.0f + radius)) { return false; }
if (dx <= (rec.width/2.0f)) { return true; }
if (dy <= (rec.height/2.0f)) { return true; }
float cornerDistanceSq = (dx - rec.width/2.0f)*(dx - rec.width/2.0f) +
(dy - rec.height/2.0f)*(dy - rec.height/2.0f);
collision = (cornerDistanceSq <= (radius*radius));
return collision;
} | O0 | c | CheckCollisionCircleRec:
pushq %rbp
movq %rsp, %rbp
movlpd %xmm0, -0xc(%rbp)
movlpd %xmm2, -0x1c(%rbp)
movlpd %xmm3, -0x14(%rbp)
movss %xmm1, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movss -0x1c(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movss 0xc82ce(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x18(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss 0xc82af(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0xc(%rbp), %xmm0
subss -0x28(%rbp), %xmm0
movaps 0xd4545(%rip), %xmm1 # 0x1b42d0
pand %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x8(%rbp), %xmm0
subss -0x2c(%rbp), %xmm0
movaps 0xd452b(%rip), %xmm1 # 0x1b42d0
pand %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x30(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movss 0xc825c(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm1
addss -0x20(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0xdfdd7
movb $0x0, -0x1(%rbp)
jmp 0xdfee3
movss -0x34(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
movss 0xc8233(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm1
addss -0x20(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0xdfe00
movb $0x0, -0x1(%rbp)
jmp 0xdfee3
movss -0x30(%rbp), %xmm1
movss -0x14(%rbp), %xmm0
movss 0xc820a(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jb 0xdfe24
movb $0x1, -0x1(%rbp)
jmp 0xdfee3
movss -0x34(%rbp), %xmm1
movss -0x10(%rbp), %xmm0
movss 0xc81e6(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jb 0xdfe48
movb $0x1, -0x1(%rbp)
jmp 0xdfee3
movss -0x30(%rbp), %xmm0
movss -0x14(%rbp), %xmm1
movss 0xc81c2(%rip), %xmm2 # 0x1a801c
divss %xmm2, %xmm1
subss %xmm1, %xmm0
movss -0x30(%rbp), %xmm2
movss -0x14(%rbp), %xmm1
movss 0xc81a8(%rip), %xmm3 # 0x1a801c
divss %xmm3, %xmm1
subss %xmm1, %xmm2
movss -0x34(%rbp), %xmm1
movss -0x10(%rbp), %xmm3
movss 0xc818e(%rip), %xmm4 # 0x1a801c
divss %xmm4, %xmm3
subss %xmm3, %xmm1
movss -0x34(%rbp), %xmm3
movss -0x10(%rbp), %xmm4
movss 0xc8174(%rip), %xmm5 # 0x1a801c
divss %xmm5, %xmm4
subss %xmm4, %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm1
movss -0x20(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
ucomiss %xmm1, %xmm0
setae %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw (%rax,%rax)
| CheckCollisionCircleRec:
push rbp
mov rbp, rsp
movlpd [rbp+var_C], xmm0
movlpd [rbp+var_1C], xmm2
movlpd [rbp+var_14], xmm3
movss [rbp+var_20], xmm1
mov [rbp+var_21], 0
movss xmm0, dword ptr [rbp+var_1C]
movss xmm1, dword ptr [rbp+var_14]
movss xmm2, cs:dword_1A801C
divss xmm1, xmm2
addss xmm0, xmm1
movss [rbp+var_28], xmm0
movss xmm0, dword ptr [rbp+var_1C+4]
movss xmm1, dword ptr [rbp+var_14+4]
movss xmm2, cs:dword_1A801C
divss xmm1, xmm2
addss xmm0, xmm1
movss [rbp+var_2C], xmm0
movss xmm0, dword ptr [rbp+var_C]
subss xmm0, [rbp+var_28]
movaps xmm1, cs:xmmword_1B42D0
pand xmm0, xmm1
movss [rbp+var_30], xmm0
movss xmm0, dword ptr [rbp+var_C+4]
subss xmm0, [rbp+var_2C]
movaps xmm1, cs:xmmword_1B42D0
pand xmm0, xmm1
movss [rbp+var_34], xmm0
movss xmm0, [rbp+var_30]
movss xmm1, dword ptr [rbp+var_14]
movss xmm2, cs:dword_1A801C
divss xmm1, xmm2
addss xmm1, [rbp+var_20]
ucomiss xmm0, xmm1
jbe short loc_DFDD7
mov [rbp+var_1], 0
jmp loc_DFEE3
loc_DFDD7:
movss xmm0, [rbp+var_34]
movss xmm1, dword ptr [rbp+var_14+4]
movss xmm2, cs:dword_1A801C
divss xmm1, xmm2
addss xmm1, [rbp+var_20]
ucomiss xmm0, xmm1
jbe short loc_DFE00
mov [rbp+var_1], 0
jmp loc_DFEE3
loc_DFE00:
movss xmm1, [rbp+var_30]
movss xmm0, dword ptr [rbp+var_14]
movss xmm2, cs:dword_1A801C
divss xmm0, xmm2
ucomiss xmm0, xmm1
jb short loc_DFE24
mov [rbp+var_1], 1
jmp loc_DFEE3
loc_DFE24:
movss xmm1, [rbp+var_34]
movss xmm0, dword ptr [rbp+var_14+4]
movss xmm2, cs:dword_1A801C
divss xmm0, xmm2
ucomiss xmm0, xmm1
jb short loc_DFE48
mov [rbp+var_1], 1
jmp loc_DFEE3
loc_DFE48:
movss xmm0, [rbp+var_30]
movss xmm1, dword ptr [rbp+var_14]
movss xmm2, cs:dword_1A801C
divss xmm1, xmm2
subss xmm0, xmm1
movss xmm2, [rbp+var_30]
movss xmm1, dword ptr [rbp+var_14]
movss xmm3, cs:dword_1A801C
divss xmm1, xmm3
subss xmm2, xmm1
movss xmm1, [rbp+var_34]
movss xmm3, dword ptr [rbp+var_14+4]
movss xmm4, cs:dword_1A801C
divss xmm3, xmm4
subss xmm1, xmm3
movss xmm3, [rbp+var_34]
movss xmm4, dword ptr [rbp+var_14+4]
movss xmm5, cs:dword_1A801C
divss xmm4, xmm5
subss xmm3, xmm4
mulss xmm1, xmm3
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_38], xmm0
movss xmm1, [rbp+var_38]
movss xmm0, [rbp+var_20]
mulss xmm0, [rbp+var_20]
ucomiss xmm0, xmm1
setnb al
and al, 1
mov [rbp+var_21], al
mov al, [rbp+var_21]
and al, 1
mov [rbp+var_1], al
loc_DFEE3:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
| bool CheckCollisionCircleRec(__m128i a1, float a2, double a3, double a4)
{
__m128i v4; // xmm0
float v6; // [rsp+4h] [rbp-34h]
float v7; // [rsp+8h] [rbp-30h]
float v8; // [rsp+30h] [rbp-8h]
v8 = *(float *)&a1.m128i_i32[1];
a1 = (__m128i)a1.m128i_u32[0];
*(float *)a1.m128i_i32 = *(float *)a1.m128i_i32 - (float)(*(float *)&a3 + (float)(*(float *)&a4 / 2.0));
v7 = *(float *)_mm_and_si128(a1, (__m128i)xmmword_1B42D0).m128i_i32;
v4 = (__m128i)LODWORD(v8);
*(float *)v4.m128i_i32 = v8 - (float)(*((float *)&a3 + 1) + (float)(*((float *)&a4 + 1) / 2.0));
LODWORD(v6) = _mm_and_si128(v4, (__m128i)xmmword_1B42D0).m128i_u32[0];
if ( v7 <= (float)((float)(*(float *)&a4 / 2.0) + a2) )
{
if ( v6 <= (float)((float)(*((float *)&a4 + 1) / 2.0) + a2) )
return (float)(*(float *)&a4 / 2.0) >= v7
|| (float)(*((float *)&a4 + 1) / 2.0) >= v6
|| (float)(a2 * a2) >= (float)((float)((float)(v7 - (float)(*(float *)&a4 / 2.0))
* (float)(v7 - (float)(*(float *)&a4 / 2.0)))
+ (float)((float)(v6 - (float)(*((float *)&a4 + 1) / 2.0))
* (float)(v6 - (float)(*((float *)&a4 + 1) / 2.0))));
else
return 0;
}
else
{
return 0;
}
}
| CheckCollisionCircleRec:
PUSH RBP
MOV RBP,RSP
MOVLPD qword ptr [RBP + -0xc],XMM0
MOVLPD qword ptr [RBP + -0x1c],XMM2
MOVLPD qword ptr [RBP + -0x14],XMM3
MOVSS dword ptr [RBP + -0x20],XMM1
MOV byte ptr [RBP + -0x21],0x0
MOVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS XMM1,dword ptr [RBP + -0x14]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM1,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x28],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS XMM1,dword ptr [RBP + -0x10]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM1,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x2c],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
SUBSS XMM0,dword ptr [RBP + -0x28]
MOVAPS XMM1,xmmword ptr [0x002b42d0]
PAND XMM0,XMM1
MOVSS dword ptr [RBP + -0x30],XMM0
MOVSS XMM0,dword ptr [RBP + -0x8]
SUBSS XMM0,dword ptr [RBP + -0x2c]
MOVAPS XMM1,xmmword ptr [0x002b42d0]
PAND XMM0,XMM1
MOVSS dword ptr [RBP + -0x34],XMM0
MOVSS XMM0,dword ptr [RBP + -0x30]
MOVSS XMM1,dword ptr [RBP + -0x14]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM1,XMM2
ADDSS XMM1,dword ptr [RBP + -0x20]
UCOMISS XMM0,XMM1
JBE 0x001dfdd7
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001dfee3
LAB_001dfdd7:
MOVSS XMM0,dword ptr [RBP + -0x34]
MOVSS XMM1,dword ptr [RBP + -0x10]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM1,XMM2
ADDSS XMM1,dword ptr [RBP + -0x20]
UCOMISS XMM0,XMM1
JBE 0x001dfe00
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001dfee3
LAB_001dfe00:
MOVSS XMM1,dword ptr [RBP + -0x30]
MOVSS XMM0,dword ptr [RBP + -0x14]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM0,XMM2
UCOMISS XMM0,XMM1
JC 0x001dfe24
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001dfee3
LAB_001dfe24:
MOVSS XMM1,dword ptr [RBP + -0x34]
MOVSS XMM0,dword ptr [RBP + -0x10]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM0,XMM2
UCOMISS XMM0,XMM1
JC 0x001dfe48
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001dfee3
LAB_001dfe48:
MOVSS XMM0,dword ptr [RBP + -0x30]
MOVSS XMM1,dword ptr [RBP + -0x14]
MOVSS XMM2,dword ptr [0x002a801c]
DIVSS XMM1,XMM2
SUBSS XMM0,XMM1
MOVSS XMM2,dword ptr [RBP + -0x30]
MOVSS XMM1,dword ptr [RBP + -0x14]
MOVSS XMM3,dword ptr [0x002a801c]
DIVSS XMM1,XMM3
SUBSS XMM2,XMM1
MOVSS XMM1,dword ptr [RBP + -0x34]
MOVSS XMM3,dword ptr [RBP + -0x10]
MOVSS XMM4,dword ptr [0x002a801c]
DIVSS XMM3,XMM4
SUBSS XMM1,XMM3
MOVSS XMM3,dword ptr [RBP + -0x34]
MOVSS XMM4,dword ptr [RBP + -0x10]
MOVSS XMM5,dword ptr [0x002a801c]
DIVSS XMM4,XMM5
SUBSS XMM3,XMM4
MULSS XMM1,XMM3
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x38],XMM0
MOVSS XMM1,dword ptr [RBP + -0x38]
MOVSS XMM0,dword ptr [RBP + -0x20]
MULSS XMM0,dword ptr [RBP + -0x20]
UCOMISS XMM0,XMM1
SETNC AL
AND AL,0x1
MOV byte ptr [RBP + -0x21],AL
MOV AL,byte ptr [RBP + -0x21]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_001dfee3:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool CheckCollisionCircleRec(int8 param_1,float param_2,int8 param_3,int8 param_4)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
int4 local_14;
int4 uStack_10;
int1 local_9;
fVar4 = (float)((ulong)param_4 >> 0x20);
fVar3 = (float)param_4;
local_14 = (float)param_1;
fVar1 = (float)((uint)(local_14 - ((float)param_3 + fVar3 / DAT_002a801c)) & _DAT_002b42d0);
uStack_10 = (float)((ulong)param_1 >> 0x20);
fVar2 = (float)((uint)(uStack_10 - ((float)((ulong)param_3 >> 0x20) + fVar4 / DAT_002a801c)) &
_DAT_002b42d0);
if (fVar1 <= fVar3 / DAT_002a801c + param_2) {
if (fVar2 <= fVar4 / DAT_002a801c + param_2) {
if (fVar3 / DAT_002a801c < fVar1) {
if (fVar4 / DAT_002a801c < fVar2) {
local_9 = (fVar1 - fVar3 / DAT_002a801c) * (fVar1 - fVar3 / DAT_002a801c) +
(fVar2 - fVar4 / DAT_002a801c) * (fVar2 - fVar4 / DAT_002a801c) <=
param_2 * param_2;
}
else {
local_9 = true;
}
}
else {
local_9 = true;
}
}
else {
local_9 = false;
}
}
else {
local_9 = false;
}
return local_9;
}
| |
22,738 | CheckCollisionCircleRec | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
{
bool collision = false;
float recCenterX = rec.x + rec.width/2.0f;
float recCenterY = rec.y + rec.height/2.0f;
float dx = fabsf(center.x - recCenterX);
float dy = fabsf(center.y - recCenterY);
if (dx > (rec.width/2.0f + radius)) { return false; }
if (dy > (rec.height/2.0f + radius)) { return false; }
if (dx <= (rec.width/2.0f)) { return true; }
if (dy <= (rec.height/2.0f)) { return true; }
float cornerDistanceSq = (dx - rec.width/2.0f)*(dx - rec.width/2.0f) +
(dy - rec.height/2.0f)*(dy - rec.height/2.0f);
collision = (cornerDistanceSq <= (radius*radius));
return collision;
} | O2 | c | CheckCollisionCircleRec:
mulps 0x497a1(%rip), %xmm3 # 0xb5150
addps %xmm3, %xmm2
subps %xmm2, %xmm0
andps 0x4e144(%rip), %xmm0 # 0xb9b00
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0]
addps %xmm3, %xmm2
cmpltps %xmm0, %xmm2
unpcklps %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1]
movmskpd %xmm2, %eax
testl %eax, %eax
je 0x6b9d8
xorl %eax, %eax
retq
movaps %xmm0, %xmm2
cmpnleps %xmm3, %xmm2
unpcklps %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1]
movmskpd %xmm2, %ecx
movb $0x1, %al
cmpl $0x3, %ecx
jne 0x6b9d7
subps %xmm3, %xmm0
movaps %xmm0, %xmm2
mulps %xmm0, %xmm2
shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1]
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
mulss %xmm1, %xmm1
ucomiss %xmm0, %xmm1
setae %al
retq
| CheckCollisionCircleRec:
mulps xmm3, cs:xmmword_B5150
addps xmm2, xmm3
subps xmm0, xmm2
andps xmm0, cs:xmmword_B9B00
movaps xmm2, xmm1
shufps xmm2, xmm1, 0
addps xmm2, xmm3
cmpltps xmm2, xmm0
unpcklps xmm2, xmm2
movmskpd eax, xmm2
test eax, eax
jz short loc_6B9D8
xor eax, eax
locret_6B9D7:
retn
loc_6B9D8:
movaps xmm2, xmm0
cmpnleps xmm2, xmm3
unpcklps xmm2, xmm2
movmskpd ecx, xmm2
mov al, 1
cmp ecx, 3
jnz short locret_6B9D7
subps xmm0, xmm3
movaps xmm2, xmm0
mulps xmm2, xmm0
shufps xmm2, xmm2, 55h ; 'U'
mulss xmm0, xmm0
addss xmm0, xmm2
mulss xmm1, xmm1
ucomiss xmm1, xmm0
setnb al
retn
| bool CheckCollisionCircleRec(__m128 a1, __m128 a2, __m128 a3, __m128 a4)
{
__m128 v4; // xmm3
__m128 v5; // xmm0
__m128 v6; // xmm2
bool result; // al
__m128 v8; // xmm2
__m128 v9; // xmm0
__m128 v10; // xmm2
v4 = _mm_mul_ps(a4, (__m128)xmmword_B5150);
v5 = _mm_and_ps(_mm_sub_ps(a1, _mm_add_ps(a3, v4)), (__m128)xmmword_B9B00);
v6 = _mm_cmplt_ps(_mm_add_ps(_mm_shuffle_ps(a2, a2, 0), v4), v5);
if ( _mm_movemask_pd((__m128d)_mm_unpacklo_ps(v6, v6)) )
return 0;
v8 = _mm_cmpnle_ps(v5, v4);
result = 1;
if ( _mm_movemask_pd((__m128d)_mm_unpacklo_ps(v8, v8)) == 3 )
{
v9 = _mm_sub_ps(v5, v4);
v10 = _mm_mul_ps(v9, v9);
return (float)(a2.m128_f32[0] * a2.m128_f32[0]) >= (float)((float)(v9.m128_f32[0] * v9.m128_f32[0])
+ _mm_shuffle_ps(v10, v10, 85).m128_f32[0]);
}
return result;
}
| CheckCollisionCircleRec:
MULPS XMM3,xmmword ptr [0x001b5150]
ADDPS XMM2,XMM3
SUBPS XMM0,XMM2
ANDPS XMM0,xmmword ptr [0x001b9b00]
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x0
ADDPS XMM2,XMM3
CMPLTPS XMM2,XMM0
UNPCKLPS XMM2,XMM2
MOVMSKPD EAX,XMM2
TEST EAX,EAX
JZ 0x0016b9d8
XOR EAX,EAX
LAB_0016b9d7:
RET
LAB_0016b9d8:
MOVAPS XMM2,XMM0
CMPNLEPS XMM2,XMM3
UNPCKLPS XMM2,XMM2
MOVMSKPD ECX,XMM2
MOV AL,0x1
CMP ECX,0x3
JNZ 0x0016b9d7
SUBPS XMM0,XMM3
MOVAPS XMM2,XMM0
MULPS XMM2,XMM0
SHUFPS XMM2,XMM2,0x55
MULSS XMM0,XMM0
ADDSS XMM0,XMM2
MULSS XMM1,XMM1
UCOMISS XMM1,XMM0
SETNC AL
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8
CheckCollisionCircleRec(int8 param_1,float param_2,int8 param_3,int8 param_4)
{
int1 auVar1 [16];
int1 auVar2 [16];
int8 in_RAX;
int8 uVar3;
int4 in_ECX;
int iVar5;
int iVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
int7 uVar4;
fVar9 = (float)param_4 * _DAT_001b5150;
fVar10 = (float)((ulong)param_4 >> 0x20) * _UNK_001b5154;
fVar7 = (float)((uint)((float)param_1 - ((float)param_3 + fVar9)) & _DAT_001b9b00);
fVar8 = (float)((uint)((float)((ulong)param_1 >> 0x20) -
((float)((ulong)param_3 >> 0x20) + fVar10)) & _UNK_001b9b04);
iVar5 = -(uint)(param_2 + fVar9 < fVar7);
iVar6 = -(uint)(param_2 + fVar10 < fVar8);
auVar1._4_4_ = iVar5;
auVar1._0_4_ = iVar5;
auVar1._8_4_ = iVar6;
auVar1._12_4_ = iVar6;
iVar5 = movmskpd((int)in_RAX,auVar1);
if (iVar5 == 0) {
auVar2._4_4_ = -(uint)(fVar9 < fVar7);
auVar2._0_4_ = -(uint)(fVar9 < fVar7);
auVar2._8_4_ = -(uint)(fVar10 < fVar8);
auVar2._12_4_ = -(uint)(fVar10 < fVar8);
iVar6 = movmskpd(in_ECX,auVar2);
uVar4 = (int7)(CONCAT44((int)((ulong)in_RAX >> 0x20),iVar5) >> 8);
uVar3 = CONCAT71(uVar4,1);
if (iVar6 == 3) {
return CONCAT71(uVar4,(fVar7 - fVar9) * (fVar7 - fVar9) + (fVar8 - fVar10) * (fVar8 - fVar10)
<= param_2 * param_2);
}
}
else {
uVar3 = 0;
}
return uVar3;
}
| |
22,739 | CheckCollisionCircleRec | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
{
bool collision = false;
float recCenterX = rec.x + rec.width/2.0f;
float recCenterY = rec.y + rec.height/2.0f;
float dx = fabsf(center.x - recCenterX);
float dy = fabsf(center.y - recCenterY);
if (dx > (rec.width/2.0f + radius)) { return false; }
if (dy > (rec.height/2.0f + radius)) { return false; }
if (dx <= (rec.width/2.0f)) { return true; }
if (dy <= (rec.height/2.0f)) { return true; }
float cornerDistanceSq = (dx - rec.width/2.0f)*(dx - rec.width/2.0f) +
(dy - rec.height/2.0f)*(dy - rec.height/2.0f);
collision = (cornerDistanceSq <= (radius*radius));
return collision;
} | O3 | c | CheckCollisionCircleRec:
mulps 0x50c42(%rip), %xmm3 # 0xcf160
addps %xmm3, %xmm2
subps %xmm2, %xmm0
andps 0x51035(%rip), %xmm0 # 0xcf560
movaps %xmm1, %xmm2
shufps $0x0, %xmm1, %xmm2 # xmm2 = xmm2[0,0],xmm1[0,0]
addps %xmm3, %xmm2
cmpltps %xmm0, %xmm2
unpcklps %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1]
movmskpd %xmm2, %eax
testl %eax, %eax
je 0x7e547
xorl %eax, %eax
retq
movaps %xmm0, %xmm2
cmpnleps %xmm3, %xmm2
unpcklps %xmm2, %xmm2 # xmm2 = xmm2[0,0,1,1]
movmskpd %xmm2, %ecx
movb $0x1, %al
cmpl $0x3, %ecx
jne 0x7e546
subps %xmm3, %xmm0
movaps %xmm0, %xmm2
mulps %xmm0, %xmm2
shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1]
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
mulss %xmm1, %xmm1
ucomiss %xmm0, %xmm1
setae %al
retq
| CheckCollisionCircleRec:
mulps xmm3, cs:xmmword_CF160
addps xmm2, xmm3
subps xmm0, xmm2
andps xmm0, cs:xmmword_CF560
movaps xmm2, xmm1
shufps xmm2, xmm1, 0
addps xmm2, xmm3
cmpltps xmm2, xmm0
unpcklps xmm2, xmm2
movmskpd eax, xmm2
test eax, eax
jz short loc_7E547
xor eax, eax
locret_7E546:
retn
loc_7E547:
movaps xmm2, xmm0
cmpnleps xmm2, xmm3
unpcklps xmm2, xmm2
movmskpd ecx, xmm2
mov al, 1
cmp ecx, 3
jnz short locret_7E546
subps xmm0, xmm3
movaps xmm2, xmm0
mulps xmm2, xmm0
shufps xmm2, xmm2, 55h ; 'U'
mulss xmm0, xmm0
addss xmm0, xmm2
mulss xmm1, xmm1
ucomiss xmm1, xmm0
setnb al
retn
| bool CheckCollisionCircleRec(__m128 a1, __m128 a2, __m128 a3, __m128 a4)
{
__m128 v4; // xmm3
__m128 v5; // xmm0
__m128 v6; // xmm2
bool result; // al
__m128 v8; // xmm2
__m128 v9; // xmm0
__m128 v10; // xmm2
v4 = _mm_mul_ps(a4, (__m128)xmmword_CF160);
v5 = _mm_and_ps(_mm_sub_ps(a1, _mm_add_ps(a3, v4)), (__m128)xmmword_CF560);
v6 = _mm_cmplt_ps(_mm_add_ps(_mm_shuffle_ps(a2, a2, 0), v4), v5);
if ( _mm_movemask_pd((__m128d)_mm_unpacklo_ps(v6, v6)) )
return 0;
v8 = _mm_cmpnle_ps(v5, v4);
result = 1;
if ( _mm_movemask_pd((__m128d)_mm_unpacklo_ps(v8, v8)) == 3 )
{
v9 = _mm_sub_ps(v5, v4);
v10 = _mm_mul_ps(v9, v9);
return (float)(a2.m128_f32[0] * a2.m128_f32[0]) >= (float)((float)(v9.m128_f32[0] * v9.m128_f32[0])
+ _mm_shuffle_ps(v10, v10, 85).m128_f32[0]);
}
return result;
}
| CheckCollisionCircleRec:
MULPS XMM3,xmmword ptr [0x001cf160]
ADDPS XMM2,XMM3
SUBPS XMM0,XMM2
ANDPS XMM0,xmmword ptr [0x001cf560]
MOVAPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x0
ADDPS XMM2,XMM3
CMPLTPS XMM2,XMM0
UNPCKLPS XMM2,XMM2
MOVMSKPD EAX,XMM2
TEST EAX,EAX
JZ 0x0017e547
XOR EAX,EAX
LAB_0017e546:
RET
LAB_0017e547:
MOVAPS XMM2,XMM0
CMPNLEPS XMM2,XMM3
UNPCKLPS XMM2,XMM2
MOVMSKPD ECX,XMM2
MOV AL,0x1
CMP ECX,0x3
JNZ 0x0017e546
SUBPS XMM0,XMM3
MOVAPS XMM2,XMM0
MULPS XMM2,XMM0
SHUFPS XMM2,XMM2,0x55
MULSS XMM0,XMM0
ADDSS XMM0,XMM2
MULSS XMM1,XMM1
UCOMISS XMM1,XMM0
SETNC AL
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8
CheckCollisionCircleRec(int8 param_1,float param_2,int8 param_3,int8 param_4)
{
int1 auVar1 [16];
int1 auVar2 [16];
int8 in_RAX;
int8 uVar3;
int4 in_ECX;
int iVar5;
int iVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
int7 uVar4;
fVar9 = (float)param_4 * _DAT_001cf160;
fVar10 = (float)((ulong)param_4 >> 0x20) * _UNK_001cf164;
fVar7 = (float)((uint)((float)param_1 - ((float)param_3 + fVar9)) & _DAT_001cf560);
fVar8 = (float)((uint)((float)((ulong)param_1 >> 0x20) -
((float)((ulong)param_3 >> 0x20) + fVar10)) & _UNK_001cf564);
iVar5 = -(uint)(param_2 + fVar9 < fVar7);
iVar6 = -(uint)(param_2 + fVar10 < fVar8);
auVar1._4_4_ = iVar5;
auVar1._0_4_ = iVar5;
auVar1._8_4_ = iVar6;
auVar1._12_4_ = iVar6;
iVar5 = movmskpd((int)in_RAX,auVar1);
if (iVar5 == 0) {
auVar2._4_4_ = -(uint)(fVar9 < fVar7);
auVar2._0_4_ = -(uint)(fVar9 < fVar7);
auVar2._8_4_ = -(uint)(fVar10 < fVar8);
auVar2._12_4_ = -(uint)(fVar10 < fVar8);
iVar6 = movmskpd(in_ECX,auVar2);
uVar4 = (int7)(CONCAT44((int)((ulong)in_RAX >> 0x20),iVar5) >> 8);
uVar3 = CONCAT71(uVar4,1);
if (iVar6 == 3) {
return CONCAT71(uVar4,(fVar7 - fVar9) * (fVar7 - fVar9) + (fVar8 - fVar10) * (fVar8 - fVar10)
<= param_2 * param_2);
}
}
else {
uVar3 = 0;
}
return uVar3;
}
| |
22,740 | hex_string[abi:cxx11](long, int, bool, bool) | msxemulator/build_O3/_deps/picotool-src/main.cpp | static string hex_string(int64_t value, int width=8, bool prefix=true, bool uppercase=false) {
std::stringstream ss;
if (prefix) ss << "0x";
ss << std::setfill('0') << std::setw(width);
if (uppercase) ss << std::uppercase;
ss << std::hex << value;
return ss.str();
} | O3 | cpp | hex_string[abi:cxx11](long, int, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp # imm = 0x190
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf330
testl %r12d, %r12d
je 0x1de43
leaq 0x18(%rsp), %rdi
leaq 0x8a33f(%rip), %rsi # 0xa8178
movl $0x2, %edx
callq 0xf500
movq 0x18(%rsp), %rax
movq -0x18(%rax), %rcx
leaq (%rsp,%rcx), %r12
addq $0x18, %r12
cmpb $0x0, 0xe1(%r12)
jne 0x1de7a
movq %r12, %rdi
movl $0x20, %esi
callq 0xf410
movb $0x1, 0xe1(%r12)
movq 0x18(%rsp), %rax
leaq 0x18(%rsp), %rdi
movb $0x30, 0xe0(%r12)
movq -0x18(%rax), %rcx
movslq %r15d, %rdx
movq %rdx, 0x28(%rsp,%rcx)
testb %bpl, %bpl
je 0x1dea5
movq -0x18(%rax), %rcx
orl $0x4000, 0x30(%rsp,%rcx) # imm = 0x4000
movq -0x18(%rax), %rax
movl 0x30(%rsp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x30(%rsp,%rax)
movq %r14, %rsi
callq 0xf400
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xf6f0
movq 0xc70b5(%rip), %rsi # 0xe4f88
leaq 0x8(%rsp), %rdi
callq 0xf370
leaq 0x88(%rsp), %rdi
callq 0xf1a0
addq $0x190, %rsp # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xc7084(%rip), %rsi # 0xe4f88
leaq 0x8(%rsp), %rdi
callq 0xf370
leaq 0x88(%rsp), %rdi
callq 0xf1a0
movq %rbx, %rdi
callq 0xf7d0
| _ZL10hex_stringB5cxx11libb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 190h
mov ebp, r8d
mov r12d, ecx
mov r15d, edx
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+1B8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
test r12d, r12d
jz short loc_1DE43
lea rdi, [rsp+1B8h+var_1A0]
lea rsi, aIncompleteUtf8+24h; "0x"
mov edx, 2
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_1DE43:
mov rax, [rsp+1B8h+var_1A0]
mov rcx, [rax-18h]
lea r12, [rsp+rcx+1B8h+var_1B8]
add r12, 18h
cmp byte ptr [r12+0E1h], 0
jnz short loc_1DE7A
mov rdi, r12
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov byte ptr [r12+0E1h], 1
mov rax, [rsp+1B8h+var_1A0]
loc_1DE7A:
lea rdi, [rsp+1B8h+var_1A0]
mov byte ptr [r12+0E0h], 30h ; '0'
mov rcx, [rax-18h]
movsxd rdx, r15d
mov [rsp+rcx+1B8h+var_190], rdx
test bpl, bpl
jz short loc_1DEA5
mov rcx, [rax-18h]
or [rsp+rcx+1B8h+var_188], 4000h
loc_1DEA5:
mov rax, [rax-18h]
mov ecx, [rsp+rax+1B8h+var_188]
and ecx, 0FFFFFFB5h
or ecx, 8
mov [rsp+rax+1B8h+var_188], ecx
mov rsi, r14
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
lea rsi, [rsp+1B8h+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+1B8h+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1B8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 190h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_80]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| void hex_string[abi:cxx11](long long a1, long long a2, int a3, int a4, char a5)
{
long long v8; // rax
long long v9; // rcx
_BYTE *v10; // r12
_BYTE v11[16]; // [rsp+8h] [rbp-1B0h] BYREF
long long v12; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v13[104]; // [rsp+20h] [rbp-198h] BYREF
_BYTE v14[304]; // [rsp+88h] [rbp-130h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v11);
if ( a4 )
std::__ostream_insert<char,std::char_traits<char>>(&v12, "0x", 2LL);
v8 = v12;
v9 = *(_QWORD *)(v12 - 24);
v10 = &v13[v9 - 8];
if ( !v14[v9 + 113] )
{
std::ios::widen(&v13[v9 - 8], 32LL);
v10[225] = 1;
v8 = v12;
}
v10[224] = 48;
*(_QWORD *)&v13[*(_QWORD *)(v8 - 24) + 8] = a3;
if ( a5 )
*(_DWORD *)&v13[*(_QWORD *)(v8 - 24) + 16] |= 0x4000u;
*(_DWORD *)&v13[*(_QWORD *)(v8 - 24) + 16] = *(_DWORD *)&v13[*(_QWORD *)(v8 - 24) + 16] & 0xFFFFFFB5 | 8;
std::ostream::_M_insert<long>(&v12, a2);
std::stringbuf::str(a1, v13);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v11,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v14);
}
| hex_string[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x190
MOV EBP,R8D
MOV R12D,ECX
MOV R15D,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
CALL 0x0010f330
TEST R12D,R12D
JZ 0x0011de43
LEA RDI,[RSP + 0x18]
LAB_0011de32:
LEA RSI,[0x1a8178]
MOV EDX,0x2
CALL 0x0010f500
LAB_0011de43:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + -0x18]
LEA R12,[RSP + RCX*0x1]
ADD R12,0x18
CMP byte ptr [R12 + 0xe1],0x0
JNZ 0x0011de7a
MOV RDI,R12
MOV ESI,0x20
CALL 0x0010f410
MOV byte ptr [R12 + 0xe1],0x1
MOV RAX,qword ptr [RSP + 0x18]
LAB_0011de7a:
LEA RDI,[RSP + 0x18]
MOV byte ptr [R12 + 0xe0],0x30
MOV RCX,qword ptr [RAX + -0x18]
MOVSXD RDX,R15D
MOV qword ptr [RSP + RCX*0x1 + 0x28],RDX
TEST BPL,BPL
JZ 0x0011dea5
MOV RCX,qword ptr [RAX + -0x18]
OR dword ptr [RSP + RCX*0x1 + 0x30],0x4000
LAB_0011dea5:
MOV RAX,qword ptr [RAX + -0x18]
MOV ECX,dword ptr [RSP + RAX*0x1 + 0x30]
AND ECX,0xffffffb5
OR ECX,0x8
MOV dword ptr [RSP + RAX*0x1 + 0x30],ECX
MOV RSI,R14
CALL 0x0010f400
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0010f6f0
LAB_0011decc:
MOV RSI,qword ptr [0x001e4f88]
LEA RDI,[RSP + 0x8]
CALL 0x0010f370
LEA RDI,[RSP + 0x88]
CALL 0x0010f1a0
ADD RSP,0x190
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* hex_string[abi:cxx11](long, int, bool, bool) */
void hex_string_abi_cxx11_(long param_1,int param_2,bool param_3,bool param_4)
{
uint *puVar1;
long lVar2;
int7 in_register_00000009;
int7 in_register_00000011;
char in_R8B;
int1 auStack_1b8 [8];
stringstream local_1b0 [16];
long local_1a0 [2];
long lStack_190;
uint auStack_188 [22];
ios_base local_130 [112];
char acStack_c0 [152];
std::__cxx11::stringstream::stringstream(local_1b0);
if ((int)CONCAT71(in_register_00000009,param_4) != 0) {
/* try { // try from 0011de32 to 0011decb has its CatchHandler @ 0011defa */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a0,"0x",2);
}
lVar2 = *(long *)(local_1a0[0] + -0x18);
if (acStack_c0[lVar2 + 1] == '\0') {
std::ios::widen((char)auStack_1b8 + (char)lVar2 + '\x18');
acStack_c0[lVar2 + 1] = '\x01';
}
acStack_c0[lVar2] = '0';
*(long *)((long)&lStack_190 + *(long *)(local_1a0[0] + -0x18)) =
(long)(int)CONCAT71(in_register_00000011,param_3);
if (in_R8B != '\0') {
puVar1 = (uint *)((long)auStack_188 + *(long *)(local_1a0[0] + -0x18));
*puVar1 = *puVar1 | 0x4000;
}
*(uint *)((long)auStack_188 + *(long *)(local_1a0[0] + -0x18)) =
*(uint *)((long)auStack_188 + *(long *)(local_1a0[0] + -0x18)) & 0xffffffb5 | 8;
std::ostream::_M_insert<long>((long)local_1a0);
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b0);
std::ios_base::~ios_base(local_130);
return;
}
| |
22,741 | stbi__do_png(stbi__png*, int*, int*, int*, int, stbi__result_info*) | mnn-tts/MNN/3rd_party/imageHelper/stb_image.h | static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, stbi__result_info *ri)
{
void *result=NULL;
if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) {
if (p->depth < 8)
ri->bits_per_channel = 8;
else
ri->bits_per_channel = p->depth;
result = p->out;
p->out = NULL;
if (req_comp && req_comp != p->s->img_out_n) {
if (ri->bits_per_channel == 8)
result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
else
result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
p->s->img_out_n = req_comp;
if (result == NULL) return result;
}
*x = p->s->img_x;
*y = p->s->img_y;
if (n) *n = p->s->img_n;
}
STBI_FREE(p->out); p->out = NULL;
STBI_FREE(p->expanded); p->expanded = NULL;
STBI_FREE(p->idata); p->idata = NULL;
return result;
} | O0 | c | stbi__do_png(stbi__png*, int*, int*, int*, int, stbi__result_info*):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movq %r9, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x1c(%rsp)
jl 0x15319
cmpl $0x4, 0x1c(%rsp)
jle 0x1533a
leaq 0xf15d(%rip), %rdi # 0x2447d
callq 0x2630
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x40(%rsp)
jmp 0x154eb
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %edx
xorl %esi, %esi
callq 0x15500
cmpl $0x0, %eax
je 0x15490
movq 0x38(%rsp), %rax
cmpl $0x8, 0x20(%rax)
jge 0x1536b
movq 0x10(%rsp), %rax
movl $0x8, (%rax)
jmp 0x1537a
movq 0x38(%rsp), %rax
movl 0x20(%rax), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
cmpl $0x0, 0x1c(%rsp)
je 0x15451
movl 0x1c(%rsp), %eax
movq 0x38(%rsp), %rcx
movq (%rcx), %rcx
cmpl 0xc(%rcx), %eax
je 0x15451
movq 0x10(%rsp), %rax
cmpl $0x8, (%rax)
jne 0x153f5
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0xc(%rax), %esi
movl 0x1c(%rsp), %edx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl (%rax), %ecx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax), %r8d
callq 0x16230
movq %rax, 0x8(%rsp)
jmp 0x15429
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0xc(%rax), %esi
movl 0x1c(%rsp), %edx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl (%rax), %ecx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax), %r8d
callq 0x168a0
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %ecx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl %ecx, 0xc(%rax)
cmpq $0x0, 0x8(%rsp)
jne 0x1544f
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x154eb
jmp 0x15451
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl (%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x20(%rsp)
je 0x1548e
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x8(%rax), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
jmp 0x15490
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x21d0
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x21d0
movq 0x38(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x21d0
movq 0x38(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZL12stbi__do_pngP9stbi__pngPiS1_S1_iP17stbi__result_info:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_20], rdx
mov [rsp+48h+var_28], rcx
mov [rsp+48h+var_2C], r8d
mov [rsp+48h+var_38], r9
mov [rsp+48h+var_40], 0
cmp [rsp+48h+var_2C], 0
jl short loc_15319
cmp [rsp+48h+var_2C], 4
jle short loc_1533A
loc_15319:
lea rdi, aBadReqComp; "bad req_comp"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+48h+var_8], rax
jmp loc_154EB
loc_1533A:
mov rdi, [rsp+48h+var_10]
mov edx, [rsp+48h+var_2C]
xor esi, esi
call _ZL20stbi__parse_png_fileP9stbi__pngii; stbi__parse_png_file(stbi__png *,int,int)
cmp eax, 0
jz loc_15490
mov rax, [rsp+48h+var_10]
cmp dword ptr [rax+20h], 8
jge short loc_1536B
mov rax, [rsp+48h+var_38]
mov dword ptr [rax], 8
jmp short loc_1537A
loc_1536B:
mov rax, [rsp+48h+var_10]
mov ecx, [rax+20h]
mov rax, [rsp+48h+var_38]
mov [rax], ecx
loc_1537A:
mov rax, [rsp+48h+var_10]
mov rax, [rax+18h]
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_10]
mov qword ptr [rax+18h], 0
cmp [rsp+48h+var_2C], 0
jz loc_15451
mov eax, [rsp+48h+var_2C]
mov rcx, [rsp+48h+var_10]
mov rcx, [rcx]
cmp eax, [rcx+0Ch]
jz loc_15451
mov rax, [rsp+48h+var_38]
cmp dword ptr [rax], 8
jnz short loc_153F5
mov rdi, [rsp+48h+var_40]; unsigned __int8 *
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov esi, [rax+0Ch]; int
mov edx, [rsp+48h+var_2C]; int
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov ecx, [rax]; unsigned int
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov r8d, [rax+4]; unsigned int
call _ZL20stbi__convert_formatPhiijj; stbi__convert_format(uchar *,int,int,uint,uint)
mov [rsp+48h+var_40], rax
jmp short loc_15429
loc_153F5:
mov rdi, [rsp+48h+var_40]; unsigned __int16 *
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov esi, [rax+0Ch]; int
mov edx, [rsp+48h+var_2C]; int
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov ecx, [rax]; unsigned int
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov r8d, [rax+4]; unsigned int
call _ZL22stbi__convert_format16Ptiijj; stbi__convert_format16(ushort *,int,int,uint,uint)
mov [rsp+48h+var_40], rax
loc_15429:
mov ecx, [rsp+48h+var_2C]
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov [rax+0Ch], ecx
cmp [rsp+48h+var_40], 0
jnz short loc_1544F
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_8], rax
jmp loc_154EB
loc_1544F:
jmp short $+2
loc_15451:
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov ecx, [rax]
mov rax, [rsp+48h+var_18]
mov [rax], ecx
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov ecx, [rax+4]
mov rax, [rsp+48h+var_20]
mov [rax], ecx
cmp [rsp+48h+var_28], 0
jz short loc_1548E
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov ecx, [rax+8]
mov rax, [rsp+48h+var_28]
mov [rax], ecx
loc_1548E:
jmp short $+2
loc_15490:
mov rax, [rsp+48h+var_10]
mov rdi, [rax+18h]
call _free
mov rax, [rsp+48h+var_10]
mov qword ptr [rax+18h], 0
mov rax, [rsp+48h+var_10]
mov rdi, [rax+10h]
call _free
mov rax, [rsp+48h+var_10]
mov qword ptr [rax+10h], 0
mov rax, [rsp+48h+var_10]
mov rdi, [rax+8]
call _free
mov rax, [rsp+48h+var_10]
mov qword ptr [rax+8], 0
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_8], rax
loc_154EB:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| unsigned __int8 * stbi__do_png(_DWORD **a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, unsigned int a5, _DWORD *a6)
{
unsigned __int8 *v7; // [rsp+8h] [rbp-40h]
v7 = 0LL;
if ( a5 <= 4 )
{
if ( (unsigned int)stbi__parse_png_file(a1, 0LL, a5) )
{
if ( *((int *)a1 + 8) >= 8 )
*a6 = *((_DWORD *)a1 + 8);
else
*a6 = 8;
v7 = (unsigned __int8 *)a1[3];
a1[3] = 0LL;
if ( a5 && a5 != (*a1)[3] )
{
v7 = (unsigned __int8 *)(*a6 == 8
? stbi__convert_format(v7, (*a1)[3], a5, **a1, (*a1)[1])
: stbi__convert_format16((unsigned __int16 *)v7, (*a1)[3], a5, **a1, (*a1)[1]));
(*a1)[3] = a5;
if ( !v7 )
return 0LL;
}
*a2 = **a1;
*a3 = (*a1)[1];
if ( a4 )
*a4 = (*a1)[2];
}
free(a1[3]);
a1[3] = 0LL;
free(a1[2]);
a1[2] = 0LL;
free(a1[1]);
a1[1] = 0LL;
return v7;
}
stbi__err("bad req_comp");
return 0LL;
}
| stbi__do_png:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x1c],R8D
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x8],0x0
CMP dword ptr [RSP + 0x1c],0x0
JL 0x00115319
CMP dword ptr [RSP + 0x1c],0x4
JLE 0x0011533a
LAB_00115319:
LEA RDI,[0x12447d]
CALL 0x00102630
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001154eb
LAB_0011533a:
MOV RDI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x1c]
XOR ESI,ESI
CALL 0x00115500
CMP EAX,0x0
JZ 0x00115490
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x20],0x8
JGE 0x0011536b
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],0x8
JMP 0x0011537a
LAB_0011536b:
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
LAB_0011537a:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x18],0x0
CMP dword ptr [RSP + 0x1c],0x0
JZ 0x00115451
MOV EAX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX + 0xc]
JZ 0x00115451
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX],0x8
JNZ 0x001153f5
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [RAX + 0xc]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV R8D,dword ptr [RAX + 0x4]
CALL 0x00116230
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00115429
LAB_001153f5:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [RAX + 0xc]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV R8D,dword ptr [RAX + 0x4]
CALL 0x001168a0
MOV qword ptr [RSP + 0x8],RAX
LAB_00115429:
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + 0xc],ECX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x0011544f
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001154eb
LAB_0011544f:
JMP 0x00115451
LAB_00115451:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],ECX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0011548e
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX],ECX
LAB_0011548e:
JMP 0x00115490
LAB_00115490:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x001021d0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001021d0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001021d0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
LAB_001154eb:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
/* stbi__do_png(stbi__png*, int*, int*, int*, int, stbi__result_info*) */
ushort * stbi__do_png(stbi__png *param_1,int *param_2,int *param_3,int *param_4,int param_5,
stbi__result_info *param_6)
{
int iVar1;
ushort *local_40;
ushort *local_8;
local_40 = (ushort *)0x0;
if ((param_5 < 0) || (4 < param_5)) {
stbi__err("bad req_comp");
local_8 = (ushort *)0x0;
}
else {
iVar1 = stbi__parse_png_file(param_1,0,param_5);
if (iVar1 != 0) {
if (*(int *)(param_1 + 0x20) < 8) {
*(int4 *)param_6 = 8;
}
else {
*(int4 *)param_6 = *(int4 *)(param_1 + 0x20);
}
local_40 = *(ushort **)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
if ((param_5 != 0) && (param_5 != *(int *)(*(long *)param_1 + 0xc))) {
if (*(int *)param_6 == 8) {
local_40 = (ushort *)
stbi__convert_format
((uchar *)local_40,*(int *)(*(long *)param_1 + 0xc),param_5,
**(uint **)param_1,*(uint *)(*(long *)param_1 + 4));
}
else {
local_40 = (ushort *)
stbi__convert_format16
(local_40,*(int *)(*(long *)param_1 + 0xc),param_5,**(uint **)param_1
,*(uint *)(*(long *)param_1 + 4));
}
*(int *)(*(long *)param_1 + 0xc) = param_5;
if (local_40 == (ushort *)0x0) {
return (ushort *)0x0;
}
}
*param_2 = **(int **)param_1;
*param_3 = *(int *)(*(long *)param_1 + 4);
if (param_4 != (int *)0x0) {
*param_4 = *(int *)(*(long *)param_1 + 8);
}
}
free(*(void **)(param_1 + 0x18));
*(int8 *)(param_1 + 0x18) = 0;
free(*(void **)(param_1 + 0x10));
*(int8 *)(param_1 + 0x10) = 0;
free(*(void **)(param_1 + 8));
*(int8 *)(param_1 + 8) = 0;
local_8 = local_40;
}
return local_8;
}
| |
22,742 | my_strnncollsp_simple | eloqsql/strings/ctype-simple.c | int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *map= cs->sort_order, *end;
size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]);
}
res= 0;
if (a_length != b_length)
{
int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
*/
if (a_length < b_length)
{
/* put shorter key in s */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
res= -res;
}
for (end= a + a_length-length; a < end ; a++)
{
if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
} | O3 | c | my_strnncollsp_simple:
pushq %rbp
movq %rsp, %rbp
movq 0x58(%rdi), %rdi
cmpq %r8, %rdx
movq %r8, %r9
cmovbq %rdx, %r9
leaq (%rsi,%r9), %r10
cmpq %r10, %rsi
jae 0xb472d
movzbl (%rsi), %eax
incq %rsi
movzbl (%rdi,%rax), %eax
movzbl (%rcx), %r11d
incq %rcx
movzbl (%rdi,%r11), %r11d
cmpb %r11b, %al
je 0xb4708
subl %r11d, %eax
jmp 0xb4783
cmpq %r8, %rdx
jne 0xb4736
xorl %eax, %eax
jmp 0xb4783
xorl %eax, %eax
cmpq %r8, %rdx
cmovaq %rdx, %r8
cmovbq %rcx, %rsi
movl $0x0, %ecx
sbbl %ecx, %ecx
leaq (%rsi,%r8), %rdx
subq %r9, %rdx
cmpq %rdx, %rsi
jae 0xb4783
orl $0x1, %ecx
movb 0x20(%rdi), %dl
subq %r9, %r8
xorl %eax, %eax
movzbl (%rsi,%rax), %r9d
movb (%rdi,%r9), %r9b
cmpb %dl, %r9b
jne 0xb4779
incq %rax
cmpq %rax, %r8
jne 0xb4761
jmp 0xb4732
movl %ecx, %eax
negl %eax
cmpb %dl, %r9b
cmovael %ecx, %eax
popq %rbp
retq
| my_strnncollsp_simple:
push rbp
mov rbp, rsp
mov rdi, [rdi+58h]
cmp rdx, r8
mov r9, r8
cmovb r9, rdx
lea r10, [rsi+r9]
loc_B4708:
cmp rsi, r10
jnb short loc_B472D
movzx eax, byte ptr [rsi]
inc rsi
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx]
inc rcx
movzx r11d, byte ptr [rdi+r11]
cmp al, r11b
jz short loc_B4708
sub eax, r11d
jmp short loc_B4783
loc_B472D:
cmp rdx, r8
jnz short loc_B4736
loc_B4732:
xor eax, eax
jmp short loc_B4783
loc_B4736:
xor eax, eax
cmp rdx, r8
cmova r8, rdx
cmovb rsi, rcx
mov ecx, 0
sbb ecx, ecx
lea rdx, [rsi+r8]
sub rdx, r9
cmp rsi, rdx
jnb short loc_B4783
or ecx, 1
mov dl, [rdi+20h]
sub r8, r9
xor eax, eax
loc_B4761:
movzx r9d, byte ptr [rsi+rax]
mov r9b, [rdi+r9]
cmp r9b, dl
jnz short loc_B4779
inc rax
cmp r8, rax
jnz short loc_B4761
jmp short loc_B4732
loc_B4779:
mov eax, ecx
neg eax
cmp r9b, dl
cmovnb eax, ecx
loc_B4783:
pop rbp
retn
| long long my_strnncollsp_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
long long v5; // rdi
unsigned long long v6; // r9
unsigned __int8 *v7; // r10
long long v8; // rax
int v9; // eax
long long v10; // r11
int v11; // r11d
long long result; // rax
bool v13; // cf
unsigned int v14; // ecx
unsigned __int8 v15; // dl
unsigned long long v16; // r8
long long v17; // rax
unsigned __int8 v18; // r9
v5 = *(_QWORD *)(a1 + 88);
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = &a2[v6];
while ( a2 < v7 )
{
v8 = *a2++;
v9 = *(unsigned __int8 *)(v5 + v8);
v10 = *a4++;
v11 = *(unsigned __int8 *)(v5 + v10);
if ( (_BYTE)v9 != (_BYTE)v11 )
return (unsigned int)(v9 - v11);
}
if ( a3 == a5 )
return 0LL;
result = 0LL;
v13 = a3 < a5;
if ( a3 > a5 )
a5 = a3;
if ( v13 )
a2 = a4;
if ( a2 < &a2[a5 - v6] )
{
v14 = v13 ? -1 : 1;
v15 = *(_BYTE *)(v5 + 32);
v16 = a5 - v6;
v17 = 0LL;
while ( 1 )
{
v18 = *(_BYTE *)(v5 + a2[v17]);
if ( v18 != v15 )
break;
if ( v16 == ++v17 )
return 0LL;
}
result = -v14;
if ( v18 >= v15 )
return v14;
}
return result;
}
| my_strnncollsp_simple:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x58]
CMP RDX,R8
MOV R9,R8
CMOVC R9,RDX
LEA R10,[RSI + R9*0x1]
LAB_001b4708:
CMP RSI,R10
JNC 0x001b472d
MOVZX EAX,byte ptr [RSI]
INC RSI
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX]
INC RCX
MOVZX R11D,byte ptr [RDI + R11*0x1]
CMP AL,R11B
JZ 0x001b4708
SUB EAX,R11D
JMP 0x001b4783
LAB_001b472d:
CMP RDX,R8
JNZ 0x001b4736
LAB_001b4732:
XOR EAX,EAX
JMP 0x001b4783
LAB_001b4736:
XOR EAX,EAX
CMP RDX,R8
CMOVA R8,RDX
CMOVC RSI,RCX
MOV ECX,0x0
SBB ECX,ECX
LEA RDX,[RSI + R8*0x1]
SUB RDX,R9
CMP RSI,RDX
JNC 0x001b4783
OR ECX,0x1
MOV DL,byte ptr [RDI + 0x20]
SUB R8,R9
XOR EAX,EAX
LAB_001b4761:
MOVZX R9D,byte ptr [RSI + RAX*0x1]
MOV R9B,byte ptr [RDI + R9*0x1]
CMP R9B,DL
JNZ 0x001b4779
INC RAX
CMP R8,RAX
JNZ 0x001b4761
JMP 0x001b4732
LAB_001b4779:
MOV EAX,ECX
NEG EAX
CMP R9B,DL
CMOVNC EAX,ECX
LAB_001b4783:
POP RBP
RET
|
uint my_strnncollsp_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
long lVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
lVar4 = *(long *)(param_1 + 0x58);
uVar8 = param_5;
if (param_3 < param_5) {
uVar8 = param_3;
}
pbVar1 = param_2 + uVar8;
while (param_2 < pbVar1) {
bVar2 = *param_2;
param_2 = param_2 + 1;
bVar3 = *param_4;
param_4 = param_4 + 1;
if (*(byte *)(lVar4 + (ulong)bVar2) != *(byte *)(lVar4 + (ulong)bVar3)) {
return (uint)*(byte *)(lVar4 + (ulong)bVar2) - (uint)*(byte *)(lVar4 + (ulong)bVar3);
}
}
if (param_3 != param_5) {
uVar7 = param_5;
if (param_5 < param_3) {
uVar7 = param_3;
}
if (param_3 < param_5) {
param_2 = param_4;
}
if (param_2 + (uVar7 - uVar8) <= param_2) {
return 0;
}
uVar6 = -(uint)(param_3 < param_5) | 1;
lVar5 = 0;
do {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) != *(byte *)(lVar4 + 0x20)) {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) < *(byte *)(lVar4 + 0x20)) {
return -uVar6;
}
return uVar6;
}
lVar5 = lVar5 + 1;
} while (uVar7 - uVar8 != lVar5);
}
return 0;
}
| |
22,743 | 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>::size() const | monkey531[P]llama/common/./json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
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:
{
// all other types have size 1
return 1;
}
}
} | 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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x35f2e
cmpl $0x1, %eax
je 0x35f0b
cmpl $0x2, %eax
jne 0x35f29
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_35F2E
cmp eax, 1
jz short loc_35F0B
cmp eax, 2
jnz short loc_35F29
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_35F0B:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_35F29:
mov eax, 1
locret_35F2E:
retn
| 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>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
| size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x00135f2e
CMP EAX,0x1
JZ 0x00135f0b
CMP EAX,0x2
JNZ 0x00135f29
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_00135f0b:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_00135f29:
MOV EAX,0x1
LAB_00135f2e:
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>::size() const */
ulong __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>
::size(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)
{
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>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (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) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (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 (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
| |
22,744 | js_parse_template_part | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_template_part(JSParseState *s,
const uint8_t *p)
{
const uint8_t *p_next;
uint32_t c;
StringBuffer b_s, *b = &b_s;
/* p points to the first byte of the template part */
if (string_buffer_init(s->ctx, b, 32))
goto fail;
for(;;) {
if (p >= s->buf_end)
goto unexpected_eof;
c = *p++;
if (c == '`') {
/* template end part */
break;
}
if (c == '$' && *p == '{') {
/* template start or middle part */
p++;
break;
}
if (c == '\\') {
if (string_buffer_putc8(b, c))
goto fail;
if (p >= s->buf_end)
goto unexpected_eof;
c = *p++;
}
/* newline sequences are normalized as single '\n' bytes */
if (c == '\r') {
if (*p == '\n')
p++;
c = '\n';
}
if (c == '\n') {
s->line_num++;
s->eol = &p[-1];
s->mark = p;
} else if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
js_parse_error(s, "invalid UTF-8 sequence");
goto fail;
}
p = p_next;
}
if (string_buffer_putc(b, c))
goto fail;
}
s->token.val = TOK_TEMPLATE;
s->token.u.str.sep = c;
s->token.u.str.str = string_buffer_end(b);
s->buf_ptr = p;
return 0;
unexpected_eof:
js_parse_error(s, "unexpected end of string");
fail:
string_buffer_free(b);
return -1;
} | O1 | c | js_parse_template_part:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x3f8ca(%rip), %xmm0 # 0xa29f0
movups %xmm0, 0x18(%rsp)
movl $0x20, %esi
xorl %edx, %edx
callq 0x24bcf
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x6328f
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r15
cmpq 0x78(%rbx), %r12
jae 0x6321f
leaq 0x1(%r12), %r13
movzbl (%r12), %esi
cmpl $0x24, %esi
je 0x63177
cmpl $0x5c, %esi
je 0x63187
cmpl $0x60, %esi
jne 0x631af
jmp 0x63262
cmpb $0x7b, (%r13)
je 0x6325b
cmpl $0x5c, %esi
jne 0x631af
movq %r14, %rdi
movl $0x5c, %esi
callq 0x4f8bd
testl %eax, %eax
jne 0x63230
cmpq 0x78(%rbx), %r13
jae 0x6321f
movzbl 0x1(%r12), %esi
addq $0x2, %r12
movq %r12, %r13
cmpl $0xd, %esi
jne 0x631c6
xorl %eax, %eax
cmpb $0xa, (%r13)
sete %al
addq %rax, %r13
movl $0xa, %esi
cmpl $0xa, %esi
jne 0x631e7
incl 0x10(%rbx)
leaq -0x1(%r13), %rax
movq %rax, 0x80(%rbx)
movq %r13, 0x88(%rbx)
movl $0xa, %esi
jmp 0x6320a
cmpl $0x80, %esi
jb 0x6320a
leaq -0x1(%r13), %rdi
movq %r15, %rsi
callq 0x1f785
movl %eax, %esi
movq 0x28(%rsp), %rax
cmpq %r13, %rax
je 0x63286
movq %rax, %r13
movq %r14, %rdi
callq 0x3744c
movq %r13, %r12
testl %eax, %eax
je 0x6314f
jmp 0x63230
leaq 0x4186f(%rip), %rsi # 0xa4a95
movq %rbx, %rdi
xorl %eax, %eax
callq 0x33d45
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x20bf5
movq $0x0, 0x10(%rsp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
addq $0x2, %r12
movq %r12, %r13
movl $0xffffff82, 0x20(%rbx) # imm = 0xFFFFFF82
movl %esi, 0x48(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x374a0
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
movq %r13, 0x70(%rbx)
xorl %eax, %eax
jmp 0x6324d
leaq 0x417f1(%rip), %rsi # 0xa4a7e
jmp 0x63226
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x63230
| js_parse_template_part:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov r12, rsi
mov rbx, rdi
mov rdi, [rdi]
mov [rsp+58h+var_50], rdi
movsd xmm0, cs:qword_A29F0
movups [rsp+58h+var_40], xmm0
mov esi, 20h ; ' '
xor edx, edx
call js_alloc_string
mov [rsp+58h+var_48], rax
test rax, rax
jz loc_6328F
lea r14, [rsp+58h+var_50]
lea r15, [rsp+58h+var_30]
loc_6314F:
cmp r12, [rbx+78h]
jnb loc_6321F
lea r13, [r12+1]
movzx esi, byte ptr [r12]
cmp esi, 24h ; '$'
jz short loc_63177
cmp esi, 5Ch ; '\'
jz short loc_63187
cmp esi, 60h ; '`'
jnz short loc_631AF
jmp loc_63262
loc_63177:
cmp byte ptr [r13+0], 7Bh ; '{'
jz loc_6325B
cmp esi, 5Ch ; '\'
jnz short loc_631AF
loc_63187:
mov rdi, r14
mov esi, 5Ch ; '\'
call string_buffer_putc8
test eax, eax
jnz loc_63230
cmp r13, [rbx+78h]
jnb short loc_6321F
movzx esi, byte ptr [r12+1]
add r12, 2
mov r13, r12
loc_631AF:
cmp esi, 0Dh
jnz short loc_631C6
xor eax, eax
cmp byte ptr [r13+0], 0Ah
setz al
add r13, rax
mov esi, 0Ah
loc_631C6:
cmp esi, 0Ah
jnz short loc_631E7
inc dword ptr [rbx+10h]
lea rax, [r13-1]
mov [rbx+80h], rax
mov [rbx+88h], r13
mov esi, 0Ah
jmp short loc_6320A
loc_631E7:
cmp esi, 80h
jb short loc_6320A
lea rdi, [r13-1]
mov rsi, r15
call utf8_decode
mov esi, eax
mov rax, [rsp+58h+var_30]
cmp rax, r13
jz short loc_63286
mov r13, rax
loc_6320A:
mov rdi, r14
call string_buffer_putc
mov r12, r13
test eax, eax
jz loc_6314F
jmp short loc_63230
loc_6321F:
lea rsi, aUnexpectedEndO_1; "unexpected end of string"
loc_63226:
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_63230:
mov rdi, [rsp+58h+var_50]
mov rsi, [rsp+58h+var_48]
call js_free
mov [rsp+58h+var_48], 0
mov eax, 0FFFFFFFFh
loc_6324D:
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_6325B:
add r12, 2
mov r13, r12
loc_63262:
mov dword ptr [rbx+20h], 0FFFFFF82h
mov [rbx+48h], esi
lea rdi, [rsp+58h+var_50]
call string_buffer_end
mov [rbx+38h], rax
mov [rbx+40h], rdx
mov [rbx+70h], r13
xor eax, eax
jmp short loc_6324D
loc_63286:
lea rsi, aInvalidUtf8Seq; "invalid UTF-8 sequence"
jmp short loc_63226
loc_6328F:
mov dword ptr [rsp+58h+var_40+4], 0
mov dword ptr [rsp+58h+var_40+0Ch], 0FFFFFFFFh
jmp short loc_63230
| long long js_parse_template_part(
long long a1,
char *a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
char *v17; // r13
unsigned int v18; // esi
const char *v19; // rsi
long long v21; // rdx
char v22; // [rsp+0h] [rbp-58h]
long long v23; // [rsp+8h] [rbp-50h] BYREF
long long v24; // [rsp+10h] [rbp-48h]
__int128 v25; // [rsp+18h] [rbp-40h]
char *v26; // [rsp+28h] [rbp-30h] BYREF
v23 = *(_QWORD *)a1;
v25 = 0x2000000000uLL;
v24 = js_alloc_string(v23, 32LL, 0);
if ( !v24 )
{
DWORD1(v25) = 0;
HIDWORD(v25) = -1;
LABEL_23:
js_free(v23, v24);
v24 = 0LL;
return 0xFFFFFFFFLL;
}
while ( 1 )
{
if ( (unsigned long long)a2 >= *(_QWORD *)(a1 + 120) )
{
LABEL_21:
v19 = "unexpected end of string";
LABEL_22:
js_parse_error(
(long long *)a1,
(long long)v19,
v11,
v12,
v13,
v14,
(__m128)0x2000000000uLL,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v22);
goto LABEL_23;
}
v17 = a2 + 1;
v18 = (unsigned __int8)*a2;
if ( v18 == 36 )
break;
if ( v18 == 92 )
{
if ( (unsigned int)string_buffer_putc8(
(long long)&v23,
0x5Cu,
(__m128)0x2000000000uLL,
a4,
a5,
a6,
v15,
v16,
a9,
a10,
v11,
v12,
v13,
v14) )
goto LABEL_23;
if ( (unsigned long long)v17 >= *(_QWORD *)(a1 + 120) )
goto LABEL_21;
v18 = (unsigned __int8)a2[1];
v17 = a2 + 2;
}
else if ( v18 == 96 )
{
goto LABEL_25;
}
LABEL_12:
if ( v18 == 13 )
{
v17 += *v17 == 10;
v18 = 10;
}
if ( v18 == 10 )
{
++*(_DWORD *)(a1 + 16);
*(_QWORD *)(a1 + 128) = v17 - 1;
*(_QWORD *)(a1 + 136) = v17;
v18 = 10;
}
else if ( v18 >= 0x80 )
{
v18 = utf8_decode(v17 - 1, &v26);
if ( v26 == v17 )
{
v19 = "invalid UTF-8 sequence";
goto LABEL_22;
}
v17 = v26;
}
a2 = v17;
if ( (unsigned int)string_buffer_putc((long long)&v23, v18) )
goto LABEL_23;
}
if ( *v17 != 123 )
goto LABEL_12;
v17 = a2 + 2;
LABEL_25:
*(_DWORD *)(a1 + 32) = -126;
*(_DWORD *)(a1 + 72) = v18;
*(_QWORD *)(a1 + 56) = string_buffer_end((long long)&v23);
*(_QWORD *)(a1 + 64) = v21;
*(_QWORD *)(a1 + 112) = v17;
return 0LL;
}
| js_parse_template_part:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R12,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RDI
MOVSD XMM0,qword ptr [0x001a29f0]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV ESI,0x20
XOR EDX,EDX
CALL 0x00124bcf
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0016328f
LEA R14,[RSP + 0x8]
LEA R15,[RSP + 0x28]
LAB_0016314f:
CMP R12,qword ptr [RBX + 0x78]
JNC 0x0016321f
LEA R13,[R12 + 0x1]
MOVZX ESI,byte ptr [R12]
CMP ESI,0x24
JZ 0x00163177
CMP ESI,0x5c
JZ 0x00163187
CMP ESI,0x60
JNZ 0x001631af
JMP 0x00163262
LAB_00163177:
CMP byte ptr [R13],0x7b
JZ 0x0016325b
CMP ESI,0x5c
JNZ 0x001631af
LAB_00163187:
MOV RDI,R14
MOV ESI,0x5c
CALL 0x0014f8bd
TEST EAX,EAX
JNZ 0x00163230
CMP R13,qword ptr [RBX + 0x78]
JNC 0x0016321f
MOVZX ESI,byte ptr [R12 + 0x1]
ADD R12,0x2
MOV R13,R12
LAB_001631af:
CMP ESI,0xd
JNZ 0x001631c6
XOR EAX,EAX
CMP byte ptr [R13],0xa
SETZ AL
ADD R13,RAX
MOV ESI,0xa
LAB_001631c6:
CMP ESI,0xa
JNZ 0x001631e7
INC dword ptr [RBX + 0x10]
LEA RAX,[R13 + -0x1]
MOV qword ptr [RBX + 0x80],RAX
MOV qword ptr [RBX + 0x88],R13
MOV ESI,0xa
JMP 0x0016320a
LAB_001631e7:
CMP ESI,0x80
JC 0x0016320a
LEA RDI,[R13 + -0x1]
MOV RSI,R15
CALL 0x0011f785
MOV ESI,EAX
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,R13
JZ 0x00163286
MOV R13,RAX
LAB_0016320a:
MOV RDI,R14
CALL 0x0013744c
MOV R12,R13
TEST EAX,EAX
JZ 0x0016314f
JMP 0x00163230
LAB_0016321f:
LEA RSI,[0x1a4a95]
LAB_00163226:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00133d45
LAB_00163230:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00120bf5
MOV qword ptr [RSP + 0x10],0x0
MOV EAX,0xffffffff
LAB_0016324d:
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0016325b:
ADD R12,0x2
MOV R13,R12
LAB_00163262:
MOV dword ptr [RBX + 0x20],0xffffff82
MOV dword ptr [RBX + 0x48],ESI
LEA RDI,[RSP + 0x8]
CALL 0x001374a0
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
MOV qword ptr [RBX + 0x70],R13
XOR EAX,EAX
JMP 0x0016324d
LAB_00163286:
LEA RSI,[0x1a4a7e]
JMP 0x00163226
LAB_0016328f:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00163230
|
int8 js_parse_template_part(int8 *param_1,byte *param_2)
{
byte bVar1;
uint uVar2;
int iVar3;
uint uVar4;
char *pcVar5;
byte *pbVar6;
bool bVar7;
int1 auVar8 [16];
int8 local_50;
long local_48;
ulong local_40;
int8 uStack_38;
byte *local_30;
local_50 = *param_1;
local_40 = DAT_001a29f0;
uStack_38 = 0;
local_48 = js_alloc_string(local_50,0x20,0);
if (local_48 == 0) {
local_40 = local_40 & 0xffffffff;
uStack_38 = CONCAT44(0xffffffff,(int4)uStack_38);
}
else {
do {
if ((byte *)param_1[0xf] <= param_2) {
LAB_0016321f:
pcVar5 = "unexpected end of string";
LAB_00163226:
js_parse_error(param_1,pcVar5);
break;
}
pbVar6 = param_2 + 1;
bVar1 = *param_2;
uVar2 = (uint)bVar1;
uVar4 = (uint)bVar1;
if (bVar1 == 0x24) {
if (*pbVar6 == 0x7b) {
pbVar6 = param_2 + 2;
LAB_00163262:
*(int4 *)(param_1 + 4) = 0xffffff82;
*(uint *)(param_1 + 9) = uVar4;
auVar8 = string_buffer_end(&local_50);
*(int1 (*) [16])(param_1 + 7) = auVar8;
param_1[0xe] = pbVar6;
return 0;
}
}
else if (uVar4 == 0x5c) {
iVar3 = string_buffer_putc8(&local_50,0x5c);
if (iVar3 != 0) break;
if ((byte *)param_1[0xf] <= pbVar6) goto LAB_0016321f;
uVar2 = (uint)param_2[1];
pbVar6 = param_2 + 2;
}
else if (uVar4 == 0x60) goto LAB_00163262;
param_2 = pbVar6;
if (uVar2 == 0xd) {
param_2 = pbVar6 + (*pbVar6 == 10);
uVar2 = 10;
}
if (uVar2 == 10) {
*(int *)(param_1 + 2) = *(int *)(param_1 + 2) + 1;
param_1[0x10] = param_2 + -1;
param_1[0x11] = param_2;
uVar2 = 10;
}
else if ((0x7f < uVar2) &&
(uVar2 = utf8_decode(param_2 + -1,&local_30), bVar7 = local_30 == param_2,
param_2 = local_30, bVar7)) {
pcVar5 = "invalid UTF-8 sequence";
goto LAB_00163226;
}
iVar3 = string_buffer_putc(&local_50,uVar2);
} while (iVar3 == 0);
}
js_free(local_50,local_48);
return 0xffffffff;
}
| |
22,745 | common_params_parse(int, char**, common_params&, llama_example, void (*)(int, char**)) | monkey531[P]llama/common/arg.cpp | bool common_params_parse(int argc, char ** argv, common_params & params, llama_example ex, void(*print_usage)(int, char **)) {
auto ctx_arg = common_params_parser_init(params, ex, print_usage);
const common_params params_org = ctx_arg.params; // the example can modify the default params
try {
if (!common_params_parse_ex(argc, argv, ctx_arg)) {
ctx_arg.params = params_org;
return false;
}
if (ctx_arg.params.usage) {
common_params_print_usage(ctx_arg);
if (ctx_arg.print_usage) {
ctx_arg.print_usage(argc, argv);
}
exit(0);
}
} catch (const std::invalid_argument & ex) {
fprintf(stderr, "%s\n", ex.what());
ctx_arg.params = params_org;
return false;
}
return true;
} | O0 | cpp | common_params_parse(int, char**, common_params&, llama_example, void (*)(int, char**)):
subq $0x1368, %rsp # imm = 0x1368
movl %edi, 0x1360(%rsp)
movq %rsi, 0x1358(%rsp)
movq %rdx, 0x1350(%rsp)
movl %ecx, 0x134c(%rsp)
movq %r8, 0x1340(%rsp)
movq 0x1350(%rsp), %rsi
movl 0x134c(%rsp), %edx
movq 0x1340(%rsp), %rcx
leaq 0x1310(%rsp), %rdi
callq 0x68be0
movq 0x1318(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x8b120
jmp 0x68a05
movl 0x1360(%rsp), %edi
movq 0x1358(%rsp), %rsi
leaq 0x1310(%rsp), %rdx
callq 0x7f500
movb %al, 0xf(%rsp)
jmp 0x68a27
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x68afb
jmp 0x68a35
movq 0x1318(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8c0e0
jmp 0x68a49
movb $0x0, 0x1367(%rsp)
movl $0x1, 0x18(%rsp)
jmp 0x68b85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x68bb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x68bad
movq 0x20(%rsp), %rdi
callq 0x5a0f0
movq %rax, 0x10(%rsp)
movq 0x23a49a(%rip), %rax # 0x2a2f40
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x1a6743(%rip), %rsi # 0x20f20c
xorl %eax, %eax
callq 0x5a330
movq 0x1318(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8c0e0
jmp 0x68ae4
movb $0x0, 0x1367(%rsp)
movl $0x1, 0x18(%rsp)
callq 0x5ade0
jmp 0x68b61
movq 0x1318(%rsp), %rax
testb $0x1, 0xfd9(%rax)
je 0x68b4a
leaq 0x1310(%rsp), %rdi
callq 0x80ca0
jmp 0x68b1b
cmpq $0x0, 0x1338(%rsp)
je 0x68b43
movq 0x1338(%rsp), %rax
movl 0x1360(%rsp), %edi
movq 0x1358(%rsp), %rsi
callq *%rax
jmp 0x68b41
jmp 0x68b43
xorl %edi, %edi
callq 0x5ac50
jmp 0x68b75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x5ade0
jmp 0x68b73
jmp 0x68b85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x68bad
jmp 0x68bad
movb $0x1, 0x1367(%rsp)
movl $0x1, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x625d0
leaq 0x1310(%rsp), %rdi
callq 0x8c740
movb 0x1367(%rsp), %al
andb $0x1, %al
addq $0x1368, %rsp # imm = 0x1368
retq
leaq 0x28(%rsp), %rdi
callq 0x625d0
leaq 0x1310(%rsp), %rdi
callq 0x8c740
movq 0x20(%rsp), %rdi
callq 0x5abf0
movq %rax, %rdi
callq 0x63df0
nopw %cs:(%rax,%rax)
| _Z19common_params_parseiPPcR13common_params13llama_examplePFviS0_E:
sub rsp, 1368h
mov [rsp+1368h+var_8], edi
mov [rsp+1368h+var_10], rsi
mov [rsp+1368h+var_18], rdx
mov [rsp+1368h+var_1C], ecx
mov [rsp+1368h+var_28], r8
mov rsi, [rsp+1368h+var_18]
mov edx, [rsp+1368h+var_1C]
mov rcx, [rsp+1368h+var_28]
lea rdi, [rsp+1368h+var_58]
call _Z25common_params_parser_initR13common_params13llama_examplePFviPPcE; common_params_parser_init(common_params &,llama_example,void (*)(int,char **))
mov rsi, [rsp+1368h+var_50]; common_params *
lea rdi, [rsp+1368h+var_1340]; this
call _ZN13common_paramsC2ERKS_; common_params::common_params(common_params const&)
jmp short $+2
loc_68A05:
mov edi, [rsp+1368h+var_8]; int
mov rsi, [rsp+1368h+var_10]; char **
lea rdx, [rsp+1368h+var_58]; common_params_context *
call _ZL22common_params_parse_exiPPcR21common_params_context; common_params_parse_ex(int,char **,common_params_context &)
mov [rsp+1368h+var_1359], al
jmp short $+2
loc_68A27:
mov al, [rsp+1368h+var_1359]
test al, 1
jnz loc_68AFB
jmp short $+2
loc_68A35:
mov rdi, [rsp+1368h+var_50]
lea rsi, [rsp+1368h+var_1340]
call _ZN13common_paramsaSERKS_; common_params::operator=(common_params const&)
jmp short $+2
loc_68A49:
mov [rsp+1368h+var_1], 0
mov [rsp+1368h+var_1350], 1
jmp loc_68B85
mov rcx, rax
mov eax, edx
mov [rsp+1368h+var_1348], rcx
mov [rsp+1368h+var_134C], eax
jmp loc_68BB7
mov rcx, rax
mov eax, edx
mov [rsp+1368h+var_1348], rcx
mov [rsp+1368h+var_134C], eax
mov eax, [rsp+1368h+var_134C]
mov ecx, 1
cmp eax, ecx
jnz loc_68BAD
mov rdi, [rsp+1368h+var_1348]; void *
call ___cxa_begin_catch
mov [rsp+1368h+var_1358], rax
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+1368h+var_1368], rax
mov rdi, [rsp+1368h+var_1358]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rdi, [rsp+1368h+var_1368]
mov rdx, rax
lea rsi, aErrorInvalidTy+25h; "%s\n"
xor eax, eax
call _fprintf
mov rdi, [rsp+1368h+var_50]
lea rsi, [rsp+1368h+var_1340]
call _ZN13common_paramsaSERKS_; common_params::operator=(common_params const&)
jmp short $+2
loc_68AE4:
mov [rsp+1368h+var_1], 0
mov [rsp+1368h+var_1350], 1
call ___cxa_end_catch
jmp short loc_68B61
loc_68AFB:
mov rax, [rsp+1368h+var_50]
test byte ptr [rax+0FD9h], 1
jz short loc_68B4A
lea rdi, [rsp+1368h+var_58]; common_params_context *
call _ZL25common_params_print_usageR21common_params_context; common_params_print_usage(common_params_context &)
jmp short $+2
loc_68B1B:
cmp [rsp+1368h+var_30], 0
jz short loc_68B43
mov rax, [rsp+1368h+var_30]
mov edi, [rsp+1368h+var_8]
mov rsi, [rsp+1368h+var_10]
call rax
jmp short $+2
loc_68B41:
jmp short $+2
loc_68B43:
xor edi, edi
call _exit
loc_68B4A:
jmp short loc_68B75
mov rcx, rax
mov eax, edx
mov [rsp+1368h+var_1348], rcx
mov [rsp+1368h+var_134C], eax
call ___cxa_end_catch
jmp short loc_68B73
loc_68B61:
jmp short loc_68B85
mov rcx, rax
mov eax, edx
mov [rsp+1368h+var_1348], rcx
mov [rsp+1368h+var_134C], eax
jmp short loc_68BAD
loc_68B73:
jmp short loc_68BAD
loc_68B75:
mov [rsp+1368h+var_1], 1
mov [rsp+1368h+var_1350], 1
loc_68B85:
lea rdi, [rsp+1368h+var_1340]; this
call _ZN13common_paramsD2Ev; common_params::~common_params()
lea rdi, [rsp+1368h+var_58]; this
call _ZN21common_params_contextD2Ev; common_params_context::~common_params_context()
mov al, [rsp+1368h+var_1]
and al, 1
add rsp, 1368h
retn
loc_68BAD:
lea rdi, [rsp+1368h+var_1340]; this
call _ZN13common_paramsD2Ev; common_params::~common_params()
loc_68BB7:
lea rdi, [rsp+1368h+var_58]; this
call _ZN21common_params_contextD2Ev; common_params_context::~common_params_context()
mov rdi, [rsp+1368h+var_1348]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| char common_params_parse(int a1, char **a2, long long a3, unsigned int a4, long long a5)
{
_BYTE v6[4840]; // [rsp+28h] [rbp-1340h] BYREF
_BYTE v7[8]; // [rsp+1310h] [rbp-58h] BYREF
common_params *v8; // [rsp+1318h] [rbp-50h]
void ( *v9)(_QWORD, char **); // [rsp+1338h] [rbp-30h]
long long v10; // [rsp+1340h] [rbp-28h]
unsigned int v11; // [rsp+134Ch] [rbp-1Ch]
long long v12; // [rsp+1350h] [rbp-18h]
char **v13; // [rsp+1358h] [rbp-10h]
int v14; // [rsp+1360h] [rbp-8h]
char v15; // [rsp+1367h] [rbp-1h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v10 = a5;
common_params_parser_init(v7, a3, a4, a5);
common_params::common_params((common_params *)v6, v8);
if ( (common_params_parse_ex(v14, v13, (common_params_context *)v7) & 1) != 0 )
{
if ( (*((_BYTE *)v8 + 4057) & 1) != 0 )
{
common_params_print_usage((common_params_context *)v7);
if ( v9 )
v9((unsigned int)v14, v13);
exit(0LL);
}
v15 = 1;
}
else
{
common_params::operator=(v8, v6);
v15 = 0;
}
common_params::~common_params((common_params *)v6);
common_params_context::~common_params_context((common_params_context *)v7);
return v15 & 1;
}
| common_params_parse:
SUB RSP,0x1368
MOV dword ptr [RSP + 0x1360],EDI
MOV qword ptr [RSP + 0x1358],RSI
MOV qword ptr [RSP + 0x1350],RDX
MOV dword ptr [RSP + 0x134c],ECX
MOV qword ptr [RSP + 0x1340],R8
MOV RSI,qword ptr [RSP + 0x1350]
MOV EDX,dword ptr [RSP + 0x134c]
MOV RCX,qword ptr [RSP + 0x1340]
LEA RDI,[RSP + 0x1310]
CALL 0x00168be0
MOV RSI,qword ptr [RSP + 0x1318]
LAB_001689f9:
LEA RDI,[RSP + 0x28]
CALL 0x0018b120
JMP 0x00168a05
LAB_00168a05:
MOV EDI,dword ptr [RSP + 0x1360]
MOV RSI,qword ptr [RSP + 0x1358]
LAB_00168a14:
LEA RDX,[RSP + 0x1310]
CALL 0x0017f500
MOV byte ptr [RSP + 0xf],AL
JMP 0x00168a27
LAB_00168a27:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x00168afb
JMP 0x00168a35
LAB_00168a35:
MOV RDI,qword ptr [RSP + 0x1318]
LEA RSI,[RSP + 0x28]
CALL 0x0018c0e0
LAB_00168a47:
JMP 0x00168a49
LAB_00168a49:
MOV byte ptr [RSP + 0x1367],0x0
MOV dword ptr [RSP + 0x18],0x1
JMP 0x00168b85
LAB_00168afb:
MOV RAX,qword ptr [RSP + 0x1318]
TEST byte ptr [RAX + 0xfd9],0x1
JZ 0x00168b4a
LAB_00168b0c:
LEA RDI,[RSP + 0x1310]
CALL 0x00180ca0
JMP 0x00168b1b
LAB_00168b1b:
CMP qword ptr [RSP + 0x1338],0x0
JZ 0x00168b43
MOV RAX,qword ptr [RSP + 0x1338]
MOV EDI,dword ptr [RSP + 0x1360]
MOV RSI,qword ptr [RSP + 0x1358]
CALL RAX
JMP 0x00168b41
LAB_00168b41:
JMP 0x00168b43
LAB_00168b43:
XOR EDI,EDI
CALL 0x0015ac50
LAB_00168b4a:
JMP 0x00168b75
LAB_00168b75:
MOV byte ptr [RSP + 0x1367],0x1
MOV dword ptr [RSP + 0x18],0x1
LAB_00168b85:
LEA RDI,[RSP + 0x28]
CALL 0x001625d0
LEA RDI,[RSP + 0x1310]
CALL 0x0018c740
MOV AL,byte ptr [RSP + 0x1367]
AND AL,0x1
ADD RSP,0x1368
RET
|
/* common_params_parse(int, char**, common_params&, llama_example, void (*)(int, char**)) */
ulong common_params_parse(int param_1,char **param_2,int8 param_3,int4 param_4,
int8 param_5)
{
byte bVar1;
int8 uVar2;
common_params local_1340 [4840];
common_params_context local_58 [8];
common_params *local_50;
code *local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
char **local_10;
int local_8;
int1 local_1;
local_28 = param_5;
local_1c = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
common_params_parser_init(local_58,param_3,param_4,param_5);
/* try { // try from 001689f9 to 00168a02 has its CatchHandler @ 00168a5e */
common_params::common_params(local_1340,local_50);
/* try { // try from 00168a14 to 00168a46 has its CatchHandler @ 00168a71 */
bVar1 = common_params_parse_ex(local_8,local_10,local_58);
if ((bVar1 & 1) == 0) {
common_params::operator=(local_50,local_1340);
local_1 = 0;
}
else {
if (((byte)local_50[0xfd9] & 1) != 0) {
/* try { // try from 00168b0c to 00168b3e has its CatchHandler @ 00168a71 */
common_params_print_usage(local_58);
if (local_30 != (code *)0x0) {
(*local_30)(local_8,local_10);
}
/* WARNING: Subroutine does not return */
exit(0);
}
local_1 = 1;
}
common_params::~common_params(local_1340);
uVar2 = common_params_context::~common_params_context(local_58);
return CONCAT71((int7)((ulong)uVar2 >> 8),local_1) & 0xffffffffffffff01;
}
| |
22,746 | process_tool_call(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&) | llama.cpp/common/chat.cpp | static common_chat_tool_call process_tool_call(const json & tool_call) {
const auto & arguments = tool_call.at("arguments");
return {
/* .name = */ tool_call.at("name"),
/* .arguments = */ arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
/* .id = */ tool_call.contains("id") ? tool_call.at("id") : "",
};
} | O3 | cpp | process_tool_call(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x74327(%rip), %rsi # 0x11fc8c
movq %r14, %rdi
callq 0xb0720
movq %rax, %r15
leaq 0x766d4(%rip), %rsi # 0x12204b
movq %r14, %rdi
callq 0xafd78
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbf416
leaq 0x20(%rbx), %rdi
cmpb $0x3, (%r15)
jne 0xab99e
movq %r15, %rsi
callq 0xbf416
jmp 0xab9b6
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xaf95e
leaq 0x7340c(%rip), %rsi # 0x11edc9
movq %r14, %rdi
callq 0xb08e4
testb %al, %al
je 0xab9e5
leaq 0x733f9(%rip), %rsi # 0x11edc9
movq %r14, %rdi
callq 0xb0946
movq %rsp, %rdi
movq %rax, %rsi
callq 0x892dc
jmp 0xab9f4
leaq 0x73e55(%rip), %rsi # 0x11f841
movq %rsp, %rdi
callq 0xcf0c6
leaq 0x40(%rbx), %rdi
movq %rsp, %rsi
callq 0xbf416
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8508e
movq %rbx, %rdi
callq 0x897a8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x8508e
movq %r15, %rdi
callq 0x897a8
jmp 0xaba41
movq %rax, %r14
jmp 0xaba59
movq %rax, %r14
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0xaba59
movq (%rax), %rsi
incq %rsi
callq 0x20180
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0xaba70
movq (%rbx), %rsi
incq %rsi
callq 0x20180
movq %r14, %rdi
callq 0x20ae0
| _ZL17process_tool_callRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEE:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
lea rsi, aKeywordArgumen+9; "arguments"
mov rdi, r14
call _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_
mov r15, rax
lea rsi, aNamespacedSetO+2Fh; "name"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
mov rdi, rbx
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
lea rdi, [rbx+20h]
cmp byte ptr [r15], 3
jnz short loc_AB99E
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_AB9B6
loc_AB99E:
mov rsi, r15
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_AB9B6:
lea rsi, aToolCallId+0Ah; "id"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_AB9E5
lea rsi, aToolCallId+0Ah; "id"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
mov rdi, rsp
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_AB9F4
loc_AB9E5:
lea rsi, aExampleToolCal+1Dh; ""
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_AB9F4:
lea rdi, [rbx+40h]
mov rsi, rsp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov r15, rsp
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_ABA41
mov r14, rax
jmp short loc_ABA59
mov r14, rax
loc_ABA41:
mov rdi, [rbx+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_ABA59
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ABA59:
mov rdi, [rbx]; void *
add rbx, 10h
cmp rdi, rbx
jz short loc_ABA70
mov rsi, [rbx]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ABA70:
mov rdi, r14
call __Unwind_Resume
| long long process_tool_call(long long a1, long long a2)
{
_BYTE *v3; // r15
long long v4; // rax
long long v5; // rdi
unsigned __int8 *v6; // rax
unsigned __int8 v8[40]; // [rsp+0h] [rbp-28h] BYREF
v3 = (_BYTE *)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_(
a2,
"arguments");
v4 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
a2,
"name");
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
a1,
v4);
v5 = a1 + 32;
if ( *v3 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v5,
v3);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
v5,
(_DWORD)v3,
-1,
32,
0,
0);
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
a2,
"id") )
{
v6 = (unsigned __int8 *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
a2,
"id");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v8,
v6);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_(
v8,
"");
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
a1 + 64,
v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8);
}
| process_tool_call:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x21fc8c]
MOV RDI,R14
CALL 0x001b0720
MOV R15,RAX
LEA RSI,[0x22204b]
MOV RDI,R14
CALL 0x001afd78
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001bf416
LEA RDI,[RBX + 0x20]
CMP byte ptr [R15],0x3
JNZ 0x001ab99e
LAB_001ab994:
MOV RSI,R15
CALL 0x001bf416
JMP 0x001ab9b6
LAB_001ab99e:
MOV RSI,R15
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001af95e
LAB_001ab9b6:
LEA RSI,[0x21edc9]
MOV RDI,R14
CALL 0x001b08e4
TEST AL,AL
JZ 0x001ab9e5
LEA RSI,[0x21edc9]
MOV RDI,R14
CALL 0x001b0946
MOV RDI,RSP
MOV RSI,RAX
CALL 0x001892dc
JMP 0x001ab9f4
LAB_001ab9e5:
LEA RSI,[0x21f841]
MOV RDI,RSP
CALL 0x001cf0c6
LAB_001ab9f4:
LEA RDI,[RBX + 0x40]
LAB_001ab9f8:
MOV RSI,RSP
CALL 0x001bf416
LAB_001aba00:
MOV RBX,RSP
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0018508e
MOV RDI,RBX
CALL 0x001897a8
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* process_tool_call(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&) */
void process_tool_call(basic_json *param_1)
{
char *pcVar1;
int8 uVar2;
basic_json *pbVar3;
char cVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
abStack_28 [16];
pcVar1 = (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_
();
uVar2 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
();
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1,uVar2);
if (*pcVar1 == '\x03') {
/* try { // try from 001ab994 to 001ab9b5 has its CatchHandler @ 001aba39 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1 + 0x20,pcVar1);
}
else {
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>
::dump(param_1 + 0x20,pcVar1,0xffffffff,0x20,0,0);
}
/* try { // try from 001ab9b6 to 001ab9f3 has its CatchHandler @ 001aba3e */
cVar4 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
();
if (cVar4 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(abStack_28,"");
}
else {
pbVar3 = (basic_json *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
();
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(abStack_28,pbVar3);
}
/* try { // try from 001ab9f8 to 001ab9ff has its CatchHandler @ 001aba1f */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1 + 0x40,abStack_28);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(abStack_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)abStack_28);
return;
}
| |
22,747 | mi_nommap_pwrite | eloqsql/storage/myisam/mi_dynrec.c | size_t mi_nommap_pwrite(MI_INFO *info, const uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
return mysql_file_pwrite(info->dfile, Buffer, Count, offset, MyFlags);
} | O3 | c | mi_nommap_pwrite:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
movl 0x1c0(%rdi), %ebx
leaq 0x301f03(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2df8f
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0x5ab9e
movq %rax, %rbx
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x301eb7(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq 0x63538(%rip), %rdx # 0x914db
movq %r15, %rdi
movq %r14, %rsi
movl $0x103, %ecx # imm = 0x103
callq *0x210(%rax)
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r12
movq %r12, %r8
callq 0x5ab9e
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r14
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r12b
cmovneq %r14, %rsi
leaq 0x301e62(%rip), %rax # 0x32fe50
movq (%rax), %rax
movq %r15, %rdi
callq *0x218(%rax)
jmp 0x2df7d
| mi_nommap_pwrite:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], r8
mov r12, rcx
mov r14, rdx
mov r13, rsi
mov ebx, [rdi+1C0h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_2DF8F
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r8, [rbp+var_30]
call my_pwrite
mov rbx, rax
loc_2DF7D:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2DF8F:
mov r15, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 103h
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r12, [rbp+var_30]
mov r8, r12
call my_pwrite
mov rbx, rax
xor esi, esi
test rax, rax
cmovnz r14, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r12b, 6
cmovnz rsi, r14
lea rax, PSI_server
mov rax, [rax]
mov rdi, r15
call qword ptr [rax+218h]
jmp short loc_2DF7D
| long long mi_nommap_pwrite(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rbx
long long v11; // r15
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
long long v13; // [rsp+50h] [rbp-30h]
v13 = a5;
v7 = *(_DWORD *)(a1 + 448);
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 7LL);
if ( !v8 )
return my_pwrite(v7, a2, a3, a4, v13);
v11 = v8;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v8,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
259LL);
v9 = my_pwrite(v7, a2, a3, a4, v13);
((void ( *)(long long))PSI_server[67])(v11);
return v9;
}
| mi_nommap_pwrite:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],R8
MOV R12,RCX
MOV R14,RDX
MOV R13,RSI
MOV EBX,dword ptr [RDI + 0x1c0]
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012df8f
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x0015ab9e
MOV RBX,RAX
LAB_0012df7d:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012df8f:
MOV R15,RAX
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1914db]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0x103
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV R8,R12
CALL 0x0015ab9e
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R14,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R12B,0x6
CMOVNZ RSI,R14
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
MOV RDI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x0012df7d
|
long mi_nommap_pwrite(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5)
{
int4 uVar1;
ulong uVar2;
long lVar3;
long lVar4;
long lVar5;
int1 local_80 [72];
ulong local_38;
uVar1 = *(int4 *)(param_1 + 0x1c0);
local_38 = param_5;
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,7);
if (lVar3 == 0) {
lVar4 = my_pwrite(uVar1,param_2,param_3,param_4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
0x103);
uVar2 = local_38;
lVar4 = my_pwrite(uVar1,param_2,param_3,param_4,local_38);
if (lVar4 != 0) {
param_3 = 0;
}
lVar5 = 0;
if (lVar4 != -1) {
lVar5 = lVar4;
}
if ((uVar2 & 6) != 0) {
lVar5 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar3,lVar5);
}
return lVar4;
}
| |
22,748 | ftxui::separatorLight() | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/separator.cpp | Element separatorLight() {
return std::make_shared<SeparatorAuto>(LIGHT);
} | O2 | cpp | ftxui::separatorLight():
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1f1a9
leaq 0x18(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x13452
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
| _ZN5ftxui14separatorLightEv:
push rbx
sub rsp, 20h
mov rbx, rdi
lea rsi, [rsp+28h+var_1C]
and dword ptr [rsi], 0
lea rdi, [rsp+28h+var_18]
call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_113SeparatorAutoEJNS0_11BorderStyleEEESt10shared_ptrIT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::SeparatorAuto,ftxui::BorderStyle>(ftxui::BorderStyle &&)
lea rdi, [rsp+28h+var_10]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 20h
pop rbx
retn
| ftxui * ftxui::separatorLight(ftxui *this)
{
__int128 v1; // xmm0
unsigned int v3; // [rsp+Ch] [rbp-1Ch] BYREF
__int128 v4; // [rsp+10h] [rbp-18h] BYREF
v3 = 0;
std::make_shared<ftxui::`anonymous namespace'::SeparatorAuto,ftxui::BorderStyle>(&v4, &v3);
v1 = v4;
*((_QWORD *)&v4 + 1) = 0LL;
*(_OWORD *)this = v1;
*(_QWORD *)&v4 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v4 + 1);
return this;
}
| separatorLight:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
LEA RSI,[RSP + 0xc]
AND dword ptr [RSI],0x0
LEA RDI,[RSP + 0x10]
CALL 0x0011f1a9
LEA RDI,[RSP + 0x18]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00113452
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* ftxui::separatorLight() */
ftxui * __thiscall ftxui::separatorLight(ftxui *this)
{
int8 uVar1;
int8 local_18;
int8 uStack_10;
std::make_shared<ftxui::(anonymous_namespace)::SeparatorAuto,ftxui::BorderStyle>
((BorderStyle *)&local_18);
uVar1 = uStack_10;
uStack_10 = 0;
*(int8 *)this = local_18;
*(int8 *)(this + 8) = uVar1;
local_18 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10);
return this;
}
| |
22,749 | nice_time | eloqsql/unittest/mytap/tap.c | static void nice_time(double sec,char *buff, my_bool part_second)
{
ulong tmp;
if (sec >= 3600.0*24)
{
tmp=(ulong) (sec/(3600.0*24));
sec-=3600.0*24*tmp;
buff+= sprintf(buff, "%ld %s", tmp, tmp > 1 ? " days " : " day ");
}
if (sec >= 3600.0)
{
tmp=(ulong) (sec/3600.0);
sec-=3600.0*tmp;
buff+= sprintf(buff, "%ld %s", tmp, tmp > 1 ? " hours " : " hour ");
}
if (sec >= 60.0)
{
tmp=(ulong) (sec/60.0);
sec-=60.0*tmp;
buff+= sprintf(buff, "%ld min ", tmp);
}
if (part_second)
sprintf(buff,"%.2f sec",sec);
else
sprintf(buff,"%d sec",(int) sec);
} | O0 | c | nice_time:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movsd %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movsd -0x8(%rbp), %xmm0
movsd 0x76514(%rip), %xmm1 # 0x150058
ucomisd %xmm1, %xmm0
jb 0xd9c0a
movsd -0x8(%rbp), %xmm0
movsd 0x764fd(%rip), %xmm1 # 0x150058
divsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x764aa(%rip), %xmm1 # 0x150020
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movaps 0x76590(%rip), %xmm1 # 0x150120
movq -0x20(%rbp), %xmm0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x7658f(%rip), %xmm1 # 0x150130
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd -0x8(%rbp), %xmm1
movsd 0x764a3(%rip), %xmm2 # 0x150060
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rsi
leaq 0x79113(%rip), %rcx # 0x152cf0
leaq 0x79105(%rip), %rax # 0x152ce9
cmpq $0x1, %rsi
cmovaq %rax, %rcx
leaq 0x790ef(%rip), %rsi # 0x152ce2
movb $0x0, %al
callq 0x2a790
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
movsd 0x76451(%rip), %xmm1 # 0x150068
ucomisd %xmm1, %xmm0
jb 0xd9cdd
movsd -0x8(%rbp), %xmm0
movsd 0x7643a(%rip), %xmm1 # 0x150068
divsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x763d7(%rip), %xmm1 # 0x150020
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movaps 0x764bd(%rip), %xmm1 # 0x150120
movq -0x20(%rbp), %xmm0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x764bc(%rip), %xmm1 # 0x150130
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd -0x8(%rbp), %xmm1
movsd 0x763e0(%rip), %xmm2 # 0x150070
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rsi
leaq 0x7904e(%rip), %rcx # 0x152cfe
leaq 0x7903f(%rip), %rax # 0x152cf6
cmpq $0x1, %rsi
cmovaq %rax, %rcx
leaq 0x7901c(%rip), %rsi # 0x152ce2
movb $0x0, %al
callq 0x2a790
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
movsd 0x7638e(%rip), %xmm1 # 0x150078
ucomisd %xmm1, %xmm0
jb 0xd9d96
movsd -0x8(%rbp), %xmm0
movsd 0x76377(%rip), %xmm1 # 0x150078
divsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x76304(%rip), %xmm1 # 0x150020
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
movaps 0x763ea(%rip), %xmm1 # 0x150120
movq -0x20(%rbp), %xmm0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x763e9(%rip), %xmm1 # 0x150130
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd -0x8(%rbp), %xmm1
movsd 0x7631d(%rip), %xmm2 # 0x150080
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x78f86(%rip), %rsi # 0x152d05
movb $0x0, %al
callq 0x2a790
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
cmpb $0x0, -0x11(%rbp)
je 0xd9db5
movq -0x10(%rbp), %rdi
movsd -0x8(%rbp), %xmm0
leaq 0x78f62(%rip), %rsi # 0x152d0e
movb $0x1, %al
callq 0x2a790
jmp 0xd9dcc
movq -0x10(%rbp), %rdi
cvttsd2si -0x8(%rbp), %edx
leaq 0x78f52(%rip), %rsi # 0x152d17
movb $0x0, %al
callq 0x2a790
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| nice_time:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
movsd [rbp+var_8], xmm0
mov [rbp+var_10], rdi
mov [rbp+var_11], al
movsd xmm0, [rbp+var_8]
movsd xmm1, cs:qword_150058
ucomisd xmm0, xmm1
jb loc_D9C0A
movsd xmm0, [rbp+var_8]
movsd xmm1, cs:qword_150058
divsd xmm0, xmm1
movaps xmm1, xmm0
cvttsd2si rax, xmm1
mov rdx, rax
sar rdx, 3Fh
movsd xmm1, cs:qword_150020
subsd xmm0, xmm1
cvttsd2si rcx, xmm0
and rcx, rdx
or rax, rcx
mov [rbp+var_20], rax
movaps xmm1, cs:xmmword_150120
movq xmm0, [rbp+var_20]
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_150130
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, [rbp+var_8]
movsd xmm2, cs:qword_150060
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rbp+var_8], xmm0
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rsi, [rbp+var_20]
lea rcx, aDay; " day "
lea rax, aDays; " days "
cmp rsi, 1
cmova rcx, rax
lea rsi, aLdS; "%ld %s"
mov al, 0
call _sprintf
mov ecx, eax
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_D9C0A:
movsd xmm0, [rbp+var_8]
movsd xmm1, cs:qword_150068
ucomisd xmm0, xmm1
jb loc_D9CDD
movsd xmm0, [rbp+var_8]
movsd xmm1, cs:qword_150068
divsd xmm0, xmm1
movaps xmm1, xmm0
cvttsd2si rax, xmm1
mov rdx, rax
sar rdx, 3Fh
movsd xmm1, cs:qword_150020
subsd xmm0, xmm1
cvttsd2si rcx, xmm0
and rcx, rdx
or rax, rcx
mov [rbp+var_20], rax
movaps xmm1, cs:xmmword_150120
movq xmm0, [rbp+var_20]
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_150130
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, [rbp+var_8]
movsd xmm2, cs:qword_150070
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rbp+var_8], xmm0
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rsi, [rbp+var_20]
lea rcx, aHour; " hour "
lea rax, aHours; " hours "
cmp rsi, 1
cmova rcx, rax
lea rsi, aLdS; "%ld %s"
mov al, 0
call _sprintf
mov ecx, eax
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_D9CDD:
movsd xmm0, [rbp+var_8]
movsd xmm1, cs:qword_150078
ucomisd xmm0, xmm1
jb loc_D9D96
movsd xmm0, [rbp+var_8]
movsd xmm1, cs:qword_150078
divsd xmm0, xmm1
movaps xmm1, xmm0
cvttsd2si rax, xmm1
mov rdx, rax
sar rdx, 3Fh
movsd xmm1, cs:qword_150020
subsd xmm0, xmm1
cvttsd2si rcx, xmm0
and rcx, rdx
or rax, rcx
mov [rbp+var_20], rax
movaps xmm1, cs:xmmword_150120
movq xmm0, [rbp+var_20]
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_150130
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, [rbp+var_8]
movsd xmm2, cs:qword_150080
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd [rbp+var_8], xmm0
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rsi, aLdMin; "%ld min "
mov al, 0
call _sprintf
mov ecx, eax
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
loc_D9D96:
cmp [rbp+var_11], 0
jz short loc_D9DB5
mov rdi, [rbp+var_10]
movsd xmm0, [rbp+var_8]
lea rsi, a2fSec; "%.2f sec"
mov al, 1
call _sprintf
jmp short loc_D9DCC
loc_D9DB5:
mov rdi, [rbp+var_10]
cvttsd2si edx, [rbp+var_8]
lea rsi, aDSec; "%d sec"
mov al, 0
call _sprintf
loc_D9DCC:
add rsp, 20h
pop rbp
retn
| long long nice_time(long long a1, __int8 a2, double a3)
{
__m128d v3; // xmm0
const char *v4; // rcx
int v5; // eax
__m128d v6; // xmm0
const char *v7; // rcx
int v8; // eax
__m128d v9; // xmm0
int v10; // eax
__m128i v12; // [rsp+0h] [rbp-20h] BYREF
long long v13; // [rsp+10h] [rbp-10h]
double v14; // [rsp+18h] [rbp-8h]
v14 = a3;
v13 = a1;
v12.m128i_i8[15] = a2;
if ( a3 >= 86400.0 )
{
v12.m128i_i64[0] = (unsigned int)(int)(v14 / 86400.0);
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v12), (__m128i)xmmword_150120),
(__m128d)xmmword_150130);
v14 = (_mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0]) * -86400.0 + v14;
v4 = " day ";
if ( v12.m128i_i64[0] > 1uLL )
v4 = " days ";
v5 = sprintf(v13, "%ld %s", v12.m128i_i64[0], v4);
v13 += v5;
}
if ( v14 >= 3600.0 )
{
v12.m128i_i64[0] = (unsigned int)(int)(v14 / 3600.0);
v6 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v12), (__m128i)xmmword_150120),
(__m128d)xmmword_150130);
v14 = (_mm_unpackhi_pd(v6, v6).m128d_f64[0] + v6.m128d_f64[0]) * -3600.0 + v14;
v7 = " hour ";
if ( v12.m128i_i64[0] > 1uLL )
v7 = " hours ";
v8 = sprintf(v13, "%ld %s", v12.m128i_i64[0], v7);
v13 += v8;
}
if ( v14 >= 60.0 )
{
v12.m128i_i64[0] = (unsigned int)(int)(v14 / 60.0);
v9 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v12), (__m128i)xmmword_150120),
(__m128d)xmmword_150130);
v14 = (_mm_unpackhi_pd(v9, v9).m128d_f64[0] + v9.m128d_f64[0]) * -60.0 + v14;
v10 = sprintf(v13, "%ld min ", v12.m128i_i64[0]);
v13 += v10;
}
if ( v12.m128i_i8[15] )
return sprintf(v13, "%.2f sec", v14);
else
return sprintf(v13, "%d sec", (int)v14);
}
| nice_time:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOVSD qword ptr [RBP + -0x8],XMM0
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],AL
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [0x00250058]
UCOMISD XMM0,XMM1
JC 0x001d9c0a
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [0x00250058]
DIVSD XMM0,XMM1
MOVAPS XMM1,XMM0
CVTTSD2SI RAX,XMM1
MOV RDX,RAX
SAR RDX,0x3f
MOVSD XMM1,qword ptr [0x00250020]
SUBSD XMM0,XMM1
CVTTSD2SI RCX,XMM0
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOVAPS XMM1,xmmword ptr [0x00250120]
MOVQ XMM0,qword ptr [RBP + -0x20]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x00250130]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [RBP + -0x8]
MOVSD XMM2,qword ptr [0x00250060]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x20]
LEA RCX,[0x252cf0]
LEA RAX,[0x252ce9]
CMP RSI,0x1
CMOVA RCX,RAX
LEA RSI,[0x252ce2]
MOV AL,0x0
CALL 0x0012a790
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001d9c0a:
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [0x00250068]
UCOMISD XMM0,XMM1
JC 0x001d9cdd
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [0x00250068]
DIVSD XMM0,XMM1
MOVAPS XMM1,XMM0
CVTTSD2SI RAX,XMM1
MOV RDX,RAX
SAR RDX,0x3f
MOVSD XMM1,qword ptr [0x00250020]
SUBSD XMM0,XMM1
CVTTSD2SI RCX,XMM0
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOVAPS XMM1,xmmword ptr [0x00250120]
MOVQ XMM0,qword ptr [RBP + -0x20]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x00250130]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [RBP + -0x8]
MOVSD XMM2,qword ptr [0x00250070]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x20]
LEA RCX,[0x252cfe]
LEA RAX,[0x252cf6]
CMP RSI,0x1
CMOVA RCX,RAX
LEA RSI,[0x252ce2]
MOV AL,0x0
CALL 0x0012a790
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001d9cdd:
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [0x00250078]
UCOMISD XMM0,XMM1
JC 0x001d9d96
MOVSD XMM0,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [0x00250078]
DIVSD XMM0,XMM1
MOVAPS XMM1,XMM0
CVTTSD2SI RAX,XMM1
MOV RDX,RAX
SAR RDX,0x3f
MOVSD XMM1,qword ptr [0x00250020]
SUBSD XMM0,XMM1
CVTTSD2SI RCX,XMM0
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOVAPS XMM1,xmmword ptr [0x00250120]
MOVQ XMM0,qword ptr [RBP + -0x20]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x00250130]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [RBP + -0x8]
MOVSD XMM2,qword ptr [0x00250080]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x8],XMM0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[0x252d05]
MOV AL,0x0
CALL 0x0012a790
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001d9d96:
CMP byte ptr [RBP + -0x11],0x0
JZ 0x001d9db5
MOV RDI,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RBP + -0x8]
LEA RSI,[0x252d0e]
MOV AL,0x1
CALL 0x0012a790
JMP 0x001d9dcc
LAB_001d9db5:
MOV RDI,qword ptr [RBP + -0x10]
CVTTSD2SI EDX,qword ptr [RBP + -0x8]
LEA RSI,[0x252d17]
MOV AL,0x0
CALL 0x0012a790
LAB_001d9dcc:
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void nice_time(double param_1,char *param_2,char param_3,int8 param_4)
{
int iVar1;
ulong uVar2;
char *pcVar3;
int4 extraout_var;
int4 extraout_var_00;
int4 extraout_var_01;
int4 uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
char *local_18;
double local_10;
uVar4 = (int4)((ulong)param_4 >> 0x20);
local_18 = param_2;
local_10 = param_1;
if (DAT_00250058 <= param_1) {
uVar2 = (ulong)(param_1 / DAT_00250058);
uVar2 = uVar2 | (long)(param_1 / DAT_00250058 - DAT_00250020) & (long)uVar2 >> 0x3f;
auVar5._8_4_ = (int)(uVar2 >> 0x20);
auVar5._0_8_ = uVar2;
auVar5._12_4_ = _UNK_00250124;
local_10 = ((auVar5._8_8_ - _UNK_00250138) +
((double)CONCAT44(_DAT_00250120,(int)uVar2) - _DAT_00250130)) * DAT_00250060 +
param_1;
pcVar3 = " day ";
if (1 < uVar2) {
pcVar3 = " days ";
}
iVar1 = sprintf(param_2,"%ld %s",uVar2,pcVar3);
local_18 = param_2 + iVar1;
uVar4 = extraout_var;
}
if (DAT_00250068 <= local_10) {
uVar2 = (ulong)(local_10 / DAT_00250068);
uVar2 = uVar2 | (long)(local_10 / DAT_00250068 - DAT_00250020) & (long)uVar2 >> 0x3f;
auVar6._8_4_ = (int)(uVar2 >> 0x20);
auVar6._0_8_ = uVar2;
auVar6._12_4_ = _UNK_00250124;
local_10 = ((auVar6._8_8_ - _UNK_00250138) +
((double)CONCAT44(_DAT_00250120,(int)uVar2) - _DAT_00250130)) * DAT_00250070 +
local_10;
pcVar3 = " hour ";
if (1 < uVar2) {
pcVar3 = " hours ";
}
iVar1 = sprintf(local_18,"%ld %s",uVar2,pcVar3);
local_18 = local_18 + iVar1;
uVar4 = extraout_var_00;
}
if (DAT_00250078 <= local_10) {
uVar2 = (ulong)(local_10 / DAT_00250078);
uVar2 = uVar2 | (long)(local_10 / DAT_00250078 - DAT_00250020) & (long)uVar2 >> 0x3f;
auVar7._8_4_ = (int)(uVar2 >> 0x20);
auVar7._0_8_ = uVar2;
auVar7._12_4_ = _UNK_00250124;
local_10 = ((auVar7._8_8_ - _UNK_00250138) +
((double)CONCAT44(_DAT_00250120,(int)uVar2) - _DAT_00250130)) * DAT_00250080 +
local_10;
iVar1 = sprintf(local_18,"%ld min ",uVar2);
local_18 = local_18 + iVar1;
uVar4 = extraout_var_01;
}
if (param_3 == '\0') {
sprintf(local_18,"%d sec",CONCAT44(uVar4,(int)local_10));
}
else {
sprintf(local_18,"%.2f sec",local_10);
}
return;
}
| |
22,750 | js_array_join | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_join(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int toLocaleString)
{
JSValue obj, sep = JS_UNDEFINED, el;
StringBuffer b_s, *b = &b_s;
JSString *p = NULL;
int64_t i, n;
int c;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &n, obj))
goto exception;
c = ','; /* default separator */
if (!toLocaleString && argc > 0 && !JS_IsUndefined(argv[0])) {
sep = JS_ToString(ctx, argv[0]);
if (JS_IsException(sep))
goto exception;
p = JS_VALUE_GET_STRING(sep);
if (p->len == 1 && !p->is_wide_char)
c = p->u.str8[0];
else
c = -1;
}
string_buffer_init(ctx, b, 0);
for(i = 0; i < n; i++) {
if (i > 0) {
if (c >= 0) {
string_buffer_putc8(b, c);
} else {
string_buffer_concat(b, p, 0, p->len);
}
}
el = JS_GetPropertyUint32(ctx, obj, i);
if (JS_IsException(el))
goto fail;
if (!JS_IsNull(el) && !JS_IsUndefined(el)) {
if (toLocaleString) {
el = JS_ToLocaleStringFree(ctx, el);
}
if (string_buffer_concat_value_free(b, el))
goto fail;
}
}
JS_FreeValue(ctx, sep);
JS_FreeValue(ctx, obj);
return string_buffer_end(b);
fail:
string_buffer_free(b);
JS_FreeValue(ctx, sep);
exception:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O1 | c | js_array_join:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r13d
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
callq 0x261c9
movq %rax, %r15
movq %rdx, %r14
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x21ec8
testl %eax, %eax
je 0x75470
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
movl $0x6, %edx
xorl %eax, %eax
jmp 0x75594
movl %r13d, 0x1c(%rsp)
testl %r13d, %r13d
setne %al
testl %ebp, %ebp
setle %cl
movl $0x2c, %r13d
orb %al, %cl
jne 0x75498
movq 0x8(%r12), %rdx
cmpl $0x3, %edx
jne 0x755a3
movl $0x3, %eax
movq %rax, (%rsp)
movq $0x0, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ff5f
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x75616
movq 0x40(%rsp), %r12
testq %r12, %r12
jle 0x75569
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x75515
testl %r13d, %r13d
js 0x754fa
leaq 0x20(%rsp), %rdi
movl %r13d, %esi
callq 0x4ac4d
jmp 0x75515
movq 0x10(%rsp), %rsi
movl 0x4(%rsi), %ecx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
andl %eax, %ecx
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x414a5
movl %ebp, %ecx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x235a0
leal -0x2(%rdx), %ecx
cmpl $0x2, %ecx
jb 0x7555d
cmpl $0x6, %edx
je 0x755e7
cmpl $0x0, 0x1c(%rsp)
je 0x75548
movq %rbx, %rdi
movq %rax, %rsi
callq 0x775be
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x4aca2
testl %eax, %eax
jne 0x755e7
incq %rbp
cmpq %rbp, %r12
jne 0x754e1
movq 0x8(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq (%rsp), %rdx
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ccb2
leaq 0x20(%rsp), %rdi
callq 0x32830
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x26ec9
movq %rax, 0x8(%rsp)
cmpl $0x6, %edx
je 0x75455
movq 0x8(%rsp), %rax
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
cmpl $0x1, 0x4(%rax)
movq %rdx, (%rsp)
movq %rax, 0x10(%rsp)
jne 0x754aa
movzbl 0x18(%rax), %r13d
jmp 0x754aa
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1bf85
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq (%rsp), %rdx
callq 0x1ccb2
jmp 0x75455
movl $0x0, 0x34(%rsp)
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
jmp 0x754d1
| js_array_join:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13d, r9d
mov r12, r8
mov ebp, ecx
mov rbx, rdi
mov [rsp+78h+var_70], 0
call JS_ToObject
mov r15, rax
mov r14, rdx
lea rsi, [rsp+78h+var_38]
mov rdi, rbx
mov rdx, rax
mov rcx, r14
call js_get_length64
test eax, eax
jz short loc_75470
loc_75455:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov edx, 6
xor eax, eax
jmp loc_75594
loc_75470:
mov [rsp+78h+var_5C], r13d
test r13d, r13d
setnz al
test ebp, ebp
setle cl
mov r13d, 2Ch ; ','
or cl, al
jnz short loc_75498
mov rdx, [r12+8]
cmp edx, 3
jnz loc_755A3
loc_75498:
mov eax, 3
mov [rsp+78h+var_78], rax
mov [rsp+78h+var_68], 0
loc_754AA:
mov [rsp+78h+var_58], rbx
xorps xmm0, xmm0
movups [rsp+78h+var_48], xmm0
mov rdi, rbx
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_50], rax
test rax, rax
jz loc_75616
loc_754D1:
mov r12, [rsp+78h+var_38]
test r12, r12
jle loc_75569
xor ebp, ebp
loc_754E1:
test rbp, rbp
jz short loc_75515
test r13d, r13d
js short loc_754FA
lea rdi, [rsp+78h+var_58]
mov esi, r13d
call string_buffer_putc8
jmp short loc_75515
loc_754FA:
mov rsi, [rsp+78h+var_68]
mov ecx, [rsi+4]
mov eax, 7FFFFFFFh
and ecx, eax
lea rdi, [rsp+78h+var_58]
xor edx, edx
call string_buffer_concat
loc_75515:
mov ecx, ebp
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_GetPropertyInt64
lea ecx, [rdx-2]
cmp ecx, 2
jb short loc_7555D
cmp edx, 6
jz loc_755E7
cmp [rsp+78h+var_5C], 0
jz short loc_75548
mov rdi, rbx
mov rsi, rax
call JS_ToLocaleStringFree
loc_75548:
lea rdi, [rsp+78h+var_58]
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jnz loc_755E7
loc_7555D:
inc rbp
cmp r12, rbp
jnz loc_754E1
loc_75569:
mov rsi, [rsp+78h+var_70]
mov rdi, [rbx+18h]
mov rdx, [rsp+78h+var_78]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
lea rdi, [rsp+78h+var_58]
call string_buffer_end
loc_75594:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_755A3:
mov rsi, [r12]
mov rdi, rbx
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+78h+var_70], rax
cmp edx, 6
jz loc_75455
mov rax, [rsp+78h+var_70]
mov r13d, 0FFFFFFFFh
cmp dword ptr [rax+4], 1
mov [rsp+78h+var_78], rdx
mov [rsp+78h+var_68], rax
jnz loc_754AA
movzx r13d, byte ptr [rax+18h]
jmp loc_754AA
loc_755E7:
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call js_free
mov [rsp+78h+var_50], 0
mov rsi, [rsp+78h+var_70]
mov rdi, [rbx+18h]
mov rdx, [rsp+78h+var_78]
call JS_FreeValueRT
jmp loc_75455
loc_75616:
mov dword ptr [rsp+78h+var_48+4], 0
mov dword ptr [rsp+78h+var_48+0Ch], 0FFFFFFFFh
jmp loc_754D1
| _DWORD * js_array_join(
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; // ebp
_DWORD *v17; // r15
long long v18; // rdx
long long v19; // r14
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
bool v25; // al
signed int v26; // r13d
long long v27; // rdx
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // r12
long long v35; // rbp
_DWORD *PropertyInt64; // rax
long long v37; // rdx
long long v38; // [rsp+0h] [rbp-78h]
unsigned long long v39; // [rsp+8h] [rbp-70h]
long long v40; // [rsp+10h] [rbp-68h]
int v41; // [rsp+1Ch] [rbp-5Ch]
long long v42; // [rsp+20h] [rbp-58h] BYREF
long long v43; // [rsp+28h] [rbp-50h]
__int128 v44; // [rsp+30h] [rbp-48h]
long long v45[7]; // [rsp+40h] [rbp-38h] BYREF
v14 = a6;
v16 = a4;
v39 = 0LL;
v17 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v19 = v18;
if ( (unsigned int)js_get_length64(a1, v45, (int)v17, v18) )
goto LABEL_2;
v41 = v14;
v25 = v14 != 0;
v26 = 44;
if ( v25 || v16 <= 0 || (v27 = a5[1], (_DWORD)v27 == 3) )
{
v38 = 3LL;
v40 = 0LL;
}
else
{
v39 = JS_ToStringInternal(a1, *a5, v27, 0, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14);
if ( (_DWORD)v37 == 6 )
{
LABEL_2:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v19);
return 0LL;
}
v26 = -1;
v38 = v37;
v40 = v39;
if ( *(_DWORD *)(v39 + 4) == 1 )
v26 = *(unsigned __int8 *)(v39 + 24);
}
v42 = a1;
v44 = 0LL;
v43 = js_alloc_string(a1, 0LL, 0);
if ( !v43 )
{
DWORD1(v44) = 0;
HIDWORD(v44) = -1;
}
v34 = v45[0];
if ( v45[0] > 0 )
{
v35 = 0LL;
while ( 1 )
{
if ( v35 )
{
if ( v26 < 0 )
string_buffer_concat((long long)&v42, v40, 0, *(_DWORD *)(v40 + 4) & 0x7FFFFFFF);
else
string_buffer_putc8((long long)&v42, v26, (__m128)0LL, a8, a9, a10, v32, v33, a13, a14, v28, v29, v30, v31);
}
PropertyInt64 = (_DWORD *)JS_GetPropertyInt64(a1, (long long)v17, v19, (unsigned int)v35);
v29 = (unsigned int)(v28 - 2);
if ( (unsigned int)v29 >= 2 )
{
if ( (_DWORD)v28 == 6 )
break;
if ( v41 )
PropertyInt64 = (_DWORD *)JS_ToLocaleStringFree(a1, PropertyInt64);
if ( (unsigned int)string_buffer_concat_value_free(
&v42,
PropertyInt64,
v28,
v29,
v30,
v31,
(__m128)0LL,
a8,
a9,
a10,
v32,
v33,
a13,
a14) )
break;
}
if ( v34 == ++v35 )
goto LABEL_20;
}
js_free(v42, v43);
v43 = 0LL;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v39, v38);
goto LABEL_2;
}
LABEL_20:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v39, v38);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v19);
return string_buffer_end((long long)&v42);
}
| js_array_join:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13D,R9D
MOV R12,R8
MOV EBP,ECX
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001261c9
MOV R15,RAX
MOV R14,RDX
LEA RSI,[RSP + 0x40]
MOV RDI,RBX
MOV RDX,RAX
MOV RCX,R14
CALL 0x00121ec8
TEST EAX,EAX
JZ 0x00175470
LAB_00175455:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
MOV EDX,0x6
XOR EAX,EAX
JMP 0x00175594
LAB_00175470:
MOV dword ptr [RSP + 0x1c],R13D
TEST R13D,R13D
SETNZ AL
TEST EBP,EBP
SETLE CL
MOV R13D,0x2c
OR CL,AL
JNZ 0x00175498
MOV RDX,qword ptr [R12 + 0x8]
CMP EDX,0x3
JNZ 0x001755a3
LAB_00175498:
MOV EAX,0x3
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x10],0x0
LAB_001754aa:
MOV qword ptr [RSP + 0x20],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x30],XMM0
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011ff5f
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x00175616
LAB_001754d1:
MOV R12,qword ptr [RSP + 0x40]
TEST R12,R12
JLE 0x00175569
XOR EBP,EBP
LAB_001754e1:
TEST RBP,RBP
JZ 0x00175515
TEST R13D,R13D
JS 0x001754fa
LEA RDI,[RSP + 0x20]
MOV ESI,R13D
CALL 0x0014ac4d
JMP 0x00175515
LAB_001754fa:
MOV RSI,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSI + 0x4]
MOV EAX,0x7fffffff
AND ECX,EAX
LEA RDI,[RSP + 0x20]
XOR EDX,EDX
CALL 0x001414a5
LAB_00175515:
MOV ECX,EBP
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x001235a0
LEA ECX,[RDX + -0x2]
CMP ECX,0x2
JC 0x0017555d
CMP EDX,0x6
JZ 0x001755e7
CMP dword ptr [RSP + 0x1c],0x0
JZ 0x00175548
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001775be
LAB_00175548:
LEA RDI,[RSP + 0x20]
MOV RSI,RAX
CALL 0x0014aca2
TEST EAX,EAX
JNZ 0x001755e7
LAB_0017555d:
INC RBP
CMP R12,RBP
JNZ 0x001754e1
LAB_00175569:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSP]
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ccb2
LEA RDI,[RSP + 0x20]
CALL 0x00132830
LAB_00175594:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001755a3:
MOV RSI,qword ptr [R12]
MOV RDI,RBX
XOR ECX,ECX
CALL 0x00126ec9
MOV qword ptr [RSP + 0x8],RAX
CMP EDX,0x6
JZ 0x00175455
MOV RAX,qword ptr [RSP + 0x8]
MOV R13D,0xffffffff
CMP dword ptr [RAX + 0x4],0x1
MOV qword ptr [RSP],RDX
MOV qword ptr [RSP + 0x10],RAX
JNZ 0x001754aa
MOVZX R13D,byte ptr [RAX + 0x18]
JMP 0x001754aa
LAB_001755e7:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0011bf85
MOV qword ptr [RSP + 0x28],0x0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSP]
CALL 0x0011ccb2
JMP 0x00175455
LAB_00175616:
MOV dword ptr [RSP + 0x34],0x0
MOV dword ptr [RSP + 0x3c],0xffffffff
JMP 0x001754d1
|
int8
js_array_join(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5,
int param_6)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
ulong uVar5;
uint uVar6;
int1 auVar7 [12];
int1 auVar8 [16];
int8 local_78;
long local_68;
long local_58;
long local_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
auVar8 = JS_ToObject();
uVar4 = auVar8._8_8_;
uVar3 = auVar8._0_8_;
iVar1 = js_get_length64(param_1,&local_38,uVar3,uVar4);
if (iVar1 == 0) {
uVar6 = 0x2c;
if ((param_4 < 1 || param_6 != 0) || ((int)param_5[1] == 3)) {
auVar8 = ZEXT816(3) << 0x40;
}
else {
auVar8 = JS_ToStringInternal(param_1,*param_5,param_5[1],0);
if (auVar8._8_4_ == 6) goto LAB_00175455;
uVar6 = 0xffffffff;
if (*(int *)(auVar8._0_8_ + 4) == 1) {
uVar6 = (uint)*(byte *)(auVar8._0_8_ + 0x18);
}
}
local_78 = auVar8._8_8_;
local_68 = auVar8._0_8_;
local_48 = 0;
uStack_40 = 0;
local_58 = param_1;
local_50 = js_alloc_string(param_1,0,0);
if (local_50 == 0) {
local_48 = local_48 & 0xffffffff;
uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40);
}
if (0 < (long)local_38) {
uVar5 = 0;
do {
if (uVar5 != 0) {
if ((int)uVar6 < 0) {
string_buffer_concat(&local_58,local_68,0,*(uint *)(local_68 + 4) & 0x7fffffff);
}
else {
string_buffer_putc8(&local_58,uVar6);
}
}
auVar7 = JS_GetPropertyInt64(param_1,uVar3,uVar4,uVar5 & 0xffffffff);
uVar2 = auVar7._0_8_;
if (1 < auVar7._8_4_ - 2U) {
if (auVar7._8_4_ != 6) {
if (param_6 != 0) {
uVar2 = JS_ToLocaleStringFree(param_1,uVar2);
}
iVar1 = string_buffer_concat_value_free(&local_58,uVar2);
if (iVar1 == 0) goto LAB_0017555d;
}
js_free(local_58,local_50);
local_50 = 0;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_68,local_78);
goto LAB_00175455;
}
LAB_0017555d:
uVar5 = uVar5 + 1;
} while (local_38 != uVar5);
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_68,local_78);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar4);
uVar3 = string_buffer_end(&local_58);
}
else {
LAB_00175455:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar4);
uVar3 = 0;
}
return uVar3;
}
| |
22,751 | js_array_join | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_join(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int toLocaleString)
{
JSValue obj, sep = JS_UNDEFINED, el;
StringBuffer b_s, *b = &b_s;
JSString *p = NULL;
int64_t i, n;
int c;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &n, obj))
goto exception;
c = ','; /* default separator */
if (!toLocaleString && argc > 0 && !JS_IsUndefined(argv[0])) {
sep = JS_ToString(ctx, argv[0]);
if (JS_IsException(sep))
goto exception;
p = JS_VALUE_GET_STRING(sep);
if (p->len == 1 && !p->is_wide_char)
c = p->u.str8[0];
else
c = -1;
}
string_buffer_init(ctx, b, 0);
for(i = 0; i < n; i++) {
if (i > 0) {
if (c >= 0) {
string_buffer_putc8(b, c);
} else {
string_buffer_concat(b, p, 0, p->len);
}
}
el = JS_GetPropertyUint32(ctx, obj, i);
if (JS_IsException(el))
goto fail;
if (!JS_IsNull(el) && !JS_IsUndefined(el)) {
if (toLocaleString) {
el = JS_ToLocaleStringFree(ctx, el);
}
if (string_buffer_concat_value_free(b, el))
goto fail;
}
}
JS_FreeValue(ctx, sep);
JS_FreeValue(ctx, obj);
return string_buffer_end(b);
fail:
string_buffer_free(b);
JS_FreeValue(ctx, sep);
exception:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O3 | c | js_array_join:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r13d
movq %r8, %rbp
movl %ecx, %r12d
movq %rdi, %r15
callq 0x268d8
movq %rax, %r14
movq %rdx, %rbx
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x226df
testl %eax, %eax
je 0x77c8e
movl $0x6, %r12d
cmpl $-0x9, %ebx
jb 0x77c87
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x77c87
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
xorl %eax, %eax
jmp 0x77ddb
testl %r13d, %r13d
setne %dl
testl %r12d, %r12d
setle %cl
movl $0x3, %esi
movl $0x2c, %r12d
xorl %eax, %eax
orb %dl, %cl
jne 0x77cba
movq 0x8(%rbp), %rdx
xorl %eax, %eax
cmpl $0x3, %edx
jne 0x77ded
movq %rax, 0x8(%rsp)
movq %rsi, 0x18(%rsp)
movl %r13d, 0x14(%rsp)
movq %r15, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20686
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x77e62
movq 0x40(%rsp), %r13
testq %r13, %r13
jle 0x77d88
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x77d34
testl %r12d, %r12d
js 0x77d19
leaq 0x20(%rsp), %rdi
movl %r12d, %esi
callq 0x4cb90
jmp 0x77d34
movq 0x8(%rsp), %rsi
movl 0x4(%rsi), %ecx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
andl %eax, %ecx
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x42f71
movl %ebp, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x23bcc
leal -0x2(%rdx), %ecx
cmpl $0x2, %ecx
jb 0x77d7c
cmpl $0x6, %edx
je 0x77e17
cmpl $0x0, 0x14(%rsp)
je 0x77d67
movq %r15, %rdi
movq %rax, %rsi
callq 0x79fab
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x4cbe5
testl %eax, %eax
jne 0x77e17
incq %rbp
cmpq %rbp, %r13
jne 0x77d00
movq 0x18(%r15), %rdi
movq 0x18(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x77db0
movq 0x8(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x77db0
callq 0x20d90
movq 0x18(%r15), %rdi
cmpl $-0x9, %ebx
jb 0x77dce
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x77dce
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
leaq 0x20(%rsp), %rdi
callq 0x33675
movq %rdx, %r12
movq %r12, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %rsi
movq %r15, %rdi
xorl %ecx, %ecx
callq 0x27518
movq %rdx, %rsi
cmpl $0x6, %esi
je 0x77c5f
cmpl $0x1, 0x4(%rax)
jne 0x77e57
movzbl 0x18(%rax), %r12d
jmp 0x77cba
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1c845
movq 0x18(%rsp), %rdx
cmpl $-0x9, %edx
movq 0x8(%rsp), %rsi
jb 0x77c5f
movq 0x18(%r15), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x77c5f
callq 0x20d90
jmp 0x77c5f
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
jmp 0x77cba
movl $0x0, 0x34(%rsp)
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
jmp 0x77cf0
| js_array_join:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13d, r9d
mov rbp, r8
mov r12d, ecx
mov r15, rdi
call JS_ToObject
mov r14, rax
mov rbx, rdx
lea rsi, [rsp+78h+var_38]
mov rdi, r15
mov rdx, rax
mov rcx, rbx
call js_get_length64
test eax, eax
jz short loc_77C8E
loc_77C5F:
mov r12d, 6
cmp ebx, 0FFFFFFF7h
jb short loc_77C87
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_77C87
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
loc_77C87:
xor eax, eax
jmp loc_77DDB
loc_77C8E:
test r13d, r13d
setnz dl
test r12d, r12d
setle cl
mov esi, 3
mov r12d, 2Ch ; ','
xor eax, eax
or cl, dl
jnz short loc_77CBA
mov rdx, [rbp+8]
xor eax, eax
cmp edx, 3
jnz loc_77DED
loc_77CBA:
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_60], rsi
mov [rsp+78h+var_64], r13d
mov [rsp+78h+var_58], r15
xorps xmm0, xmm0
movups [rsp+78h+var_48], xmm0
mov rdi, r15
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+78h+var_50], rax
test rax, rax
jz loc_77E62
loc_77CF0:
mov r13, [rsp+78h+var_38]
test r13, r13
jle loc_77D88
xor ebp, ebp
loc_77D00:
test rbp, rbp
jz short loc_77D34
test r12d, r12d
js short loc_77D19
lea rdi, [rsp+78h+var_58]
mov esi, r12d
call string_buffer_putc8
jmp short loc_77D34
loc_77D19:
mov rsi, [rsp+78h+var_70]
mov ecx, [rsi+4]
mov eax, 7FFFFFFFh
and ecx, eax
lea rdi, [rsp+78h+var_58]
xor edx, edx
call string_buffer_concat
loc_77D34:
mov ecx, ebp
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_GetPropertyInt64
lea ecx, [rdx-2]
cmp ecx, 2
jb short loc_77D7C
cmp edx, 6
jz loc_77E17
cmp [rsp+78h+var_64], 0
jz short loc_77D67
mov rdi, r15
mov rsi, rax
call JS_ToLocaleStringFree
loc_77D67:
lea rdi, [rsp+78h+var_58]
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jnz loc_77E17
loc_77D7C:
inc rbp
cmp r13, rbp
jnz loc_77D00
loc_77D88:
mov rdi, [r15+18h]
mov rdx, [rsp+78h+var_60]
cmp edx, 0FFFFFFF7h
jb short loc_77DB0
mov rsi, [rsp+78h+var_70]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_77DB0
call js_free_value_rt
mov rdi, [r15+18h]
loc_77DB0:
cmp ebx, 0FFFFFFF7h
jb short loc_77DCE
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_77DCE
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
loc_77DCE:
lea rdi, [rsp+78h+var_58]
call string_buffer_end
mov r12, rdx
loc_77DDB:
mov rdx, r12
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_77DED:
mov rsi, [rbp+0]
mov rdi, r15
xor ecx, ecx
call JS_ToStringInternal
mov rsi, rdx
cmp esi, 6
jz loc_77C5F
cmp dword ptr [rax+4], 1
jnz short loc_77E57
movzx r12d, byte ptr [rax+18h]
jmp loc_77CBA
loc_77E17:
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call js_free
mov rdx, [rsp+78h+var_60]
cmp edx, 0FFFFFFF7h
mov rsi, [rsp+78h+var_70]
jb loc_77C5F
mov rdi, [r15+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg loc_77C5F
call js_free_value_rt
jmp loc_77C5F
loc_77E57:
mov r12d, 0FFFFFFFFh
jmp loc_77CBA
loc_77E62:
mov dword ptr [rsp+78h+var_48+4], 0
mov dword ptr [rsp+78h+var_48+0Ch], 0FFFFFFFFh
jmp loc_77CF0
| long long js_array_join(
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; // r12d
_QWORD *v18; // r14
long long v19; // rdx
long long v20; // rbx
long long v21; // r8
long long v22; // r9
__m128 v23; // xmm4
__m128 v24; // xmm5
long long v25; // rdi
int v26; // eax
long long v27; // rcx
bool v29; // cl
long long v30; // rsi
signed int v31; // r12d
unsigned long long v32; // rax
long long v33; // rdx
long long v34; // rdx
long long v35; // rcx
long long v36; // r8
long long v37; // r9
__m128 v38; // xmm4
__m128 v39; // xmm5
long long v40; // r13
long long v41; // rbp
int *PropertyInt64; // rax
long long v43; // rdi
int v44; // eax
long long v45; // rcx
int v46; // eax
long long v47; // rcx
long long v48; // rdx
long long v49; // rdi
int v50; // eax
long long v51; // rcx
long long v52; // [rsp+8h] [rbp-70h]
int v53; // [rsp+14h] [rbp-64h]
long long v54; // [rsp+20h] [rbp-58h] BYREF
long long v55; // [rsp+28h] [rbp-50h]
__int128 v56; // [rsp+30h] [rbp-48h]
long long v57[7]; // [rsp+40h] [rbp-38h] BYREF
v14 = a6;
v16 = a4;
v18 = (_QWORD *)JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v20 = v19;
if ( (unsigned int)js_get_length64(a1, v57, (int)v18, v19) )
goto LABEL_2;
v29 = v16 <= 0;
v30 = 3LL;
v31 = 44;
v32 = 0LL;
if ( v14 == 0 && !v29 )
{
v33 = *(_QWORD *)(a5 + 8);
v32 = 0LL;
if ( (_DWORD)v33 != 3 )
{
v32 = JS_ToStringInternal(a1, *(_DWORD **)a5, v33, 0LL, v21, v22, a7, a8, a9, a10, v23, v24, a13, a14);
v30 = v48;
if ( (_DWORD)v48 == 6 )
{
LABEL_2:
if ( (unsigned int)v20 >= 0xFFFFFFF7 )
{
v25 = *(_QWORD *)(a1 + 24);
v26 = *(_DWORD *)v18;
v27 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v27;
if ( v26 <= 1 )
js_free_value_rt(v25, v18, v20, v27, v21, v22);
}
return 0LL;
}
if ( *(_DWORD *)(v32 + 4) == 1 )
v31 = *(unsigned __int8 *)(v32 + 24);
else
v31 = -1;
}
}
v52 = v32;
v53 = v14;
v54 = a1;
v56 = 0LL;
v55 = js_alloc_string(a1, 0LL, 0);
if ( !v55 )
{
DWORD1(v56) = 0;
HIDWORD(v56) = -1;
}
v40 = v57[0];
if ( v57[0] > 0 )
{
v41 = 0LL;
while ( 1 )
{
if ( v41 )
{
if ( v31 < 0 )
string_buffer_concat((long long)&v54, v52, 0, *(_DWORD *)(v52 + 4) & 0x7FFFFFFF);
else
string_buffer_putc8((long long)&v54, v31, (__m128)0LL, a8, a9, a10, v38, v39, a13, a14, v34, v35, v36, v37);
}
PropertyInt64 = (int *)JS_GetPropertyInt64(a1, (long long)v18, v20, (unsigned int)v41);
v35 = (unsigned int)(v34 - 2);
if ( (unsigned int)v35 >= 2 )
{
if ( (_DWORD)v34 == 6 )
break;
if ( v53 )
PropertyInt64 = (int *)JS_ToLocaleStringFree(a1, PropertyInt64);
if ( (unsigned int)string_buffer_concat_value_free(
(long long)&v54,
PropertyInt64,
v34,
v35,
v36,
v37,
(__m128)0LL,
a8,
a9,
a10,
v38,
v39,
a13,
a14) )
break;
}
if ( v40 == ++v41 )
goto LABEL_22;
}
js_free(v54, v55);
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
{
v49 = *(_QWORD *)(a1 + 24);
v50 = *(_DWORD *)v52;
v51 = (unsigned int)(*(_DWORD *)v52 - 1);
*(_DWORD *)v52 = v51;
if ( v50 <= 1 )
js_free_value_rt(v49, (_QWORD *)v52, v30, v51, v21, v22);
}
goto LABEL_2;
}
LABEL_22:
v43 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
{
v44 = *(_DWORD *)v52;
v45 = (unsigned int)(*(_DWORD *)v52 - 1);
*(_DWORD *)v52 = v45;
if ( v44 <= 1 )
{
js_free_value_rt(v43, (_QWORD *)v52, v30, v45, v36, v37);
v43 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v20 >= 0xFFFFFFF7 )
{
v46 = *(_DWORD *)v18;
v47 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v47;
if ( v46 <= 1 )
js_free_value_rt(v43, v18, v20, v47, v36, v37);
}
return string_buffer_end(&v54);
}
| js_array_join:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13D,R9D
MOV RBP,R8
MOV R12D,ECX
MOV R15,RDI
CALL 0x001268d8
MOV R14,RAX
MOV RBX,RDX
LEA RSI,[RSP + 0x40]
MOV RDI,R15
MOV RDX,RAX
MOV RCX,RBX
CALL 0x001226df
TEST EAX,EAX
JZ 0x00177c8e
LAB_00177c5f:
MOV R12D,0x6
CMP EBX,-0x9
JC 0x00177c87
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x00177c87
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
LAB_00177c87:
XOR EAX,EAX
JMP 0x00177ddb
LAB_00177c8e:
TEST R13D,R13D
SETNZ DL
TEST R12D,R12D
SETLE CL
MOV ESI,0x3
MOV R12D,0x2c
XOR EAX,EAX
OR CL,DL
JNZ 0x00177cba
MOV RDX,qword ptr [RBP + 0x8]
XOR EAX,EAX
CMP EDX,0x3
JNZ 0x00177ded
LAB_00177cba:
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x18],RSI
MOV dword ptr [RSP + 0x14],R13D
MOV qword ptr [RSP + 0x20],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x30],XMM0
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00120686
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x00177e62
LAB_00177cf0:
MOV R13,qword ptr [RSP + 0x40]
TEST R13,R13
JLE 0x00177d88
XOR EBP,EBP
LAB_00177d00:
TEST RBP,RBP
JZ 0x00177d34
TEST R12D,R12D
JS 0x00177d19
LEA RDI,[RSP + 0x20]
MOV ESI,R12D
CALL 0x0014cb90
JMP 0x00177d34
LAB_00177d19:
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSI + 0x4]
MOV EAX,0x7fffffff
AND ECX,EAX
LEA RDI,[RSP + 0x20]
XOR EDX,EDX
CALL 0x00142f71
LAB_00177d34:
MOV ECX,EBP
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00123bcc
LEA ECX,[RDX + -0x2]
CMP ECX,0x2
JC 0x00177d7c
CMP EDX,0x6
JZ 0x00177e17
CMP dword ptr [RSP + 0x14],0x0
JZ 0x00177d67
MOV RDI,R15
MOV RSI,RAX
CALL 0x00179fab
LAB_00177d67:
LEA RDI,[RSP + 0x20]
MOV RSI,RAX
CALL 0x0014cbe5
TEST EAX,EAX
JNZ 0x00177e17
LAB_00177d7c:
INC RBP
CMP R13,RBP
JNZ 0x00177d00
LAB_00177d88:
MOV RDI,qword ptr [R15 + 0x18]
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,-0x9
JC 0x00177db0
MOV RSI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00177db0
CALL 0x00120d90
MOV RDI,qword ptr [R15 + 0x18]
LAB_00177db0:
CMP EBX,-0x9
JC 0x00177dce
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x00177dce
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
LAB_00177dce:
LEA RDI,[RSP + 0x20]
CALL 0x00133675
MOV R12,RDX
LAB_00177ddb:
MOV RDX,R12
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00177ded:
MOV RSI,qword ptr [RBP]
MOV RDI,R15
XOR ECX,ECX
CALL 0x00127518
MOV RSI,RDX
CMP ESI,0x6
JZ 0x00177c5f
CMP dword ptr [RAX + 0x4],0x1
JNZ 0x00177e57
MOVZX R12D,byte ptr [RAX + 0x18]
JMP 0x00177cba
LAB_00177e17:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0011c845
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,-0x9
MOV RSI,qword ptr [RSP + 0x8]
JC 0x00177c5f
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00177c5f
CALL 0x00120d90
JMP 0x00177c5f
LAB_00177e57:
MOV R12D,0xffffffff
JMP 0x00177cba
LAB_00177e62:
MOV dword ptr [RSP + 0x34],0x0
MOV dword ptr [RSP + 0x3c],0xffffffff
JMP 0x00177cf0
|
int1 [16]
js_array_join(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5,
int param_6)
{
int iVar1;
int *piVar2;
int *piVar3;
int8 uVar4;
int8 uVar5;
ulong uVar6;
uint uVar7;
int1 auVar8 [12];
int1 auVar9 [12];
int1 auVar10 [16];
long local_58;
long local_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
auVar10 = JS_ToObject();
uVar5 = auVar10._8_8_;
piVar2 = auVar10._0_8_;
iVar1 = js_get_length64(param_1,&local_38,piVar2,uVar5);
if (iVar1 == 0) {
uVar7 = 0x2c;
auVar9 = ZEXT412(3) << 0x40;
if (0 < param_4 && param_6 == 0) {
auVar9 = ZEXT412(3) << 0x40;
if ((int)param_5[1] != 3) {
auVar9 = JS_ToStringInternal(param_1,*param_5,param_5[1],0);
if (auVar9._8_4_ == 6) goto LAB_00177c5f;
if (*(int *)(auVar9._0_8_ + 4) == 1) {
uVar7 = (uint)*(byte *)(auVar9._0_8_ + 0x18);
}
else {
uVar7 = 0xffffffff;
}
}
}
piVar3 = auVar9._0_8_;
local_48 = 0;
uStack_40 = 0;
local_58 = param_1;
local_50 = js_alloc_string(param_1,0,0);
if (local_50 == 0) {
local_48 = local_48 & 0xffffffff;
uStack_40 = CONCAT44(0xffffffff,(int4)uStack_40);
}
if (0 < (long)local_38) {
uVar6 = 0;
do {
if (uVar6 != 0) {
if ((int)uVar7 < 0) {
string_buffer_concat(&local_58,piVar3,0,piVar3[1] & 0x7fffffff);
}
else {
string_buffer_putc8(&local_58,uVar7);
}
}
auVar8 = JS_GetPropertyInt64(param_1,piVar2,uVar5,uVar6 & 0xffffffff);
uVar4 = auVar8._0_8_;
if (1 < auVar8._8_4_ - 2U) {
if (auVar8._8_4_ != 6) {
if (param_6 != 0) {
uVar4 = JS_ToLocaleStringFree(param_1,uVar4);
}
iVar1 = string_buffer_concat_value_free(&local_58,uVar4);
if (iVar1 == 0) goto LAB_00177d7c;
}
js_free(local_58,local_50);
if (0xfffffff6 < auVar9._8_4_) {
uVar4 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar4);
}
}
goto LAB_00177c5f;
}
LAB_00177d7c:
uVar6 = uVar6 + 1;
} while (local_38 != uVar6);
}
uVar4 = *(int8 *)(param_1 + 0x18);
if (0xfffffff6 < auVar9._8_4_) {
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar4);
uVar4 = *(int8 *)(param_1 + 0x18);
}
}
if (0xfffffff6 < auVar10._8_4_) {
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar4,piVar2,uVar5);
}
}
auVar10 = string_buffer_end(&local_58);
}
else {
LAB_00177c5f:
if (0xfffffff6 < auVar10._8_4_) {
uVar4 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar4,piVar2,uVar5);
}
}
auVar10 = ZEXT816(6) << 0x40;
}
return auVar10;
}
| |
22,752 | LefDefParser::defiNonDefault::addProperty(char const*, char const*, char) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | void defiNonDefault::addProperty(const char* name, const char* value,
const char type) {
int len = strlen(name) + 1;
if (numProps_ == propsAllocated_) {
int i;
int max;
int lim = numProps_;
char** nn;
char** nv;
double* nd;
char* nt;
if (propsAllocated_ == 0)
max = propsAllocated_ = 2;
else
max = propsAllocated_ *= 2;
nn = (char**)malloc(sizeof(char*) * max);
nv = (char**)malloc(sizeof(char*) * max);
nd = (double*)malloc(sizeof(double) * max);
nt = (char*)malloc(sizeof(char) * max);
for (i = 0; i < lim; i++) {
nn[i] = names_[i];
nv[i] = values_[i];
nd[i] = dvalues_[i];
nt[i] = types_[i];
}
free((char*)(names_));
free((char*)(values_));
free((char*)(dvalues_));
free((char*)(types_));
names_ = nn;
values_ = nv;
dvalues_ = nd;
types_ = nt;
}
names_[numProps_] = (char*)malloc(sizeof(char)*len);
strcpy(names_[numProps_],name);
len = strlen(value) + 1;
values_[numProps_] = (char*)malloc(sizeof(char) * len);
strcpy(values_[numProps_],value);
dvalues_[numProps_] = 0;
types_[numProps_] = type;
numProps_ += 1;
} | O3 | cpp | LefDefParser::defiNonDefault::addProperty(char const*, char const*, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x70d0
movl 0x90(%r14), %r13d
cmpl 0x94(%r14), %r13d
jne 0x2c44b
movq %rax, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movl %ebx, 0xc(%rsp)
leal (,%r13,2), %eax
testl %r13d, %r13d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x94(%r14)
movslq %ecx, %r12
leaq (,%r12,8), %r15
movq %r15, %rdi
callq 0x7270
movq %rax, %rbp
movq %r15, %rdi
callq 0x7270
movq %rax, %rbx
movq %r15, %rdi
callq 0x7270
movq %rax, %r15
movq %r12, %rdi
callq 0x7270
movq %rax, %r12
movq 0x98(%r14), %rdi
testl %r13d, %r13d
jle 0x2c3ea
movq 0xa0(%r14), %rax
movq 0xa8(%r14), %rcx
movq 0xb0(%r14), %rdx
xorl %esi, %esi
movq (%rdi,%rsi,8), %r8
movq %r8, (%rbp,%rsi,8)
movq (%rax,%rsi,8), %r8
movq %r8, (%rbx,%rsi,8)
movsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%r15,%rsi,8)
movb (%rdx,%rsi), %r8b
movb %r8b, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r13
jne 0x2c3be
callq 0x7220
movq 0xa0(%r14), %rdi
callq 0x7220
movq 0xa8(%r14), %rdi
callq 0x7220
movq 0xb0(%r14), %rdi
callq 0x7220
movq %rbp, 0x98(%r14)
movq %rbx, 0xa0(%r14)
movq %r15, 0xa8(%r14)
movq %r12, 0xb0(%r14)
movl 0x90(%r14), %r13d
movl 0xc(%rsp), %ebx
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %rax
jmp 0x2c452
movq 0x98(%r14), %rbp
incl %eax
movslq %eax, %rdi
callq 0x7270
movslq %r13d, %rcx
movq %rax, (%rbp,%rcx,8)
movq 0x98(%r14), %rax
movq (%rax,%rcx,8), %rdi
movq %r12, %rsi
callq 0x7190
movq %r15, %rdi
callq 0x70d0
incl %eax
movslq %eax, %rdi
callq 0x7270
movq 0xa0(%r14), %rcx
movslq 0x90(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0xa0(%r14), %rax
movq (%rax,%rdx,8), %rdi
movq %r15, %rsi
callq 0x7190
movq 0xa8(%r14), %rax
movslq 0x90(%r14), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0xb0(%r14), %rax
movb %bl, (%rax,%rcx)
incl 0x90(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser14defiNonDefault11addPropertyEPKcS2_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, ecx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rdi, rsi
call _strlen
mov r13d, [r14+90h]
cmp r13d, [r14+94h]
jnz loc_2C44B
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_40], r12
mov [rsp+58h+var_38], r15
mov [rsp+58h+var_4C], ebx
lea eax, ds:0[r13*2]
test r13d, r13d
mov ecx, 2
cmovnz ecx, eax
mov [r14+94h], ecx
movsxd r12, ecx
lea r15, ds:0[r12*8]
mov rdi, r15
call _malloc
mov rbp, rax
mov rdi, r15
call _malloc
mov rbx, rax
mov rdi, r15
call _malloc
mov r15, rax
mov rdi, r12
call _malloc
mov r12, rax
mov rdi, [r14+98h]
test r13d, r13d
jle short loc_2C3EA
mov rax, [r14+0A0h]
mov rcx, [r14+0A8h]
mov rdx, [r14+0B0h]
xor esi, esi
loc_2C3BE:
mov r8, [rdi+rsi*8]
mov [rbp+rsi*8+0], r8
mov r8, [rax+rsi*8]
mov [rbx+rsi*8], r8
movsd xmm0, qword ptr [rcx+rsi*8]
movsd qword ptr [r15+rsi*8], xmm0
mov r8b, [rdx+rsi]
mov [r12+rsi], r8b
inc rsi
cmp r13, rsi
jnz short loc_2C3BE
loc_2C3EA:
call _free
mov rdi, [r14+0A0h]
call _free
mov rdi, [r14+0A8h]
call _free
mov rdi, [r14+0B0h]
call _free
mov [r14+98h], rbp
mov [r14+0A0h], rbx
mov [r14+0A8h], r15
mov [r14+0B0h], r12
mov r13d, [r14+90h]
mov ebx, [rsp+58h+var_4C]
mov r15, [rsp+58h+var_38]
mov r12, [rsp+58h+var_40]
mov rax, [rsp+58h+var_48]
jmp short loc_2C452
loc_2C44B:
mov rbp, [r14+98h]
loc_2C452:
inc eax
movsxd rdi, eax
call _malloc
movsxd rcx, r13d
mov [rbp+rcx*8+0], rax
mov rax, [r14+98h]
mov rdi, [rax+rcx*8]
mov rsi, r12
call _strcpy
mov rdi, r15
call _strlen
inc eax
movsxd rdi, eax
call _malloc
mov rcx, [r14+0A0h]
movsxd rdx, dword ptr [r14+90h]
mov [rcx+rdx*8], rax
mov rax, [r14+0A0h]
mov rdi, [rax+rdx*8]
mov rsi, r15
call _strcpy
mov rax, [r14+0A8h]
movsxd rcx, dword ptr [r14+90h]
mov qword ptr [rax+rcx*8], 0
mov rax, [r14+0B0h]
mov [rax+rcx], bl
inc dword ptr [r14+90h]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defiNonDefault::addProperty(
LefDefParser::defiNonDefault *this,
const char *a2,
const char *a3,
char a4)
{
const char *v6; // r12
int v8; // eax
long long v9; // r13
int v10; // ecx
unsigned long long v11; // r12
unsigned long long v12; // r15
long long v13; // rbp
long long v14; // rbx
long long v15; // r15
long long v16; // r12
_QWORD *v17; // rdi
long long v18; // rax
long long v19; // rcx
long long v20; // rdx
long long i; // rsi
int v22; // eax
long long v23; // rax
long long v24; // rdx
long long v25; // rcx
long long result; // rax
char v27; // [rsp+Ch] [rbp-4Ch]
int v28; // [rsp+10h] [rbp-48h]
const char *v30; // [rsp+20h] [rbp-38h]
v6 = a2;
v8 = strlen(a2);
v9 = *((unsigned int *)this + 36);
if ( (_DWORD)v9 == *((_DWORD *)this + 37) )
{
v28 = v8;
v30 = a3;
v27 = a4;
v10 = 2;
if ( (_DWORD)v9 )
v10 = 2 * v9;
*((_DWORD *)this + 37) = v10;
v11 = v10;
v12 = 8LL * v10;
v13 = malloc(v12);
v14 = malloc(v12);
v15 = malloc(v12);
v16 = malloc(v11);
v17 = (_QWORD *)*((_QWORD *)this + 19);
if ( (int)v9 > 0 )
{
v18 = *((_QWORD *)this + 20);
v19 = *((_QWORD *)this + 21);
v20 = *((_QWORD *)this + 22);
for ( i = 0LL; i != v9; ++i )
{
*(_QWORD *)(v13 + 8 * i) = v17[i];
*(_QWORD *)(v14 + 8 * i) = *(_QWORD *)(v18 + 8 * i);
*(_QWORD *)(v15 + 8 * i) = *(_QWORD *)(v19 + 8 * i);
*(_BYTE *)(v16 + i) = *(_BYTE *)(v20 + i);
}
}
free(v17);
free(*((void **)this + 20));
free(*((void **)this + 21));
free(*((void **)this + 22));
*((_QWORD *)this + 19) = v13;
*((_QWORD *)this + 20) = v14;
*((_QWORD *)this + 21) = v15;
*((_QWORD *)this + 22) = v16;
LODWORD(v9) = *((_DWORD *)this + 36);
a4 = v27;
a3 = v30;
v6 = a2;
v8 = v28;
}
else
{
v13 = *((_QWORD *)this + 19);
}
*(_QWORD *)(v13 + 8LL * (int)v9) = malloc(v8 + 1);
strcpy(*(_QWORD *)(*((_QWORD *)this + 19) + 8LL * (int)v9), v6);
v22 = strlen(a3);
v23 = malloc(v22 + 1);
v24 = *((int *)this + 36);
*(_QWORD *)(*((_QWORD *)this + 20) + 8 * v24) = v23;
strcpy(*(_QWORD *)(*((_QWORD *)this + 20) + 8 * v24), a3);
v25 = *((int *)this + 36);
*(_QWORD *)(*((_QWORD *)this + 21) + 8 * v25) = 0LL;
result = *((_QWORD *)this + 22);
*(_BYTE *)(result + v25) = a4;
++*((_DWORD *)this + 36);
return result;
}
| addProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ECX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x001070d0
MOV R13D,dword ptr [R14 + 0x90]
CMP R13D,dword ptr [R14 + 0x94]
JNZ 0x0012c44b
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],R12
MOV qword ptr [RSP + 0x20],R15
MOV dword ptr [RSP + 0xc],EBX
LEA EAX,[R13*0x2]
TEST R13D,R13D
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [R14 + 0x94],ECX
MOVSXD R12,ECX
LEA R15,[R12*0x8]
MOV RDI,R15
CALL 0x00107270
MOV RBP,RAX
MOV RDI,R15
CALL 0x00107270
MOV RBX,RAX
MOV RDI,R15
CALL 0x00107270
MOV R15,RAX
MOV RDI,R12
CALL 0x00107270
MOV R12,RAX
MOV RDI,qword ptr [R14 + 0x98]
TEST R13D,R13D
JLE 0x0012c3ea
MOV RAX,qword ptr [R14 + 0xa0]
MOV RCX,qword ptr [R14 + 0xa8]
MOV RDX,qword ptr [R14 + 0xb0]
XOR ESI,ESI
LAB_0012c3be:
MOV R8,qword ptr [RDI + RSI*0x8]
MOV qword ptr [RBP + RSI*0x8],R8
MOV R8,qword ptr [RAX + RSI*0x8]
MOV qword ptr [RBX + RSI*0x8],R8
MOVSD XMM0,qword ptr [RCX + RSI*0x8]
MOVSD qword ptr [R15 + RSI*0x8],XMM0
MOV R8B,byte ptr [RDX + RSI*0x1]
MOV byte ptr [R12 + RSI*0x1],R8B
INC RSI
CMP R13,RSI
JNZ 0x0012c3be
LAB_0012c3ea:
CALL 0x00107220
MOV RDI,qword ptr [R14 + 0xa0]
CALL 0x00107220
MOV RDI,qword ptr [R14 + 0xa8]
CALL 0x00107220
MOV RDI,qword ptr [R14 + 0xb0]
CALL 0x00107220
MOV qword ptr [R14 + 0x98],RBP
MOV qword ptr [R14 + 0xa0],RBX
MOV qword ptr [R14 + 0xa8],R15
MOV qword ptr [R14 + 0xb0],R12
MOV R13D,dword ptr [R14 + 0x90]
MOV EBX,dword ptr [RSP + 0xc]
MOV R15,qword ptr [RSP + 0x20]
MOV R12,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
JMP 0x0012c452
LAB_0012c44b:
MOV RBP,qword ptr [R14 + 0x98]
LAB_0012c452:
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOVSXD RCX,R13D
MOV qword ptr [RBP + RCX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x98]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,R12
CALL 0x00107190
MOV RDI,R15
CALL 0x001070d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00107270
MOV RCX,qword ptr [R14 + 0xa0]
MOVSXD RDX,dword ptr [R14 + 0x90]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [R14 + 0xa0]
MOV RDI,qword ptr [RAX + RDX*0x8]
MOV RSI,R15
CALL 0x00107190
MOV RAX,qword ptr [R14 + 0xa8]
MOVSXD RCX,dword ptr [R14 + 0x90]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [R14 + 0xb0]
MOV byte ptr [RAX + RCX*0x1],BL
INC dword ptr [R14 + 0x90]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiNonDefault::addProperty(char const*, char const*, char) */
void __thiscall
LefDefParser::defiNonDefault::addProperty
(defiNonDefault *this,char *param_1,char *param_2,char param_3)
{
size_t __size;
long lVar1;
long lVar2;
long lVar3;
size_t sVar4;
void *pvVar5;
void *pvVar6;
void *pvVar7;
void *pvVar8;
void *pvVar9;
int iVar10;
ulong uVar11;
uint uVar12;
sVar4 = strlen(param_1);
uVar12 = *(uint *)(this + 0x90);
if (uVar12 == *(uint *)(this + 0x94)) {
iVar10 = 2;
if (uVar12 != 0) {
iVar10 = uVar12 * 2;
}
*(int *)(this + 0x94) = iVar10;
__size = (long)iVar10 * 8;
pvVar5 = malloc(__size);
pvVar6 = malloc(__size);
pvVar7 = malloc(__size);
pvVar8 = malloc((long)iVar10);
pvVar9 = *(void **)(this + 0x98);
if (0 < (int)uVar12) {
lVar1 = *(long *)(this + 0xa0);
lVar2 = *(long *)(this + 0xa8);
lVar3 = *(long *)(this + 0xb0);
uVar11 = 0;
do {
*(int8 *)((long)pvVar5 + uVar11 * 8) = *(int8 *)((long)pvVar9 + uVar11 * 8);
*(int8 *)((long)pvVar6 + uVar11 * 8) = *(int8 *)(lVar1 + uVar11 * 8);
*(int8 *)((long)pvVar7 + uVar11 * 8) = *(int8 *)(lVar2 + uVar11 * 8);
*(int1 *)((long)pvVar8 + uVar11) = *(int1 *)(lVar3 + uVar11);
uVar11 = uVar11 + 1;
} while (uVar12 != uVar11);
}
free(pvVar9);
free(*(void **)(this + 0xa0));
free(*(void **)(this + 0xa8));
free(*(void **)(this + 0xb0));
*(void **)(this + 0x98) = pvVar5;
*(void **)(this + 0xa0) = pvVar6;
*(void **)(this + 0xa8) = pvVar7;
*(void **)(this + 0xb0) = pvVar8;
uVar12 = *(uint *)(this + 0x90);
}
else {
pvVar5 = *(void **)(this + 0x98);
}
pvVar9 = malloc((long)((int)sVar4 + 1));
*(void **)((long)pvVar5 + (long)(int)uVar12 * 8) = pvVar9;
strcpy(*(char **)(*(long *)(this + 0x98) + (long)(int)uVar12 * 8),param_1);
sVar4 = strlen(param_2);
pvVar5 = malloc((long)((int)sVar4 + 1));
iVar10 = *(int *)(this + 0x90);
*(void **)(*(long *)(this + 0xa0) + (long)iVar10 * 8) = pvVar5;
strcpy(*(char **)(*(long *)(this + 0xa0) + (long)iVar10 * 8),param_2);
iVar10 = *(int *)(this + 0x90);
*(int8 *)(*(long *)(this + 0xa8) + (long)iVar10 * 8) = 0;
*(char *)(*(long *)(this + 0xb0) + (long)iVar10) = param_3;
*(int *)(this + 0x90) = *(int *)(this + 0x90) + 1;
return;
}
| |
22,753 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double) | monkey531[P]llama/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0xc50a5
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x39662(%rip), %rsi # 0xfe6f9
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0xc52e9
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_C50A5
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_C50A5:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2));
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x001c50a5
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x1fe6f9]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_001c50a5:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x001c52e9
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<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>>
::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,double param_1)
{
serializer<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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x001c50a3. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x001c50cf. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
22,754 | testing::internal::BriefUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc | void BriefUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
int /*iteration*/) {
ColoredPrintf(GTestColor::kGreen, "[==========] ");
printf("%s from %s ran.",
FormatTestCount(unit_test.test_to_run_count()).c_str(),
FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());
if (GTEST_FLAG_GET(print_time)) {
printf(" (%s ms total)",
internal::StreamableToString(unit_test.elapsed_time()).c_str());
}
printf("\n");
ColoredPrintf(GTestColor::kGreen, "[ PASSED ] ");
printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str());
const int skipped_test_count = unit_test.skipped_test_count();
if (skipped_test_count > 0) {
ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] ");
printf("%s.\n", FormatTestCount(skipped_test_count).c_str());
}
int num_disabled = unit_test.reportable_disabled_test_count();
if (num_disabled && !GTEST_FLAG_GET(also_run_disabled_tests)) {
if (unit_test.Passed()) {
printf("\n"); // Add a spacer if no FAILURE banner is displayed.
}
ColoredPrintf(GTestColor::kYellow, " YOU HAVE %d DISABLED %s\n\n",
num_disabled, num_disabled == 1 ? "TEST" : "TESTS");
}
// Ensure that Google Test output is printed before, e.g., heapchecker output.
fflush(stdout);
} | O3 | cpp | testing::internal::BriefUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
leaq 0x222a2(%rip), %rsi # 0x87470
xorl %ebp, %ebp
movl $0x2, %edi
xorl %eax, %eax
callq 0x63bb9
movq 0x40(%rbx), %rdi
callq 0x5e2f4
leaq 0x212ba(%rip), %rdx # 0x864a6
leaq 0x216ac(%rip), %rcx # 0x8689f
leaq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x643d2
movq 0x40(%rbx), %rcx
movq 0xb8(%rcx), %rax
movq 0xc0(%rcx), %rcx
cmpq %rcx, %rax
je 0x6522a
xorl %ebp, %ebp
movq (%rax), %rdx
movzbl 0x70(%rdx), %edx
addl %edx, %ebp
addq $0x8, %rax
cmpq %rcx, %rax
jne 0x65218
movq 0x8(%rsp), %r14
leaq 0x23214(%rip), %rdx # 0x8844a
leaq 0x23218(%rip), %rcx # 0x88455
leaq 0x28(%rsp), %rdi
movl %ebp, %esi
callq 0x643d2
leaq 0x38(%rsp), %r15
movq -0x10(%r15), %rdx
leaq 0x2234e(%rip), %rdi # 0x875a7
movq %r14, %rsi
xorl %eax, %eax
callq 0x11080
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x65279
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x11120
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x65294
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
leaq 0x4f88e(%rip), %rax # 0xb4b29
cmpb $0x1, (%rax)
jne 0x652e6
movq 0x40(%rbx), %rax
movq 0x2a0(%rax), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x762d8
movq (%r14), %rsi
leaq 0x222ed(%rip), %rdi # 0x875b7
xorl %eax, %eax
callq 0x11080
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x652e6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
movl $0xa, %edi
callq 0x11d80
leaq 0x222cf(%rip), %rsi # 0x875c6
movl $0x2, %edi
xorl %eax, %eax
callq 0x63bb9
movq 0x40(%rbx), %rdi
callq 0x5deee
leaq 0x21193(%rip), %rdx # 0x864a6
leaq 0x21585(%rip), %rcx # 0x8689f
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x643d2
movq (%r14), %rsi
leaq 0x22103(%rip), %rdi # 0x87436
xorl %eax, %eax
callq 0x11080
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x6534f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x40(%rbx), %rdi
callq 0x5df74
testl %eax, %eax
jle 0x653b4
movl %eax, %ebp
leaq 0x22182(%rip), %rsi # 0x874e7
movl $0x2, %edi
xorl %eax, %eax
callq 0x63bb9
leaq 0x2112e(%rip), %rdx # 0x864a6
leaq 0x21520(%rip), %rcx # 0x8689f
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x643d2
movq (%r14), %rsi
leaq 0x2209e(%rip), %rdi # 0x87436
xorl %eax, %eax
callq 0x11080
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x653b4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x5e0b4
testl %eax, %eax
je 0x65412
movl %eax, %ebx
leaq 0x4f6ee(%rip), %rax # 0xb4abb
cmpb $0x0, (%rax)
jne 0x65412
movq %r14, %rdi
callq 0x76348
testb %al, %al
je 0x653e8
movl $0xa, %edi
callq 0x11d80
cmpl $0x1, %ebx
leaq 0x2215f(%rip), %rax # 0x87551
leaq 0x2215d(%rip), %rcx # 0x87556
cmoveq %rax, %rcx
leaq 0x221d0(%rip), %rsi # 0x875d4
movl $0x3, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x63bb9
movq 0x4eb47(%rip), %rax # 0xb3f60
movq (%rax), %rdi
callq 0x11610
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6544a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x11120
movq %rbx, %rdi
callq 0x11760
| _ZN7testing8internal26BriefUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
lea rsi, asc_87470; "[==========] "
xor ebp, ebp
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl17test_to_run_countEv; testing::internal::UnitTestImpl::test_to_run_count(void)
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea rdi, [rsp+68h+var_60]; int
mov esi, eax; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
mov rcx, [rbx+40h]
mov rax, [rcx+0B8h]
mov rcx, [rcx+0C0h]
cmp rax, rcx
jz short loc_6522A
xor ebp, ebp
loc_65218:
mov rdx, [rax]
movzx edx, byte ptr [rdx+70h]
add ebp, edx
add rax, 8
cmp rax, rcx
jnz short loc_65218
loc_6522A:
mov r14, qword ptr [rsp+68h+var_60]
lea rdx, aTestSuite; "test suite"
lea rcx, aTestSuites; "test suites"
lea rdi, [rsp+68h+var_40]; int
mov esi, ebp; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
lea r15, [rsp+68h+var_30]
mov rdx, [r15-10h]
lea rdi, aSFromSRan; "%s from %s ran."
mov rsi, r14
xor eax, eax
call _printf
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_65279
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65279:
lea r15, [rsp+68h+var_50]
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_65294
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_65294:
lea rax, _ZN7testing22FLAGS_gtest_print_timeE; testing::FLAGS_gtest_print_time
cmp byte ptr [rax], 1
jnz short loc_652E6
mov rax, [rbx+40h]
mov rax, [rax+2A0h]
lea rsi, [rsp+68h+var_40]
mov [rsi], rax
lea r14, [rsp+68h+var_60]
mov rdi, r14
call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&)
mov rsi, [r14]
lea rdi, aSMsTotal; " (%s ms total)"
xor eax, eax
call _printf
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_652E6
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_652E6:
mov edi, 0Ah
call _putchar
lea rsi, aPassed; "[ PASSED ] "
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl21successful_test_countEv; testing::internal::UnitTestImpl::successful_test_count(void)
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea r14, [rsp+68h+var_60]
mov rdi, r14; int
mov esi, eax; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
mov rsi, [r14]
lea rdi, aNoteThisIsTest+1Fh; "%s.\n"
xor eax, eax
call _printf
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_6534F
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6534F:
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void)
test eax, eax
jle short loc_653B4
mov ebp, eax
lea rsi, aSkipped_0; "[ SKIPPED ] "
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea r14, [rsp+68h+var_60]
mov rdi, r14; int
mov esi, ebp; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
mov rsi, [r14]
lea rdi, aNoteThisIsTest+1Fh; "%s.\n"
xor eax, eax
call _printf
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_653B4
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_653B4:
mov r14, [rbx+40h]
mov rdi, r14; this
call _ZNK7testing8internal12UnitTestImpl30reportable_disabled_test_countEv; testing::internal::UnitTestImpl::reportable_disabled_test_count(void)
test eax, eax
jz short loc_65412
mov ebx, eax
lea rax, _ZN7testing35FLAGS_gtest_also_run_disabled_testsE; testing::FLAGS_gtest_also_run_disabled_tests
cmp byte ptr [rax], 0
jnz short loc_65412
mov rdi, r14; this
call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void)
test al, al
jz short loc_653E8
mov edi, 0Ah
call _putchar
loc_653E8:
cmp ebx, 1
lea rax, aTest_0; "TEST"
lea rcx, aTests; "TESTS"
cmovz rcx, rax
lea rsi, aYouHaveDDisabl; " YOU HAVE %d DISABLED %s\n\n"
mov edi, 3
mov edx, ebx
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
loc_65412:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6544A
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6544A:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::BriefUnitTestResultPrinter::OnTestIterationEnd(
testing::internal::BriefUnitTestResultPrinter *this,
testing::internal::UnitTestImpl **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; // ebp
int v15; // eax
int v16; // r8d
int v17; // r9d
int v18; // r8d
int v19; // r9d
testing::internal::UnitTestImpl *v20; // rcx
long long v21; // rax
long long v22; // rcx
const char *v23; // r14
int v24; // edx
int v25; // ecx
int v26; // r8d
int v27; // r9d
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
int v34; // eax
int v35; // r8d
int v36; // r9d
int v37; // eax
long long v38; // rdx
long long v39; // rcx
long long v40; // r8
long long v41; // r9
__m128 v42; // xmm4
__m128 v43; // xmm5
int v44; // ebp
int v45; // r8d
int v46; // r9d
testing::internal::UnitTestImpl *v47; // r14
unsigned int v48; // eax
unsigned int v49; // ebx
long long v50; // r8
long long v51; // r9
__m128 v52; // xmm4
__m128 v53; // xmm5
const char *v54; // rcx
char v56; // [rsp+0h] [rbp-68h]
long long v57; // [rsp+0h] [rbp-68h]
char v58; // [rsp+0h] [rbp-68h]
int v59[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v60[2]; // [rsp+18h] [rbp-50h] BYREF
int v61[4]; // [rsp+28h] [rbp-40h] BYREF
long long v62; // [rsp+38h] [rbp-30h] BYREF
v14 = 0;
testing::internal::ColoredPrintf(
2,
(long long)"[==========] ",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v56);
v15 = testing::internal::UnitTestImpl::test_to_run_count(a2[8]);
testing::FormatCountableNoun[abi:cxx11]((long long)v59, v15, (long long)"test", (long long)"tests", v16, v17);
v20 = a2[8];
v21 = *((_QWORD *)v20 + 23);
v22 = *((_QWORD *)v20 + 24);
if ( v21 != v22 )
{
v14 = 0;
do
{
v14 += *(unsigned __int8 *)(*(_QWORD *)v21 + 112LL);
v21 += 8LL;
}
while ( v21 != v22 );
}
v23 = *(const char **)v59;
testing::FormatCountableNoun[abi:cxx11]((long long)v61, v14, (long long)"test suite", (long long)"test suites", v18, v19);
printf("%s from %s ran.", v23, *(const char **)v61);
if ( *(long long **)v61 != &v62 )
operator delete(*(void **)v61, v62 + 1);
if ( *(_QWORD **)v59 != v60 )
operator delete(*(void **)v59, v60[0] + 1LL);
if ( testing::FLAGS_gtest_print_time == 1 )
{
*(_QWORD *)v61 = *((_QWORD *)a2[8] + 84);
testing::internal::StreamableToString<long>((unsigned int)v59, (unsigned int)v61, v24, v25, v26, v27, v57);
printf(" (%s ms total)", *(const char **)v59);
if ( *(_QWORD **)v59 != v60 )
operator delete(*(void **)v59, v60[0] + 1LL);
}
putchar(10LL);
testing::internal::ColoredPrintf(
2,
(long long)"[ PASSED ] ",
v28,
v29,
v30,
v31,
a7,
a8,
a9,
a10,
v32,
v33,
a13,
a14,
v57);
v34 = testing::internal::UnitTestImpl::successful_test_count(a2[8]);
testing::FormatCountableNoun[abi:cxx11]((long long)v59, v34, (long long)"test", (long long)"tests", v35, v36);
printf("%s.\n", *(const char **)v59);
if ( *(_QWORD **)v59 != v60 )
operator delete(*(void **)v59, v60[0] + 1LL);
v37 = testing::internal::UnitTestImpl::skipped_test_count(a2[8]);
if ( v37 > 0 )
{
v44 = v37;
testing::internal::ColoredPrintf(
2,
(long long)"[ SKIPPED ] ",
v38,
v39,
v40,
v41,
a7,
a8,
a9,
a10,
v42,
v43,
a13,
a14,
v58);
testing::FormatCountableNoun[abi:cxx11]((long long)v59, v44, (long long)"test", (long long)"tests", v45, v46);
printf("%s.\n", *(const char **)v59);
if ( *(_QWORD **)v59 != v60 )
operator delete(*(void **)v59, v60[0] + 1LL);
}
v47 = a2[8];
v48 = testing::internal::UnitTestImpl::reportable_disabled_test_count(v47);
if ( v48 )
{
v49 = v48;
if ( !testing::FLAGS_gtest_also_run_disabled_tests )
{
if ( (unsigned __int8)testing::internal::UnitTestImpl::Passed(v47) )
putchar(10LL);
v54 = "TESTS";
if ( v49 == 1 )
v54 = "TEST";
testing::internal::ColoredPrintf(
3,
(long long)" YOU HAVE %d DISABLED %s\n\n",
v49,
(long long)v54,
v50,
v51,
a7,
a8,
a9,
a10,
v52,
v53,
a13,
a14,
v58);
}
}
return fflush(stdout);
}
| OnTestIterationEnd:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
LEA RSI,[0x187470]
XOR EBP,EBP
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00163bb9
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0015e2f4
LEA RDX,[0x1864a6]
LEA RCX,[0x18689f]
LEA RDI,[RSP + 0x8]
MOV ESI,EAX
CALL 0x001643d2
MOV RCX,qword ptr [RBX + 0x40]
MOV RAX,qword ptr [RCX + 0xb8]
MOV RCX,qword ptr [RCX + 0xc0]
CMP RAX,RCX
JZ 0x0016522a
XOR EBP,EBP
LAB_00165218:
MOV RDX,qword ptr [RAX]
MOVZX EDX,byte ptr [RDX + 0x70]
ADD EBP,EDX
ADD RAX,0x8
CMP RAX,RCX
JNZ 0x00165218
LAB_0016522a:
MOV R14,qword ptr [RSP + 0x8]
LAB_0016522f:
LEA RDX,[0x18844a]
LEA RCX,[0x188455]
LEA RDI,[RSP + 0x28]
MOV ESI,EBP
CALL 0x001643d2
LAB_00165249:
LEA R15,[RSP + 0x38]
MOV RDX,qword ptr [R15 + -0x10]
LEA RDI,[0x1875a7]
MOV RSI,R14
XOR EAX,EAX
CALL 0x00111080
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x00165279
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00111120
LAB_00165279:
LEA R15,[RSP + 0x18]
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x00165294
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
LAB_00165294:
LEA RAX,[0x1b4b29]
CMP byte ptr [RAX],0x1
JNZ 0x001652e6
MOV RAX,qword ptr [RBX + 0x40]
MOV RAX,qword ptr [RAX + 0x2a0]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001762d8
MOV RSI,qword ptr [R14]
LEA RDI,[0x1875b7]
XOR EAX,EAX
CALL 0x00111080
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x001652e6
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
LAB_001652e6:
MOV EDI,0xa
CALL 0x00111d80
LEA RSI,[0x1875c6]
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00163bb9
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0015deee
LEA RDX,[0x1864a6]
LEA RCX,[0x18689f]
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV ESI,EAX
CALL 0x001643d2
MOV RSI,qword ptr [R14]
LEA RDI,[0x187436]
XOR EAX,EAX
CALL 0x00111080
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x0016534f
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
LAB_0016534f:
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0015df74
TEST EAX,EAX
JLE 0x001653b4
MOV EBP,EAX
LEA RSI,[0x1874e7]
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00163bb9
LEA RDX,[0x1864a6]
LEA RCX,[0x18689f]
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV ESI,EBP
CALL 0x001643d2
MOV RSI,qword ptr [R14]
LEA RDI,[0x187436]
XOR EAX,EAX
CALL 0x00111080
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x001653b4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00111120
LAB_001653b4:
MOV R14,qword ptr [RBX + 0x40]
MOV RDI,R14
CALL 0x0015e0b4
TEST EAX,EAX
JZ 0x00165412
MOV EBX,EAX
LEA RAX,[0x1b4abb]
CMP byte ptr [RAX],0x0
JNZ 0x00165412
MOV RDI,R14
CALL 0x00176348
TEST AL,AL
JZ 0x001653e8
MOV EDI,0xa
CALL 0x00111d80
LAB_001653e8:
CMP EBX,0x1
LEA RAX,[0x187551]
LEA RCX,[0x187556]
CMOVZ RCX,RAX
LEA RSI,[0x1875d4]
MOV EDI,0x3
MOV EDX,EBX
XOR EAX,EAX
CALL 0x00163bb9
LAB_00165412:
MOV RAX,qword ptr [0x001b3f60]
MOV RDI,qword ptr [RAX]
CALL 0x00111610
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::BriefUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
*/
void testing::internal::BriefUnitTestResultPrinter::OnTestIterationEnd
(UnitTest *param_1,int param_2)
{
long *plVar1;
UnitTestImpl *this;
long *plVar2;
char cVar3;
int iVar4;
long *plVar5;
char *pcVar6;
int iVar7;
int4 in_register_00000034;
long lVar8;
long *local_60 [2];
long local_50 [2];
long *local_40 [2];
long local_30 [2];
lVar8 = CONCAT44(in_register_00000034,param_2);
iVar7 = 0;
ColoredPrintf(2,"[==========] ");
iVar4 = UnitTestImpl::test_to_run_count(*(UnitTestImpl **)(lVar8 + 0x40));
FormatCountableNoun_abi_cxx11_((testing *)local_60,iVar4,"test","tests");
plVar2 = local_60[0];
plVar5 = *(long **)(*(long *)(lVar8 + 0x40) + 0xb8);
plVar1 = *(long **)(*(long *)(lVar8 + 0x40) + 0xc0);
if (plVar5 != plVar1) {
iVar7 = 0;
do {
iVar7 = iVar7 + (uint)*(byte *)(*plVar5 + 0x70);
plVar5 = plVar5 + 1;
} while (plVar5 != plVar1);
}
/* try { // try from 0016522f to 00165248 has its CatchHandler @ 0016542c */
FormatCountableNoun_abi_cxx11_((testing *)local_40,iVar7,"test suite","test suites");
printf("%s from %s ran.",plVar2,local_40[0]);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (FLAGS_gtest_print_time == '\x01') {
local_40[0] = *(long **)(*(long *)(lVar8 + 0x40) + 0x2a0);
StreamableToString<long>((long *)local_60);
printf(" (%s ms total)",local_60[0]);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
putchar(10);
ColoredPrintf(2,"[ PASSED ] ");
iVar4 = UnitTestImpl::successful_test_count(*(UnitTestImpl **)(lVar8 + 0x40));
FormatCountableNoun_abi_cxx11_((testing *)local_60,iVar4,"test","tests");
printf("%s.\n",local_60[0]);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
iVar4 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(lVar8 + 0x40));
if (0 < iVar4) {
ColoredPrintf(2,"[ SKIPPED ] ");
FormatCountableNoun_abi_cxx11_((testing *)local_60,iVar4,"test","tests");
printf("%s.\n",local_60[0]);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
this = *(UnitTestImpl **)(lVar8 + 0x40);
iVar4 = UnitTestImpl::reportable_disabled_test_count(this);
if ((iVar4 != 0) && (FLAGS_gtest_also_run_disabled_tests == '\0')) {
cVar3 = UnitTestImpl::Passed(this);
if (cVar3 != '\0') {
putchar(10);
}
pcVar6 = "TESTS";
if (iVar4 == 1) {
pcVar6 = "TEST";
}
ColoredPrintf(3," YOU HAVE %d DISABLED %s\n\n",iVar4,pcVar6);
}
fflush(*(FILE **)PTR_stdout_001b3f60);
return;
}
| |
22,755 | create_cond(PFS_cond_class*, void const*) | eloqsql/storage/perfschema/pfs_instr.cc | PFS_cond* create_cond(PFS_cond_class *klass, const void *identity)
{
PFS_cond *pfs;
pfs_dirty_state dirty_state;
pfs= global_cond_container.allocate(& dirty_state);
if (pfs != NULL)
{
pfs->m_identity= identity;
pfs->m_class= klass;
pfs->m_enabled= klass->m_enabled && flag_global_instrumentation;
pfs->m_timed= klass->m_timed;
pfs->m_cond_stat.reset();
pfs->m_lock.dirty_to_allocated(& dirty_state);
if (klass->is_singleton())
klass->m_singleton= pfs;
}
return pfs;
} | O3 | cpp | create_cond(PFS_cond_class*, void const*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x360dc9(%rip), %rdi # 0x3904b8
leaq -0x14(%rbp), %rsi
callq 0x330f0
testq %rax, %rax
je 0x2f750
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x3a14f4(%rip), %rcx # 0x3d0c00
xorl %edx, %edx
cmpb $0x0, 0x4(%rbx)
movzbl (%rcx), %ecx
cmovnel %ecx, %edx
movb %dl, 0x4(%rax)
movb 0x5(%rbx), %cl
movb %cl, 0x5(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq $-0x1, 0x30(%rax)
movq $0x0, 0x38(%rax)
movl -0x14(%rbp), %ecx
andl $-0x4, %ecx
addl $0x6, %ecx
xchgl %ecx, (%rax)
testb $0x1, 0x8(%rbx)
je 0x2f750
movq %rax, 0xc0(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| _Z11create_condP14PFS_cond_classPKv:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
lea rdi, global_cond_container
lea rsi, [rbp+var_14]
call _ZN29PFS_buffer_scalable_containerI8PFS_condLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::allocate(pfs_dirty_state *)
test rax, rax
jz short loc_2F750
mov [rax+10h], r14
mov [rax+18h], rbx
lea rcx, flag_global_instrumentation
xor edx, edx
cmp byte ptr [rbx+4], 0
movzx ecx, byte ptr [rcx]
cmovnz edx, ecx
mov [rax+4], dl
mov cl, [rbx+5]
mov [rax+5], cl
xorps xmm0, xmm0
movups xmmword ptr [rax+20h], xmm0
mov qword ptr [rax+30h], 0FFFFFFFFFFFFFFFFh
mov qword ptr [rax+38h], 0
mov ecx, [rbp+var_14]
and ecx, 0FFFFFFFCh
add ecx, 6
xchg ecx, [rax]
test byte ptr [rbx+8], 1
jz short loc_2F750
mov [rbx+0C0h], rax
loc_2F750:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long create_cond(long long a1, long long a2)
{
long long result; // rax
char v3; // dl
_DWORD v4[5]; // [rsp+Ch] [rbp-14h] BYREF
result = PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::allocate(
&global_cond_container,
v4);
if ( result )
{
*(_QWORD *)(result + 16) = a2;
*(_QWORD *)(result + 24) = a1;
v3 = 0;
if ( *(_BYTE *)(a1 + 4) )
v3 = flag_global_instrumentation[0];
*(_BYTE *)(result + 4) = v3;
*(_BYTE *)(result + 5) = *(_BYTE *)(a1 + 5);
*(_OWORD *)(result + 32) = 0LL;
*(_QWORD *)(result + 48) = -1LL;
*(_QWORD *)(result + 56) = 0LL;
_InterlockedExchange((volatile __int32 *)result, (v4[0] & 0xFFFFFFFC) + 6);
if ( (*(_BYTE *)(a1 + 8) & 1) != 0 )
*(_QWORD *)(a1 + 192) = result;
}
return result;
}
| create_cond:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[0x4904b8]
LEA RSI,[RBP + -0x14]
CALL 0x001330f0
TEST RAX,RAX
JZ 0x0012f750
MOV qword ptr [RAX + 0x10],R14
MOV qword ptr [RAX + 0x18],RBX
LEA RCX,[0x4d0c00]
XOR EDX,EDX
CMP byte ptr [RBX + 0x4],0x0
MOVZX ECX,byte ptr [RCX]
CMOVNZ EDX,ECX
MOV byte ptr [RAX + 0x4],DL
MOV CL,byte ptr [RBX + 0x5]
MOV byte ptr [RAX + 0x5],CL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOV qword ptr [RAX + 0x30],-0x1
MOV qword ptr [RAX + 0x38],0x0
MOV ECX,dword ptr [RBP + -0x14]
AND ECX,0xfffffffc
ADD ECX,0x6
XCHG dword ptr [RAX],ECX
TEST byte ptr [RBX + 0x8],0x1
JZ 0x0012f750
MOV qword ptr [RBX + 0xc0],RAX
LAB_0012f750:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
/* create_cond(PFS_cond_class*, void const*) */
void create_cond(PFS_cond_class *param_1,void *param_2)
{
int *piVar1;
int1 uVar2;
uint local_1c;
piVar1 = (int *)PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>
::allocate((PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>
*)global_cond_container,(pfs_dirty_state *)&local_1c);
if (piVar1 != (int *)0x0) {
*(void **)(piVar1 + 4) = param_2;
*(PFS_cond_class **)(piVar1 + 6) = param_1;
uVar2 = 0;
if (param_1[4] != (PFS_cond_class)0x0) {
uVar2 = flag_global_instrumentation;
}
*(int1 *)(piVar1 + 1) = uVar2;
*(PFS_cond_class *)((long)piVar1 + 5) = param_1[5];
piVar1[8] = 0;
piVar1[9] = 0;
piVar1[10] = 0;
piVar1[0xb] = 0;
piVar1[0xc] = -1;
piVar1[0xd] = -1;
piVar1[0xe] = 0;
piVar1[0xf] = 0;
LOCK();
*piVar1 = (local_1c & 0xfffffffc) + 6;
UNLOCK();
if (((byte)param_1[8] & 1) != 0) {
*(int **)(param_1 + 0xc0) = piVar1;
}
}
return;
}
| |
22,756 | CheckCollisionPointPoly | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount)
{
bool inside = false;
if (pointCount > 2)
{
for (int i = 0, j = pointCount - 1; i < pointCount; j = i++)
{
if ((points[i].y > point.y) != (points[j].y > point.y) &&
(point.x < (points[j].x - points[i].x)*(point.y - points[i].y)/(points[j].y - points[i].y) + points[i].x))
{
inside = !inside;
}
}
}
return inside;
} | O0 | c | CheckCollisionPointPoly:
pushq %rbp
movq %rsp, %rbp
movlpd %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb $0x0, -0x15(%rbp)
cmpl $0x2, -0x14(%rbp)
jle 0xdfc0c
movl $0x0, -0x1c(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xdfc0a
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movss 0x4(%rax,%rcx,8), %xmm0
ucomiss -0x4(%rbp), %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movslq -0x20(%rbp), %rdx
movss 0x4(%rcx,%rdx,8), %xmm0
ucomiss -0x4(%rbp), %xmm0
seta %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0xdfbf5
movss -0x8(%rbp), %xmm1
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
subss (%rax,%rcx,8), %xmm0
movss -0x4(%rbp), %xmm2
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
subss 0x4(%rax,%rcx,8), %xmm2
mulss %xmm2, %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movss 0x4(%rax,%rcx,8), %xmm2
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
subss 0x4(%rax,%rcx,8), %xmm2
divss %xmm2, %xmm0
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addss (%rax,%rcx,8), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xdfbf5
movb -0x15(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0xdfbf7
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
movl %eax, -0x20(%rbp)
jmp 0xdfb3e
jmp 0xdfc0c
movb -0x15(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
| CheckCollisionPointPoly:
push rbp
mov rbp, rsp
movlpd [rbp+var_8], xmm0
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_15], 0
cmp [rbp+var_14], 2
jle loc_DFC0C
mov [rbp+var_1C], 0
mov eax, [rbp+var_14]
sub eax, 1
mov [rbp+var_20], eax
loc_DFB3E:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_14]
jge loc_DFC0A
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
movss xmm0, dword ptr [rax+rcx*8+4]
ucomiss xmm0, dword ptr [rbp+var_8+4]
setnbe al
and al, 1
movzx eax, al
mov rcx, [rbp+var_10]
movsxd rdx, [rbp+var_20]
movss xmm0, dword ptr [rcx+rdx*8+4]
ucomiss xmm0, dword ptr [rbp+var_8+4]
setnbe cl
and cl, 1
movzx ecx, cl
cmp eax, ecx
jz short loc_DFBF5
movss xmm1, dword ptr [rbp+var_8]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_20]
movss xmm0, dword ptr [rax+rcx*8]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
subss xmm0, dword ptr [rax+rcx*8]
movss xmm2, dword ptr [rbp+var_8+4]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
subss xmm2, dword ptr [rax+rcx*8+4]
mulss xmm0, xmm2
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_20]
movss xmm2, dword ptr [rax+rcx*8+4]
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
subss xmm2, dword ptr [rax+rcx*8+4]
divss xmm0, xmm2
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
addss xmm0, dword ptr [rax+rcx*8]
ucomiss xmm0, xmm1
jbe short loc_DFBF5
mov al, [rbp+var_15]
xor al, 0FFh
and al, 1
mov [rbp+var_15], al
loc_DFBF5:
jmp short $+2
loc_DFBF7:
mov eax, [rbp+var_1C]
mov ecx, eax
add ecx, 1
mov [rbp+var_1C], ecx
mov [rbp+var_20], eax
jmp loc_DFB3E
loc_DFC0A:
jmp short $+2
loc_DFC0C:
mov al, [rbp+var_15]
and al, 1
pop rbp
retn
| bool CheckCollisionPointPoly(long long a1, int a2, double a3)
{
int v3; // eax
int v5; // [rsp+0h] [rbp-20h]
int v6; // [rsp+4h] [rbp-1Ch]
bool v7; // [rsp+Bh] [rbp-15h]
v7 = 0;
if ( a2 > 2 )
{
v6 = 0;
v5 = a2 - 1;
while ( v6 < a2 )
{
if ( *(float *)(a1 + 8LL * v6 + 4) > *((float *)&a3 + 1) != *(float *)(a1 + 8LL * v5 + 4) > *((float *)&a3 + 1)
&& (float)((float)((float)((float)(*(float *)(a1 + 8LL * v5) - *(float *)(a1 + 8LL * v6))
* (float)(*((float *)&a3 + 1) - *(float *)(a1 + 8LL * v6 + 4)))
/ (float)(*(float *)(a1 + 8LL * v5 + 4) - *(float *)(a1 + 8LL * v6 + 4)))
+ *(float *)(a1 + 8LL * v6)) > *(float *)&a3 )
{
v7 = !v7;
}
v3 = v6++;
v5 = v3;
}
}
return v7;
}
| CheckCollisionPointPoly:
PUSH RBP
MOV RBP,RSP
MOVLPD qword ptr [RBP + -0x8],XMM0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV byte ptr [RBP + -0x15],0x0
CMP dword ptr [RBP + -0x14],0x2
JLE 0x001dfc0c
MOV dword ptr [RBP + -0x1c],0x0
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
LAB_001dfb3e:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x001dfc0a
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOVSS XMM0,dword ptr [RAX + RCX*0x8 + 0x4]
UCOMISS XMM0,dword ptr [RBP + -0x4]
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV RCX,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RCX + RDX*0x8 + 0x4]
UCOMISS XMM0,dword ptr [RBP + -0x4]
SETA CL
AND CL,0x1
MOVZX ECX,CL
CMP EAX,ECX
JZ 0x001dfbf5
MOVSS XMM1,dword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOVSS XMM0,dword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
SUBSS XMM0,dword ptr [RAX + RCX*0x8]
MOVSS XMM2,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
SUBSS XMM2,dword ptr [RAX + RCX*0x8 + 0x4]
MULSS XMM0,XMM2
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOVSS XMM2,dword ptr [RAX + RCX*0x8 + 0x4]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
SUBSS XMM2,dword ptr [RAX + RCX*0x8 + 0x4]
DIVSS XMM0,XMM2
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADDSS XMM0,dword ptr [RAX + RCX*0x8]
UCOMISS XMM0,XMM1
JBE 0x001dfbf5
MOV AL,byte ptr [RBP + -0x15]
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RBP + -0x15],AL
LAB_001dfbf5:
JMP 0x001dfbf7
LAB_001dfbf7:
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001dfb3e
LAB_001dfc0a:
JMP 0x001dfc0c
LAB_001dfc0c:
MOV AL,byte ptr [RBP + -0x15]
AND AL,0x1
POP RBP
RET
|
byte CheckCollisionPointPoly(int8 param_1,long param_2,int param_3)
{
float fVar1;
int local_28;
int local_24;
byte local_1d;
fVar1 = (float)((ulong)param_1 >> 0x20);
local_1d = 0;
if (2 < param_3) {
local_28 = param_3 + -1;
for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 1) {
if ((fVar1 < *(float *)(param_2 + 4 + (long)local_24 * 8) !=
fVar1 < *(float *)(param_2 + 4 + (long)local_28 * 8)) &&
((float)param_1 <
((*(float *)(param_2 + (long)local_28 * 8) - *(float *)(param_2 + (long)local_24 * 8)) *
(fVar1 - *(float *)(param_2 + 4 + (long)local_24 * 8))) /
(*(float *)(param_2 + 4 + (long)local_28 * 8) -
*(float *)(param_2 + 4 + (long)local_24 * 8)) + *(float *)(param_2 + (long)local_24 * 8)))
{
local_1d = (local_1d ^ 0xff) & 1;
}
local_28 = local_24;
}
}
return local_1d;
}
| |
22,757 | CheckCollisionPointPoly | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount)
{
bool inside = false;
if (pointCount > 2)
{
for (int i = 0, j = pointCount - 1; i < pointCount; j = i++)
{
if ((points[i].y > point.y) != (points[j].y > point.y) &&
(point.x < (points[j].x - points[i].x)*(point.y - points[i].y)/(points[j].y - points[i].y) + points[i].x))
{
inside = !inside;
}
}
}
return inside;
} | O2 | c | CheckCollisionPointPoly:
cmpl $0x3, %esi
jl 0x6b93f
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1]
movl %esi, %ecx
decl %esi
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x6b941
movss 0x4(%rdi,%rdx,8), %xmm2
movslq %esi, %rsi
movss 0x4(%rdi,%rsi,8), %xmm3
movaps %xmm1, %xmm4
cmpltps %xmm2, %xmm4
movaps %xmm1, %xmm5
cmpnltps %xmm3, %xmm5
xorps %xmm4, %xmm5
movd %xmm5, %r8d
testb $0x1, %r8b
jne 0x6b938
movss (%rdi,%rsi,8), %xmm4
movss (%rdi,%rdx,8), %xmm5
subss %xmm5, %xmm4
movaps %xmm1, %xmm6
subss %xmm2, %xmm6
mulss %xmm4, %xmm6
subss %xmm2, %xmm3
divss %xmm3, %xmm6
addss %xmm5, %xmm6
ucomiss %xmm0, %xmm6
jbe 0x6b938
xorb $0x1, %al
movl %edx, %esi
incq %rdx
jmp 0x6b8dc
xorl %eax, %eax
andb $0x1, %al
retq
| CheckCollisionPointPoly:
cmp esi, 3
jl short loc_6B93F
movaps xmm1, xmm0
shufps xmm1, xmm0, 55h ; 'U'
mov ecx, esi
dec esi
xor edx, edx
xor eax, eax
loc_6B8DC:
cmp rcx, rdx
jz short loc_6B941
movss xmm2, dword ptr [rdi+rdx*8+4]
movsxd rsi, esi
movss xmm3, dword ptr [rdi+rsi*8+4]
movaps xmm4, xmm1
cmpltps xmm4, xmm2
movaps xmm5, xmm1
cmpnltps xmm5, xmm3
xorps xmm5, xmm4
movd r8d, xmm5
test r8b, 1
jnz short loc_6B938
movss xmm4, dword ptr [rdi+rsi*8]
movss xmm5, dword ptr [rdi+rdx*8]
subss xmm4, xmm5
movaps xmm6, xmm1
subss xmm6, xmm2
mulss xmm6, xmm4
subss xmm3, xmm2
divss xmm6, xmm3
addss xmm6, xmm5
ucomiss xmm6, xmm0
jbe short loc_6B938
xor al, 1
loc_6B938:
mov esi, edx
inc rdx
jmp short loc_6B8DC
loc_6B93F:
xor eax, eax
loc_6B941:
and al, 1
retn
| char CheckCollisionPointPoly(long long a1, int a2, __m128 a3)
{
__m128 v3; // xmm1
long long v4; // rcx
int v5; // esi
long long v6; // rdx
char v7; // al
__m128 v8; // xmm2
__m128 v9; // xmm3
if ( a2 < 3 )
{
v7 = 0;
}
else
{
v3 = _mm_shuffle_ps(a3, a3, 85);
v4 = (unsigned int)a2;
v5 = a2 - 1;
v6 = 0LL;
v7 = 0;
while ( v4 != v6 )
{
v8 = (__m128)*(unsigned int *)(a1 + 8 * v6 + 4);
v9 = (__m128)*(unsigned int *)(a1 + 8LL * v5 + 4);
if ( (_mm_cvtsi128_si32((__m128i)_mm_xor_ps(_mm_cmpnlt_ps(v3, v9), _mm_cmplt_ps(v3, v8))) & 1) == 0
&& (float)((float)((float)((float)(v3.m128_f32[0] - v8.m128_f32[0])
* (float)(*(float *)(a1 + 8LL * v5) - *(float *)(a1 + 8 * v6)))
/ (float)(v9.m128_f32[0] - v8.m128_f32[0]))
+ *(float *)(a1 + 8 * v6)) > a3.m128_f32[0] )
{
v7 ^= 1u;
}
v5 = v6++;
}
}
return v7 & 1;
}
| CheckCollisionPointPoly:
CMP ESI,0x3
JL 0x0016b93f
MOVAPS XMM1,XMM0
SHUFPS XMM1,XMM0,0x55
MOV ECX,ESI
DEC ESI
XOR EDX,EDX
XOR EAX,EAX
LAB_0016b8dc:
CMP RCX,RDX
JZ 0x0016b941
MOVSS XMM2,dword ptr [RDI + RDX*0x8 + 0x4]
MOVSXD RSI,ESI
MOVSS XMM3,dword ptr [RDI + RSI*0x8 + 0x4]
MOVAPS XMM4,XMM1
CMPLTPS XMM4,XMM2
MOVAPS XMM5,XMM1
CMPNLTPS XMM5,XMM3
XORPS XMM5,XMM4
MOVD R8D,XMM5
TEST R8B,0x1
JNZ 0x0016b938
MOVSS XMM4,dword ptr [RDI + RSI*0x8]
MOVSS XMM5,dword ptr [RDI + RDX*0x8]
SUBSS XMM4,XMM5
MOVAPS XMM6,XMM1
SUBSS XMM6,XMM2
MULSS XMM6,XMM4
SUBSS XMM3,XMM2
DIVSS XMM6,XMM3
ADDSS XMM6,XMM5
UCOMISS XMM6,XMM0
JBE 0x0016b938
XOR AL,0x1
LAB_0016b938:
MOV ESI,EDX
INC RDX
JMP 0x0016b8dc
LAB_0016b93f:
XOR EAX,EAX
LAB_0016b941:
AND AL,0x1
RET
|
ulong CheckCollisionPointPoly(int8 param_1,long param_2,uint param_3)
{
float fVar1;
float fVar2;
float fVar3;
ulong uVar4;
ulong uVar5;
int iVar6;
float fVar7;
fVar7 = (float)((ulong)param_1 >> 0x20);
if ((int)param_3 < 3) {
uVar4 = 0;
}
else {
iVar6 = param_3 - 1;
uVar4 = 0;
for (uVar5 = 0; param_3 != uVar5; uVar5 = uVar5 + 1) {
fVar1 = *(float *)(param_2 + 4 + uVar5 * 8);
fVar2 = *(float *)(param_2 + 4 + (long)iVar6 * 8);
if ((fVar2 <= fVar7 == fVar7 < fVar1) &&
(fVar3 = *(float *)(param_2 + uVar5 * 8),
(float)param_1 <
((fVar7 - fVar1) * (*(float *)(param_2 + (long)iVar6 * 8) - fVar3)) / (fVar2 - fVar1) +
fVar3)) {
uVar4 = uVar4 ^ 1;
}
iVar6 = (int)uVar5;
}
}
return uVar4;
}
| |
22,758 | CheckCollisionPointPoly | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c | bool CheckCollisionPointPoly(Vector2 point, const Vector2 *points, int pointCount)
{
bool inside = false;
if (pointCount > 2)
{
for (int i = 0, j = pointCount - 1; i < pointCount; j = i++)
{
if ((points[i].y > point.y) != (points[j].y > point.y) &&
(point.x < (points[j].x - points[i].x)*(point.y - points[i].y)/(points[j].y - points[i].y) + points[i].x))
{
inside = !inside;
}
}
}
return inside;
} | O3 | c | CheckCollisionPointPoly:
cmpl $0x3, %esi
jl 0x7e4ae
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1]
movl %esi, %ecx
decl %esi
xorl %edx, %edx
xorl %eax, %eax
movss 0x4(%rdi,%rdx,8), %xmm2
movslq %esi, %rsi
movss 0x4(%rdi,%rsi,8), %xmm3
movaps %xmm1, %xmm4
cmpltps %xmm2, %xmm4
movaps %xmm1, %xmm5
cmpnltps %xmm3, %xmm5
xorps %xmm4, %xmm5
movd %xmm5, %r8d
testb $0x1, %r8b
jne 0x7e49e
movss (%rdi,%rsi,8), %xmm4
movss (%rdi,%rdx,8), %xmm5
subss %xmm5, %xmm4
movaps %xmm1, %xmm6
subss %xmm2, %xmm6
mulss %xmm4, %xmm6
subss %xmm2, %xmm3
divss %xmm3, %xmm6
addss %xmm5, %xmm6
ucomiss %xmm0, %xmm6
jbe 0x7e49e
xorb $0x1, %al
movl %edx, %esi
leaq 0x1(%rdx), %r8
movq %r8, %rdx
cmpq %r8, %rcx
jne 0x7e447
jmp 0x7e4b0
xorl %eax, %eax
andb $0x1, %al
retq
| CheckCollisionPointPoly:
cmp esi, 3
jl short loc_7E4AE
movaps xmm1, xmm0
shufps xmm1, xmm0, 55h ; 'U'
mov ecx, esi
dec esi
xor edx, edx
xor eax, eax
loc_7E447:
movss xmm2, dword ptr [rdi+rdx*8+4]
movsxd rsi, esi
movss xmm3, dword ptr [rdi+rsi*8+4]
movaps xmm4, xmm1
cmpltps xmm4, xmm2
movaps xmm5, xmm1
cmpnltps xmm5, xmm3
xorps xmm5, xmm4
movd r8d, xmm5
test r8b, 1
jnz short loc_7E49E
movss xmm4, dword ptr [rdi+rsi*8]
movss xmm5, dword ptr [rdi+rdx*8]
subss xmm4, xmm5
movaps xmm6, xmm1
subss xmm6, xmm2
mulss xmm6, xmm4
subss xmm3, xmm2
divss xmm6, xmm3
addss xmm6, xmm5
ucomiss xmm6, xmm0
jbe short loc_7E49E
xor al, 1
loc_7E49E:
mov esi, edx
lea r8, [rdx+1]
mov rdx, r8
cmp rcx, r8
jnz short loc_7E447
jmp short loc_7E4B0
loc_7E4AE:
xor eax, eax
loc_7E4B0:
and al, 1
retn
| char CheckCollisionPointPoly(long long a1, int a2, __m128 a3)
{
__m128 v3; // xmm1
long long v4; // rcx
int v5; // esi
long long v6; // rdx
char v7; // al
__m128 v8; // xmm2
__m128 v9; // xmm3
if ( a2 < 3 )
{
v7 = 0;
}
else
{
v3 = _mm_shuffle_ps(a3, a3, 85);
v4 = (unsigned int)a2;
v5 = a2 - 1;
v6 = 0LL;
v7 = 0;
do
{
v8 = (__m128)*(unsigned int *)(a1 + 8 * v6 + 4);
v9 = (__m128)*(unsigned int *)(a1 + 8LL * v5 + 4);
if ( (_mm_cvtsi128_si32((__m128i)_mm_xor_ps(_mm_cmpnlt_ps(v3, v9), _mm_cmplt_ps(v3, v8))) & 1) == 0
&& (float)((float)((float)((float)(v3.m128_f32[0] - v8.m128_f32[0])
* (float)(*(float *)(a1 + 8LL * v5) - *(float *)(a1 + 8 * v6)))
/ (float)(v9.m128_f32[0] - v8.m128_f32[0]))
+ *(float *)(a1 + 8 * v6)) > a3.m128_f32[0] )
{
v7 ^= 1u;
}
v5 = v6++;
}
while ( v4 != v6 );
}
return v7 & 1;
}
| CheckCollisionPointPoly:
CMP ESI,0x3
JL 0x0017e4ae
MOVAPS XMM1,XMM0
SHUFPS XMM1,XMM0,0x55
MOV ECX,ESI
DEC ESI
XOR EDX,EDX
XOR EAX,EAX
LAB_0017e447:
MOVSS XMM2,dword ptr [RDI + RDX*0x8 + 0x4]
MOVSXD RSI,ESI
MOVSS XMM3,dword ptr [RDI + RSI*0x8 + 0x4]
MOVAPS XMM4,XMM1
CMPLTPS XMM4,XMM2
MOVAPS XMM5,XMM1
CMPNLTPS XMM5,XMM3
XORPS XMM5,XMM4
MOVD R8D,XMM5
TEST R8B,0x1
JNZ 0x0017e49e
MOVSS XMM4,dword ptr [RDI + RSI*0x8]
MOVSS XMM5,dword ptr [RDI + RDX*0x8]
SUBSS XMM4,XMM5
MOVAPS XMM6,XMM1
SUBSS XMM6,XMM2
MULSS XMM6,XMM4
SUBSS XMM3,XMM2
DIVSS XMM6,XMM3
ADDSS XMM6,XMM5
UCOMISS XMM6,XMM0
JBE 0x0017e49e
XOR AL,0x1
LAB_0017e49e:
MOV ESI,EDX
LEA R8,[RDX + 0x1]
MOV RDX,R8
CMP RCX,R8
JNZ 0x0017e447
JMP 0x0017e4b0
LAB_0017e4ae:
XOR EAX,EAX
LAB_0017e4b0:
AND AL,0x1
RET
|
ulong CheckCollisionPointPoly(int8 param_1,long param_2,uint param_3)
{
float fVar1;
float fVar2;
float fVar3;
ulong uVar4;
ulong uVar5;
int iVar6;
float fVar7;
fVar7 = (float)((ulong)param_1 >> 0x20);
if ((int)param_3 < 3) {
uVar4 = 0;
}
else {
iVar6 = param_3 - 1;
uVar5 = 0;
uVar4 = 0;
do {
fVar1 = *(float *)(param_2 + 4 + uVar5 * 8);
fVar2 = *(float *)(param_2 + 4 + (long)iVar6 * 8);
if ((fVar2 <= fVar7 == fVar7 < fVar1) &&
(fVar3 = *(float *)(param_2 + uVar5 * 8),
(float)param_1 <
((fVar7 - fVar1) * (*(float *)(param_2 + (long)iVar6 * 8) - fVar3)) / (fVar2 - fVar1) +
fVar3)) {
uVar4 = uVar4 ^ 1;
}
iVar6 = (int)uVar5;
uVar5 = uVar5 + 1;
} while (param_3 != uVar5);
}
return uVar4;
}
| |
22,759 | testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest(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&) const | giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest.cc | bool MatchesTest(const std::string& test_suite_name,
const std::string& test_name) const {
return MatchesName(test_suite_name + "." + test_name);
} | O2 | cpp | testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest(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&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x1f82d(%rip), %rdx # 0x346e1
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x24935
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2496d
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x14ab8
testb %al, %al
je 0x14ef4
addq $0x50, %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x14ab8
movl %eax, %ebx
xorb $0x1, %bl
jmp 0x14ef6
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x8ad8
leaq 0x20(%rsp), %rdi
callq 0x8ad8
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x14f24
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8ad8
leaq 0x20(%rsp), %rdi
callq 0x8ad8
movq %rbx, %rdi
callq 0x89a0
| _ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesTestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rdx
mov rbx, rdi
lea rdx, asc_346E0+1; "."
lea r15, [rsp+58h+var_38]
mov rdi, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rdi, rsp
mov rsi, r15
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
mov rsi, rsp
mov rdi, rbx
call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)
test al, al
jz short loc_14EF4
add rbx, 50h ; 'P'
mov rsi, rsp
mov rdi, rbx
call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)
mov ebx, eax
xor bl, 1
jmp short loc_14EF6
loc_14EF4:
xor ebx, ebx
loc_14EF6:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov eax, ebx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
jmp short loc_14F24
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_14F24:
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::MatchesTest(
long long *a1,
long long a2,
long long a3)
{
unsigned int v4; // eax
unsigned int v5; // ebx
_BYTE v7[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v8[56]; // [rsp+20h] [rbp-38h] BYREF
std::operator+<char>(v8, a2, ".");
std::operator+<char>(v7, v8, a3);
if ( testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(a1, (long long)v7) )
{
LOBYTE(v4) = testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(a1 + 10, (long long)v7);
v5 = v4;
LOBYTE(v5) = v4 ^ 1;
}
else
{
v5 = 0;
}
std::string::~string(v7);
std::string::~string(v8);
return v5;
}
| MatchesTest:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDX
MOV RBX,RDI
LEA RDX,[0x1346e1]
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x00124935
LAB_00114ec1:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
CALL 0x0012496d
LAB_00114ecf:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00114ab8
TEST AL,AL
JZ 0x00114ef4
ADD RBX,0x50
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00114ab8
LAB_00114eed:
MOV EBX,EAX
XOR BL,0x1
JMP 0x00114ef6
LAB_00114ef4:
XOR EBX,EBX
LAB_00114ef6:
MOV RDI,RSP
CALL 0x00108ad8
LEA RDI,[RSP + 0x20]
CALL 0x00108ad8
MOV EAX,EBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::(anonymous
namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest(std::__cxx11::string const&,
std::__cxx11::string const&) const */
uint testing::internal::(anonymous_namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest
(string *param_1,string *param_2)
{
char cVar1;
uint uVar2;
string asStack_58 [32];
string local_38 [32];
std::operator+(local_38,(char *)param_2);
/* try { // try from 00114ec1 to 00114ece has its CatchHandler @ 00114f14 */
std::operator+(asStack_58,local_38);
/* try { // try from 00114ecf to 00114eec has its CatchHandler @ 00114f19 */
cVar1 = UnitTestFilter::MatchesName((UnitTestFilter *)param_1,asStack_58);
if (cVar1 == '\0') {
uVar2 = 0;
}
else {
uVar2 = UnitTestFilter::MatchesName((UnitTestFilter *)(param_1 + 0x50),asStack_58);
uVar2 = uVar2 ^ 1;
}
std::__cxx11::string::~string(asStack_58);
std::__cxx11::string::~string(local_38);
return uVar2;
}
| |
22,760 | psi_rwlock_trywrlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line);
int result= rw_trywrlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
} | O3 | c | psi_rwlock_trywrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x3572dc(%rip), %r15 # 0x386010
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x3
popq %rdx
callq *0x1b0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0xa4393
movl %eax, %r14d
testq %rbx, %rbx
je 0x2ed6d
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_rwlock_trywrlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
push 3
pop rdx
call qword ptr [rax+1B0h]
mov rbx, rax
mov rdi, r14
call my_rw_trywrlock
mov r14d, eax
test rbx, rbx
jz short loc_2ED6D
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1B8h]
loc_2ED6D:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 144),
3LL,
a2,
a3);
v4 = my_rw_trywrlock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4);
return v4;
}
| psi_rwlock_trywrlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x486010]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
PUSH 0x3
POP RDX
CALL qword ptr [RAX + 0x1b0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001a4393
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012ed6d
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1b8]
LAB_0012ed6d:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3);
uVar1 = my_rw_trywrlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
| |
22,761 | minja::Parser::parseMathUnaryPlusMinus() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathUnaryPlusMinus() {
static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))");
auto op_str = consumeToken(unary_plus_minus_tok);
auto expr = parseExpansion();
if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression");
if (!op_str.empty()) {
auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus;
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op);
}
return expr;
} | O2 | cpp | minja::Parser::parseMathUnaryPlusMinus():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x9b568(%rip), %rax # 0x103208
movb (%rax), %al
testb %al, %al
je 0x67d7b
leaq 0x9b537(%rip), %rdx # 0x1031e8
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x63a32
movq %rsp, %rdi
movq %r14, %rsi
callq 0x67eec
movq (%rsp), %rax
testq %rax, %rax
je 0x67dd0
cmpq $0x0, 0x38(%rsp)
je 0x67d45
leaq 0x50ac9(%rip), %rsi # 0xb87b1
leaq 0x30(%rsp), %rdi
callq 0x2aa4b
xorb $0x1, %al
movzbl %al, %eax
movl %eax, 0x14(%rsp)
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x6360e
leaq 0x50(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x14(%rsp), %rcx
callq 0x680b4
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x2adb8
leaq 0x20(%rsp), %rdi
callq 0x2adb8
jmp 0x67d5c
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x2adb8
leaq 0x30(%rsp), %rdi
callq 0x24348
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0x9b486(%rip), %rdi # 0x103208
callq 0x24150
testl %eax, %eax
je 0x67caa
leaq 0x9b452(%rip), %rdi # 0x1031e8
leaq 0x4fe7c(%rip), %rsi # 0xb7c19
pushq $0x10
popq %rdx
callq 0x49b0a
leaq -0x1e07c(%rip), %rdi # 0x49d30
leaq 0x9b435(%rip), %rsi # 0x1031e8
leaq 0x9abee(%rip), %rdx # 0x1029a8
callq 0x23820
leaq 0x9b442(%rip), %rdi # 0x103208
callq 0x23640
jmp 0x67caa
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %r14
leaq 0x4ff21(%rip), %rsi # 0xb7d03
movq %rax, %rdi
callq 0x23360
movq 0x9a1f7(%rip), %rsi # 0x101fe8
movq 0x9a150(%rip), %rdx # 0x101f48
movq %r14, %rdi
callq 0x24050
movq %rax, %rbx
leaq 0x9b3fe(%rip), %rdi # 0x103208
callq 0x23630
jmp 0x67e4b
jmp 0x67e2f
movq %rax, %rbx
movq %r14, %rdi
callq 0x236f0
jmp 0x67e32
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2adb8
jmp 0x67e32
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2adb8
jmp 0x67e41
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x24348
movq %rbx, %rdi
callq 0x240e0
nop
| _ZN5minja6Parser23parseMathUnaryPlusMinusEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
mov al, [rax]
test al, al
jz loc_67D7B
loc_67CAA:
lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rdi, [rsp+78h+var_48]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void)
mov rax, [rsp+78h+var_78]
test rax, rax
jz loc_67DD0
cmp [rsp+78h+var_40], 0
jz short loc_67D45
lea rsi, aSRN_0+0Bh; "+"
lea rdi, [rsp+78h+var_48]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
xor al, 1
movzx eax, al
mov [rsp+78h+var_64], eax
lea rdi, [rsp+78h+var_60]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_60]
mov rdx, rsp
lea rcx, [rsp+78h+var_64]
call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEERNS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &)
lea rdi, [rsp+78h+var_20]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_67D5C
loc_67D45:
mov [rbx], rax
mov rax, [rsp+78h+var_70]
and [rsp+78h+var_70], 0
mov [rbx+8], rax
and [rsp+78h+var_78], 0
loc_67D5C:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_67D7B:
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_67CAA
lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rsi, asc_B7C19; "\\+|-(?![}%#]\\})"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_67CAA
loc_67DD0:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_67E4B
jmp short loc_67E2F
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_67E32
mov rbx, rax
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_67E32
loc_67E2F:
mov rbx, rax
loc_67E32:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_67E41
mov rbx, rax
loc_67E41:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_67E4B:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, _QWORD *a2)
{
__int128 v2; // xmm0
long long v3; // rax
std::runtime_error *exception; // r14
long long v6; // [rsp+0h] [rbp-78h] BYREF
long long v7; // [rsp+8h] [rbp-70h] BYREF
BOOL v8; // [rsp+14h] [rbp-64h] BYREF
_BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF
long long v10; // [rsp+20h] [rbp-58h] BYREF
_QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF
_OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
(long long)"\\+|-(?![}%#]\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v11,
(long long)a2,
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
1u);
minja::Parser::parseExpansion((minja::Parser *)&v6);
if ( !v6 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v11[1] )
{
v8 = !std::operator==<char>((long long)v11);
minja::Parser::get_location((minja::Parser *)v9, a2);
std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(
v12,
v9,
&v6,
&v8);
v2 = v12[0];
*((_QWORD *)&v12[0] + 1) = 0LL;
*(_OWORD *)this = v2;
*(_QWORD *)&v12[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
else
{
*(_QWORD *)this = v6;
v3 = v7;
v7 = 0LL;
*((_QWORD *)this + 1) = v3;
v6 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
std::string::~string(v11);
return this;
}
| parseMathUnaryPlusMinus:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x203208]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00167d7b
LAB_00167caa:
LEA RDX,[0x2031e8]
LEA RDI,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00163a32
LAB_00167cc1:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00167eec
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00167dd0
CMP qword ptr [RSP + 0x38],0x0
JZ 0x00167d45
LEA RSI,[0x1b87b1]
LEA RDI,[RSP + 0x30]
CALL 0x0012aa4b
XOR AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x14],EAX
LAB_00167cfb:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x0016360e
LAB_00167d08:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x18]
MOV RDX,RSP
LEA RCX,[RSP + 0x14]
CALL 0x001680b4
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0012adb8
LEA RDI,[RSP + 0x20]
CALL 0x0012adb8
JMP 0x00167d5c
LAB_00167d45:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
LAB_00167d5c:
LEA RDI,[RSP + 0x8]
CALL 0x0012adb8
LEA RDI,[RSP + 0x30]
CALL 0x00124348
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_00167d7b:
LEA RDI,[0x203208]
CALL 0x00124150
TEST EAX,EAX
JZ 0x00167caa
LAB_00167d8f:
LEA RDI,[0x2031e8]
LEA RSI,[0x1b7c19]
PUSH 0x10
POP RDX
CALL 0x00149b0a
LAB_00167da5:
LEA RDI,[0x149d30]
LEA RSI,[0x2031e8]
LEA RDX,[0x2029a8]
CALL 0x00123820
LEA RDI,[0x203208]
CALL 0x00123640
JMP 0x00167caa
LAB_00167dd0:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV R14,RAX
LAB_00167ddb:
LEA RSI,[0x1b7d03]
MOV RDI,RAX
CALL 0x00123360
LAB_00167dea:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R14
CALL 0x00124050
|
/* minja::Parser::parseMathUnaryPlusMinus() */
void minja::Parser::parseMathUnaryPlusMinus(void)
{
long lVar1;
bool bVar2;
int iVar3;
runtime_error *this;
long *in_RDI;
long local_78;
long local_70;
uint local_64;
shared_ptr local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
string local_48 [8];
long local_40;
long local_28;
long alStack_20 [2];
if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 00167d8f to 00167da4 has its CatchHandler @ 00167e00 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
}
}
consumeToken(local_48);
/* try { // try from 00167cc1 to 00167ccb has its CatchHandler @ 00167e3e */
parseExpansion();
lVar1 = local_70;
if (local_78 != 0) {
if (local_40 == 0) {
*in_RDI = local_78;
local_70 = 0;
in_RDI[1] = lVar1;
local_78 = 0;
}
else {
bVar2 = std::operator==(local_48,"+");
local_64 = (uint)!bVar2;
/* try { // try from 00167cfb to 00167d07 has its CatchHandler @ 00167e2f */
get_location();
/* try { // try from 00167d08 to 00167d1e has its CatchHandler @ 00167e20 */
std::
make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&>
((Location *)&local_28,local_60,(Op *)&local_78);
lVar1 = alStack_20[0];
alStack_20[0] = 0;
*in_RDI = local_28;
in_RDI[1] = lVar1;
local_28 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
std::__cxx11::string::~string(local_48);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00167ddb to 00167de9 has its CatchHandler @ 00167e13 */
std::runtime_error::runtime_error
(this,"Expected expr of \'unary plus/minus/expansion\' expression");
/* try { // try from 00167dea to 00167dff has its CatchHandler @ 00167e11 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
| |
22,762 | minja::Parser::parseMathUnaryPlusMinus() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathUnaryPlusMinus() {
static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))");
auto op_str = consumeToken(unary_plus_minus_tok);
auto expr = parseExpansion();
if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression");
if (!op_str.empty()) {
auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus;
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op);
}
return expr;
} | O3 | cpp | minja::Parser::parseMathUnaryPlusMinus():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa51a2(%rip), %rax # 0x1321d8
movb (%rax), %al
testb %al, %al
je 0x8d160
leaq 0xa5171(%rip), %rdx # 0x1321b8
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x88460
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x8d2e8
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x8d1b7
cmpq $0x0, 0x38(%rsp)
je 0x8d0bf
leaq 0x6873e(%rip), %rsi # 0xf57c1
leaq 0x30(%rsp), %rdi
callq 0x1b210
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0xc(%rsp)
movq (%r14), %rax
movq %rax, 0x50(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x8d0d1
movq 0xa3ec3(%rip), %rcx # 0x130f78
cmpb $0x0, (%rcx)
je 0x8d0cd
incl 0x8(%rax)
jmp 0x8d0d1
movq %rax, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x8d13a
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x50(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
callq 0x99c10
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x8d12b
callq 0x267a6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8d13a
callq 0x267a6
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d155
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b930
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0xa5071(%rip), %rdi # 0x1321d8
callq 0x1c130
testl %eax, %eax
je 0x8d040
leaq 0xa503d(%rip), %rdi # 0x1321b8
leaq 0x67aa7(%rip), %rsi # 0xf4c29
movl $0x10, %edx
callq 0x675a8
leaq -0x258e7(%rip), %rdi # 0x678ac
leaq 0xa501e(%rip), %rsi # 0x1321b8
leaq 0xa47d7(%rip), %rdx # 0x131978
callq 0x1b7f0
leaq 0xa502b(%rip), %rdi # 0x1321d8
callq 0x1b600
jmp 0x8d040
movl $0x10, %edi
callq 0x1b480
movq %rax, %r14
leaq 0x67b48(%rip), %rsi # 0xf4d13
movq %rax, %rdi
callq 0x1b350
movq 0xa3e0e(%rip), %rsi # 0x130fe8
movq 0xa3d6f(%rip), %rdx # 0x130f50
movq %r14, %rdi
callq 0x1c040
movq %rax, %rbx
leaq 0xa4fe5(%rip), %rdi # 0x1321d8
callq 0x1b5f0
jmp 0x8d24d
movq %rax, %rbx
jmp 0x8d21e
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b6c0
jmp 0x8d21e
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x8d21e
callq 0x267a6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8d232
callq 0x267a6
jmp 0x8d232
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d24d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b930
movq %rbx, %rdi
callq 0x1c0d0
nop
| _ZN5minja6Parser23parseMathUnaryPlusMinusEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
mov al, [rax]
test al, al
jz loc_8D160
loc_8D040:
lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+78h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void)
mov rax, [rsp+78h+var_68]
test rax, rax
jz loc_8D1B7
cmp [rsp+78h+var_40], 0
jz short loc_8D0BF
lea rsi, aSRN_0+0Bh; "+"
lea rdi, [rsp+78h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
xor ecx, ecx
test eax, eax
setnz cl
mov [rsp+78h+var_6C], ecx
mov rax, [r14]
mov [rsp+78h+var_28], rax
mov rax, [r14+8]
mov [rsp+78h+var_20], rax
test rax, rax
jz short loc_8D0D1
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8D0CD
inc dword ptr [rax+8]
jmp short loc_8D0D1
loc_8D0BF:
mov [rbx], rax
mov rax, [rsp+78h+var_60]
mov [rbx+8], rax
jmp short loc_8D13A
loc_8D0CD:
lock inc dword ptr [rax+8]
loc_8D0D1:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea rcx, [rsp+78h+var_28]
mov [rcx+10h], rax
lea rdi, [rsp+78h+var_58+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+78h+var_58]
lea rdx, [rsp+78h+var_6D]
lea r8, [rsp+78h+var_68]
lea r9, [rsp+78h+var_6C]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEERNS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &)
movaps xmm0, [rsp+78h+var_58]
xor eax, eax
mov qword ptr [rsp+78h+var_58+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+78h+var_58], rax
mov rdi, [rsp+78h+var_20]
test rdi, rdi
jz short loc_8D12B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8D12B:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_8D13A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8D13A:
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8D155
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D155:
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_8D160:
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_8D040
lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rsi, asc_F4C29; "\\+|-(?![}%#]\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_8D040
loc_8D1B7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_8D24D
mov rbx, rax
jmp short loc_8D21E
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_8D21E
mov rbx, rax
mov rdi, [rsp+78h+var_20]
test rdi, rdi
jz short loc_8D21E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8D21E:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_8D232
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8D232
mov rbx, rax
loc_8D232:
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8D24D
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8D24D:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
__int128 v3; // xmm0
std::runtime_error *exception; // r14
char v6; // [rsp+Bh] [rbp-6Dh] BYREF
BOOL v7; // [rsp+Ch] [rbp-6Ch] BYREF
long long v8; // [rsp+10h] [rbp-68h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-60h]
__int128 v10; // [rsp+20h] [rbp-58h] BYREF
void *v11[2]; // [rsp+30h] [rbp-48h] BYREF
long long v12; // [rsp+40h] [rbp-38h] BYREF
long long v13; // [rsp+50h] [rbp-28h] BYREF
volatile signed __int32 *v14; // [rsp+58h] [rbp-20h]
long long v15; // [rsp+60h] [rbp-18h]
if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
(long long)"\\+|-(?![}%#]\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)v11,
(long long)a2,
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
1u);
minja::Parser::parseExpansion((minja::Parser *)&v8);
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v11[1] )
{
v7 = std::string::compare(v11, "+") != 0;
v13 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v14 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v15 = a2[4] - a2[2];
*(_QWORD *)&v10 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(
(char *)&v10 + 8,
&v10,
&v6,
&v13,
&v8,
&v7);
v3 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v10 = 0LL;
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
}
else
{
*(_QWORD *)this = v8;
*((_QWORD *)this + 1) = v9;
}
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
return this;
}
| parseMathUnaryPlusMinus:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x2321d8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0018d160
LAB_0018d040:
LEA RDX,[0x2321b8]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00188460
LAB_0018d059:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0018d2e8
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0018d1b7
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0018d0bf
LEA RSI,[0x1f57c1]
LEA RDI,[RSP + 0x30]
CALL 0x0011b210
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
MOV dword ptr [RSP + 0xc],ECX
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x58],RAX
TEST RAX,RAX
JZ 0x0018d0d1
MOV RCX,qword ptr [0x00230f78]
CMP byte ptr [RCX],0x0
JZ 0x0018d0cd
INC dword ptr [RAX + 0x8]
JMP 0x0018d0d1
LAB_0018d0bf:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0018d13a
LAB_0018d0cd:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018d0d1:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x50]
MOV qword ptr [RCX + 0x10],RAX
LEA RDI,[RSP + 0x28]
MOV qword ptr [RDI + -0x8],0x0
LAB_0018d0ef:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0xb]
LEA R8,[RSP + 0x10]
LEA R9,[RSP + 0xc]
CALL 0x00199c10
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x0018d12b
CALL 0x001267a6
LAB_0018d12b:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018d13a
CALL 0x001267a6
LAB_0018d13a:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0018d155
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011b930
LAB_0018d155:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_0018d160:
LEA RDI,[0x2321d8]
CALL 0x0011c130
TEST EAX,EAX
JZ 0x0018d040
LAB_0018d174:
LEA RDI,[0x2321b8]
LEA RSI,[0x1f4c29]
MOV EDX,0x10
CALL 0x001675a8
LAB_0018d18c:
LEA RDI,[0x1678ac]
LEA RSI,[0x2321b8]
LEA RDX,[0x231978]
CALL 0x0011b7f0
LEA RDI,[0x2321d8]
CALL 0x0011b600
JMP 0x0018d040
LAB_0018d1b7:
MOV EDI,0x10
CALL 0x0011b480
MOV R14,RAX
LAB_0018d1c4:
LEA RSI,[0x1f4d13]
MOV RDI,RAX
CALL 0x0011b350
LAB_0018d1d3:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f50]
MOV RDI,R14
CALL 0x0011c040
|
/* minja::Parser::parseMathUnaryPlusMinus() */
void minja::Parser::parseMathUnaryPlusMinus(void)
{
long lVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
long *in_RDI;
int1 local_6d;
uint local_6c;
long local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58;
long lStack_50;
long *local_48;
long local_40;
long local_38 [2];
int8 local_28;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
long local_18;
if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0018d174 to 0018d18b has its CatchHandler @ 0018d1e9 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
}
}
consumeToken(&local_48);
/* try { // try from 0018d059 to 0018d065 has its CatchHandler @ 0018d22f */
parseExpansion();
if (local_68 != 0) {
if (local_40 == 0) {
*in_RDI = local_68;
in_RDI[1] = (long)local_60;
}
else {
iVar2 = std::__cxx11::string::compare((char *)&local_48);
local_6c = (uint)(iVar2 != 0);
local_28 = *in_RSI;
local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00230f78 == '\0') {
LOCK();
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
}
}
local_18 = in_RSI[4] - in_RSI[2];
local_58 = 0;
/* try { // try from 0018d0ef to 0018d107 has its CatchHandler @ 0018d20c */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_50,&local_58,&local_6d,
&local_28,&local_68,&local_6c);
lVar1 = lStack_50;
lStack_50 = 0;
*in_RDI = local_58;
in_RDI[1] = lVar1;
local_58 = 0;
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018d1c4 to 0018d1d2 has its CatchHandler @ 0018d1ff */
std::runtime_error::runtime_error
(this,"Expected expr of \'unary plus/minus/expansion\' expression");
/* try { // try from 0018d1d3 to 0018d1e8 has its CatchHandler @ 0018d1fa */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f50);
}
| |
22,763 | minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const | monkey531[P]llama/common/chat-template.hpp | std::string try_raw_render(
const nlohmann::ordered_json & messages,
const nlohmann::ordered_json & tools,
bool add_generation_prompt,
const nlohmann::ordered_json & extra_context = nlohmann::ordered_json()) const
{
try {
auto prompt = apply(messages, tools, add_generation_prompt, extra_context, /* adjust_inputs= */ false);
// fprintf(stderr, "try_raw_render: %s\n", prompt.c_str());
return prompt;
} catch (const std::exception & e) {
// fprintf(stderr, "try_raw_render error: %s\n", e.what());
return "";
}
} | O3 | cpp | minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, (%rsp)
callq 0xa1300
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x7eaa8
movq %r14, %rdi
callq 0x1a3a0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x678f3(%rip), %rdx # 0xe6381
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x21af4
callq 0x1ae70
jmp 0x7ea65
movq %rax, %r14
callq 0x1ae70
movq %r14, %rdi
callq 0x1afd0
movq %rax, %rdi
callq 0x218f5
| _ZNK5minja13chat_template14try_raw_renderERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_:
push r14
push rbx
push rax
mov rbx, rdi
mov [rsp+18h+var_18], 0
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
loc_7EA65:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
cmp edx, 1
jnz short loc_7EAA8
mov rdi, r14; void *
call ___cxa_begin_catch
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aTarget+9; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
call ___cxa_end_catch
jmp short loc_7EA65
mov r14, rax
call ___cxa_end_catch
loc_7EAA8:
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long minja::chat_template::try_raw_render(long long a1)
{
minja::chat_template::apply(a1);
return a1;
}
| try_raw_render:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LAB_0017ea59:
MOV dword ptr [RSP],0x0
CALL 0x001a1300
LAB_0017ea65:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::chat_template::try_raw_render(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, bool,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) const */
chat_template * __thiscall
minja::chat_template::try_raw_render
(chat_template *this,basic_json *param_1,basic_json *param_2,bool param_3,
basic_json *param_4)
{
int7 in_register_00000009;
/* try { // try from 0017ea59 to 0017ea64 has its CatchHandler @ 0017ea70 */
apply((basic_json *)this,param_1,SUB81(param_2,0),
(basic_json *)CONCAT71(in_register_00000009,param_3),SUB81(param_4,0));
return this;
}
| |
22,764 | partitioned_key_cache_insert | eloqsql/mysys/mf_keycache.c | static
int partitioned_key_cache_insert(PARTITIONED_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length)
{
uint w_length;
uint offset= (uint) (filepos % keycache->key_cache_block_size);
DBUG_ENTER("partitioned_key_cache_insert");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file,(ulong) filepos, length));
/* Write data in key_cache_block_size increments */
do
{
SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache,
file, filepos);
w_length= length;
set_if_smaller(w_length, keycache->key_cache_block_size - offset);
if (simple_key_cache_insert((void *) partition,
file, filepos, level,
buff, w_length))
DBUG_RETURN(1);
filepos+= w_length;
buff+= w_length;
offset = 0;
} while ((length-= w_length));
DBUG_RETURN(0);
} | O0 | c | partitioned_key_cache_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x3c(%rbp)
jmp 0xec555
jmp 0xec557
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0xeca80
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl -0x3c(%rbp), %ecx
cmpl %ecx, %eax
jbe 0xec58f
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0xec591
movq -0x48(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
movl -0x38(%rbp), %r9d
callq 0xea460
cmpl $0x0, %eax
je 0xec5bc
jmp 0xec5b3
movl $0x1, -0x4(%rbp)
jmp 0xec5fb
movl -0x38(%rbp), %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x38(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x38(%rbp), %ecx
movl -0x34(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jne 0xec557
jmp 0xec5f4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| partitioned_key_cache_insert:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_3C], eax
jmp short $+2
loc_EC555:
jmp short $+2
loc_EC557:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_20]
call get_key_cache_partition
mov [rbp+var_48], rax
mov eax, [rbp+var_34]
mov [rbp+var_38], eax
mov eax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
sub ecx, [rbp+var_3C]
cmp eax, ecx
jbe short loc_EC58F
mov rax, [rbp+var_10]
mov eax, [rax+18h]
sub eax, [rbp+var_3C]
mov [rbp+var_38], eax
loc_EC58F:
jmp short $+2
loc_EC591:
mov rdi, [rbp+var_48]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_38]
call simple_key_cache_insert
cmp eax, 0
jz short loc_EC5BC
jmp short $+2
loc_EC5B3:
mov [rbp+var_4], 1
jmp short loc_EC5FB
loc_EC5BC:
mov eax, [rbp+var_38]
add rax, [rbp+var_20]
mov [rbp+var_20], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov [rbp+var_3C], 0
mov ecx, [rbp+var_38]
mov eax, [rbp+var_34]
sub eax, ecx
mov [rbp+var_34], eax
cmp eax, 0
jnz loc_EC557
jmp short $+2
loc_EC5F4:
mov [rbp+var_4], 0
loc_EC5FB:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long partitioned_key_cache_insert(
long long a1,
unsigned int a2,
unsigned long long a3,
int a4,
long long a5,
unsigned int a6)
{
_QWORD *key_cache_partition; // [rsp+8h] [rbp-48h]
int v8; // [rsp+14h] [rbp-3Ch]
unsigned int v9; // [rsp+18h] [rbp-38h]
unsigned long long v13; // [rsp+30h] [rbp-20h]
v13 = a3;
v8 = a3 % *(unsigned int *)(a1 + 24);
do
{
key_cache_partition = (_QWORD *)get_key_cache_partition(a1, a2, v13);
v9 = a6;
if ( a6 > *(_DWORD *)(a1 + 24) - v8 )
v9 = *(_DWORD *)(a1 + 24) - v8;
if ( (unsigned int)simple_key_cache_insert(key_cache_partition, a2, v13, a4, a5, v9) )
return 1;
v13 += v9;
a5 += v9;
v8 = 0;
a6 -= v9;
}
while ( a6 );
return 0;
}
| partitioned_key_cache_insert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001ec555
LAB_001ec555:
JMP 0x001ec557
LAB_001ec557:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001eca80
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
SUB ECX,dword ptr [RBP + -0x3c]
CMP EAX,ECX
JBE 0x001ec58f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
SUB EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x38],EAX
LAB_001ec58f:
JMP 0x001ec591
LAB_001ec591:
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x38]
CALL 0x001ea460
CMP EAX,0x0
JZ 0x001ec5bc
JMP 0x001ec5b3
LAB_001ec5b3:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001ec5fb
LAB_001ec5bc:
MOV EAX,dword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x3c],0x0
MOV ECX,dword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JNZ 0x001ec557
JMP 0x001ec5f4
LAB_001ec5f4:
MOV dword ptr [RBP + -0x4],0x0
LAB_001ec5fb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
partitioned_key_cache_insert
(long param_1,int4 param_2,ulong param_3,int4 param_4,long param_5,
uint param_6)
{
int iVar1;
int8 uVar2;
int local_44;
uint local_40;
uint local_3c;
long local_38;
ulong local_28;
local_44 = (int)(param_3 % (ulong)*(uint *)(param_1 + 0x18));
local_3c = param_6;
local_38 = param_5;
local_28 = param_3;
while( true ) {
uVar2 = get_key_cache_partition(param_1,param_2,local_28);
local_40 = local_3c;
if ((uint)(*(int *)(param_1 + 0x18) - local_44) < local_3c) {
local_40 = *(int *)(param_1 + 0x18) - local_44;
}
iVar1 = simple_key_cache_insert(uVar2,param_2,local_28,param_4,local_38,local_40);
if (iVar1 != 0) break;
local_28 = local_40 + local_28;
local_38 = local_38 + (ulong)local_40;
local_44 = 0;
local_3c = local_3c - local_40;
if (local_3c == 0) {
return 0;
}
}
return 1;
}
| |
22,765 | js_std_setenv | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_setenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name, *value;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
value = JS_ToCString(ctx, argv[1]);
if (!value) {
JS_FreeCString(ctx, name);
return JS_EXCEPTION;
}
setenv(name, value, TRUE);
JS_FreeCString(ctx, name);
JS_FreeCString(ctx, value);
return JS_UNDEFINED;
} | O2 | c | js_std_setenv:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x11a6c
testq %rax, %rax
je 0x11f1c
movq %rax, %r14
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
movq %rbx, %rdi
callq 0x11a6c
testq %rax, %rax
je 0x11f22
movq %rax, %r12
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xe1d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b057
pushq $0x3
popq %r15
movq %r12, %r14
jmp 0x11f26
pushq $0x6
popq %r15
jmp 0x11f31
pushq $0x6
popq %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b057
xorl %eax, %eax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_std_setenv:
push r15
push r14
push r12
push rbx
push rax
mov r15, r8
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToCString
test rax, rax
jz short loc_11F1C
mov r14, rax
mov rsi, [r15+10h]
mov rdx, [r15+18h]
mov rdi, rbx
call JS_ToCString
test rax, rax
jz short loc_11F22
mov r12, rax
push 1
pop rdx
mov rdi, r14
mov rsi, rax
call _setenv
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
push 3
pop r15
mov r14, r12
jmp short loc_11F26
loc_11F1C:
push 6
pop r15
jmp short loc_11F31
loc_11F22:
push 6
pop r15
loc_11F26:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
loc_11F31:
xor eax, eax
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_std_setenv(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v6; // rax
long long v7; // r14
long long v8; // rax
long long v9; // r12
v6 = JS_ToCString(a1, *a5, a5[1]);
if ( v6 )
{
v7 = v6;
v8 = JS_ToCString(a1, a5[2], a5[3]);
if ( v8 )
{
v9 = v8;
setenv(v7, v8, 1LL);
JS_FreeCString(a1, v7);
v7 = v9;
}
JS_FreeCString(a1, v7);
}
return 0LL;
}
| js_std_setenv:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,R8
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x00111f1c
MOV R14,RAX
MOV RSI,qword ptr [R15 + 0x10]
MOV RDX,qword ptr [R15 + 0x18]
MOV RDI,RBX
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x00111f22
MOV R12,RAX
PUSH 0x1
POP RDX
MOV RDI,R14
MOV RSI,RAX
CALL 0x0010e1d0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011b057
PUSH 0x3
POP R15
MOV R14,R12
JMP 0x00111f26
LAB_00111f1c:
PUSH 0x6
POP R15
JMP 0x00111f31
LAB_00111f22:
PUSH 0x6
POP R15
LAB_00111f26:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011b057
LAB_00111f31:
XOR EAX,EAX
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] js_std_setenv(int8 param_1)
{
int1 auVar1 [16];
char *__name;
char *__value;
int8 *in_R8;
ulong uVar2;
__name = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]);
if (__name == (char *)0x0) {
uVar2 = 6;
}
else {
__value = (char *)JS_ToCString(param_1,in_R8[2],in_R8[3]);
if (__value == (char *)0x0) {
uVar2 = 6;
}
else {
setenv(__name,__value,1);
JS_FreeCString(param_1,__name);
uVar2 = 3;
__name = __value;
}
JS_FreeCString(param_1,__name);
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
return auVar1 << 0x40;
}
| |
22,766 | js_std_setenv | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_setenv(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *name, *value;
name = JS_ToCString(ctx, argv[0]);
if (!name)
return JS_EXCEPTION;
value = JS_ToCString(ctx, argv[1]);
if (!value) {
JS_FreeCString(ctx, name);
return JS_EXCEPTION;
}
setenv(name, value, TRUE);
JS_FreeCString(ctx, name);
JS_FreeCString(ctx, value);
return JS_UNDEFINED;
} | O3 | c | js_std_setenv:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rdi, %rbx
movq (%r8), %rdx
movq 0x8(%r8), %rcx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21353
testq %rax, %rax
je 0x17b4f
movq %rax, %r14
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21353
testq %rax, %rax
je 0x17b57
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0xe1c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21629
movl $0x3, %r15d
movq %r12, %r14
jmp 0x17b5d
movl $0x6, %r15d
jmp 0x17b68
movl $0x6, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21629
xorl %eax, %eax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_std_setenv:
push r15
push r14
push r12
push rbx
push rax
mov r15, r8
mov rbx, rdi
mov rdx, [r8]
mov rcx, [r8+8]
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_17B4F
mov r14, rax
mov rdx, [r15+10h]
mov rcx, [r15+18h]
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_17B57
mov r12, rax
mov rdi, r14
mov rsi, rax
mov edx, 1
call _setenv
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov r15d, 3
mov r14, r12
jmp short loc_17B5D
loc_17B4F:
mov r15d, 6
jmp short loc_17B68
loc_17B57:
mov r15d, 6
loc_17B5D:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
loc_17B68:
xor eax, eax
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_std_setenv(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v6; // rax
long long v7; // r14
long long v8; // rax
long long v9; // r12
v6 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL);
if ( v6 )
{
v7 = v6;
v8 = JS_ToCStringLen2(a1, 0LL, a5[2], a5[3], 0LL);
if ( v8 )
{
v9 = v8;
setenv(v7, v8, 1LL);
JS_FreeCString(a1, v7);
v7 = v9;
}
JS_FreeCString(a1, v7);
}
return 0LL;
}
| js_std_setenv:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,R8
MOV RBX,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00121353
TEST RAX,RAX
JZ 0x00117b4f
MOV R14,RAX
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00121353
TEST RAX,RAX
JZ 0x00117b57
MOV R12,RAX
MOV RDI,R14
MOV RSI,RAX
MOV EDX,0x1
CALL 0x0010e1c0
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121629
MOV R15D,0x3
MOV R14,R12
JMP 0x00117b5d
LAB_00117b4f:
MOV R15D,0x6
JMP 0x00117b68
LAB_00117b57:
MOV R15D,0x6
LAB_00117b5d:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121629
LAB_00117b68:
XOR EAX,EAX
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] js_std_setenv(int8 param_1)
{
int1 auVar1 [16];
char *__name;
char *__value;
int8 *in_R8;
ulong uVar2;
__name = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0);
if (__name == (char *)0x0) {
uVar2 = 6;
}
else {
__value = (char *)JS_ToCStringLen2(param_1,0,in_R8[2],in_R8[3],0);
if (__value == (char *)0x0) {
uVar2 = 6;
}
else {
setenv(__name,__value,1);
JS_FreeCString(param_1,__name);
uVar2 = 3;
__name = __value;
}
JS_FreeCString(param_1,__name);
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
return auVar1 << 0x40;
}
| |
22,767 | my_charset_is_8bit_pure_ascii | eloqsql/strings/ctype-simple.c | static my_bool
my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
{
size_t code;
if (!cs->tab_to_uni)
return 0;
for (code= 0; code < 256; code++)
{
if (cs->tab_to_uni[code] > 0x7F)
return 0;
}
return 1;
} | O0 | c | my_charset_is_8bit_pure_ascii:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x456c9
movb $0x0, -0x1(%rbp)
jmp 0x4570a
movq $0x0, -0x18(%rbp)
cmpq $0x100, -0x18(%rbp) # imm = 0x100
jae 0x45706
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x7f, %eax
jle 0x456f6
movb $0x0, -0x1(%rbp)
jmp 0x4570a
jmp 0x456f8
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x456d1
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
| my_charset_is_8bit_pure_ascii:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_456C9
mov [rbp+var_1], 0
jmp short loc_4570A
loc_456C9:
mov [rbp+var_18], 0
loc_456D1:
cmp [rbp+var_18], 100h
jnb short loc_45706
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
movzx eax, word ptr [rax+rcx*2]
cmp eax, 7Fh
jle short loc_456F6
mov [rbp+var_1], 0
jmp short loc_4570A
loc_456F6:
jmp short $+2
loc_456F8:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_456D1
loc_45706:
mov [rbp+var_1], 1
loc_4570A:
mov al, [rbp+var_1]
pop rbp
retn
| char my_charset_is_8bit_pure_ascii(long long a1)
{
unsigned long long i; // [rsp+0h] [rbp-18h]
if ( !*(_QWORD *)(a1 + 104) )
return 0;
for ( i = 0LL; i < 0x100; ++i )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu )
return 0;
}
return 1;
}
| my_charset_is_8bit_pure_ascii:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x001456c9
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014570a
LAB_001456c9:
MOV qword ptr [RBP + -0x18],0x0
LAB_001456d1:
CMP qword ptr [RBP + -0x18],0x100
JNC 0x00145706
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,0x7f
JLE 0x001456f6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014570a
LAB_001456f6:
JMP 0x001456f8
LAB_001456f8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001456d1
LAB_00145706:
MOV byte ptr [RBP + -0x1],0x1
LAB_0014570a:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 my_charset_is_8bit_pure_ascii(long param_1)
{
ulong local_20;
int1 local_9;
if (*(long *)(param_1 + 0x68) == 0) {
local_9 = 0;
}
else {
for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) {
if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) {
return 0;
}
}
local_9 = 1;
}
return local_9;
}
| |
22,768 | fs_get_cache_directory[abi:cxx11]() | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_directory() {
std::string cache_directory = "";
auto ensure_trailing_slash = [](std::string p) {
// Make sure to add trailing slash
if (p.back() != DIRECTORY_SEPARATOR) {
p += DIRECTORY_SEPARATOR;
}
return p;
};
if (getenv("LLAMA_CACHE")) {
cache_directory = std::getenv("LLAMA_CACHE");
} else {
#ifdef __linux__
if (std::getenv("XDG_CACHE_HOME")) {
cache_directory = std::getenv("XDG_CACHE_HOME");
} else {
cache_directory = std::getenv("HOME") + std::string("/.cache/");
}
#elif defined(__APPLE__)
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
#elif defined(_WIN32)
cache_directory = std::getenv("LOCALAPPDATA");
#endif // __linux__
cache_directory = ensure_trailing_slash(cache_directory);
cache_directory += "llama.cpp";
}
return ensure_trailing_slash(cache_directory);
} | O0 | cpp | fs_get_cache_directory[abi:cxx11]():
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x120(%rsp)
leaq 0xff(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x5b260
movq 0x38(%rsp), %rdx
leaq 0x11715d(%rip), %rsi # 0x20d087
leaq 0x100(%rsp), %rdi
callq 0x66cc0
jmp 0xf5f39
leaq 0xff(%rsp), %rdi
callq 0x5b6d0
leaq 0x121603(%rip), %rdi # 0x217550
callq 0x5ae50
cmpq $0x0, %rax
je 0xf5fba
leaq 0x1215f1(%rip), %rdi # 0x217550
callq 0x5ae50
movq %rax, %rsi
leaq 0x100(%rsp), %rdi
callq 0x5a750
jmp 0xf5f76
jmp 0xf6168
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xff(%rsp), %rdi
callq 0x5b6d0
jmp 0xf61e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0xf61d7
leaq 0x12159b(%rip), %rdi # 0x21755c
callq 0x5ae50
cmpq $0x0, %rax
je 0xf5fef
leaq 0x121589(%rip), %rdi # 0x21755c
callq 0x5ae50
movq %rax, %rsi
leaq 0x100(%rsp), %rdi
callq 0x5a750
jmp 0xf5fea
jmp 0xf60d0
leaq 0x121570(%rip), %rdi # 0x217566
callq 0x5ae50
movq %rax, 0x18(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5b260
movq 0x20(%rsp), %rdx
leaq 0x12154d(%rip), %rsi # 0x21756b
leaq 0xa8(%rsp), %rdi
callq 0x66cc0
jmp 0xf602d
movq 0x18(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0xfee80
jmp 0xf6049
leaq 0x100(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x5a9e0
leaq 0xc8(%rsp), %rdi
callq 0x5b6f8
leaq 0xa8(%rsp), %rdi
callq 0x5b6f8
leaq 0xa7(%rsp), %rdi
callq 0x5b6d0
jmp 0xf60d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0xf60be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x5b6f8
leaq 0xa7(%rsp), %rdi
callq 0x5b6d0
jmp 0xf61d7
leaq 0x60(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x5a210
jmp 0xf60e4
leaq 0x80(%rsp), %rdi
leaq 0xeb(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0xf6200
jmp 0xf6100
leaq 0x100(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x80(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x5a9e0
movq 0x8(%rsp), %rdi
callq 0x5b6f8
leaq 0x60(%rsp), %rdi
callq 0x5b6f8
movq 0x10(%rsp), %rdi
leaq 0x121435(%rip), %rsi # 0x217574
callq 0x5a260
jmp 0xf6146
jmp 0xf6168
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5b6f8
jmp 0xf61d7
leaq 0x40(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x5a210
jmp 0xf617c
movq 0x28(%rsp), %rdi
leaq 0xeb(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0xf6200
jmp 0xf6195
leaq 0x40(%rsp), %rdi
callq 0x5b6f8
leaq 0x100(%rsp), %rdi
callq 0x5b6f8
movq 0x30(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x5b6f8
leaq 0x100(%rsp), %rdi
callq 0x5b6f8
movq 0xf0(%rsp), %rdi
callq 0x5ac70
nopw %cs:(%rax,%rax)
| _Z22fs_get_cache_directoryB5cxx11v:
sub rsp, 128h
mov [rsp+128h+var_100], rdi
mov rax, rdi
mov [rsp+128h+var_F8], rax
mov [rsp+128h+var_8], rdi
lea rdi, [rsp+128h+var_29]
mov [rsp+128h+var_F0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+128h+var_F0]
lea rsi, asc_20D079+0Eh; ""
lea rdi, [rsp+128h+var_28]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_F5F39:
lea rdi, [rsp+128h+var_29]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, aLlamaCache; "LLAMA_CACHE"
call _getenv
cmp rax, 0
jz short loc_F5FBA
lea rdi, aLlamaCache; "LLAMA_CACHE"
call _getenv
mov rsi, rax
lea rdi, [rsp+128h+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_F5F76:
jmp loc_F6168
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
lea rdi, [rsp+arg_F7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_F61E4
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
jmp loc_F61D7
loc_F5FBA:
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
cmp rax, 0
jz short loc_F5FEF
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
mov rsi, rax
lea rdi, [rsp+128h+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_F5FEA:
jmp loc_F60D0
loc_F5FEF:
lea rdi, aXdgCacheHome+0Ah; "HOME"
call _getenv
mov [rsp+128h+var_110], rax
lea rdi, [rsp+128h+var_81]
mov [rsp+128h+var_108], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+128h+var_108]
lea rsi, aCache; "/.cache/"
lea rdi, [rsp+128h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_F602D:
mov rsi, [rsp+128h+var_110]
lea rdi, [rsp+128h+var_60]
lea rdx, [rsp+128h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_F6049:
lea rdi, [rsp+128h+var_28]
lea rsi, [rsp+128h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+128h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_F60D0
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
jmp short loc_F60BE
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F60BE:
lea rdi, [rsp+arg_9F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_F61D7
loc_F60D0:
lea rdi, [rsp+128h+var_C8]
lea rsi, [rsp+128h+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_F60E4:
lea rdi, [rsp+128h+var_A8]
lea rsi, [rsp+128h+var_3D]
lea rdx, [rsp+128h+var_C8]
call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string)
jmp short $+2
loc_F6100:
lea rdi, [rsp+128h+var_28]
mov [rsp+128h+var_118], rdi
lea rsi, [rsp+128h+var_A8]
mov [rsp+128h+var_120], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+128h+var_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+128h+var_118]
lea rsi, aLlamaCpp; "llama.cpp"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_F6146:
jmp short loc_F6168
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_F61D7
loc_F6168:
lea rdi, [rsp+128h+var_E8]
lea rsi, [rsp+128h+var_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_F617C:
mov rdi, [rsp+128h+var_100]
lea rsi, [rsp+128h+var_3D]
lea rdx, [rsp+128h+var_E8]
call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string)
jmp short $+2
loc_F6195:
lea rdi, [rsp+128h+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+128h+var_F8]
add rsp, 128h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F61D7:
lea rdi, [rsp+arg_F8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F61E4:
mov rdi, [rsp+arg_E8]
call __Unwind_Resume
| long long fs_get_cache_directory[abi:cxx11](long long a1)
{
long long v1; // rax
long long v2; // rax
long long v4; // [rsp+18h] [rbp-110h]
_BYTE v5[32]; // [rsp+40h] [rbp-E8h] BYREF
_BYTE v6[32]; // [rsp+60h] [rbp-C8h] BYREF
_BYTE v7[39]; // [rsp+80h] [rbp-A8h] BYREF
char v8; // [rsp+A7h] [rbp-81h] BYREF
_BYTE v9[32]; // [rsp+A8h] [rbp-80h] BYREF
_BYTE v10[35]; // [rsp+C8h] [rbp-60h] BYREF
_BYTE v11[20]; // [rsp+EBh] [rbp-3Dh] BYREF
char v12; // [rsp+FFh] [rbp-29h] BYREF
_BYTE v13[32]; // [rsp+100h] [rbp-28h] BYREF
long long v14; // [rsp+120h] [rbp-8h]
v14 = a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v13, (long long)"", (long long)&v12);
std::allocator<char>::~allocator(&v12);
if ( getenv("LLAMA_CACHE") )
{
v1 = getenv("LLAMA_CACHE");
std::string::operator=(v13, v1);
}
else
{
if ( getenv("XDG_CACHE_HOME") )
{
v2 = getenv("XDG_CACHE_HOME");
std::string::operator=(v13, v2);
}
else
{
v4 = getenv("HOME");
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"/.cache/", (long long)&v8);
std::operator+<char>(v10, v4, v9);
std::string::operator=(v13, v10);
std::string::~string(v10);
std::string::~string(v9);
std::allocator<char>::~allocator(&v8);
}
std::string::basic_string(v6, v13);
fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(v7, v11, v6);
std::string::operator=(v13, v7);
std::string::~string(v7);
std::string::~string(v6);
std::string::operator+=(v13, "llama.cpp");
}
std::string::basic_string(v5, v13);
fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(a1, v11, v5);
std::string::~string(v5);
std::string::~string(v13);
return a1;
}
| fs_get_cache_directory[abi:cxx11]:
SUB RSP,0x128
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x120],RDI
LEA RDI,[RSP + 0xff]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x0015b260
MOV RDX,qword ptr [RSP + 0x38]
LAB_001f5f23:
LEA RSI,[0x30d087]
LEA RDI,[RSP + 0x100]
CALL 0x00166cc0
JMP 0x001f5f39
LAB_001f5f39:
LEA RDI,[RSP + 0xff]
CALL 0x0015b6d0
LEA RDI,[0x317550]
CALL 0x0015ae50
CMP RAX,0x0
JZ 0x001f5fba
LEA RDI,[0x317550]
CALL 0x0015ae50
MOV RSI,RAX
LAB_001f5f67:
LEA RDI,[RSP + 0x100]
CALL 0x0015a750
JMP 0x001f5f76
LAB_001f5f76:
JMP 0x001f6168
LAB_001f5fba:
LEA RDI,[0x31755c]
CALL 0x0015ae50
CMP RAX,0x0
JZ 0x001f5fef
LEA RDI,[0x31755c]
CALL 0x0015ae50
MOV RSI,RAX
LEA RDI,[RSP + 0x100]
CALL 0x0015a750
JMP 0x001f5fea
LAB_001f5fea:
JMP 0x001f60d0
LAB_001f5fef:
LEA RDI,[0x317566]
CALL 0x0015ae50
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0xa7]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x0015b260
MOV RDX,qword ptr [RSP + 0x20]
LAB_001f6017:
LEA RSI,[0x31756b]
LEA RDI,[RSP + 0xa8]
CALL 0x00166cc0
JMP 0x001f602d
LAB_001f602d:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0xc8]
LEA RDX,[RSP + 0xa8]
CALL 0x001fee80
JMP 0x001f6049
LAB_001f6049:
LEA RDI,[RSP + 0x100]
LEA RSI,[RSP + 0xc8]
CALL 0x0015a9e0
LEA RDI,[RSP + 0xc8]
CALL 0x0015b6f8
LEA RDI,[RSP + 0xa8]
CALL 0x0015b6f8
LEA RDI,[RSP + 0xa7]
CALL 0x0015b6d0
JMP 0x001f60d0
LAB_001f60d0:
LEA RDI,[RSP + 0x60]
LEA RSI,[RSP + 0x100]
CALL 0x0015a210
JMP 0x001f60e4
LAB_001f60e4:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0xeb]
LEA RDX,[RSP + 0x60]
CALL 0x001f6200
JMP 0x001f6100
LAB_001f6100:
LEA RDI,[RSP + 0x100]
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[RSP + 0x80]
MOV qword ptr [RSP + 0x8],RSI
CALL 0x0015a9e0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0015b6f8
LEA RDI,[RSP + 0x60]
CALL 0x0015b6f8
MOV RDI,qword ptr [RSP + 0x10]
LAB_001f6138:
LEA RSI,[0x317574]
CALL 0x0015a260
JMP 0x001f6146
LAB_001f6146:
JMP 0x001f6168
LAB_001f6168:
LEA RDI,[RSP + 0x40]
LEA RSI,[RSP + 0x100]
CALL 0x0015a210
JMP 0x001f617c
LAB_001f617c:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0xeb]
LEA RDX,[RSP + 0x40]
CALL 0x001f6200
LAB_001f6193:
JMP 0x001f6195
LAB_001f6195:
LEA RDI,[RSP + 0x40]
CALL 0x0015b6f8
LEA RDI,[RSP + 0x100]
CALL 0x0015b6f8
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x128
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* fs_get_cache_directory[abi:cxx11]() */
__0 * fs_get_cache_directory_abi_cxx11_(void)
{
char *pcVar1;
string *psVar2;
__0 *in_RDI;
string local_e8 [32];
string local_c8 [32];
__0 local_a8 [39];
allocator local_81;
string local_80 [32];
string local_60 [35];
int1 local_3d [20];
allocator local_29;
string local_28 [40];
std::allocator<char>::allocator();
/* try { // try from 001f5f23 to 001f5f36 has its CatchHandler @ 001f5f7b */
std::__cxx11::string::string<std::allocator<char>>(local_28,"",&local_29);
std::allocator<char>::~allocator((allocator<char> *)&local_29);
pcVar1 = getenv("LLAMA_CACHE");
if (pcVar1 == (char *)0x0) {
pcVar1 = getenv("XDG_CACHE_HOME");
if (pcVar1 == (char *)0x0) {
psVar2 = (string *)getenv("HOME");
std::allocator<char>::allocator();
/* try { // try from 001f6017 to 001f602a has its CatchHandler @ 001f6087 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"/.cache/",&local_81);
/* try { // try from 001f602d to 001f6046 has its CatchHandler @ 001f609d */
std::operator+((char *)local_60,psVar2);
std::__cxx11::string::operator=(local_28,local_60);
std::__cxx11::string::~string(local_60);
std::__cxx11::string::~string(local_80);
std::allocator<char>::~allocator((allocator<char> *)&local_81);
}
else {
pcVar1 = getenv("XDG_CACHE_HOME");
std::__cxx11::string::operator=(local_28,pcVar1);
}
/* try { // try from 001f60d0 to 001f60e1 has its CatchHandler @ 001f5fa1 */
std::__cxx11::string::string(local_c8,local_28);
/* try { // try from 001f60e4 to 001f60fd has its CatchHandler @ 001f6148 */
fs_get_cache_directory[abi:cxx11]()::$_0::operator()(local_a8,local_3d,local_c8);
std::__cxx11::string::operator=(local_28,(string *)local_a8);
std::__cxx11::string::~string((string *)local_a8);
std::__cxx11::string::~string(local_c8);
/* try { // try from 001f6138 to 001f6179 has its CatchHandler @ 001f5fa1 */
std::__cxx11::string::operator+=(local_28,"llama.cpp");
}
else {
pcVar1 = getenv("LLAMA_CACHE");
/* try { // try from 001f5f67 to 001f5fe7 has its CatchHandler @ 001f5fa1 */
std::__cxx11::string::operator=(local_28,pcVar1);
}
std::__cxx11::string::string(local_e8,local_28);
/* try { // try from 001f617c to 001f6192 has its CatchHandler @ 001f61b9 */
fs_get_cache_directory[abi:cxx11]()::$_0::operator()(in_RDI,local_3d,local_e8);
std::__cxx11::string::~string(local_e8);
std::__cxx11::string::~string(local_28);
return in_RDI;
}
| |
22,769 | fs_get_cache_directory[abi:cxx11]() | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_directory() {
std::string cache_directory = "";
auto ensure_trailing_slash = [](std::string p) {
// Make sure to add trailing slash
if (p.back() != DIRECTORY_SEPARATOR) {
p += DIRECTORY_SEPARATOR;
}
return p;
};
if (getenv("LLAMA_CACHE")) {
cache_directory = std::getenv("LLAMA_CACHE");
} else {
#ifdef __linux__
if (std::getenv("XDG_CACHE_HOME")) {
cache_directory = std::getenv("XDG_CACHE_HOME");
} else {
cache_directory = std::getenv("HOME") + std::string("/.cache/");
}
#elif defined(__APPLE__)
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
#elif defined(_WIN32)
cache_directory = std::getenv("LOCALAPPDATA");
#endif // __linux__
cache_directory = ensure_trailing_slash(cache_directory);
cache_directory += "llama.cpp";
}
return ensure_trailing_slash(cache_directory);
} | O2 | cpp | fs_get_cache_directory[abi:cxx11]():
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
leaq 0x54fc6(%rip), %rsi # 0xad143
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x29c20
leaq 0x5e9c5(%rip), %rdi # 0xb6b58
callq 0x23b40
testq %rax, %rax
je 0x581af
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x24270
jmp 0x58287
leaq 0x5e9ae(%rip), %rdi # 0xb6b64
callq 0x23b40
testq %rax, %rax
je 0x581cf
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x24270
jmp 0x58233
leaq 0x5e998(%rip), %rdi # 0xb6b6e
callq 0x23b40
movq %rax, %r14
leaq 0x5e98e(%rip), %rsi # 0xb6b73
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x29c20
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r14, %rsi
callq 0x5bb8a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0x23b60
movq %r14, %rdi
callq 0x24348
leaq 0x90(%rsp), %rdi
callq 0x24348
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x23cd0
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x58306
leaq 0x10(%rsp), %r14
leaq 0x30(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x23b60
movq %r15, %rdi
callq 0x24348
leaq 0x70(%rsp), %rdi
callq 0x24348
leaq 0x5e8fd(%rip), %rsi # 0xb6b7c
movq %r14, %rdi
callq 0x24260
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x23cd0
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x58306
leaq 0x50(%rsp), %rdi
callq 0x24348
leaq 0x10(%rsp), %rdi
callq 0x24348
movq %rbx, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x582ea
jmp 0x582f1
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x582ea
jmp 0x582f1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x24348
jmp 0x582f4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x24348
movq %rbx, %rdi
callq 0x240e0
| _Z22fs_get_cache_directoryB5cxx11v:
push r15
push r14
push rbx
sub rsp, 0B0h
mov rbx, rdi
lea rsi, asc_AD135+0Eh; ""
lea rdi, [rsp+0C8h+var_B8]
lea rdx, [rsp+0C8h+var_98]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, aLlamaCache; "LLAMA_CACHE"
call _getenv
test rax, rax
jz short loc_581AF
lea rdi, [rsp+0C8h+var_B8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
jmp loc_58287
loc_581AF:
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
test rax, rax
jz short loc_581CF
lea rdi, [rsp+0C8h+var_B8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
jmp short loc_58233
loc_581CF:
lea rdi, aXdgCacheHome+0Ah; "HOME"
call _getenv
mov r14, rax
lea rsi, aCache; "/.cache/"
lea rdi, [rsp+0C8h+var_38]
lea rdx, [rsp+0C8h+var_B9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0C8h+var_98]
lea rdx, [rsp+0C8h+var_38]
mov rsi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdi, [rsp+0C8h+var_B8]
lea r14, [rsp+0C8h+var_98]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_58233:
lea rdi, [rsp+0C8h+var_58]
lea rsi, [rsp+0C8h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea rdi, [rsp+0C8h+var_98]
lea rsi, [rsp+0C8h+var_58]
call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string)
lea r14, [rsp+0C8h+var_B8]
lea r15, [rsp+0C8h+var_98]
mov rdi, r14
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aLlamaCpp; "llama.cpp"
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_58287:
lea rdi, [rsp+0C8h+var_78]
lea rsi, [rsp+0C8h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea rsi, [rsp+0C8h+var_78]
mov rdi, rbx
call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string)
lea rdi, [rsp+0C8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0B0h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_88]
jmp short loc_582EA
jmp short loc_582F1
mov rbx, rax
lea rdi, [rsp+arg_68]
jmp short loc_582EA
jmp short loc_582F1
mov rbx, rax
lea rdi, [rsp+arg_48]; void *
loc_582EA:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_582F4
loc_582F1:
mov rbx, rax
loc_582F4:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long fs_get_cache_directory[abi:cxx11](long long a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // r14
_QWORD v5[4]; // [rsp+10h] [rbp-B8h] BYREF
_BYTE v6[32]; // [rsp+30h] [rbp-98h] BYREF
_BYTE v7[32]; // [rsp+50h] [rbp-78h] BYREF
_BYTE v8[32]; // [rsp+70h] [rbp-58h] BYREF
_QWORD v9[7]; // [rsp+90h] [rbp-38h] BYREF
std::string::basic_string<std::allocator<char>>(v5, (long long)"");
v1 = getenv("LLAMA_CACHE");
if ( v1 )
{
std::string::assign(v5, v1);
}
else
{
v2 = getenv("XDG_CACHE_HOME");
if ( v2 )
{
std::string::assign(v5, v2);
}
else
{
v3 = getenv("HOME");
std::string::basic_string<std::allocator<char>>(v9, (long long)"/.cache/");
std::operator+<char>(v6, v3, v9);
std::string::operator=(v5, v6);
std::string::~string(v6);
std::string::~string(v9);
}
std::string::basic_string(v8, v5);
fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(v6, v8);
std::string::operator=(v5, v6);
std::string::~string(v6);
std::string::~string(v8);
std::string::append(v5, "llama.cpp");
}
std::string::basic_string(v7, v5);
fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(a1, v7);
std::string::~string(v7);
std::string::~string(v5);
return a1;
}
| fs_get_cache_directory[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xb0
MOV RBX,RDI
LEA RSI,[0x1ad143]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
CALL 0x00129c20
LEA RDI,[0x1b6b58]
CALL 0x00123b40
TEST RAX,RAX
JZ 0x001581af
LAB_0015819d:
LEA RDI,[RSP + 0x10]
MOV RSI,RAX
CALL 0x00124270
JMP 0x00158287
LAB_001581af:
LEA RDI,[0x1b6b64]
CALL 0x00123b40
TEST RAX,RAX
JZ 0x001581cf
LEA RDI,[RSP + 0x10]
MOV RSI,RAX
CALL 0x00124270
JMP 0x00158233
LAB_001581cf:
LEA RDI,[0x1b6b6e]
CALL 0x00123b40
MOV R14,RAX
LAB_001581de:
LEA RSI,[0x1b6b73]
LEA RDI,[RSP + 0x90]
LEA RDX,[RSP + 0xf]
CALL 0x00129c20
LAB_001581f7:
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x90]
MOV RSI,R14
CALL 0x0015bb8a
LEA RDI,[RSP + 0x10]
LEA R14,[RSP + 0x30]
MOV RSI,R14
CALL 0x00123b60
MOV RDI,R14
CALL 0x00124348
LEA RDI,[RSP + 0x90]
CALL 0x00124348
LAB_00158233:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x10]
CALL 0x00123cd0
LAB_00158242:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x70]
CALL 0x00158306
LEA R14,[RSP + 0x10]
LEA R15,[RSP + 0x30]
MOV RDI,R14
MOV RSI,R15
CALL 0x00123b60
MOV RDI,R15
CALL 0x00124348
LEA RDI,[RSP + 0x70]
CALL 0x00124348
LAB_00158278:
LEA RSI,[0x1b6b7c]
MOV RDI,R14
CALL 0x00124260
LAB_00158287:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x10]
CALL 0x00123cd0
LAB_00158296:
LEA RSI,[RSP + 0x50]
MOV RDI,RBX
CALL 0x00158306
LAB_001582a3:
LEA RDI,[RSP + 0x50]
CALL 0x00124348
LEA RDI,[RSP + 0x10]
CALL 0x00124348
MOV RAX,RBX
ADD RSP,0xb0
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* fs_get_cache_directory[abi:cxx11]() */
void fs_get_cache_directory_abi_cxx11_(void)
{
char *pcVar1;
string *psVar2;
allocator local_b9;
string local_b8 [32];
allocator local_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [32];
std::__cxx11::string::string<std::allocator<char>>(local_b8,"",local_98);
pcVar1 = getenv("LLAMA_CACHE");
if (pcVar1 == (char *)0x0) {
pcVar1 = getenv("XDG_CACHE_HOME");
if (pcVar1 == (char *)0x0) {
psVar2 = (string *)getenv("HOME");
/* try { // try from 001581de to 001581f6 has its CatchHandler @ 001582d4 */
std::__cxx11::string::string<std::allocator<char>>(local_38,"/.cache/",&local_b9);
/* try { // try from 001581f7 to 0015820b has its CatchHandler @ 001582c7 */
std::operator+((char *)local_98,psVar2);
std::__cxx11::string::operator=(local_b8,(string *)local_98);
std::__cxx11::string::~string((string *)local_98);
std::__cxx11::string::~string(local_38);
}
else {
std::__cxx11::string::assign((char *)local_b8);
}
/* try { // try from 00158233 to 00158241 has its CatchHandler @ 001582e0 */
std::__cxx11::string::string(local_58,local_b8);
/* try { // try from 00158242 to 00158250 has its CatchHandler @ 001582d6 */
fs_get_cache_directory[abi:cxx11]()::$_0::operator()((__0 *)local_98,local_58);
std::__cxx11::string::operator=(local_b8,(string *)local_98);
std::__cxx11::string::~string((string *)local_98);
std::__cxx11::string::~string(local_58);
/* try { // try from 00158278 to 00158295 has its CatchHandler @ 001582f1 */
std::__cxx11::string::append((char *)local_b8);
}
else {
/* try { // try from 0015819d to 001581cc has its CatchHandler @ 001582f1 */
std::__cxx11::string::assign((char *)local_b8);
}
std::__cxx11::string::string(local_78,local_b8);
/* try { // try from 00158296 to 001582a2 has its CatchHandler @ 001582e2 */
fs_get_cache_directory[abi:cxx11]()::$_0::operator()();
std::__cxx11::string::~string(local_78);
std::__cxx11::string::~string(local_b8);
return;
}
| |
22,770 | wt_thd_lazy_init | eloqsql/mysys/waiting_threads.c | void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts,
const ulong *dl, const ulong *tl)
{
DBUG_ENTER("wt_thd_lazy_init");
thd->waiting_for= 0;
thd->weight= 0;
thd->deadlock_search_depth_short= ds;
thd->timeout_short= ts;
thd->deadlock_search_depth_long= dl;
thd->timeout_long= tl;
/* dynamic array is also initialized lazily - without memory allocations */
my_init_dynamic_array(PSI_INSTRUMENT_ME, &thd->my_resources,
sizeof(WT_RESOURCE *), 0, 5, MYF(0));
#ifndef DBUG_OFF
thd->name= my_thread_name();
#endif
DBUG_VOID_RETURN;
} | O3 | c | wt_thd_lazy_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
xorl %edi, %edi
movq %rdi, 0x28(%rax)
movq %rdi, 0x58(%rax)
movq %rsi, 0x40(%rax)
movq %rdx, 0x38(%rax)
movq %rcx, 0x50(%rax)
movq %r8, 0x48(%rax)
movq %rdi, (%rsp)
xorl %edi, %edi
movq %rax, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x5, %r9d
callq 0x97a10
addq $0x10, %rsp
popq %rbp
retq
| wt_thd_lazy_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, rdi
xor edi, edi
mov [rax+28h], rdi
mov [rax+58h], rdi
mov [rax+40h], rsi
mov [rax+38h], rdx
mov [rax+50h], rcx
mov [rax+48h], r8
mov [rsp+10h+var_10], rdi
xor edi, edi
mov rsi, rax
mov edx, 8
xor ecx, ecx
xor r8d, r8d
mov r9d, 5
call init_dynamic_array2
add rsp, 10h
pop rbp
retn
| long long wt_thd_lazy_init(_QWORD *a1, long long a2, long long a3, long long a4, long long a5)
{
a1[5] = 0LL;
a1[11] = 0LL;
a1[8] = a2;
a1[7] = a3;
a1[10] = a4;
a1[9] = a5;
return init_dynamic_array2(0LL, (long long)a1, 8u, 0LL, 0, 5u, 0LL);
}
| wt_thd_lazy_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,RDI
XOR EDI,EDI
MOV qword ptr [RAX + 0x28],RDI
MOV qword ptr [RAX + 0x58],RDI
MOV qword ptr [RAX + 0x40],RSI
MOV qword ptr [RAX + 0x38],RDX
MOV qword ptr [RAX + 0x50],RCX
MOV qword ptr [RAX + 0x48],R8
MOV qword ptr [RSP],RDI
XOR EDI,EDI
MOV RSI,RAX
MOV EDX,0x8
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x5
CALL 0x00197a10
ADD RSP,0x10
POP RBP
RET
|
void wt_thd_lazy_init(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x40) = param_2;
*(int8 *)(param_1 + 0x38) = param_3;
*(int8 *)(param_1 + 0x50) = param_4;
*(int8 *)(param_1 + 0x48) = param_5;
init_dynamic_array2(0,param_1,8,0,0,5,0);
return;
}
| |
22,771 | 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 (&) [32], char const*>(char const (&) [32], 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 (&) [32], char const*>(char const (&) [32], 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 0x1b3e0
movq %rax, %r12
movq (%r14), %rdi
callq 0x1b3e0
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1bda0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c120
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x1c120
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0xe8550
movq (%r13), %rsi
incq %rsi
callq 0x1b900
movq %r14, %rdi
callq 0x1bfc0
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_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_E8550
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E8550:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],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(&)[32],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 0x0011b3e0
MOV R12,RAX
MOV RDI,qword ptr [R14]
CALL 0x0011b3e0
ADD R12,RAX
LAB_001e850b:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011bda0
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c120
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x0011c120
LAB_001e852c:
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
(&) [32], char const*>(char const (&) [32], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],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 001e850b to 001e852b has its CatchHandler @ 001e8539 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::append((char *)this);
return this;
}
| |
22,772 | 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>::operator[]<char const>(char const*) const | monkey531[P]llama/common/json.hpp | const_reference operator[](T* key) const
{
return operator[](typename object_t::key_type(key));
} | O1 | 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>::operator[]<char const>(char const*) const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x6531e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb153a
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xab247
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xab270
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rdi
callq 0x1bff0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&)
mov rbx, rax
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AB247
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AB247:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AB270
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AB270:
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
long long a1,
_BYTE *a2)
{
long long v2; // rbx
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
std::string::basic_string<std::allocator<char>>(v4, a2);
v2 = 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[](
a1,
v4);
if ( v4[0] != &v5 )
operator delete(v4[0], v5 + 1);
return v2;
}
| operator[]<char_const>:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x0016531e
LAB_001ab21e:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b153a
LAB_001ab229:
MOV RBX,RAX
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ab247
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_001ab247:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
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> 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>::operator[]<char const>(char const*) const */
basic_json * __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[]<char_const>
(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,char *param_1)
{
basic_json *pbVar1;
allocator local_31;
long *local_30 [2];
long local_20 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 001ab21e to 001ab228 has its CatchHandler @ 001ab252 */
pbVar1 = (basic_json *)operator[](this,(string *)local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return pbVar1;
}
| |
22,773 | 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>::operator[]<char const>(char const*) const | monkey531[P]llama/common/json.hpp | const_reference operator[](T* key) const
{
return operator[](typename object_t::key_type(key));
} | 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>::operator[]<char const>(char const*) const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x65cd2
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb0bca
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaaa75
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaaa9e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
movq %rbx, %rdi
callq 0x1bff0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&)
mov rbx, rax
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AAA75
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AAA75:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AAA9E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AAA9E:
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
long long a1,
_BYTE *a2)
{
long long v2; // rbx
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
std::string::basic_string<std::allocator<char>>(v4, a2);
v2 = 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[](
a1,
v4);
if ( v4[0] != &v5 )
operator delete(v4[0], v5 + 1);
return v2;
}
| operator[]<char_const>:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x00165cd2
LAB_001aaa4c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b0bca
LAB_001aaa57:
MOV RBX,RAX
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001aaa75
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_001aaa75:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
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> 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>::operator[]<char const>(char const*) const */
basic_json * __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[]<char_const>
(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,char *param_1)
{
basic_json *pbVar1;
allocator local_31;
long *local_30 [2];
long local_20 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 001aaa4c to 001aaa56 has its CatchHandler @ 001aaa80 */
pbVar1 = (basic_json *)operator[](this,(string *)local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return pbVar1;
}
| |
22,774 | trnman_destroy | eloqsql/storage/maria/trnman.c | void trnman_destroy()
{
DBUG_ENTER("trnman_destroy");
if (short_trid_to_active_trn == NULL) /* trnman already destroyed */
DBUG_VOID_RETURN;
DBUG_ASSERT(trid_to_trn.count == 0);
DBUG_ASSERT(trnman_active_transactions == 0);
DBUG_ASSERT(trnman_committed_transactions == 0);
DBUG_ASSERT(active_list_max.prev == &active_list_min);
DBUG_ASSERT(active_list_min.next == &active_list_max);
DBUG_ASSERT(committed_list_max.prev == &committed_list_min);
DBUG_ASSERT(committed_list_min.next == &committed_list_max);
while (pool)
{
TRN *trn= pool;
pool= pool->next;
DBUG_ASSERT(trn->wt == NULL);
mysql_mutex_destroy(&trn->state_lock);
my_free(trn);
}
lf_hash_destroy(&trid_to_trn);
DBUG_PRINT("info", ("mysql_mutex_destroy LOCK_trn_list"));
mysql_mutex_destroy(&LOCK_trn_list);
my_free(short_trid_to_active_trn+1);
short_trid_to_active_trn= NULL;
DBUG_VOID_RETURN;
} | O3 | c | trnman_destroy:
cmpq $0x0, 0x3dd807(%rip) # 0x450470
je 0x72d23
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x3ddacb(%rip), %rbx # 0x450748
testq %rbx, %rbx
je 0x72cc8
leaq 0x345f7f(%rip), %r14 # 0x3b8c08
movq 0x68(%rbx), %rax
movq %rax, 0x3ddab4(%rip) # 0x450748
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x72cab
movq (%r14), %rax
callq *0x48(%rax)
movq $0x0, 0x50(%rbx)
leaq 0x10(%rbx), %rdi
callq 0x2b0f0
movq %rbx, %rdi
callq 0xc3cfa
movq 0x3dda85(%rip), %rbx # 0x450748
testq %rbx, %rbx
jne 0x72c89
leaq 0x3dda89(%rip), %rdi # 0x450758
callq 0xca99a
movq 0x3ddb85(%rip), %rdi # 0x450860
testq %rdi, %rdi
je 0x72cf8
leaq 0x345f21(%rip), %rax # 0x3b8c08
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x3ddb68(%rip) # 0x450860
leaq 0x3ddb21(%rip), %rdi # 0x450820
callq 0x2b0f0
movq 0x3dd765(%rip), %rdi # 0x450470
addq $0x8, %rdi
callq 0xc3cfa
movq $0x0, 0x3dd751(%rip) # 0x450470
popq %rbx
popq %r14
popq %rbp
retq
| trnman_destroy:
cmp cs:short_trid_to_active_trn, 0
jz locret_72D23
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, cs:pool
test rbx, rbx
jz short loc_72CC8
lea r14, PSI_server
loc_72C89:
mov rax, [rbx+68h]
mov cs:pool, rax
mov rdi, [rbx+50h]
test rdi, rdi
jz short loc_72CAB
mov rax, [r14]
call qword ptr [rax+48h]
mov qword ptr [rbx+50h], 0
loc_72CAB:
lea rdi, [rbx+10h]
call _pthread_mutex_destroy
mov rdi, rbx
call my_free
mov rbx, cs:pool
test rbx, rbx
jnz short loc_72C89
loc_72CC8:
lea rdi, trid_to_trn
call lf_hash_destroy
mov rdi, cs:qword_450860
test rdi, rdi
jz short loc_72CF8
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov cs:qword_450860, 0
loc_72CF8:
lea rdi, LOCK_trn_list
call _pthread_mutex_destroy
mov rdi, cs:short_trid_to_active_trn
add rdi, 8
call my_free
mov cs:short_trid_to_active_trn, 0
pop rbx
pop r14
pop rbp
locret_72D23:
retn
| long long trnman_destroy()
{
long long i; // rbx
long long result; // rax
if ( short_trid_to_active_trn )
{
for ( i = pool; pool; i = pool )
{
pool = *(_QWORD *)(i + 104);
if ( *(_QWORD *)(i + 80) )
{
PSI_server[9]();
*(_QWORD *)(i + 80) = 0LL;
}
pthread_mutex_destroy(i + 16);
my_free(i);
}
lf_hash_destroy(&trid_to_trn);
if ( qword_450860 )
{
PSI_server[9]();
qword_450860 = 0LL;
}
pthread_mutex_destroy(&LOCK_trn_list);
result = my_free(short_trid_to_active_trn + 8);
short_trid_to_active_trn = 0LL;
}
return result;
}
| trnman_destroy:
CMP qword ptr [0x00550470],0x0
JZ 0x00172d23
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,qword ptr [0x00550748]
TEST RBX,RBX
JZ 0x00172cc8
LEA R14,[0x4b8c08]
LAB_00172c89:
MOV RAX,qword ptr [RBX + 0x68]
MOV qword ptr [0x00550748],RAX
MOV RDI,qword ptr [RBX + 0x50]
TEST RDI,RDI
JZ 0x00172cab
MOV RAX,qword ptr [R14]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x50],0x0
LAB_00172cab:
LEA RDI,[RBX + 0x10]
CALL 0x0012b0f0
MOV RDI,RBX
CALL 0x001c3cfa
MOV RBX,qword ptr [0x00550748]
TEST RBX,RBX
JNZ 0x00172c89
LAB_00172cc8:
LEA RDI,[0x550758]
CALL 0x001ca99a
MOV RDI,qword ptr [0x00550860]
TEST RDI,RDI
JZ 0x00172cf8
LEA RAX,[0x4b8c08]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [0x00550860],0x0
LAB_00172cf8:
LEA RDI,[0x550820]
CALL 0x0012b0f0
MOV RDI,qword ptr [0x00550470]
ADD RDI,0x8
CALL 0x001c3cfa
MOV qword ptr [0x00550470],0x0
POP RBX
POP R14
POP RBP
LAB_00172d23:
RET
|
void trnman_destroy(void)
{
long lVar1;
if (short_trid_to_active_trn != 0) {
lVar1 = pool;
if (pool != 0) {
do {
pool = *(long *)(lVar1 + 0x68);
if (*(long *)(lVar1 + 0x50) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)(lVar1 + 0x50) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(lVar1 + 0x10));
my_free(lVar1);
lVar1 = pool;
} while (pool != 0);
}
lf_hash_destroy(trid_to_trn);
if (LOCK_trn_list._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
LOCK_trn_list._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)LOCK_trn_list);
my_free(short_trid_to_active_trn + 8);
short_trid_to_active_trn = 0;
}
return;
}
| |
22,775 | pagecache_fwrite | eloqsql/storage/maria/ma_pagecache.c | static my_bool pagecache_fwrite(PAGECACHE *pagecache,
PAGECACHE_FILE *filedesc,
uchar *buffer,
pgcache_page_no_t pageno,
enum pagecache_page_type type
__attribute__((unused)),
myf flags)
{
int res;
PAGECACHE_IO_HOOK_ARGS args;
DBUG_ENTER("pagecache_fwrite");
DBUG_ASSERT(type != PAGECACHE_READ_UNKNOWN_PAGE);
#ifdef EXTRA_DEBUG_BITMAP
/*
This code is very good when debugging changes in bitmaps or dirty lists
The above define should be defined for all Aria files if you want to
debug either of the above issues.
*/
if (pagecache->extra_debug)
{
char buff[80];
uint len= my_sprintf(buff,
(buff, "fwrite: fd: %d id: %u page: %llu",
filedesc->file,
_ma_file_callback_to_id(filedesc->callback_data),
pageno));
(void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY,
(uchar*) buff, len);
}
#endif
/* initialize hooks args */
args.page= buffer;
args.pageno= pageno;
args.data= filedesc->callback_data;
/* Todo: Integrate this with write_callback so we have only one callback */
if ((*filedesc->flush_log_callback)(&args))
DBUG_RETURN(1);
DBUG_PRINT("info", ("pre_write_hook:%p data: %p",
filedesc->pre_write_hook,
filedesc->callback_data));
if ((*filedesc->pre_write_hook)(&args))
{
DBUG_PRINT("error", ("write callback problem"));
DBUG_RETURN(1);
}
#if __has_feature(memory_sanitizer) /* FIXME: encryption.aria_tiny etc. fail */
/* FIXME: ENGINE=Aria occasionally writes uninitialized data */
__msan_unpoison(args.page, pagecache->block_size);
#endif
res= (int)my_pwrite(filedesc->file, args.page, pagecache->block_size,
((my_off_t) pageno << pagecache->shift), flags);
(*filedesc->post_write_hook)(res, &args);
DBUG_RETURN(res);
} | O0 | c | pagecache_fwrite:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
jmp 0x3ed92
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
leaq -0x60(%rbp), %rdi
callq *0x38(%rax)
cmpb $0x0, %al
je 0x3edc5
jmp 0x3edbf
movb $0x1, -0x1(%rbp)
jmp 0x3ee32
jmp 0x3edc7
jmp 0x3edc9
movq -0x18(%rbp), %rax
leaq -0x60(%rbp), %rdi
callq *0x28(%rax)
cmpb $0x0, %al
je 0x3ede4
jmp 0x3edda
jmp 0x3eddc
jmp 0x3edde
movb $0x1, -0x1(%rbp)
jmp 0x3ee32
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x60(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, %edx
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x190(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x38(%rbp), %r8
callq 0xf4850
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x3c(%rbp), %edi
leaq -0x60(%rbp), %rsi
callq *%rax
movl -0x3c(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pagecache_fwrite:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
jmp short $+2
loc_3ED92:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
lea rdi, [rbp+var_60]
call qword ptr [rax+38h]
cmp al, 0
jz short loc_3EDC5
jmp short $+2
loc_3EDBF:
mov [rbp+var_1], 1
jmp short loc_3EE32
loc_3EDC5:
jmp short $+2
loc_3EDC7:
jmp short $+2
loc_3EDC9:
mov rax, [rbp+var_18]
lea rdi, [rbp+var_60]
call qword ptr [rax+28h]
cmp al, 0
jz short loc_3EDE4
jmp short $+2
loc_3EDDA:
jmp short $+2
loc_3EDDC:
jmp short $+2
loc_3EDDE:
mov [rbp+var_1], 1
jmp short loc_3EE32
loc_3EDE4:
mov rax, [rbp+var_18]
mov edi, [rax+10h]
mov rsi, [rbp+var_60]
mov rax, [rbp+var_10]
mov eax, [rax+80h]
mov edx, eax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov ecx, [rcx+190h]
shl rax, cl
mov rcx, rax
mov r8, [rbp+var_38]
call my_pwrite
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov edi, [rbp+var_3C]
lea rsi, [rbp+var_60]
call rax
mov eax, [rbp+var_3C]
mov [rbp+var_1], al
loc_3EE32:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char pagecache_fwrite(long long a1, long long a2, long long a3, long long a4, int a5, long long a6)
{
_QWORD v7[4]; // [rsp+0h] [rbp-60h] BYREF
unsigned int v8; // [rsp+24h] [rbp-3Ch]
long long v9; // [rsp+28h] [rbp-38h]
int v10; // [rsp+34h] [rbp-2Ch]
long long v11; // [rsp+38h] [rbp-28h]
long long v12; // [rsp+40h] [rbp-20h]
long long v13; // [rsp+48h] [rbp-18h]
long long v14; // [rsp+50h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
v10 = a5;
v9 = a6;
v7[0] = a3;
v7[1] = a4;
v7[2] = *(_QWORD *)(a2 + 64);
if ( (*(unsigned __int8 ( **)(_QWORD *))(a2 + 56))(v7) )
return 1;
if ( (*(unsigned __int8 ( **)(_QWORD *))(v13 + 40))(v7) )
return 1;
v8 = my_pwrite(*(unsigned int *)(v13 + 16), v7[0], *(unsigned int *)(v14 + 128), v11 << *(_DWORD *)(v14 + 400), v9);
(*(void ( **)(_QWORD, _QWORD *))(v13 + 48))(v8, v7);
return v8;
}
| pagecache_fwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
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 dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
JMP 0x0013ed92
LAB_0013ed92:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x60]
CALL qword ptr [RAX + 0x38]
CMP AL,0x0
JZ 0x0013edc5
JMP 0x0013edbf
LAB_0013edbf:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013ee32
LAB_0013edc5:
JMP 0x0013edc7
LAB_0013edc7:
JMP 0x0013edc9
LAB_0013edc9:
MOV RAX,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x60]
CALL qword ptr [RAX + 0x28]
CMP AL,0x0
JZ 0x0013ede4
JMP 0x0013edda
LAB_0013edda:
JMP 0x0013eddc
LAB_0013eddc:
JMP 0x0013edde
LAB_0013edde:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013ee32
LAB_0013ede4:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x80]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x190]
SHL RAX,CL
MOV RCX,RAX
MOV R8,qword ptr [RBP + -0x38]
CALL 0x001f4850
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV EDI,dword ptr [RBP + -0x3c]
LEA RSI,[RBP + -0x60]
CALL RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV byte ptr [RBP + -0x1],AL
LAB_0013ee32:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1
pagecache_fwrite(long param_1,long param_2,int8 param_3,long param_4,int4 param_5,
int8 param_6)
{
char cVar1;
int8 local_68;
long local_60;
int8 local_58;
int4 local_44;
int8 local_40;
int4 local_34;
long local_30;
int8 local_28;
long local_20;
long local_18;
int1 local_9;
local_58 = *(int8 *)(param_2 + 0x40);
local_68 = param_3;
local_60 = param_4;
local_40 = param_6;
local_34 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
cVar1 = (**(code **)(param_2 + 0x38))(&local_68);
if (cVar1 == '\0') {
cVar1 = (**(code **)(local_20 + 0x28))(&local_68);
if (cVar1 == '\0') {
local_44 = my_pwrite(*(int4 *)(local_20 + 0x10),local_68,
*(int4 *)(local_18 + 0x80),
local_30 << ((byte)*(int4 *)(local_18 + 400) & 0x3f),local_40);
(**(code **)(local_20 + 0x30))(local_44,&local_68);
local_9 = (int1)local_44;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
return local_9;
}
| |
22,776 | my_rw_wrlock | eloqsql/mysys/thr_rwlock.c | int my_rw_wrlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);
rwp->state = -1;
rwp->waiters--;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
pthread_mutex_unlock(&rwp->lock);
return(0);
} | O0 | c | my_rw_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x25490
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x2d078
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
movq -0x8(%rbp), %rsi
callq 0x25530
jmp 0x2d058
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x88(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rdi
callq 0x25210
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_rw_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]
mov ecx, [rax+8Ch]
add ecx, 1
mov [rax+8Ch], ecx
loc_2D058:
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0
jz short loc_2D078
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
mov rsi, [rbp+var_8]
call _pthread_cond_wait
jmp short loc_2D058
loc_2D078:
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov ecx, [rax+8Ch]
add ecx, 0FFFFFFFFh
mov [rax+8Ch], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long my_rw_wrlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 140);
while ( *(_DWORD *)(a1 + 136) )
pthread_cond_wait(a1 + 88, a1);
*(_DWORD *)(a1 + 136) = -1;
--*(_DWORD *)(a1 + 140);
pthread_mutex_unlock(a1);
return 0LL;
}
| my_rw_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00125490
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8c],ECX
LAB_0012d058:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],0x0
JZ 0x0012d078
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00125530
JMP 0x0012d058
LAB_0012d078:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x8c],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00125210
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_wrlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x8c) = *(int *)((long)param_1 + 0x8c) + 1;
while (*(int *)((long)param_1 + 0x88) != 0) {
pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1);
}
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
*(int *)((long)param_1 + 0x8c) = *(int *)((long)param_1 + 0x8c) + -1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
22,777 | sp_get_polygon_mbr | eloqsql/storage/myisam/sp_key.c | static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_linear_rings;
uint n_points;
n_linear_rings = uint4korr((*wkb));
(*wkb) += 4;
for (; n_linear_rings > 0; --n_linear_rings)
{
n_points = uint4korr((*wkb));
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
}
return 0;
} | O0 | c | sp_get_polygon_mbr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x2c(%rbp)
jbe 0x792be
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x30(%rbp)
jbe 0x792b1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x1d(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0x792d0
cmpl $0x0, %eax
je 0x792a4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x792c5
jmp 0x792a6
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x79276
jmp 0x792b3
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x79256
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
| sp_get_polygon_mbr:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_79256:
cmp [rbp+var_2C], 0
jbe short loc_792BE
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_79276:
cmp [rbp+var_30], 0
jbe short loc_792B1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_1D]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_add_point_to_mbr
cmp eax, 0
jz short loc_792A4
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_792C5
loc_792A4:
jmp short $+2
loc_792A6:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_79276
loc_792B1:
jmp short $+2
loc_792B3:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_79256
loc_792BE:
mov [rbp+var_4], 0
loc_792C5:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long sp_get_polygon_mbr(_DWORD **a1, long long a2, unsigned int a3, unsigned __int8 a4, long long a5)
{
int j; // [rsp+0h] [rbp-30h]
int i; // [rsp+4h] [rbp-2Ch]
for ( i = *(*a1)++; i; --i )
{
for ( j = *(*a1)++; j; --j )
{
if ( (unsigned int)sp_add_point_to_mbr(a1, a2, a3, a4, a5) )
return (unsigned int)-1;
}
}
return 0;
}
| sp_get_polygon_mbr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_00179256:
CMP dword ptr [RBP + -0x2c],0x0
JBE 0x001792be
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_00179276:
CMP dword ptr [RBP + -0x30],0x0
JBE 0x001792b1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x1d]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001792d0
CMP EAX,0x0
JZ 0x001792a4
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001792c5
LAB_001792a4:
JMP 0x001792a6
LAB_001792a6:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00179276
LAB_001792b1:
JMP 0x001792b3
LAB_001792b3:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00179256
LAB_001792be:
MOV dword ptr [RBP + -0x4],0x0
LAB_001792c5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4
sp_get_polygon_mbr(long *param_1,int8 param_2,int4 param_3,int1 param_4,
int8 param_5)
{
int iVar1;
int local_38;
int local_34;
local_34 = *(int *)*param_1;
*param_1 = *param_1 + 4;
do {
if (local_34 == 0) {
return 0;
}
local_38 = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_38 != 0; local_38 = local_38 + -1) {
iVar1 = sp_add_point_to_mbr(param_1,param_2,param_3,param_4,param_5);
if (iVar1 != 0) {
return 0xffffffff;
}
}
local_34 = local_34 + -1;
} while( true );
}
| |
22,778 | coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>::~when_all_ready_awaitable() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp | explicit when_all_ready_awaitable(task_types&&... tasks) noexcept(
std::conjunction<std::is_nothrow_move_constructible<task_types>...>::value)
: m_latch(sizeof...(task_types)),
m_tasks(std::move(tasks)...)
{
} | O3 | cpp | coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>::~when_all_ready_awaitable():
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x4bd6
callq *0x8(%rdi)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4be2
callq *0x8(%rdi)
popq %rbx
retq
jmp 0x4be6
movq %rax, %rdi
callq 0x4bee
| _ZN4coro6detail24when_all_ready_awaitableISt5tupleIJNS0_13when_all_taskIvEES4_EEED2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+18h]
test rdi, rdi
jz short loc_4BD6
call qword ptr [rdi+8]
loc_4BD6:
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_4BE2
call qword ptr [rdi+8]
loc_4BE2:
pop rbx
retn
jmp short $+2
loc_4BE6:
mov rdi, rax
call $+5
| void coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>::~when_all_ready_awaitable(
long long a1)
{
long long v2; // rdi
long long v3; // rdi
v2 = *(_QWORD *)(a1 + 24);
if ( v2 )
(*(void (**)(void))(v2 + 8))();
v3 = *(_QWORD *)(a1 + 16);
if ( v3 )
(*(void (**)(void))(v3 + 8))();
}
| ~when_all_ready_awaitable:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
TEST RDI,RDI
JZ 0x00104bd6
LAB_00104bd3:
CALL qword ptr [RDI + 0x8]
LAB_00104bd6:
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00104be2
LAB_00104bdf:
CALL qword ptr [RDI + 0x8]
LAB_00104be2:
POP RBX
RET
|
/* coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,
coro::detail::when_all_task<void> > >::~when_all_ready_awaitable() */
void __thiscall
coro::detail::
when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>
::~when_all_ready_awaitable
(when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>
*this)
{
if (*(long *)(this + 0x18) != 0) {
/* try { // try from 00104bd3 to 00104bd5 has its CatchHandler @ 00104be6 */
(**(code **)(*(long *)(this + 0x18) + 8))();
}
if (*(long *)(this + 0x10) != 0) {
/* try { // try from 00104bdf to 00104be1 has its CatchHandler @ 00104be4 */
(**(code **)(*(long *)(this + 0x10) + 8))();
}
return;
}
| |
22,779 | GetMonitorPhysicalHeight | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetMonitorPhysicalHeight(int monitor)
{
int height = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
if ((monitor >= 0) && (monitor < monitorCount)) glfwGetMonitorPhysicalSize(monitors[monitor], NULL, &height);
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
return height;
} | O1 | c | GetMonitorPhysicalHeight:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
xorl %eax, %eax
movl %eax, 0x8(%rsp)
leaq 0xc(%rsp), %rdi
movl %eax, (%rdi)
callq 0xc4b46
testl %ebx, %ebx
js 0x73bd6
cmpl %ebx, 0xc(%rsp)
jle 0x73bd6
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x8(%rsp), %rdx
xorl %esi, %esi
callq 0xc4cb1
jmp 0x73be9
leaq 0x71cad(%rip), %rsi # 0xe588a
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movl 0x8(%rsp), %eax
addq $0x10, %rsp
popq %rbx
retq
| GetMonitorPhysicalHeight:
push rbx
sub rsp, 10h
mov ebx, edi
xor eax, eax
mov [rsp+18h+var_10], eax
lea rdi, [rsp+18h+var_C]
mov [rdi], eax
call glfwGetMonitors
test ebx, ebx
js short loc_73BD6
cmp [rsp+18h+var_C], ebx
jle short loc_73BD6
mov ecx, ebx
mov rdi, [rax+rcx*8]
lea rdx, [rsp+18h+var_10]
xor esi, esi
call glfwGetMonitorPhysicalSize
jmp short loc_73BE9
loc_73BD6:
lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor"
mov edi, 4
xor eax, eax
call TraceLog
loc_73BE9:
mov eax, [rsp+18h+var_10]
add rsp, 10h
pop rbx
retn
| long long GetMonitorPhysicalHeight(int a1)
{
long long Monitors; // rax
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
unsigned int v7; // [rsp+8h] [rbp-10h] BYREF
int v8[3]; // [rsp+Ch] [rbp-Ch] BYREF
v7 = 0;
v8[0] = 0;
Monitors = glfwGetMonitors(v8);
if ( a1 < 0 || v8[0] <= a1 )
TraceLog(4, (unsigned int)"GLFW: Failed to find selected monitor", v2, v3, v4, v5);
else
glfwGetMonitorPhysicalSize(*(_QWORD *)(Monitors + 8LL * (unsigned int)a1), 0LL, &v7);
return v7;
}
| GetMonitorPhysicalHeight:
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
XOR EAX,EAX
MOV dword ptr [RSP + 0x8],EAX
LEA RDI,[RSP + 0xc]
MOV dword ptr [RDI],EAX
CALL 0x001c4b46
TEST EBX,EBX
JS 0x00173bd6
CMP dword ptr [RSP + 0xc],EBX
JLE 0x00173bd6
MOV ECX,EBX
MOV RDI,qword ptr [RAX + RCX*0x8]
LEA RDX,[RSP + 0x8]
XOR ESI,ESI
CALL 0x001c4cb1
JMP 0x00173be9
LAB_00173bd6:
LEA RSI,[0x1e588a]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
LAB_00173be9:
MOV EAX,dword ptr [RSP + 0x8]
ADD RSP,0x10
POP RBX
RET
|
int4 GetMonitorPhysicalHeight(uint param_1)
{
long lVar1;
int4 local_10;
int local_c;
local_10 = 0;
local_c = 0;
lVar1 = glfwGetMonitors();
if (((int)param_1 < 0) || (local_c <= (int)param_1)) {
TraceLog(4,"GLFW: Failed to find selected monitor");
}
else {
glfwGetMonitorPhysicalSize(*(int8 *)(lVar1 + (ulong)param_1 * 8),0,&local_10);
}
return local_10;
}
| |
22,780 | tbb::detail::r1::resume(tbb::detail::r1::suspend_point_type*) | aimrt_mujoco_sim/_deps/tbb-src/src/tbb/task.cpp | void resume(suspend_point_type* sp) {
assert_pointers_valid(sp, sp->m_arena);
task_dispatcher& task_disp = sp->m_resume_task.m_target;
if (sp->try_notify_resume()) {
// TODO: remove this work-around
// Prolong the arena's lifetime while all coroutines are alive
// (otherwise the arena can be destroyed while some tasks are suspended).
arena& a = *sp->m_arena;
a.my_references += arena::ref_worker;
if (task_disp.m_properties.critical_task_allowed) {
// The target is not in the process of executing critical task, so the resume task is not critical.
a.my_resume_task_stream.push(&sp->m_resume_task, random_lane_selector(sp->m_random));
} else {
#if __TBB_PREVIEW_CRITICAL_TASKS
// The target is in the process of executing critical task, so the resume task is critical.
a.my_critical_task_stream.push(&sp->m_resume_task, random_lane_selector(sp->m_random));
#endif
}
// Do not access target after that point.
a.advertise_new_work<arena::wakeup>();
// Release our reference to my_arena.
a.on_thread_leaving(arena::ref_worker);
}
} | O0 | cpp | tbb::detail::r1::resume(tbb::detail::r1::suspend_point_type*):
subq $0x58, %rsp
movq %fs:0x28, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x38(%rsp), %rax
movq (%rax), %rsi
callq 0x3aaaa0
movq 0x38(%rsp), %rax
movq 0x480(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3aab10
testb $0x1, %al
jne 0x3a9c2d
jmp 0x3a9d04
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
addq $0x84, %rdi
movl $0x1000, %esi # imm = 0x1000
callq 0x18bbf0
movq 0x30(%rsp), %rax
testb $0x1, 0x32(%rax)
je 0x3a9ca4
movq 0x28(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
addq $0x440, %rax # imm = 0x440
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rsi
addq $0x8, %rsi
leaq 0x48(%rsp), %rdi
callq 0x38cf20
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x38ceb0
jmp 0x3a9ceb
movq 0x28(%rsp), %rax
addq $0xc0, %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
addq $0x440, %rax # imm = 0x440
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rsi
addq $0x8, %rsi
leaq 0x40(%rsp), %rdi
callq 0x38cf20
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x3aab40
movq 0x28(%rsp), %rdi
callq 0x3931d0
movq 0x28(%rsp), %rdi
movl $0x1000, %esi # imm = 0x1000
callq 0x3864a0
movq %fs:0x28, %rax
movq 0x50(%rsp), %rcx
cmpq %rcx, %rax
jne 0x3a9d1c
addq $0x58, %rsp
retq
callq 0x190f00
nopw %cs:(%rax,%rax)
| _ZN3tbb6detail2r16resumeEPNS1_18suspend_point_typeE:
sub rsp, 58h
mov rax, fs:28h
mov [rsp+58h+var_8], rax
mov [rsp+58h+var_20], rdi
mov rdi, [rsp+58h+var_20]
mov rax, [rsp+58h+var_20]
mov rsi, [rax]
call _ZN3tbb6detail2d021assert_pointers_validIJNS0_2r118suspend_point_typeENS3_5arenaEEEEvDpPT_; tbb::detail::d0::assert_pointers_valid<tbb::detail::r1::suspend_point_type,tbb::detail::r1::arena>(tbb::detail::r1::suspend_point_type,tbb::detail::r1::arena *)
mov rax, [rsp+58h+var_20]
mov rax, [rax+480h]
mov [rsp+58h+var_28], rax
mov rdi, [rsp+58h+var_20]; this
call _ZN3tbb6detail2r118suspend_point_type17try_notify_resumeEv; tbb::detail::r1::suspend_point_type::try_notify_resume(void)
test al, 1
jnz short loc_3A9C2D
jmp loc_3A9D04
loc_3A9C2D:
mov rax, [rsp+58h+var_20]
mov rax, [rax]
mov [rsp+58h+var_30], rax
mov rdi, [rsp+58h+var_30]
add rdi, 84h
mov esi, 1000h
call __ZNSt13__atomic_baseIjEpLEj; std::__atomic_base<uint>::operator+=(uint)
mov rax, [rsp+58h+var_28]
test byte ptr [rax+32h], 1
jz short loc_3A9CA4
mov rax, [rsp+58h+var_30]
add rax, 0A8h
mov [rsp+58h+var_40], rax
mov rax, [rsp+58h+var_20]
add rax, 440h
mov [rsp+58h+var_38], rax
mov rsi, [rsp+58h+var_20]
add rsi, 8
lea rdi, [rsp+58h+var_10]
call _ZN3tbb6detail2r120random_lane_selectorC2ERNS1_10FastRandomE; tbb::detail::r1::random_lane_selector::random_lane_selector(tbb::detail::r1::FastRandom &)
mov rdi, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_38]
lea rdx, [rsp+58h+var_10]
call _ZN3tbb6detail2r111task_streamILNS1_25task_stream_accessor_typeE0EE4pushINS1_20random_lane_selectorEEEvPNS0_2d14taskERKT_; tbb::detail::r1::task_stream<(tbb::detail::r1::task_stream_accessor_type)0>::push<tbb::detail::r1::random_lane_selector>(tbb::detail::d1::task *,tbb::detail::r1::random_lane_selector const&)
jmp short loc_3A9CEB
loc_3A9CA4:
mov rax, [rsp+58h+var_30]
add rax, 0C0h
mov [rsp+58h+var_50], rax
mov rax, [rsp+58h+var_20]
add rax, 440h
mov [rsp+58h+var_48], rax
mov rsi, [rsp+58h+var_20]
add rsi, 8
lea rdi, [rsp+58h+var_18]
call _ZN3tbb6detail2r120random_lane_selectorC2ERNS1_10FastRandomE; tbb::detail::r1::random_lane_selector::random_lane_selector(tbb::detail::r1::FastRandom &)
mov rdi, [rsp+58h+var_50]
mov rsi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_18]
call _ZN3tbb6detail2r111task_streamILNS1_25task_stream_accessor_typeE1EE4pushINS1_20random_lane_selectorEEEvPNS0_2d14taskERKT_; tbb::detail::r1::task_stream<(tbb::detail::r1::task_stream_accessor_type)1>::push<tbb::detail::r1::random_lane_selector>(tbb::detail::d1::task *,tbb::detail::r1::random_lane_selector const&)
loc_3A9CEB:
mov rdi, [rsp+58h+var_30]
call _ZN3tbb6detail2r15arena18advertise_new_workILNS2_13new_work_typeE1EEEvv; tbb::detail::r1::arena::advertise_new_work<(tbb::detail::r1::arena::new_work_type)1>(void)
mov rdi, [rsp+58h+var_30]; this
mov esi, 1000h; unsigned int
call _ZN3tbb6detail2r15arena17on_thread_leavingEj; tbb::detail::r1::arena::on_thread_leaving(uint)
loc_3A9D04:
mov rax, fs:28h
mov rcx, [rsp+58h+var_8]
cmp rax, rcx
jnz short loc_3A9D1C
add rsp, 58h
retn
loc_3A9D1C:
call ___stack_chk_fail
| unsigned long long tbb::detail::r1::resume(tbb::detail::r1 *this, tbb::detail::r1::suspend_point_type *a2)
{
unsigned int *v3; // [rsp+28h] [rbp-30h]
long long v4; // [rsp+30h] [rbp-28h]
_BYTE v5[8]; // [rsp+40h] [rbp-18h] BYREF
_BYTE v6[8]; // [rsp+48h] [rbp-10h] BYREF
unsigned long long v7; // [rsp+50h] [rbp-8h]
v7 = __readfsqword(0x28u);
tbb::detail::d0::assert_pointers_valid<tbb::detail::r1::suspend_point_type,tbb::detail::r1::arena>(
this,
*(_QWORD *)this);
v4 = *((_QWORD *)this + 144);
if ( (tbb::detail::r1::suspend_point_type::try_notify_resume(this) & 1) != 0 )
{
v3 = *(unsigned int **)this;
std::__atomic_base<unsigned int>::operator+=(*(_QWORD *)this + 132LL, 4096LL);
if ( (*(_BYTE *)(v4 + 50) & 1) != 0 )
{
tbb::detail::r1::random_lane_selector::random_lane_selector(
(tbb::detail::r1::random_lane_selector *)v6,
(tbb::detail::r1 *)((char *)this + 8));
tbb::detail::r1::task_stream<(tbb::detail::r1::task_stream_accessor_type)0>::push<tbb::detail::r1::random_lane_selector>(
(long long)(v3 + 42),
(long long)this + 1088,
(long long)v6);
}
else
{
tbb::detail::r1::random_lane_selector::random_lane_selector(
(tbb::detail::r1::random_lane_selector *)v5,
(tbb::detail::r1 *)((char *)this + 8));
tbb::detail::r1::task_stream<(tbb::detail::r1::task_stream_accessor_type)1>::push<tbb::detail::r1::random_lane_selector>(
v3 + 48,
(char *)this + 1088,
v5);
}
tbb::detail::r1::arena::advertise_new_work<(tbb::detail::r1::arena::new_work_type)1>(v3);
tbb::detail::r1::arena::on_thread_leaving((tbb::detail::r1::arena *)v3, 4096);
}
return __readfsqword(0x28u);
}
| _M_bucket_index:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0xf]
CALL 0x002963e0
ADD RSP,0x28
RET
|
/* std::__detail::_Hash_code_base<std::__cxx11::string, std::pair<std::__cxx11::string const,
std::shared_ptr<aimrt::util::BufferArrayView> >, std::__detail::_Select1st,
aimrt::common::util::StringHash, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, true>::_M_bucket_index(unsigned long, unsigned long) const
*/
void __thiscall
std::__detail::
_Hash_code_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<aimrt::util::BufferArrayView>>,std::__detail::_Select1st,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>
::_M_bucket_index(_Hash_code_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<aimrt::util::BufferArrayView>>,std::__detail::_Select1st,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>
*this,ulong param_1,ulong param_2)
{
_Mod_range_hashing local_19;
ulong local_18;
ulong local_10;
_Hash_code_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<aimrt::util::BufferArrayView>>,std::__detail::_Select1st,aimrt::common::util::StringHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>
*local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
_Mod_range_hashing::operator()(&local_19,param_1,param_2);
return;
}
| |
22,781 | ggml_get_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) {
struct ggml_object * obj = ctx->objects_begin;
char * const mem_buffer = ctx->mem_buffer;
while (obj != NULL) {
if (obj->type == GGML_OBJECT_TENSOR) {
struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs);
if (strcmp(cur->name, name) == 0) {
return cur;
}
}
obj = obj->next;
}
return NULL;
} | O1 | c | ggml_get_tensor:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x90bbe
movq %rsi, %rbx
movq 0x8(%rdi), %r12
cmpl $0x0, 0x18(%r15)
jne 0x90bb5
movq (%r15), %rax
leaq (%r12,%rax), %r13
leaq (%r12,%rax), %rdi
addq $0x120, %rdi # imm = 0x120
movq %rbx, %rsi
callq 0xa860
testl %eax, %eax
cmoveq %r13, %r14
je 0x90bc1
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x90b8c
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| ggml_get_tensor:
push r15
push r14
push r13
push r12
push rbx
mov r15, [rdi+18h]
test r15, r15
jz short loc_90BBE
mov rbx, rsi
mov r12, [rdi+8]
loc_90B8C:
cmp dword ptr [r15+18h], 0
jnz short loc_90BB5
mov rax, [r15]
lea r13, [r12+rax]
lea rdi, [r12+rax]
add rdi, 120h
mov rsi, rbx
call _strcmp
test eax, eax
cmovz r14, r13
jz short loc_90BC1
loc_90BB5:
mov r15, [r15+10h]
test r15, r15
jnz short loc_90B8C
loc_90BBE:
xor r14d, r14d
loc_90BC1:
mov rax, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long ggml_get_tensor(long long a1, long long a2)
{
long long v2; // r15
long long v3; // r12
long long v4; // r13
v2 = *(_QWORD *)(a1 + 24);
if ( !v2 )
return 0LL;
v3 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
if ( !*(_DWORD *)(v2 + 24) )
{
v4 = v3 + *(_QWORD *)v2;
if ( !(unsigned int)strcmp(v4 + 288, a2) )
break;
}
v2 = *(_QWORD *)(v2 + 16);
if ( !v2 )
return 0LL;
}
return v4;
}
| |||
22,782 | ggml_get_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) {
struct ggml_object * obj = ctx->objects_begin;
char * const mem_buffer = ctx->mem_buffer;
while (obj != NULL) {
if (obj->type == GGML_OBJECT_TENSOR) {
struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs);
if (strcmp(cur->name, name) == 0) {
return cur;
}
}
obj = obj->next;
}
return NULL;
} | O2 | c | ggml_get_tensor:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %r12
addq $0x18, %r15
xorl %ebx, %ebx
movq (%r15), %r15
testq %r15, %r15
je 0x699c7
cmpl $0x0, 0x18(%r15)
jne 0x699bb
movq (%r15), %r13
leaq (%r12,%r13), %rdi
addq $0x120, %rdi # imm = 0x120
movq %r14, %rsi
callq 0xa880
testl %eax, %eax
je 0x699c1
addq $0x10, %r15
jmp 0x69992
addq %r13, %r12
movq %r12, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| ggml_get_tensor:
push r15
push r14
push r13
push r12
push rbx
mov r14, rsi
mov r15, rdi
mov r12, [rdi+8]
add r15, 18h
xor ebx, ebx
loc_69992:
mov r15, [r15]
test r15, r15
jz short loc_699C7
cmp dword ptr [r15+18h], 0
jnz short loc_699BB
mov r13, [r15]
lea rdi, [r12+r13]
add rdi, 120h
mov rsi, r14
call _strcmp
test eax, eax
jz short loc_699C1
loc_699BB:
add r15, 10h
jmp short loc_69992
loc_699C1:
add r12, r13
mov rbx, r12
loc_699C7:
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long ggml_get_tensor(long long a1, long long a2)
{
long long v2; // r12
long long **v3; // r15
long long v4; // rbx
long long *v5; // r15
long long v6; // r13
v2 = *(_QWORD *)(a1 + 8);
v3 = (long long **)(a1 + 24);
v4 = 0LL;
while ( 1 )
{
v5 = *v3;
if ( !v5 )
break;
if ( !*((_DWORD *)v5 + 6) )
{
v6 = *v5;
if ( !(unsigned int)strcmp(v2 + *v5 + 288, a2) )
return v6 + v2;
}
v3 = (long long **)(v5 + 2);
}
return v4;
}
| ggml_get_tensor:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RSI
MOV R15,RDI
MOV R12,qword ptr [RDI + 0x8]
ADD R15,0x18
XOR EBX,EBX
LAB_00169992:
MOV R15,qword ptr [R15]
TEST R15,R15
JZ 0x001699c7
CMP dword ptr [R15 + 0x18],0x0
JNZ 0x001699bb
MOV R13,qword ptr [R15]
LEA RDI,[R12 + R13*0x1]
ADD RDI,0x120
MOV RSI,R14
CALL 0x0010a880
TEST EAX,EAX
JZ 0x001699c1
LAB_001699bb:
ADD R15,0x10
JMP 0x00169992
LAB_001699c1:
ADD R12,R13
MOV RBX,R12
LAB_001699c7:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
long ggml_get_tensor(long param_1,char *param_2)
{
long lVar1;
long lVar2;
int iVar3;
long *plVar4;
lVar1 = *(long *)(param_1 + 8);
plVar4 = (long *)(param_1 + 0x18);
do {
plVar4 = (long *)*plVar4;
if (plVar4 == (long *)0x0) {
return 0;
}
if ((int)plVar4[3] == 0) {
lVar2 = *plVar4;
iVar3 = strcmp((char *)(lVar1 + lVar2 + 0x120),param_2);
if (iVar3 == 0) {
return lVar1 + lVar2;
}
}
plVar4 = plVar4 + 2;
} while( true );
}
| |
22,783 | ggml_get_tensor | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) {
struct ggml_object * obj = ctx->objects_begin;
char * const mem_buffer = ctx->mem_buffer;
while (obj != NULL) {
if (obj->type == GGML_OBJECT_TENSOR) {
struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs);
if (strcmp(cur->name, name) == 0) {
return cur;
}
}
obj = obj->next;
}
return NULL;
} | O3 | c | ggml_get_tensor:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x8f91b
movq %rsi, %r14
movq 0x8(%rdi), %rbx
cmpl $0x0, 0x18(%r15)
jne 0x8f912
movq (%r15), %r12
leaq (%rbx,%r12), %rdi
addq $0x120, %rdi # imm = 0x120
movq %r14, %rsi
callq 0xa850
testl %eax, %eax
je 0x8f92c
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x8f8f1
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq %r12, %rbx
jmp 0x8f91d
| ggml_get_tensor:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+18h]
test r15, r15
jz short loc_8F91B
mov r14, rsi
mov rbx, [rdi+8]
loc_8F8F1:
cmp dword ptr [r15+18h], 0
jnz short loc_8F912
mov r12, [r15]
lea rdi, [rbx+r12]
add rdi, 120h
mov rsi, r14
call _strcmp
test eax, eax
jz short loc_8F92C
loc_8F912:
mov r15, [r15+10h]
test r15, r15
jnz short loc_8F8F1
loc_8F91B:
xor ebx, ebx
loc_8F91D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_8F92C:
add rbx, r12
jmp short loc_8F91D
| long long ggml_get_tensor(long long a1, long long a2)
{
long long *v2; // r15
long long v3; // rbx
long long v4; // r12
v2 = *(long long **)(a1 + 24);
if ( !v2 )
return 0LL;
v3 = *(_QWORD *)(a1 + 8);
while ( 1 )
{
if ( !*((_DWORD *)v2 + 6) )
{
v4 = *v2;
if ( !(unsigned int)strcmp(v3 + *v2 + 288, a2) )
break;
}
v2 = (long long *)v2[2];
if ( !v2 )
return 0LL;
}
return v4 + v3;
}
| |||
22,784 | tree_search_next | eloqsql/mysys/tree.c | void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
int r_offs)
{
TREE_ELEMENT *x= **last_pos;
if (ELEMENT_CHILD(x, r_offs) != &null_element)
{
x= ELEMENT_CHILD(x, r_offs);
*++*last_pos= x;
while (ELEMENT_CHILD(x, l_offs) != &null_element)
{
x= ELEMENT_CHILD(x, l_offs);
*++*last_pos= x;
}
return ELEMENT_KEY(tree, x);
}
else
{
TREE_ELEMENT *y= *--*last_pos;
while (y != &null_element && x == ELEMENT_CHILD(y, r_offs))
{
x= y;
y= *--*last_pos;
}
return y == &null_element ? NULL : ELEMENT_KEY(tree, y);
}
} | O0 | c | tree_search_next:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
leaq 0x1b3291(%rip), %rdx # 0x2461b0
cmpq %rdx, (%rax,%rcx)
je 0x92fcf
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, (%rdx)
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
leaq 0x1b324f(%rip), %rdx # 0x2461b0
cmpq %rdx, (%rax,%rcx)
je 0x92f92
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, (%rdx)
movq %rcx, 0x8(%rax)
jmp 0x92f52
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0x92fb6
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x92fc2
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x93091
movq -0x18(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, (%rcx)
movq -0x8(%rax), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
leaq 0x1b31bf(%rip), %rcx # 0x2461b0
cmpq %rcx, -0x30(%rbp)
movb %al, -0x39(%rbp)
je 0x93010
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq -0x20(%rbp), %rdx
cmpq (%rcx,%rdx), %rax
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x93019
jmp 0x9303c
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, (%rcx)
movq -0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x92fe8
leaq 0x1b316d(%rip), %rax # 0x2461b0
cmpq %rax, -0x30(%rbp)
jne 0x93051
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x93089
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0x93075
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
jmp 0x93081
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
| tree_search_next:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_20], ecx
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_20]
lea rdx, null_element
cmp [rax+rcx], rdx
jz loc_92FCF
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_20]
mov rax, [rax+rcx]
mov [rbp+var_28], rax
mov rcx, [rbp+var_28]
mov rdx, [rbp+var_18]
mov rax, [rdx]
mov rsi, rax
add rsi, 8
mov [rdx], rsi
mov [rax+8], rcx
loc_92F52:
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
lea rdx, null_element
cmp [rax+rcx], rdx
jz short loc_92F92
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
mov rax, [rax+rcx]
mov [rbp+var_28], rax
mov rcx, [rbp+var_28]
mov rdx, [rbp+var_18]
mov rax, [rdx]
mov rsi, rax
add rsi, 8
mov [rdx], rsi
mov [rax+8], rcx
jmp short loc_92F52
loc_92F92:
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_92FB6
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_38], rax
jmp short loc_92FC2
loc_92FB6:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov [rbp+var_38], rax
loc_92FC2:
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp loc_93091
loc_92FCF:
mov rcx, [rbp+var_18]
mov rax, [rcx]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rcx], rdx
mov rax, [rax-8]
mov [rbp+var_30], rax
loc_92FE8:
xor eax, eax
lea rcx, null_element
cmp [rbp+var_30], rcx
mov [rbp+var_39], al
jz short loc_93010
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
movsxd rdx, [rbp+var_20]
cmp rax, [rcx+rdx]
setz al
mov [rbp+var_39], al
loc_93010:
mov al, [rbp+var_39]
test al, 1
jnz short loc_93019
jmp short loc_9303C
loc_93019:
mov rax, [rbp+var_30]
mov [rbp+var_28], rax
mov rcx, [rbp+var_18]
mov rax, [rcx]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rcx], rdx
mov rax, [rax-8]
mov [rbp+var_30], rax
jmp short loc_92FE8
loc_9303C:
lea rax, null_element
cmp [rbp+var_30], rax
jnz short loc_93051
xor eax, eax
mov [rbp+var_48], rax
jmp short loc_93089
loc_93051:
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_93075
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_50], rax
jmp short loc_93081
loc_93075:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_50], rax
loc_93081:
mov rax, [rbp+var_50]
mov [rbp+var_48], rax
loc_93089:
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
loc_93091:
mov rax, [rbp+var_8]
pop rbp
retn
| long long tree_search_next(long long a1, long long **a2, int a3, int a4)
{
long long *v4; // rax
long long *v5; // rax
long long *v6; // rax
long long *v7; // rax
bool v11; // [rsp+17h] [rbp-39h]
long long i; // [rsp+20h] [rbp-30h]
long long v14; // [rsp+28h] [rbp-28h]
long long v15; // [rsp+28h] [rbp-28h]
v14 = **a2;
if ( *(_UNKNOWN **)(v14 + a4) == &null_element )
{
v6 = (*a2)--;
for ( i = *(v6 - 1); ; i = *(v7 - 1) )
{
v11 = 0;
if ( (_UNKNOWN *)i != &null_element )
v11 = v14 == *(_QWORD *)(i + a4);
if ( !v11 )
break;
v14 = i;
v7 = (*a2)--;
}
if ( (_UNKNOWN *)i == &null_element )
return 0LL;
if ( *(_DWORD *)(a1 + 520) )
return *(unsigned int *)(a1 + 520) + i;
else
return *(_QWORD *)(i + 24);
}
else
{
v15 = *(_QWORD *)(v14 + a4);
v4 = (*a2)++;
v4[1] = v15;
while ( *(_UNKNOWN **)(v15 + a3) != &null_element )
{
v15 = *(_QWORD *)(v15 + a3);
v5 = (*a2)++;
v5[1] = v15;
}
if ( *(_DWORD *)(a1 + 520) )
return *(unsigned int *)(a1 + 520) + v15;
else
return *(_QWORD *)(v15 + 24);
}
}
| tree_search_next:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x20],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x20]
LEA RDX,[0x3461b0]
CMP qword ptr [RAX + RCX*0x1],RDX
JZ 0x00192fcf
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RDX]
MOV RSI,RAX
ADD RSI,0x8
MOV qword ptr [RDX],RSI
MOV qword ptr [RAX + 0x8],RCX
LAB_00192f52:
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
LEA RDX,[0x3461b0]
CMP qword ptr [RAX + RCX*0x1],RDX
JZ 0x00192f92
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RDX]
MOV RSI,RAX
ADD RSI,0x8
MOV qword ptr [RDX],RSI
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00192f52
LAB_00192f92:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x00192fb6
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00192fc2
LAB_00192fb6:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_00192fc2:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00193091
LAB_00192fcf:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RCX]
MOV RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RCX],RDX
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_00192fe8:
XOR EAX,EAX
LEA RCX,[0x3461b0]
CMP qword ptr [RBP + -0x30],RCX
MOV byte ptr [RBP + -0x39],AL
JZ 0x00193010
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RDX,dword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + RDX*0x1]
SETZ AL
MOV byte ptr [RBP + -0x39],AL
LAB_00193010:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x00193019
JMP 0x0019303c
LAB_00193019:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RCX]
MOV RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RCX],RDX
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00192fe8
LAB_0019303c:
LEA RAX,[0x3461b0]
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x00193051
XOR EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00193089
LAB_00193051:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x00193075
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00193081
LAB_00193075:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
LAB_00193081:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x48],RAX
LAB_00193089:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
LAB_00193091:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int1 * tree_search_next(long param_1,long *param_2,int param_3,int param_4)
{
long lVar1;
bool bVar2;
int1 *local_58;
int1 *local_50;
int1 *local_40;
int1 *local_38;
int1 *local_30;
int1 *local_10;
local_30 = *(int1 **)*param_2;
if (*(int1 **)(local_30 + param_4) == null_element) {
lVar1 = *param_2;
*param_2 = lVar1 + -8;
local_38 = *(int1 **)(lVar1 + -8);
while( true ) {
bVar2 = false;
if (local_38 != null_element) {
bVar2 = local_30 == *(int1 **)(local_38 + param_4);
}
if (!bVar2) break;
local_30 = local_38;
lVar1 = *param_2;
*param_2 = lVar1 + -8;
local_38 = *(int1 **)(lVar1 + -8);
}
if (local_38 == null_element) {
local_50 = (int1 *)0x0;
}
else {
if (*(int *)(param_1 + 0x208) == 0) {
local_58 = *(int1 **)(local_38 + 0x18);
}
else {
local_58 = local_38 + *(uint *)(param_1 + 0x208);
}
local_50 = local_58;
}
local_10 = local_50;
}
else {
local_30 = *(int1 **)(local_30 + param_4);
lVar1 = *param_2;
*param_2 = lVar1 + 8;
*(int1 **)(lVar1 + 8) = local_30;
while (*(int1 **)((long)local_30 + (long)param_3) != null_element) {
local_30 = *(int1 **)((long)local_30 + (long)param_3);
lVar1 = *param_2;
*param_2 = lVar1 + 8;
*(int1 **)(lVar1 + 8) = local_30;
}
if (*(int *)(param_1 + 0x208) == 0) {
local_40 = *(int1 **)((long)local_30 + 0x18);
}
else {
local_40 = (int1 *)((long)local_30 + (ulong)*(uint *)(param_1 + 0x208));
}
local_10 = local_40;
}
return local_10;
}
| |
22,785 | tree_search_next | eloqsql/mysys/tree.c | void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
int r_offs)
{
TREE_ELEMENT *x= **last_pos;
if (ELEMENT_CHILD(x, r_offs) != &null_element)
{
x= ELEMENT_CHILD(x, r_offs);
*++*last_pos= x;
while (ELEMENT_CHILD(x, l_offs) != &null_element)
{
x= ELEMENT_CHILD(x, l_offs);
*++*last_pos= x;
}
return ELEMENT_KEY(tree, x);
}
else
{
TREE_ELEMENT *y= *--*last_pos;
while (y != &null_element && x == ELEMENT_CHILD(y, r_offs))
{
x= y;
y= *--*last_pos;
}
return y == &null_element ? NULL : ELEMENT_KEY(tree, y);
}
} | O3 | c | tree_search_next:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %r8
movq (%r8), %r10
movslq %ecx, %r9
movq (%r10,%r9), %rax
leaq 0x2d354d(%rip), %rcx # 0x338fe0
cmpq %rcx, %rax
je 0x65ad2
leaq 0x8(%r8), %r9
movq %r9, (%rsi)
movq %rax, 0x8(%r8)
movslq %edx, %rdx
movq (%rax,%rdx), %r8
cmpq %rcx, %r8
je 0x65ac2
movq %r8, %rax
movq (%rsi), %r8
leaq 0x8(%r8), %r9
movq %r9, (%rsi)
movq %rax, 0x8(%r8)
jmp 0x65aa6
movl 0x208(%rdi), %ecx
testq %rcx, %rcx
je 0x65b03
addq %rcx, %rax
jmp 0x65b0d
addq $-0x8, %r8
xorl %eax, %eax
movq %r8, (%rsi)
movq (%r8), %rdx
cmpq %rcx, %rdx
je 0x65b0d
addq $-0x8, %r8
cmpq (%rdx,%r9), %r10
movq %rdx, %r10
je 0x65ad8
movl 0x208(%rdi), %eax
testq %rax, %rax
je 0x65b09
addq %rax, %rdx
movq %rdx, %rax
jmp 0x65b0d
movq 0x18(%rax), %rax
jmp 0x65b0d
movq 0x18(%rdx), %rax
popq %rbp
retq
| tree_search_next:
push rbp
mov rbp, rsp
mov r8, [rsi]
mov r10, [r8]
movsxd r9, ecx
mov rax, [r10+r9]
lea rcx, null_element
cmp rax, rcx
jz short loc_65AD2
lea r9, [r8+8]
mov [rsi], r9
mov [r8+8], rax
movsxd rdx, edx
loc_65AA6:
mov r8, [rax+rdx]
cmp r8, rcx
jz short loc_65AC2
mov rax, r8
mov r8, [rsi]
lea r9, [r8+8]
mov [rsi], r9
mov [r8+8], rax
jmp short loc_65AA6
loc_65AC2:
mov ecx, [rdi+208h]
test rcx, rcx
jz short loc_65B03
add rax, rcx
jmp short loc_65B0D
loc_65AD2:
add r8, 0FFFFFFFFFFFFFFF8h
xor eax, eax
loc_65AD8:
mov [rsi], r8
mov rdx, [r8]
cmp rdx, rcx
jz short loc_65B0D
add r8, 0FFFFFFFFFFFFFFF8h
cmp r10, [rdx+r9]
mov r10, rdx
jz short loc_65AD8
mov eax, [rdi+208h]
test rax, rax
jz short loc_65B09
add rdx, rax
mov rax, rdx
jmp short loc_65B0D
loc_65B03:
mov rax, [rax+18h]
jmp short loc_65B0D
loc_65B09:
mov rax, [rdx+18h]
loc_65B0D:
pop rbp
retn
| char * tree_search_next(long long a1, _QWORD **a2, int a3, int a4)
{
_QWORD *v4; // r8
_QWORD *v5; // r10
long long v6; // rax
_QWORD *v7; // r9
char *result; // rax
_QWORD *v9; // r8
_QWORD *v10; // rdx
bool v11; // zf
v4 = *a2;
v5 = (_QWORD *)**a2;
v6 = *(_QWORD *)((char *)v5 + a4);
if ( (_UNKNOWN *)v6 == &null_element )
{
v9 = v4 - 1;
result = 0LL;
while ( 1 )
{
*a2 = v9;
v10 = (_QWORD *)*v9;
if ( (_UNKNOWN *)*v9 == &null_element )
break;
--v9;
v11 = v5 == *(_QWORD **)((char *)v10 + a4);
v5 = v10;
if ( !v11 )
{
if ( *(_DWORD *)(a1 + 520) )
return (char *)v10 + *(unsigned int *)(a1 + 520);
else
return (char *)v10[3];
}
}
}
else
{
*a2 = v4 + 1;
v4[1] = v6;
while ( *(_UNKNOWN **)(v6 + a3) != &null_element )
{
v6 = *(_QWORD *)(v6 + a3);
v7 = *a2 + 1;
*a2 = v7;
*v7 = v6;
}
if ( *(_DWORD *)(a1 + 520) )
return (char *)(*(unsigned int *)(a1 + 520) + v6);
else
return *(char **)(v6 + 24);
}
return result;
}
| tree_search_next:
PUSH RBP
MOV RBP,RSP
MOV R8,qword ptr [RSI]
MOV R10,qword ptr [R8]
MOVSXD R9,ECX
MOV RAX,qword ptr [R10 + R9*0x1]
LEA RCX,[0x438fe0]
CMP RAX,RCX
JZ 0x00165ad2
LEA R9,[R8 + 0x8]
MOV qword ptr [RSI],R9
MOV qword ptr [R8 + 0x8],RAX
MOVSXD RDX,EDX
LAB_00165aa6:
MOV R8,qword ptr [RAX + RDX*0x1]
CMP R8,RCX
JZ 0x00165ac2
MOV RAX,R8
MOV R8,qword ptr [RSI]
LEA R9,[R8 + 0x8]
MOV qword ptr [RSI],R9
MOV qword ptr [R8 + 0x8],RAX
JMP 0x00165aa6
LAB_00165ac2:
MOV ECX,dword ptr [RDI + 0x208]
TEST RCX,RCX
JZ 0x00165b03
ADD RAX,RCX
JMP 0x00165b0d
LAB_00165ad2:
ADD R8,-0x8
XOR EAX,EAX
LAB_00165ad8:
MOV qword ptr [RSI],R8
MOV RDX,qword ptr [R8]
CMP RDX,RCX
JZ 0x00165b0d
ADD R8,-0x8
CMP R10,qword ptr [RDX + R9*0x1]
MOV R10,RDX
JZ 0x00165ad8
MOV EAX,dword ptr [RDI + 0x208]
TEST RAX,RAX
JZ 0x00165b09
ADD RDX,RAX
MOV RAX,RDX
JMP 0x00165b0d
LAB_00165b03:
MOV RAX,qword ptr [RAX + 0x18]
JMP 0x00165b0d
LAB_00165b09:
MOV RAX,qword ptr [RDX + 0x18]
LAB_00165b0d:
POP RBP
RET
|
int1 * tree_search_next(long param_1,long *param_2,int param_3,int param_4)
{
long lVar1;
int1 *puVar2;
long *plVar3;
int1 *puVar4;
bool bVar5;
plVar3 = (long *)*param_2;
puVar4 = (int1 *)*plVar3;
puVar2 = *(int1 **)(puVar4 + param_4);
if (puVar2 == null_element) {
do {
plVar3 = plVar3 + -1;
*param_2 = (long)plVar3;
puVar2 = (int1 *)*plVar3;
if (puVar2 == null_element) {
return (int1 *)0x0;
}
bVar5 = puVar4 == *(int1 **)(puVar2 + param_4);
puVar4 = puVar2;
} while (bVar5);
if ((ulong)*(uint *)(param_1 + 0x208) == 0) {
puVar2 = *(int1 **)(puVar2 + 0x18);
}
else {
puVar2 = puVar2 + *(uint *)(param_1 + 0x208);
}
}
else {
*param_2 = (long)(plVar3 + 1);
plVar3[1] = (long)puVar2;
while (puVar4 = *(int1 **)(puVar2 + param_3), puVar4 != null_element) {
lVar1 = *param_2;
*param_2 = lVar1 + 8;
*(int1 **)(lVar1 + 8) = puVar4;
puVar2 = puVar4;
}
if ((ulong)*(uint *)(param_1 + 0x208) == 0) {
puVar2 = *(int1 **)(puVar2 + 0x18);
}
else {
puVar2 = puVar2 + *(uint *)(param_1 + 0x208);
}
}
return puVar2;
}
| |
22,786 | my_dirend | eloqsql/mysys/my_lib.c | void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
} | O0 | c | my_dirend:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2fb02
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x31b40
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x34c00
movq -0x10(%rbp), %rdi
callq 0x30470
jmp 0x2fb04
jmp 0x2fb06
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_dirend:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_2FB02
mov rdi, [rbp+var_10]
add rdi, 10h
call delete_dynamic
mov rdi, [rbp+var_10]
add rdi, 38h ; '8'
xor eax, eax
mov esi, eax
call free_root
mov rdi, [rbp+var_10]
call my_free
loc_2FB02:
jmp short $+2
loc_2FB04:
jmp short $+2
loc_2FB06:
add rsp, 10h
pop rbp
retn
| long long my_dirend(long long a1)
{
long long result; // rax
result = a1;
if ( a1 )
{
delete_dynamic(a1 + 16);
free_root(a1 + 56, 0LL);
return my_free(a1);
}
return result;
}
| my_dirend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012fb02
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10
CALL 0x00131b40
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x38
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00134c00
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00130470
LAB_0012fb02:
JMP 0x0012fb04
LAB_0012fb04:
JMP 0x0012fb06
LAB_0012fb06:
ADD RSP,0x10
POP RBP
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
}
return;
}
| |
22,787 | my_dirend | eloqsql/mysys/my_lib.c | void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
} | O3 | c | my_dirend:
testq %rdi, %rdi
je 0x2b144
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x2c580
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x2ddeb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2b722
retq
| my_dirend:
test rdi, rdi
jz short locret_2B144
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
add rdi, 10h
call delete_dynamic
lea rdi, [rbx+38h]
xor esi, esi
call free_root
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp my_free
locret_2B144:
retn
| long long my_dirend(long long a1)
{
long long result; // rax
if ( a1 )
{
delete_dynamic(a1 + 16);
free_root(a1 + 56, 0LL);
return my_free(a1);
}
return result;
}
| my_dirend:
TEST RDI,RDI
JZ 0x0012b144
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x10
CALL 0x0012c580
LEA RDI,[RBX + 0x38]
XOR ESI,ESI
CALL 0x0012ddeb
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0012b722
LAB_0012b144:
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
return;
}
return;
}
| |
22,788 | ma_dynstr_realloc | eloqsql/libmariadb/libmariadb/ma_string.c | my_bool ma_dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size)
{
if (!additional_size) return(FALSE);
if (str->length + additional_size > str->max_length)
{
str->max_length=((str->length + additional_size+str->alloc_increment-1)/
str->alloc_increment)*str->alloc_increment;
if (!(str->str=(char*) realloc(str->str,str->max_length)))
return(TRUE);
}
return(FALSE);
} | O3 | c | ma_dynstr_realloc:
testq %rsi, %rsi
je 0x2a03b
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jbe 0x2a032
movq (%rbx), %rdi
movq 0x18(%rbx), %rcx
addq %rcx, %rsi
decq %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %rsi
movq %rsi, 0x10(%rbx)
callq 0x13730
movq %rax, (%rbx)
testq %rax, %rax
je 0x2a03e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
movb $0x1, %al
jmp 0x2a034
| ma_dynstr_realloc:
test rsi, rsi
jz short loc_2A03B
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
add rsi, [rdi+8]
cmp rsi, [rdi+10h]
jbe short loc_2A032
mov rdi, [rbx]
mov rcx, [rbx+18h]
add rsi, rcx
dec rsi
mov rax, rsi
xor edx, edx
div rcx
sub rsi, rdx
mov [rbx+10h], rsi
call _realloc
mov [rbx], rax
test rax, rax
jz short loc_2A03E
loc_2A032:
xor eax, eax
loc_2A034:
add rsp, 8
pop rbx
pop rbp
retn
loc_2A03B:
xor eax, eax
retn
loc_2A03E:
mov al, 1
jmp short loc_2A034
| _BOOL8 ma_dynstr_realloc(long long *a1, long long a2)
{
unsigned long long v3; // rsi
long long v4; // rdi
unsigned long long v5; // rsi
long long v6; // rax
_BOOL8 result; // rax
if ( !a2 )
return 0LL;
v3 = a1[1] + a2;
result = 0;
if ( v3 > a1[2] )
{
v4 = *a1;
v5 = a1[3] + v3 - 1 - (a1[3] + v3 - 1) % a1[3];
a1[2] = v5;
v6 = realloc(v4, v5);
*a1 = v6;
if ( !v6 )
return 1;
}
return result;
}
| ma_dynstr_realloc:
TEST RSI,RSI
JZ 0x0012a03b
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JBE 0x0012a032
MOV RDI,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x18]
ADD RSI,RCX
DEC RSI
MOV RAX,RSI
XOR EDX,EDX
DIV RCX
SUB RSI,RDX
MOV qword ptr [RBX + 0x10],RSI
CALL 0x00113730
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x0012a03e
LAB_0012a032:
XOR EAX,EAX
LAB_0012a034:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0012a03b:
XOR EAX,EAX
RET
LAB_0012a03e:
MOV AL,0x1
JMP 0x0012a034
|
int8 ma_dynstr_realloc(int8 *param_1,long param_2)
{
void *pvVar1;
ulong uVar2;
size_t __size;
if (param_2 == 0) {
return 0;
}
if ((ulong)param_1[2] < (ulong)(param_2 + param_1[1])) {
uVar2 = (param_2 + param_1[1] + param_1[3]) - 1;
__size = uVar2 - uVar2 % (ulong)param_1[3];
param_1[2] = __size;
pvVar1 = realloc((void *)*param_1,__size);
*param_1 = pvVar1;
if (pvVar1 == (void *)0x0) {
return 1;
}
}
return 0;
}
| |
22,789 | ma_get_binary_pack_key | eloqsql/storage/maria/ma_search.c | uint _ma_get_binary_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag,
register uchar **page_pos)
{
reg1 HA_KEYSEG *keyseg;
uchar *page, *page_end, *from, *from_end, *key;
uint length,tmp;
MARIA_KEYDEF *keyinfo= int_key->keyinfo;
DBUG_ENTER("_ma_get_binary_pack_key");
page= *page_pos;
page_end=page + MARIA_MAX_KEY_BUFF + 1;
key= int_key->data;
/*
Keys are compressed the following way:
prefix length Packed length of prefix common with prev key.
(1 or 3 bytes)
for each key segment:
[is null] Null indicator if can be null (1 byte, zero means null)
[length] Packed length if varlength (1 or 3 bytes)
key segment 'length' bytes of key segment value
pointer Reference to the data file (last_keyseg->length).
get_key_length() is a macro. It gets the prefix length from 'page'
and puts it into 'length'. It increments 'page' by 1 or 3, depending
on the packed length of the prefix length.
*/
get_key_length(length,page);
if (length)
{
if (length > keyinfo->maxlength)
{
DBUG_PRINT("error",
("Found too long binary packed key: %u of %u at %p",
length, keyinfo->maxlength, *page_pos));
DBUG_DUMP("key", *page_pos, 16);
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(0); /* Wrong key */
}
/* Key is packed against prev key, take prefix from prev key. */
from= key;
from_end= key + length;
}
else
{
/* Key is not packed against prev key, take all from page buffer. */
from= page;
from_end= page_end;
}
/*
The trouble is that key can be split in two parts:
The first part (prefix) is in from .. from_end - 1.
The second part starts at page.
The split can be at every byte position. So we need to check for
the end of the first part before using every byte.
*/
for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
{
/* If prefix is used up, switch to rest. */
if (from == from_end)
{
from=page;
from_end=page_end;
}
if (!(*key++ = *from++))
continue; /* Null part */
}
if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART | HA_SPACE_PACK))
{
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
/* Get length of dynamic length key part */
if ((length= (uint) (uchar) (*key++ = *from++)) == 255)
{
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
length= ((uint) (uchar) ((*key++ = *from++))) << 8;
/* If prefix is used up, switch to rest. */
if (from == from_end) { from=page; from_end=page_end; }
length+= (uint) (uchar) ((*key++ = *from++));
}
}
else
length=keyseg->length;
if ((tmp=(uint) (from_end-from)) <= length)
{
key+=tmp; /* Use old key */
length-=tmp;
from=page; from_end=page_end;
}
DBUG_ASSERT((int) length >= 0);
DBUG_PRINT("info",("key: %p from: %p length: %u",
key, from, length));
memmove(key, from, (size_t) length);
key+=length;
from+=length;
}
/*
Last segment (type == 0) contains length of data pointer.
If we have mixed key blocks with data pointer and key block pointer,
we have to copy both.
*/
int_key->data_length= (uint)(key - int_key->data);
int_key->ref_length= length= keyseg->length;
int_key->flag= 0;
if ((tmp=(uint) (from_end-from)) <= length)
{
/* Skip over the last common part of the data */
key+= tmp;
length-= tmp;
from= page;
}
else
{
/*
Remaining length is greater than max possible length.
This can happen only if we switched to the new key bytes already.
'page_end' is calculated with MARIA_MAX_KEY_BUFF. So it can be far
behind the real end of the key.
*/
if (from_end != page_end)
{
DBUG_PRINT("error",("Error when unpacking key"));
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(0); /* Error */
}
}
if (page_flag & KEYPAGE_FLAG_HAS_TRANSID)
{
uchar *end= from + length;
if (key_has_transid(end-1))
{
uint trans_length= transid_packed_length(end);
length+= trans_length;
int_key->ref_length+= trans_length;
int_key->flag= SEARCH_PAGE_KEY_HAS_TRANSID;
}
}
/* Copy rest of data ptr and, if appropriate, trans_id and node_ptr */
memcpy(key, from, length + nod_flag);
*page_pos= from + length + nod_flag;
#ifdef USEFUL_FOR_DEBUGGING
DBUG_DUMP("key", int_key->data,
(uint) (int_key->data_length + int_key->ref_length));
#endif
DBUG_RETURN(int_key->data_length + int_key->ref_length);
} | O3 | c | ma_get_binary_pack_key:
movq (%rcx), %r8
movzbl (%r8), %eax
cmpl $0xff, %eax
je 0x39c06
movl $0x1, %r9d
jmp 0x39c18
movzwl 0x1(%r8), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl $0x3, %r9d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq (%rdi), %r13
movq 0x8(%rdi), %r10
leaq 0x9d4(%r8), %r11
addq %r8, %r9
movq %r9, %r12
movq %r11, %r14
testl %eax, %eax
je 0x39c62
movzwl 0xae(%r10), %r8d
cmpl %r8d, %eax
jbe 0x39c59
movq (%r10), %rdi
jmp 0x39dd4
movl %eax, %r14d
addq %r13, %r14
movq %r13, %r12
movl %esi, -0x34(%rbp)
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdi, -0x30(%rbp)
movq %r10, -0x40(%rbp)
movq 0xc0(%r10), %rbx
cmpb $0x0, 0x18(%rbx)
je 0x39d9a
movq %r9, -0x60(%rbp)
movq %r11, -0x58(%rbp)
movzwl 0x12(%rbx), %eax
testb $0x10, %al
jne 0x39c9b
movq %r14, %rcx
jmp 0x39cc7
movq %r9, %rax
movq %r11, %rcx
cmpq %r14, %r12
je 0x39cac
movq %r12, %rax
movq %r14, %rcx
movb (%rax), %dl
movq %rax, %r12
incq %r12
movb %dl, (%r13)
incq %r13
testb %dl, %dl
je 0x39d8c
movzwl 0x12(%rbx), %eax
testb $0x29, %al
je 0x39cf5
movq %r9, %rdx
movq %r11, %r14
cmpq %rcx, %r12
je 0x39cdc
movq %r12, %rdx
movq %rcx, %r14
movzbl (%rdx), %eax
movq %rdx, %r12
incq %r12
movb %al, (%r13)
cmpl $0xff, %eax
je 0x39cfe
incq %r13
jmp 0x39d3f
movzwl 0x14(%rbx), %eax
movq %rcx, %r14
jmp 0x39d3f
movq %r9, %rcx
movq %r11, %rdx
cmpq %r14, %r12
je 0x39d0f
movq %r12, %rcx
movq %r14, %rdx
movzbl (%rcx), %eax
incq %rcx
movb %al, 0x1(%r13)
movq %r9, %r12
movq %r11, %r14
cmpq %rdx, %rcx
je 0x39d2a
movq %rcx, %r12
movq %rdx, %r14
shll $0x8, %eax
movzbl (%r12), %ecx
incq %r12
movb %cl, 0x2(%r13)
addq $0x3, %r13
orl %ecx, %eax
movq %r14, %rdx
subq %r12, %rdx
movl %eax, %ecx
subl %edx, %ecx
jae 0x39d4f
movl %eax, %ecx
jmp 0x39d5a
movl %edx, %eax
addq %rax, %r13
movq %r9, %r12
movq %r11, %r14
movl %ecx, %r15d
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x29120
addq %r15, %r13
addq %r15, %r12
movq -0x60(%rbp), %r9
movq -0x58(%rbp), %r11
leaq 0x20(%rbx), %rax
cmpb $0x0, 0x38(%rbx)
movq %rax, %rbx
jne 0x39c8e
jmp 0x39d91
movq %rcx, %r14
jmp 0x39d79
movq -0x30(%rbp), %rsi
movq (%rsi), %rcx
jmp 0x39da4
movq %r13, %rcx
movq %rbx, %rax
movq -0x30(%rbp), %rsi
movl %r13d, %edx
subl %ecx, %edx
movl %edx, 0x10(%rsi)
movzwl 0x14(%rax), %eax
movl %eax, 0x14(%rsi)
movl $0x0, 0x18(%rsi)
movq %r14, %rcx
subq %r12, %rcx
movl %eax, %ebx
subl %ecx, %ebx
jae 0x39de2
movl %eax, %ebx
cmpq %r11, %r14
je 0x39dea
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movl $0x7e, %esi
callq 0x37876
xorl %eax, %eax
jmp 0x39e54
movl %ecx, %ecx
addq %rcx, %r13
movq %r9, %r12
testb $0x2, -0x34(%rbp)
je 0x39e25
movl %ebx, %ecx
testb $0x1, -0x1(%r12,%rcx)
je 0x39e25
movzbl (%r12,%rcx), %ecx
leal -0xf8(%rcx), %edx
cmpl $0xf3, %ecx
movl $0x1, %ecx
cmovael %edx, %ecx
addl %ecx, %ebx
addl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movl $0x100000, 0x18(%rax) # imm = 0x100000
movq -0x48(%rbp), %r14
leal (%rbx,%r14), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x29090
movl %ebx, %eax
movl %r14d, %ecx
addq %r12, %rcx
addq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movl 0x14(%rcx), %eax
addl 0x10(%rcx), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_get_binary_pack_key:
mov r8, [rcx]
movzx eax, byte ptr [r8]
cmp eax, 0FFh
jz short loc_39C06
mov r9d, 1
jmp short loc_39C18
loc_39C06:
movzx eax, word ptr [r8+1]
rol ax, 8
movzx eax, ax
mov r9d, 3
loc_39C18:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, [rdi]
mov r10, [rdi+8]
lea r11, [r8+9D4h]
add r9, r8
mov r12, r9
mov r14, r11
test eax, eax
jz short loc_39C62
movzx r8d, word ptr [r10+0AEh]
cmp eax, r8d
jbe short loc_39C59
mov rdi, [r10]
jmp loc_39DD4
loc_39C59:
mov r14d, eax
add r14, r13
mov r12, r13
loc_39C62:
mov [rbp-34h], esi
mov [rbp-48h], rdx
mov [rbp-50h], rcx
mov [rbp-30h], rdi
mov [rbp-40h], r10
mov rbx, [r10+0C0h]
cmp byte ptr [rbx+18h], 0
jz loc_39D9A
mov [rbp-60h], r9
mov [rbp-58h], r11
loc_39C8E:
movzx eax, word ptr [rbx+12h]
test al, 10h
jnz short loc_39C9B
mov rcx, r14
jmp short loc_39CC7
loc_39C9B:
mov rax, r9
mov rcx, r11
cmp r12, r14
jz short loc_39CAC
mov rax, r12
mov rcx, r14
loc_39CAC:
mov dl, [rax]
mov r12, rax
inc r12
mov [r13+0], dl
inc r13
test dl, dl
jz loc_39D8C
movzx eax, word ptr [rbx+12h]
loc_39CC7:
test al, 29h
jz short loc_39CF5
mov rdx, r9
mov r14, r11
cmp r12, rcx
jz short loc_39CDC
mov rdx, r12
mov r14, rcx
loc_39CDC:
movzx eax, byte ptr [rdx]
mov r12, rdx
inc r12
mov [r13+0], al
cmp eax, 0FFh
jz short loc_39CFE
inc r13
jmp short loc_39D3F
loc_39CF5:
movzx eax, word ptr [rbx+14h]
mov r14, rcx
jmp short loc_39D3F
loc_39CFE:
mov rcx, r9
mov rdx, r11
cmp r12, r14
jz short loc_39D0F
mov rcx, r12
mov rdx, r14
loc_39D0F:
movzx eax, byte ptr [rcx]
inc rcx
mov [r13+1], al
mov r12, r9
mov r14, r11
cmp rcx, rdx
jz short loc_39D2A
mov r12, rcx
mov r14, rdx
loc_39D2A:
shl eax, 8
movzx ecx, byte ptr [r12]
inc r12
mov [r13+2], cl
add r13, 3
or eax, ecx
loc_39D3F:
mov rdx, r14
sub rdx, r12
mov ecx, eax
sub ecx, edx
jnb short loc_39D4F
mov ecx, eax
jmp short loc_39D5A
loc_39D4F:
mov eax, edx
add r13, rax
mov r12, r9
mov r14, r11
loc_39D5A:
mov r15d, ecx
mov rdi, r13
mov rsi, r12
mov rdx, r15
call _memmove
add r13, r15
add r12, r15
mov r9, [rbp-60h]
mov r11, [rbp-58h]
loc_39D79:
lea rax, [rbx+20h]
cmp byte ptr [rbx+38h], 0
mov rbx, rax
jnz loc_39C8E
jmp short loc_39D91
loc_39D8C:
mov r14, rcx
jmp short loc_39D79
loc_39D91:
mov rsi, [rbp-30h]
mov rcx, [rsi]
jmp short loc_39DA4
loc_39D9A:
mov rcx, r13
mov rax, rbx
mov rsi, [rbp-30h]
loc_39DA4:
mov edx, r13d
sub edx, ecx
mov [rsi+10h], edx
movzx eax, word ptr [rax+14h]
mov [rsi+14h], eax
mov dword ptr [rsi+18h], 0
mov rcx, r14
sub rcx, r12
mov ebx, eax
sub ebx, ecx
jnb short loc_39DE2
mov ebx, eax
cmp r14, r11
jz short loc_39DEA
mov rax, [rbp-40h]
mov rdi, [rax]
loc_39DD4:
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
xor eax, eax
jmp short loc_39E54
loc_39DE2:
mov ecx, ecx
add r13, rcx
mov r12, r9
loc_39DEA:
test byte ptr [rbp-34h], 2
jz short loc_39E25
mov ecx, ebx
test byte ptr [r12+rcx-1], 1
jz short loc_39E25
movzx ecx, byte ptr [r12+rcx]
lea edx, [rcx-0F8h]
cmp ecx, 0F3h
mov ecx, 1
cmovnb ecx, edx
add ebx, ecx
add ecx, eax
mov rax, [rbp-30h]
mov [rax+14h], ecx
mov dword ptr [rax+18h], offset xmmword_100000
loc_39E25:
mov r14, [rbp-48h]
lea edx, [rbx+r14]
mov rdi, r13
mov rsi, r12
call _memcpy
mov eax, ebx
mov ecx, r14d
add rcx, r12
add rcx, rax
mov rax, [rbp-50h]
mov [rax], rcx
mov rcx, [rbp-30h]
mov eax, [rcx+14h]
add eax, [rcx+10h]
loc_39E54:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_get_binary_pack_key(long long a1, char a2, long long a3, long long *a4)
{
long long v4; // r8
unsigned int v5; // eax
long long v6; // r9
unsigned __int8 *v7; // r13
long long v8; // r10
long long v9; // r11
unsigned __int8 *v10; // r9
unsigned __int8 *v11; // r12
unsigned __int8 *v12; // r14
long long v13; // rdi
long long v14; // rbx
__int16 v15; // ax
unsigned __int8 *v16; // rcx
unsigned __int8 *v17; // rax
unsigned __int8 v18; // dl
unsigned __int8 *v19; // rdx
unsigned int v20; // eax
unsigned __int8 *v21; // rcx
unsigned __int8 *v22; // rdx
int v23; // eax
unsigned __int8 *v24; // rcx
unsigned __int8 *v25; // r12
int v26; // ecx
unsigned int v27; // ecx
long long v28; // r15
long long v29; // rax
bool v30; // zf
long long v31; // rsi
unsigned __int8 *v32; // rcx
unsigned int v33; // eax
unsigned int v34; // ebx
unsigned int v36; // ecx
int v37; // edx
bool v38; // cf
int v39; // ecx
unsigned __int8 *v40; // [rsp-68h] [rbp-68h]
long long v41; // [rsp-60h] [rbp-60h]
long long *v42; // [rsp-58h] [rbp-58h]
int v43; // [rsp-50h] [rbp-50h]
long long *v44; // [rsp-48h] [rbp-48h]
v4 = *a4;
v5 = *(unsigned __int8 *)*a4;
if ( v5 == 255 )
{
v5 = (unsigned __int16)__ROL2__(*(_WORD *)(v4 + 1), 8);
v6 = 3LL;
}
else
{
v6 = 1LL;
}
v7 = *(unsigned __int8 **)a1;
v8 = *(_QWORD *)(a1 + 8);
v9 = v4 + 2516;
v10 = (unsigned __int8 *)(v4 + v6);
v11 = v10;
v12 = (unsigned __int8 *)(v4 + 2516);
if ( v5 )
{
v4 = *(unsigned __int16 *)(v8 + 174);
if ( v5 > (unsigned int)v4 )
{
v13 = *(_QWORD *)v8;
LABEL_38:
ma_set_fatal_error_with_share(v13, 126, a3, (long long)a4, v4, (int)v10);
return 0LL;
}
v12 = &v7[v5];
v11 = *(unsigned __int8 **)a1;
}
v43 = a3;
v42 = a4;
v44 = *(long long **)(a1 + 8);
v14 = *(_QWORD *)(v8 + 192);
if ( *(_BYTE *)(v14 + 24) )
{
v40 = v10;
v41 = v9;
while ( 1 )
{
v15 = *(_WORD *)(v14 + 18);
if ( (v15 & 0x10) == 0 )
break;
v17 = v10;
v16 = (unsigned __int8 *)v9;
if ( v11 != v12 )
{
v17 = v11;
v16 = v12;
}
v18 = *v17;
v11 = v17 + 1;
*v7++ = *v17;
if ( v18 )
{
v15 = *(_WORD *)(v14 + 18);
goto LABEL_16;
}
v12 = v16;
LABEL_31:
v29 = v14 + 32;
v30 = *(_BYTE *)(v14 + 56) == 0;
v14 += 32LL;
if ( v30 )
{
v31 = a1;
v32 = *(unsigned __int8 **)a1;
goto LABEL_35;
}
}
v16 = v12;
LABEL_16:
if ( (v15 & 0x29) != 0 )
{
v19 = v10;
v12 = (unsigned __int8 *)v9;
if ( v11 != v16 )
{
v19 = v11;
v12 = v16;
}
v20 = *v19;
v11 = v19 + 1;
*v7 = v20;
if ( v20 == 255 )
{
v21 = v10;
v22 = (unsigned __int8 *)v9;
if ( v11 != v12 )
{
v21 = v11;
v22 = v12;
}
v23 = *v21;
v24 = v21 + 1;
v7[1] = v23;
v25 = v10;
v12 = (unsigned __int8 *)v9;
if ( v24 != v22 )
{
v25 = v24;
v12 = v22;
}
v26 = *v25;
v11 = v25 + 1;
v7[2] = v26;
v7 += 3;
v20 = v26 | (v23 << 8);
}
else
{
++v7;
}
}
else
{
v20 = *(unsigned __int16 *)(v14 + 20);
v12 = v16;
}
v27 = v20 - ((_DWORD)v12 - (_DWORD)v11);
if ( v20 >= (int)v12 - (int)v11 )
{
v7 += (unsigned int)((_DWORD)v12 - (_DWORD)v11);
v11 = v10;
v12 = (unsigned __int8 *)v9;
}
else
{
v27 = v20;
}
v28 = v27;
memmove(v7, v11, v27);
v7 += v28;
v11 += v28;
v10 = v40;
v9 = v41;
goto LABEL_31;
}
LODWORD(v32) = *(_QWORD *)a1;
v29 = *(_QWORD *)(v8 + 192);
v31 = a1;
LABEL_35:
a3 = (unsigned int)((_DWORD)v7 - (_DWORD)v32);
*(_DWORD *)(v31 + 16) = a3;
v33 = *(unsigned __int16 *)(v29 + 20);
*(_QWORD *)(v31 + 20) = v33;
a4 = (long long *)(v12 - v11);
v34 = v33 - ((_DWORD)v12 - (_DWORD)v11);
if ( v33 >= (int)v12 - (int)v11 )
{
v7 += (unsigned int)a4;
v11 = v10;
}
else
{
v34 = v33;
if ( v12 != (unsigned __int8 *)v9 )
{
v13 = *v44;
goto LABEL_38;
}
}
if ( (a2 & 2) != 0 && (v11[v34 - 1] & 1) != 0 )
{
v36 = v11[v34];
v37 = v36 - 248;
v38 = v36 < 0xF3;
v39 = 1;
if ( !v38 )
v39 = v37;
v34 += v39;
*(_DWORD *)(a1 + 20) = v33 + v39;
*(_DWORD *)(a1 + 24) = (_DWORD)&xmmword_100000;
}
memcpy(v7, v11, v34 + v43);
*v42 = (long long)&v11[v43 + v34];
return (unsigned int)(*(_DWORD *)(a1 + 16) + *(_DWORD *)(a1 + 20));
}
| _ma_get_binary_pack_key:
MOV R8,qword ptr [RCX]
MOVZX EAX,byte ptr [R8]
CMP EAX,0xff
JZ 0x00139c06
MOV R9D,0x1
JMP 0x00139c18
LAB_00139c06:
MOVZX EAX,word ptr [R8 + 0x1]
ROL AX,0x8
MOVZX EAX,AX
MOV R9D,0x3
LAB_00139c18:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,qword ptr [RDI]
MOV R10,qword ptr [RDI + 0x8]
LEA R11,[R8 + 0x9d4]
ADD R9,R8
MOV R12,R9
MOV R14,R11
TEST EAX,EAX
JZ 0x00139c62
MOVZX R8D,word ptr [R10 + 0xae]
CMP EAX,R8D
JBE 0x00139c59
MOV RDI,qword ptr [R10]
JMP 0x00139dd4
LAB_00139c59:
MOV R14D,EAX
ADD R14,R13
MOV R12,R13
LAB_00139c62:
MOV dword ptr [RBP + -0x34],ESI
MOV qword ptr [RBP + -0x48],RDX
MOV qword ptr [RBP + -0x50],RCX
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x40],R10
MOV RBX,qword ptr [R10 + 0xc0]
CMP byte ptr [RBX + 0x18],0x0
JZ 0x00139d9a
MOV qword ptr [RBP + -0x60],R9
MOV qword ptr [RBP + -0x58],R11
LAB_00139c8e:
MOVZX EAX,word ptr [RBX + 0x12]
TEST AL,0x10
JNZ 0x00139c9b
MOV RCX,R14
JMP 0x00139cc7
LAB_00139c9b:
MOV RAX,R9
MOV RCX,R11
CMP R12,R14
JZ 0x00139cac
MOV RAX,R12
MOV RCX,R14
LAB_00139cac:
MOV DL,byte ptr [RAX]
MOV R12,RAX
INC R12
MOV byte ptr [R13],DL
INC R13
TEST DL,DL
JZ 0x00139d8c
MOVZX EAX,word ptr [RBX + 0x12]
LAB_00139cc7:
TEST AL,0x29
JZ 0x00139cf5
MOV RDX,R9
MOV R14,R11
CMP R12,RCX
JZ 0x00139cdc
MOV RDX,R12
MOV R14,RCX
LAB_00139cdc:
MOVZX EAX,byte ptr [RDX]
MOV R12,RDX
INC R12
MOV byte ptr [R13],AL
CMP EAX,0xff
JZ 0x00139cfe
INC R13
JMP 0x00139d3f
LAB_00139cf5:
MOVZX EAX,word ptr [RBX + 0x14]
MOV R14,RCX
JMP 0x00139d3f
LAB_00139cfe:
MOV RCX,R9
MOV RDX,R11
CMP R12,R14
JZ 0x00139d0f
MOV RCX,R12
MOV RDX,R14
LAB_00139d0f:
MOVZX EAX,byte ptr [RCX]
INC RCX
MOV byte ptr [R13 + 0x1],AL
MOV R12,R9
MOV R14,R11
CMP RCX,RDX
JZ 0x00139d2a
MOV R12,RCX
MOV R14,RDX
LAB_00139d2a:
SHL EAX,0x8
MOVZX ECX,byte ptr [R12]
INC R12
MOV byte ptr [R13 + 0x2],CL
ADD R13,0x3
OR EAX,ECX
LAB_00139d3f:
MOV RDX,R14
SUB RDX,R12
MOV ECX,EAX
SUB ECX,EDX
JNC 0x00139d4f
MOV ECX,EAX
JMP 0x00139d5a
LAB_00139d4f:
MOV EAX,EDX
ADD R13,RAX
MOV R12,R9
MOV R14,R11
LAB_00139d5a:
MOV R15D,ECX
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x00129120
ADD R13,R15
ADD R12,R15
MOV R9,qword ptr [RBP + -0x60]
MOV R11,qword ptr [RBP + -0x58]
LAB_00139d79:
LEA RAX,[RBX + 0x20]
CMP byte ptr [RBX + 0x38],0x0
MOV RBX,RAX
JNZ 0x00139c8e
JMP 0x00139d91
LAB_00139d8c:
MOV R14,RCX
JMP 0x00139d79
LAB_00139d91:
MOV RSI,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RSI]
JMP 0x00139da4
LAB_00139d9a:
MOV RCX,R13
MOV RAX,RBX
MOV RSI,qword ptr [RBP + -0x30]
LAB_00139da4:
MOV EDX,R13D
SUB EDX,ECX
MOV dword ptr [RSI + 0x10],EDX
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RSI + 0x14],EAX
MOV dword ptr [RSI + 0x18],0x0
MOV RCX,R14
SUB RCX,R12
MOV EBX,EAX
SUB EBX,ECX
JNC 0x00139de2
MOV EBX,EAX
CMP R14,R11
JZ 0x00139dea
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX]
LAB_00139dd4:
MOV ESI,0x7e
CALL 0x00137876
XOR EAX,EAX
JMP 0x00139e54
LAB_00139de2:
MOV ECX,ECX
ADD R13,RCX
MOV R12,R9
LAB_00139dea:
TEST byte ptr [RBP + -0x34],0x2
JZ 0x00139e25
MOV ECX,EBX
TEST byte ptr [R12 + RCX*0x1 + -0x1],0x1
JZ 0x00139e25
MOVZX ECX,byte ptr [R12 + RCX*0x1]
LEA EDX,[RCX + -0xf8]
CMP ECX,0xf3
MOV ECX,0x1
CMOVNC ECX,EDX
ADD EBX,ECX
ADD ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x14],ECX
MOV dword ptr [RAX + 0x18],0x100000
LAB_00139e25:
MOV R14,qword ptr [RBP + -0x48]
LEA EDX,[RBX + R14*0x1]
MOV RDI,R13
MOV RSI,R12
CALL 0x00129090
MOV EAX,EBX
MOV ECX,R14D
ADD RCX,R12
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RCX + 0x14]
ADD EAX,dword ptr [RCX + 0x10]
LAB_00139e54:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _ma_get_binary_pack_key(int8 *param_1,uint param_2,uint param_3,int8 *param_4)
{
char *pcVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
int8 *puVar5;
ushort uVar6;
uint uVar7;
int iVar8;
byte *pbVar9;
uint uVar10;
byte *pbVar11;
uint uVar12;
long lVar13;
int8 uVar14;
long lVar15;
byte *pbVar16;
byte *pbVar17;
byte *__dest;
byte *pbVar18;
ulong __n;
pbVar16 = (byte *)*param_4;
uVar12 = (uint)*pbVar16;
if (*pbVar16 == 0xff) {
uVar12 = (uint)(ushort)(*(ushort *)(pbVar16 + 1) << 8 | *(ushort *)(pbVar16 + 1) >> 8);
lVar15 = 3;
}
else {
lVar15 = 1;
}
__dest = (byte *)*param_1;
puVar5 = (int8 *)param_1[1];
pbVar2 = pbVar16 + 0x9d4;
pbVar16 = pbVar16 + lVar15;
pbVar17 = pbVar16;
pbVar18 = pbVar2;
if (uVar12 == 0) {
LAB_00139c62:
lVar15 = puVar5[0x18];
lVar13 = lVar15;
if (*(char *)(lVar15 + 0x18) == '\0') {
iVar8 = (int)__dest;
}
else {
do {
uVar6 = *(ushort *)(lVar13 + 0x12);
if ((uVar6 & 0x10) == 0) {
LAB_00139cc7:
if ((uVar6 & 0x29) == 0) {
uVar12 = (uint)*(ushort *)(lVar13 + 0x14);
}
else {
pbVar9 = pbVar16;
pbVar11 = pbVar2;
if (pbVar17 != pbVar18) {
pbVar9 = pbVar17;
pbVar11 = pbVar18;
}
pbVar18 = pbVar11;
bVar3 = *pbVar9;
uVar12 = (uint)bVar3;
pbVar17 = pbVar9 + 1;
*__dest = bVar3;
if (bVar3 == 0xff) {
pbVar9 = pbVar16;
pbVar11 = pbVar2;
if (pbVar17 != pbVar18) {
pbVar9 = pbVar17;
pbVar11 = pbVar18;
}
bVar3 = *pbVar9;
__dest[1] = bVar3;
pbVar17 = pbVar16;
pbVar18 = pbVar2;
if (pbVar9 + 1 != pbVar11) {
pbVar17 = pbVar9 + 1;
pbVar18 = pbVar11;
}
bVar4 = *pbVar17;
pbVar17 = pbVar17 + 1;
__dest[2] = bVar4;
__dest = __dest + 3;
uVar12 = (uint)CONCAT11(bVar3,bVar4);
}
else {
__dest = __dest + 1;
}
}
uVar7 = (uint)((long)pbVar18 - (long)pbVar17);
pbVar11 = pbVar18;
if (uVar7 <= uVar12) {
__dest = __dest + ((long)pbVar18 - (long)pbVar17 & 0xffffffff);
pbVar17 = pbVar16;
pbVar11 = pbVar2;
uVar12 = uVar12 - uVar7;
}
__n = (ulong)uVar12;
memmove(__dest,pbVar17,__n);
__dest = __dest + __n;
pbVar17 = pbVar17 + __n;
}
else {
pbVar9 = pbVar16;
pbVar11 = pbVar2;
if (pbVar17 != pbVar18) {
pbVar9 = pbVar17;
pbVar11 = pbVar18;
}
bVar3 = *pbVar9;
pbVar17 = pbVar9 + 1;
*__dest = bVar3;
__dest = __dest + 1;
if (bVar3 != 0) {
uVar6 = *(ushort *)(lVar13 + 0x12);
pbVar18 = pbVar11;
goto LAB_00139cc7;
}
}
lVar15 = lVar13 + 0x20;
pcVar1 = (char *)(lVar13 + 0x38);
lVar13 = lVar15;
pbVar18 = pbVar11;
} while (*pcVar1 != '\0');
iVar8 = (int)*param_1;
}
*(int *)(param_1 + 2) = (int)__dest - iVar8;
uVar6 = *(ushort *)(lVar15 + 0x14);
uVar7 = (uint)uVar6;
*(uint *)((long)param_1 + 0x14) = uVar7;
*(int4 *)(param_1 + 3) = 0;
uVar10 = (uint)((long)pbVar18 - (long)pbVar17);
uVar12 = uVar7 - uVar10;
if (uVar7 < uVar10) {
pbVar16 = pbVar17;
uVar12 = (uint)uVar6;
if (pbVar18 != pbVar2) {
uVar14 = *puVar5;
goto LAB_00139dd4;
}
}
else {
__dest = __dest + ((long)pbVar18 - (long)pbVar17 & 0xffffffff);
}
if (((param_2 & 2) != 0) && ((pbVar16[(ulong)uVar12 - 1] & 1) != 0)) {
iVar8 = 1;
if (0xf2 < pbVar16[uVar12]) {
iVar8 = pbVar16[uVar12] - 0xf8;
}
uVar12 = uVar12 + iVar8;
*(uint *)((long)param_1 + 0x14) = iVar8 + (uint)uVar6;
*(int4 *)(param_1 + 3) = 0x100000;
}
memcpy(__dest,pbVar16,(ulong)(uVar12 + param_3));
*param_4 = pbVar16 + (ulong)uVar12 + (ulong)param_3;
iVar8 = *(int *)((long)param_1 + 0x14) + *(int *)(param_1 + 2);
}
else {
if (uVar12 <= *(ushort *)((long)puVar5 + 0xae)) {
pbVar18 = __dest + uVar12;
pbVar17 = __dest;
goto LAB_00139c62;
}
uVar14 = *puVar5;
LAB_00139dd4:
_ma_set_fatal_error_with_share(uVar14,0x7e);
iVar8 = 0;
}
return iVar8;
}
| |
22,790 | LefDefParser::lefwEncrypt() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwEncrypt()
{
if (!lefwFile || (lefwFile == stdout)) {
// No output filename is given
fprintf(stderr, "ERROR (LEFWRITE-4006): Need an output file if writing in encrypted format.\n");
return LEFW_BAD_ORDER;
}
// Set the flag in crypt.cpp
encWritingEncrypted();
lefwWriteEncrypt = 1;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwEncrypt():
pushq %rax
leaq 0xad388(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
je 0x17ee4
leaq 0xad37b(%rip), %rax # 0xc5250
movq (%rax), %rax
movq 0xaa0d1(%rip), %rcx # 0xc1fb0
cmpq (%rcx), %rax
jne 0x17f06
movq 0xaa0dd(%rip), %rax # 0xc1fc8
movq (%rax), %rdi
leaq 0x7a83c(%rip), %rsi # 0x92731
movb $0x0, %al
callq 0x2370
movl $0x2, 0x4(%rsp)
jmp 0x17f1d
callq 0x8bef0
movl $0x1, 0xad627(%rip) # 0xc553c
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser11lefwEncryptEv:
push rax
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jz short loc_17EE4
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rax, [rax]
mov rcx, cs:stdout_ptr
cmp rax, [rcx]
jnz short loc_17F06
loc_17EE4:
mov rax, cs:stderr_ptr
mov rdi, [rax]; this
lea rsi, aErrorLefwrite4; "ERROR (LEFWRITE-4006): Need an output f"...
mov al, 0
call _fprintf
mov [rsp+8+var_4], 2
jmp short loc_17F1D
loc_17F06:
call _ZN12LefDefParser19encWritingEncryptedEv; LefDefParser::encWritingEncrypted(void)
mov cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
mov [rsp+8+var_4], 0
loc_17F1D:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::lefwEncrypt(LefDefParser *this)
{
if ( *(_QWORD *)&LefDefParser::lefwFile && *(_QWORD *)&LefDefParser::lefwFile != stdout )
{
LefDefParser::encWritingEncrypted(this);
LefDefParser::lefwWriteEncrypt = 1;
return 0;
}
else
{
fprintf(stderr, "ERROR (LEFWRITE-4006): Need an output file if writing in encrypted format.\n");
return 2;
}
}
| lefwEncrypt:
PUSH RAX
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JZ 0x00117ee4
LEA RAX,[0x1c5250]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [0x001c1fb0]
CMP RAX,qword ptr [RCX]
JNZ 0x00117f06
LAB_00117ee4:
MOV RAX,qword ptr [0x001c1fc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x192731]
MOV AL,0x0
CALL 0x00102370
MOV dword ptr [RSP + 0x4],0x2
JMP 0x00117f1d
LAB_00117f06:
CALL 0x0018bef0
MOV dword ptr [0x001c553c],0x1
MOV dword ptr [RSP + 0x4],0x0
LAB_00117f1d:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::lefwEncrypt() */
int4 LefDefParser::lefwEncrypt(void)
{
int4 local_4;
if ((lefwFile == 0) || (lefwFile == *(long *)PTR_stdout_001c1fb0)) {
fprintf(*(FILE **)PTR_stderr_001c1fc8,
"ERROR (LEFWRITE-4006): Need an output file if writing in encrypted format.\n");
local_4 = 2;
}
else {
encWritingEncrypted();
lefwWriteEncrypt = 1;
local_4 = 0;
}
return local_4;
}
| |
22,791 | LefDefParser::lefwEncrypt() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwEncrypt()
{
if (!lefwFile || (lefwFile == stdout)) {
// No output filename is given
fprintf(stderr, "ERROR (LEFWRITE-4006): Need an output file if writing in encrypted format.\n");
return LEFW_BAD_ORDER;
}
// Set the flag in crypt.cpp
encWritingEncrypted();
lefwWriteEncrypt = 1;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwEncrypt():
pushq %rax
leaq 0x7d27a(%rip), %rax # 0x8d0f0
movq (%rax), %rax
testq %rax, %rax
je 0xfe9a
movq 0x7a11b(%rip), %rcx # 0x89fa0
cmpq (%rcx), %rax
je 0xfe9a
callq 0x55aef
movb $0x1, 0x7d546(%rip) # 0x8d3dc
xorl %eax, %eax
popq %rcx
retq
callq 0x254d
movl $0x2, %eax
jmp 0xfe98
| _ZN12LefDefParser11lefwEncryptEv:
push rax
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rax, [rax]
test rax, rax
jz short loc_FE9A
mov rcx, cs:stdout_ptr
cmp rax, [rcx]
jz short loc_FE9A
call _ZN12LefDefParser19encWritingEncryptedEv; LefDefParser::encWritingEncrypted(void)
mov cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
xor eax, eax
loc_FE98:
pop rcx
retn
loc_FE9A:
call _ZN12LefDefParser11lefwEncryptEv_cold_1; LefDefParser::lefwEncrypt(void) [clone]
mov eax, 2
jmp short loc_FE98
| long long LefDefParser::lefwEncrypt(LefDefParser *this)
{
if ( !*(_QWORD *)&LefDefParser::lefwFile || *(_QWORD *)&LefDefParser::lefwFile == stdout )
{
LefDefParser::lefwEncrypt(this);
return 2LL;
}
else
{
LefDefParser::encWritingEncrypted(this);
LefDefParser::lefwWriteEncrypt = 1;
return 0LL;
}
}
| lefwEncrypt:
PUSH RAX
LEA RAX,[0x18d0f0]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0010fe9a
MOV RCX,qword ptr [0x00189fa0]
CMP RAX,qword ptr [RCX]
JZ 0x0010fe9a
CALL 0x00155aef
MOV byte ptr [0x0018d3dc],0x1
XOR EAX,EAX
LAB_0010fe98:
POP RCX
RET
LAB_0010fe9a:
CALL 0x0010254d
MOV EAX,0x2
JMP 0x0010fe98
|
/* LefDefParser::lefwEncrypt() */
int8 LefDefParser::lefwEncrypt(void)
{
int8 uVar1;
if ((lefwFile == 0) || (lefwFile == *(long *)PTR_stdout_00189fa0)) {
lefwEncrypt();
uVar1 = 2;
}
else {
encWritingEncrypted();
lefwWriteEncrypt = 1;
uVar1 = 0;
}
return uVar1;
}
| |
22,792 | js_unary_arith_bigint | bluesky950520[P]quickjs/quickjs.c | static int js_unary_arith_bigint(JSContext *ctx,
JSValue *pres, OPCodeEnum op, JSValue op1)
{
bf_t a_s, *r, *a;
int ret, v;
JSValue res;
if (op == OP_plus) {
JS_ThrowTypeError(ctx, "BigInt argument with unary +");
JS_FreeValue(ctx, op1);
return -1;
}
res = JS_NewBigInt(ctx);
if (JS_IsException(res)) {
JS_FreeValue(ctx, op1);
return -1;
}
r = JS_GetBigInt(res);
a = JS_ToBigIntFree(ctx, &a_s, op1); // infallible, always a bigint
ret = 0;
switch(op) {
case OP_inc:
case OP_dec:
v = 2 * (op - OP_dec) - 1;
ret = bf_add_si(r, a, v, BF_PREC_INF, BF_RNDZ);
break;
case OP_plus:
ret = bf_set(r, a);
break;
case OP_neg:
ret = bf_set(r, a);
bf_neg(r);
break;
case OP_not:
ret = bf_add_si(r, a, 1, BF_PREC_INF, BF_RNDZ);
bf_neg(r);
break;
default:
abort();
}
JS_FreeBigInt(ctx, a, &a_s);
if (unlikely(ret)) {
JS_FreeValue(ctx, res);
throw_bf_exception(ctx, ret);
return -1;
}
res = JS_CompactBigInt(ctx, res);
*pres = res;
return 0;
} | O1 | c | js_unary_arith_bigint:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movq %rcx, %rbp
movq %rdi, %rbx
cmpl $0x8d, %edx
jne 0x42163
leaq 0x5be2d(%rip), %rsi # 0x9df63
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1ccb2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %r12d
movq %rsi, %r14
movq %rbx, %rdi
callq 0xfe44
cmpl $0x6, %edx
je 0x42140
movq %rdx, 0x8(%rsp)
movq %rax, (%rsp)
movq %rax, %r15
addq $0x8, %r15
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3d847
movq %rax, %r13
leal -0x8e(%r12), %eax
cmpl $0x2, %eax
jb 0x421e1
cmpl $0x8c, %r12d
je 0x4220f
cmpl $0x95, %r12d
jne 0x422c6
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %edx
movq %r15, %rdi
movq %r13, %rsi
movl $0x1, %r8d
callq 0x8634c
jmp 0x4221a
leal -0x11d(,%r12,2), %eax
movslq %eax, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movq %r15, %rdi
movq %r13, %rsi
movl $0x1, %r8d
callq 0x8634c
movl %eax, %ebp
movq (%rsp), %r15
jmp 0x42225
movq %r15, %rdi
movq %r13, %rsi
callq 0x84079
movl %eax, %ebp
movq (%rsp), %r15
xorb $0x1, 0x10(%r15)
leaq 0x10(%rsp), %rax
cmpq %rax, %r13
je 0x42258
movq 0x18(%rbx), %rdi
movl -0x8(%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x8(%r13)
cmpl $0x1, %eax
jg 0x42272
addq $-0x8, %r13
movq %r13, %rsi
movq $-0x9, %rdx
callq 0x20652
jmp 0x42272
movq (%r13), %rax
testq %rax, %rax
je 0x42272
movq 0x20(%r13), %rsi
testq %rsi, %rsi
je 0x42272
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %ebp, %ebp
jne 0x422a6
movq 0x8(%rsp), %rcx
cmpq $-0x9, %rcx
jne 0x42298
xorl %eax, %eax
cmpq 0x18(%r15), %rax
jno 0x42298
cmpl $0x0, 0x10(%r15)
je 0x42298
movl $0x0, 0x10(%r15)
movq %r15, (%r14)
movq %rcx, 0x8(%r14)
xorl %eax, %eax
jmp 0x42154
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
callq 0x1ccb2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4208f
jmp 0x4214f
callq 0xe090
| js_unary_arith_bigint:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov rbp, rcx
mov rbx, rdi
cmp edx, 8Dh
jnz short loc_42163
lea rsi, aBigintArgument; "BigInt argument with unary +"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_42140:
mov rdi, [rbx+18h]
mov rsi, rbp
mov rdx, r13
call JS_FreeValueRT
loc_4214F:
mov eax, 0FFFFFFFFh
loc_42154:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_42163:
mov r12d, edx
mov r14, rsi
mov rdi, rbx
call JS_NewBigInt
cmp edx, 6
jz short loc_42140
mov [rsp+68h+var_60], rdx
mov [rsp+68h+var_68], rax
mov r15, rax
add r15, 8
lea rsi, [rsp+68h+var_58]
mov rdi, rbx
mov rdx, rbp
mov rcx, r13
call JS_ToBigIntFree
mov r13, rax
lea eax, [r12-8Eh]
cmp eax, 2
jb short loc_421E1
cmp r12d, 8Ch
jz short loc_4220F
cmp r12d, 95h
jnz loc_422C6
mov rcx, 3FFFFFFFFFFFFFFFh
mov edx, 1
mov rdi, r15
mov rsi, r13
mov r8d, 1
call bf_add_si
jmp short loc_4221A
loc_421E1:
lea eax, ds:0FFFFFFFFFFFFFEE3h[r12*2]
movsxd rdx, eax
mov rcx, 3FFFFFFFFFFFFFFFh
mov rdi, r15
mov rsi, r13
mov r8d, 1
call bf_add_si
mov ebp, eax
mov r15, [rsp+68h+var_68]
jmp short loc_42225
loc_4220F:
mov rdi, r15
mov rsi, r13
call bf_set
loc_4221A:
mov ebp, eax
mov r15, [rsp+68h+var_68]
xor byte ptr [r15+10h], 1
loc_42225:
lea rax, [rsp+68h+var_58]
cmp r13, rax
jz short loc_42258
mov rdi, [rbx+18h]
mov eax, [r13-8]
lea ecx, [rax-1]
mov [r13-8], ecx
cmp eax, 1
jg short loc_42272
add r13, 0FFFFFFFFFFFFFFF8h
mov rsi, r13
mov rdx, 0FFFFFFFFFFFFFFF7h
call js_free_value_rt
jmp short loc_42272
loc_42258:
mov rax, [r13+0]
test rax, rax
jz short loc_42272
mov rsi, [r13+20h]
test rsi, rsi
jz short loc_42272
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_42272:
test ebp, ebp
jnz short loc_422A6
mov rcx, [rsp+68h+var_60]
cmp rcx, 0FFFFFFFFFFFFFFF7h
jnz short loc_42298
xor eax, eax
cmp rax, [r15+18h]
jno short loc_42298
cmp dword ptr [r15+10h], 0
jz short loc_42298
mov dword ptr [r15+10h], 0
loc_42298:
mov [r14], r15
mov [r14+8], rcx
xor eax, eax
jmp loc_42154
loc_422A6:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, [rsp+68h+var_60]
call JS_FreeValueRT
mov rdi, rbx
mov esi, ebp
call throw_bf_exception
jmp loc_4214F
loc_422C6:
call _abort
| long long js_unary_arith_bigint(
long long a1,
_QWORD *a2,
long long a3,
_DWORD *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v18; // r12d
_DWORD *v20; // rax
long long v21; // rdx
double v22; // xmm4_8
double v23; // xmm5_8
_DWORD *v24; // r15
_QWORD **v25; // r13
unsigned int v26; // eax
long long v27; // r8
long long v28; // r9
unsigned int v29; // ebp
_DWORD *v30; // r15
long long v31; // rdi
int v32; // eax
long long v33; // rcx
_QWORD *v34; // rsi
int v35; // edx
int v36; // ecx
long long v37; // r8
long long v38; // r9
__m128 v39; // xmm4
__m128 v40; // xmm5
char v41; // [rsp+0h] [rbp-68h]
_DWORD *v42; // [rsp+0h] [rbp-68h]
long long v43; // [rsp+8h] [rbp-60h]
_BYTE v44[88]; // [rsp+10h] [rbp-58h] BYREF
if ( (_DWORD)a3 == 141 )
{
JS_ThrowTypeError(
a1,
(long long)"BigInt argument with unary +",
a3,
(long long)a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v41);
LABEL_3:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a4, a5);
return 0xFFFFFFFFLL;
}
v18 = a3;
v20 = JS_NewBigInt(a1);
if ( (_DWORD)v21 == 6 )
goto LABEL_3;
v43 = v21;
v42 = v20;
v24 = v20 + 2;
v25 = (_QWORD **)JS_ToBigIntFree(a1, (long long)v44, a4, a5, a7, a8, a9, a10, v22, v23, a13, a14);
if ( (unsigned int)(v18 - 142) < 2 )
{
v29 = bf_add_si(v24, v25, 2 * v18 - 285, 0x3FFFFFFFFFFFFFFFLL, 1LL);
v30 = v42;
}
else
{
if ( v18 == 140 )
{
v26 = bf_set(v24, v25);
}
else
{
if ( v18 != 149 )
abort((const char *)a1);
v26 = bf_add_si(v24, v25, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
v29 = v26;
v30 = v42;
*((_BYTE *)v42 + 16) ^= 1u;
}
if ( v25 == (_QWORD **)v44 )
{
if ( *v25 )
{
v34 = v25[4];
if ( v34 )
((void ( *)(_QWORD, _QWORD *, _QWORD))(*v25)[1])(**v25, v34, 0LL);
}
}
else
{
v31 = *(_QWORD *)(a1 + 24);
v32 = *((_DWORD *)v25 - 2);
v33 = (unsigned int)(v32 - 1);
*((_DWORD *)v25 - 2) = v33;
if ( v32 <= 1 )
js_free_value_rt(v31, v25 - 1, -9LL, v33, v27, v28);
}
if ( v29 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v30, v43);
throw_bf_exception(a1, v29, v35, v36, v37, v38, a7, a8, a9, a10, v39, v40, a13, a14, (char)v42);
return 0xFFFFFFFFLL;
}
if ( v43 == -9 && __OFSUB__(0LL, *((_QWORD *)v30 + 3)) )
{
if ( v30[4] )
v30[4] = 0;
}
*a2 = v30;
a2[1] = v43;
return 0LL;
}
| js_unary_arith_bigint:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,R8
MOV RBP,RCX
MOV RBX,RDI
CMP EDX,0x8d
JNZ 0x00142163
LEA RSI,[0x19df63]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
LAB_00142140:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RBP
MOV RDX,R13
CALL 0x0011ccb2
LAB_0014214f:
MOV EAX,0xffffffff
LAB_00142154:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00142163:
MOV R12D,EDX
MOV R14,RSI
MOV RDI,RBX
CALL 0x0010fe44
CMP EDX,0x6
JZ 0x00142140
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP],RAX
MOV R15,RAX
ADD R15,0x8
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
MOV RDX,RBP
MOV RCX,R13
CALL 0x0013d847
MOV R13,RAX
LEA EAX,[R12 + -0x8e]
CMP EAX,0x2
JC 0x001421e1
CMP R12D,0x8c
JZ 0x0014220f
CMP R12D,0x95
JNZ 0x001422c6
MOV RCX,0x3fffffffffffffff
MOV EDX,0x1
MOV RDI,R15
MOV RSI,R13
MOV R8D,0x1
CALL 0x0018634c
JMP 0x0014221a
LAB_001421e1:
LEA EAX,[-0x11d + R12*0x2]
MOVSXD RDX,EAX
MOV RCX,0x3fffffffffffffff
MOV RDI,R15
MOV RSI,R13
MOV R8D,0x1
CALL 0x0018634c
MOV EBP,EAX
MOV R15,qword ptr [RSP]
JMP 0x00142225
LAB_0014220f:
MOV RDI,R15
MOV RSI,R13
CALL 0x00184079
LAB_0014221a:
MOV EBP,EAX
MOV R15,qword ptr [RSP]
XOR byte ptr [R15 + 0x10],0x1
LAB_00142225:
LEA RAX,[RSP + 0x10]
CMP R13,RAX
JZ 0x00142258
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R13 + -0x8]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13 + -0x8],ECX
CMP EAX,0x1
JG 0x00142272
ADD R13,-0x8
MOV RSI,R13
MOV RDX,-0x9
CALL 0x00120652
JMP 0x00142272
LAB_00142258:
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00142272
MOV RSI,qword ptr [R13 + 0x20]
TEST RSI,RSI
JZ 0x00142272
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00142272:
TEST EBP,EBP
JNZ 0x001422a6
MOV RCX,qword ptr [RSP + 0x8]
CMP RCX,-0x9
JNZ 0x00142298
XOR EAX,EAX
CMP RAX,qword ptr [R15 + 0x18]
JNO 0x00142298
CMP dword ptr [R15 + 0x10],0x0
JZ 0x00142298
MOV dword ptr [R15 + 0x10],0x0
LAB_00142298:
MOV qword ptr [R14],R15
MOV qword ptr [R14 + 0x8],RCX
XOR EAX,EAX
JMP 0x00142154
LAB_001422a6:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0011ccb2
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014208f
JMP 0x0014214f
LAB_001422c6:
CALL 0x0010e090
|
/* WARNING: Removing unreachable block (ram,0x00142289) */
/* WARNING: Removing unreachable block (ram,0x00142290) */
int8
js_unary_arith_bigint
(long param_1,int1 (*param_2) [16],int param_3,int8 param_4,int8 param_5
)
{
int8 uVar1;
int8 *puVar2;
int iVar3;
long lVar4;
long *plVar5;
long lVar6;
int1 auVar7 [16];
long local_58 [5];
if (param_3 == 0x8d) {
JS_ThrowTypeError(param_1,"BigInt argument with unary +");
}
else {
auVar7 = JS_NewBigInt(param_1);
lVar4 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
lVar6 = lVar4 + 8;
plVar5 = (long *)JS_ToBigIntFree(param_1,local_58,param_4,param_5);
if (param_3 - 0x8eU < 2) {
iVar3 = bf_add_si(lVar6,plVar5,(long)(param_3 * 2 + -0x11d),0x3fffffffffffffff,1);
}
else {
if (param_3 == 0x8c) {
iVar3 = bf_set(lVar6,plVar5);
}
else {
if (param_3 != 0x95) {
/* WARNING: Subroutine does not return */
abort();
}
iVar3 = bf_add_si(lVar6,plVar5,1,0x3fffffffffffffff,1);
}
*(byte *)(lVar4 + 0x10) = *(byte *)(lVar4 + 0x10) ^ 1;
}
if (plVar5 == local_58) {
puVar2 = (int8 *)*plVar5;
if ((puVar2 != (int8 *)0x0) && (plVar5[4] != 0)) {
(*(code *)puVar2[1])(*puVar2,plVar5[4],0);
}
}
else {
uVar1 = *(int8 *)(param_1 + 0x18);
lVar6 = plVar5[-1];
*(int *)(plVar5 + -1) = (int)lVar6 + -1;
if ((int)lVar6 < 2) {
js_free_value_rt(uVar1,plVar5 + -1,0xfffffffffffffff7);
}
}
if (iVar3 != 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar4,auVar7._8_8_);
throw_bf_exception(param_1,iVar3);
return 0xffffffff;
}
*param_2 = auVar7;
return 0;
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_4,param_5);
return 0xffffffff;
}
| |
22,793 | js_unary_arith_bigint | bluesky950520[P]quickjs/quickjs.c | static int js_unary_arith_bigint(JSContext *ctx,
JSValue *pres, OPCodeEnum op, JSValue op1)
{
bf_t a_s, *r, *a;
int ret, v;
JSValue res;
if (op == OP_plus) {
JS_ThrowTypeError(ctx, "BigInt argument with unary +");
JS_FreeValue(ctx, op1);
return -1;
}
res = JS_NewBigInt(ctx);
if (JS_IsException(res)) {
JS_FreeValue(ctx, op1);
return -1;
}
r = JS_GetBigInt(res);
a = JS_ToBigIntFree(ctx, &a_s, op1); // infallible, always a bigint
ret = 0;
switch(op) {
case OP_inc:
case OP_dec:
v = 2 * (op - OP_dec) - 1;
ret = bf_add_si(r, a, v, BF_PREC_INF, BF_RNDZ);
break;
case OP_plus:
ret = bf_set(r, a);
break;
case OP_neg:
ret = bf_set(r, a);
bf_neg(r);
break;
case OP_not:
ret = bf_add_si(r, a, 1, BF_PREC_INF, BF_RNDZ);
bf_neg(r);
break;
default:
abort();
}
JS_FreeBigInt(ctx, a, &a_s);
if (unlikely(ret)) {
JS_FreeValue(ctx, res);
throw_bf_exception(ctx, ret);
return -1;
}
res = JS_CompactBigInt(ctx, res);
*pres = res;
return 0;
} | O3 | c | js_unary_arith_bigint:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movq %rcx, %rbp
movq %rdi, %rbx
cmpl $0x8d, %edx
jne 0x43d16
leaq 0x5d262(%rip), %rsi # 0xa0f33
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpl $-0x9, %r13d
jb 0x43d04
movq 0x18(%rbx), %rdi
movl (%rbp), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbp)
cmpl $0x1, %eax
jg 0x43d04
movq %rbp, %rsi
movq %r13, %rdx
callq 0x20d90
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %r15d
movq %rsi, %r12
movq %rbx, %rdi
callq 0xffa8
cmpl $0x6, %edx
je 0x43cdb
movq %rdx, 0x8(%rsp)
movq %rax, (%rsp)
movq %rax, %r14
addq $0x8, %r14
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3efa8
movq %rax, %r13
leal -0x8e(%r15), %eax
cmpl $0x2, %eax
jb 0x43d93
cmpl $0x8c, %r15d
je 0x43dc1
cmpl $0x95, %r15d
jne 0x43e99
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %r8d
callq 0x88d9b
jmp 0x43dcc
leal -0x11d(,%r15,2), %eax
movslq %eax, %rdx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %r8d
callq 0x88d9b
movl %eax, %ebp
movq (%rsp), %r14
jmp 0x43dd7
movq %r14, %rdi
movq %r13, %rsi
callq 0x86a9a
movl %eax, %ebp
movq (%rsp), %r14
xorb $0x1, 0x10(%r14)
leaq 0x10(%rsp), %rax
cmpq %rax, %r13
je 0x43e0a
movq 0x18(%rbx), %rdi
movl -0x8(%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x8(%r13)
cmpl $0x1, %eax
jg 0x43e24
addq $-0x8, %r13
movq %r13, %rsi
movq $-0x9, %rdx
callq 0x20d90
jmp 0x43e24
movq (%r13), %rax
testq %rax, %rax
je 0x43e24
movq 0x20(%r13), %rsi
testq %rsi, %rsi
je 0x43e24
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %ebp, %ebp
jne 0x43e5b
movq 0x8(%rsp), %rcx
cmpq $-0x9, %rcx
jne 0x43e4a
xorl %eax, %eax
cmpq 0x18(%r14), %rax
jno 0x43e4a
cmpl $0x0, 0x10(%r14)
je 0x43e4a
movl $0x0, 0x10(%r14)
movq %r14, (%r12)
movq %rcx, 0x8(%r12)
xorl %r14d, %r14d
jmp 0x43d04
cmpl $-0x9, 0x8(%rsp)
jb 0x43e84
movq 0x18(%rbx), %rdi
movq (%rsp), %rdx
movl (%rdx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rdx)
cmpl $0x1, %eax
jg 0x43e84
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x20d90
movq %rbx, %rdi
movl %ebp, %esi
callq 0x43c2a
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x43d04
callq 0xe090
| js_unary_arith_bigint:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov rbp, rcx
mov rbx, rdi
cmp edx, 8Dh
jnz short loc_43D16
lea rsi, aBigintArgument; "BigInt argument with unary +"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_43CDB:
mov r14d, 0FFFFFFFFh
cmp r13d, 0FFFFFFF7h
jb short loc_43D04
mov rdi, [rbx+18h]
mov eax, [rbp+0]
lea ecx, [rax-1]
mov [rbp+0], ecx
cmp eax, 1
jg short loc_43D04
mov rsi, rbp
mov rdx, r13
call js_free_value_rt
loc_43D04:
mov eax, r14d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_43D16:
mov r15d, edx
mov r12, rsi
mov rdi, rbx
call JS_NewBigInt
cmp edx, 6
jz short loc_43CDB
mov [rsp+68h+var_60], rdx
mov [rsp+68h+var_68], rax
mov r14, rax
add r14, 8
lea rsi, [rsp+68h+var_58]
mov rdi, rbx
mov rdx, rbp
mov rcx, r13
call JS_ToBigIntFree
mov r13, rax
lea eax, [r15-8Eh]
cmp eax, 2
jb short loc_43D93
cmp r15d, 8Ch
jz short loc_43DC1
cmp r15d, 95h
jnz loc_43E99
mov rcx, 3FFFFFFFFFFFFFFFh
mov edx, 1
mov rdi, r14
mov rsi, r13
mov r8d, 1
call bf_add_si
jmp short loc_43DCC
loc_43D93:
lea eax, ds:0FFFFFFFFFFFFFEE3h[r15*2]
movsxd rdx, eax
mov rcx, 3FFFFFFFFFFFFFFFh
mov rdi, r14
mov rsi, r13
mov r8d, 1
call bf_add_si
mov ebp, eax
mov r14, [rsp+68h+var_68]
jmp short loc_43DD7
loc_43DC1:
mov rdi, r14
mov rsi, r13
call bf_set
loc_43DCC:
mov ebp, eax
mov r14, [rsp+68h+var_68]
xor byte ptr [r14+10h], 1
loc_43DD7:
lea rax, [rsp+68h+var_58]
cmp r13, rax
jz short loc_43E0A
mov rdi, [rbx+18h]
mov eax, [r13-8]
lea ecx, [rax-1]
mov [r13-8], ecx
cmp eax, 1
jg short loc_43E24
add r13, 0FFFFFFFFFFFFFFF8h
mov rsi, r13
mov rdx, 0FFFFFFFFFFFFFFF7h
call js_free_value_rt
jmp short loc_43E24
loc_43E0A:
mov rax, [r13+0]
test rax, rax
jz short loc_43E24
mov rsi, [r13+20h]
test rsi, rsi
jz short loc_43E24
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_43E24:
test ebp, ebp
jnz short loc_43E5B
mov rcx, [rsp+68h+var_60]
cmp rcx, 0FFFFFFFFFFFFFFF7h
jnz short loc_43E4A
xor eax, eax
cmp rax, [r14+18h]
jno short loc_43E4A
cmp dword ptr [r14+10h], 0
jz short loc_43E4A
mov dword ptr [r14+10h], 0
loc_43E4A:
mov [r12], r14
mov [r12+8], rcx
xor r14d, r14d
jmp loc_43D04
loc_43E5B:
cmp dword ptr [rsp+68h+var_60], 0FFFFFFF7h
jb short loc_43E84
mov rdi, [rbx+18h]
mov rdx, [rsp+68h+var_68]
mov eax, [rdx]
lea ecx, [rax-1]
mov [rdx], ecx
cmp eax, 1
jg short loc_43E84
mov rsi, [rsp+68h+var_68]
mov rdx, [rsp+68h+var_60]
call js_free_value_rt
loc_43E84:
mov rdi, rbx
mov esi, ebp
call throw_bf_exception
mov r14d, 0FFFFFFFFh
jmp loc_43D04
loc_43E99:
call _abort
| long long js_unary_arith_bigint(
long long a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v17; // r8
long long v18; // r9
unsigned int v19; // r14d
long long v20; // rdi
int v21; // eax
long long v22; // rcx
int v24; // r15d
_DWORD *v26; // rax
long long v27; // rdx
__m128 v28; // xmm4
__m128 v29; // xmm5
_DWORD *v30; // r14
_QWORD *v31; // r13
unsigned int v32; // eax
int v33; // edx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
unsigned int v39; // ebp
_DWORD *v40; // r14
long long v41; // rdi
int v42; // eax
long long v43; // rsi
long long v44; // rdi
int v45; // eax
char v46; // [rsp+0h] [rbp-68h]
_DWORD *v47; // [rsp+0h] [rbp-68h]
long long v48; // [rsp+8h] [rbp-60h]
_BYTE v49[88]; // [rsp+10h] [rbp-58h] BYREF
if ( (_DWORD)a3 == 141 )
{
JS_ThrowTypeError(
a1,
(long long)"BigInt argument with unary +",
a3,
(long long)a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v46);
LABEL_3:
v19 = -1;
if ( (unsigned int)a5 >= 0xFFFFFFF7 )
{
v20 = *(_QWORD *)(a1 + 24);
v21 = *(_DWORD *)a4;
v22 = (unsigned int)(*(_DWORD *)a4 - 1);
*(_DWORD *)a4 = v22;
if ( v21 <= 1 )
js_free_value_rt(v20, a4, a5, v22, v17, v18);
}
return v19;
}
v24 = a3;
v26 = JS_NewBigInt(a1);
if ( (_DWORD)v27 == 6 )
goto LABEL_3;
v48 = v27;
v47 = v26;
v30 = v26 + 2;
v31 = JS_ToBigIntFree(a1, (long long)v49, (long long)a4, a5, v17, v18, a7, a8, a9, a10, v28, v29, a13, a14);
if ( (unsigned int)(v24 - 142) < 2 )
{
v39 = bf_add_si(v30, v31, 2 * v24 - 285, 0x3FFFFFFFFFFFFFFFLL, 1LL);
v40 = v47;
}
else
{
if ( v24 == 140 )
{
v32 = bf_set(v30, v31);
}
else
{
if ( v24 != 149 )
abort((const char *)a1);
v32 = bf_add_si(v30, v31, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL);
}
v39 = v32;
v40 = v47;
*((_BYTE *)v47 + 16) ^= 1u;
}
if ( v31 == (_QWORD *)v49 )
{
if ( *v31 )
{
v43 = v31[4];
if ( v43 )
(*(void ( **)(_QWORD, long long, _QWORD))(*v31 + 8LL))(*(_QWORD *)*v31, v43, 0LL);
}
}
else
{
v41 = *(_QWORD *)(a1 + 24);
v42 = *((_DWORD *)v31 - 2);
v34 = (unsigned int)(v42 - 1);
*((_DWORD *)v31 - 2) = v34;
if ( v42 <= 1 )
js_free_value_rt(v41, v31 - 1, -9LL, v34, v35, v36);
}
if ( v39 )
{
if ( (unsigned int)v48 >= 0xFFFFFFF7 )
{
v44 = *(_QWORD *)(a1 + 24);
v33 = (int)v47;
v45 = *v47;
v34 = (unsigned int)(*v47 - 1);
*v47 = v34;
if ( v45 <= 1 )
js_free_value_rt(v44, v47, v48, v34, v35, v36);
}
throw_bf_exception(a1, v39, v33, v34, v35, v36, a7, a8, a9, a10, v37, v38, a13, a14, (char)v47);
return (unsigned int)-1;
}
else
{
if ( v48 == -9 && __OFSUB__(0LL, *((_QWORD *)v40 + 3)) && v40[4] )
v40[4] = 0;
*a2 = v40;
a2[1] = v48;
return 0;
}
}
| js_unary_arith_bigint:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,R8
MOV RBP,RCX
MOV RBX,RDI
CMP EDX,0x8d
JNZ 0x00143d16
LEA RSI,[0x1a0f33]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
LAB_00143cdb:
MOV R14D,0xffffffff
CMP R13D,-0x9
JC 0x00143d04
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [RBP]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBP],ECX
CMP EAX,0x1
JG 0x00143d04
MOV RSI,RBP
MOV RDX,R13
CALL 0x00120d90
LAB_00143d04:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00143d16:
MOV R15D,EDX
MOV R12,RSI
MOV RDI,RBX
CALL 0x0010ffa8
CMP EDX,0x6
JZ 0x00143cdb
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP],RAX
MOV R14,RAX
ADD R14,0x8
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
MOV RDX,RBP
MOV RCX,R13
CALL 0x0013efa8
MOV R13,RAX
LEA EAX,[R15 + -0x8e]
CMP EAX,0x2
JC 0x00143d93
CMP R15D,0x8c
JZ 0x00143dc1
CMP R15D,0x95
JNZ 0x00143e99
MOV RCX,0x3fffffffffffffff
MOV EDX,0x1
MOV RDI,R14
MOV RSI,R13
MOV R8D,0x1
CALL 0x00188d9b
JMP 0x00143dcc
LAB_00143d93:
LEA EAX,[-0x11d + R15*0x2]
MOVSXD RDX,EAX
MOV RCX,0x3fffffffffffffff
MOV RDI,R14
MOV RSI,R13
MOV R8D,0x1
CALL 0x00188d9b
MOV EBP,EAX
MOV R14,qword ptr [RSP]
JMP 0x00143dd7
LAB_00143dc1:
MOV RDI,R14
MOV RSI,R13
CALL 0x00186a9a
LAB_00143dcc:
MOV EBP,EAX
MOV R14,qword ptr [RSP]
XOR byte ptr [R14 + 0x10],0x1
LAB_00143dd7:
LEA RAX,[RSP + 0x10]
CMP R13,RAX
JZ 0x00143e0a
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R13 + -0x8]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13 + -0x8],ECX
CMP EAX,0x1
JG 0x00143e24
ADD R13,-0x8
MOV RSI,R13
MOV RDX,-0x9
CALL 0x00120d90
JMP 0x00143e24
LAB_00143e0a:
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00143e24
MOV RSI,qword ptr [R13 + 0x20]
TEST RSI,RSI
JZ 0x00143e24
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00143e24:
TEST EBP,EBP
JNZ 0x00143e5b
MOV RCX,qword ptr [RSP + 0x8]
CMP RCX,-0x9
JNZ 0x00143e4a
XOR EAX,EAX
CMP RAX,qword ptr [R14 + 0x18]
JNO 0x00143e4a
CMP dword ptr [R14 + 0x10],0x0
JZ 0x00143e4a
MOV dword ptr [R14 + 0x10],0x0
LAB_00143e4a:
MOV qword ptr [R12],R14
MOV qword ptr [R12 + 0x8],RCX
XOR R14D,R14D
JMP 0x00143d04
LAB_00143e5b:
CMP dword ptr [RSP + 0x8],-0x9
JC 0x00143e84
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RSP]
MOV EAX,dword ptr [RDX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDX],ECX
CMP EAX,0x1
JG 0x00143e84
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x00120d90
LAB_00143e84:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00143c2a
MOV R14D,0xffffffff
JMP 0x00143d04
LAB_00143e99:
CALL 0x0010e090
|
/* WARNING: Removing unreachable block (ram,0x00143e3b) */
/* WARNING: Removing unreachable block (ram,0x00143e42) */
int8
js_unary_arith_bigint
(long param_1,int1 (*param_2) [16],int param_3,int *param_4,int8 param_5)
{
int iVar1;
int8 uVar2;
int8 *puVar3;
long lVar4;
int iVar5;
int *piVar6;
long *plVar7;
int *piVar8;
int1 auVar9 [16];
long local_58 [5];
if (param_3 == 0x8d) {
JS_ThrowTypeError(param_1,"BigInt argument with unary +");
}
else {
auVar9 = JS_NewBigInt(param_1);
piVar6 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
piVar8 = piVar6 + 2;
plVar7 = (long *)JS_ToBigIntFree(param_1,local_58,param_4,param_5);
if (param_3 - 0x8eU < 2) {
iVar5 = bf_add_si(piVar8,plVar7,(long)(param_3 * 2 + -0x11d),0x3fffffffffffffff,1);
}
else {
if (param_3 == 0x8c) {
iVar5 = bf_set(piVar8,plVar7);
}
else {
if (param_3 != 0x95) {
/* WARNING: Subroutine does not return */
abort();
}
iVar5 = bf_add_si(piVar8,plVar7,1,0x3fffffffffffffff,1);
}
*(byte *)(piVar6 + 4) = *(byte *)(piVar6 + 4) ^ 1;
}
if (plVar7 == local_58) {
puVar3 = (int8 *)*plVar7;
if ((puVar3 != (int8 *)0x0) && (plVar7[4] != 0)) {
(*(code *)puVar3[1])(*puVar3,plVar7[4],0);
}
}
else {
uVar2 = *(int8 *)(param_1 + 0x18);
lVar4 = plVar7[-1];
*(int *)(plVar7 + -1) = (int)lVar4 + -1;
if ((int)lVar4 < 2) {
js_free_value_rt(uVar2,plVar7 + -1,0xfffffffffffffff7);
}
}
if (iVar5 == 0) {
*param_2 = auVar9;
return 0;
}
if (0xfffffff6 < auVar9._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar6;
*piVar6 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar6,auVar9._8_8_);
}
}
throw_bf_exception(param_1,iVar5);
return 0xffffffff;
}
}
if (0xfffffff6 < (uint)param_5) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar5 = *param_4;
*param_4 = iVar5 + -1;
if (iVar5 < 2) {
js_free_value_rt(uVar2,param_4,param_5);
}
}
return 0xffffffff;
}
| |
22,794 | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!filter) throw std::runtime_error("FilterNode.filter is null");
if (!body) throw std::runtime_error("FilterNode.body is null");
auto filter_value = filter->evaluate(context);
if (!filter_value.is_callable()) {
throw std::runtime_error("Filter must be a callable: " + filter_value.dump());
}
std::string rendered_body = body->render(context);
ArgumentsValue filter_args = {{Value(rendered_body)}, {}};
auto result = filter_value.call(context, filter_args);
out << result.to_str();
} | O2 | cpp | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x77a31
movq %rdi, %r15
cmpq $0x0, 0x30(%rdi)
je 0x77a4d
movq %rdx, %r14
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x62ea2
cmpq $0x0, 0x30(%r12)
je 0x77a7d
movq 0x30(%r15), %rsi
leaq 0xa0(%rsp), %rdi
movq %r14, %rdx
callq 0x7657c
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x66110
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rsp, %rcx
callq 0x6d608
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movups %xmm0, 0x18(%r15)
andq $0x0, 0x28(%r15)
leaq 0x50(%rsp), %rdi
callq 0x63132
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x6d8c4
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x7061c
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x247b0
movq %rsp, %rdi
callq 0x251b8
leaq 0x50(%rsp), %rdi
callq 0x63132
leaq 0x20(%rsp), %rdi
callq 0x6d9a8
leaq 0xa0(%rsp), %rdi
callq 0x251b8
leaq 0xc0(%rsp), %rdi
callq 0x63132
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x3f165(%rip), %rsi # 0xb6ba8
movq %rax, %rdi
callq 0x24320
jmp 0x77a67
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x3f163(%rip), %rsi # 0xb6bc2
movq %rax, %rdi
callq 0x24320
movq 0x88582(%rip), %rsi # 0xffff0
movq 0x884db(%rip), %rdx # 0xfff50
movq %r14, %rdi
callq 0x24ee0
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x20(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
callq 0x63320
leaq 0x3f134(%rip), %rsi # 0xb6bda
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x58a46
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x24e10
xorl %ebp, %ebp
movq 0x88522(%rip), %rsi # 0xffff0
movq 0x8847b(%rip), %rdx # 0xfff50
movq %r14, %rdi
callq 0x24ee0
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x251b8
jmp 0x77af2
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x251b8
testb %bpl, %bpl
jne 0x77b06
jmp 0x77b69
movq %rax, %rbx
movq %r14, %rdi
callq 0x24670
jmp 0x77b69
jmp 0x77b12
movq %rax, %rbx
movq %r14, %rdi
callq 0x24670
jmp 0x77b76
movq %rax, %rbx
movq %rsp, %rdi
callq 0x251b8
jmp 0x77b2f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x63132
jmp 0x77b3e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6d9a8
jmp 0x77b5c
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x63132
jmp 0x77b5c
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x251b8
leaq 0xc0(%rsp), %rdi
callq 0x63132
movq %rbx, %rdi
callq 0x24f60
movq %rax, %rbx
jmp 0x77b69
nop
| _ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_77A31
mov r15, rdi
cmp qword ptr [rdi+30h], 0
jz loc_77A4D
mov r14, rdx
lea r12, [rsp+138h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_77A7D
mov rsi, [r15+30h]
lea rdi, [rsp+138h+var_98]
mov rdx, r14
call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_98]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
lea rdi, [rsp+138h+var_118]
lea rsi, [rsp+138h+var_E8]
push 1
pop rdx
mov rcx, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&)
xorps xmm0, xmm0
lea r15, [rsp+138h+var_118]
movups xmmword ptr [r15+18h], xmm0
and qword ptr [r15+28h], 0
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_78]
mov rdx, r14
mov rcx, r15
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov rdi, rsp; this
lea rsi, [rsp+138h+var_E8]; minja::Value *
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, rsp
mov rdi, rbx
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+138h+var_118]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
lea rdi, [rsp+138h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_77A31:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeFilt; "FilterNode.filter is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_77A67
loc_77A4D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeBody; "FilterNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_77A67:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_77A7D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rdi, [rsp+138h+var_118]
lea rsi, [rsp+138h+var_78]
push 0FFFFFFFFFFFFFFFFh
pop rdx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aFilterMustBeAC; "Filter must be a callable: "
lea rdi, [rsp+138h+var_E8]
lea rdx, [rsp+138h+var_118]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+138h+var_E8]
mov rdi, r14
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, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_77AF2
mov rbx, rax
mov bpl, 1
loc_77AF2:
lea rdi, [rsp+138h+var_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_77B06
jmp short loc_77B69
mov rbx, rax
loc_77B06:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_77B69
jmp short $+2
loc_77B12:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_77B76
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_77B2F
mov rbx, rax
loc_77B2F:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_77B3E
mov rbx, rax
loc_77B3E:
lea rdi, [rsp+138h+var_118]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
jmp short loc_77B5C
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_77B5C
mov rbx, rax
loc_77B5C:
lea rdi, [rsp+138h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_77B69:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_77B76:
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_77B69
| void minja::FilterNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
std::runtime_error *exception; // r14
void *v5; // r14
_BYTE v6[32]; // [rsp+0h] [rbp-138h] BYREF
_BYTE v7[24]; // [rsp+20h] [rbp-118h] BYREF
__int128 v8; // [rsp+38h] [rbp-100h]
long long v9; // [rsp+48h] [rbp-F0h]
_BYTE v10[80]; // [rsp+50h] [rbp-E8h] BYREF
_BYTE v11[32]; // [rsp+A0h] [rbp-98h] BYREF
_BYTE v12[48]; // [rsp+C0h] [rbp-78h] BYREF
long long v13; // [rsp+F0h] [rbp-48h]
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.filter is null");
goto LABEL_7;
}
if ( !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.body is null");
LABEL_7:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v12, v3);
if ( !v13 )
{
v5 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)v12, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Filter must be a callable: ", (long long)v7);
std::runtime_error::runtime_error(v5, v10);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render[abi:cxx11]((long long)v11, *(long long ( ****)(_QWORD))(a1 + 48));
minja::Value::Value((long long)v10, (long long)v11);
std::vector<minja::Value>::vector((long long)v7, (long long)v10, 1LL);
v8 = 0LL;
v9 = 0LL;
minja::Value::~Value((minja::Value *)v10);
minja::Value::call((long long)v10, (long long)v12);
minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v6, (minja::Value *)v10, 0.0);
std::operator<<<char>(a2, v6);
std::string::~string(v6);
minja::Value::~Value((minja::Value *)v10);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7);
std::string::~string(v11);
minja::Value::~Value((minja::Value *)v12);
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x00177a31
MOV R15,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x00177a4d
MOV R14,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x00162ea2
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00177a7d
MOV RSI,qword ptr [R15 + 0x30]
LAB_00177968:
LEA RDI,[RSP + 0xa0]
MOV RDX,R14
CALL 0x0017657c
LAB_00177978:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x00166110
LAB_0017798a:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x50]
PUSH 0x1
POP RDX
MOV RCX,RSP
CALL 0x0016d608
XORPS XMM0,XMM0
LEA R15,[RSP + 0x20]
MOVUPS xmmword ptr [R15 + 0x18],XMM0
AND qword ptr [R15 + 0x28],0x0
LEA RDI,[RSP + 0x50]
CALL 0x00163132
LAB_001779bb:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RDX,R14
MOV RCX,R15
CALL 0x0016d8c4
LAB_001779d3:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
CALL 0x0017061c
LAB_001779e0:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001247b0
LAB_001779eb:
MOV RDI,RSP
CALL 0x001251b8
LEA RDI,[RSP + 0x50]
CALL 0x00163132
LEA RDI,[RSP + 0x20]
CALL 0x0016d9a8
LEA RDI,[RSP + 0xa0]
CALL 0x001251b8
LEA RDI,[RSP + 0xc0]
CALL 0x00163132
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00177a31:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_00177a3c:
LEA RSI,[0x1b6ba8]
MOV RDI,RAX
CALL 0x00124320
LAB_00177a4b:
JMP 0x00177a67
LAB_00177a4d:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_00177a58:
LEA RSI,[0x1b6bc2]
MOV RDI,RAX
CALL 0x00124320
LAB_00177a67:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R14
CALL 0x00124ee0
LAB_00177a7d:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_00177a88:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0xc0]
PUSH -0x1
POP RDX
XOR ECX,ECX
CALL 0x00163320
LAB_00177a9f:
LEA RSI,[0x1b6bda]
LEA RDI,[RSP + 0x50]
LEA RDX,[RSP + 0x20]
CALL 0x00158a46
MOV BPL,0x1
LAB_00177ab8:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x00124e10
XOR EBP,EBP
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R14
CALL 0x00124ee0
|
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
runtime_error *prVar1;
string asStack_138 [32];
vector<minja::Value,std::allocator<minja::Value>> local_118 [24];
int8 local_100;
int8 uStack_f8;
int8 local_f0;
Value local_e8 [80];
TemplateNode local_98 [32];
Expression local_78 [48];
long local_48;
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00177a3c to 00177a4a has its CatchHandler @ 00177b12 */
std::runtime_error::runtime_error(prVar1,"FilterNode.filter is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 00177968 to 00177977 has its CatchHandler @ 00177b7e */
TemplateNode::render_abi_cxx11_(local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 00177978 to 00177989 has its CatchHandler @ 00177b59 */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 0017798a to 0017799e has its CatchHandler @ 00177b4a */
std::vector<minja::Value,std::allocator<minja::Value>>::vector
(local_118,local_e8,1,asStack_138);
local_100 = 0;
uStack_f8 = 0;
local_f0 = 0;
Value::~Value(local_e8);
/* try { // try from 001779bb to 001779d2 has its CatchHandler @ 00177b3b */
Value::call(local_e8,(ArgumentsValue *)local_78);
/* try { // try from 001779d3 to 001779df has its CatchHandler @ 00177b2c */
Value::to_str_abi_cxx11_();
/* try { // try from 001779e0 to 001779ea has its CatchHandler @ 00177b1f */
std::operator<<((ostream *)param_2,asStack_138);
std::__cxx11::string::~string(asStack_138);
Value::~Value(local_e8);
ArgumentsValue::~ArgumentsValue((ArgumentsValue *)local_118);
std::__cxx11::string::~string((string *)local_98);
Value::~Value((Value *)local_78);
return;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00177a88 to 00177a9e has its CatchHandler @ 00177b03 */
Value::dump_abi_cxx11_((int)local_118,SUB81(local_78,0));
/* try { // try from 00177a9f to 00177ab4 has its CatchHandler @ 00177aec */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 00177ab8 to 00177adc has its CatchHandler @ 00177add */
std::runtime_error::runtime_error(prVar1,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00177a58 to 00177a66 has its CatchHandler @ 00177b10 */
std::runtime_error::runtime_error(prVar1,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
| |
22,795 | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!filter) throw std::runtime_error("FilterNode.filter is null");
if (!body) throw std::runtime_error("FilterNode.body is null");
auto filter_value = filter->evaluate(context);
if (!filter_value.is_callable()) {
throw std::runtime_error("Filter must be a callable: " + filter_value.dump());
}
std::string rendered_body = body->render(context);
ArgumentsValue filter_args = {{Value(rendered_body)}, {}};
auto result = filter_value.call(context, filter_args);
out << result.to_str();
} | O3 | cpp | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xa0699
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0xa06b7
movq %rdx, %r15
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x85d20
cmpq $0x0, 0x30(%r12)
je 0xa06e9
movq 0x30(%r14), %rsi
leaq 0xa0(%rsp), %rdi
movq %r15, %rdx
callq 0x9eb26
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x8a070
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movl $0x1, %edx
callq 0x93238
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58644
movq %r14, %rdi
callq 0x5db32
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xa04aa
callq 0x6d556
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa04b9
callq 0x6d556
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xa04c8
callq 0x6d556
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xa04fe
movq 0x8daa7(%rip), %rax # 0x12df80
cmpb $0x0, (%rax)
je 0xa04e9
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa04f3
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa04fe
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x18(%rsp), %r14
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rsp, %rcx
movq %r15, %rdx
callq 0x9361a
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x96912
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x1b9c0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa0557
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58644
movq %rbx, %rdi
callq 0x5db32
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa057f
callq 0x6d556
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa058e
callq 0x6d556
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xa059d
callq 0x6d556
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xa05d3
movq 0x8d9d2(%rip), %rax # 0x12df80
cmpb $0x0, (%rax)
je 0xa05be
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa05c8
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa05d3
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
callq 0x94962
movq %rsp, %rdi
callq 0x8d7f4
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa0604
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58644
movq %rbx, %rdi
callq 0x5db32
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa062c
callq 0x6d556
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0xa063e
callq 0x6d556
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xa0650
callq 0x6d556
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0xa0689
movq 0x8d91c(%rip), %rax # 0x12df80
cmpb $0x0, (%rax)
je 0xa0674
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa067e
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa0689
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b440
movq %rax, %r14
leaq 0x5250b(%rip), %rsi # 0xf2bb8
movq %rax, %rdi
callq 0x1b320
jmp 0xa06d3
movl $0x10, %edi
callq 0x1b440
movq %rax, %r14
leaq 0x52507(%rip), %rsi # 0xf2bd2
movq %rax, %rdi
callq 0x1b320
movq 0x8d90e(%rip), %rsi # 0x12dfe8
movq 0x8d86f(%rip), %rdx # 0x12df50
movq %r14, %rdi
callq 0x1bef0
movl $0x10, %edi
callq 0x1b440
movq %rax, %r14
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86334
leaq 0x524d6(%rip), %rsi # 0xf2bea
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
callq 0x78ac9
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x1be00
xorl %ebp, %ebp
movq 0x8d8ae(%rip), %rsi # 0x12dfe8
movq 0x8d80f(%rip), %rdx # 0x12df50
movq %r14, %rdi
callq 0x1bef0
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa0767
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa0782
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8b0
testb %bpl, %bpl
jne 0xa07af
jmp 0xa084a
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa07af
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0xa07af
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b650
jmp 0xa084a
jmp 0xa07be
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b650
jmp 0xa0857
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa07f1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0xa07f1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x86012
jmp 0xa0800
movq %rax, %rbx
movq %r14, %rdi
callq 0x94962
movq %rsp, %rdi
callq 0x8d7f4
jmp 0xa0824
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x86012
jmp 0xa0824
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa084a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0xa084a
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x86012
movq %rbx, %rdi
callq 0x1bf70
nop
| _ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_A0699
mov r14, rdi
cmp qword ptr [rdi+30h], 0
jz loc_A06B7
mov r15, rdx
lea r12, [rsp+138h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_A06E9
mov rsi, [r14+30h]
lea rdi, [rsp+138h+var_98]
mov rdx, r15
call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_98]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, rsp
lea rsi, [rsp+138h+var_E8]
lea rcx, [rsp+138h+var_108]
mov edx, 1
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&)
xorps xmm0, xmm0
movups [rsp+138h+var_120], xmm0
mov [rsp+138h+var_110], 0
lea r14, [rsp+138h+var_A8]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_A04AA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A04AA:
mov rdi, [rsp+138h+var_C0]
test rdi, rdi
jz short loc_A04B9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A04B9:
mov rdi, [rsp+138h+var_D0]
test rdi, rdi
jz short loc_A04C8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A04C8:
mov rdi, [rsp+138h+var_E0]
test rdi, rdi
jz short loc_A04FE
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A04E9
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A04F3
loc_A04E9:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A04F3:
cmp eax, 1
jnz short loc_A04FE
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A04FE:
lea r14, [rsp+138h+var_120]
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_78]
mov rcx, rsp
mov rdx, r15
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
lea rdi, [rsp+138h+var_108]
lea rsi, [rsp+138h+var_E8]
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+138h+var_108]
mov rdx, [rsp+138h+var_100]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A0557
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A0557:
lea rbx, [rsp+138h+var_A8]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A057F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A057F:
mov rdi, [rsp+138h+var_C0]
test rdi, rdi
jz short loc_A058E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A058E:
mov rdi, [rsp+138h+var_D0]
test rdi, rdi
jz short loc_A059D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A059D:
mov rdi, [rsp+138h+var_E0]
test rdi, rdi
jz short loc_A05D3
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A05BE
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A05C8
loc_A05BE:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A05C8:
cmp eax, 1
jnz short loc_A05D3
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A05D3:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A0604
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A0604:
lea rbx, [rsp+138h+var_38]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A062C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A062C:
mov rdi, [rsp+138h+var_50]
test rdi, rdi
jz short loc_A063E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A063E:
mov rdi, [rsp+138h+var_60]
test rdi, rdi
jz short loc_A0650
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A0650:
mov rdi, [rsp+138h+var_70]
test rdi, rdi
jz short loc_A0689
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A0674
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A067E
loc_A0674:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A067E:
cmp eax, 1
jnz short loc_A0689
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A0689:
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A0699:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeFilt; "FilterNode.filter is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_A06D3
loc_A06B7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeBody; "FilterNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_A06D3:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_A06E9:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
lea rsi, [rsp+138h+var_78]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aFilterMustBeAC; "Filter must be a callable: "
lea rdi, [rsp+138h+var_E8]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+138h+var_E8]
mov rdi, r14
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, r14; void *
call ___cxa_throw
mov rbx, rax
lea rax, [rsp+138h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A0767
mov rsi, [rsp+138h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A0767:
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A0782
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A0782:
test bpl, bpl
jnz short loc_A07AF
jmp loc_A084A
mov rbx, rax
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A07AF
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A07AF
mov rbx, rax
loc_A07AF:
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_A084A
jmp short $+2
loc_A07BE:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_A0857
mov rbx, rax
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A07F1
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A07F1
mov rbx, rax
loc_A07F1:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_A0800
mov rbx, rax
loc_A0800:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_A0824
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_A0824
mov rbx, rax
loc_A0824:
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A084A
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A084A
mov rbx, rax
loc_A084A:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A0857:
mov rdi, rbx
call __Unwind_Resume
| long long minja::FilterNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
long long v4; // rdi
signed __int32 v5; // eax
long long v6; // rdi
signed __int32 v7; // eax
long long result; // rax
long long v9; // rdi
std::runtime_error *exception; // r14
void *v11; // r14
_QWORD v12[2]; // [rsp+0h] [rbp-138h] BYREF
__int128 v13; // [rsp+18h] [rbp-120h] BYREF
long long v14; // [rsp+28h] [rbp-110h]
void *v15[2]; // [rsp+30h] [rbp-108h] BYREF
long long v16; // [rsp+40h] [rbp-F8h] BYREF
_BYTE v17[8]; // [rsp+50h] [rbp-E8h] BYREF
long long v18; // [rsp+58h] [rbp-E0h]
volatile signed __int32 *v19; // [rsp+68h] [rbp-D0h]
volatile signed __int32 *v20; // [rsp+78h] [rbp-C0h]
volatile signed __int32 *v21; // [rsp+88h] [rbp-B0h]
char v22[16]; // [rsp+90h] [rbp-A8h] BYREF
void *v23[2]; // [rsp+A0h] [rbp-98h] BYREF
long long v24; // [rsp+B0h] [rbp-88h] BYREF
_BYTE v25[8]; // [rsp+C0h] [rbp-78h] BYREF
long long v26; // [rsp+C8h] [rbp-70h]
volatile signed __int32 *v27; // [rsp+D8h] [rbp-60h]
volatile signed __int32 *v28; // [rsp+E8h] [rbp-50h]
long long v29; // [rsp+F0h] [rbp-48h]
volatile signed __int32 *v30; // [rsp+F8h] [rbp-40h]
char v31[56]; // [rsp+100h] [rbp-38h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.filter is null");
goto LABEL_47;
}
if ( !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.body is null");
LABEL_47:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v25, v3);
if ( !v29 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v12, (long long)v25, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v17, (long long)"Filter must be a callable: ", (long long)v12);
std::runtime_error::runtime_error(v11, v17);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render[abi:cxx11]((long long)v23, *(long long ( ****)(_QWORD))(a1 + 48));
minja::Value::Value((long long)v17, (long long)v23);
std::vector<minja::Value>::vector((long long)v12, (long long)v17, 1LL);
v13 = 0LL;
v14 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v4 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v5 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v5 - 1;
}
else
{
v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v5 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL);
}
minja::Value::call((long long)v17, (long long)v25);
minja::Value::to_str[abi:cxx11](v15, (long long)v17);
std::__ostream_insert<char,std::char_traits<char>>(a2, v15[0], v15[1]);
if ( v15[0] != &v16 )
operator delete(v15[0], v16 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v6 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
std::vector<std::pair<std::string,minja::Value>>::~vector((char **)&v13);
std::vector<minja::Value>::~vector(v12);
if ( v23[0] != &v24 )
operator delete(v23[0], v24 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v31);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v31);
if ( v30 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v28 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28);
if ( v27 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27);
v9 = v26;
if ( v26 )
{
if ( _libc_single_threaded )
{
result = *(unsigned int *)(v26 + 12);
*(_DWORD *)(v26 + 12) = result - 1;
}
else
{
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v26 + 12), 0xFFFFFFFF);
}
if ( (_DWORD)result == 1 )
return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL);
}
return result;
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x001a0699
MOV R14,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001a06b7
MOV R15,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x00185d20
CMP qword ptr [R12 + 0x30],0x0
JZ 0x001a06e9
MOV RSI,qword ptr [R14 + 0x30]
LAB_001a0438:
LEA RDI,[RSP + 0xa0]
MOV RDX,R15
CALL 0x0019eb26
LAB_001a0448:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x0018a070
LAB_001a045a:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
LEA RCX,[RSP + 0x30]
MOV EDX,0x1
CALL 0x00193238
LAB_001a0471:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x28],0x0
LEA R14,[RSP + 0x90]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158644
MOV RDI,R14
CALL 0x0015db32
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001a04aa
CALL 0x0016d556
LAB_001a04aa:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001a04b9
CALL 0x0016d556
LAB_001a04b9:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x001a04c8
CALL 0x0016d556
LAB_001a04c8:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x001a04fe
MOV RAX,qword ptr [0x0022df80]
CMP byte ptr [RAX],0x0
JZ 0x001a04e9
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a04f3
LAB_001a04e9:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a04f3:
CMP EAX,0x1
JNZ 0x001a04fe
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a04fe:
LEA R14,[RSP + 0x18]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RCX,RSP
MOV RDX,R15
CALL 0x0019361a
LAB_001a051b:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
CALL 0x00196912
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
LAB_001a0534:
MOV RDI,RBX
CALL 0x0011b9c0
LAB_001a053c:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a0557
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011b8b0
LAB_001a0557:
LEA RBX,[RSP + 0x90]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00158644
MOV RDI,RBX
CALL 0x0015db32
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a057f
CALL 0x0016d556
LAB_001a057f:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001a058e
CALL 0x0016d556
LAB_001a058e:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x001a059d
CALL 0x0016d556
LAB_001a059d:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x001a05d3
MOV RAX,qword ptr [0x0022df80]
CMP byte ptr [RAX],0x0
JZ 0x001a05be
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a05c8
LAB_001a05be:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a05c8:
CMP EAX,0x1
JNZ 0x001a05d3
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a05d3:
MOV RDI,R14
CALL 0x00194962
MOV RDI,RSP
CALL 0x0018d7f4
LEA RAX,[RSP + 0xb0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a0604
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x0011b8b0
LAB_001a0604:
LEA RBX,[RSP + 0x100]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00158644
MOV RDI,RBX
CALL 0x0015db32
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a062c
CALL 0x0016d556
LAB_001a062c:
MOV RDI,qword ptr [RSP + 0xe8]
TEST RDI,RDI
JZ 0x001a063e
CALL 0x0016d556
LAB_001a063e:
MOV RDI,qword ptr [RSP + 0xd8]
TEST RDI,RDI
JZ 0x001a0650
CALL 0x0016d556
LAB_001a0650:
MOV RDI,qword ptr [RSP + 0xc8]
TEST RDI,RDI
JZ 0x001a0689
MOV RAX,qword ptr [0x0022df80]
CMP byte ptr [RAX],0x0
JZ 0x001a0674
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a067e
LAB_001a0674:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a067e:
CMP EAX,0x1
JNZ 0x001a0689
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a0689:
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a0699:
MOV EDI,0x10
CALL 0x0011b440
MOV R14,RAX
LAB_001a06a6:
LEA RSI,[0x1f2bb8]
MOV RDI,RAX
CALL 0x0011b320
LAB_001a06b5:
JMP 0x001a06d3
LAB_001a06b7:
MOV EDI,0x10
CALL 0x0011b440
MOV R14,RAX
LAB_001a06c4:
LEA RSI,[0x1f2bd2]
MOV RDI,RAX
CALL 0x0011b320
LAB_001a06d3:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,R14
CALL 0x0011bef0
LAB_001a06e9:
MOV EDI,0x10
CALL 0x0011b440
MOV R14,RAX
LAB_001a06f6:
MOV RDI,RSP
LEA RSI,[RSP + 0xc0]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186334
LAB_001a070d:
LEA RSI,[0x1f2bea]
LEA RDI,[RSP + 0x50]
MOV RDX,RSP
CALL 0x00178ac9
MOV BPL,0x1
LAB_001a0724:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x0011be00
XOR EBP,EBP
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,R14
CALL 0x0011bef0
|
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int iVar2;
runtime_error *prVar3;
vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24];
int8 local_120;
int8 uStack_118;
int8 local_110;
long *local_108;
long local_100;
long local_f8 [2];
Value local_e8 [8];
long *local_e0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b0;
data local_a8 [16];
long *local_98 [2];
long local_88 [2];
Expression local_78 [8];
long *local_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
data local_38 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a06a6 to 001a06b4 has its CatchHandler @ 001a07be */
std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 001a0438 to 001a0447 has its CatchHandler @ 001a0847 */
TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 001a0448 to 001a0459 has its CatchHandler @ 001a0821 */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 001a045a to 001a0470 has its CatchHandler @ 001a0812 */
std::vector<minja::Value,std::allocator<minja::Value>>::vector
(avStack_138,local_e8,1,&local_108);
local_120 = 0;
uStack_118 = 0;
local_110 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_a8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_a8);
if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0);
}
if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0);
}
if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0);
}
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
/* try { // try from 001a04fe to 001a051a has its CatchHandler @ 001a07fd */
Value::call((shared_ptr *)local_e8,(ArgumentsValue *)local_78);
/* try { // try from 001a051b to 001a0529 has its CatchHandler @ 001a07ee */
Value::to_str_abi_cxx11_();
/* try { // try from 001a0534 to 001a053b has its CatchHandler @ 001a07ce */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_108,local_100);
if (local_108 != local_f8) {
operator_delete(local_108,local_f8[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_a8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_a8);
if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0);
}
if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0);
}
if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0);
}
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)&local_120);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_38,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_38);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_70 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_70 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_70 + 0xc);
*(int *)((long)local_70 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_70 + 0x18))();
}
}
return;
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a06f6 to 001a070c has its CatchHandler @ 001a07ac */
Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0));
/* try { // try from 001a070d to 001a0720 has its CatchHandler @ 001a078c */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 001a0724 to 001a0748 has its CatchHandler @ 001a0749 */
std::runtime_error::runtime_error(prVar3,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a06c4 to 001a06d2 has its CatchHandler @ 001a07bc */
std::runtime_error::runtime_error(prVar3,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
| |
22,796 | common_model_params_to_llama(common_params&) | monkey531[P]llama/common/common.cpp | struct llama_model_params common_model_params_to_llama(common_params & params) {
auto mparams = llama_model_default_params();
if (!params.devices.empty()) {
mparams.devices = params.devices.data();
}
if (params.n_gpu_layers != -1) {
mparams.n_gpu_layers = params.n_gpu_layers;
}
mparams.main_gpu = params.main_gpu;
mparams.split_mode = params.split_mode;
mparams.tensor_split = params.tensor_split;
mparams.use_mmap = params.use_mmap;
mparams.use_mlock = params.use_mlock;
mparams.check_tensors = params.check_tensors;
if (params.kv_overrides.empty()) {
mparams.kv_overrides = NULL;
} else {
GGML_ASSERT(params.kv_overrides.back().key[0] == 0 && "KV overrides not terminated with empty key");
mparams.kv_overrides = params.kv_overrides.data();
}
return mparams;
} | O3 | cpp | common_model_params_to_llama(common_params&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1ae90
movq 0x50(%r14), %rax
cmpq 0x58(%r14), %rax
je 0x74d40
movq %rax, (%rbx)
movl 0x68(%r14), %eax
cmpl $-0x1, %eax
je 0x74d4c
movl %eax, 0x8(%rbx)
movl 0x6c(%r14), %eax
movl %eax, 0x10(%rbx)
movl 0x270(%r14), %eax
movl %eax, 0xc(%rbx)
leaq 0x70(%r14), %rax
movq %rax, 0x18(%rbx)
movb 0xfe9(%r14), %al
movb %al, 0x39(%rbx)
movb 0xfea(%r14), %al
movb %al, 0x3a(%rbx)
movb 0xff0(%r14), %al
movb %al, 0x3b(%rbx)
movq 0xf48(%r14), %rax
movq 0xf50(%r14), %rcx
cmpq %rcx, %rax
je 0x74dc0
cmpb $0x0, -0x104(%rcx)
je 0x74dc2
leaq 0x7a5fb(%rip), %rdi # 0xef3a1
leaq 0x777e6(%rip), %rdx # 0xec593
leaq 0x7aaf2(%rip), %rcx # 0xef8a6
movl $0x44b, %esi # imm = 0x44B
xorl %eax, %eax
callq 0x1aeb0
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _Z28common_model_params_to_llamaR13common_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _llama_model_default_params
mov rax, [r14+50h]
cmp rax, [r14+58h]
jz short loc_74D40
mov [rbx], rax
loc_74D40:
mov eax, [r14+68h]
cmp eax, 0FFFFFFFFh
jz short loc_74D4C
mov [rbx+8], eax
loc_74D4C:
mov eax, [r14+6Ch]
mov [rbx+10h], eax
mov eax, [r14+270h]
mov [rbx+0Ch], eax
lea rax, [r14+70h]
mov [rbx+18h], rax
mov al, [r14+0FE9h]
mov [rbx+39h], al
mov al, [r14+0FEAh]
mov [rbx+3Ah], al
mov al, [r14+0FF0h]
mov [rbx+3Bh], al
mov rax, [r14+0F48h]
mov rcx, [r14+0F50h]
cmp rax, rcx
jz short loc_74DC0
cmp byte ptr [rcx-104h], 0
jz short loc_74DC2
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aParamsKvOverri; "params.kv_overrides.back().key[0] == 0 "...
mov esi, 44Bh
xor eax, eax
call _ggml_abort
loc_74DC0:
xor eax, eax
loc_74DC2:
mov [rbx+30h], rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| common_params * common_model_params_to_llama(common_params *a1, long long a2)
{
long long v2; // rax
int v3; // eax
long long v4; // rax
long long v5; // rcx
llama_model_default_params(a1);
v2 = *(_QWORD *)(a2 + 80);
if ( v2 != *(_QWORD *)(a2 + 88) )
*(_QWORD *)a1 = v2;
v3 = *(_DWORD *)(a2 + 104);
if ( v3 != -1 )
*((_DWORD *)a1 + 2) = v3;
*((_DWORD *)a1 + 4) = *(_DWORD *)(a2 + 108);
*((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 624);
*((_QWORD *)a1 + 3) = a2 + 112;
*((_BYTE *)a1 + 57) = *(_BYTE *)(a2 + 4073);
*((_BYTE *)a1 + 58) = *(_BYTE *)(a2 + 4074);
*((_BYTE *)a1 + 59) = *(_BYTE *)(a2 + 4080);
v4 = *(_QWORD *)(a2 + 3912);
v5 = *(_QWORD *)(a2 + 3920);
if ( v4 == v5 )
goto LABEL_8;
if ( *(_BYTE *)(v5 - 260) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1099LL,
"GGML_ASSERT(%s) failed",
"params.kv_overrides.back().key[0] == 0 && \"KV overrides not terminated with empty key\"");
LABEL_8:
v4 = 0LL;
}
*((_QWORD *)a1 + 6) = v4;
return a1;
}
| common_model_params_to_llama:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011ae90
MOV RAX,qword ptr [R14 + 0x50]
CMP RAX,qword ptr [R14 + 0x58]
JZ 0x00174d40
MOV qword ptr [RBX],RAX
LAB_00174d40:
MOV EAX,dword ptr [R14 + 0x68]
CMP EAX,-0x1
JZ 0x00174d4c
MOV dword ptr [RBX + 0x8],EAX
LAB_00174d4c:
MOV EAX,dword ptr [R14 + 0x6c]
MOV dword ptr [RBX + 0x10],EAX
MOV EAX,dword ptr [R14 + 0x270]
MOV dword ptr [RBX + 0xc],EAX
LEA RAX,[R14 + 0x70]
MOV qword ptr [RBX + 0x18],RAX
MOV AL,byte ptr [R14 + 0xfe9]
MOV byte ptr [RBX + 0x39],AL
MOV AL,byte ptr [R14 + 0xfea]
MOV byte ptr [RBX + 0x3a],AL
MOV AL,byte ptr [R14 + 0xff0]
MOV byte ptr [RBX + 0x3b],AL
MOV RAX,qword ptr [R14 + 0xf48]
MOV RCX,qword ptr [R14 + 0xf50]
CMP RAX,RCX
JZ 0x00174dc0
CMP byte ptr [RCX + -0x104],0x0
JZ 0x00174dc2
LEA RDI,[0x1ef3a1]
LEA RDX,[0x1ec593]
LEA RCX,[0x1ef8a6]
MOV ESI,0x44b
XOR EAX,EAX
CALL 0x0011aeb0
LAB_00174dc0:
XOR EAX,EAX
LAB_00174dc2:
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* common_model_params_to_llama(common_params&) */
common_params * common_model_params_to_llama(common_params *param_1)
{
long lVar1;
long in_RSI;
llama_model_default_params();
if (*(long *)(in_RSI + 0x50) != *(long *)(in_RSI + 0x58)) {
*(long *)param_1 = *(long *)(in_RSI + 0x50);
}
if (*(int *)(in_RSI + 0x68) != -1) {
*(int *)(param_1 + 8) = *(int *)(in_RSI + 0x68);
}
*(int4 *)(param_1 + 0x10) = *(int4 *)(in_RSI + 0x6c);
*(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x270);
*(long *)(param_1 + 0x18) = in_RSI + 0x70;
param_1[0x39] = *(common_params *)(in_RSI + 0xfe9);
param_1[0x3a] = *(common_params *)(in_RSI + 0xfea);
param_1[0x3b] = *(common_params *)(in_RSI + 0xff0);
lVar1 = *(long *)(in_RSI + 0xf48);
if (lVar1 == *(long *)(in_RSI + 0xf50)) {
lVar1 = 0;
}
else if (*(char *)(*(long *)(in_RSI + 0xf50) + -0x104) != '\0') {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",1099,
"GGML_ASSERT(%s) failed",
"params.kv_overrides.back().key[0] == 0 && \"KV overrides not terminated with empty key\""
);
}
*(long *)(param_1 + 0x30) = lVar1;
return param_1;
}
| |
22,797 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O1 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xb1a92
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xb1a92
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5d76e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4050e(%rip), %rsi # 0xf1fc4
leaq 0x10(%rsp), %rdi
callq 0xb1b2b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x85d12
xorl %ebp, %ebp
leaq 0x78427(%rip), %rsi # 0x129f08
leaq -0x58238(%rip), %rdx # 0x598b0
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb1b16
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xb1b16
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb1b23
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_B1A92
mov rax, [r14+8]
test rax, rax
jz short loc_B1A92
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B1A92:
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)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; 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 rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B1B16
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B1B16
mov r14, rax
mov bpl, 1
loc_B1B16:
test bpl, bpl
jz short loc_B1B23
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B1B23:
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>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v3[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__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(&)[56],char const*>(
v3,
"incompatible ReferenceType for get_ref, actual type is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
303,
v3);
__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 result;
}
| get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001b1a92
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x001b1a92
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b1a92:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015d76e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b1aaf:
LEA RSI,[0x1f1fc4]
LEA RDI,[RSP + 0x10]
CALL 0x001b1b2b
MOV BPL,0x1
LAB_001b1ac3:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x00185d12
XOR EBP,EBP
LEA RSI,[0x229f08]
LEA RDX,[0x1598b0]
MOV RDI,RBX
CALL 0x0011aea0
|
/* std::__cxx11::string const&
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::get_ref_impl<std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
string * 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>
::
get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)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 001b1aaf to 001b1abf has its CatchHandler @ 001b1b10 */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001b1ac3 to 001b1aef has its CatchHandler @ 001b1af0 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
22,798 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x8825a
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x8825a
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x425be
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2bd28(%rip), %rsi # 0xb3fa4
leaq 0x10(%rsp), %rdi
callq 0x8247f
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x42472
xorl %ebp, %ebp
leaq 0x71ca1(%rip), %rsi # 0xf9f48
leaq -0x49160(%rip), %rdx # 0x3f14e
movq %rbx, %rdi
callq 0x23e90
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x882cd
jmp 0x882d5
movq %rax, %r14
movq %rbx, %rdi
callq 0x23660
movq %r14, %rdi
callq 0x23f10
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_8825A
mov rax, [r14+8]
test rax, rax
jz short loc_8825A
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_8825A:
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, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, 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_882CD
jmp short loc_882D5
mov r14, rax
loc_882CD:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_882D5:
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>::get_ref_impl<std::string&,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 result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
303,
(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 result;
}
| get_ref_impl<std::__cxx11::string&,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 0x0018825a
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x0018825a
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0018825a:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x001425be
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00188275:
LEA RSI,[0x1b3fa4]
LEA RDI,[RSP + 0x10]
CALL 0x0018247f
MOV BPL,0x1
LAB_00188289:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x00142472
XOR EBP,EBP
LEA RSI,[0x1f9f48]
LEA RDX,[0x13f14e]
MOV RDI,RBX
CALL 0x00123e90
|
/* std::__cxx11::string&
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>::get_ref_impl<std::__cxx11::string&,
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>&) */
string * 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>
::
get_ref_impl<std::__cxx11::string&,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)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == '\x03') && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)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 00188275 to 00188285 has its CatchHandler @ 001882ca */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 00188289 to 001882b5 has its CatchHandler @ 001882b6 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
22,799 | flux::parser::Parser::ternary() | kvthweatt[P]FluxLang/src/parser/parser.cpp | std::unique_ptr<Expr> Parser::ternary() {
auto expr = logicalOr();
if (!expr) return nullptr;
if (match(lexer::TokenType::QUESTION)) {
// Parse the 'then' expression
auto thenExpr = expression();
if (!thenExpr) {
error("Expected expression after '?' in ternary");
return expr; // Return what we have so far
}
consume(lexer::TokenType::COLON, "Expected ':' in ternary expression");
// Parse the 'else' expression
auto elseExpr = expression();
if (!elseExpr) {
error("Expected expression after ':' in ternary");
return expr; // Return what we have so far
}
return std::make_unique<TernaryExpr>(
std::move(expr),
std::move(thenExpr),
std::move(elseExpr),
makeRange(expr->range.start, elseExpr->range.end)
);
}
return expr;
} | O3 | cpp | flux::parser::Parser::ternary():
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x22870
cmpq $0x0, (%r15)
je 0x22772
movq %r14, %rdi
movl $0x56, %esi
callq 0x145c8
testb %al, %al
je 0x2277e
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1c004
cmpq $0x0, 0x10(%rsp)
je 0x2278b
leaq 0x9b2d(%rip), %r8 # 0x2c1e7
leaq 0x40(%rsp), %rdi
movl $0x22, %ecx
movq %r14, %rsi
movl $0x57, %edx
callq 0x1466c
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x226f2
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6280
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x1c004
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x227b6
movq 0x8(%rsp), %r14
movups 0x8(%r14), %xmm0
movaps %xmm0, 0x20(%rsp)
movups 0x18(%r15), %xmm0
movaps %xmm0, 0x30(%rsp)
movl $0x40, %edi
callq 0x6270
xorl %ecx, %ecx
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rdx
movq %rcx, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movups %xmm1, 0x18(%rax)
movups %xmm0, 0x8(%rax)
leaq 0x15b2e(%rip), %rcx # 0x38288
addq $0x10, %rcx
movq %rcx, (%rax)
movq %r14, 0x28(%rax)
movq %rdx, 0x30(%rax)
movq %r15, 0x38(%rax)
movq %rax, (%rbx)
jmp 0x227ef
movq $0x0, (%rbx)
jmp 0x2280f
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
jmp 0x2280f
leaq 0x8(%r14), %rsi
leaq 0x9a28(%rip), %rcx # 0x2c1be
movl $0x28, %edx
movq %r14, %rdi
callq 0x14350
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rsp)
jmp 0x227ef
leaq 0x8(%r14), %rsi
leaq 0x9a49(%rip), %rcx # 0x2c20a
movl $0x28, %edx
movq %r14, %rdi
callq 0x14350
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x227ef
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x227ff
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2280f
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x18(%rsp), %r15
testq %r15, %r15
jne 0x22831
jmp 0x22841
movq %rax, %rbx
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
jmp 0x22841
jmp 0x2283e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x22858
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x22858
jmp 0x22855
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x22868
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x6440
| _ZN4flux6parser6Parser7ternaryEv:
push r15
push r14
push rbx
sub rsp, 0A0h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+0B8h+var_B0]
mov rdi, r15; this
call _ZN4flux6parser6Parser9logicalOrEv; flux::parser::Parser::logicalOr(void)
cmp qword ptr [r15], 0
jz loc_22772
mov rdi, r14
mov esi, 56h ; 'V'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz loc_2277E
lea rdi, [rsp+0B8h+var_A8]; this
mov rsi, r14
call _ZN4flux6parser6Parser10expressionEv; flux::parser::Parser::expression(void)
cmp [rsp+0B8h+var_A8], 0
jz loc_2278B
lea r8, aExpectedInTern; "Expected ':' in ternary expression"
lea rdi, [rsp+0B8h+var_78]; this
mov ecx, 22h ; '"'
mov rsi, r14
mov edx, 57h ; 'W'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
lea rax, [rsp+0B8h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_226F2
mov rsi, [rsp+0B8h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_226F2:
lea rdi, [rsp+0B8h+var_A0]; this
mov rsi, r14
call _ZN4flux6parser6Parser10expressionEv; flux::parser::Parser::expression(void)
mov r15, [rsp+0B8h+var_A0]
test r15, r15
jz loc_227B6
mov r14, [rsp+0B8h+var_B0]
movups xmm0, xmmword ptr [r14+8]
movaps [rsp+0B8h+var_98], xmm0
movups xmm0, xmmword ptr [r15+18h]
movaps [rsp+0B8h+var_88], xmm0
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
xor ecx, ecx
mov [rsp+0B8h+var_B0], rcx
mov rdx, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_A8], rcx
movaps xmm0, [rsp+0B8h+var_98]
movaps xmm1, [rsp+0B8h+var_88]
movups xmmword ptr [rax+18h], xmm1
movups xmmword ptr [rax+8], xmm0
lea rcx, _ZTVN4flux6parser11TernaryExprE; `vtable for'flux::parser::TernaryExpr
add rcx, 10h
mov [rax], rcx
mov [rax+28h], r14
mov [rax+30h], rdx
mov [rax+38h], r15
mov [rbx], rax
jmp short loc_227EF
loc_22772:
mov qword ptr [rbx], 0
jmp loc_2280F
loc_2277E:
mov rax, [rsp+0B8h+var_B0]
mov [rbx], rax
jmp loc_2280F
loc_2278B:
lea rsi, [r14+8]
lea rcx, aExpectedExpres_6; "Expected expression after '?' in ternar"...
mov edx, 28h ; '('
mov rdi, r14
call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view)
mov rax, [rsp+0B8h+var_B0]
mov [rbx], rax
mov [rsp+0B8h+var_B0], 0
jmp short loc_227EF
loc_227B6:
lea rsi, [r14+8]
lea rcx, aExpectedExpres_7; "Expected expression after ':' in ternar"...
mov edx, 28h ; '('
mov rdi, r14
call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view)
mov rax, [rsp+0B8h+var_B0]
mov [rbx], rax
mov [rsp+0B8h+var_B0], 0
mov rdi, [rsp+0B8h+var_A0]
test rdi, rdi
jz short loc_227EF
mov rax, [rdi]
call qword ptr [rax+8]
loc_227EF:
mov rdi, [rsp+0B8h+var_A8]
test rdi, rdi
jz short loc_227FF
mov rax, [rdi]
call qword ptr [rax+8]
loc_227FF:
mov rdi, [rsp+0B8h+var_B0]
test rdi, rdi
jz short loc_2280F
mov rax, [rdi]
call qword ptr [rax+8]
loc_2280F:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov r15, [rsp+arg_10]
test r15, r15
jnz short loc_22831
jmp short loc_22841
mov rbx, rax
loc_22831:
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+8]
jmp short loc_22841
jmp short $+2
loc_2283E:
mov rbx, rax
loc_22841:
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_22858
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_22858
jmp short $+2
loc_22855:
mov rbx, rax
loc_22858:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_22868
mov rax, [rdi]
call qword ptr [rax+8]
loc_22868:
mov rdi, rbx
call __Unwind_Resume
| flux::parser::Parser * flux::parser::Parser::ternary(flux::parser::Parser *this, long long a2)
{
_BYTE *v2; // r14
long long v3; // r15
long long v4; // r14
long long v5; // rax
long long v6; // rdx
__int128 v7; // xmm0
long long v9; // [rsp+8h] [rbp-B0h] BYREF
long long v10; // [rsp+10h] [rbp-A8h] BYREF
long long v11; // [rsp+18h] [rbp-A0h] BYREF
__int128 v12; // [rsp+20h] [rbp-98h]
__int128 v13; // [rsp+30h] [rbp-88h]
_BYTE v14[64]; // [rsp+40h] [rbp-78h] BYREF
long long *v15; // [rsp+80h] [rbp-38h]
long long v16; // [rsp+90h] [rbp-28h] BYREF
v2 = (_BYTE *)a2;
flux::parser::Parser::logicalOr((flux::parser::Parser *)&v9);
if ( v9 )
{
if ( flux::parser::Parser::match(a2, 86) )
{
flux::parser::Parser::expression((flux::parser::Parser *)&v10);
if ( v10 )
{
flux::parser::Parser::consume(
(flux::parser::Parser *)v14,
a2,
87,
34LL,
(long long)"Expected ':' in ternary expression");
if ( v15 != &v16 )
operator delete(v15, v16 + 1);
flux::parser::Parser::expression((flux::parser::Parser *)&v11);
v3 = v11;
if ( v11 )
{
v4 = v9;
v12 = *(_OWORD *)(v9 + 8);
v13 = *(_OWORD *)(v11 + 24);
v5 = operator new(0x40uLL);
v9 = 0LL;
v6 = v10;
v10 = 0LL;
v7 = v12;
*(_OWORD *)(v5 + 24) = v13;
*(_OWORD *)(v5 + 8) = v7;
*(_QWORD *)v5 = &`vtable for'flux::parser::TernaryExpr + 2;
*(_QWORD *)(v5 + 40) = v4;
*(_QWORD *)(v5 + 48) = v6;
*(_QWORD *)(v5 + 56) = v3;
*(_QWORD *)this = v5;
}
else
{
a2 += 8LL;
flux::parser::Parser::error(v2, (long long)(v2 + 8), 40LL, (long long)"Expected expression after ':' in ternary");
*(_QWORD *)this = v9;
v9 = 0LL;
if ( v11 )
(*(void ( **)(long long))(*(_QWORD *)v11 + 8LL))(v11);
}
}
else
{
a2 += 8LL;
flux::parser::Parser::error(v2, (long long)(v2 + 8), 40LL, (long long)"Expected expression after '?' in ternary");
*(_QWORD *)this = v9;
v9 = 0LL;
}
if ( v10 )
(*(void ( **)(long long, long long))(*(_QWORD *)v10 + 8LL))(v10, a2);
if ( v9 )
(*(void ( **)(long long, long long))(*(_QWORD *)v9 + 8LL))(v9, a2);
}
else
{
*(_QWORD *)this = v9;
}
}
else
{
*(_QWORD *)this = 0LL;
}
return this;
}
| ternary:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00122870
CMP qword ptr [R15],0x0
JZ 0x00122772
LAB_00122685:
MOV RDI,R14
MOV ESI,0x56
CALL 0x001145c8
TEST AL,AL
JZ 0x0012277e
LAB_0012269a:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0011c004
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0012278b
LAB_001226b3:
LEA R8,[0x12c1e7]
LEA RDI,[RSP + 0x40]
MOV ECX,0x22
MOV RSI,R14
MOV EDX,0x57
CALL 0x0011466c
LEA RAX,[RSP + 0x90]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001226f2
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x00106280
LAB_001226f2:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x0011c004
MOV R15,qword ptr [RSP + 0x18]
TEST R15,R15
JZ 0x001227b6
MOV R14,qword ptr [RSP + 0x8]
MOVUPS XMM0,xmmword ptr [R14 + 0x8]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [R15 + 0x18]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LAB_00122726:
MOV EDI,0x40
CALL 0x00106270
XOR ECX,ECX
MOV qword ptr [RSP + 0x8],RCX
MOV RDX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RAX + 0x18],XMM1
MOVUPS xmmword ptr [RAX + 0x8],XMM0
LEA RCX,[0x138288]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x28],R14
MOV qword ptr [RAX + 0x30],RDX
MOV qword ptr [RAX + 0x38],R15
MOV qword ptr [RBX],RAX
JMP 0x001227ef
LAB_00122772:
MOV qword ptr [RBX],0x0
JMP 0x0012280f
LAB_0012277e:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],RAX
JMP 0x0012280f
LAB_0012278b:
LEA RSI,[R14 + 0x8]
LAB_0012278f:
LEA RCX,[0x12c1be]
MOV EDX,0x28
MOV RDI,R14
CALL 0x00114350
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],RAX
MOV qword ptr [RSP + 0x8],0x0
JMP 0x001227ef
LAB_001227b6:
LEA RSI,[R14 + 0x8]
LAB_001227ba:
LEA RCX,[0x12c20a]
MOV EDX,0x28
MOV RDI,R14
CALL 0x00114350
LAB_001227ce:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001227ef
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_001227ef:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001227ff
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_001227ff:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012280f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0012280f:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Removing unreachable block (ram,0x00122809) */
/* flux::parser::Parser::ternary() */
void flux::parser::Parser::ternary(void)
{
long *plVar1;
char cVar2;
int8 *puVar3;
long *in_RDI;
long local_b0;
long *local_a8;
long *local_a0;
int8 local_98;
int8 uStack_90;
long local_88;
long lStack_80;
int1 local_78 [64];
long *local_38;
long local_28 [2];
logicalOr();
if (local_b0 == 0) {
*in_RDI = 0;
}
else {
/* try { // try from 00122685 to 00122691 has its CatchHandler @ 00122855 */
cVar2 = match();
if (cVar2 == '\0') {
*in_RDI = local_b0;
}
else {
/* try { // try from 0012269a to 001226a6 has its CatchHandler @ 00122853 */
expression((Parser *)&local_a8);
if (local_a8 == (long *)0x0) {
/* try { // try from 0012278f to 001227a2 has its CatchHandler @ 0012283e */
error();
*in_RDI = local_b0;
}
else {
/* try { // try from 001226b3 to 001226d0 has its CatchHandler @ 0012283e */
consume(local_78);
if (local_38 != local_28) {
operator_delete(local_38,local_28[0] + 1);
}
/* try { // try from 001226f2 to 001226fe has its CatchHandler @ 0012283c */
expression((Parser *)&local_a0);
if (local_a0 == (long *)0x0) {
/* try { // try from 001227ba to 001227cd has its CatchHandler @ 0012281f */
error();
*in_RDI = local_b0;
if (local_a0 != (long *)0x0) {
(**(code **)(*local_a0 + 8))();
}
}
else {
local_98 = *(int8 *)(local_b0 + 8);
uStack_90 = *(int8 *)(local_b0 + 0x10);
local_88 = local_a0[3];
lStack_80 = local_a0[4];
/* try { // try from 00122726 to 0012272f has its CatchHandler @ 0012282e */
puVar3 = (int8 *)operator_new(0x40);
plVar1 = local_a8;
local_a8 = (long *)0x0;
puVar3[3] = local_88;
puVar3[4] = lStack_80;
*(int4 *)(puVar3 + 1) = (int4)local_98;
*(int4 *)((long)puVar3 + 0xc) = local_98._4_4_;
*(int4 *)(puVar3 + 2) = (int4)uStack_90;
*(int4 *)((long)puVar3 + 0x14) = uStack_90._4_4_;
*puVar3 = &PTR__TernaryExpr_00138298;
puVar3[5] = local_b0;
puVar3[6] = plVar1;
puVar3[7] = local_a0;
*in_RDI = (long)puVar3;
}
}
if (local_a8 != (long *)0x0) {
(**(code **)(*local_a8 + 8))();
}
}
}
return;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.